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
addMeshes [MnsBlockBuildUI class method]
Constructor: | addMeshes(self, listWidget) |
Return: | None |
Arguments: |
|
Optional Arguments: |
addModulePath [MnsBlockBuildUI class method]
Add a module path line to the 'module paths' tree trigger.
Constructor: | addModulePath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
addModulePresetPath [MnsBlockBuildUI class method]
Add a module path line to the 'module paths' tree trigger.
Constructor: | addModulePresetPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
applyModulePathsChange [MnsBlockBuildUI class method]
'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: |
applyModulePresetPathsChange [MnsBlockBuildUI class method]
'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: |
bmCategoryChangedTrigger [MnsBlockBuildUI class method]
Constructor: | bmCategoryChangedTrigger(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
buildModulesDefine [MnsBlockBuildUI class method]
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: |
clearEcho [MnsBlockBuildUI class method]
Constructor: | clearEcho(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
closeEvent [MnsBlockBuildUI class method]
Constructor: | closeEvent(self, QCloseEvent) |
Return: | None |
Arguments: |
|
Optional Arguments: |
connectSignals [MnsBlockBuildUI class method]
Connect all UI signals.
Constructor: | connectSignals(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
constructRigInit [MnsBlockBuildUI class method]
Construct trigger.
Constructor: | constructRigInit(self, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
copySkin [MnsBlockBuildUI class method]
Constructor: | copySkin(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
createAllModulesSection [MnsBlockBuildUI class method]
Constructor: | createAllModulesSection(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
deconstructRigInit [MnsBlockBuildUI class method]
Deconstruct trigger.
Constructor: | deconstructRigInit(self, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
defineBuildParentModules [MnsBlockBuildUI class method]
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: |
duplicateModule [MnsBlockBuildUI class method]
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: |
echoLog [MnsBlockBuildUI class method]
Constructor: | echoLog(self, msg, svr) |
Return: | None |
Arguments: |
|
Optional Arguments: |
eventFilter [MnsBlockBuildUI class method]
Override event filter to catch the tear off to override it's event.
Constructor: | eventFilter(self, source, event) |
Return: | None |
Arguments: |
|
Optional Arguments: |
extractControlShapes [MnsBlockBuildUI class method]
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: |
gatherAdditionalModulePaths [MnsBlockBuildUI class method]
Gather all existing additional custom patns from the UI.
Constructor: | gatherAdditionalModulePaths(self) |
Return: | list (Paths) |
Arguments: |
|
Optional Arguments: |
gatherAdditionalModulePresetPaths [MnsBlockBuildUI class method]
Gather all existing additional custom patns from the UI.
Constructor: | gatherAdditionalModulePresetPaths(self) |
Return: | list (Paths) |
Arguments: |
|
Optional Arguments: |
getConstructMode [MnsBlockBuildUI class method]
Get current UI radio-buttons construction state (All/Branch/Module).
Constructor: | getConstructMode(self) |
Return: | int (construction mode) |
Arguments: |
|
Optional Arguments: |
getCorrespondingModuleButtonForModule [MnsBlockBuildUI class method]
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: |
getCurrentMeshes [MnsBlockBuildUI class method]
Constructor: | getCurrentMeshes(self, listWidget = None, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getDefaultsMode [MnsBlockBuildUI class method]
Simple method to get the current UI 'defaults' mode.
Constructor: | getDefaultsMode(self) |
Return: | int (defaults mode) |
Arguments: |
|
Optional Arguments: |
getListWidgetFromSender [MnsBlockBuildUI class method]
Constructor: | getListWidgetFromSender(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getModuleSettings [MnsBlockBuildUI class method]
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: |
getPickerExportMode [MnsBlockBuildUI class method]
Constructor: | getPickerExportMode(self) |
Return: | int |
Arguments: |
|
Optional Arguments: |
getPickerProjectionMode [MnsBlockBuildUI class method]
Constructor: | getPickerProjectionMode(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getPoseMode [MnsBlockBuildUI class method]
Constructor: | getPoseMode(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
getToolTipForModule [MnsBlockBuildUI class method]
Constructor: | getToolTipForModule(self, buildModule) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initView [MnsBlockBuildUI class method]
Initialize view:
- Set icons
- Set logger view
- Set tab index to 1
- Set-Up CollapsibleWidget view
Constructor: | initView(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initializeAdditionalModulePaths [MnsBlockBuildUI class method]
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: |
initializeAdditionalModulePresetsPaths [MnsBlockBuildUI class method]
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: |
initializeGuidePresetCb [MnsBlockBuildUI class method]
Constructor: | initializeGuidePresetCb(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
initializePrefDirs [MnsBlockBuildUI class method]
Constructor: | initializePrefDirs(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadMeshes [MnsBlockBuildUI class method]
Constructor: | loadMeshes(self, **kwargs) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadModuleSettings [MnsBlockBuildUI class method]
Load selected module setting trigger.
Constructor: | loadModuleSettings(self, firstAttempt = True) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadRigSettings [MnsBlockBuildUI class method]
Load selected rig settings trigger.
Constructor: | loadRigSettings(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadSelectionToLineEdit [MnsBlockBuildUI class method]
Constructor: | loadSelectionToLineEdit(self, lEditWidget = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
loadWindow [MnsBlockBuildUI class method]
Show window method.
Constructor: | loadWindow(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
meshListWidgetMenu [MnsBlockBuildUI class method]
Constructor: | meshListWidgetMenu(self, position) |
Return: | None |
Arguments: |
|
Optional Arguments: |
moduleBuildGuide [MnsBlockBuildUI class method]
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: |
newRigTopTrig [MnsBlockBuildUI class method]
Utils->'New RigTop' trigger.
deselect, then initialize a MnsRig class.
Constructor: | newRigTopTrig(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
orientGuides [MnsBlockBuildUI class method]
orient guides trigger
mode 0 = All
mode 1 = Branch
mode 2 = Module
mode 3 = Selection
Constructor: | orientGuides(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
plgMatch [MnsBlockBuildUI class method]
Constructor: | plgMatch(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
poseSaveLoadTrigger [MnsBlockBuildUI class method]
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: |
promoteModule [MnsBlockBuildUI class method]
Constructor: | promoteModule(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
pureDuplicate [MnsBlockBuildUI class method]
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: |
refreshSelectionState [MnsBlockBuildUI class method]
Constructor: | refreshSelectionState(self, dummy = None) |
Return: | None |
Arguments: |
|
Optional Arguments: |
removeCustomShapes [MnsBlockBuildUI class method]
Remove all custom control shapes from the current rig.
Constructor: | removeCustomShapes(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
removeMeshes [MnsBlockBuildUI class method]
Constructor: | removeMeshes(self, listWidget) |
Return: | None |
Arguments: |
|
Optional Arguments: |
removeModelPath [MnsBlockBuildUI class method]
Remove a module path line from the 'module paths' tree trigger.
Constructor: | removeModelPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
removeModulePresetPath [MnsBlockBuildUI class method]
Remove a module path line from the 'module paths' tree trigger.
Constructor: | removeModulePresetPath(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
resizeEvent [MnsBlockBuildUI class method]
Constructor: | resizeEvent(self, QResizeEvent) |
Return: | None |
Arguments: |
|
Optional Arguments: |
resizeWindowBasedOnLog [MnsBlockBuildUI class method]
Constructor: | resizeWindowBasedOnLog(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
sceneSelectFromWidgets [MnsBlockBuildUI class method]
Constructor: | sceneSelectFromWidgets(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
setCollapsibleWidgetPairing [MnsBlockBuildUI class method]
Constructor: | setCollapsibleWidgetPairing(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
sortMeshLists [MnsBlockBuildUI class method]
Constructor: | sortMeshLists(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
symmetrizeControlShapes [MnsBlockBuildUI class method]
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: |
symmetrizeModule [MnsBlockBuildUI class method]
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: |
toggleProjPerpCam [MnsBlockBuildUI class method]
Constructor: | toggleProjPerpCam(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
updateMeshWidgetsDict [MnsBlockBuildUI class method]
Constructor: | updateMeshWidgetsDict(self) |
Return: | None |
Arguments: |
|
Optional Arguments: |
updateSettings [MnsBlockBuildUI class method]
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: |