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
Ok, continue to update the
Ok, continue to update the discussion :) I found a way around the problem with the material editor:
Now all work well and the script is almost finished, but...
When I close the rollout or reopen, the preview image appear even if I removed the CA and textureMap in the environmet. If I evalute this string:
I have as a result:
but I delete all!!
However, the strange thing is that if I wait a few minutes with the rollout closed,the described situation disappears !! All work well...
Why the textureMap remains in memory for a long time even if canceled?
Attach the script if you want to consult :D
Well, I resolve the problem
Well, I resolve the problem :) The variable epcb dont work during the delete of CA for the envirinment map; the material is delete but CA link to material no.. Now all work well (least I hope!!)
...
The problem is that scenematerials don't refresh until next save file.
I posted solution here
http://www.scriptspot.com/forums/3ds-max/general-scripting/ignore-unassi...
bga
Thanks barygazi for reply.
Thanks barygazi for reply. Yea, I suppose that have need of refresh something... Strange that cancel the CA for env map and mat in slot editor the problem disappear. However, I put the your fn in the script!!!
Thanks again for adviser!!!
...
I you want to delete CA from any node (object, material, map etc.) try this fn
This fn will delete all CA. But if you want to delete specific CA lets say by given name then it is a different story :). You can find by youreslf how to do that
bga
ok thanks again barigazy!! I
ok thanks again barigazy!! I have used two form for delete CA ( material plane and environment map) but this fn appear to be more fast and symple!!
Thanks again!!!
Ok, I continued the script
Ok, I continued the script and I arrived in good punt :) Now I just can not figure out how to remove a material from Material Editor know the name or CA !! Too much information to script these days and I am exhausted :D
The problem is that the material associated to environment remain in memory, or if I copy or instance it in the material editor, the rollout update Always the info. i have create a button for clear this data, but dont even clean up the map in ME...
Any suggestions?
In practice: how I delete a material/map n Material Editor knowing only his name or state?
Bah... the same function for
Bah... the same function for material dont work... I've create (based on function for mrplane) a fn for probe ball material but without success. The same parameters put in "open do" work well.
In short, the access in texture_shader map dont work.... I to go on my study...
Thanks barigazy :) I study
Thanks barigazy :) I study your solution for CA!!
I'm off to work two days but I bring the script as a book to read and study !!
Thanks again for your valuable support and help ;)
...
I corrected some of your code and added some comments (--***) and function for mr_plane CA. Try this:
Open your script, create plane and change some plane and material properties.
Then close and reopen script. Voila! For EnvMap you need to write code by yourself
You need to do the same thing for enironment map. Create CA and add inside functions for creation of preview map for rollout UI.
bga