Refresh object parameter (more info...)
hi all man and thanks for and thanks for the visit :)
I have completed another script and I'm completing the final steps (debug and more options). Now it is a problem. The script provides for the creation of a obj plane "general" called mr_plane and a map environmet. With its creation of plane (and map env), I active every spinner etc .. because I want it to be created first. Now If I close the rollot and re-open it, the spinner ecc are desabled. I know many ways to refresh parameters ecc, but are now bogged down..
My question is:
How to recognize the presence of the plane (and evironment) and activate all parameters? The problem is if the plane is renamed AFTER its creation and if there exists a map environment different or equal...
Any suggestion is welcome! Thanks!!
P.S: I attach the script to be consulted :)
Attachment | Size |
---|---|
env_light_hdr.ms | 10.61 KB |
Comments
Hi Branko :) Bad news, the
Hi Branko :)
Bad news, the your script (thanks again :)) dont work!! The parameters dont refresh... I try the function "defPlaneCA node" on new script very simple:
The function here work well, but in your example, no.
I noticed that at the function (the first time in new script) gave me error "IsKindOf" where he found three but was looking for two!! Very strange because value is tes and class rolloutclass then right. I do not think that is the position of the function in the script is wrong... In your opinion, where is the error?
...
Which parameters not refresh?
I did'nt make the code where you can change material properties in material editor and refresh parameters in rollout. Same things for plane render scale in command panel not refresh same spiner value in your rollout.
For that you can use Timer control bat this is another story.
Your example works because U declared your "Cubo" as global var. Your method not work if you save scene and close/open max and load the same scene and then run script again.
I "getMRPlaneData" function variable "mrp" represents your cube object which holds CA. So u can use
One more thing. You use max2010. This version probably not supports many things which are available in max2014, related to mxs
bga
Heheheeh the spinner,
Heheheeh the spinner, checkboxes ecc are disabled (as in the original) whe re-open the script. As you suggested, I opened the script, created the plane and changed some values in rollout. Closed and reopen the script. The rollout is "closed".
That's why I created a new script, to try to see if the fn that you wrote worked (I have not create any change in Material Editor etc.)
In my work, I have had a chance to test your test script in max2015 64bit, and does not work. Reading in the help, there are differences with the 2010 version (at least not dictated from Autodesk) about CA, but this can not be safely...
Honestly, this opportunity to refresh with CA fascinates me a lot, since it can be convenient in many cases. I discovered something new very useful.
Thanks for the suggestion referred to the "Cubo", I have not thought that if I save scene and close/open max and load the same scene its dont work.
Thanks again Branko and sorry for the trouble :(
P.S: your script for the grid, the first time I installed it worked very well!!!
...
You are right. It's very wierd. Function inside CA is ok but not works. I don't know why.
Anyway...I manage this to works. I left CA only for mr_plane recognition and for label :)
bga
Hahahah the function does not
Hahahah the function does not work in CA is really strange!!!
Thanks Branko, now work well :)Parameters and rollout refresh and and I'm happy!!!
Now try with the environment map, and I try to implement your recommendations and suggestions. I learned a lot, thanks! I leave this thread open for future updates ;)
I'm sorry again for the inconvenience and thank you very much!
...
U can use custAttribute which contains all rollout parameters of the plane and env map. When u close rollout this CA will be added on the plane.When you load the script again in the "open" event you need to add fn that will check if plane CA exists and load all parameters back
bga
Hi barigazy and thanks for
Hi barigazy and thanks for you reply (sorry for delay). I have not thought of this way for re-check the parameters. Now I try and see if I can use CA, otherwise I must use another method :(
Thanks for reply and support :)
...
See how I use CA for this tool
http://www.scriptspot.com/3ds-max/scripts/gridtm-addon
U can add one parameter in ParameterBlock like stringTab or soo to store data of your rollout.
bga
Ok, I have understand how it
Ok, I have understand how it works CA, but but I have a question that is not answered: I can enter a CA in a Rollout without create un modifier in the object?? Yes I can but...
If I check with
custAttributes.count p baseobject:false
the object plane, CA "testBox" is known and no modifier is applied (because obviously not created)
es.
but I do not understand how the main "parameters" is updated, while if I create a modifier (attribute holder) con CA there are no problems... Where I am wrong?
PS: This is the first time I use a plug-in MAXScript and I have read dozens of pages helpscript tonight... every time I create a shred of script, opens a new world !! :-D
Thanks again, I check and
Thanks again, I check and study your tool. I hope to get on top of the problem :-D