Revision: 21330
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21330
Author:   aligorith
Date:     2009-07-03 03:57:38 +0200 (Fri, 03 Jul 2009)

Log Message:
-----------
NLA SoC: Merge from 2.5

21301 to 21329

Modified Paths:
--------------
    branches/soc-2009-aligorith/release/ui/buttons_data_modifier.py
    branches/soc-2009-aligorith/release/ui/buttons_physic_cloth.py
    branches/soc-2009-aligorith/source/blender/blenfont/BLF_api.h
    branches/soc-2009-aligorith/source/blender/blenfont/intern/blf.c
    branches/soc-2009-aligorith/source/blender/blenkernel/BKE_effect.h
    branches/soc-2009-aligorith/source/blender/blenkernel/BKE_fluidsim.h
    branches/soc-2009-aligorith/source/blender/blenkernel/BKE_modifier.h
    branches/soc-2009-aligorith/source/blender/blenkernel/BKE_screen.h
    branches/soc-2009-aligorith/source/blender/blenkernel/intern/context.c
    branches/soc-2009-aligorith/source/blender/blenkernel/intern/effect.c
    branches/soc-2009-aligorith/source/blender/blenkernel/intern/fluidsim.c
    branches/soc-2009-aligorith/source/blender/blenkernel/intern/modifier.c
    branches/soc-2009-aligorith/source/blender/blenkernel/intern/screen.c
    branches/soc-2009-aligorith/source/blender/editors/CMakeLists.txt
    branches/soc-2009-aligorith/source/blender/editors/animation/anim_draw.c
    branches/soc-2009-aligorith/source/blender/editors/animation/anim_markers.c
    branches/soc-2009-aligorith/source/blender/editors/include/ED_fluidsim.h
    branches/soc-2009-aligorith/source/blender/editors/include/ED_markers.h
    branches/soc-2009-aligorith/source/blender/editors/include/ED_object.h
    branches/soc-2009-aligorith/source/blender/editors/include/UI_interface.h
    branches/soc-2009-aligorith/source/blender/editors/include/UI_view2d.h
    
branches/soc-2009-aligorith/source/blender/editors/interface/interface_intern.h
    
branches/soc-2009-aligorith/source/blender/editors/interface/interface_layout.c
    
branches/soc-2009-aligorith/source/blender/editors/interface/interface_panel.c
    
branches/soc-2009-aligorith/source/blender/editors/interface/interface_templates.c
    
branches/soc-2009-aligorith/source/blender/editors/interface/interface_widgets.c
    branches/soc-2009-aligorith/source/blender/editors/interface/view2d.c
    branches/soc-2009-aligorith/source/blender/editors/interface/view2d_ops.c
    branches/soc-2009-aligorith/source/blender/editors/object/object_intern.h
    branches/soc-2009-aligorith/source/blender/editors/object/object_modifier.c
    branches/soc-2009-aligorith/source/blender/editors/object/object_ops.c
    branches/soc-2009-aligorith/source/blender/editors/physics/ed_fluidsim.c
    branches/soc-2009-aligorith/source/blender/editors/physics/ed_pointcache.c
    branches/soc-2009-aligorith/source/blender/editors/screen/area.c
    branches/soc-2009-aligorith/source/blender/editors/space_api/spacetypes.c
    
branches/soc-2009-aligorith/source/blender/editors/space_buttons/buttons_context.c
    
branches/soc-2009-aligorith/source/blender/editors/space_buttons/buttons_ops.c
    branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_edit.c
    
branches/soc-2009-aligorith/source/blender/editors/space_graph/graph_intern.h
    branches/soc-2009-aligorith/source/blender/editors/space_graph/space_graph.c
    
branches/soc-2009-aligorith/source/blender/editors/space_view3d/space_view3d.c
    
branches/soc-2009-aligorith/source/blender/editors/space_view3d/view3d_intern.h
    
branches/soc-2009-aligorith/source/blender/editors/space_view3d/view3d_toolbar.c
    branches/soc-2009-aligorith/source/blender/makesdna/DNA_object_fluidsim.h
    branches/soc-2009-aligorith/source/blender/makesdna/DNA_object_force.h
    branches/soc-2009-aligorith/source/blender/makesdna/DNA_screen_types.h
    branches/soc-2009-aligorith/source/blender/makesdna/DNA_view2d_types.h
    branches/soc-2009-aligorith/source/blender/makesrna/RNA_access.h
    branches/soc-2009-aligorith/source/blender/makesrna/intern/CMakeLists.txt
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_fluidsim.c
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_internal.h
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_modifier.c
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object.c
    
branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_object_force.c
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_screen.c
    branches/soc-2009-aligorith/source/blender/makesrna/intern/rna_ui_api.c
    branches/soc-2009-aligorith/source/blender/python/intern/bpy_interface.c

Added Paths:
-----------
    branches/soc-2009-aligorith/release/ui/buttons_physics_field.py
    branches/soc-2009-aligorith/release/ui/buttons_physics_fluid.py
    branches/soc-2009-aligorith/release/ui/buttons_physics_softbody.py
    branches/soc-2009-aligorith/release/ui/space_view3d_toolbar.py
    branches/soc-2009-aligorith/source/blender/editors/include/ED_physics.h

Removed Paths:
-------------
    branches/soc-2009-aligorith/source/blender/editors/include/ED_pointcache.h

Modified: branches/soc-2009-aligorith/release/ui/buttons_data_modifier.py
===================================================================
--- branches/soc-2009-aligorith/release/ui/buttons_data_modifier.py     
2009-07-03 01:10:46 UTC (rev 21329)
+++ branches/soc-2009-aligorith/release/ui/buttons_data_modifier.py     
2009-07-03 01:57:38 UTC (rev 21330)
@@ -24,61 +24,63 @@
                        if md.expanded:
                                if md.type == 'ARMATURE':
                                        self.armature(box, ob, md)
-                               if md.type == 'ARRAY':
+                               elif md.type == 'ARRAY':
                                        self.array(box, ob, md)
-                               if md.type == 'BEVEL':
+                               elif md.type == 'BEVEL':
                                        self.bevel(box, ob, md)
-                               if md.type == 'BOOLEAN':
+                               elif md.type == 'BOOLEAN':
                                        self.boolean(box, ob, md)
-                               if md.type == 'BUILD':
+                               elif md.type == 'BUILD':
                                        self.build(box, ob, md)
-                               if md.type == 'CAST':
+                               elif md.type == 'CAST':
                                        self.cast(box, ob, md)
-                               if md.type == 'CLOTH':
+                               elif md.type == 'CLOTH':
                                        self.cloth(box, ob, md)
-                               if md.type == 'COLLISION':
+                               elif md.type == 'COLLISION':
                                        self.collision(box, ob, md)
-                               if md.type == 'CURVE':
+                               elif md.type == 'CURVE':
                                        self.curve(box, ob, md)
-                               if md.type == 'DECIMATE':
+                               elif md.type == 'DECIMATE':
                                        self.decimate(box, ob, md)
-                               if md.type == 'DISPLACE':
+                               elif md.type == 'DISPLACE':
                                        self.displace(box, ob, md)
-                               if md.type == 'EDGE_SPLIT':
+                               elif md.type == 'EDGE_SPLIT':
                                        self.edgesplit(box, ob, md)
-                               if md.type == 'EXPLODE':
+                               elif md.type == 'EXPLODE':
                                        self.explode(box, ob, md)
-                               if md.type == 'FLUID_SIMULATION':
+                               elif md.type == 'FLUID_SIMULATION':
                                        self.fluid(box, ob, md)
-                               if md.type == 'HOOK':
+                               elif md.type == 'HOOK':
                                        self.hook(box, ob, md)
-                               if md.type == 'LATTICE':
+                               elif md.type == 'LATTICE':
                                        self.lattice(box, ob, md)
-                               if md.type == 'MASK':
+                               elif md.type == 'MASK':
                                        self.mask(box, ob, md)
-                               if md.type == 'MESH_DEFORM':
+                               elif md.type == 'MESH_DEFORM':
                                        self.mesh_deform(box, ob, md)
-                               if md.type == 'MIRROR':
+                               elif md.type == 'MIRROR':
                                        self.mirror(box, ob, md)
-                               if md.type == 'MULTIRES':
+                               elif md.type == 'MULTIRES':
                                        self.multires(box, ob, md)
-                               if md.type == 'PARTICLE_INSTANCE':
+                               elif md.type == 'PARTICLE_INSTANCE':
                                        self.particleinstance(box, ob, md)
-                               if md.type == 'PARTICLE_SYSTEM':
+                               elif md.type == 'PARTICLE_SYSTEM':
                                        self.particlesystem(box, ob, md)
-                               if md.type == 'SHRINKWRAP':
+                               elif md.type == 'SHRINKWRAP':
                                        self.shrinkwrap(box, ob, md)
-                               if md.type == 'SIMPLE_DEFORM':
+                               elif md.type == 'SIMPLE_DEFORM':
                                        self.simpledeform(box, ob, md)
-                               if md.type == 'SMOOTH':
+                               elif md.type == 'SMOOTH':
                                        self.smooth(box, ob, md)
-                               if md.type == 'SOFTBODY':
+                               elif md.type == 'SOFTBODY':
                                        self.softbody(box, ob, md)
-                               if md.type == 'SUBSURF':
+                               elif md.type == 'SUBSURF':
                                        self.subsurf(box, ob, md)
