Notifications
Clear all
[Closed] checking for float scripts
Dec 08, 2012 5:16 pm
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
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.