Notifications
Clear all

[Closed] modPanel.getModifierIndex how!?

Right Denis, but the findItem does an == comparision between items but doesnt work, is it because you also need to pass the actual modifier instance and not the class, like Bobo said? It’s a shame and to me it doesnt make sense, I want to be able to search for something I dont know it exists in the array…

Cheers guys and thanks for your time and solutions

 lo1

Even if you had such a method, wouldn’t you still going back to a two-loop solution?

1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

personally i don’t like to do more loops than necessary. but in this case probably i will stay with something:


 for node in nodes do for modi in node.modifiers where iskindof modi theClass do
 (
 ...
 )
 

that’s the theory above is about.
ask for derived object -> if has -> ask for class instances for this object… but as i said getclassinstances will search in ALL anims of a specified target.

but if i have to iterate through almost all nodes, i would use:


getclassinstances theClass astrackviewpick:on

where <trackViewPick>.client gives me a derived object

1 Reply
 lo1
(@lo1)
Joined: 1 year ago

Posts: 0

Nice, didn’t know that.

So… it seems the simple way is the best way… go figure

no. the best way is the right way.

Joking

Page 2 / 2