custom aim constraint node not working properly.

55 views
Skip to first unread message

aaronT

unread,
Aug 8, 2018, 5:41:28 AM8/8/18
to Python Programming for Autodesk Maya
Hi folk!

Made a custom aim constraint with maya python api(1.0). As I move the aiming object around in the scene for some reason it just keeps spinning in random angel instead of pointing at the aim target and the rotation attr values go up thousands. The final matrix and euler values are actually correct (I printed them out and assigned them to another object ). I guess the issue is probably about the way setting output value but I am not sure. Maya2018 is used. Thanks so much!

Aaron
aimNode.py
aim.ma

aaronT

unread,
Aug 9, 2018, 5:36:13 AM8/9/18
to Python Programming for Autodesk Maya
Found the problem myself. I used MFnNumericAttribute to create output rotation attrs instead of MFnUnitAttribute which constructs translate and rotation attrs on transform node and that made the rotation values go crazy...

Cheers
Reply all
Reply to author
Forward
0 new messages