diff options
Diffstat (limited to 'source/blender/editors/object/object_relations.c')
-rw-r--r-- | source/blender/editors/object/object_relations.c | 77 |
1 files changed, 0 insertions, 77 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index c3d194e176f..33d698757b8 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -1081,83 +1081,6 @@ void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/************************ Clear Slow Parent Operator *********************/ - -static int object_slow_parent_clear_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Depsgraph *depsgraph = CTX_data_depsgraph(C); - Scene *scene = CTX_data_scene(C); - - CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) - { - if (ob->parent) { - if (ob->partype & PARSLOW) { - ob->partype -= PARSLOW; - BKE_object_where_is_calc(depsgraph, scene, ob); - ob->partype |= PARSLOW; - DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); - } - } - } - CTX_DATA_END; - - WM_event_add_notifier(C, NC_SCENE, scene); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_slow_parent_clear(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Clear Slow Parent"; - ot->description = "Clear the object's slow parent"; - ot->idname = "OBJECT_OT_slow_parent_clear"; - - /* api callbacks */ - ot->invoke = WM_operator_confirm; - ot->exec = object_slow_parent_clear_exec; - ot->poll = ED_operator_view3d_active; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -} - -/********************** Make Slow Parent Operator *********************/ - -static int object_slow_parent_set_exec(bContext *C, wmOperator *UNUSED(op)) -{ - Scene *scene = CTX_data_scene(C); - - CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects) - { - if (ob->parent) - ob->partype |= PARSLOW; - - DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM); - } - CTX_DATA_END; - - WM_event_add_notifier(C, NC_SCENE, scene); - - return OPERATOR_FINISHED; -} - -void OBJECT_OT_slow_parent_set(wmOperatorType *ot) -{ - /* identifiers */ - ot->name = "Set Slow Parent"; - ot->description = "Set the object's slow parent"; - ot->idname = "OBJECT_OT_slow_parent_set"; - - /* api callbacks */ - ot->invoke = WM_operator_confirm; - ot->exec = object_slow_parent_set_exec; - ot->poll = ED_operator_view3d_active; - - /* flags */ - ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; -} - /* ******************** Clear Track Operator ******************* */ enum { |