Some knowledge of PySide and Qt is helpful here, but if you follow along the script you can see how the widgets are created. We also list code at the end to show how to add this to the file menu in mocha and load a dialog for user entry. Setting up init.pyīelow we show a detailed example of using init.py for creating a user-entry tool to prepend a word onto the front of all selected layers. If unset, the default locations above will be used. If the 'MOCHA_INIT_SCRIPT' environment variable points to a file, that file will be used, if it points to a directory, it will look specifically for init.py in that directory. You can also set the environment variable 'MOCHA_INIT_SCRIPT' to control where the path of the init.py initialization script resides.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |