Forum Moderators: Staff
Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)
I'll do some Google-Fu on how to compile Python scripts. (But I'll be back if I need help!)
If it fails, then it will enable me to wake up me old programming skills (hah! <-dont let the lowercase fool you. REALLY big laugh right there!)
Thank you for your responses folks.
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
Quote - If it works ...
I'd be more concerned about anything needing fixing up rather than compilation.
Quote - ... you could rtencode it ...
Wouldn't be necessary, as the source (and only the source, not the presets) is licensed under the MPL (see -> http://code.google.com/p/pw-shaderspider-2-source/), so any modifications/fixes can be distributed without any messing about with encoding (or even compiling).
Attached Link: http://docs.python.org/library/compileall.html
> Quote - I'll do some Google-Fu on how to compile Python scripts.This linked doc page should be all that's needed.
Ah, nruddock, thank you most kindly.
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
UPDATE:
ShaderSpider partially works. 6 of the 10 options work.
Copy to All, Copy to Matching, Smart Copy to Skin, Rename Node and the Main Menu buttons work.
The sixth option, Copy to Material Group does the same as in Poser 7SR3, at least the same message is generated "No material groups defined for this object. You can use the EDIT GROUPS wacro to create new material groups".
I was testing on the V4 Bodysuit.
What is interesting in both Poser 7 and PoserPro 2012 is while that above message is generated, there are material groups in that object, at lease UVMapper can see them. But I digress.
The Edit Materials, Save Partial Shader (FX6), Load Partial Shader (FX6), and Save Mat Pose buttons generate the following error messages in PoserPro2012:
EDIT_GROUPS ERROR GENERATED:
Traceback (most recent call last):
File "O:Program FilesSmith MicroPoser Pro 2012RuntimePythonPoseWorksShaderSpiderwacrosEdit_Groups.py", line 9, in
ss6Gui.askEditGroups()
File "RuntimePythonPoseWorksShaderSpiderDatass6Gui.py", line 25, in askEditGroups
editor = GroupEditor(actor)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 626, in init
self.actionPane.SetText(self.dlg)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 285, in SetText
button.SetText(dialog, button.widgetName)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 255, in SetText
self.msg.SetText(dialog, message)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 120, in SetText
dialog.SetText(name=self.widgetName, text=message)
TypeError: no such text field
SAVE_FX6 ERROR GENERATED:
Traceback (most recent call last):
File "O:Program FilesSmith MicroPoser Pro 2012RuntimePythonPoseWorksShaderSpiderwacrosSave_Fx6.py", line 12, in
inputs = ss6Gui.askSelectInputs()
File "RuntimePythonPoseWorksShaderSpiderDatass6Gui.py", line 14, in askSelectInputs
selector = SelectInput(inputs)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 420, in init
self.checkPane.SetText(self.dlg)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 332, in SetText
button.SetText(dialog, button.widgetName)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 269, in SetText
self.msg.SetText(dialog, message)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 120, in SetText
dialog.SetText(name=self.widgetName, text=message)
TypeError: no such text field
LOAD_FX6 ERROR GENERATED:
Traceback (most recent call last):
File "O:Program FilesSmith MicroPoser Pro 2012RuntimePythonPoseWorksShaderSpiderwacrosLoad_Fx6.py", line 14, in
names = ss6Gui.askMaterials(actor)
File "RuntimePythonPoseWorksShaderSpiderDatass6Gui.py", line 50, in askMaterials
selector = AskSelectMethod("Include...", methods=methods)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 857, in init
self.radioPane.SetText(self.dlg)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 285, in SetText
button.SetText(dialog, button.widgetName)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 255, in SetText
self.msg.SetText(dialog, message)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 120, in SetText
dialog.SetText(name=self.widgetName, text=message)
TypeError: no such text field
SAVE_MAT ERROR GENERATED:
Traceback (most recent call last):
File "O:Program FilesSmith MicroPoser Pro 2012RuntimePythonPoseWorksShaderSpiderwacrosSave_Mat.py", line 11, in
names = ss6Gui.askMaterials(actor)
File "RuntimePythonPoseWorksShaderSpiderDatass6Gui.py", line 50, in askMaterials
selector = AskSelectMethod("Include...", methods=methods)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 857, in init
self.radioPane.SetText(self.dlg)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 285, in SetText
button.SetText(dialog, button.widgetName)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 255, in SetText
self.msg.SetText(dialog, message)
File "RuntimePythonPoseWorksShaderSpiderDatass6Xml.py", line 120, in SetText
dialog.SetText(name=self.widgetName, text=message)
TypeError: no such text field
I notice that ss6Gui.py and ss6Xml.py are common to all 4 errors. These would generate additional dialog boxes for inputs and selections for those 4 selections.
How can I fix this?
Thanks again!
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
Thought I had a breakthrough....
I captured what I thought was the actual Python source code was actually the HTML of the pages containing the Python code.
So making sure I combed through the files and got the actual Python code.
Ok, time to test and....nada.
So I looked and checked the files
DOH! Some .XML files were also the HTML capture of the that code.
"Surely you've got it now!", I thought to myself.
I checked that all the .py code was Python and .xml code was .xml code.
Still no joy.
ShaderSpider does work with PoserPro 2010*.
I am going to test the version2 with PP2K10.
That is where I am at.
*(edit: I just broke something, found a module that does not exist. Still going to try version2 though)
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
Quote - > Quote - I captured what I thought was the actual Python source code was actually the HTML of the pages containing the Python code.
You'll make life a lot easier if you use an SVN client to get the code/data.
It's all good.
Alas, what I perceive the problem to be is the generating of the dialog boxes and contents there of for the Python used in PoserPro 2012.
Not an expert, just wanted to see what I can do, which is not much :(
Sorry to get hopes up high from my end folks!
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
I had grabbed the source a while back and posted it on the RDNA forum...
I've stripped out the svn data. Remove the .txt from the attachment to get the zip file.
----------------------------------------------------------------------------------------
The Wisdom of bagginsbill:
"Oh - the manual says that? I have never read the manual - this must be why."OK...patience is a viritue.
I managed to get a dialog box to show up and take inputs (checkmarks) thanks to a tidbit from another thread.
Copy (Just in case. This way you will have a backup.) the .XML files in the RuntimePythonPoseworksShaderSpiderTemp folder and paste them into Runtimeui folder.
Now running SS and selecting the SaveFX button will show you the options to check so save out a .fx6 wedge. It now chokes when clicking OK, but now we get something we didnt have before.
The LoadFX button apparently works (I have to manually point to the FX folder, but hey....) some of the options do not work and generate errors. I'll do a more orderly test, but some sub options work, some do not.
Just thought you all should know.
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD
space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)
This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.
ShaderSpider still works in PP2K10, but I'd like to use those scripts in PoserPro 2012.
I have access to ShaderSpider2 source code. I'd like to have it run for PoserPro 2012
What do I need to do?
The reason I ask is...the current version (compiled as it has files with .pyc extensions) generates a "Bad Magic Number" which I found out means there needs to be a recompiling of some scripts.
So I ask again, what do I need to do?
Your help will be greatly appreciated.
"Few are agreeable in conversation, because each thinks more of what he intends to say than that of what others are saying, and listens no more when he himself has a chance to speak." - Francois de la Rochefoucauld
Intel Core i7 920, 24GB RAM, GeForce GTX 1050 4GB video, 6TB HDD space
Poser 12: Inches (Poser(PC) user since 1 and the floppies/manual to prove it!)