Help working with layers in zBrush with a custom user interface.
Setuping maya to be able to import blendshape directly:
>>> # add zlm script folder to sys path
>>> import sys
>>> sys.path.append(r"{path to dist}\ZlmData\app\maya")
>>> import zlm
>>> # open communication port so maya can receive command
>>> zlm.open_port()
Notes: You can specify any import callback, in this exemple, default import callback are used. When importing a blendshape, it check if there is a mesh with the same name in the scene, if soo, it will update it vertex position with the new mesh and delete the new mesh. Oterwise, it will keep the new imported mesh in the scene.
You will need a python 3.7.9 installation to execute the scripts.
> python -m venv venv
> venv\Scripts\activate.bat
> python -m pip install -r requirements.txt
On windows:
> zlm_env\Scripts\activate.bat
On Linux:
> source zlm_env/bin/activate
Enter deactivate
in the console.
If you are on windows 10 make sure you have windows devkit 10 installed.
If not you can download it here.
You might also need to change pathex
value in zlm.spc and zlm_ui.spec to match your location of windows sdk library.
To build you have to navigate to src
folder and activate the virtual environment.
pyinstaller --distpath ..\build zlm.spec
pyinstaller --distpath ..\build zlm_ui.spec
Finally, copy the content of \build\zlm and \build\zlm_ui in dist\ZlmData
Download zfileUtils from this folder and add it to dist/ZlmData/ZFileUtils
.
Also download ZSOCKET. This is used to communicate with DCC.
It should look like that:
|-- ZlmData
| |-- ZFileUtils
| | |-- ZFileUtils.lib
| | |-- ZFileUtils.dll
| |-- app
| |-- ZSOCKET.dll
Make sure to set the good zbrush path in src\zlm_settings.py
ZLM_SETTINGS_PATH: override zlm settings folder ZLM_PRESET_PATH: ';' seperated list of preset folder.