Created
March 24, 2013 01:55
-
-
Save enzyme69/5230115 to your computer and use it in GitHub Desktop.
Blender Sushi Script to randomize the Scale Transform of user selected mesh. It randomize the Scale in 3 different axes separately.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import random | |
# Define a function to randomize scale | |
def randomizeScale (minScale, maxScale): | |
selected_objects = bpy.context.selected_objects | |
for object in selected_objects: | |
randX = random.uniform (minScale, maxScale) | |
randY = random.uniform (minScale, maxScale) | |
randZ = random.uniform (minScale, maxScale) | |
object.scale = (randX, randY, randZ) | |
# Example how you would run the function and giving it required arguments | |
# which is the two value minScale and maxScale | |
randomizeScale(0.3, 2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment