#maya/rfm_scripts/python/proc_data.py
#Intended to be called by a Procedural Primitive
import maya.cmds as cmds
def GenCylinder(shapeName):
num = str(cmds.getAttr(shapeName + '.num_spheres'))
sph_rad = str(cmds.getAttr(shapeName + '.sphere_rad'))
cyl_height = str(cmds.getAttr(shapeName + '.cylinder_height'))
cyl_rad = str(cmds.getAttr(shapeName + '.cylinder_rad'))
text = num + " " + sph_rad + " " + cyl_height + " " + cyl_rad
cmds.setAttr(shapeName + '.data', text, type='string')
def GenSaturnRingsProc(shapeName):
num = str(cmds.getAttr(shapeName + '.num_spheres'))
sph_rad = str(cmds.getAttr(shapeName + '.sphere_rad'))
ring_inrad = str(cmds.getAttr(shapeName + '.ring_innerrad'))
ring_outrad = str(cmds.getAttr(shapeName + '.ring_outerrad'))
h1 = str(cmds.getAttr(shapeName + '.h1'))
h2 = str(cmds.getAttr(shapeName + '.h2'))
offsetx = str(cmds.getAttr(shapeName + '.offsetx'))
offsetz = str(cmds.getAttr(shapeName + '.offsetz'))
disintegration = str(cmds.getAttr(shapeName + '.disintegration'))
text = num + " " + sph_rad + " " + ring_inrad + " " + ring_outrad + " " + h1 + " " + h2 + " " + offsetx + " " + offsetz + " " + disintegration
cmds.setAttr(shapeName + '.data', text, type='string')
#Intended to be called by a Procedural Primitive
import maya.cmds as cmds
def GenCylinder(shapeName):
num = str(cmds.getAttr(shapeName + '.num_spheres'))
sph_rad = str(cmds.getAttr(shapeName + '.sphere_rad'))
cyl_height = str(cmds.getAttr(shapeName + '.cylinder_height'))
cyl_rad = str(cmds.getAttr(shapeName + '.cylinder_rad'))
text = num + " " + sph_rad + " " + cyl_height + " " + cyl_rad
cmds.setAttr(shapeName + '.data', text, type='string')
def GenSaturnRingsProc(shapeName):
num = str(cmds.getAttr(shapeName + '.num_spheres'))
sph_rad = str(cmds.getAttr(shapeName + '.sphere_rad'))
ring_inrad = str(cmds.getAttr(shapeName + '.ring_innerrad'))
ring_outrad = str(cmds.getAttr(shapeName + '.ring_outerrad'))
h1 = str(cmds.getAttr(shapeName + '.h1'))
h2 = str(cmds.getAttr(shapeName + '.h2'))
offsetx = str(cmds.getAttr(shapeName + '.offsetx'))
offsetz = str(cmds.getAttr(shapeName + '.offsetz'))
disintegration = str(cmds.getAttr(shapeName + '.disintegration'))
text = num + " " + sph_rad + " " + ring_inrad + " " + ring_outrad + " " + h1 + " " + h2 + " " + offsetx + " " + offsetz + " " + disintegration
cmds.setAttr(shapeName + '.data', text, type='string')