Mon, Jul 8, 10:59 AM CDT

Renderosity Forums / Poser 11 / Poser Pro 11 OFFICIAL Technical



Welcome to the Poser 11 / Poser Pro 11 OFFICIAL Technical Forum

Forum Moderators: nerd

Poser 11 / Poser Pro 11 OFFICIAL Technical F.A.Q (Last Updated: 2024 Jul 06 8:32 am)

banner

Welcome to the Poser Forums! Need help with these versions, advice on upgrading? Etc...you've arrived at the right place!


Looking for Poser Tutorials? Find those HERE



Subject: Python Scripts


rokket ( ) posted Fri, 30 December 2022 at 10:26 AM · edited Sun, 07 July 2024 at 3:36 PM

Is there a way to add scripts to the menu permanently? It's a pain to constantly have to load scripts that I use all the time, like EZSkin3, and such. I want to add them to the script menu and keep them there.

Thanks!

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


feecozen ( ) posted Fri, 30 December 2022 at 11:26 AM

(NOTE: I use a Mac, so the process may or may not be the same on Windows.)

Open the Poser 11 APPLICATION's folder. In its Runtime folder, locate the Python folder. In the Python folder, locate the poserScripts folder, and within that, the ScriptsMenu folder. Drag the script file you want to add into the ScriptsMenu folder (e.g., for EZSkin3, that would be the EZSkin3.pyc file). Quit and relaunch Poser, and the new script should be available in Poser's Scripts menu. Click to run it.

