ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
I was wondering if anyone may be able to help me make a Very tiny script. I tried, but know nothing of scripting.
All the script needs to do is change the 3ds max blur parameter of all bitmaps in the scene.
I was wondering how can we change the blur in all texture maps that have coords as well. For example tiles as they are other class - bricks not bitmaptexture. So we can go through all the classes one by one but is there a way of getting them together? I read somewhere something about GetClassInstances (superclass.classes) but I don't get it to work?
Well all texture maps have the superClass "textureMap", but you cant get it using "getClassInstances". Also, not every textureMap has a .coords or .blur parameter.
Mhm...maybe you can loop through objects in the scene that have a material, than get the maps of that material and check for .coords / .blur parameter. Just an idea, dont ahve much time right now to test^^
for o in objects where o.material != undefined dofor m in o.material.maps where m != undefined doif hasProperty m.coords "blur"do
m.coords.blur = 20.0
No problem. You can either copy/paste the following code into the MAXScript Listener window or your can download the attached maxscript file and in Max click MAXScript / Open Script and change the blur value to what you want then either click Tools / Evaluate All or just press Ctrl+E. Voila. All bitmaps in the scene will have their blur changed.
Note this doesn't work on a selection, it change every bitmap whether in a displace modifier, a spotlight, material, etc...
maps = getClassInstances bitmaptexture
for m in maps do(
m.coords.blur = 1.00--set this value to whatever you want)
As previously mentioned I know nothing of maxscript other than to record in Max listner window and reuse the code without modification.
I really appreciate your time to help me out and I would like to be able to offer you some help back [Maybe in the area of texture creation as this is my forte]
Please let me know if I can help you in any way.
Comments
I was wondering how can we
I was wondering how can we change the blur in all texture maps that have coords as well. For example tiles as they are other class - bricks not bitmaptexture. So we can go through all the classes one by one but is there a way of getting them together? I read somewhere something about GetClassInstances (superclass.classes) but I don't get it to work?
Well all texture maps have
Well all texture maps have the superClass "textureMap", but you cant get it using "getClassInstances". Also, not every textureMap has a .coords or .blur parameter.
Mhm...maybe you can loop through objects in the scene that have a material, than get the maps of that material and check for .coords / .blur parameter. Just an idea, dont ahve much time right now to test^^
Never get low & slow & out of ideas
Thanks, it is kind of go
Thanks, it is kind of go round way but I think will do the work ;)
No problem. You can either
No problem. You can either copy/paste the following code into the MAXScript Listener window or your can download the attached maxscript file and in Max click MAXScript / Open Script and change the blur value to what you want then either click Tools / Evaluate All or just press Ctrl+E. Voila. All bitmaps in the scene will have their blur changed.
Note this doesn't work on a selection, it change every bitmap whether in a displace modifier, a spotlight, material, etc...
Thanks ever so much
Thanks ever so much Christopher!!!
As previously mentioned I know nothing of maxscript other than to record in Max listner window and reuse the code without modification.
I really appreciate your time to help me out and I would like to be able to offer you some help back [Maybe in the area of texture creation as this is my forte]
Please let me know if I can help you in any way.
Thanks again
Jamie