Issues with manipulator callbacks

Issues with manipulator callbacks

jmreinhart
Advisor Advisor
590 Views
1 Reply
Message 1 of 2

Issues with manipulator callbacks

jmreinhart
Advisor
Advisor

So I made a custom transform node where you can give it a local "scale", so that instead of having the translation values correspond to world space distance, they are "normalized" and correspond to a user defined distance, which can be different in each axis. I'm doing this for a facial rig system.

 

I have the transform node working properly but the translate manipulator doesn't work exactly right. It always stays on the object properly, but when I move the manipulator 1 unit the object moves 1*local_scale units. What I want it to create a translate manipulator whose value gets divided by the local_scale and then applied to the plug. 

 

I've been reading through the documentation and the "around the corner" post about custom manipulators, and I was able to get a manipulator that moved the object the distance I wan using the manipToPlugCallback. But it doesn't follow the object, so each time I change manipulators it's back at the origin.

 

My first thought was to use the plugToManipCallback but that causes crashes because the two callbacks cycle. The footPrintManip example uses a  one-to-one mapping for the distance, and a plugToManipCallback for the starting point, but the FreePointTriadManip doesn't have two separate indices. 

 

I think I'm misunderstanding when to use the callbacks vs the one-to-one connections, and help with trying to solve this problem would be greatly appreciated. I've attached the code for the manipulator.

 

 

0 Likes
Accepted solutions (1)
591 Views
1 Reply
Reply (1)
Message 2 of 2

jmreinhart
Advisor
Advisor
Accepted solution

I was able to get this working. It turned out the data I was returning in the callback was invalid and that was causing a crash. 

 

The correct way is to just use a plugToManip and manipToPlug callback.

0 Likes