Makeshift Light GUI with Python

Warning! This is a double-post!
http://blenderartists.org/forum/showthread.php?t=87882

Using one-line python scripts with IPO drivers connected to shape keys, transparent UV maps, and the new outliner that can lock objects from being selected, I am trying to make a lamp shade for area lights that show off the properties of the lamp in a visual form…

Here’s what I’ve got to refer to which isn’t proving to be very useful…
http://www.blender.org/modules/documentation/228PythonDoc/Lamp-module.html

Here’s some code I’ve made (that doesn’t work) that I’m just executing with alt-P to try and “see” a regular lamp object that I’ve named riglight

from Blender import Lamp
print( dir(Lamp.riglight))

And here’s an example of what I’m trying to get as a finished product. I’d like to mimic Brazil’s GUI for area lights as closely as possible. This is a great first step for me who has never touched the CVS. I know a little bit of python. Thanks to anyone that can provide me with some help. :slight_smile:

BCam: http://www.splutterfish.com/sf/FeatureGalleries/bcamVP.gif
BLight: http://www.splutterfish.com/sf/FeatureGalleries/blightVP.gif

I would also like to ask if anyone has made shape-key scripts that read properties of objects before? and if so, do they react in realtime or does the user have to wait for the value to be input? If the latter, then I have no problem adding handles to a light.

Pretty. :slight_smile: This question would better asked in the Python & Plugins area. They will actually know what you are talking about.

Again though, Pretty lights. . .

Alright. Thanks for being honest. I’d just migrate this one if I had the power to, but instead I’ll double-post and link to the new one.

Here’s hoping it works out!

yah, sorry, wish I could help. But the guy who has rewritten the better part of the python api for blender is over there and he’ll have all kinds of insight if you can get in touch. Good luck with the project.

Hi, those look interesting, but I’m not really sure what they’re visualising or what they’re useful for. Could you describe some of the things that you’re interested in replicating there?

I’ll keep an eye on this, to see if there’s anything that could be useful in Blender itself (I did the current lamp visualisations, so I’m interested in that stuff :slight_smile:

…,heh heh. Or you could just skip the whole makeshift stage…

I think the best way for you to understand what I want is for you to try one of these wonderful lights from Brazil yourself. Since I can’t do that, I’m in the process of making this “visualization” of the feature I would like to see. I’ll post again later tonight with a .blend file and you’ll get to sort of play with the prototype. Thankyou both for your interest.

This took a lot of trial and error to get to behave somewhat like what I wanted, but it’s still lacking true area-light visualisation behavior.

Expect the following:
A: No speed. This is slow. “put together with bubble gum” so to speak using lots of IPO drivers to get very specific behavior.
B: No accuracy. The movement and deformations aren’t mathematically perfect. I could have made it perfect, but it would have been SO SLOW to process, you would want to shoot yourself. Also would have taken a long time to make. (edit: The shapes I made ARE perfect. Feel free to copy them point-for-point.)
C: No functionality. The visualisations are not linked to any of the light’s properties like size, depth, et cetera (note: “beam radius” & “beam softness” are area light features that don’t even exist in Blender yet.)
D: Don’t try moving the light. It’ll break.

E: EXPECT ENTHUSIASM!!! This was a lot of fun. I am really excited about getting more GUI visualizations into Blender. They make workflow much easier, and the first big step will be for lights. :smiley:

http://www.osysi.net/files/3d/lightrig.jpg
http://www.osysi.net/files/3d/lightrig.blend

Those lighting displays look very useful. It is difficult to see what is covered by a spot light or an area light at the moment. The coloring of the geometry behind the cones would be great to have. The process of looking askance at the cone from several angles or adjusting and rendering, adjusting and rendering is a little, ah, time consuming.

That ground geometry isn’t ground geometry at all is it? Cool. The rings display the falloff I guess? Except I think that area lights are shooting paralel light?

I don’t know a thing about python and don’t want to know. That’s someone else’s department. I’m also a big fan of damage proof. So, as you can see, I’m not a great beta tester. Certainly no help with finalizing the project.

Be nice to see something like your light rig make it into blender. A simple script that could run and display all the cones then turn them off again? Very useful. Good luck with that. Have some fun.

Download the blend. move or scale the things accordingly. I locked what you shouldn’t do so just turn on your widget and have at it (no rotating though).