Hi, thanks for the reply!
This is how I’m currently doing it myself:
def find_influences(geometry):
influence_list = list()
for i in range(geometry.GetNumModifiers()):
mod = geometry.GetModifier(i)
if mod.ClassID != MaxPlus.ClassIds.Skin:
continue
for ref in mod.Refs:
if not ref:
continue
if ref.ClassID != MaxPlus.ClassIds.NodeObject:
continue
for subref in ref.Refs:
if not subref:
continue
if subref.SuperClassID == 16 or subref.SuperClassID == 80:
influence_list.append(MaxPlus.INode.FindNodeFromBaseObject(subref))
return influence_list
Very similar, but I use some extra steps to get there.
In praxis I look through all geometries in the scene and build a dictionary where any influence becomes a key and the where the values are lists of geometry affected by a given influence:
skin_map[influence_a.handle] = [geom_a, geom_c, geom_d]
Now lookup is fast, but creating the dict is still too slow… It looks like MaxScript can go “The Other Way”, where you ask “what something influences”, rather than “what influences something”. I will pull the the old EvalMaxScript and report back