Notifications
Clear all

[Closed] checking for float scripts

I need a quick way to go thru a given material or object , determine if any floatscripts are there on the material tree or float script controllers for an object, check to see if they are associated with a particular object, then delete those controllers. thnx for your time.

1 Reply
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

to find all Float_Scripts controllers associated with some MAXWrapper (material, object, modifier, etc.) you can use the getClassInstances


getClassInstances Float_Scripts target:<the_wrapper>

you can’t just delete a controller. you only can replace it with another one. let’s say Bezier_Float (which is default type for float parameters)


for c in (getClassInstances Float_Scripts target:<the_wrapper>) do replaceInstances c (Bezier_Float())

but it will replace all instances of the source controller. if you want to protect some instances in other nodes you have to make the source controller unique before replace it.