Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt_dyntopo.c
| Show First 20 Lines • Show All 141 Lines • ▼ Show 20 Lines | |||||
| * If 'unode' is given, the BMesh's data is copied out to the unode | * If 'unode' is given, the BMesh's data is copied out to the unode | ||||
| * before the BMesh is deleted so that it can be restored from. */ | * before the BMesh is deleted so that it can be restored from. */ | ||||
| static void SCULPT_dynamic_topology_disable_ex( | static void SCULPT_dynamic_topology_disable_ex( | ||||
| Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob, SculptUndoNode *unode) | Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob, SculptUndoNode *unode) | ||||
| { | { | ||||
| SculptSession *ss = ob->sculpt; | SculptSession *ss = ob->sculpt; | ||||
| Mesh *me = ob->data; | Mesh *me = ob->data; | ||||
| if (ss->attrs.dyntopo_node_id_vertex) { | |||||
| BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_vertex); | BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_vertex); | ||||
| } | |||||
| if (ss->attrs.dyntopo_node_id_face) { | |||||
| BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_face); | BKE_sculpt_attribute_destroy(ob, ss->attrs.dyntopo_node_id_face); | ||||
| } | |||||
| SCULPT_pbvh_clear(ob); | SCULPT_pbvh_clear(ob); | ||||
| if (unode) { | if (unode) { | ||||
| /* Free all existing custom data. */ | /* Free all existing custom data. */ | ||||
| CustomData_free(&me->vdata, me->totvert); | CustomData_free(&me->vdata, me->totvert); | ||||
| CustomData_free(&me->edata, me->totedge); | CustomData_free(&me->edata, me->totedge); | ||||
| CustomData_free(&me->fdata, me->totface); | CustomData_free(&me->fdata, me->totface); | ||||
| ▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines | |||||