Notifications
Clear all

[Closed] check if gizmo/helper have atmosferic/effect

I must check if specific helper and atmosferic gizmo have attached volumetric effect or effect.
I need just true or false. I tried by reference :refs.dependentNodes $ but don’t work so I found this in max help but I exhaust all combination with this. I have no idea how to use it : getGizmo <atmos> <index_integer> Did someone already wave to deal with this problem already?

2 Replies
fn IsGizmoUsedInAtmospherics gizmo =
  (
  	found = false;
  	for i = 1 to numAtmospherics while not found do 
  	(
  		atmos = getAtmospheric i;
  		for j = 1 to atmos.numGizmos while not found do
  		(
  			if  gizmo == getGizmo atmos j then
  				found = true;
  		)	
  	)
     found;
  )
  

it work like I want,great, thankyou but I tried to transform this function to detect if objec has added effect and I changed numAtmospherics to numEffects and getAtmospheric to geteffect but I dont’t work this way. What I’m doing wrong?

fn IsGizmoUsedInEffects gizmo =
(
notfounda = true;
for i = 1 to numEffects while notfound do
(
atmos = geteffect i;
for j = 1 to atmos.numGizmos while notfounda do
(
if gizmo == getGizmo atmos j then
notfounda = false;
)
)
not notfounda;
)