...
https://github.com/das-element/resources/blob/main/scripts/hooks/examples/shotgrid/pre_export.py
Troubleshooting
To get a better idea what’s happening inside the hook files you can follow these steps:
inside the Python hook file you can add print statements
Code Block print(item) print(item['path'])
start a terminal/command prompt
activate the debug mode -set the environment variable
Code Block # Linux/MacOS export DASELEMENT_LOG_LEVEL=debug # Windows set DASELEMENT_LOG_LEVEL=debug
now run the software via the command line
Code Block # Linux /opt/das-element-1.2.1/das-element-1.2.1 # MacOS /Application # Windows C:\Program Files
If you make changes to the hook file you will need to restart the application to re-read these changes