diff options
Diffstat (limited to 'source/blender/editors/physics/dynamicpaint_ops.c')
-rw-r--r-- | source/blender/editors/physics/dynamicpaint_ops.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/physics/dynamicpaint_ops.c b/source/blender/editors/physics/dynamicpaint_ops.c index 4f516ec9c51..d63c28bb0cf 100644 --- a/source/blender/editors/physics/dynamicpaint_ops.c +++ b/source/blender/editors/physics/dynamicpaint_ops.c @@ -100,7 +100,7 @@ void DPAINT_OT_surface_slot_add(wmOperatorType *ot) ot->name = "Add Surface Slot"; ot->idname = "DPAINT_OT_surface_slot_add"; ot->description = "Add a new Dynamic Paint surface slot"; - + /* api callbacks */ ot->exec = surface_slot_add_exec; ot->poll = ED_operator_object_active_editable; @@ -148,7 +148,7 @@ void DPAINT_OT_surface_slot_remove(wmOperatorType *ot) ot->name = "Remove Surface Slot"; ot->idname = "DPAINT_OT_surface_slot_remove"; ot->description = "Remove the selected surface slot"; - + /* api callbacks */ ot->exec = surface_slot_remove_exec; ot->poll = ED_operator_object_active_editable; @@ -179,7 +179,7 @@ static int type_toggle_exec(bContext *C, wmOperator *op) if (!dynamicPaint_createType(pmd, type, scene)) return OPERATOR_CANCELLED; } - + /* update dependency */ DAG_id_tag_update(&cObject->id, OB_RECALC_DATA); DAG_relations_tag_update(CTX_data_main(C)); @@ -196,14 +196,14 @@ void DPAINT_OT_type_toggle(wmOperatorType *ot) ot->name = "Toggle Type Active"; ot->idname = "DPAINT_OT_type_toggle"; ot->description = "Toggle whether given type is active or not"; - + /* api callbacks */ ot->exec = type_toggle_exec; ot->poll = ED_operator_object_active_editable; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - + /* properties */ prop = RNA_def_enum(ot->srna, "type", rna_enum_prop_dynamicpaint_type_items, MOD_DYNAMICPAINT_TYPE_CANVAS, "Type", ""); ot->prop = prop; @@ -223,7 +223,7 @@ static int output_toggle_exec(bContext *C, wmOperator *op) if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { int exists = dynamicPaint_outputLayerExists(surface, ob, output); const char *name; - + if (output == 0) name = surface->output_name; else @@ -233,7 +233,7 @@ static int output_toggle_exec(bContext *C, wmOperator *op) if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) { if (!exists) ED_mesh_color_add(ob->data, name, true); - else + else ED_mesh_color_remove_named(ob->data, name); } /* Vertex Weight Layer */ @@ -263,14 +263,14 @@ void DPAINT_OT_output_toggle(wmOperatorType *ot) ot->name = "Toggle Output Layer"; ot->idname = "DPAINT_OT_output_toggle"; ot->description = "Add or remove Dynamic Paint output data layer"; - + /* api callbacks */ ot->exec = output_toggle_exec; ot->poll = ED_operator_object_active_editable; - + /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; - + /* properties */ ot->prop = RNA_def_enum(ot->srna, "output", prop_output_toggle_types, 0, "Output Toggle", ""); } @@ -505,7 +505,7 @@ void DPAINT_OT_bake(wmOperatorType *ot) ot->name = "Dynamic Paint Bake"; ot->description = "Bake dynamic paint image sequence surface"; ot->idname = "DPAINT_OT_bake"; - + /* api callbacks */ ot->exec = dynamicpaint_bake_exec; ot->poll = ED_operator_object_active_editable; |