Scripting for Animation and VFX: Week 4

Scripting for Animation and VFX: Week 4 Functions and Creating Spheres For this weeks assignment we were working with functions using python in maya. The given code to work with and expand created randomly placed spheres and curves that connected them. Breaking down the given code: import random import maya.cmds as cmds def create_random_sphere(): # Generate random position x = random.uniform(-100, 100) y = random.uniform(-100, 100) z = random.uniform(-100, 100) # Create sphere sphere = cmds.polySphere() [0] # Move sphere to random position cmds.move(x, y, z, sphere) return sphere def create_pipe(start, end): # Create a pipe between two objects curve = cmds.curve(degree=1, point=[cmds.xform(start, query=True, translation=True), cmds.xform(end, query=True, translat...