import bpy from math import pi from math import radians from random import randrange import random CurrentThingy = 0 for CurrentThingy in bpy.context.selected_objects: bpy.context.scene.objects.active = CurrentThingy DRAGON = random.choice([0, 1, 2, 3]) DRAGON = DRAGON * 90 if DRAGON == 0: bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0)) else: DRAGON = abs(radians(DRAGON)) # if DRAGON > 0: # DRAGON = -DRAGON bpy.ops.transform.rotate(value=((DRAGON)), axis=(1, 0, 0)) DRAGON = random.choice([0, 1, 2, 3]) DRAGON = DRAGON * 90 if DRAGON == 0: bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0)) else: DRAGON = radians(DRAGON) # if DRAGON > 0: # DRAGON = -DRAGON bpy.ops.transform.rotate(value=((DRAGON)), axis=(0, 1, 0)) DRAGON = random.choice([0, 1, 2, 3]) DRAGON = DRAGON * 90 if DRAGON == 0: bpy.ops.transform.rotate(value=0.0, axis=(1, 0, 0)) else: DRAGON = radians(DRAGON) # if DRAGON > 0: # DRAGON = -DRAGON bpy.ops.transform.rotate(value=((DRAGON)), axis=(0, 0, 1)) #if DRAGON >= 1 or DRAGON <= -1: # bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(1, 0, 0)) #else: # bpy.ops.transform.rotate(value=(0.0), axis=(1, 0, 0)) # bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(1, 0, 0)) # DRAGON = random.choice([0, 1, 2, 3]) # bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(0, 1, 0)) # DRAGON = random.choice([0, 1, 2, 3]) #bpy.ops.transform.rotate(value=((radians(DRAGON))), axis=(0, 0, 1)) # bpy.ops.transform.rotate(value=radians(90), axis=(0, 0, 1))
Comments