diff options
-rw-r--r-- | source/blender/editors/object/object_gpencil_modifier.c | 12 | ||||
-rw-r--r-- | source/blender/editors/object/object_shader_fx.c | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_gpencil_modifier.c b/source/blender/editors/object/object_gpencil_modifier.c index ab1de9e20ec..cfa55c68a56 100644 --- a/source/blender/editors/object/object_gpencil_modifier.c +++ b/source/blender/editors/object/object_gpencil_modifier.c @@ -412,30 +412,30 @@ void OBJECT_OT_gpencil_modifier_add(wmOperatorType *ot) /********** generic functions for operators using mod names and data context *********************/ -static int gpencil_edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag) +static bool gpencil_edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag) { PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type); Object *ob = (ptr.owner_id) ? (Object *)ptr.owner_id : ED_object_active_context(C); GpencilModifierData *mod = ptr.data; /* May be NULL. */ if (!ob || ID_IS_LINKED(ob)) { - return 0; + return false; } if (obtype_flag && ((1 << ob->type) & obtype_flag) == 0) { - return 0; + return false; } if (ptr.owner_id && ID_IS_LINKED(ptr.owner_id)) { - return 0; + return false; } if (ID_IS_OVERRIDE_LIBRARY(ob)) { if ((mod == NULL) || (mod->flag & eGpencilModifierFlag_OverrideLibrary_Local) == 0) { CTX_wm_operator_poll_msg_set(C, "Cannot edit modifiers coming from library override"); - return 0; + return false; } } - return 1; + return true; } static bool gpencil_edit_modifier_poll(bContext *C) diff --git a/source/blender/editors/object/object_shader_fx.c b/source/blender/editors/object/object_shader_fx.c index 9cfba767dad..e2a30c4ce98 100644 --- a/source/blender/editors/object/object_shader_fx.c +++ b/source/blender/editors/object/object_shader_fx.c @@ -335,23 +335,23 @@ static bool edit_shaderfx_poll_generic(bContext *C, StructRNA *rna_type, int obt ShaderFxData *fx = ptr.data; /* May be NULL. */ if (!ob || ID_IS_LINKED(ob)) { - return 0; + return false; } if (obtype_flag && ((1 << ob->type) & obtype_flag) == 0) { - return 0; + return false; } if (ptr.owner_id && ID_IS_LINKED(ptr.owner_id)) { - return 0; + return false; } if (ID_IS_OVERRIDE_LIBRARY(ob)) { if ((fx == NULL) || (fx->flag & eShaderFxFlag_OverrideLibrary_Local) == 0) { CTX_wm_operator_poll_msg_set(C, "Cannot edit shaderfxs coming from library override"); - return 0; + return false; } } - return 1; + return true; } static bool edit_shaderfx_poll(bContext *C) |