bhnh
05-19-2008, 03:57 PM
I've written a MacroScript and I'm getting some strange behavior on installing it.
1. When the MacroScript is run (to install it) the first time, I assumed it'd wind up in C:\Program Files\AutoDesk\3ds Max #\ui\macroscripts. Instead it goes to C:\Documents and Settings\Administrator\Local Settings\Application Data\Autodesk\3dsmax\9 - 32bit\enu\UI\usermacros. Is this the norm?
2. The macro is named Macro_Blahblah, but when it's loaded the name is changed to Object_Blahblah.
3. When the macro is first installed it runs just fine. When Max is closed and reopened, an error window pops up indicating that a couple of lines of code are missing. If the external macro file is run again, that fixes the problem for all successive closings-reopenings. It's always the same missing lines, which makes me wonder if that isn't what's the problem. It's an action for custom attribute button and reads as follows:
on btn_engage pressed do
(
this.targetedObject.rotation.z_rotation += 1
this.targetedObject.rotation.z_rotation -= 1
)
When code gets deleted it reads as follows:
on btn_engage pressed do
(
this.targetedObject.rotation.z_rotation +
In other words, when the button's pressed, a targetted object rotates one degree then rotates one degree back. Is this an illegal operation? Many thanks in advance.
1. When the MacroScript is run (to install it) the first time, I assumed it'd wind up in C:\Program Files\AutoDesk\3ds Max #\ui\macroscripts. Instead it goes to C:\Documents and Settings\Administrator\Local Settings\Application Data\Autodesk\3dsmax\9 - 32bit\enu\UI\usermacros. Is this the norm?
2. The macro is named Macro_Blahblah, but when it's loaded the name is changed to Object_Blahblah.
3. When the macro is first installed it runs just fine. When Max is closed and reopened, an error window pops up indicating that a couple of lines of code are missing. If the external macro file is run again, that fixes the problem for all successive closings-reopenings. It's always the same missing lines, which makes me wonder if that isn't what's the problem. It's an action for custom attribute button and reads as follows:
on btn_engage pressed do
(
this.targetedObject.rotation.z_rotation += 1
this.targetedObject.rotation.z_rotation -= 1
)
When code gets deleted it reads as follows:
on btn_engage pressed do
(
this.targetedObject.rotation.z_rotation +
In other words, when the button's pressed, a targetted object rotates one degree then rotates one degree back. Is this an illegal operation? Many thanks in advance.
