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.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> GetSelection[("fas:fa-mouse-pointer Get Selection")] GetSelection --> CheckHierarchyOption{"/fas:fa-sitemap Check Hierarchy Option"} CheckHierarchyOption --"Hierarchy Selected"--> ExpandSelection[("fas:fa-expand-arrows-alt Expand Selection")] ExpandSelection --> CheckForKeys[("fas:fa-key Check for Keys")] CheckHierarchyOption --"Single Selection"--> CheckForKeys CheckForKeys --> UpdateList[("fas:fa-list-ul Update List")] UpdateList --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style GetSelection fill:#99ff99,stroke:#000,stroke-width:2px style CheckHierarchyOption fill:#ffcc99,stroke:#000,stroke-width:2px style ExpandSelection fill:#cc99ff,stroke:#000,stroke-width:2px style CheckForKeys fill:#ffcc99,stroke:#000,stroke-width:2px style UpdateList fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_Check4AnimKeys function:

  1. The function begins by initializing and retrieving the current selection of transforms in the scene.

  2. It checks if the hierarchy option is selected, and if so, expands the selection to include all child transforms.

  3. The function then checks each transform in the selection for animation keys.

  4. If animation keys are found, the transform’s name is added to a text scroll list.

  5. 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.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckExistingUI{"/fas:fa-window-close Check Existing UI"} CheckExistingUI --"UI Exists"--> DeleteExistingUI[("fas:fa-trash-alt Delete Existing UI")] DeleteExistingUI --> CreateNewUI[("fas:fa-plus-square Create New UI")] CheckExistingUI --"No UI"--> CreateNewUI CreateNewUI --> CheckDockingOption{"/fas:fa-dock-alt Check Docking Option"} CheckDockingOption --"Docked"--> DockUI[("fas:fa-anchor Dock UI")] DockUI --> End[("fas:fa-stop End")] CheckDockingOption --"Not Docked"--> ShowUI[("fas:fa-desktop Show UI")] ShowUI --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckExistingUI fill:#ff9999,stroke:#000,stroke-width:2px style DeleteExistingUI fill:#ff6666,stroke:#000,stroke-width:2px style CreateNewUI fill:#99ff99,stroke:#000,stroke-width:2px style CheckDockingOption fill:#ffcc99,stroke:#000,stroke-width:2px style DockUI fill:#99ccff,stroke:#000,stroke-width:2px style ShowUI fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_CreateUI function:

  1. The function starts by initializing and checking if an existing UI is present.

  2. If an existing UI is found, it is deleted before creating a new UI.

  3. A new UI is created for the ‘as_EasyQC’ tool.

  4. The function then checks if the UI should be docked or shown independently.

  5. Based on the ‘docked’ parameter, it either docks the UI within the main window or shows it as a standalone window.

  6. 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.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> CheckRemoveNS{"/fas:fa-times-circle Check Remove Namespaces"} CheckRemoveNS --"Remove"--> RemoveNS[("fas:fa-trash-alt Remove Namespaces")] RemoveNS --> CheckOptimizeScene CheckRemoveNS --"Skip"--> CheckOptimizeScene{"/fas:fa-check-double Check Optimize Scene"} CheckOptimizeScene --"Optimize"--> OptimizeScene[("fas:fa-magic Optimize Scene")] OptimizeScene --> CheckAnimKeys CheckOptimizeScene --"Skip"--> CheckAnimKeys{"/fas:fa-key Check Animation Keys"} CheckAnimKeys --"Check"--> PerformAnimKeysCheck[("fas:fa-search-plus Check for Anim Keys")] PerformAnimKeysCheck --> CheckLightSet CheckAnimKeys --"Skip"--> CheckLightSet{"/fas:fa-lightbulb Check Light Set"} CheckLightSet --"Correct"--> CorrectLightSet[("fas:fa-wrench Correct Light Set")] CorrectLightSet --> CheckRemoveLinks CheckLightSet --"Skip"--> CheckRemoveLinks{"/fas:fa-unlink Check Remove Light Links"} CheckRemoveLinks --"Remove"--> RemoveLightLinks[("fas:fa-chain-broken Remove Duplicate Light Links")] RemoveLightLinks --> CheckLockHide CheckRemoveLinks --"Skip"--> CheckLockHide{"/fas:fa-lock Check Lock and Hide Nodes"} CheckLockHide --"Unlock"--> UnlockNodes[("fas:fa-unlock Unlock Nodes")] UnlockNodes --> GenerateReport[("fas:fa-file-alt Generate Report")] CheckLockHide --"Skip"--> GenerateReport GenerateReport --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CheckRemoveNS fill:#ff9999,stroke:#000,stroke-width:2px style RemoveNS fill:#ff6666,stroke:#000,stroke-width:2px style CheckOptimizeScene fill:#ffcc99,stroke:#000,stroke-width:2px style OptimizeScene fill:#99ff99,stroke:#000,stroke-width:2px style CheckAnimKeys fill:#cc99ff,stroke:#000,stroke-width:2px style PerformAnimKeysCheck fill:#ffcc99,stroke:#000,stroke-width:2px style CheckLightSet fill:#99ccff,stroke:#000,stroke-width:2px style CorrectLightSet fill:#ff9999,stroke:#000,stroke-width:2px style CheckRemoveLinks fill:#ffcc99,stroke:#000,stroke-width:2px style RemoveLightLinks fill:#ff6666,stroke:#000,stroke-width:2px style CheckLockHide fill:#99ff99,stroke:#000,stroke-width:2px style UnlockNodes fill:#cccccc,stroke:#000,stroke-width:2px style GenerateReport fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_DoEasyQC function:

  1. The function starts by initializing and checking user-selected options for various QC tasks.

  2. 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.

  3. After executing the selected QC actions, the function generates a report of the tasks performed.

  4. 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.
graph TD Start[("fa:fa-play Start")] --> CheckExistingWindow{"/fas:fa-window-close Check Existing Window"} CheckExistingWindow --"Window Exists"--> DeleteWindow[("fas:fa-trash-alt Delete Existing Window")] DeleteWindow --> CreateUI[("fas:fa-plus-square Create UI")] CheckExistingWindow --"No Window"--> CreateUI CreateUI --> SetupUIElements[("fas:fa-sliders-h Setup UI Elements")] SetupUIElements --> DisplayWindow[("fas:fa-desktop Display Window")] DisplayWindow --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style CheckExistingWindow fill:#ff9999,stroke:#000,stroke-width:2px style DeleteWindow fill:#ff6666,stroke:#000,stroke-width:2px style CreateUI fill:#99ff99,stroke:#000,stroke-width:2px style SetupUIElements fill:#cc99ff,stroke:#000,stroke-width:2px style DisplayWindow fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_EasyQC function:

  1. The function begins by checking if an existing window for ‘as_EasyQC’ is present.

  2. If an existing window is found, it is deleted.

  3. A new UI window is then created for the ‘as_EasyQC’ tool.

  4. The UI is set up with various elements like buttons, checkboxes, and text fields to facilitate quality control checks.

  5. 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".
graph TD Start[("fa:fa-play Start")] --> RetrieveNamespaces[("fas:fa-list-ol Retrieve Namespaces")] RetrieveNamespaces --> IterateNamespaces[("fas:fa-repeat Iterate Over Namespaces")] IterateNamespaces --> CheckDefaultNS{"/fas:fa-check-circle Check Default Namespaces"} CheckDefaultNS --"Is Default NS"--> SkipNS[("fas:fa-forward Skip Namespace")] CheckDefaultNS --"Not Default NS"--> RemoveNS[("fas:fa-trash-alt Remove Namespace")] SkipNS --> End[("fas:fa-stop End")] RemoveNS --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style RetrieveNamespaces fill:#ffcc00,stroke:#000,stroke-width:2px style IterateNamespaces fill:#99ff99,stroke:#000,stroke-width:2px style CheckDefaultNS fill:#ffcc99,stroke:#000,stroke-width:2px style SkipNS fill:#cccccc,stroke:#000,stroke-width:2px style RemoveNS fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_NameSpace function:

  1. The function starts by retrieving all existing namespaces in the scene.

  2. It iterates over each namespace to check whether it is a default namespace like “UI” or “shared”.

  3. If it is a default namespace, the function skips it and moves to the next one.

  4. If it is not a default namespace, the function removes it from the scene.

  5. The function concludes after processing all namespaces, removing the non-default ones.

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.
graph TD Start[("fa:fa-play Start")] --> RetrieveConnections[("fas:fa-plug Retrieve Light Connections")] RetrieveConnections --> IterateConnections[("fas:fa-repeat Iterate Over Connections")] IterateConnections --> CheckConnection{"/fas:fa-check-circle Check Each Connection"} CheckConnection --"Is Duplicate"--> Disconnect[("fas:fa-unlink Disconnect")] Disconnect --> PrintConfirmation[("fas:fa-comment-alt Print Confirmation")] CheckConnection --"Not Duplicate"--> End[("fas:fa-stop End")] PrintConfirmation --> End style Start fill:#00cc00,stroke:#000,stroke-width:3px style RetrieveConnections fill:#ffcc00,stroke:#000,stroke-width:2px style IterateConnections fill:#99ff99,stroke:#000,stroke-width:2px style CheckConnection fill:#ffcc99,stroke:#000,stroke-width:2px style Disconnect fill:#ff6666,stroke:#000,stroke-width:2px style PrintConfirmation fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_RemoveDupLightLinks function:

  1. The function starts by retrieving all light connections to the ‘initialShadingGroup’.

  2. It iterates over each connection to determine if it’s a duplicate.

  3. If a connection is identified as a duplicate, the function disconnects it.

  4. After processing all connections, the function prints a confirmation message indicating the completion of duplicate light link removal.

  5. 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.
graph TD Start[("fa:fa-play Start")] --> RetrieveSelection[("fas:fa-mouse-pointer Retrieve Current Selection")] RetrieveSelection --> IterateNodes[("fas:fa-repeat Iterate Over Nodes")] IterateNodes --> UnlockNode[("fas:fa-lock-open Unlock Node")] UnlockNode --> PrintConfirmation[("fas:fa-comment-alt Print Confirmation")] PrintConfirmation --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style RetrieveSelection fill:#ffcc00,stroke:#000,stroke-width:2px style IterateNodes fill:#99ff99,stroke:#000,stroke-width:2px style UnlockNode fill:#ff6666,stroke:#000,stroke-width:2px style PrintConfirmation fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_RemoveLockNode function:

  1. The function begins by retrieving the currently selected nodes in the scene.

  2. It iterates over each selected node, unlocking them to allow modifications.

  3. After unlocking all nodes, the function prints a confirmation message indicating that all nodes have been unlocked.

  4. 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.
graph TD Start[("fa:fa-play Start")] --> RetrieveNamespaces[("fas:fa-list-ol Retrieve Namespaces")] RetrieveNamespaces --> IterateRemoval[("fas:fa-repeat Iterate Namespace Removal")] IterateRemoval --> TryRemoveNS[("fas:fa-trash-alt Try to Remove Namespace")] TryRemoveNS --> CheckCompletion{"/fas:fa-flag-checkered Check Completion"} CheckCompletion --"Namespaces Remain"--> IterateRemoval CheckCompletion --"No Namespaces Remain"--> PrintConfirmation[("fas:fa-comment-alt Print Confirmation")] PrintConfirmation --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style RetrieveNamespaces fill:#ffcc00,stroke:#000,stroke-width:2px style IterateRemoval fill:#99ff99,stroke:#000,stroke-width:2px style TryRemoveNS fill:#ff6666,stroke:#000,stroke-width:2px style CheckCompletion fill:#ffcc99,stroke:#000,stroke-width:2px style PrintConfirmation fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_RemoveNS function:

  1. The function begins by retrieving a list of all namespaces in the scene.

  2. It enters a loop where it repeatedly attempts to remove namespaces using the as_NameSpace function.

  3. After each iteration, it checks if any namespaces remain in the scene.

  4. If namespaces still exist, the function continues the removal process; otherwise, it prints a confirmation message.

  5. 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.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Function")] Initialize --> SetNurbsOptions[("fas:fa-project-diagram Set Nurbs Options")] SetNurbsOptions --> SetDeformerOptions[("fas:fa-compress-arrows-alt Set Deformer Options")] SetDeformerOptions --> SetCacheDisplayOptions[("fas:fa-database Set Cache and Display Options")] SetCacheDisplayOptions --> SetMiscOptions[("fas:fa-sliders-h Set Miscellaneous Options")] SetMiscOptions --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style SetNurbsOptions fill:#99ff99,stroke:#000,stroke-width:2px style SetDeformerOptions fill:#cc99ff,stroke:#000,stroke-width:2px style SetCacheDisplayOptions fill:#ffcc99,stroke:#000,stroke-width:2px style SetMiscOptions fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_SetOptionVar function:

  1. The function begins by initializing and setting option variables related to NURBS surfaces and curves.

  2. It then configures options for deformers, skin influences, poses, clips, and expressions.

  3. Next, the function sets options for caching, transforms, display and render layers, and other scene elements.

  4. 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.
