Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 6,963 Lines • ▼ Show 20 Lines | |||||
| void sculpt_pbvh_clear(Object *ob) | void sculpt_pbvh_clear(Object *ob) | ||||
| { | { | ||||
| SculptSession *ss = ob->sculpt; | SculptSession *ss = ob->sculpt; | ||||
| /* Clear out any existing DM and PBVH */ | /* Clear out any existing DM and PBVH */ | ||||
| if (ss->pbvh) { | if (ss->pbvh) { | ||||
| BKE_pbvh_free(ss->pbvh); | BKE_pbvh_free(ss->pbvh); | ||||
| } | |||||
| ss->pbvh = NULL; | ss->pbvh = NULL; | ||||
| } | |||||
| if (ss->pmap) { | |||||
| MEM_freeN(ss->pmap); | |||||
| ss->pmap = NULL; | |||||
| } | |||||
| if (ss->pmap_mem) { | |||||
| MEM_freeN(ss->pmap_mem); | |||||
| ss->pmap_mem = NULL; | |||||
| } | |||||
| BKE_object_free_derived_caches(ob); | BKE_object_free_derived_caches(ob); | ||||
| /* Tag to rebuild PBVH in depsgraph. */ | /* Tag to rebuild PBVH in depsgraph. */ | ||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| void sculpt_dyntopo_node_layers_add(SculptSession *ss) | void sculpt_dyntopo_node_layers_add(SculptSession *ss) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 2,535 Lines • Show Last 20 Lines | |||||