EasyQC#
- EasyQC.as_Check4AnimKeys(self)#
Purpose:
:: Checks for animation keys on selected transforms in a 3D scene and lists the transforms that have keyframes. Useful in animation workflows to quickly identify which objects are animated within a scene.
- Returns:
None # The function does not return a value but updates a text scroll list with the names of animated transforms.
Code Examples:
>>> as_Check4AnimKeys() # Checks for animation keys on selected transforms and lists those with keyframes in a text scroll list.
- Flow Chart Description:
This flowchart illustrates the as_Check4AnimKeys function:
The function begins by initializing and retrieving the current selection of transforms in the scene.
It checks if the hierarchy option is selected, and if so, expands the selection to include all child transforms.
The function then checks each transform in the selection for animation keys.
If animation keys are found, the transform’s name is added to a text scroll list.
The function concludes after updating the list with all transforms that have keyframes.
- EasyQC.as_CreateUI(self, docked=True)#
Purpose:
:: Creates and displays a user interface (UI) for the ‘as_EasyQC’ tool, with options to dock it within a main window or show it as a standalone window. Ideal for tools and applications in 3D animation and modeling software that require a custom UI for user interaction.
- Parameters:
docked – <bool>, optional (default=True) # Determines whether the UI should be docked within the main window or shown independently.
- Returns:
None # The function does not return a value but creates and displays the UI.
Code Examples:
>>> as_CreateUI(docked=True) # Creates and docks the 'as_EasyQC' UI within the main window.
UI ExistsNo UIDockedNot DockedStartInitialize Function/ Check Existing UIDelete Existing UICreate New UI/ Check Docking OptionDock UIEndShow UI- Flow Chart Description:
This flowchart illustrates the as_CreateUI function:
The function starts by initializing and checking if an existing UI is present.
If an existing UI is found, it is deleted before creating a new UI.
A new UI is created for the ‘as_EasyQC’ tool.
The function then checks if the UI should be docked or shown independently.
Based on the ‘docked’ parameter, it either docks the UI within the main window or shows it as a standalone window.
The function concludes after setting up and displaying the UI as per the specified option.
- EasyQC.as_DeleteUI(self)#
- EasyQC.as_DoEasyQC(self)#
Purpose:
:: Executes a series of quality control (QC) actions on a 3D scene based on user-selected options. This function is central to the ‘as_EasyQC’ tool, automating tasks like namespace removal, scene optimization, animation key checks, light set corrections, and more.
- Returns:
None # The function does not return a value but performs multiple QC actions on the scene and generates a report.
Code Examples:
>>> as_DoEasyQC() # Executes the selected quality control actions on the current 3D scene.
RemoveSkipOptimizeSkipCheckSkipCorrectSkipRemoveSkipUnlockSkipStartInitialize Function/ Check Remove NamespacesRemove Namespaces/ Check Optimize SceneOptimize Scene/ Check Animation KeysCheck for Anim Keys/ Check Light SetCorrect Light Set/ Check Remove Light LinksRemove Duplicate Light Links/ Check Lock and Hide NodesUnlock NodesGenerate ReportEnd- Flow Chart Description:
This flowchart illustrates the as_DoEasyQC function:
The function starts by initializing and checking user-selected options for various QC tasks.
It performs tasks such as removing namespaces, optimizing the scene, checking for animation keys, correcting light sets, removing duplicate light links, and unlocking nodes based on the selected options.
After executing the selected QC actions, the function generates a report of the tasks performed.
The function concludes after completing all selected QC tasks and generating the report.
- EasyQC.as_EasyQC(self)#
Purpose:
:: Creates a user interface for the ‘as_EasyQC’ tool, which performs a variety of quality control checks in 3D modeling and animation workflows. The UI includes options for optimizing the scene, removing namespaces, handling light links, and scanning for animation keys.
- Returns:
None # The function does not return a value but creates and displays the UI for ‘as_EasyQC’.
Code Examples:
>>> as_EasyQC() # Launches the 'as_EasyQC' tool with its custom user interface.
Description:
This script will- > Optimize with All Safe Options. > Remove ALL Namespaces from the scene. > Delete Duplicate Light Links. > Create Default Light Set if missing. > Unlock All Nodes. > Scan all transforms for keys and list them.
Window ExistsNo WindowStart/ Check Existing WindowDelete Existing WindowCreate UISetup UI ElementsDisplay WindowEnd- Flow Chart Description:
This flowchart illustrates the as_EasyQC function:
The function begins by checking if an existing window for ‘as_EasyQC’ is present.
If an existing window is found, it is deleted.
A new UI window is then created for the ‘as_EasyQC’ tool.
The UI is set up with various elements like buttons, checkboxes, and text fields to facilitate quality control checks.
The function concludes after setting up the UI elements and displaying the ‘as_EasyQC’ window.
- EasyQC.as_NameSpace(self)#
Purpose:
:: Removes all namespaces from a 3D scene, except for default namespaces like “UI” and “shared”. Useful in 3D modeling and animation workflows for cleaning up scene hierarchy and resolving namespace conflicts.
- Returns:
None # The function does not return a value but removes unwanted namespaces from the scene.
Code Examples:
>>> as_NameSpace() # Removes all namespaces from the scene, except for "UI" and "shared".
Is Default NSNot Default NSStartRetrieve NamespacesIterate Over Namespaces/ Check Default NamespacesSkip NamespaceRemove NamespaceEnd- Flow Chart Description:
This flowchart illustrates the as_NameSpace function:
The function starts by retrieving all existing namespaces in the scene.
It iterates over each namespace to check whether it is a default namespace like “UI” or “shared”.
If it is a default namespace, the function skips it and moves to the next one.
If it is not a default namespace, the function removes it from the scene.
The function concludes after processing all namespaces, removing the non-default ones.
- EasyQC.as_RemoveDupLightLinks(self)#
Purpose:
:: Removes duplicate light links from the ‘initialShadingGroup’ in a 3D scene. Essential for optimizing scene performance and preventing rendering issues caused by redundant light connections.
- Returns:
None # The function does not return a value but prints a confirmation message after removing duplicate light links.
Code Examples:
>>> as_RemoveDupLightLinks() # Removes duplicate light links from the 'initialShadingGroup' and prints a confirmation message.
Is DuplicateNot DuplicateStartRetrieve Light ConnectionsIterate Over Connections/ Check Each ConnectionDisconnectPrint ConfirmationEnd- Flow Chart Description:
This flowchart illustrates the as_RemoveDupLightLinks function:
The function starts by retrieving all light connections to the ‘initialShadingGroup’.
It iterates over each connection to determine if it’s a duplicate.
If a connection is identified as a duplicate, the function disconnects it.
After processing all connections, the function prints a confirmation message indicating the completion of duplicate light link removal.
The function concludes after disconnecting duplicates and printing the confirmation.
- EasyQC.as_RemoveLockNode(self)#
Purpose:
:: Unlocks all nodes in the current selection within a 3D scene. This function is commonly used in scenarios where locked nodes need to be edited or deleted, allowing for modifications that were previously prevented.
- Returns:
None # The function does not return a value but prints a confirmation message after unlocking all selected nodes.
Code Examples:
>>> as_RemoveLockNode() # Unlocks all currently selected nodes and prints a confirmation message.
StartRetrieve Current SelectionIterate Over NodesUnlock NodePrint ConfirmationEnd- Flow Chart Description:
This flowchart illustrates the as_RemoveLockNode function:
The function begins by retrieving the currently selected nodes in the scene.
It iterates over each selected node, unlocking them to allow modifications.
After unlocking all nodes, the function prints a confirmation message indicating that all nodes have been unlocked.
The function concludes after unlocking all selected nodes and printing the confirmation.
- EasyQC.as_RemoveNS(self)#
Purpose:
:: Removes all namespaces from a 3D scene by repeatedly calling the as_NameSpace function. This function is crucial in 3D modeling and animation workflows for cleaning up scene hierarchies and resolving namespace conflicts.
- Returns:
None # The function does not return a value but prints a confirmation message if all namespaces are successfully removed.
Code Examples:
>>> as_RemoveNS() # Removes all namespaces from the scene and prints a confirmation message.
Namespaces RemainNo Namespaces RemainStartRetrieve NamespacesIterate Namespace RemovalTry to Remove Namespace/ Check CompletionPrint ConfirmationEnd- Flow Chart Description:
This flowchart illustrates the as_RemoveNS function:
The function begins by retrieving a list of all namespaces in the scene.
It enters a loop where it repeatedly attempts to remove namespaces using the as_NameSpace function.
After each iteration, it checks if any namespaces remain in the scene.
If namespaces still exist, the function continues the removal process; otherwise, it prints a confirmation message.
The function concludes after successfully removing all namespaces from the scene and printing the confirmation.
- EasyQC.as_SetOptionVar(self)#
Purpose:
:: Sets various option variables in a 3D software environment, configuring the behavior of different elements and features. This function is essential for customizing the software settings to align with specific workflow requirements in 3D modeling, animation, and rendering.
- Returns:
None # The function does not return a value but sets multiple option variables for different aspects of the software.
Code Examples:
>>> as_SetOptionVar() # Configures various option variables in the software to predefined values.
StartInitialize FunctionSet Nurbs OptionsSet Deformer OptionsSet Cache and Display OptionsSet Miscellaneous OptionsEnd- Flow Chart Description:
This flowchart illustrates the as_SetOptionVar function:
The function begins by initializing and setting option variables related to NURBS surfaces and curves.
It then configures options for deformers, skin influences, poses, clips, and expressions.
Next, the function sets options for caching, transforms, display and render layers, and other scene elements.
The function concludes after setting various miscellaneous options that affect different aspects of the software’s behavior.
- EasyQC.as_WriteToPDF(self)#
Purpose:
:: Generates a PDF report from captured output in the Maya script editor. Ideal for creating documentation, logs, or records of script execution, especially in 3D modeling and animation workflows.
- Returns:
None # The function does not return a value but creates a PDF report from the script editor output.
Code Examples:
>>> as_WriteToPDF() # Reads captured output from the script editor and generates a PDF report.
StartInitialize Report WindowRead Captured OutputGenerate PDF ReportEnd- Flow Chart Description:
This flowchart illustrates the as_WriteToPDF function:
The function starts by initializing a report window with the title ‘QC-Report !!’.
It reads the captured output from a specified file, typically containing script editor output.
The function then generates a PDF report from this output, useful for documentation or record-keeping.
The function concludes after generating the PDF report.
- EasyQC.capture(function)#
Purpose:
:: A decorator function that captures the output sent to the Maya script editor. This is useful for logging, debugging, or analyzing the output of functions within the Maya environment, particularly when developing scripts or plugins.
- Parameters:
function – <function> # The function whose script editor output is to be captured.
- Returns:
<function> # Returns a wrapped function that, when called, captures and returns its script editor output.
Code Examples:
>>> @capture >>> def example_function(): >>> print("This is a test.") >>> output = example_function() # The variable 'output' now contains the string "This is a test.", which was printed to the Maya script editor.
StartInitialize DecoratorCapture Script Editor OutputExecute Wrapped FunctionRetrieve OutputReturn OutputEnd- Flow Chart Description:
This flowchart illustrates the capture decorator function:
The decorator initializes and prepares to capture output from the script editor.
It wraps the specified function, capturing any output it generates in the script editor during execution.
The wrapped function is then executed, and its output to the script editor is captured.
After execution, the captured output is retrieved.
The function concludes by returning the captured output for further use or analysis.
- EasyQC.correctLightSet(self)#
Purpose:
:: Modifies attributes of the default light set in a 3D scene, specifically setting the ‘render only’ attribute to False. This function is crucial in 3D animation and rendering workflows to ensure the default light set is correctly configured for rendering.
- Returns:
None # The function does not return a value but prints a confirmation message after adjusting the default light set.
Code Examples:
>>> correctLightSet() # Adjusts the default light set attributes and prints a confirmation message.
StartAdjust Default Light SetPrint ConfirmationEnd- Flow Chart Description:
This flowchart illustrates the correctLightSet function:
The function starts and immediately adjusts the attributes of the default light set, specifically setting ‘render only’ to False.
After adjusting the light set, the function prints a confirmation message indicating the successful modification.
The function concludes after adjusting the default light set and printing the confirmation message.
- EasyQC.manageLightLinks(self)#
Purpose:
:: Manages light linker connections in a 3D scene, identifying and removing duplicate light links. This function is essential for optimizing scene performance and resolving issues caused by redundant light connections.
- Returns:
None # The function does not return a value but operates on light linker connections to remove duplicates.
Code Examples:
>>> aslinks() # Analyzes and removes duplicate light linker connections in the scene.
Duplicate FoundNo DuplicateStartRetrieve Light Linker ConnectionsSplit Connections into Even and OddIterate Over Connections/ Check for DuplicatesRemove Duplicate ConnectionEnd- Flow Chart Description:
This flowchart illustrates the manageLightLinks function:
The function starts by retrieving all connections from the light linker in the scene.
It then splits these connections into two lists, one containing even-indexed connections and the other odd-indexed.
The function iterates over these lists to identify duplicate connections.
When a duplicate is found, the function removes the duplicate light linker connection.
The function concludes after processing all connections and removing any duplicates found.