PDA

View Full Version : simple command for a n00b


akewt
05-20-2007, 06:32 PM
hello

im not a scripter by any means, but i'd would like to know a small script to speed up my workflow.

i currently have a bunch of planes, just quads, used for leaves on some ivy. its generated from the cute little program IvyGen. i want to use the the texture to geometry tool on all these quads but to do it by hand, one by one would take forever. unfortunately i cant combine them and use the tool or have multiple selections.

is there a script i can run to select these objects and run the tool on them one by one?

thanks for any help.

Sick Spider
05-21-2007, 06:00 AM
There you go.

string $mySelected[] = `ls -sl`;
for ($everySel in $mySelected)
{
select $everySel;
hyperShade -assign myShadeWooHoo;
select -cl;
}

Just select the leaves... and change
the name of the Lambert ("myShadeWooHoo") and run.

akewt
05-21-2007, 10:26 AM
thanks Sick Spider

heres what i came up with for the texture to geom tool using your script:


string $mySelected[] = `ls -sl`;
for ($everySel in $mySelected)
{
select $everySel;
createTextureToGeom( "C:/BlahBlah/IvyGen/textures/efeu1_bnw.tga", "", "setTextureToGeomValues", 1 );
select -cl;
};


works perfectly.

i nust learn scripting :)

CGTalk Moderation
05-21-2007, 10:26 AM
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.