-                               if md.type == 'UV_PROJECT':
+                               elif md.type == 'SURFACE':
+                                       self.surface(box, ob, md)
+                               elif md.type == 'UV_PROJECT':
                                        self.uvproject(box, ob, md)
-                               if md.type == 'WAVE':
+                               elif md.type == 'WAVE':
                                        self.wave(box, ob, md)
                                                        
        def armature(self, layout, ob, md):
@@ -96,9 +98,9 @@
                layout.itemR(md, "fit_type")
                if md.fit_type == 'FIXED_COUNT':
                        layout.itemR(md, "count")
-               if md.fit_type == 'FIT_LENGTH':
+               elif md.fit_type == 'FIT_LENGTH':
                        layout.itemR(md, "length")
-               if md.fit_type == 'FIT_CURVE':
+               elif md.fit_type == 'FIT_CURVE':
                                layout.itemR(md, "curve")
 
                layout.itemS()
@@ -152,7 +154,7 @@
                if md.limit_method == 'ANGLE':
                        row = layout.row()
                        row.itemR(md, "angle")
-               if md.limit_method == 'WEIGHT':
+               elif md.limit_method == 'WEIGHT':
                        row = layout.row()
                        row.itemR(md, "edge_weight_method", expand=True)
                        
@@ -211,7 +213,7 @@
                layout.itemR(md, "texture_coordinates")
                if md.texture_coordinates == 'OBJECT':
                        layout.itemR(md, "texture_coordinate_object", 
text="Object")
-               if md.texture_coordinates == 'UV' and ob.type == 'MESH':
+               elif md.texture_coordinates == 'UV' and ob.type == 'MESH':
                        layout.item_pointerR(md, "uv_layer", ob.data, 
"uv_layers")
        
        def edgesplit(self, layout, ob, md):
@@ -235,7 +237,7 @@
                # Missing: "Refresh" and "Clear Vertex Group" ?
                
        def fluid(self, layout, ob, md):
-               layout.itemL(text="See Fluidsim panel.")
+               layout.itemL(text="See Fluid panel.")
                
        def hook(self, layout, ob, md):
                layout.itemR(md, "falloff")
@@ -252,7 +254,7 @@
                layout.itemR(md, "mode")
                if md.mode == 'ARMATURE':
                        layout.itemR(md, "armature")
-               if md.mode == 'VERTEX_GROUP':
+               elif md.mode == 'VERTEX_GROUP':
                        layout.item_pointerR(md, "vertex_group", ob, 
"vertex_groups")
                layout.itemR(md, "inverse")
                
@@ -325,7 +327,7 @@
                        col.itemR(md, "positive")
                        col.itemR(md, "cull_front_faces")
                        col.itemR(md, "cull_back_faces")
-               if md.mode == 'NEAREST_SURFACEPOINT':
+               elif md.mode == 'NEAREST_SURFACEPOINT':
                        layout.itemR(md, "keep_above_surface")
                # To-Do: Validate if structs
                
@@ -353,7 +355,7 @@
                layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
                
        def softbody(self, layout, ob, md):
-               layout.itemL(text="See Softbody panel.")
+               layout.itemL(text="See Soft Body panel.")
        
        def subsurf(self, layout, ob, md):
                layout.itemR(md, "subdivision_type")
@@ -362,6 +364,9 @@
                col.itemR(md, "render_levels", text="Render")
                col.itemR(md, "optimal_draw", text="Optimal Display")
                col.itemR(md, "subsurf_uv")
+
+       def surface(self, layout, ob, md):
+               layout.itemL(text="See Fields panel.")
        
        def uvproject(self, layout, ob, md):
                if ob.type == 'MESH':
@@ -404,7 +409,7 @@
                layout.itemR(md, "texture_coordinates")
                if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
                        layout.item_pointerR(md, "uv_layer", ob.data, 
"uv_layers")
-               if md.texture_coordinates == 'OBJECT':
+               elif md.texture_coordinates == 'OBJECT':
                        layout.itemR(md, "texture_coordinates_object")
                
                col = layout.column_flow()

Modified: branches/soc-2009-aligorith/release/ui/buttons_physic_cloth.py
===================================================================
--- branches/soc-2009-aligorith/release/ui/buttons_physic_cloth.py      
2009-07-03 01:10:46 UTC (rev 21329)
+++ branches/soc-2009-aligorith/release/ui/buttons_physic_cloth.py      
2009-07-03 01:57:38 UTC (rev 21330)
@@ -7,48 +7,73 @@
        __context__ = "physics"
 
        def poll(self, context):
-               return (context.cloth != None)
+               return (context.object != None)
                
