Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a metadata for rotateOrder to store a default value in a controller. #328

Closed
joji2468ng opened this issue Nov 13, 2023 · 5 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@joji2468ng
Copy link
Member

joji2468ng commented Nov 13, 2023

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

@joji2468ng joji2468ng added the bug Something isn't working label Nov 13, 2023
@joji2468ng joji2468ng self-assigned this Nov 13, 2023
@miquelcampos
Copy link
Member

miquelcampos commented Nov 13, 2023

@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
image

@joji2468ng
Copy link
Member Author

joji2468ng commented Nov 13, 2023

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

@miquelcampos
Copy link
Member

@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

@joji2468ng
Copy link
Member Author

joji2468ng commented Nov 14, 2023

@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 joji2468ng changed the title Set rotateOrder attribute as non-keyable in all modules. Make a metadata for rotateOrder to store a default value in a controller. Nov 14, 2023
@joji2468ng joji2468ng changed the title Make a metadata for rotateOrder to store a default value in a controller. Make a cutom attr for rotateOrder to store a default value in a controller. Nov 14, 2023
@joji2468ng joji2468ng changed the title Make a cutom attr for rotateOrder to store a default value in a controller. Make a custom attribute for rotateOrder to store a default value in a controller. Nov 14, 2023
@miquelcampos
Copy link
Member

@joji2468ng Oh! sorry I missed that part 😝
Great that we are thinking the same hahaha!

@joji2468ng joji2468ng changed the title Make a custom attribute for rotateOrder to store a default value in a controller. Make a metadata for rotateOrder to store a default value in a controller. Nov 15, 2023
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 4.2
Development

No branches or pull requests

2 participants