propreties in 2.5 like array 2 dim

is there a way to pass a 2 dim array as a list maybe
with properties?

i know the enumlit but his seems to take only one variable
unless we can have an array row per item

Thanks

depends on what you want to do with it.

If you want to use a list of properties so that you can have access to them inside of a panel, this seems to be impossible. Only properties directly saved as a member of a ID derived class can be used inside of a panel. I just tried it. Creating a list and saving properties inside of it would meen that the properties aren’t a direct member of a ID class, so you can’t use them anymore.

someone told me that there migth be a way

to add to the scene as an array or coulbe anyother type of obejct like class ect…

but have to test this later on

thanks

ok did a test with scene var and seems to work with arrays!


 
"""
lampFluospec1=[]
 
bpy.types.Scene.qq1 = lampFluospec1
 
 
 
lampFluospec1.append(['Fluorescent',32,2900 ,2000])
lampFluospec1.append(['Fluorescent (Slimline)',40,3000 ,9000])
lampFluospec1.append(['Fluorescent (Rapid Start)',40,3150 ,2000])
lampFluospec1.append(['Fluorescent 800 ma',60,4300 ,12000])
lampFluospec1.append(['Fluorescent 1500 ma',110,6850 ,10000])
 
and in the panel  seem to work fine
 
  print ()
  print (' new scene var  lamp  =',bpy.types.Scene.qq1)
  print ()
  print ('lampFluospec1 [0]  =',bpy.types.Scene.qq1[0])
  print ()
 

Don’t understand how it work but it’s ok i guess

do you see anything new or wrong with this
but seem to work fine in panel draw function

also this might work with class object i guess
i’ll do a test next week for a reader class

Thanks

The only problem I can see arising is that you are storing your variable in the scene instead of an object. If this is related to your IES work, what happens if I decide to add a second light with a different profile? Using your method scalability may be an issue if you want more than one profile.

Yes still working on the IES script
but theses list are indepedant of any fixture selected in a IES file
so it’s ok for now

for the Lumen method which will be one of the function in ies script
i need to select a type of lamp like fluo mercury MH ect…
which will be part of a first menu

then function of this menu i need another menu dynamic where i will transfert from a specific array to the menu list to allows selection of a specific lamp watts

i can do the second dynamic menu with collection

hope you see what i mean here

don’t know any other way of doing this right now!
if you do let me know

i did a smaller test script for the first menu and it’s working ok but still have to add the collection for the second dynamic menu for lamp selection

if needed i can upload the little script as example

here is sample of the first list for general filament lamps


 
lampincandesspec1.append(['Incandescent',100 ,1750 ,750])
lampincandesspec1.append(['Incandescent Frosted',150 ,2880 ,750])
lampincandesspec1.append(['Incandescent',200 ,4010 ,750])
lampincandesspec1.append(['Incandescent',300 ,3710 ,750])
lampincandesspec1.append(['Incandescent',300 ,6110 ,750])
lampincandesspec1.append(['Incandescent',300 ,5820 ,1000])
lampincandesspec1.append(['Incandescent',500 ,10850 ,1000])
 

so if i select in fist menu filament lamp
then i need to upload this list in second menu to select one of theses lamps

so if you select the fist one
it would be a 100 Watts with 1750 lumens and a life of 750 jours

now i won’t have all the spec for all type of filament lamp but at least a good general selection!

Thanks