Forum Coordinators: RedPhantom
Poser - OFFICIAL F.A.Q (Last Updated: 2024 Dec 23 7:38 pm)
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.
Script attached, download/save and rename it to something like "ScaleAll.py"
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!
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.
scaleAmt = poser.DialogSimple.AskFloat("Enter the value you'd like to Scale to:" **)
**attached
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.
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).
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).
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!!!
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).
I didn't mess with it because I have no application for it, sorry (kept it for informational purposes though)
@ 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.
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.
hi! is there a way (utility, script) to scale all stuff in a poser-scene, including lights, cameras etc, together and simultaneoulsy? tia A.