diff options
author | Jacques Guignot <guignot@wanadoo.fr> | 2003-06-21 20:07:55 +0400 |
---|---|---|
committer | Jacques Guignot <guignot@wanadoo.fr> | 2003-06-21 20:07:55 +0400 |
commit | 89e847f51aaf9561228cdc42d89847f0839617b3 (patch) | |
tree | c17887833c6a23aa2f76346518c0c5f3d19b1376 /source/blender/python/api2_2x/doc/testeffect.py | |
parent | 81dae537b1318b0c371eb0117ec5e04634fad269 (diff) |
added python test files
these tests should be exhaustive
Diffstat (limited to 'source/blender/python/api2_2x/doc/testeffect.py')
-rw-r--r-- | source/blender/python/api2_2x/doc/testeffect.py | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/doc/testeffect.py b/source/blender/python/api2_2x/doc/testeffect.py new file mode 100644 index 00000000000..5d9b65c36be --- /dev/null +++ b/source/blender/python/api2_2x/doc/testeffect.py @@ -0,0 +1,65 @@ +import Blender + +################## WARNING ######################## +# +# this script tests the Effect module, and its submodules : Wave, Build and Particle +# an object name "Plane" must be created, with three effects attached to it. +# the first effect must be a "Build" effect +# the second effect must be a "Wave" effect +# the third effect must be a "Particle" effect +# +######################################################## + + + +effect = Blender.Effect.New() +print effect + + + +build = Blender.Effect.Get('Plane',0) + + +for param in ['Type','Flag','Len','Sfra'] : + value = eval("build.get%s()"%param) + print param,value + value1 = eval("build.set%s(%s)"%(param,value)) + print value1 + +for param in ["sfra","len"]: + str = "build.%s"%param + value = eval(str) + print str,value + exec("build.%s = value"%param) + + + +wave = Blender.Effect.Get('Plane',1) +for param in ['Type','Flag','Startx','Starty','Height', 'Width', 'Narrow', 'Speed', 'Minfac', 'Damp', 'Timeoffs' ,'Lifetime'] : + value = eval("wave.get%s()"%param) + print param,value + value1 = eval("wave.set%s(%s)"%(param,value)) + print value1 + + +for param in ["lifetime","timeoffs","damp","minfac","speed","narrow","width","height","startx","starty"]: + str = "wave.%s"%param + value = eval(str) + print str,value + exec("wave.%s = value"%param) + + + + +particle = Blender.Effect.Get('Plane',2) +for param in ['Type','Flag','StartTime','EndTime','Lifetime','Normfac','Obfac','Randfac','Texfac','Randlife','Nabla','Totpart','Totkey','Seed','Force','Mult','Life','Child','Mat','Defvec'] : + value = eval("particle.get%s()"%param) + print param,value + value1 = eval("particle.set%s(%s)"%(param,value)) + print value1 + +for param in ['seed','nabla','sta','end','lifetime','normfac','obfac','randfac','texfac','randlife','vectsize','totpart','force','mult','life','child','mat','defvec']: + str = "particle.%s"%param + value = eval(str) + print str,value + exec("particle.%s = value"%param)
\ No newline at end of file |