Nofew

Rotate5

Sep 13th, 2017
374
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. import bpy
  2. from math import pi
  3. from math import radians
  4. from random import randrange
  5. import random
  6.  
  7. CurrentThingy = 0
  8.  
  9. for CurrentThingy in bpy.context.selected_objects:
  10.     bpy.context.scene.objects.active = CurrentThingy
  11.     DRAGON = random.choice([0, 1, 2, 3])
  12.     DRAGON = DRAGON * 90
  13.     if DRAGON >= 1 or DRAGON <= -1:
  14.         bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(1, 0, 0))
  15.     else:
  16.         bpy.ops.transform.rotate(value=(0.0), axis(1, 0, 0))
Advertisement
Add Comment
Please, Sign In to add comment