SHARE
TWEET

Untitled

a guest Jun 15th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #OPERATOR WILL RUN WHEN "S" IS PRESSED
  2.  
  3. import bpy
  4.  
  5. #Using this in case I want to add more modes later
  6. pivot_modes = ['MEDIAN_POINT', 'INDIVIDUAL_ORIGINS']
  7. i = 0
  8.  
  9. #IF SCALE IS ALREADY ACTIVE:
  10.  
  11. #Store the original Pivot Point
  12. pivot_point = bpy.context.tool_settings.transform_pivot_point[:]
  13.  
  14. #Change Pivot Modes
  15. if pivot_point == pivot_modes[i]:
  16.     bpy.context.tool_settings.transform_pivot_point = pivot_modes[i+1]  
  17.  
  18. elif pivot_point == pivot_modes[i+1]:
  19.     bpy.context.tool_settings.transform_pivot_point = pivot_modes[i]
  20.  
  21. #ELSE:
  22.  
  23.     #Make sure we always start with Mediant Point Mode
  24.     #bpy.context.tool_settings.transform_pivot_point = 'MEDIAN_POINT'
  25.  
  26.     #bpy.ops.transform.resize('INVOKE_DEFAULT')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top