graph TD Start[("fa:fa-play Start")] --> InitializeReportWindow[("fas:fa-window-maximize Initialize Report Window")] InitializeReportWindow --> ReadOutput[("fas:fa-book-reader Read Captured Output")] ReadOutput --> GeneratePDF[("fas:fa-file-pdf Generate PDF Report")] GeneratePDF --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style InitializeReportWindow fill:#ffcc00,stroke:#000,stroke-width:2px style ReadOutput fill:#99ff99,stroke:#000,stroke-width:2px style GeneratePDF fill:#cc99ff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the as_WriteToPDF function:

  1. The function starts by initializing a report window with the title ‘QC-Report !!’.

  2. It reads the captured output from a specified file, typically containing script editor output.

  3. The function then generates a PDF report from this output, useful for documentation or record-keeping.

  4. 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.
graph TD Start[("fa:fa-play Start")] --> Initialize[("fas:fa-cogs Initialize Decorator")] Initialize --> CaptureOutput[("fas:fa-microphone-alt Capture Script Editor Output")] CaptureOutput --> ExecuteFunction[("fas:fa-play-circle Execute Wrapped Function")] ExecuteFunction --> RetrieveOutput[("fas:fa-book-open Retrieve Output")] RetrieveOutput --> ReturnOutput[("fas:fa-reply Return Output")] ReturnOutput --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style Initialize fill:#ffcc00,stroke:#000,stroke-width:2px style CaptureOutput fill:#99ff99,stroke:#000,stroke-width:2px style ExecuteFunction fill:#cc99ff,stroke:#000,stroke-width:2px style RetrieveOutput fill:#ffcc99,stroke:#000,stroke-width:2px style ReturnOutput fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the capture decorator function:

  1. The decorator initializes and prepares to capture output from the script editor.

  2. It wraps the specified function, capturing any output it generates in the script editor during execution.

  3. The wrapped function is then executed, and its output to the script editor is captured.

  4. After execution, the captured output is retrieved.

  5. 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.
graph TD Start[("fa:fa-play Start")] --> AdjustLightSet[("fas:fa-sun Adjust Default Light Set")] AdjustLightSet --> PrintConfirmation[("fas:fa-comment-alt Print Confirmation")] PrintConfirmation --> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style AdjustLightSet fill:#ffcc00,stroke:#000,stroke-width:2px style PrintConfirmation fill:#99ccff,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the correctLightSet function:

  1. The function starts and immediately adjusts the attributes of the default light set, specifically setting ‘render only’ to False.

  2. After adjusting the light set, the function prints a confirmation message indicating the successful modification.

  3. The function concludes after adjusting the default light set and printing the confirmation message.

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.
graph TD Start[("fa:fa-play Start")] --> RetrieveConnections[("fas:fa-plug Retrieve Light Linker Connections")] RetrieveConnections --> SplitConnections[("fas:fa-cut Split Connections into Even and Odd")] SplitConnections --> IterateConnections[("fas:fa-repeat Iterate Over Connections")] IterateConnections --> CheckDuplicates{"/fas:fa-search-plus Check for Duplicates"} CheckDuplicates --"Duplicate Found"--> RemoveDuplicate[("fas:fa-unlink Remove Duplicate Connection")] RemoveDuplicate --> IterateConnections CheckDuplicates --"No Duplicate"--> End[("fas:fa-stop End")] style Start fill:#00cc00,stroke:#000,stroke-width:3px style RetrieveConnections fill:#ffcc00,stroke:#000,stroke-width:2px style SplitConnections fill:#99ff99,stroke:#000,stroke-width:2px style IterateConnections fill:#cc99ff,stroke:#000,stroke-width:2px style CheckDuplicates fill:#ffcc99,stroke:#000,stroke-width:2px style RemoveDuplicate fill:#ff6666,stroke:#000,stroke-width:2px style End fill:#ff6666,stroke:#000,stroke-width:3px
Flow Chart Description:

This flowchart illustrates the manageLightLinks function:

  1. The function starts by retrieving all connections from the light linker in the scene.

  2. It then splits these connections into two lists, one containing even-indexed connections and the other odd-indexed.

  3. The function iterates over these lists to identify duplicate connections.

  4. When a duplicate is found, the function removes the duplicate light linker connection.

  5. The function concludes after processing all connections and removing any duplicates found.