Friday, February 12, 2010

Hierarchy State

This is a new MaxScript from me (simple tool) which allow quickly to backup and restore scene objects hierarchy. I pack the functions (Load/Save) as scripted struct in external .ms file for the sake of convenience. This way you can integrate easy the struct in your own scripts. More details you'll see inside the code. Maybe not so great discovery touch, but I used "save" for the name for my saving function. Yep, the "save" is global preserved keyword, that means it will cause conflict if defined alone (as separate function), but inside the scripted struct it come as some kind of private, so there no problem. And finally this is very useful cheat trick, which allow more readable scripting. For example, in this script, my struct is named "HierarchyState" and I assign an instance of the struct to the short named variable "hs", and then I could just say: -- to save
hs.load() -- to load
The script is here. Any feedback is welcome. Enjoy!

No comments:

Post a Comment

Thanks for your comment