Revision: 21371
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21371
Author:   yukishiro
Date:     2009-07-05 08:36:56 +0200 (Sun, 05 Jul 2009)

Log Message:
-----------
add some UI code for light node

Modified Paths:
--------------
    branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_modifier.py
    branches/soc-2009-yukishiro/release/ui/buttons_particle.py
    branches/soc-2009-yukishiro/release/ui/buttons_physic_cloth.py
    branches/soc-2009-yukishiro/release/ui/buttons_physics_field.py
    branches/soc-2009-yukishiro/release/ui/buttons_physics_fluid.py
    branches/soc-2009-yukishiro/release/ui/buttons_physics_softbody.py
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c
    branches/soc-2009-yukishiro/source/blender/editors/space_node/node_edit.c
    branches/soc-2009-yukishiro/source/blender/editors/space_node/node_header.c
    branches/soc-2009-yukishiro/source/blender/editors/space_node/node_intern.h
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_lightenv_types.h
    branches/soc-2009-yukishiro/source/blender/nodes/LGT_node.h
    
branches/soc-2009-yukishiro/source/blender/nodes/intern/LGT_nodes/LGT_lightenv.c

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py      
2009-07-05 04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py      
2009-07-05 06:36:56 UTC (rev 21371)
@@ -48,7 +48,7 @@
                        row.itemR(lat, "interpolation_type_w", expand=True)
                        
                        row = layout.row()
+                       row.itemO("LATTICE_OT_make_regular")
                        row.itemR(lat, "outside")
-                       row.itemR(lat, "shape_keys")
 
 bpy.types.register(DATA_PT_lattice)

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py 2009-07-05 
04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py 2009-07-05 
06:36:56 UTC (rev 21371)
@@ -131,17 +131,45 @@
        def draw(self, context):
                layout = self.layout
                ob = context.object
+               key = ob.data.shape_keys
+               kb = ob.active_shape_key
 
                row = layout.row()
+               row.template_list(key, "keys", ob, "active_shape_key_index")
 
-               key = ob.data.shape_keys
+               col = row.column()
 
-               row.template_list(key, "keys", ob, "active_shape_key_index")
+               subcol = col.column(align=True)
+               subcol.itemO("OBJECT_OT_shape_key_add", icon="ICON_ZOOMIN", 
text="")
+               subcol.itemO("OBJECT_OT_shape_key_remove", icon="ICON_ZOOMOUT", 
text="")
 
-               col = row.column(align=True)
-               col.itemO("OBJECT_OT_shape_key_add", icon="ICON_ZOOMIN", 
text="")
-               col.itemO("OBJECT_OT_shape_key_remove", icon="ICON_ZOOMOUT", 
text="")
+               if kb:
+                       col.itemS()
 
+                       subcol = col.column(align=True)
+                       subcol.itemR(ob, "shape_key_lock", icon="ICON_PINNED", 
text="")
+                       subcol.itemR(kb, "mute", icon="ICON_MUTE_IPO_ON", 
text="")
+
+                       if key.relative:
+                               row = layout.row()
+                               row.itemR(key, "relative")
+                               row.itemL()
+
+                               if ob.active_shape_key_index != 0:
+                                       if not ob.shape_key_lock:
+                                               row = layout.row(align=True)
+                                               row.itemR(kb, "value", text="")
+                                               row.itemR(kb, "slider_min", 
text="Min")
+                                               row.itemR(kb, "slider_max", 
text="Max")
+
+                                       row = layout.row()
+                                       row.item_pointerR(kb, "vertex_group", 
ob, "vertex_groups", text="")
+                                       row.item_pointerR(kb, "relative_key", 
key, "keys", text="")
+                       else:
+                               row = layout.row()
+                               row.itemR(key, "relative")
+                               row.itemR(key, "slurph")
+
                if context.edit_object:
                        layout.enabled = False
 

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_modifier.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_modifier.py     
2009-07-05 04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_modifier.py     
2009-07-05 06:36:56 UTC (rev 21371)
@@ -300,10 +300,19 @@
                col.itemR(md, "normal")
                col.itemR(md, "children")
                col.itemR(md, "path")
+               if md.path:
+                       col.itemR(md, "keep_shape")
                col.itemR(md, "unborn")
                col.itemR(md, "alive")
                col.itemR(md, "dead")
+               if md.path:
+                       col.itemR(md, "axis", text="")
                
+               if md.path:
+                       row = layout.row()
+                       row.itemR(md, "position", slider=True)
+                       row.itemR(md, "random_position", text = "Random", 
slider=True)
+               
        def particlesystem(self, layout, ob, md):
                layout.itemL(text="See Particle panel.")
                

Modified: branches/soc-2009-yukishiro/release/ui/buttons_particle.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_particle.py  2009-07-05 
04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_particle.py  2009-07-05 
06:36:56 UTC (rev 21371)
@@ -353,19 +353,14 @@
                        colsub.itemR(part, "adaptive_pix")
                        sub.itemR(part, "hair_bspline")
                        sub.itemR(part, "render_step", text="Steps")
-                       sub = split.column()
-                       sub.itemL(text="Length:")
-                       sub.itemR(part, "abs_length", text="Absolute")
-                       sub.itemR(part, "absolute_length", text="Maximum")
+                       sub = split.column()    
+
+                       sub.itemL(text="Timing:")
+                       sub.itemR(part, "abs_path_time")
+                       sub.itemR(part, "path_start", text="Start", slider= not 
part.abs_path_time)
+                       sub.itemR(part, "path_end", text="End", slider= not 
part.abs_path_time)         
                        sub.itemR(part, "random_length", text="Random", 
slider=True)
                        
-                       #row = layout.row()
-                       #row.itemR(part, "timed_path")
-                       #col = row.column(align=True)
-                       #col.active = part.timed_path == True
-                       #col.itemR(part, "line_length_tail", text="Start")
-                       #col.itemR(part, "line_length_head", text="End")
-                       
                        row = layout.row()
                        col = row.column()
                        
@@ -384,7 +379,6 @@
                        
 
                elif part.ren_as == 'OBJECT':
-                       #sub = split.column()
                        sub.itemR(part, "dupli_object")
                elif part.ren_as == 'GROUP':
                        sub.itemR(part, "dupli_group")
@@ -428,7 +422,19 @@
                        row.itemR(part, "billboard_animation", expand=True)
                        row.itemL(text="Offset:")
                        row.itemR(part, "billboard_split_offset", expand=True)
-               
+               if part.ren_as == 'HALO' or part.ren_as == 'LINE' or 
part.ren_as=='BILLBOARD':
+                       row = layout.row()
+                       col = row.column()
+                       col.itemR(part, "trail_count")
+                       if part.trail_count > 1:
+                               col.itemR(part, "abs_path_time", text="Length 
in frames")
+                               col = row.column()
+                               col.itemR(part, "path_end", text="Length", 
slider=not part.abs_path_time)
+                               col.itemR(part, "random_length", text="Random", 
slider=True)
+                       else:
+                               col = row.column()
+                               col.itemL(text="")
+                               
 class PARTICLE_PT_draw(ParticleButtonsPanel):
        __idname__= "PARTICLE_PT_draw"
        __label__ = "Display"
@@ -475,11 +481,12 @@
                        col.itemR(part, "draw_health")
                
                col = row.column()
+               col.itemR(part, "material_color", text="Use material color")
+               
                if (path):
                        box = col.box()                         
                        box.itemR(part, "draw_step")
                else:
-                       col.itemR(part, "material_color", text="Use material 
color")
                        subcol = col.column()
                        subcol.active = part.material_color==False
                        #subcol.itemL(text="color")

Modified: branches/soc-2009-yukishiro/release/ui/buttons_physic_cloth.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_physic_cloth.py      
2009-07-05 04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_physic_cloth.py      
2009-07-05 06:36:56 UTC (rev 21371)
@@ -7,7 +7,8 @@
        __context__ = "physics"
 
        def poll(self, context):
-               return (context.object != None)
+               ob = context.object
+               return (ob and ob.type == 'MESH')
                
 class PHYSICS_PT_cloth(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_cloth"

Modified: branches/soc-2009-yukishiro/release/ui/buttons_physics_field.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_physics_field.py     
2009-07-05 04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_physics_field.py     
2009-07-05 06:36:56 UTC (rev 21371)
@@ -30,6 +30,11 @@
 class PHYSICS_PT_collision(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_collision"
        __label__ = "Collision"
+       __default_closed__ = True
+       
+       def poll(self, context):
+               ob = context.object
+               return (ob and ob.type == 'MESH')
 
        def draw_header(self, context):
                settings = context.object.collision
@@ -40,9 +45,22 @@
                md = context.collision
                settings = context.object.collision
 
-               if settings.enabled:
-                       pass
+               layout.active = settings.enabled
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.itemL(text="Damping:")
+               col.itemR(settings, "damping_factor", text="Factor");
+               col.itemR(settings, "random_damping", text="Random");
+               
+               col = split.column()
+               col.itemL(text="Friction:")
+               col.itemR(settings, "friction_factor", text="Factor");
+               col.itemR(settings, "random_friction", text="Random");
+               
+               layout.itemR(settings, "permeability");
+               layout.itemR(settings, "kill_particles");
 
 bpy.types.register(PHYSICS_PT_field)
 bpy.types.register(PHYSICS_PT_collision)
-

Modified: branches/soc-2009-yukishiro/release/ui/buttons_physics_fluid.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_physics_fluid.py     
2009-07-05 04:05:57 UTC (rev 21370)
+++ branches/soc-2009-yukishiro/release/ui/buttons_physics_fluid.py     
2009-07-05 06:36:56 UTC (rev 21371)
@@ -49,14 +49,175 @@
                        row.item_enumR(fluid, "type", "PARTICLE")
                        row.item_enumR(fluid, "type", "CONTROL")
 
-                       if fluid.type == "DOMAIN":
+                       if fluid.type == 'DOMAIN':
                                layout.itemO("FLUID_OT_bake", text="BAKE")
+                               layout.itemL(text="Required Memory: " + 
fluid.memory_estimate)
+                               
+                               layout.itemL(text="Resolution:")
+                               
+                               split = layout.split()
+                               
+                               col = split.column()
+                               colsub = col.column(align=True)
+                               colsub.itemR(fluid, "resolution", text="Final")
+                               colsub.itemR(fluid, "render_display_mode", 
text="")
+                               colsub = col.column(align=True)
+                               colsub.itemL(text="Time:")
+                               colsub.itemR(fluid, "start_time", text="Start")
+                               colsub.itemR(fluid, "end_time", text="End")
+                               
+                               col = split.column()
+                               colsub = col.column(align=True)
+                               colsub.itemR(fluid, "preview_resolution", 
text="Preview", slider=True)
+                               colsub.itemR(fluid, "viewport_display_mode", 
text="")
+                               colsub = col.column()
+                               colsub.itemR(fluid, "reverse_frames")
+                               colsub.itemR(fluid, "generate_speed_vectors")
+                               colsub.itemR(fluid, "path", text="")
+                               
+                       if fluid.type in ('FLUID', 'OBSTACLE', 'INFLOW', 
'OUTFLOW'):
+                               layout.itemR(fluid, "volume_initialization")
+                               
+                       if fluid.type == 'FLUID':
+                               row = layout.row()
+                               row.column().itemR(fluid, "initial_velocity")
+                               row.itemR(fluid, "export_animated_mesh")
+                               
+                       if fluid.type == 'OBSTACLE':
+                               row = layout.row()
+                               row.itemL()
+                               row.itemR(fluid, "export_animated_mesh")
+                               layout.itemR(fluid, "slip_type", expand=True)
+                               if fluid.slip_type == 'PARTIALSLIP':
+                                       layout.itemR(fluid, 
"partial_slip_amount", text="Amount")
+                                       
+                               layout.itemR(fluid, "impact_factor")
+                               
+                       if fluid.type == 'INFLOW':
+                               row = layout.row()
+                               row.column().itemR(fluid, "inflow_velocity")
+                               row.itemR(fluid, "export_animated_mesh")
+                               layout.itemR(fluid, "local_coordinates")
+                               
+                       if fluid.type == 'OUTFLOW':
+                               row = layout.row()
+                               row.itemL()
+                               row.itemR(fluid, "export_animated_mesh")
+                               
+                       if fluid.type == 'PARTICLE':
+                               split = layout.split()
+                               
+                               col = split.column()
+                               col.itemL(text="Type:")
+                               col.itemR(fluid, "drops")

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to