|
|||||
|
|
#1 |
|
Registered User
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
3DS maxscript - Variable assigned to object
Hi all, quick question, I am assigning a variable to an object, so when I press a button it creates the object, I also have other buttons to hide this object and freeze it, the problem is when i exit the scene and load it again, the variable is not assigned to that object anymore so the freeze and hide button are not working anymore.
ex: --create button c= box () --hide button c.ishidden = true something like that its not exactly it but you get the idea... So my question is how do I tell max to store that variable in the scene...is there such a thing? Thank you all |
|
|
|
|
|
#2 |
|
Registered Abuser
Join Date: Apr 2010
Location: Staffordshire, UK
Posts: 586
Thanks: 15
Thanked 17 Times in 17 Posts
|
You could possibly create a script that runs when Max opens, to rename that variable. I think you would have to place the script in your startup folder, and it should run the script when you open Max... I think. Scripting isn't my strong point.
__________________
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Dec 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
yeah I thought about that but my script opens up a window so it would be kind of annoying, moreover I dont think it would work because once you quit the scene, the objects loose its variable so its not associated with it anymore so even when running the script it wouldnt find it.
But someone answered on cgtalk with exactly the answer I was looking for persistend global variable http://www.kxcad.net/autodesk/Autode..._Variables.htm thanks |
|
|
|
![]() |
| Tags |
| 3ds max, maxscript, object, scripting, variable |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|