Tue, Dec 24, 8:49 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 23 7:38 pm)



Subject: scaling the poser universe....


amacord ( ) posted Fri, 29 December 2006 at 12:32 AM · edited Tue, 24 December 2024 at 8:47 PM

hi! is there a way (utility, script) to scale all stuff in a poser-scene, including lights, cameras etc, together and simultaneoulsy? tia A.


pjz99 ( ) posted Fri, 29 December 2006 at 12:52 AM

I have a script (at home) that will do Task X to all items in a scene, making it scale or whatever would be trivial.  The loop is like 10 lines and is reasonably bulletproof.

My Freebies


lesbentley ( ) posted Sat, 30 December 2006 at 5:13 PM

Sounds like a handy script. Any chance you will post it?


pjz99 ( ) posted Sat, 30 December 2006 at 7:30 PM

file_364094.jpg

You know what, I never actually ran it myself (distracted) and now I can't for the rest of the night.  Amacord did it work?

Script attached, download/save and rename it to something like "ScaleAll.py"

My Freebies


amacord ( ) posted Sat, 30 December 2006 at 11:00 PM · edited Sat, 30 December 2006 at 11:01 PM

i hate to say it, pjz, but that's a negative... i hate it even more to say that it's most likely me who's done sth wrong. i'm 100% noob in matters of py-scripts. this is the result: File "", line 13 if scaleAmt > 0.0: ^ SyntaxError: invalid syntax i named it UniScale.py, but i think that is of no importance, right? tried it on a scene with 1 v3, 1 conforming dress and 1 propped hair..... WIIIILMAAAAAA!


pjz99 ( ) posted Sun, 31 December 2006 at 12:13 AM

nah that's not your fault, it's a goof in my script (foolishly I trusted that I understood basic syntax)
I'll look at it and get back to you.

My Freebies


pjz99 ( ) posted Sun, 31 December 2006 at 12:14 AM · edited Sun, 31 December 2006 at 12:16 AM

file_364117.jpg

stupidity... this line needs a closing parenthesis

scaleAmt = poser.DialogSimple.AskFloat("Enter the value you'd like to Scale to:" **)
**attached

My Freebies


amacord ( ) posted Sun, 31 December 2006 at 12:32 AM

sorry to bother you with my helplessness... File "", line 23 poser.DialogSimple.MessageBox("Well, that didn't work.") ^ SyntaxError: invalid syntax does a shy smile


pjz99 ( ) posted Sun, 31 December 2006 at 12:56 AM · edited Sun, 31 December 2006 at 1:04 AM

Ugh.  Does anything get scaled?  At all?

edit: I can't pick out the error and I don't have the poserPython manual with me.  It's probably the line:

eachActor.SetParameter(poser.kParmCodeASCALE, scaleAmt)

however I can't check it or fix it.  After work I'll take a look at it again, sorry, I ought to have tested this before I gave it to you.

My Freebies


amacord ( ) posted Sun, 31 December 2006 at 1:05 AM · edited Sun, 31 December 2006 at 1:07 AM

negative, no 'enter the value' dialog, no scaling, nothing. just the 'forget it' message. starts weeping edit: stops weeping after reading your edit and resets to shy smile


nruddock ( ) posted Sun, 31 December 2006 at 8:09 AM

file_364130.doc

Try this one, I think it should do what your wanting. If you don't get quite the results you want, we'll try and figure out what needs to be changed.


pjz99 ( ) posted Sun, 31 December 2006 at 8:23 AM · edited Sun, 31 December 2006 at 8:25 AM

Dang, that's kind of you - I just got in from work, appreciate you getting that first.  checks to see what's different

edit:  See, this is why you don't want to take scripts from noobs (e.g. me).

My Freebies


pjz99 ( ) posted Sun, 31 December 2006 at 8:37 AM

Okay, I take it you cannot directly manipulate scale by talking to the method in each actor, which is why you have the first three lines getting a pointer to the scale parameter?  Or could it have been done another way?

I see what your script does, seems to parent everything to one object/geometry and apply Scale one time, to the parent object, and how you filtered down types of props to exclude various stuff that I was allowing, thanks for that example, always good to see how to do something right :)

