Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #OPERATOR WILL RUN WHEN "S" IS PRESSED
- import bpy
- #Using this in case I want to add more modes later
- pivot_modes = ['MEDIAN_POINT', 'INDIVIDUAL_ORIGINS']
- i = 0
- #IF SCALE IS ALREADY ACTIVE:
- #Store the original Pivot Point
- pivot_point = bpy.context.tool_settings.transform_pivot_point[:]
- #Change Pivot Modes
- if pivot_point == pivot_modes[i]:
- bpy.context.tool_settings.transform_pivot_point = pivot_modes[i+1]
- elif pivot_point == pivot_modes[i+1]:
- bpy.context.tool_settings.transform_pivot_point = pivot_modes[i]
- #ELSE:
- #Make sure we always start with Mediant Point Mode
- #bpy.context.tool_settings.transform_pivot_point = 'MEDIAN_POINT'
- #bpy.ops.transform.resize('INVOKE_DEFAULT')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement