Any kind of example to be able to save a couple of poses of a single object and have the possibility to load the poses, any maxscript code you can share on this topic?
copying a transform is simply a case of assigning a node's transform to a variable (t = node.transform) applying a stored transform is simply a matter of assigning a variable to a node's transform (node.transform = t)
if you work in a rollout, anything you store will persist as long as the rollout is open so you can happily store multiple transforms without fannying around with persistent stuff at scene level.
copying a transform is simply a case of assigning a node's transform to a variable (t = node.transform) applying a stored transform is simply a matter of assigning a variable to a node's transform (node.transform = t)
if you work in a rollout, anything you store will persist as long as the rollout is open so you can happily store multiple transforms without fannying around with persistent stuff at scene level.
the UI is the where it might get a bit tedious
I mean something like this type of script, the problem is that you have to add a parameter block and attribute holder to keep the information in the scene, which I don't know how to do it.
that's the fannying around I was talking about. It's definitely in the docs but it's been 10 years since I last did anything that needed it.
I imagine Monster will be along with an answer at some point. might be worth changing the thread title to indicate you need help storing persistent data
that's the fannying around I was talking about. It's definitely in the docs but it's been 10 years since I last did anything that needed it.
I imagine Monster will be along with an answer at some point. might be worth changing the thread title to indicate you need help storing persistent data
I know that monster is one of the few who are still active in answering users' questions. He also has an incredible knowledge of the whole program, I hope he can answer this question and help some "new" users.
We're dealing with some major weather issues down in Texas! But I managed to whip up this example with some pseudo code in the rollout section.
Things to note:
In General, as poopipe mentioned, you operate with the poses stored in the rollout. You only access a custom attribute when opening and closing (loading and saving) the rollout.
I don't use Attribute Holder because they can only be accessed when an object is selected.
Instead I save directly to the RootNode. Think of that as the object all unparented object are parented to.
For the CA value types, I use #stringTab, instead of #maxObjectTab because if an object is deleted it really freaks out that there is a reference to a deleted object in the Custom Attribute.
Also, #stringTab has maximum compatibility. #paramBlock2 was added in 2018 and I still have people using Max 2009 and such.
I guess you can use #matrix3Tab for the Transform Array, but i already typed it all out.
Replies
copying a transform is simply a case of assigning a node's transform to a variable (t = node.transform)
applying a stored transform is simply a matter of assigning a variable to a node's transform (node.transform = t)
if you work in a rollout, anything you store will persist as long as the rollout is open so you can happily store multiple transforms without fannying around with persistent stuff at scene level.
the UI is the where it might get a bit tedious
I mean something like this type of script, the problem is that you have to add a parameter block and attribute holder to keep the information in the scene, which I don't know how to do it.
https://forums.cgsociety.org/t/saving-character-poses-on-custom-rigs/880779/5
------copy pose
---- to paste
I imagine Monster will be along with an answer at some point. might be worth changing the thread title to indicate you need help storing persistent data
Things to note: