WIP on lighting set up Script

i also added some color to the 3 spot lights

check out if it is like in wiki page set up

i think the Key lamp has to be on the side but have to review if ok for this set up!

if you have time can you add the operators for the daylight set up sub menu
then tomorrow i 'll try to add the light set up for some of theses

thanks happy 2.5

im still learning this part of blender as the way to do things are different that was the first operator i got working lol i actually jumped into the air.

you mean BGE
it’s an another world but seems interesting
like physical simulation ect,

this year i want to learn more about it !

salutations

yeah BGE is easier than this, but i haven’t got to the point where im bending the laws of physics yet that’s hard to do. well ill be on tomorrow with some progress hopefully.

Wow, it’s amazing how much this script has taken off! Thanks to Ricky and Dragon for your code! I have some code to contribute, I started on working on making the lamps snap to the domain and I started working on calculating energy levels of the lamps… Work keeps me so busy though! To many customers wanting websites done… I cant keep up!

I will try to update next week…

Hay guys… I asked my friend Jamal from M3:GRAPHICS to take a look at our plugin… He’s been in the computer animation business for a long time, and he literally has a whole table full of Addys… (For those who don’t know it’s like a advertisers Oscar), mostly for his computer animation work… And I thought this plugin could use his expertise, from someone whose an expert at scene lighting.

if we can get better ones great

very good
but have to be carefull not to add too much useless stuff it’s beginning to be big but very nice and handy for noobies!

tomorrow i’ll try to work on adding the operators and functions for the different day scenes!

don’t think it’s met to be for professionnel just a good addon for noobies
with enough set up to help in most general situation!

still trying to see if there is anyway to add some lamp texture
but have not found them yet in 2.5!
would be nice for the 2 lamps set up!

thanks guys

Looking at the console window I found… bpy.ops.texture.new()

The only thing is, it would probably have to be a procedural texture sense there is no way to embed a image in the plugin file. or if that won’t work… We could include the texture with the plugin if it’s placed in the same directory it could with called with a relative path.

yeah there is a way i just had a quick google :smiley: so yeah perfectly possible via python :D.
im having trouble getting the clay render in the menu ive got to the point where it runs when clay render is picked and it runs from there so it’s now a function in the light script.

so is clay working from an operator pre defined?
and does the render looks like a clay render?

i already added the operators and beginning of cuntions for the day light set up 4 or 5 new ones
but now need to set up the light for theses

today i’ll also prepare a fluorescent box and may be try the AO equivalent whith 16 hemi lights in circle!

so can you upload your lateest and i’ll upate with what i did or i upload mine and you can add nes things in it?
let me know

happy 2.5

anyone remember how to remove or erase a face on exsiting mesh
like et say remove bottom face = 6 on a cube?

i just found a video on AAO on my HD not certain if we can have this one too?

thanks

i even open a new trhead on basic forum to discuss this lamp texture thing
http://blenderartists.org/forum/showthread.php?t=208336

don’t know may be theses are not procedural texture but just selected image textures added to the file!

when you apply
bpy.context.active_object.location = [0, 0, 10]

this doe not move the object but moves the mesh data the vertices
so the object origin does not change location but the vertices do change location
is there another command to move the object
or may be reset the origin at center of the object after ?

salutations

all I’ve done is make the clay render a function in the script so you just put
clayrender.run() and clay turns on when clay is chosen but no check box or color in your menu.

so you did not add the function for clay in the opeator for clay from menu

i’ll do that

now did you do other modif or only the clay one?

let me add all the modif for clay and my modifs and i’ll upload
i did add amny new operator and functins
plsu a function for fluo and also fake AO 16 lamps

alos
you imported the clay render py file
here
i’ll add it as a function inside the script
easier it’s very small anyway!

thanks

i cleaned the lighting script up by cleaning the white space i managed to cut 160 lines out of it. look at the clay operator in there i put the function there

yes ok

but is as this is very small i would prefer to integrate it inside the lgit script

i mean this clay module script has only a few lines

but when i added this to the sript and ran it from the menu
i got the following error

File “lightsetupricky16.000”, line 1179, in execute
File “lightsetupricky16.000”, line 1884, in clayrender1
AttributeError: ‘Context’ object has no attribute ‘material’
location:<unknown location>:-1

any idea why it does not recognise the object or mat here ?

Thanks

all you need to do is in the clayrender script, copy everything apart from the GPL header and paste it at the top of your light script just below where you do the importing. and take off the .run from where you call the function and delete the import clayrender as clayrender

let me show the last file i did and see the error

this file contatins most of what i did up to now
i also made the layers global and it work ok

and i added your clay function at the end of ile almost
and modify the menu to call it try it

try also the fake AO with 16 lamps very cool !

if you modify it

re upload as ver 17

Thanks

looks like you put a preset into there and you can’t do that is a preset script only. the other script is the one that loads it automatically directly from the preset folder :D. (the Clayrender one with the operators in).

if you want more materials ill have to make some changes it would be better if we had a bank of scripted material presets.

ill look at the fake AO later as im rendering at the minute.

sorry what do you mean by preset ?

i only added your clay function inside the script
and other things like new operators and function for othere ligth set up

unless you did other modif which you did not tell me!

as i said i think it’s better to keep a maximum inside the scxript and not sue external module it is confusing
for noobie to think of externl modules

in any case this clay part is not big so should be eeasy to include it inside ligth script!

i tak a brake for 2 hours then be back
can you add the clay as a function in last file then not certain what else you want to modify ?

i still need to find a way to remove the bottom face on the cube for the fluorescent
and scale it as a 2 X 4 feet in metric
and add the fluo tube with some material to simulate a real fluo!

thanks happy 2.5