API documentation ?
Hi,
Where do you go to find documentation or any kind of API for pymxs ?
if this is all we have , how were you able to write these examples ?
For example, I just want to rotate an arrow. I set the pivot point,
I use arrow.rotation = rt.angleAxis(90, rt.point3(1, 0, 0)), the arrow will not rotate around the pivot but around (0,0,0) instead.
I do EXACTLY the same operation manually in 3ds max: rotate $ (angleaxis 90 [1,0,0]) and it rotates around the pivot point.
also pymxs will almost never throw an error if the syntax is wrong, and I have no way of listing the methods on my arrow object (only a setter and getter are shown). I understand this pymxs library is just a wrapper but come on, people spent time making it and skipped on the docs completely ?
Now this is one case I have an issue with but I can't just ask around every time I want to move a cube, how do you solve these issues ?
I have asked this on many occasions. It still is largely unsupported in documentation. Some things dont even seem to have been ported over still. I switched to Houdini.
On Fri, 12 Nov 2021, 12:32 Mathieu Moalic, @.***> wrote:
Hi, Where do you go to find documentation or any kind of API for pymxs ? if this is all we have http://help.autodesk.com/view/MAXDEV/2021/ENU/?guid=Max_Python_API_using_pymxs_pymxs_objects_html, how were you able to write these examples ? For example, I just want to rotate an arrow. I set the pivot point, I use arrow.rotation = rt.angleAxis(90, rt.point3(1, 0, 0)), the arrow will not rotate around the pivot but around (0,0,0) instead. I do EXACTLY the same operation manually in 3ds max: rotate $ (angleaxis 90 [1,0,0]) and it rotates around the pivot point.
also pymxs will almost never throw an error if the syntax is wrong, and I have no way of listing the methods on my arrow object (only a setter and getter are shown). I understand this pymxs library is just a wrapper but come on, people spent time making it and skipped on the docs completely ?
Now this is one case I have an issue with but I can't just ask around every time I want to move a cube, how do you solve these issues ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ADN-DevTech/3dsMax-Python-HowTos/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFEXYJLWENQ3ODLT3SGDD2TULUCNZANCNFSM5H4XXLXQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi @MathieuMoalic , pymxs is a wrapper for MAXScript, so the MAXScript Guide is the place to go for API descriptions of Max objects.
The pymxs guide describes how to translate the MAXScript API to python. They are very different languages, so the conversion is not always straight-forward.
For your specific question, the Area 3ds Max Programming forum is a good place to ask questions like these.
Yes. Sadly the api documentation is for MAXScript and this is very unnatural to python coders. So.. pretty much exactly what @drewavisautodesk said!
Also thanks @MathieuMoalic for your comments. It does help to improve things to have confirmation that things are hard / difficult. I'm involved in the whole Python + pymxs thing in 3dsMax so I find my way relatively easily in this but it took me some time. When you say that you use this stuff, and that you have problems using it, you help that's all I can say.
Would this work: rt.rotate(rt.objects[0], rt.angleAxis(90, rt.point3(1, 0, 0))) ?
For using $ from python it is more difficult but in your case this should also work:
rt.rotate(rt.safeExecute("$"), rt.angleAxis(10, rt.point3(1, 0, 0)))
(if you don't have safeExecute (you are on an older version of 3dsMax), you can do it with rt.execute but rt.execute will not work in scene code, it is considered unsafe)