My Freebies


nruddock ( ) posted Sun, 31 December 2006 at 11:42 AM

file_364148.doc

> Quote - Okay, I take it you cannot directly manipulate scale by talking to the method in each actor, which is why you have the first three lines getting a pointer to the scale parameter?  Or could it have been done another way? > > I see what your script does, seems to parent everything to one object/geometry and apply Scale one time, to the parent object, and how you filtered down types of props to exclude various stuff that I was allowing, thanks for that example, always good to see how to do something right :)

The "parent everything to a prop then scale" method is an old one that many people have used before.

The method you had scripted, even when corrected for various miscodings, produced undesirable results.
In cases like this, attention to the fine detail of what's needed can't be avoided (e.g. parent props like magnets are affected by their parents scale setting and so don't need doing seperately).

I've attached a working version of your original script so you can compare it and the one I ended up with (you can start a thread in the Python forum if you want to go into the details).


amacord ( ) posted Sun, 31 December 2006 at 12:10 PM · edited Sun, 31 December 2006 at 12:15 PM

ok, i can't help it, i begin feeling stupid...:blushing: hi, nruddock, i've tried the ScaleAll1.py.doc you kindly offered, aaaaand: Traceback (most recent call last): File "", line 10, in ? AttributeError: 'module' object has no attribute 'DialogSimple' :blink: edit and here comes the funny thing: running ScaleAlla brings up exactly the same message!!!


nruddock ( ) posted Sun, 31 December 2006 at 2:32 PM

Quote - ... I've tried the ScaleAll1.py.doc you kindly offered, aaaaand: Traceback (most recent call last): File "", line 10, in ? AttributeError: 'module' object has no attribute 'DialogSimple'

Please ignore ScaleAlla.py it was for informational purposes only.

As your getting the error mesage your are, I think you have PP or P5.
This means that you'll need to edit the script as follows :-
replace scaleAmt = poser.DialogSimple.AskFloat("Enter the value you'd like to Scale to:")

with scaleAmt = some number between 0.0 and 1.0

where the number is the %value you want would dialup in Poser divided by 100. Editing the script each time you want a different value will be necessary (adding a Tkinter GUI for this is not really worth the effort).


amacord ( ) posted Mon, 01 January 2007 at 1:49 AM

my best wishes for you guys! Traceback (most recent call last): File "", line 23, in ? AttributeError: IsHairProp Quid?


amacord ( ) posted Mon, 01 January 2007 at 6:52 AM · edited Mon, 01 January 2007 at 7:04 AM

er, i forgot...yes, it's p5. my machine's too old to use p6 for more than rendering.:/


nruddock ( ) posted Mon, 01 January 2007 at 9:53 AM

Quote - my best wishes for you guys! Traceback (most recent call last): File "", line 23, in ? AttributeError: IsHairProp Quid?

Sorry about that, for P5 just delete the line that has IsHairProp in.


amacord ( ) posted Mon, 01 January 2007 at 1:15 PM · edited Mon, 01 January 2007 at 1:16 PM

bingo! at least! no error message!!!! but there's sth strange about it - can't put my finger on it yet...needs some more testing. pls keep an eye on your sitemail-box;) thx a lot! A.


amacord ( ) posted Thu, 04 January 2007 at 12:45 AM

@nruddock sitemail! @pjz99 did you test nruddock's script too?


pjz99 ( ) posted Thu, 04 January 2007 at 1:21 AM

I didn't mess with it because I have no application for it, sorry (kept it for informational purposes though)

My Freebies


trobbins2 ( ) posted Thu, 04 January 2007 at 2:48 AM

I'm a big fan of the parent to a prop approach.  I generally just use a box and parent everything to it, then I can move, rotate or scale everything all at once with tremendous ease using the box, just shut off the visibility for the box for rendering purposes.


amacord ( ) posted Thu, 04 January 2007 at 11:04 PM

@ trobbins2 i use this parent-to-box method for lights only. too much parenting and reparenting and cross-parenting and changing parents is a source of problems. especially in multi-frame scenes. @ pjz99 just curious. in case you are curious about how this script-story is going on pls check this thread: http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=2679406 A.


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.