Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/dynamicpaint_ops.c
| Show First 20 Lines • Show All 227 Lines • ▼ Show 20 Lines | static int output_toggle_exec(bContext *C, wmOperator *op) | ||||
| if (!pmd || !pmd->canvas) { | if (!pmd || !pmd->canvas) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| surface = get_activeSurface(pmd->canvas); | surface = get_activeSurface(pmd->canvas); | ||||
| /* if type is already enabled, toggle it off */ | /* if type is already enabled, toggle it off */ | ||||
| if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { | if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { | ||||
| int exists = dynamicPaint_outputLayerExists(surface, ob, output); | bool exists = dynamicPaint_outputLayerExists(surface, ob, output); | ||||
| const char *name; | const char *name; | ||||
| if (output == 0) { | if (output == 0) { | ||||
| name = surface->output_name; | name = surface->output_name; | ||||
| } | } | ||||
| else { | else { | ||||
| name = surface->output_name2; | name = surface->output_name2; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 298 Lines • Show Last 20 Lines | |||||