Forum: Poser Python Scripting


Subject: Did something change in PoserPro 2010?

maclean opened this issue on Sep 18, 2011 · 4 posts


maclean posted Sun, 18 September 2011 at 4:51 AM

Hi all,

 

I released a product 10 days ago at DAZ which uses Readscript in a .pz2 to call a python script. The script poses objects by a set distance, moving them the same amount each time its applied.

I got a mail from a customer saying it doesn't work in PoserPro 2010. The poses appear to load, but nothing happens. He says that running the python scripts does work, so I'm not sure what's going on.

Here's a .pz2 and python sample


{
    version
    {
        number 6
    }
}
{
    version
    {
        number 6
        runPythonScript ":Runtime:Python:poserScripts:Corridors:move600Zpos.py"
    }
}


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

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

 ------------------

Does anyone have a clue why this wouldn't work in PP2010? If he can run the python scripts on their own, I'm assuming the problem is elsewhere, but maybe that's a bad assumption?

 

TIA

 

mac


PhilC posted Sun, 18 September 2011 at 5:28 AM

Ask the user where they have installed move600Zpos.py to. It needs to be in the library contained in the application folders. It can not be in a remote runtime.


maclean posted Sun, 18 September 2011 at 5:56 AM

Thanks, Phil. I never thought on that. I've mailed him to ask.

Appreciate it.

mac


maclean posted Fri, 23 September 2011 at 2:42 PM

Phil, Just to let you know. That was exactly the problem - external Runtime. Thanks! mac