Closed joji2468ng closed 7 months ago
@joji2468ng Please don't do this one, until I confirm. I think rot order should be keyable. We should check why it is resetting to XYZ
and I think I know why.
We should be using change_default_value instead of setting it directly. That will change the default and the reset will work as expected
@miquelcampos I've already tried the command and I got the error below. The attribute rotateOrder
isn't a dynamic attribute. so it seems like we can't change the default value...
You'll get this error once the command runs.
# Error: RuntimeError: file C:\Program Files\Autodesk\Maya2022\Python37\lib\site-packages\pymel\internal\pmcmds.py line 217: 'rotateOrder' is not a dynamic attribute of node 'arm_L0_fk1_ctl'. #
if the rotate order should be keyable, storing its default value in the extra attribute of the control is necessary. This approach allows the value to be recalled during resetting.
@joji2468ng Oh! I see, in that case we will need to search for another solution. For example storing the default as metadata in the control and update the reset tool in mGear to use the metadata when is a rot order attr
@miquelcampos Yes, I was saying the same thing in my last paragraph. I found the solution that we can add a custom attribute name "RotateOrder" instead of metadata. The built-in attr name is "rotateOrder" so I will hide the built-in attr and then show a custom attr for rot order in the channel box to be able to change a default value.
@joji2468ng Oh! sorry I missed that part 😝 Great that we are thinking the same hahaha!
Storing the default as metadata in the control and updating the reset tool in mGear to use the metadata when there is a rot order attr.
Here is the reported issue in the forum. http://forum.mgear-framework.com/t/mgear-viewport-menu-resets-the-rotarte-order-always-to-xyz/3574