This is awesome, and you got it right, now I am working on a callback function but I am stuck in a part.
well the eventCallback i am using "selectionChanged", is there any event where I can sue which call callback when I change the position or rotation? similar to the compute function if plug == "something" changes and thus process is done. Is there anything like that in callback that I can use for realtime? Thank you. D. On Wednesday, September 3, 2014 5:34:08 PM UTC+2, Marcus Ottosson wrote: > > Thanks for that. > > If I understand you correctly, you’re looking to change the pivot of > controls that have already been connected to a skeleton. If so, then it > might be the case of having painting oneself into a corner. If we take a > step back and look at what is actually in control of the pivot, the > controllers themselves, there might be an easier way. > > I’m attaching a scene with four objects; a skeleton, two controllers and a > driving locator. > > The locator is ultimately controlling the skeleton and it is parented > under a controller. The other controller has a slightly different pivot. > > Try this: > > 1. Move the “clavicle_CTL” around, see that it moves the skeleton, and > note its pivot and orientation > 2. Reparent the “driver_LOC” onto “new_CTL”. The new controller has a > different pivot and orientation, but the skeleton doesn’t move. > 3. Move the “new_CTL”, see that the skeleton does move and respect the > new pivot and orientation > 4. Remove “clavicle_CTL”, rename “new_CTL” to “clavicle_CTL” and > you’re done. > > When you publish the rig once more, the control will appear to have > changed its pivot from one place to another, along with having gotten a new > orientation, without having moved the skeleton. Animation will be preserved > too, unless the change was so great it invalidated previous animation. > > If this isn’t what you were after, then could you perhaps try and provide > a step-by-step of what you expect to have happen once you’ve found a > solution? E.g. > > 1. Setup a callback between the adapt source and skeleton target > 2. Moving the adapt source doesn’t move the skeleton > 3. ? > 4. Profit! > > Best, > Marcus > > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a785b736-3209-4be6-8033-179f64d1ea79%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
