blockBuildUI
=== Author: Assaf Ben Zur ===
MANSUR - BLOCK
Main BLOCK UI.
This is the main UI for rig building (BLOCK). This is the essence of the entire library.
This tool gathers all user actions, and defines triggers for edditing rigs.
The main goal of this UI is to collect the available build-modules and draw creation buttons for them.
The core module library is defined as the block library, but additionals paths can be inserted into the collect loop.
Many UI triggers are available in this UI, but many are kept external to the UI class, to keep things as clean and independent as possible.
Most core functionalitites belong to the rig classes in 'buildModules'.
Classes
MnsBlockBuildUI [Class]
BLOCK UI Class.
MnsBlockBuildUI methods
bmCategoryChangedTrigger [MnsBlockBuildUI class method]
Constructor: | bmCategoryChangedTrigger(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | copySkin(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | createAllModulesSection(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getListWidgetFromSender(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getPickerProjectionMode(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getPoseMode(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | initializeGuidePresetCb(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | initializePrefDirs(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | plgMatch(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | promoteModule(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | resizeWindowBasedOnLog(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | sceneSelectFromWidgets(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | sortMeshLists(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | toggleProjPerpCam(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | updateMeshWidgetsDict(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getPickerExportMode(self) |
Return: | int |
Arguments: |
|
Optional Arguments: |
Constructor: | loadMeshes(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getToolTipForModule(self, buildModule) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | refreshSelectionState(self, dummy = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | loadSelectionToLineEdit(self, lEditWidget = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | addMeshes(self, listWidget) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | removeMeshes(self, listWidget) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | getCurrentMeshes(self, listWidget = None, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | echoLog(self, msg, svr) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Constructor: | meshListWidgetMenu(self, position) |
Return: | None |
Arguments: |
|
Optional Arguments: |
'Apply' (in build tab, module paths) trigger.
Write the additional paths entered within the UI in the stor json.
Constructor: | applyModulePathsChange(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
'Apply' (in build tab, module paths) trigger.
Write the additional paths entered within the UI in the stor json.
Constructor: | applyModulePresetPathsChange(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Action trigger for any build-module button.
This trigger action will be connected procedurally within the 'drawModuleButton' method in blockUtility.
Constructor: | moduleBuildGuide(self, listWidgetItemName) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Add a module path line to the 'module paths' tree trigger.
Constructor: | addModulePath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Add a module path line to the 'module paths' tree trigger.
Constructor: | addModulePresetPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Connect all UI signals.
Constructor: | connectSignals(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Construct trigger.
Constructor: | constructRigInit(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Deconstruct trigger.
Constructor: | deconstructRigInit(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Define all existing build-modules within a built tab's directory.
This mehthod will run for every valid build-module's directory folder, essentially building the actual build-module button in the UI.
These will all be stored in the 'buildModulesBtns' attribute of this class.
Constructor: | buildModulesDefine(self, modParentPath, listWidget) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Define build module tabs, based on the collected valid build-modules directories.
If the directory in question is a valid directory for build modules:
for every folder containing modules within it, a new tab will be inserted and named based on it.
Constructor: | defineBuildParentModules(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Extract all control shapes from the current constructed rig, and store them for future re-construction.
Constructor: | extractControlShapes(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
For the given rootGuide object, try to locate its corresponding UI button.
Look within this class's 'buildModulesBtns' attribute.
Constructor: | getCorrespondingModuleButtonForModule(self, rootGuide) |
Return: | MnsBuildModuleBtn |
Arguments: |
|
Optional Arguments: |
For the selected state, symmetrize all found control shapes.
sym Mode:
0: Left to Right
1: Right to Left
Constructor: | symmetrizeControlShapes(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Gather all existing additional custom patns from the UI.
Constructor: | gatherAdditionalModulePaths(self) |
Return: | list (Paths) |
Arguments: |
|
Optional Arguments: |
Gather all existing additional custom patns from the UI.
Constructor: | gatherAdditionalModulePresetPaths(self) |
Return: | list (Paths) |
Arguments: |
|
Optional Arguments: |
Get current UI radio-buttons construction state (All/Branch/Module).
Constructor: | getConstructMode(self) |
Return: | int (construction mode) |
Arguments: |
|
Optional Arguments: |
Get passed in module settings.
First get the default settings and values from the build-module directory,
then compare against the rootGuide attributes, and return the filtered and altered settings.
Constructor: | getModuleSettings(self, rootGuide, firstAttempt = True, kwargs) |
Return: | dict,int (optionalArguments, spilt index - for dynUI) |
Arguments: |
|
Optional Arguments: |
Initialize any custom build-modules paths that already exist within the data collect json.
(Read any paths that were added before, on UI draw).
query flag will return the paths only without drawing the items into the UI.
Constructor: | initializeAdditionalModulePaths(self, kwargs) |
Return: | list (Existing Paths) |
Arguments: |
|
Optional Arguments: |
Initialize any custom build-modules paths that already exist within the data collect json.
(Read any paths that were added before, on UI draw).
query flag will return the paths only without drawing the items into the UI.
Constructor: | initializeAdditionalModulePresetsPaths(self, kwargs) |
Return: | list (Existing Paths) |
Arguments: |
|
Optional Arguments: |
Initialize view:
- Set icons
- Set logger view
- Set tab index to 1
- Set-Up CollapsibleWidget view
Constructor: | initView(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Load selected module setting trigger.
Constructor: | loadModuleSettings(self, firstAttempt = True) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Load selected rig settings trigger.
Constructor: | loadRigSettings(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Module duplicate.
Gather all of the requested module's settings, as well as compare against the module's default settings.
Build a new module (same module) using the gathered data, then match all guide positions for the new module guide.
Constructor: | duplicateModule(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Module duplicate.
Gather all of the requested module's settings, as well as compare against the module's default settings.
Build a new module (same module) using the gathered data.
Constructor: | pureDuplicate(self, modRoot, kwargs) |
Return: | MnsBuildModule (New Module) |
Arguments: |
|
Optional Arguments: |
Override event filter to catch the tear off to override it's event.
Constructor: | eventFilter(self, source, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Remove a module path line from the 'module paths' tree trigger.
Constructor: | removeModelPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Remove a module path line from the 'module paths' tree trigger.
Constructor: | removeModulePresetPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Remove all custom control shapes from the current rig.
Constructor: | removeCustomShapes(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Save/Load pose trigger.
Simple method to gather pose data and store it, or apply it.
Constructor: | poseSaveLoadTrigger(self, saveLoadMode = 0) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Show window method.
Constructor: | loadWindow(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Simple method to get the current UI 'defaults' mode.
Constructor: | getDefaultsMode(self) |
Return: | int (defaults mode) |
Arguments: |
|
Optional Arguments: |
Symmetrize module trigger.
Exclusive class member process.
This method will attempt to symmetrize the requested module guides.
Constructor: | symmetrizeModule(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Utils->'New RigTop' trigger.
deselect, then initialize a MnsRig class.
Constructor: | newRigTopTrig(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
orient guides trigger
mode 0 = All
mode 1 = Branch
mode 2 = Module
mode 3 = Selection
Constructor: | orientGuides(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
update setting trigger. This method will apply when a user altered any data within a setting window and chose to apply the changes.
The current settings will be validated against the default settings, and in case any data changed,
all neccessary actions will be called to apply and store the changes.
Constructor: | updateSettings(self, kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
Defenitions
loadBlock
Load the BLOCK UI from globals, avoid UI duplication.
Constructor: loadBlock() Return: None Arguments:
Keyword Arguments:
reloadBlock
Constructor: reloadBlock(previousBlockWindow) Return: None Arguments:
Keyword Arguments: