Updated print params to handles new color interpolation code.

This commit is contained in:
Josh Wilson 2005-06-16 21:01:57 +00:00
parent 9621c1cca9
commit 7d4dd492ae

View File

@ -352,28 +352,25 @@ class Particles(ParticleSystem):
segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']') segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']')
for sid in segIdList: for sid in segIdList:
seg = cim.getSegment(sid) seg = cim.getSegment(sid)
if( seg.isEnabled() ):
t_b = seg.getTimeBegin() t_b = seg.getTimeBegin()
t_e = seg.getTimeEnd() t_e = seg.getTimeEnd()
fun = seg.getFunction() fun = seg.getFunction()
type = fun.getType() typ = type(fun).__name__
if type == 'ColorInterpolationFunctionConstant': if typ == 'ColorInterpolationFunctionConstant':
fun = cim.downcastFunctionToConstant(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
file.write(targ+'.renderer.getColorInterpolationManager().addConstant('+`t_b`+','+`t_e`+','+`c_a`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addConstant('+`t_b`+','+`t_e`+','+`c_a`+')\n')
elif type == 'ColorInterpolationFunctionLinear': elif typ == 'ColorInterpolationFunctionLinear':
fun = cim.downcastFunctionToLinear(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
file.write(targ+'.renderer.getColorInterpolationManager().addLinear('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addLinear('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+')\n')
elif type == 'ColorInterpolationFunctionStepwave': elif typ == 'ColorInterpolationFunctionStepwave':
fun = cim.downcastFunctionToStepwave(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
w_a = fun.getWidthA() w_a = fun.getWidthA()
w_b = fun.getWidthB() w_b = fun.getWidthB()
file.write(targ+'.renderer.getColorInterpolationManager().addStepwave('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+','+`w_a`+','+`w_b`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addStepwave('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+','+`w_a`+','+`w_b`+')\n')
elif type == 'ColorInterpolationFunctionSinusoid': elif typ == 'ColorInterpolationFunctionSinusoid':
fun = cim.downcastFunctionToSinusoid(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
per = fun.getPeriod() per = fun.getPeriod()
@ -444,28 +441,25 @@ class Particles(ParticleSystem):
segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']') segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']')
for sid in segIdList: for sid in segIdList:
seg = cim.getSegment(sid) seg = cim.getSegment(sid)
if( seg.isEnabled() ):
t_b = seg.getTimeBegin() t_b = seg.getTimeBegin()
t_e = seg.getTimeEnd() t_e = seg.getTimeEnd()
fun = seg.getFunction() fun = seg.getFunction()
type = fun.getType() typ = type(fun).__name__
if type == 'ColorInterpolationFunctionConstant': if typ == 'ColorInterpolationFunctionConstant':
fun = cim.downcastFunctionToConstant(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
file.write(targ+'.renderer.getColorInterpolationManager().addConstant('+`t_b`+','+`t_e`+','+`c_a`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addConstant('+`t_b`+','+`t_e`+','+`c_a`+')\n')
elif type == 'ColorInterpolationFunctionLinear': elif typ == 'ColorInterpolationFunctionLinear':
fun = cim.downcastFunctionToLinear(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
file.write(targ+'.renderer.getColorInterpolationManager().addLinear('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addLinear('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+')\n')
elif type == 'ColorInterpolationFunctionStepwave': elif typ == 'ColorInterpolationFunctionStepwave':
fun = cim.downcastFunctionToStepwave(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
w_a = fun.getWidthA() w_a = fun.getWidthA()
w_b = fun.getWidthB() w_b = fun.getWidthB()
file.write(targ+'.renderer.getColorInterpolationManager().addStepwave('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+','+`w_a`+','+`w_b`+')\n') file.write(targ+'.renderer.getColorInterpolationManager().addStepwave('+`t_b`+','+`t_e`+','+`c_a`+','+`c_b`+','+`w_a`+','+`w_b`+')\n')
elif type == 'ColorInterpolationFunctionSinusoid': elif typ == 'ColorInterpolationFunctionSinusoid':
fun = cim.downcastFunctionToSinusoid(fun)
c_a = fun.getColorA() c_a = fun.getColorA()
c_b = fun.getColorB() c_b = fun.getColorB()
per = fun.getPeriod() per = fun.getPeriod()