A couple of "Which Poser version first supported XYZ" PoserPython type questions

3dcheapskate3dcheapskate Posts: 2,719
edited September 9 in Poser Discussion

While I wait for responses on the relevant Renderocity forums I thought I'd ask here too. I'm using Windows 10 with Poser 6, PP2014 and Poser 11. Some of these questions can probably be answered by comparing the PoserPython Manuals for Poser 7, 8,and 9 - none of which I have installed.

Question 1:  In Poser 6 it appears that the runPythonScript line that you can use in standard Poser files requires, at least in Windows, an absolute path in Windows format ( C:\Users\blahblahblah\Apythonscript.py ). In PP2014 a runtime relative path in Mac format ( :Runtime:Python:rhubarbrhubarb:Apythonscript.py ) works fine. Which Poser version first allowed runtime relative Mac format paths in the runPythonScript on Windows systems ?

Answer 1: The question misunderstood the real problem, which is now asked as question 3

 

Question 2:  I know that the parameter.AddValueOperation() and associated methods were introduced some time between Poser 6 and Poser 9, but I need to know when the keyed value operation ( valueOpKey in the CR2) was introduced.
Answer 2: valureOpKey is mentioned in the Poser 7 PoserPython manual, so it's Poser 7

 

Question 3: Which Poser version first allowed runPythonScript lines in Poser files to pick up PoserPython files with runtime relative paths from mapped runtimes (at Poser 6 it would only pick them up from the main Poser runtime) ?

 

Post edited by 3dcheapskate on

Comments

  • Are you sure? I don't have Poser 6 installed right now but I don't recall its requiring absolute paths for Python calls - it isn't that the relative path is offset from the external library link in the Windows install?

  • 3dcheapskate3dcheapskate Posts: 2,719
    edited September 3

    Richard Haseltine said:

    Are you sure? I don't have Poser 6 installed right now but I don't recall its requiring absolute paths for Python calls - it isn't that the relative path is offset from the external library link in the Windows install?

     I'm never sure of anything, so here's a bit more detail. The CR2 any PY file are in the same runtime under a subfolder on my desktop, and that runtime is mapped for Poser 6 - I added it to the Poser  6 libraries using the add runtime buttom from the library. I only actually tried three things 

    runPythonScript ":Runtime:Python:poserScripts:3DCheapskate:Books:MatClassics01.py"     ...works fine on my Windows thingy in Poser Pro 2014 and Poser 11, but not Poser 6

    runPythonScript "\Runtime\Python\poserScripts\3DCheapskate\Books\MatClassics01.py"     ...only tried in Poser 6 - didn't work

    runPythonScript "C:\Users\multiple\sub\folders\Runtime\Python\poserScripts\3DCheapskate\Books\MatClassics01.py"     ...only tried in Poser 6 - worked

    Hence my assumption, possibly incorrect, that Poser 6 needed an absolute path.

     

    (A muffled alarm bell is ringing in my head - some vague memory about Poser 6 requiring python scripts to be in the main Poser runtime, and not in a mapped runtime ?)

    Post edited by 3dcheapskate on
  • I can't really recall the details of Poser 6, sorry.

  • 3dcheapskate3dcheapskate Posts: 2,719

    No problem Richard, that muffled alarm bell was spot on. I moved my scripts from the mapped runtime I had them in to the Poser 6 main runtime ( C:/Program Files (x86)/e frontier/Poser 6\Runtime/Python/poserScripts/ ) and it all worked perfectly, Mac syntax paths and all. And I obviously knew this 12 years ago when I uploaded my first PoserPython script freebie as it's noted in the readme.

    So I can delete question 1 and add a new question 3 - which Poser version first allowed runPythonScript lines in Poser files to pick up PoserPythomn files with runtime relative paths from mapped runtimes (at Poser 6 it would only pick them up from the main Poser runtime ?

  • MartirillaMartirilla Posts: 178
    edited September 6

    Not sure if this helps, but according to a 2018 Forum post, answering the same question as 2)...

    "You did not need to ask what you asked. Python classes have a self-describing architecture and you can interrogate an object to see if it has a method by name..." (the poster then gives the following script)...

    a = s.CurrentActor()p = a.Parameter('xTran')hasattr(p, 'AddValueOperation')Truehasattr(p, 'ScoobieDoo')False

     

    Post edited by Martirilla on
  • MartirillaMartirilla Posts: 178

    Trying again, without the code-mangling "code" box... 

    a = s.CurrentActor()
    p = a.Parameter('xTran')
    hasattr(p, 'AddValueOperation')
    True
    hasattr(p, 'ScoobieDoo')
    False

  • 3dcheapskate3dcheapskate Posts: 2,719

    Thanks for the suggestion, but I'm afraid it doesn't help - I only have Poser 6, PP2014 and Poser 11, so no chance to check Poser 7, 8 or 9 in that way.

  • MartirillaMartirilla Posts: 178

    Oh well, perhaps someone reading has them installed and would be able to use the script for you.  In the meanwhile, The Internet Archive has the following publicly archived:

    * Official Poser 7 Reference Manual

    * Practical Poser 8: The Official Guide

    * Official Poser Pro 2012 manual with the Python methods PDF appended (was Poser 9 in its Standard version).

  • 3dcheapskate3dcheapskate Posts: 2,719

    I've just had confirmation from EnglishBob over at Renderosity that the Poser 7 PoserPython manual refers to valueOpKey, so that's question 2 sorted.

Sign In or Register to comment.