This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # suppressInputAsOutput.py | |
| import maya.OpenMaya as OpenMaya | |
| callback_id = None | |
| suppress_enabled = True | |
| def output_filter(msg, msg_type, filter_output, client_data): | |
| global suppress_enabled | |
| # kHistory = 1 (command echo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Maya tool for packing UV shells around existing shells. | |
| # Pack (layout) UV of multiple objects together without overlapping on existing unselected uv shells | |
| # Maya 2023 and above only | |
| # License: MIT | |
| import maya.cmds as cmds | |
| import maya.api.OpenMaya as om2 | |
| import maya.mel as mel | |
| from collections import defaultdict |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Maya's pivot orientation can be manually adjusted in Edit Pivot mode, but aligning it to match an arbitrary | |
| selection of components is tedious and imprecise when: | |
| - The target plane has no obvious orientation to reference | |
| - Selected components are scattered with no clear alignment | |
| - Finding the correct axis would require manual trial and error | |
| - Manual aligning with component doesn't give the best result (you can only ever | |
| select one component as far as I understand) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Maya's scale tool can flatten geometry by scaling to 0 on an axis, and while | |
| the axis can be manually defined, this becomes impractical when: | |
| - The target plane has no obvious orientation to reference | |
| - Selected components are scattered with no clear alignment | |
| - Finding the correct axis would require tedious manual calculation | |
| This script calculates the best-fit plane for any selection using SVD and | |
| projects vertices onto it, regardless of orientation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Build colliders in DCC application like maya and blender | |
| Export and import it as fbx, | |
| Run the tool to convert | |
| ************ | |
| Only supports cuboids shape, | |
| so build your colliders with cubes. | |
| *********** | |
| Full support of transform, rotation and scale in object space | |
| Does not support shear |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import maya.cmds as cmds | |
| import maya.mel as mm | |
| def show_completion_dialog(): | |
| if cmds.window("cleanupMessage", exists=True): | |
| cmds.deleteUI("cleanupMessage") | |
| # Create window | |
| window = cmds.window("cleanupMessage", title="Script Complete", widthHeight=(300, 100)) | |
| main_layout = cmds.columnLayout(adjustableColumn=True, columnAlign="center") |