Discussion:
[Maya-Python] custom aim constraint node not working properly.
aaronT
2018-08-08 09:41:27 UTC
Permalink
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
--
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 python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4403b087-9337-44b9-bc9b-ad2b776f2773%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
aaronT
2018-08-09 09:36:12 UTC
Permalink
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
Post by aaronT
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
--
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 python_inside_maya+***@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/06656520-e7a3-4661-befc-5821c5cb32f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...