go edit mode func

gpv2
Pullusb 2022-11-10 18:51:00 +01:00
parent a021535b3f
commit ef566c494f
1 changed files with 11 additions and 1 deletions

View File

@ -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' # 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) # print('const.forward_axis: ', const.forward_axis)
# const.use_curve_follow = True # const.use_curve_follow = True
# return curve, const # 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)