Avoid sending depsgraph update trigger?

Hello

fffffff

each modal iteration of my little node-wrangler like plugin is sending depsgraph update, re-avaluating all modifiers makign unnecessarily slow. (see in the gif, first move is done with the CPP move operator, second move is with my plugin)

All the plugin is doing is moving a reroute in modal state via setting an attribute : node.location.

Do any dev knows how i can avoid this? :sweat_smile:
Is this a hard coded python limitation?

2 Likes

Have you found any solution to this?
I have a similar issue related to the depsgraph update for rendering an object from multiple cameras from different angles. I am looking for a way to reduce the rendering time, wondering if you have a solution for such a case?

Hi
the only solution would consists of pushing a patch in main

Are you able to apply a patch? If so, this might solve the issue.

diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index c32e5b7d4db..bff358ebb17 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -12179,7 +12179,7 @@ static void rna_def_node(BlenderRNA *brna)
   RNA_def_property_array(prop, 2);
   RNA_def_property_range(prop, -100000.0f, 100000.0f);
   RNA_def_property_ui_text(prop, "Location", "");
-  RNA_def_property_update(prop, NC_NODE, "rna_Node_update");
+  RNA_def_property_update(prop, NC_NODE | ND_DISPLAY, NULL);
 
   prop = RNA_def_property(srna, "width", PROP_FLOAT, PROP_XYZ);
   RNA_def_property_float_sdna(prop, NULL, "width");
2 Likes