[Bf-blender-cvs] [22574f741c4] master: Geometry Nodes: quiet warning when using object info node

Jacques Lucke noreply at git.blender.org
Fri Apr 9 10:07:57 CEST 2021


Commit: 22574f741c4e4d142c7068316296d24bbfc2a12c
Author: Jacques Lucke
Date:   Fri Apr 9 10:07:49 2021 +0200
Branches: master
https://developer.blender.org/rB22574f741c4e4d142c7068316296d24bbfc2a12c

Geometry Nodes: quiet warning when using object info node

Some object types don't have a geometry component in the depsgraph.
Before, there always was a warning printed when such an object was
used in the object info node (e.g. to get its location).

===================================================================

M	source/blender/modifiers/intern/MOD_nodes.cc

===================================================================

diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 96986c7bd83..4fc940b3244 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -173,7 +173,7 @@ static void add_object_relation(const ModifierUpdateDepsgraphContext *ctx, Objec
         add_collection_object_relations_recursive(ctx, *collection_instance);
       }
     }
-    else {
+    else if (ELEM(object.type, OB_MESH, OB_POINTCLOUD, OB_VOLUME)) {
       DEG_add_object_relation(ctx->node, &object, DEG_OB_COMP_GEOMETRY, "Nodes Modifier");
     }
   }



More information about the Bf-blender-cvs mailing list