Advertisement
Nofew

Rotate6

Sep 13th, 2017
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.76 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 == 0:
  14.         bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0))
  15.     else:
  16.         DRAGON = abs(radians(DRAGON))
  17. #        if DRAGON > 0:
  18. #            DRAGON = -DRAGON
  19.         bpy.ops.transform.rotate(value=((DRAGON)), axis=(1, 0, 0))
  20.     DRAGON = random.choice([0, 1, 2, 3])
  21.     DRAGON = DRAGON * 90
  22.     if DRAGON == 0:
  23.         bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0))
  24.     else:
  25.         DRAGON = radians(DRAGON)
  26.  #       if DRAGON > 0:
  27.   #          DRAGON = -DRAGON
  28.         bpy.ops.transform.rotate(value=((DRAGON)), axis=(0, 1, 0))
  29.     DRAGON = random.choice([0, 1, 2, 3])
  30.     DRAGON = DRAGON * 90
  31.     if DRAGON == 0:
  32.         bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0))
  33.     else:
  34.         DRAGON = radians(DRAGON)
  35.    #     if DRAGON > 0:
  36.     #        DRAGON = -DRAGON
  37.         bpy.ops.transform.rotate(value=((DRAGON)), axis=(0, 0, 1))
  38.    
  39.        
  40.    
  41.    
  42.     #if DRAGON >= 1 or DRAGON <= -1:
  43.     #    bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(1, 0, 0))
  44.     #else:
  45.     #    bpy.ops.transform.rotate(value=(0.0), axis=(1, 0, 0))
  46. #    bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(1, 0, 0))
  47.  #   DRAGON = random.choice([0, 1, 2, 3])
  48.   #  bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(0, 1, 0))
  49.    # DRAGON = random.choice([0, 1, 2, 3])
  50.     #bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(0, 0, 1))
  51. #    bpy.ops.transform.rotate(value=radians(90), axis=(0, 0, 1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement