Revision: 20613
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20613
Author:   yukishiro
Date:     2009-06-04 01:04:43 +0200 (Thu, 04 Jun 2009)

Log Message:
-----------
merge from 20585 to 20612

Modified Paths:
--------------
    branches/soc-2009-yukishiro/release/ui/buttons_data_armature.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_camera.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_curve.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_empty.py
    branches/soc-2009-yukishiro/release/ui/buttons_data_lamp.py
    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_data_text.py
    branches/soc-2009-yukishiro/release/ui/buttons_material.py
    branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py
    branches/soc-2009-yukishiro/release/ui/buttons_objects.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_scene.py
    branches/soc-2009-yukishiro/release/ui/buttons_texture.py
    branches/soc-2009-yukishiro/release/ui/buttons_world.py
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/node.c
    branches/soc-2009-yukishiro/source/blender/editors/include/ED_object.h
    branches/soc-2009-yukishiro/source/blender/editors/include/UI_interface.h
    branches/soc-2009-yukishiro/source/blender/editors/interface/interface.c
    branches/soc-2009-yukishiro/source/blender/editors/interface/interface_api.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_handlers.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_intern.h
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_layout.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_regions.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_templates.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_utils.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_widgets.c
    branches/soc-2009-yukishiro/source/blender/editors/object/editconstraint.c
    branches/soc-2009-yukishiro/source/blender/editors/object/object_intern.h
    branches/soc-2009-yukishiro/source/blender/editors/object/object_modifier.c
    branches/soc-2009-yukishiro/source/blender/editors/object/object_ops.c
    branches/soc-2009-yukishiro/source/blender/editors/screen/area.c
    
branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_intern.h
    
branches/soc-2009-yukishiro/source/blender/editors/space_buttons/space_buttons.c
    branches/soc-2009-yukishiro/source/blender/editors/space_info/info_header.c
    branches/soc-2009-yukishiro/source/blender/editors/space_view3d/drawobject.c
    
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_buttons.c
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_space_types.h
    branches/soc-2009-yukishiro/source/blender/makesrna/RNA_access.h
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_access.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_lamp.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_nodetree.c
    
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_nodetree_types.h
    
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_object_force.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_ui.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_wm.c
    
branches/soc-2009-yukishiro/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2009-yukishiro/source/blender/windowmanager/wm_event_types.h

Added Paths:
-----------
    
branches/soc-2009-yukishiro/source/blender/editors/space_buttons/buttons_context.c

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_armature.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_armature.py     
2009-06-03 22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_armature.py     
2009-06-03 23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'ARMATURE')
+               return (context.armature != None)
 
 class DATA_PT_skeleton(DataButtonsPanel):
        __idname__ = "DATA_PT_skeleton"
        __label__ = "Skeleton"
 
        def draw(self, context):
-               arm = context.active_object.data
+               arm = context.armature
                layout = self.layout
                
                layout.itemR(arm, "rest_position")
@@ -42,7 +41,7 @@
        __label__ = "Display"
        
        def draw(self, context):
-               arm = context.active_object.data
+               arm = context.armature
                layout = self.layout
 
                split = layout.split()
@@ -62,7 +61,7 @@
        __label__ = "Paths"
 
        def draw(self, context):
-               arm = context.active_object.data
+               arm = context.armature
                layout = self.layout
 
                split = layout.split()
@@ -90,7 +89,7 @@
        __label__ = "Ghost"
 
        def draw(self, context):
-               arm = context.active_object.data
+               arm = context.armature
                layout = self.layout
 
                split = layout.split()
@@ -111,4 +110,4 @@
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)
 bpy.types.register(DATA_PT_paths)
-bpy.types.register(DATA_PT_ghost)
\ No newline at end of file
+bpy.types.register(DATA_PT_ghost)

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py 2009-06-03 
22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py 2009-06-03 
23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "bone"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'ARMATURE')
+               return (context.bone != None)
 
 class BONE_PT_bone(BoneButtonsPanel):
        __idname__ = "BONE_PT_bone"
        __label__ = "Bone"
 
        def draw(self, context):
-               bone = context.active_object.data.bones[0]
+               bone = context.bone
                layout = self.layout
 
                split = layout.split()

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_camera.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_camera.py       
2009-06-03 22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_camera.py       
2009-06-03 23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "data"
 
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'CAMERA')
+               return (context.camera != None)
                
 class DATA_PT_cameralens(DataButtonsPanel):
        __idname__ = "DATA_PT_camera"
        __label__ = "Lens"
 
        def draw(self, context):
-               cam = context.active_object.data
+               cam = context.camera
                layout = self.layout
 
                layout.itemR(cam, "type", expand=True)
@@ -52,7 +51,7 @@
        __label__ = "Display"
        
        def draw(self, context):
-               cam = context.active_object.data
+               cam = context.camera
                layout = self.layout
 
                split = layout.split()
@@ -71,4 +70,4 @@
                col.itemR(cam, "draw_size", text="Size")
                
 bpy.types.register(DATA_PT_cameralens)
-bpy.types.register(DATA_PT_cameradisplay)
\ No newline at end of file
+bpy.types.register(DATA_PT_cameradisplay)

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_curve.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_curve.py        
2009-06-03 22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_curve.py        
2009-06-03 23:04:43 UTC (rev 20613)
@@ -7,15 +7,15 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'CURVE')
+               ob = context.object
+               return (ob and ob.type == 'CURVE' and context.curve)
 
 class DATA_PT_shape_curve(DataButtonsPanel):
                __idname__ = "DATA_PT_shape_curve"
                __label__ = "Shape"
 
                def draw(self, context):
-                       curve = context.active_object.data
+                       curve = context.curve
                        layout = self.layout
 
                        layout.itemR(curve, "curve_2d")                 
@@ -50,7 +50,7 @@
                __label__ = "Geometry"
 
                def draw(self, context):
-                       curve = context.active_object.data
+                       curve = context.curve
                        layout = self.layout
 
                        split = layout.split()
@@ -72,13 +72,13 @@
                __label__ = "Path Animation"
                
                def draw_header(self, context):
-                       curve = context.active_object.data
+                       curve = context.curve
 
                        layout = self.layout
                        layout.itemR(curve, "path", text="")
 
                def draw(self, context):
-                       curve = context.active_object.data
+                       curve = context.curve
                        layout = self.layout
                        layout.active = curve.path      
                        
@@ -97,7 +97,7 @@
                __label__ = "Current Curve"
 
                def draw(self, context):
-                       currentcurve = context.active_object.data.curves[0]
+                       currentcurve = context.curve.curves[0] # XXX
                        layout = self.layout
 
                        split = layout.split()
@@ -128,4 +128,4 @@
 bpy.types.register(DATA_PT_shape_curve)
 bpy.types.register(DATA_PT_geometry)
 bpy.types.register(DATA_PT_pathanim)
-bpy.types.register(DATA_PT_current_curve)
\ No newline at end of file
+bpy.types.register(DATA_PT_current_curve)

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_empty.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_empty.py        
2009-06-03 22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_empty.py        
2009-06-03 23:04:43 UTC (rev 20613)
@@ -7,7 +7,7 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
+               ob = context.object
                return (ob and ob.type == 'EMPTY')
        
 class DATA_PT_empty(DataButtonsPanel):
@@ -15,10 +15,10 @@
        __label__ = "Empty"
 
        def draw(self, context):
-               ob = context.active_object
+               ob = context.object
                layout = self.layout
 
                layout.itemR(ob, "empty_draw_type")
                layout.itemR(ob, "empty_draw_size")
                
-bpy.types.register(DATA_PT_empty)
\ No newline at end of file
+bpy.types.register(DATA_PT_empty)

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_lamp.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_lamp.py 2009-06-03 
22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_lamp.py 2009-06-03 
23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'LAMP')
+               return (context.lamp != None)
        
 class DATA_PT_lamp(DataButtonsPanel):
        __idname__ = "DATA_PT_lamp"
        __label__ = "Lamp"
 
        def draw(self, context):
-               lamp = context.active_object.data
+               lamp = context.lamp
                layout = self.layout
 
                layout.itemR(lamp, "type", expand=True)
@@ -56,11 +55,11 @@
        __label__ = "Sun/Sky"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob.type == 'LAMP' and ob.data.type == 'SUN')
+               lamp = context.lamp
+               return (lamp and lamp.type == 'SUN')
 
        def draw(self, context):
-               lamp = context.active_object.data.sky
+               lamp = context.lamp.sky
                layout = self.layout
 
                row = layout.row()
@@ -99,11 +98,11 @@
        __label__ = "Shadow"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob.type == 'LAMP' and ob.data.type in ('POINT','SUN', 
'SPOT', 'AREA'))
+               lamp = context.lamp
+               return (lamp and lamp.type in ('POINT','SUN', 'SPOT', 'AREA'))
 
        def draw(self, context):
-               lamp = context.active_object.data
+               lamp = context.lamp
                layout = self.layout
 
                layout.itemR(lamp, "shadow_method", expand=True)
@@ -178,11 +177,11 @@
        __label__ = "Spot"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob.type == 'LAMP' and ob.data.type == 'SPOT')
+               lamp = context.lamp
+               return (lamp and lamp.type == 'SPOT')
 
        def draw(self, context):
-               lamp = context.active_object.data
+               lamp = context.lamp
                layout = self.layout
 
                split = layout.split()
@@ -200,7 +199,28 @@
                if lamp.shadow_method == 'BUFFER_SHADOW':
                        colsub.itemR(lamp, "halo_step", text="Step")
 
+class DATA_PT_falloff_curve(DataButtonsPanel):
+       __idname__ = "DATA_PT_falloff_curve"
+       __label__ = "Falloff Curve"
+       
+       def poll(self, context):
+               lamp = context.lamp
+
+               if lamp and lamp.type in ('POINT', 'SPOT'):
+                       if lamp.falloff_type == 'CUSTOM_CURVE':
+                               return True
+
+               return False
+
+       def draw(self, context):
+               lamp = context.lamp
+               layout = self.layout
+
+               layout.template_curve_mapping(lamp.falloff_curve)
+
 bpy.types.register(DATA_PT_lamp)
 bpy.types.register(DATA_PT_shadow)
 bpy.types.register(DATA_PT_sunsky)
-bpy.types.register(DATA_PT_spot)
\ No newline at end of file
+bpy.types.register(DATA_PT_spot)
+bpy.types.register(DATA_PT_falloff_curve)
+

Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py      
2009-06-03 22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_lattice.py      
2009-06-03 23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'LATTICE')
+               return (context.lattice != None)
        
 class DATA_PT_lattice(DataButtonsPanel):
        __idname__ = "DATA_PT_lattice"
        __label__ = "Lattice"
 
        def draw(self, context):
-               lat = context.active_object.data
+               lat = context.lattice
                layout = self.layout
 
                row = layout.row()
@@ -34,4 +33,4 @@
                row.itemR(lat, "outside")
                row.itemR(lat, "shape_keys")
 
-bpy.types.register(DATA_PT_lattice)
\ No newline at end of file
+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-06-03 
22:33:41 UTC (rev 20612)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_mesh.py 2009-06-03 
23:04:43 UTC (rev 20613)
@@ -7,15 +7,14 @@
        __context__ = "data"
        
        def poll(self, context):
-               ob = context.active_object
-               return (ob and ob.type == 'MESH')
+               return (context.mesh != None)
 
 class DATA_PT_surface(DataButtonsPanel):
                __idname__ = "DATA_PT_surface"
                __label__ = "Mesh"
 
                def draw(self, context):

@@ 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