Fri, Nov 22, 11:10 AM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Sep 18 2:50 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: PinID, PinRight, PinLeft, ... How does it work exactly ?


semidieu ( ) posted Tue, 02 January 2007 at 4:48 PM · edited Fri, 22 November 2024 at 11:05 AM

When creating an xml file (or editing existing one), you have those tags:

pinID="2"  pinTop="3"  pinLeft="1"  pinBottom="3"  pinRight="1"

Can someone explain me exactly what does those numbers ? I tried to edit the faceroom.xml file to create a greater preview (200 pixels wider and higher), but I can't move the two buttons: "Random Face" and "Reset Face".
I edited the top, bottom, right, left and also the rect.top, rect.bottom, rect.right, rect.left values. I could ungroup those two buttons and move them individually, but I would like to keep the "group" assembled.

I guess the problem comes from the PinID, pinTop, ... values. But each time I change one of those values, the buttons simply disappears...


semidieu ( ) posted Tue, 02 January 2007 at 4:50 PM · edited Tue, 02 January 2007 at 4:51 PM

file_364372.jpg

Screenshot here...

I was able to move one button (but only 20 pixels down) but I strictly don't know how... I made some changes, loaded Poser and nothing was changed. Next day, once I loaded Poser, the button wasn't at the same place.


nruddock ( ) posted Tue, 02 January 2007 at 5:28 PM

Attached Link: http://www.poseworks.com/serendipity/index.php?/categories/4-PzrXml

The documentation for posework's "pzrXml 2.0" library is the only explaination of the various attributes that I know of.


semidieu ( ) posted Tue, 02 January 2007 at 5:45 PM

I already read it... but it doesn't really help. Will ask Dan...


nruddock ( ) posted Tue, 02 January 2007 at 6:31 PM

Maybe try moving "faceButtonGroup" instead of, or as well as, the individual buttons.


semidieu ( ) posted Wed, 03 January 2007 at 8:09 AM

The "faceButtonGroup" is not the good one :-(

But I found the solution... It's not really elegant... but it's working. I will try to look for a better solution and post the "hack"


Naylin ( ) posted Thu, 15 February 2007 at 3:00 AM · edited Thu, 15 February 2007 at 3:14 AM

file_369044.gif

Ok, I'll try to explain as best as I can from how I've gotten it figured out and hopefully you'll understand... First I will tell ya that I don't know what pinID is... the others work like this:

Pinning 1 & 2 deal with Left and Right
Pinning 3 & 4 with Top and Bottom
Pinning 5 is Center

In the image above (imagine that it's more perfect) there's a simple 4x4 grid.

For Text 1 (Left and Right pin)
if pinLeft="1" and pinRight="1" then the left side is at 0 and the right is at 1 (The left side starts at 0 like the normal coordinate system)
if pinLeft="1" and pinRight="2" then the left side is at 0 and the right is at -3 ( the right side starts at 0 backwards of the norm)
if pinLeft="2" and pinRight="1" then the left side is at -4 and the right is at 1
if pinLeft="2" and pinRight="2" then the left side is at -4 and the right is at -3

Is this making sense?

For Text 1 (Top and Bottom pin)
if pinTop="3" and pinBottom="3" then the Top side is at 0 and the Bottom is at 1 (again the coodinate system is normal, the top is 0)
if pinTop="3" and pinBottom="4" then the Top side is at 0 and the Bottom is at -3 (and again, backwards, the bottom is 0)
if pinTop="4" and pinBottom="3" then the Top side is at -4 and the Bottom is at 1
if pinTop="4" and pinBottom="4" then the Top side is at -4 and the Bottom is at -3

and then there's pin 5... The coordinate system starts in the dead center instead of any edge.

if all pins are set to 5 then (Still talking about text 1) Top = -2, Bottom = -1, Left = -2 Right = -1

Got it?

ok then... I'll make a little grid to show the rest of the text boxes then. On second thought, no I won't... that'd just take up too much space... If anyone doesn't understand, I'll use the others for examples as questions arise.

Oh, yeah, I forgot, you can use other combinations too... for example:
Box 5: pinLeft ="1"  pinRight="2" pinTop ="3" pinBottom ="4"
then:
Left is 1, Right is -1, Top is 1, and Bottom is -1

Hope I could help,

--Naylin

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    My Store   My Gallery
____
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"You have the right to remain silent. Anything you say can and will be misquoted and then used against you."


Naylin ( ) posted Thu, 15 February 2007 at 3:19 AM · edited Thu, 15 February 2007 at 3:23 AM

I wanted to add, that if pinned like the last example, the entire grid would be:
Left=0, Right=0, Top=0, Bottom=0

And if all pins are set to 1 then the entire grid is:
Left=0, Right=4, Top=0, Bottom=4

Oh, and the only real reason to use any other pinning other than all 1's is if your dialog is going to be resizeable, that way you can basically define what side things are stuck to when resizing. Of course, using pinning 5 for left and right is handy too to make sure that something is centered if you use the tag: staticWidth="1"

--Naylin

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
    My Store   My Gallery
____
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
"You have the right to remain silent. Anything you say can and will be misquoted and then used against you."


semidieu ( ) posted Thu, 15 February 2007 at 5:44 AM

Thanks for the info. I didn't knew for the "pinning 5".


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.