grichter opened this issue on Aug 31, 2007 ยท 3 posts
PhilC posted Fri, 31 August 2007 at 10:07 AM
runPythonScript is a command used within a Poser file such as a CR2, PZ2, MZ5 etc. It is not a Python method.
You can place scripts outside of the local runtime but you will need to include a file within RuntimePythonLibsite-packages to enable it to be recognised. See the README file within that folder for details. Although I have used this feature and found it to work I'm of the opinion that you need to have an outstandingly good reason to make it worth the trouble.
To get Poser to recognise scripts within the local runtime use:-
####################################
import os
import sys
import poser
pathname = os.path.split(poser.AppLocation())[0]
scriptPath = os.path.join(pathname, 'Runtime', 'Your Folder', 'Your sub folder')
sys.path.append(scriptPath)
####################################
Hope that helps.