PDA

View Full Version : Filtering Off


doctorx256
01-23-2008, 07:15 PM
I want to create a script that turns bluring of all maps in the scene to 0.01 instead of the default 1.0.

I tried all day long with no avail.

This is the script i came up with, i know there is a simpler solution but i didn't manage to find it, any solution would be helpfull.


for matnum = 1 to 24 do
(
for texnum = 1 to getNumSubTexmaps meditMaterials[matnum] do
(
curMap = getSubTexmap meditMaterials[matnum] texnum
MeditMaterials[1][#Maps][curMap].blur = 0.01
)
)

PEN
01-23-2008, 08:02 PM
(getClassInstances textureMap).blur=0.01

That is off he top of my head and needs to be tested.

doctorx256
01-24-2008, 02:27 PM
thanks for the tip paul but i am still not able to make the script traverse throught all the maps in all materials in the scene and reduce their blur to 0.01.

PEN
01-24-2008, 02:54 PM
I wasn't even close... Try this.


bMaps=(getClassInstances Bitmaptexture)
for x in bMaps do x.coords.blur=0.01

doctorx256
01-24-2008, 08:25 PM
i don't know where do you get all that knowledge.
yes that is exactly it, you are the man.
thanks.

MoonDoggie
01-24-2008, 09:38 PM
He's incredible. getClassInstances() is also incredible.

CHRiTTeR
01-25-2008, 11:24 AM
cool, any ideas on how setting it to the default value when creating new textures?

doctorx256
01-26-2008, 05:26 PM
can you explain further what exactly do you want to do. maybe an detailed example.

PEN
01-26-2008, 05:41 PM
Have you seen this script of mine. MIght be able to help you in your work flow. What it is designed to do is apply default materials to objects as they are created.

http://www.paulneale.com/scripts/autoMaterial/autoMaterial.htm

CGTalk Moderation
01-26-2008, 05:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.