mobvur.blogg.se

Mocha boris fx
Mocha boris fx







mocha boris fx

"Prepend Selected Layer Names": (scripts_menu,layer_label),įor key, value in list(actions_ems()):

mocha boris fx

"Shade Mattes By Layer Order": (scripts_menu,shade_mattes), "Randomise Matte Colors": (scripts_menu,random_colors), "Surface to Spline": (scripts_menu, set_surface), "Frame Jump": (scripts_menu, frame_jump), Scripts_menu = mocha_menubar.addMenu('Scripts') #create a new Scripts menu optionįrom set_surface_to_spline import SetSurfaceToSplineįrom randomise_layer_colours import RandomiseColoursįrom shade_layers_by_order import ShadeMattesByOrderĭialog = FrameJump(parent=main_window) #Set parent so dialog doesn't sit behind Mocha window Mocha_menubar = list(filter(lambda wgt: isinstance(wgt, QMenuBar), widgets))

mocha boris fx

Main_window = mocha_widget # Define the MainWidget UI to use as a parent 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.

mocha boris fx

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.

  • Linux: '~/.config/Imagineer Systems Ltd/Scripts/init.py'.
  • Windows: 'C:\Users\AppData\Roaming\Imagineer Systems Ltd\Scripts\init.py'.
  • OS X: '~/Library/Application Support/Imagineer Systems Ltd/Scripts/init.py'.
  • The mocha init.py script is generated per system in the following default locations: The default init.py path is the Imaginer Systems Scripts directory. We generate a blank init.py script on the first run of mocha for you to add functionality on startup. To load scripts into Mocha as tools or menu items, you need to import and initalise them via init.py You can run them via the Script Editor or call them using the init.py Scriptsįor more expansive details on using the Mocha Pro Python API, go to the Mocha Python Documentation Page Using the Python Scripts with init.py These scripts are examples of how to use the Mocha Pro Python API.









    Mocha boris fx