Maya tools: how does the tools settings window get its data?

Maya tools: how does the tools settings window get its data?

BurkhardRammner
Collaborator Collaborator
626 Views
2 Replies
Message 1 of 3

Maya tools: how does the tools settings window get its data?

BurkhardRammner
Collaborator
Collaborator

Hi,

I have written some manipulators and now wanted to adjust their attributes via the Maya tool settings window.
Problem is I cannot find the mechanism how Maya calls the procedures for getting the data.
For example, for the move manipulator the manipMoveValues proc is called. But who calls that proc?
Or maybe I have to choose a specific proc name (based on manipulator name), so Maya calls that automatically?

thanks for help!

 

edit: from the docs:

'// This procedure is the Values callback for the tool. It is invoked
// implicitely (Maya uses the context name to determine the name of the
// procedure to invoke, thus the name must be based off the context name).'

But this didn't work for me...

0 Likes
Accepted solutions (1)
627 Views
2 Replies
Replies (2)
Message 2 of 3

brentmc
Autodesk
Autodesk
Accepted solution

Hi,

Yes, the scripts use the tool name as supplied by MPxContext::stringClassName.
From the docs:

This name is used by Maya to call the appropriate tool property sheet MEL scripts, specifically:

nameProperties.mel
nameValues.mel


Note: your tool can also trigger the settings to update using MToolsInfo::setDirtyFlag 

Brent McPherson
Principle Engineer
Message 3 of 3

BurkhardRammner
Collaborator
Collaborator

Brent, thank you very much..didn't see that method!
(tried all sorts of names in the 'registerContextCommand' method, but nothing worked..now I know why ; )

 

edit: and great info: MToolsInfo class!

0 Likes