Nofew icon

Rotate5

Nofew | PRO | 09/13/17 06:42:33 PM UTC | 0 ⭐ | 376 👁️ | Never ⏰ | []
Python |

470 B

|

None

|

0 👍

/

0 👎

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 >= 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))

Comments