Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/curves/intern/curves_ops.cc
| Show First 20 Lines • Show All 991 Lines • ▼ Show 20 Lines | CTX_DATA_BEGIN (C, Object *, selected_ob, selected_objects) { | ||||
| blender::ed::curves::ensure_surface_deformation_node_exists(*C, curves_ob); | blender::ed::curves::ensure_surface_deformation_node_exists(*C, curves_ob); | ||||
| curves_id.surface = &new_surface_ob; | curves_id.surface = &new_surface_ob; | ||||
| ED_object_parent_set( | ED_object_parent_set( | ||||
| op->reports, C, scene, &curves_ob, &new_surface_ob, PAR_OBJECT, false, true, nullptr); | op->reports, C, scene, &curves_ob, &new_surface_ob, PAR_OBJECT, false, true, nullptr); | ||||
| DEG_id_tag_update(&curves_ob.id, ID_RECALC_TRANSFORM); | DEG_id_tag_update(&curves_ob.id, ID_RECALC_TRANSFORM); | ||||
| WM_event_add_notifier(C, NC_GEOM | ND_DATA, &curves_id); | WM_event_add_notifier(C, NC_GEOM | ND_DATA, &curves_id); | ||||
| WM_event_add_notifier(C, NC_NODE | NA_ADDED, NULL); | |||||
| /* Required for deformation. */ | /* Required for deformation. */ | ||||
| new_surface_ob.modifier_flag |= OB_MODIFIER_FLAG_ADD_REST_POSITION; | new_surface_ob.modifier_flag |= OB_MODIFIER_FLAG_ADD_REST_POSITION; | ||||
| DEG_id_tag_update(&new_surface_ob.id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&new_surface_ob.id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| CTX_DATA_END; | CTX_DATA_END; | ||||
| DEG_relations_tag_update(bmain); | DEG_relations_tag_update(bmain); | ||||
| Show All 32 Lines | |||||