Notifications
Clear all

[Closed] getPropNames on mr area omni

hi

im in the process if writing a script to find identical lights in a max scene base on their properties. I have something working except for when i run getPropNames on a mr area omni ( or any mr light) it only returns the mr properties, Area_Enable,Area_Visible,Area_U_Samples etc… but nothing as simple as the multiplier which you can get with $.multiplier. I need it to return a list of all the properties any help/suggestions on getting getPropNames to return all of them would be great

thanks
Dave

6 Replies
1 Reply
(@denist)
Joined: 2 years ago

Posts: 0

mr_Area_Omni is an extension of Omni_Light. to get all properties you have to check it’s delegate and all custom attributes added to its baseobject

ok that makes sense, but doing getPropNames $.baseObject returned the same results?

1 Reply
(@denist)
Joined: 2 years ago

Posts: 0

getpropnames $.baseobject.delegate
$.baseobject.custattributes
getpropnames $.baseobject.custattributes[1]
getpropnames $.baseobject.custattributes[2]

cheers for the code but where is the help page for this, i cant find a reference to delegate other than in the scripted plugin, which i suppose it could be?

1 Reply
(@denist)
Joined: 2 years ago

Posts: 0

i was my guess about “delegate”. but you can see the #Omni_Light property which which helped me to make this guess.
to make universal property comparer if have to use probably recursive subanim search… there are several samples on this forum

there is a cleaner way to see that an object a max script plugin an has delegate property…
there are functions ismspluginclass and ismsplugin. because the super class of miAreaLightomni is Light, and miAreaLightomni is ms plugin it must extend one of light plugins. if it extends an another plug-in it has to have #delegate property.