wiremas / spore

paintable particle node for Maya
MIT License
80 stars 29 forks source link

RuntimeError: spore nodes's inMesh plug is not connected #8

Closed Narann closed 5 years ago

Narann commented 5 years ago

Repro step:

[dispatcher] : [CRITICAL] - Uncaught exception:
Traceback (most recent call last):
  File "/spore/plug-ins/scripted/spore_node.py", line 572, in compute
    other_in_mesh = node_utils.get_connected_in_mesh(node.thisMObject())
  File "/spore/scripts/utils/node_utils.py", line 194, in get_connected_in_mesh
    raise RuntimeError('spore nodes\'s inMesh plug is not connected')
RuntimeError: spore nodes's inMesh plug is not connected

Looks like it's related to sys._global_spore_tracking_dir that keep created items without remove them:

for k, v in sys._global_spore_tracking_dir.iteritems():
    print k, v
2460714976 <scripted.spore_node.SporeNode; proxy of <Swig Object of type 'MPxLocatorNode *' at 0x7f82dc0379c0> >
2460723312 <scripted.spore_node.SporeNode; proxy of <Swig Object of type 'MPxLocatorNode *' at 0x7f82dc037d20> >
3041226656 <scripted.spore_node.SporeNode; proxy of <Swig Object of type 'MPxLocatorNode *' at 0x7f82d6a66030> >
1858774048 <scripted.spore_node.SporeNode; proxy of <Swig Object of type 'MPxLocatorNode *' at 0x7f82d7844f00> >

Looks like the nodes tracking is not removed from the dict when nodes are removed.

Maya 2018.5, Linux.

wiremas commented 5 years ago

Thanks for the repro. As you described the entry was not properly removed from the dict upon node deletion. Should be fixed now.

Narann commented 5 years ago

Thanks @wiremas! I try the fix as soon as possible.

Narann commented 5 years ago

I just tested, this bug is fixed. Thanks again !

I have few other issues but will create separate tickets with repo steps. :)