PDA

View Full Version : MFnStateManip change state via MEL?


Buexe
03-05-2008, 08:03 PM
Yo, is there a way to cycle through the states of a state Manipulator via a MEL command? Also is there an easy way I can have my manipulator attached to several objects at once? So 1 Manipulator alters attributes on several nodes (of course same id )
Thanks
buexe

Robert Bateman
03-06-2008, 10:38 AM
manipulators are either:

a) attached to the current context
b) attached to the showManips tool for a single node.

I assume that with a) you can do what you want. I assume the only way to change manipulator states in that case is via the use of the edit flag on a context command. i.e. your context command creates the single tool "blah", then you add additionaal edit commands to change the current tools status, and therefore how the manips get displayed. This is of course all theoretical since i've never actually tried to do anything like that.... ;)

Buexe
03-06-2008, 12:24 PM
Hi Rob, the idea surely is good. And if I actually would understand pointers and stuff I`d probably be able to get hold of the statemanip from within my context. But the main problem I`m facing is, even if I could get the DagPath and/or MObject, how could I actually cycle through the states, since the MFnStateManip doesn`t seem to offer this kind of function? And the odd thing is that these state manips are actually DAG nodes, I can`t get a hold of them by spitting out their path name or something like that. So they seem to be special in some sort of way... However it`s not a big deal, but since I have a few states to cycle through in my context manipulator I was wondering if there was some way to do this with a hotkey.
Thanks though for giving input
Cheers
buexe
BTW: Rob, I tried to compile the locator examples from your website the other day and got tons of errors like this:
1>c:\programme\autodesk\maya2008\include\maya\mintarray.h(127) :

error C2653: 'std' : is not a class or namespace name
any idea hwat`s wrong?

Robert Bateman
03-06-2008, 01:41 PM
any idea hwat`s wrong?


for maya 8.5 and later you need to add the define REQUIRE_IOSTREAM to the pre-processor settings to get them to compile.

Buexe
03-06-2008, 04:45 PM
Cool, got it, thanks!

CGTalk Moderation
03-06-2008, 04:45 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.