[Bf-blender-cvs] [2ee95e91f77] master: Remove context check from constraint and shaderfx edit poll

Hans Goudey noreply at git.blender.org
Fri Jun 5 20:30:39 CEST 2020


Commit: 2ee95e91f77e95f81b66f0428e1db1e9c859d327
Author: Hans Goudey
Date:   Fri Jun 5 14:30:15 2020 -0400
Branches: master
https://developer.blender.org/rB2ee95e91f77e95f81b66f0428e1db1e9c859d327

Remove context check from constraint and shaderfx edit poll

This mirrors 1f78e86070 from 2018 for mesh modifiers.

Differential Revision: https://developer.blender.org/D7940

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

M	source/blender/editors/object/object_constraint.c
M	source/blender/editors/object/object_shader_fx.c

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

diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 76e95b0105a..1e04355c9a7 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -668,11 +668,6 @@ static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
   PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", rna_type);
   Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C);
 
-  if (!ptr.data) {
-    CTX_wm_operator_poll_msg_set(C, "Context missing 'constraint'");
-    return 0;
-  }
-
   if (!ob) {
     CTX_wm_operator_poll_msg_set(C, "Context missing active object");
     return 0;
diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c
index 30fcdfc88bc..5db4a5a4f57 100644
--- a/source/blender/editors/object/object_shader_fx.c
+++ b/source/blender/editors/object/object_shader_fx.c
@@ -296,11 +296,6 @@ static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obt
   PointerRNA ptr = CTX_data_pointer_get_type(C, "shaderfx", rna_type);
   Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C);
 
-  if (!ptr.data) {
-    CTX_wm_operator_poll_msg_set(C, "Context missing 'shaderfx'");
-    return 0;
-  }
-
   if (!ob || ID_IS_LINKED(ob)) {
     return 0;
   }



More information about the Bf-blender-cvs mailing list