Skip to content

Issue #201 Porting ml_convertRotationOrder.py to mmSolver #233

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

Merged

Conversation

ktonegawa
Copy link
Contributor

Creating Pull Request to start progress of Issue #201

For now I just simply added the script files and just added them to the General Tools menu.

I would like to clarify

  1. Should the ml_utilities.py go into an actual utils directory and ml_convertRotationOrder.py into tools directory to keep the formatting consistent?
  2. Could you clarify what you mean by:

Alternatively, the "check rotation order" feature is really helpful, however sometimes a user may want to change the rotation order for many objects at once (something the UI does not allow).

From what I can see from this line here seems like the tool already does iterate through the list of selections to change the rotation order. Are you referring to setting different rotation orders for multiple objects? If so perhaps we could put together a new UI...?

  1. Do the copyright/licensing texts seem okay as is...?

…and ml_utilities.py files and adding it to the menu
@ktonegawa ktonegawa changed the title Issue #201 Issue #201 Porting ml_convertRotationOrder.py to mmSolver Jan 3, 2022
@david-cattermole david-cattermole added enhancement maya tool A user tool inside Maya. labels Jan 3, 2022
@david-cattermole david-cattermole added this to the v0.3.15 milestone Jan 3, 2022
@david-cattermole
Copy link
Owner

Hi @ktonegawa,

This looks really good!

Should the ml_utilities.py go into an actual utils directory and ml_convertRotationOrder.py into tools directory to keep the formatting consistent?

I think the location (./python/mmSolver/tools/mltools/) you've picked is perfect.
This keeps all the tools in the same location.
In the future if we add more we can place them in the same directory.
We do not need to put the ml_utilities.py into the ./python/mmSolver/utils.

Could you clarify what you mean by:

Alternatively, the "check rotation order" feature is really helpful, however sometimes a user may want to change the rotation order for many objects at once (something the UI does not allow).

It was in relation to a tool to check how "gimbal flipped" all the selected transform nodes are.

For example if you follow these steps you will get a warning "Please select a single object".

  1. Open "ml Convert Rotation Order" UI.
  2. Select 2 or more transform nodes.
  3. Press "Get tips for selection".
    A warning will be printed.

If only 1 transform node is selected then the UI updates and lists the gimbal flipping amount.
I will add another issue about such a tool. the ml tools do not have a tool to list this information without the UI.

Example UI and selection:
image

# Warning: Please select a single object.:
image

@david-cattermole
Copy link
Owner

@ktonegawa the only issue I can see in your PR, can you add the new tool UI into the config/menu.json and config/shelf_minimal.json files as well?

https://github.com/david-cattermole/mayaMatchMoveSolver/blob/master/config/menu.json
https://github.com/david-cattermole/mayaMatchMoveSolver/blob/master/config/shelf_minimal.json

Otherwise I'm happy to merge this PR and include in the v0.3.15 release.

@david-cattermole
Copy link
Owner

@ktonegawa I have written up the "check rotation order" tool description in more detail here:
#234

@ktonegawa
Copy link
Contributor Author

Hi @david-cattermole I added this tool under those json files you mentioned and I also slapped something together and put up Pull Request #235 to get something going...

@david-cattermole
Copy link
Owner

This looks good to me. I will merge this PR in the next 8 hours.

There are a few things I'll need to check and possibly add:

  • another license file for the ML tools MIT license - this will also be installed.
  • double check adding your name into the headers of files and the new 2022 copyright year.
    When it's merged I'll close the PR and update the issue.

This should be released in v0.3.15.

Copy link
Owner

@david-cattermole david-cattermole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks @ktonegawa!

@david-cattermole david-cattermole merged commit 6b882b0 into david-cattermole:develop_v0.3.x Jan 5, 2022
@ktonegawa
Copy link
Contributor Author

glad to hear that, thank you @david-cattermole !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement maya tool A user tool inside Maya.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants