diff options
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 10 | ||||
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 8 | ||||
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 3 |
3 files changed, 12 insertions, 9 deletions
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 6922a03b12f..381bf317bee 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -102,7 +102,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot) /* api callbacks */ ot->exec = surface_slot_add_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -151,7 +151,7 @@ void DPAINT_OT_surface_slot_remove(wmOperatorType *ot) /* api callbacks */ ot->exec = surface_slot_remove_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -203,7 +203,7 @@ void DPAINT_OT_type_toggle(wmOperatorType *ot) /* api callbacks */ ot->exec = type_toggle_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -286,7 +286,7 @@ void DPAINT_OT_output_toggle(wmOperatorType *ot) /* api callbacks */ ot->exec = output_toggle_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; @@ -538,5 +538,5 @@ void DPAINT_OT_bake(wmOperatorType *ot) /* api callbacks */ ot->exec = dynamicpaint_bake_exec; - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; } diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index e75169a476b..41e30adf724 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -104,7 +104,7 @@ void OBJECT_OT_particle_system_add(wmOperatorType *ot) ot->description = "Add a particle system"; /* api callbacks */ - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; ot->exec = particle_system_add_exec; /* flags */ @@ -151,7 +151,7 @@ void OBJECT_OT_particle_system_remove(wmOperatorType *ot) ot->description = "Remove the selected particle system"; /* api callbacks */ - ot->poll = ED_operator_object_active_editable; + ot->poll = ED_operator_object_active_local_editable; ot->exec = particle_system_remove_exec; /* flags */ @@ -1210,7 +1210,7 @@ static bool copy_particle_systems_to_object(const bContext *C, static bool copy_particle_systems_poll(bContext *C) { Object *ob; - if (!ED_operator_object_active_editable(C)) { + if (!ED_operator_object_active_local_editable(C)) { return false; } @@ -1311,7 +1311,7 @@ void PARTICLE_OT_copy_particle_systems(wmOperatorType *ot) static bool duplicate_particle_systems_poll(bContext *C) { - if (!ED_operator_object_active_editable(C)) { + if (!ED_operator_object_active_local_editable(C)) { return false; } Object *ob = ED_object_active_context(C); diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 583c68cb284..26b5f7fb2af 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -546,6 +546,7 @@ static int fluid_bake_exec(struct bContext *C, struct wmOperator *op) return OPERATOR_CANCELLED; } if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } WM_report_banners_cancel(job->bmain); @@ -574,6 +575,7 @@ static int fluid_bake_invoke(struct bContext *C, } if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } @@ -651,6 +653,7 @@ static int fluid_free_exec(struct bContext *C, struct wmOperator *op) job->name = op->type->name; if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } |