Sun, Feb 16, 2:20 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2025 Feb 05 6:41 am)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: here's my first script want to check it out? morph expander


dorkmcgork ( ) posted Sun, 04 November 2012 at 9:37 PM · edited Sun, 19 January 2025 at 5:24 AM

what i'm doing here is opening up more room in the cr2 instead of just the 50 (100 if you count daz's) morph injections spots. 

do first i inject a file i am calling deletethis onto # 50.  it looks like this:

{
version
    {
    number 4.01
    }
actor chest:1
    {
    channels
    {
        targetGeom PBMCC_50
            {
            name DeleteThis
            initValue 0
            hidden 0
            forceLimits 1
            min -100000
            max 100000
            trackingScale 0.02
            keys
                {
                static 0
                k 0  1
                }
            interpStyleLocked 0
            indexes 1
            numbDeltas 3914
            deltas
                {
                d 166 0.1 0.1 0.1
                }
            blendType 0
            }
    }
    }
}

=======================================================

then i have these 2 other files on hand:  the seek file:

=====================================================

            name DeleteThis
            initValue 0
            hidden 0
            forceLimits 1
            min -100000
            max 100000
            trackingScale 0.02
            keys
                {
                static 0
                k 0  1
                }
            interpStyleLocked 0
            indexes 1
            numbDeltas 3914
            deltas
                {
                d 166 0.1 0.1 0.1
                }
            blendType 0
            }

 

and the replace file:

=========================================================

            name -
            initValue 0
            hidden 1
            forceLimits 1
            min -10000
            max 10000
            trackingScale 0.004
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0
            indexes 0
            numbDeltas 0
            deltas
                {
                }
            blendType 0
            }
        targetGeom PBMCC_51
            {
            name -
            initValue 0
            hidden 1
            forceLimits 1
            min -10000
            max 10000
            trackingScale 0.004
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0
            indexes 0
            numbDeltas 0
            deltas
                {
                }
            blendType 0
            }
        targetGeom PBMCC_52
            {
            name -
            initValue 0
            hidden 1
            forceLimits 1
            min -10000
            max 10000
            trackingScale 0.004
            keys
                {
                static  0
                k  0  0
                }
            interpStyleLocked 0
            indexes 0
            numbDeltas 0
            deltas
                {
                }
            blendType 0
            }

=======================================================

which goes on for as long as i want.  then i use this python script :

===========================================================

import Tkinter,tkFileDialog

root = Tkinter.Tk()
data1 = ""
data2 = ""
data3 = ""
file1 = tkFileDialog.askopenfile(parent=root,mode='rb',title='find character')
if file1 != None:
    data1 = file1.read()
    file1.close()

file2 = tkFileDialog.askopenfile(parent=root,mode='rb',title='find deletetext')
if file2 != None:
    data2 = file2.read()
    file2.close()

file3 = tkFileDialog.askopenfile(parent=root,mode='rb', title='find replacementtext')
if file2 !=None:
    data3 = file3.read()
    file3.close()

file4 = tkFileDialog.asksaveasfile(parent=root,mode='w', title='save this file as')

data4 = data1.replace(data2, data3)
file4.write(data4)

root.mainloop()

==========================================================

and now i have extended the pbmccs as far as i want, so we can inject anthing anywhere.  what do you guys think?

go that way really fast.
if something gets in your way
turn


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.