Fri, Nov 22, 12:23 AM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Nov 21 6:06 am)



Subject: Python - Possible to add trans values?


maclean ( ) posted Tue, 03 July 2007 at 11:28 AM · edited Thu, 21 November 2024 at 10:39 PM

hi all,

I'm building a room which uses a grid system to move things around. Someone wrote me a neat little posing script for daz studio, and I'm wondering if the same thing can be done in poser with a python script.

What the script does is add a value to the current trans value of an object. If an object is at zero and I apply the pose, it moves to Ztrans=170. If I apply it again, it moves to Ztrans=340, and so on. In other words, it adds the value in the pose to whatever the current Ztrans value is. The pose is, of course, editable, so I can make them for positive/negative values and X,Y or Z trans (rotation too).

So, can it be done in poser? If anyone can come up with this, I'm offering a free download of any of my products at DAZ. Since it's for a commercial product, (a new version of Room Creator), it's only fair.

At the worst, if I know it definitely can't be done, at least I'll be able to tell poser users that in the help file. In which case, I'll just put in a set of 28 poses for them.

TIA

mac


ockham ( ) posted Tue, 03 July 2007 at 12:06 PM

Not quite clear: Do you want the script to read a specified pose file
and apply the trans in the pose additively, or do you want the script to just add the
standard value without involving a pose file?

My python page
My ShareCG freebies


ockham ( ) posted Tue, 03 July 2007 at 12:30 PM

Attached Link: http://ockhamsbungalow.com/PPP/GridJump.zip

Try this for a start.  I put in an arbitrary value of 0.170 PU as the jump increment; if you want the jump to be always 170 feet or 170 inches or 170 cm, I can make it adapt to the currently used set of measurements.

(Presuming you don't want 170 meters or 170 miles!)

My python page
My ShareCG freebies


nruddock ( ) posted Tue, 03 July 2007 at 1:30 PM

You could add some dials which via ERC allow the user to enter the grid coordinates (as integers).
AFAIK, this would work in D|S as well.


maclean ( ) posted Tue, 03 July 2007 at 5:51 PM

Quote - Not quite clear: Do you want the script to read a specified pose file
and apply the trans in the pose additively, or do you want the script to just add the
standard value without involving a pose file?

I guess the script should be in any which the user can apply, and which I can edit.

Quote - Try this for a start.  I put in an arbitrary value of 0.170 PU as the jump increment;
if you want the jump to be always 170 feet or 170 inches or 170 cm, I can make
it adapt to the currently used set of measurements.

Wow, ockham!! That was quick! Thanks a lot! I really appreciate it.

I'll try it out tonight and get back to you.

Looking at in in plain text, is 'JumpSize=.170 # In feet' the line to edit? I need 170cm, which is 0.6971683 PNU

Anyway, I'll look and see what happens.

cheers

mac


maclean ( ) posted Tue, 03 July 2007 at 6:09 PM · edited Tue, 03 July 2007 at 6:10 PM

Heh, that's totally brilliant, ockham!! I didn't expect a little back/fwd/left/right dialog!! Really cool.

Ok, I changed

'JumpSize=.170 # In feet'

to

'JumpSize=.6971683 # in PNU'

and it seems to be absolutely spot-on.

I don't have the new room in P6 yet. So far, I've only done the DS version, but the movements look perfect with another room I tried.

Take a look at my stuff here and let me know if there's anything you'd like. 

http://www.daz3d.com/shop.php?op=artistlist&artist=9642

Take whatever you like. You certainly deserve it. Just PM me and I'll get you a download link.

Thanks again! You're The Man!

mac

Edit - BTW, what's the button in the center for? Should that zero the object? It doesn't seem to do anything.


ockham ( ) posted Tue, 03 July 2007 at 8:18 PM

Glad you like it.  

The button in the middle is a dummy at the moment,
just a place holder to make the "remote control" pattern look right.   
Should it center the object?  Or should it return to the original position
whether centered or not?

I'll PM you with my choice of goodies.

My python page
My ShareCG freebies


Angelouscuitry ( ) posted Tue, 03 July 2007 at 8:47 PM · edited Tue, 03 July 2007 at 8:48 PM

May I see pictures of what it did?


maclean ( ) posted Wed, 04 July 2007 at 4:08 AM

It's not easy to show what it did, but if you think of a chessboard, you'll get the idea. By setting the amount of the 'jump' in the script, you can make the object go backward, forward, left or right by that amount. Just like moving a chess piece on a board.

In fact, if anyone has made a poser chess set, this script would be ideal for it.

mac


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.