-class Physic_PT_cloth(PhysicButtonsPanel):
-       __idname__ = "Physic_PT_cloth"
+class PHYSICS_PT_cloth(PhysicButtonsPanel):
+       __idname__ = "PHYSICS_PT_cloth"
        __label__ = "Cloth"
 
        def draw(self, context):
                layout = self.layout
-               cloth = context.cloth.settings
-               
+               md = context.cloth
+               ob = context.object
+
                split = layout.split()
-               
-               col = split.column()
-               col.itemR(cloth, "quality", slider=True)
-               col.itemR(cloth, "gravity")
-               col.itemR(cloth, "mass")
-               col.itemR(cloth, "mass_vertex_group", text="Vertex Group")
+               split.operator_context = "EXEC_DEFAULT"
 
-               col = split.column()
-               col.itemL(text="Stiffness:")
-               col.itemR(cloth, "structural_stiffness", text="Structural")
-               col.itemR(cloth, "bending_stiffness", text="Bending")
-               col.itemL(text="Damping:")
-               col.itemR(cloth, "spring_damping", text="Spring")
-               col.itemR(cloth, "air_damping", text="Air")
-               
-               # Disabled for now
-               """
-               if cloth.mass_vertex_group:
-                       layout.itemL(text="Goal:")
-               
-                       col = layout.column_flow()
-                       col.itemR(cloth, "goal_default", text="Default")
-                       col.itemR(cloth, "goal_spring", text="Stiffness")
-                       col.itemR(cloth, "goal_friction", text="Friction")
-               """
+               if md:
+                       # remove modifier + settings
+                       split.set_context_pointer("modifier", md)
+                       split.itemO("OBJECT_OT_modifier_remove", text="Remove")
 
+                       row = split.row(align=True)
+                       row.itemR(md, "render", text="")
+                       row.itemR(md, "realtime", text="")
+               else:
+                       # add modifier
+                       split.item_enumO("OBJECT_OT_modifier_add", "type", 
"CLOTH", text="Add")
+                       split.itemL()
+
+               if md:
+                       cloth = md.settings
+
+                       split = layout.split()
+                       
+                       col = split.column()
+                       col.itemR(cloth, "quality", slider=True)
+                       col.itemR(cloth, "gravity")
+
+                       subcol = col.column(align=True)
+                       subcol.itemR(cloth, "mass")
+                       subcol.item_pointerR(cloth, "mass_vertex_group", ob, 
"vertex_groups", text="")
+
+                       col = split.column()
+                       col.itemL(text="Stiffness:")
+                       col.itemR(cloth, "structural_stiffness", 
text="Structural")
+                       col.itemR(cloth, "bending_stiffness", text="Bending")
+                       col.itemL(text="Damping:")
+                       col.itemR(cloth, "spring_damping", text="Spring")
+                       col.itemR(cloth, "air_damping", text="Air")
+                       
+                       # Disabled for now
+                       """
+                       if cloth.mass_vertex_group:
+                               layout.itemL(text="Goal:")
+                       
+                               col = layout.column_flow()
+                               col.itemR(cloth, "goal_default", text="Default")
+                               col.itemR(cloth, "goal_spring", 
text="Stiffness")
+                               col.itemR(cloth, "goal_friction", 
text="Friction")
+                       """
+
 class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
        __idname__= "PHYSICS_PT_cloth_cache"
-       __label__ = "Cache"
+       __label__ = "Cloth Cache"
        __default_closed__ = True
 
+       def poll(self, context):
+               return (context.cloth != None)
+
        def draw(self, context):
                layout = self.layout
 
@@ -91,9 +116,12 @@
                row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
                layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics 
to current frame")
                
-class Physic_PT_cloth_collision(PhysicButtonsPanel):
-       __idname__ = "Physic_PT_clothcollision"
+class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
+       __idname__ = "PHYSICS_PT_clothcollision"
        __label__ = "Cloth Collision"
+
+       def poll(self, context):
+               return (context.cloth != None)
        
        def draw_header(self, context):
                layout = self.layout
@@ -120,9 +148,12 @@
                col.itemR(cloth, "self_collision_quality", slider=True)
                col.itemR(cloth, "self_min_distance", text="MinDistance")
 
-class Physic_PT_cloth_stiffness(PhysicButtonsPanel):
-       __idname__ = "Physic_PT_stiffness"
+class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
+       __idname__ = "PHYSICS_PT_stiffness"
        __label__ = "Cloth Stiffness Scaling"
+
+       def poll(self, context):
+               return (context.cloth != None)
        
        def draw_header(self, context):
                layout = self.layout
@@ -132,23 +163,25 @@
 
        def draw(self, context):
                layout = self.layout
+               ob = context.object
                cloth = context.cloth.settings
                
                layout.active = cloth.stiffness_scaling 
                

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