Forum: Poser Python Scripting


Subject: Additive prop poses in python?

maclean opened this issue on Aug 05, 2011 · 10 posts


maclean posted Fri, 05 August 2011 at 3:21 PM

Thanks for replying everyone. I now have this.

 


import poser
scene = poser.Scene()
JumpSize=0.6971784 # in PU

actor= poser.Scene().CurrentActor()
param=actor.ParameterByCode(poser.kParmCodeXTRAN)
param.SetValue(param.Value+JumpSize)
param=actor.ParameterByCode(poser.kParmCodeYTRAN)
param.SetValue(param.Value+JumpSize)
param=actor.ParameterByCode(poser.kParmCodeZTRAN)
param.SetValue(param.Value+JumpSize)
poser.Scene().DrawAll()


 

Which gives me this error message.

 

Traceback (most recent call last):
  File "", line 7, in ?
TypeError: unsupported operand types for +: 'builtin_function_or_method' and 'float

 

Line 7 is 'param.SetValue(param.Value+JumpSize) '

 

Have I got this right or not?

 

mac