BTW, when I add a new script, I copy the entire Python folder to another location on my drive, since reinstalling Poser could overwrite the application's Runtime, and thus the Python folder within it, with a fresh version that wouldn't contain the scripts I've added. The copy can then be dragged into Poser's Runtime and my added scripts will be included again. Also, be aware that Poser 11 uses Python 2, but Poser 12 replaced that with Python 3, so Poser 11 scripts that haven't been upgraded won't work in Poser 12 (a main reason I'm sticking with Poser 11).

Hope this helps.



hborre ( ) posted Fri, 30 December 2022 at 11:39 AM
Online Now!
feecozen posted at 11:26 AM Fri, 30 December 2022 - #4452749

BTW, when I add a new script, I copy the entire Python folder to another location on my drive, since reinstalling Poser could overwrite the application's Runtime, and thus the Python folder within it, with a fresh version that wouldn't contain the scripts I've added. The copy can then be dragged into Poser's Runtime and my added scripts will be included again. Also, be aware that Poser 11 uses Python 2, but Poser 12 replaced that with Python 3, so Poser 11 scripts that haven't been upgraded won't work in Poser 12 (a main reason I'm sticking with Poser 11).

Hope this helps.

That is not true in Windows.  A Poser reinstall over an existing installation will only replace those files associated with the application.  Anything else manually installed, such as 3rd party Python Scripts, are relatively safe.



Boni ( ) posted Fri, 30 December 2022 at 12:27 PM

You can add folders to the scripts menu folder for favorite creators like snarly.  

Boni



"Be Hero to Yourself" -- Peter Tork


nerd ( ) posted Fri, 30 December 2022 at 12:43 PM
Forum Moderator

The Poser installer does not remove files you've added to the Poser program folder or any content beyond the basic content that is installed with Poser. But, a re-installation will over write the python buttons scripts with the original ones. If you manually add some buttons to the python buttons by editing that file, write protect the file. The next time you update Poser it will ask if you want to skip the file. And, you do. There are a couple of bits of standard content that I keep modified this way as well.


rokket ( ) posted Fri, 30 December 2022 at 12:47 PM
feecozen posted at 11:26 AM Fri, 30 December 2022 - #4452749

(NOTE: I use a Mac, so the process may or may not be the same on Windows.)

Open the Poser 11 APPLICATION's folder. In its Runtime folder, locate the Python folder. In the Python folder, locate the poserScripts folder, and within that, the ScriptsMenu folder. Drag the script file you want to add into the ScriptsMenu folder (e.g., for EZSkin3, that would be the EZSkin3.pyc file). Quit and relaunch Poser, and the new script should be available in Poser's Scripts menu. Click to run it.

BTW, when I add a new script, I copy the entire Python folder to another location on my drive, since reinstalling Poser could overwrite the application's Runtime, and thus the Python folder within it, with a fresh version that wouldn't contain the scripts I've added. The copy can then be dragged into Poser's Runtime and my added scripts will be included again. Also, be aware that Poser 11 uses Python 2, but Poser 12 replaced that with Python 3, so Poser 11 scripts that haven't been upgraded won't work in Poser 12 (a main reason I'm sticking with Poser 11).

Hope this helps.


No such luck. It's not showing...

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


rokket ( ) posted Fri, 30 December 2022 at 12:49 PM

So what's the difference between a .py file and a .pyc?

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


hborre ( ) posted Fri, 30 December 2022 at 2:15 PM
Online Now!

PYC is compiled.


hborre ( ) posted Fri, 30 December 2022 at 2:23 PM
Online Now!

Runtime>Python>poserScripts>ScriptsMenu is Correct.  As Boni commented, you can create a separate folder to contain a specific script.  You must be in the Application Runtime folder, not the Poser Content.  And it would be best if you relaunched Poser for the script to appear in the contextual menu.


rokket ( ) posted Fri, 30 December 2022 at 10:44 PM

I copied the PYC file into the folder as you stated. I then started Poser, and it wasn't there.

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


rokket ( ) posted Fri, 30 December 2022 at 10:44 PM

I will attempt it with a folder. Maybe that will help

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


feecozen ( ) posted Sat, 31 December 2022 at 1:33 PM

@hborre and nerd: Thanks! You're probably right that a reinstall would not overwrite my manually installed scripts, even on Mac. I just back up the Python folder when I add scripts because I'm overcautious. And yes, I did edit the Python pallet buttons to add my own. I figure it's just easiest to drag the backed up copy of the whole Python folder into the application runtime if anything goes wrong.


rokket ( ) posted Sun, 01 January 2023 at 10:09 AM · edited Sun, 01 January 2023 at 10:09 AM

Happy New Year!

So here are the screen captures. Let me know if I did something wrong:

vx9i6Unydk3zqjQppYBAJ9sRnxxlg76Xb3k5EZJO.png

zeQtraPFdekNrj9iaxO0QdSd1umnAYQpZxv8Obfi.png

I added the PYC to the folder as directed. I restarted Poser, and it's not showing. And whatever was in the top button isn't there any longer.

Help!

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


DCArt ( ) posted Sun, 01 January 2023 at 10:47 AM

The initial post gave the impression that you wanted it to appear in the Scripts menu. Does it appear there?

The Scripts menu is in the menu bar at the top. It appears you want it to appear in the Python Scripts Palette. I will have to hunt down how to do that, as I am not a python guru. Maybe someone else can pipe in to help.



DCArt ( ) posted Sun, 01 January 2023 at 10:55 AM · edited Sun, 01 January 2023 at 10:55 AM

Yes in comparing the two in Poser 12, it does appear they are independent of each other. The items that I show in the Python Scripts palette do not match up with those in the Scripts menu. Will dig into this some more

2qKhLULzE7KqmlGor0G9RTfFpNWCdyRP7BlKRCBW.png




DCArt ( ) posted Sun, 01 January 2023 at 10:58 AM

It looks like the Python Scripts palette has a little blurb on the bottom to click an empty button (the one with the dots on it) and to choose the script you want to fill in there. But then there are also custom palettes, such as the one that used to be furnished with Wardrobe Wizard, that have an entire palette all to itself. That's the part I am not sure how to do.



HartyBart ( ) posted Sun, 01 January 2023 at 11:43 AM · edited Sun, 01 January 2023 at 11:43 AM

If you need an alternative option, the paid "XA - Toolbar for Poser" is still available at Renderosity. Works fine in Poser 11, though like many script utilities it may need the AVfix hot-fix. XA Toolbar can launch along with Poser 11. You can pin scripts to its buttons, among other things. And give each button a custom icon. Then you launch the script with one click on the button.

T1KaPTMcBtVSeh0eGyy0hmB3wdeMzUT7XA02OzPG.jpg



Learn the Secrets of Poser 11 and Line-art Filters.


RedPhantom ( ) posted Sun, 01 January 2023 at 12:33 PM · edited Sun, 01 January 2023 at 12:36 PM
Site Admin Online Now!

To add more pallets, you need to edit the mainButtons.py file in a text editor (don't use Word). Lines 8 and 9 load 2 new pallets called custombuttons.py and custom2.py respectively. Those pallets are set up in the same format. I think I just made copies of the mainbuttons.py and edited them. You can find the mainbuttons.py in Runtime\Python\poserScripts under the folder where Poser is installed (as opposed to your content runtime).

import poser

poser.DefineScriptButton(1,  ":Runtime:Python:poserScripts:PythonPalette:geomModButtons.py", "Geom Mods")
poser.DefineScriptButton(2,  ":Runtime:Python:poserScripts:PythonPalette:utilityButtons.py", "Utility Funcs")
poser.DefineScriptButton(3,  ":Runtime:Python:poserScripts:PythonPalette:callbackButtons.py", "Sample Callbacks")
poser.DefineScriptButton(4,  ":Runtime:Python:poserScripts:PythonPalette:renderButtons.py", "Render / IO")
poser.DefineScriptButton(5,  ":Runtime:Python:poserScripts:PythonPalette:materialModButtons.py", "Material Mods")
poser.DefineScriptButton(6,  ":Runtime:Python:poserScripts:PythonPalette:printInfoButtons.py", "Print Info")
poser.DefineScriptButton(7,  ":Runtime:Python:poserScripts:PythonPalette:propButtons.py", "Prop Samples")
poser.DefineScriptButton(8,  ":Runtime:Python:poserScripts:custombuttons.py", "Custom")
poser.DefineScriptButton(9,  ":Runtime:Python:poserScripts:custom2.py", "More")
poser.DefineScriptButton(10, ":Runtime:Python:PoserScripts:clearButtons.py", "Clear Buttons")


Available on Amazon for the Kindle E-Reader Monster of the North and The Shimmering Mage

Today I break my own personal record for the number of days for being alive.
Check out my store here or my free stuff here
I use Poser 13 and win 10


rokket ( ) posted Sun, 01 January 2023 at 12:42 PM

Well, then. Looks like I have some work to do.

Thanks all for the replies. I am going to check this out. On a copy of the script. I don't want to botch things up.

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


rokket ( ) posted Sun, 01 January 2023 at 12:48 PM
RedPhantom posted at 12:33 PM Sun, 1 January 2023 - #4452855

To add more pallets, you need to edit the mainButtons.py file in a text editor (don't use Word). Lines 8 and 9 load 2 new pallets called custombuttons.py and custom2.py respectively. Those pallets are set up in the same format. I think I just made copies of the mainbuttons.py and edited them. You can find the mainbuttons.py in Runtime\Python\poserScripts under the folder where Poser is installed (as opposed to your content runtime).

import poser

poser.DefineScriptButton(1,  ":Runtime:Python:poserScripts:PythonPalette:geomModButtons.py", "Geom Mods")
poser.DefineScriptButton(2,  ":Runtime:Python:poserScripts:PythonPalette:utilityButtons.py", "Utility Funcs")
poser.DefineScriptButton(3,  ":Runtime:Python:poserScripts:PythonPalette:callbackButtons.py", "Sample Callbacks")
poser.DefineScriptButton(4,  ":Runtime:Python:poserScripts:PythonPalette:renderButtons.py", "Render / IO")
poser.DefineScriptButton(5,  ":Runtime:Python:poserScripts:PythonPalette:materialModButtons.py", "Material Mods")
poser.DefineScriptButton(6,  ":Runtime:Python:poserScripts:PythonPalette:printInfoButtons.py", "Print Info")
poser.DefineScriptButton(7,  ":Runtime:Python:poserScripts:PythonPalette:propButtons.py", "Prop Samples")
poser.DefineScriptButton(8,  ":Runtime:Python:poserScripts:custombuttons.py", "Custom")
poser.DefineScriptButton(9,  ":Runtime:Python:poserScripts:custom2.py", "More")
poser.DefineScriptButton(10, ":Runtime:Python:PoserScripts:clearButtons.py", "Clear Buttons")

So if I add the buttons to include the EZSkin3 PYC, do I need it to be in the scripts menu folder, or just in the poserScripts folder?

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


DCArt ( ) posted Sun, 01 January 2023 at 1:32 PM

I was hoping a python guru would come to the rescue. Thanks RedPhantom!



RedPhantom ( ) posted Sun, 01 January 2023 at 3:11 PM
Site Admin Online Now!
rokket posted at 12:48 PM Sun, 1 January 2023 - #4452858
RedPhantom posted at 12:33 PM Sun, 1 January 2023 - #4452855

To add more pallets, you need to edit the mainButtons.py file in a text editor (don't use Word). Lines 8 and 9 load 2 new pallets called custombuttons.py and custom2.py respectively. Those pallets are set up in the same format. I think I just made copies of the mainbuttons.py and edited them. You can find the mainbuttons.py in Runtime\Python\poserScripts under the folder where Poser is installed (as opposed to your content runtime).

import poser

poser.DefineScriptButton(1,  ":Runtime:Python:poserScripts:PythonPalette:geomModButtons.py", "Geom Mods")
poser.DefineScriptButton(2,  ":Runtime:Python:poserScripts:PythonPalette:utilityButtons.py", "Utility Funcs")
poser.DefineScriptButton(3,  ":Runtime:Python:poserScripts:PythonPalette:callbackButtons.py", "Sample Callbacks")
poser.DefineScriptButton(4,  ":Runtime:Python:poserScripts:PythonPalette:renderButtons.py", "Render / IO")
poser.DefineScriptButton(5,  ":Runtime:Python:poserScripts:PythonPalette:materialModButtons.py", "Material Mods")
poser.DefineScriptButton(6,  ":Runtime:Python:poserScripts:PythonPalette:printInfoButtons.py", "Print Info")
poser.DefineScriptButton(7,  ":Runtime:Python:poserScripts:PythonPalette:propButtons.py", "Prop Samples")
poser.DefineScriptButton(8,  ":Runtime:Python:poserScripts:custombuttons.py", "Custom")
poser.DefineScriptButton(9,  ":Runtime:Python:poserScripts:custom2.py", "More")
poser.DefineScriptButton(10, ":Runtime:Python:PoserScripts:clearButtons.py", "Clear Buttons")

So if I add the buttons to include the EZSkin3 PYC, do I need it to be in the scripts menu folder, or just in the poserScripts folder?
You shouldn't need to move it. Just make sure the path is correct.


Available on Amazon for the Kindle E-Reader Monster of the North and The Shimmering Mage

Today I break my own personal record for the number of days for being alive.
Check out my store here or my free stuff here
I use Poser 13 and win 10


RedPhantom ( ) posted Sun, 01 January 2023 at 3:13 PM
Site Admin Online Now!
DCArt posted at 1:32 PM Sun, 1 January 2023 - #4452859

I was hoping a python guru would come to the rescue. Thanks RedPhantom!

Python guru? Ha! I don't even know enough about python to be dangerous. I've just been hanging around long enough to know how to customize things.


Available on Amazon for the Kindle E-Reader Monster of the North and The Shimmering Mage

Today I break my own personal record for the number of days for being alive.
Check out my store here or my free stuff here
I use Poser 13 and win 10


DCArt ( ) posted Sun, 01 January 2023 at 3:46 PM

HAHAHA well you are better off than I am. At my age (don't ask) I look at anything that resembles any kind of code and my eyes glaze over. LOL



hborre ( ) posted Sun, 01 January 2023 at 4:09 PM
Online Now!

BTW, in P12 Bastep has a Scriptstarter Python Script that conveniently competes with Poser's native panel.  It might be a good replacement If you want to update to that feature.


rokket ( ) posted Sun, 01 January 2023 at 8:03 PM
RedPhantom posted at 3:11 PM Sun, 1 January 2023 - #4452862
rokket posted at 12:48 PM Sun, 1 January 2023 - #4452858
RedPhantom posted at 12:33 PM Sun, 1 January 2023 - #4452855

To add more pallets, you need to edit the mainButtons.py file in a text editor (don't use Word). Lines 8 and 9 load 2 new pallets called custombuttons.py and custom2.py respectively. Those pallets are set up in the same format. I think I just made copies of the mainbuttons.py and edited them. You can find the mainbuttons.py in Runtime\Python\poserScripts under the folder where Poser is installed (as opposed to your content runtime).

import poser

poser.DefineScriptButton(1,  ":Runtime:Python:poserScripts:PythonPalette:geomModButtons.py", "Geom Mods")
poser.DefineScriptButton(2,  ":Runtime:Python:poserScripts:PythonPalette:utilityButtons.py", "Utility Funcs")
poser.DefineScriptButton(3,  ":Runtime:Python:poserScripts:PythonPalette:callbackButtons.py", "Sample Callbacks")
poser.DefineScriptButton(4,  ":Runtime:Python:poserScripts:PythonPalette:renderButtons.py", "Render / IO")
poser.DefineScriptButton(5,  ":Runtime:Python:poserScripts:PythonPalette:materialModButtons.py", "Material Mods")
poser.DefineScriptButton(6,  ":Runtime:Python:poserScripts:PythonPalette:printInfoButtons.py", "Print Info")
poser.DefineScriptButton(7,  ":Runtime:Python:poserScripts:PythonPalette:propButtons.py", "Prop Samples")
poser.DefineScriptButton(8,  ":Runtime:Python:poserScripts:custombuttons.py", "Custom")
poser.DefineScriptButton(9,  ":Runtime:Python:poserScripts:custom2.py", "More")
poser.DefineScriptButton(10, ":Runtime:Python:PoserScripts:clearButtons.py", "Clear Buttons")

So if I add the buttons to include the EZSkin3 PYC, do I need it to be in the scripts menu folder, or just in the poserScripts folder?
You shouldn't need to move it. Just make sure the path is correct.
Ok, thanks. I am going to make that edit right now...

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


rokket ( ) posted Mon, 02 January 2023 at 10:53 AM

Content Advisory! This message contains nudity

OrueIL6CU9IKzLjlGyGYEAOVEB7o1CytxiyOPgAt.png

That worked, thank you so much RedPhantom!

I am going to add the ezdome in there now, too. I don't use the construct, but I want to be able to add the dome from time to time.

LaFemme is a little shy...

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


rokket ( ) posted Mon, 02 January 2023 at 11:09 AM · edited Mon, 02 January 2023 at 11:09 AM

Now I am happy. I got what I wanted. Thanks again for all the help. This forum is invaluable.

4oY8qDM21HfFWlNfyfXuNOmdSH7xkkUquZh8YWuG.png

If I had a nickle for ever time a woman told me to get lost, I could buy Manhattan.


Privacy Notice

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.