diff --git a/utils.py b/utils.py index 0c37397..a89146c 100644 --- a/utils.py +++ b/utils.py @@ -1100,4 +1100,14 @@ def create_follow_path_constraint(ob, curve, follow_curve=False): # const.forward_axis = orentation_track_from_vector(root_world_base_direction) # 'TRACK_NEGATIVE_Y' # bpy.context.scene.anim_cycle_settings.forward_axis # 'FORWARD_X' # print('const.forward_axis: ', const.forward_axis) # const.use_curve_follow = True - # return curve, const \ No newline at end of file + # return curve, const + +def go_edit_mode(ob, context=None): + '''set mode to object, set passed obhject as active and go Edit''' + + context = context or bpy.context + bpy.ops.object.mode_set(mode='OBJECT', toggle=False) + ob.select_set(True) + context.view_layer.objects.active = ob + bpy.ops.object.mode_set(mode='EDIT', toggle=False) +