maya python How to make a cube fall on a plane with uplifts and PITS, make the bottom of the cube fit the inclined angle of the curved surface
the result i want
How to use PythonScript to make this in maya2022
Querying Component Axis Orientation in Maya
I’m trying to access the values that are given when the Axis Orientation of the move tool is set to Component.
For simplicity, I’m trying to align a locator to the position and orientation of a vertex, edge or face component that is selected. I can get the position using the xform command cmds.xform(q=True, ws=True, t=True) however there doesn’t seem to be any way to get the orientation. The various xform rotate queries just give back [0,0,0].
I’ve tried manipMoveContext and manipPivot but haven’t been able to get anything from either.
If I copy the values from the move tool axis orientation, when set to component mode, and use those as the rotation values of the locator then it works perfectly. But I can’t find how to access these values to use in a Python script.
Whats the best way to set relatives paths in Maya 2022
Im currently creating a tool to be used within Maya 2022 and to define where the tool needs to grab the icons from I’m currently using this code: