Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_expand.c
| Show First 20 Lines • Show All 2,096 Lines • ▼ Show 20 Lines | |||||
| static int sculpt_expand_invoke(bContext *C, wmOperator *op, const wmEvent *event) | static int sculpt_expand_invoke(bContext *C, wmOperator *op, const wmEvent *event) | ||||
| { | { | ||||
| Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| Object *ob = CTX_data_active_object(C); | Object *ob = CTX_data_active_object(C); | ||||
| SculptSession *ss = ob->sculpt; | SculptSession *ss = ob->sculpt; | ||||
| Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | Sculpt *sd = CTX_data_tool_settings(C)->sculpt; | ||||
| SCULPT_stroke_id_next(ob); | |||||
| /* Create and configure the Expand Cache. */ | /* Create and configure the Expand Cache. */ | ||||
| ss->expand_cache = MEM_callocN(sizeof(ExpandCache), "expand cache"); | ss->expand_cache = MEM_callocN(sizeof(ExpandCache), "expand cache"); | ||||
| sculpt_expand_cache_initial_config_set(C, op, ss->expand_cache); | sculpt_expand_cache_initial_config_set(C, op, ss->expand_cache); | ||||
| /* Update object. */ | /* Update object. */ | ||||
| const bool needs_colors = ss->expand_cache->target == SCULPT_EXPAND_TARGET_COLORS; | const bool needs_colors = ss->expand_cache->target == SCULPT_EXPAND_TARGET_COLORS; | ||||
| if (needs_colors) { | if (needs_colors) { | ||||
| ▲ Show 20 Lines • Show All 233 Lines • Show Last 20 Lines | |||||