Jump to content

Scripting help


MongoMan
 Share

Recommended Posts

hi I need to do some batch changes in max on an imported dwg file

I need all the editable splines to be renderable. I m not sure but I t seems as though maxscript is the way to do this the scene has roughly 1700 editable splines in it each named

 

LAYER_1.01 through to

LAYER_2.1783

 

by looking at the max script listener and searching on the net I was able to make a script like this

=======================================

 

select $'LAYER_1.01'

$'LAYER_1.01'.renderable = true

$'LAYER_1.01'.thickness = 0.025

=======================================

 

that works but obviously only does 1 object

I tried a few ways to do them all in a batch without success

this below doesnt work

it does select all objects in the scene but doesnt perform the rederable change to them

========================================

select $'LAYER*'

$'LAYER*'.renderable = true

$'LAYER*'.thickness = 0.025

========================================

 

I am aware perhaps that the objects need to be put into an array first etc but I dont really know how to do this the things i have tried dont work.

 

If theres a way to do what i want without a script well thats fine as well

thanks for help in advance

Link to comment
Share on other sites

ah dont bother thanks to

http://www.cgarchitect.com/vb/showthread.php?t=5216&page=1

Abicalho at the bottom of that page ..

 

this works

===================================

select $*

for i in selection do if hasproperty i.baseObject #renderable do

(

i.baseObject.renderable = true

i.baseObject.thickness = 0.50

--i.baseObject.DisplayRenderMesh = true

)

clearSelection()

=======================================

 

 

Cheers

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...