Forum Moderators: Lobo3433, Staff Forum Coordinators: Anim8dtoon
Poser Python Scripting F.A.Q (Last Updated: 2026 Apr 22 10:09 am)
If your prepared to name your cubes SpotlightNN or PointlightNN (where NN = 01 thru 99).
Will the cubes be in a seperately loaded OBJ file (one group per cube) or part of the environment object (again on group per cube) or something else ?
There will need to be some convention to determine the spotlight direction if you expect that to be set automatically (perhaps another cube called SpotlightTargetNN).
Besides direction most of the other light parameters will need defaults in the script (could possibly make use of materials to set the colour).
Now no singing or I'll have to find some Dip ;)
"f your prepared to name your cubes SpotlightNN or PointlightNN (where NN = 01 thru 99)." thats exactly the idea I was thinking of for that part.. "Will the cubes be in a seperately loaded OBJ file (one group per cube) or part of the environment object (again on group per cube) or something else ?" was thinking 1 OBJ with each Cube as a group "There will need to be some convention to determine the spotlight direction if you expect that to be set automatically (perhaps another cube called SpotlightTargetNN)." Had'nt thought of that LOL.. but that sounds like a good idea.. not DIP!!!
Just to summarise.
There will be one OBJ file (a single Poser prop) which will have one group per light (conveniently named to determine the type of light).
In the case of a Spotlight there will be another group (conveniently named) used to determine where the Spotlight will point at.
To determine the actual location of a light, the average position of the vertices in the relevant group seems the best choice.
To avoid having to do some math, I was thinking that creating a new Prop (would be invisible) for each target and then using the built-in PointAt for the Spot would be good (hopefully it won't cause problems even if there are a lot of lights).
I won't be attempting this before tomorrow (Friday) night.
Save attached file to e.g. CubesToLights.py
Import OBJ with suitably named groups, select the guide object and run script (if freshly imported should be selected by default).
Default naming convention is :-
Group name = "SpotLight" + 2 digits => Spotlight.
Group name = "PointLight" + 2 digits => Point light.
Group name = "Target" + 2 digits => Target for spotlight with same 2 digits.
Naming convention, number of digits, whether to delete existing lights, and whether to hide the original prop are configurable by editing the variables at the beginning of the script.
Any chance of attaching this once more? Seems it didn't make it through the Forum conversion and I'd like to try this one out as well...
FREEBIES! | My Gallery | My Store | My FB | Tumblr |
You just can't put the words "Poserites" and "happy" in the same sentence - didn't you know that? LaurieA
Using Poser since 2002. Currently at Version 11.1 - Win 10.
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.
can anyone make a simple script for me? (I can't program lol) what I want to do is simple - in my modeler I setup a set of, say, cubes that are in the position I want my lights in the eniviroment I'm building. I bring that set of cubes into poser run the script that then replaces each cube with a spotlight or pointlight. can this be done? can someone make it for me? plllllllleeeeaaaasseee... ok.. I'll stop the bad Roger Rabbit impression...