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

Log Message:
-----------
merge from 20520 to 20542

Modified Paths:
--------------
    branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py
    branches/soc-2009-yukishiro/release/ui/buttons_scene.py
    branches/soc-2009-yukishiro/release/ui/buttons_world.py
    branches/soc-2009-yukishiro/source/blender/blenkernel/BKE_modifier.h
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/displist.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/lattice.c
    branches/soc-2009-yukishiro/source/blender/blenkernel/intern/modifier.c
    
branches/soc-2009-yukishiro/source/blender/editors/interface/interface_templates.c
    branches/soc-2009-yukishiro/source/blender/editors/object/object_modifier.c
    branches/soc-2009-yukishiro/source/blender/makesdna/DNA_view3d_types.h
    branches/soc-2009-yukishiro/source/blender/makesrna/RNA_access.h
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_camera.c
    branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_constraint.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_space.c

Modified: branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py 
2009-06-01 04:02:44 UTC (rev 20542)
+++ branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py 
2009-06-01 04:08:04 UTC (rev 20543)
@@ -11,9 +11,47 @@
                box = layout.template_constraint(con)
 
                if box:
-                       if con.type == "COPY_LOCATION":
+                       if con.type == "CHILD_OF":
+                               self.child_of(box, con)
+                       elif con.type == "TRACK_TO":
+                               self.track_to(box, con)
+                       #elif con.type == "IK":
+                       #       self.ik(box, con)
+                       elif con.type == "FOLLOW_PATH":
+                               self.follow_path(box, con)
+                       elif con.type == "LIMIT_ROTATION":
+                               self.limit_rotation(box, con)
+                       elif con.type == "LIMIT_LOCATION":
+                               self.limit_location(box, con)
+                       elif con.type == "LIMIT_SCALE":
+                               self.limit_scale(box, con)
+                       elif con.type == "COPY_ROTATION":
+                               self.copy_rotation(box, con)
+                       elif con.type == "COPY_LOCATION":
                                self.copy_location(box, con)
-
+                       elif con.type == "COPY_SCALE":
+                               self.copy_scale(box, con)
+                       #elif con.type == "SCRIPT":
+                       #       self.script(box, con)
+                       elif con.type == "ACTION":
+                               self.action(box, con)
+                       elif con.type == "LOCKED_TRACK":
+                               self.locked_track(box, con)
+                       elif con.type == "LIMIT_DISTANCE":
+                               self.limit_distance(box, con)
+                       elif con.type == "STRETCH_TO":
+                               self.stretch_to(box, con)
+                       elif con.type == "FLOOR":
+                               self.floor(box, con)
+                       #elif con.type == "RIGID_BODY_JOINT"
+                       #       self.rigid_body(box, con)
+                       elif con.type == "CLAMP_TO":
+                               self.clamp_to(box, con)
+                       elif con.type == "TRANSFORM":
+                               self.transform(box, con)
+                       elif con.type == "SHRINKWRAP":
+                               self.shrinkwrap(box, con)
+                               
                        # show/key buttons here are most likely obsolete now, 
with
                        # keyframing functionality being part of every button
                        if con.type not in ("RIGID_BODY_JOINT", "NULL"):
@@ -47,21 +85,388 @@
                        elif con.target.type in ("MESH", "LATTICE"):
                                layout.itemR(con, "subtarget", text="Vertex 
Group") # XXX autocomplete
        
+       def child_of(self, layout, con):
+               self.target_template(layout, con)
+
+               split = layout.split()
+               
+               sub = split.column()
+               sub.itemL(text="Location:")
+               sub.itemR(con, "locationx", text="X")
+               sub.itemR(con, "locationy", text="Y")
+               sub.itemR(con, "locationz", text="Z")
+               
+               sub = split.column()
+               sub.itemL(text="Rotation:")
+               sub.itemR(con, "rotationx", text="X")
+               sub.itemR(con, "rotationy", text="Y")
+               sub.itemR(con, "rotationz", text="Z")
+               
+               sub = split.column()
+               sub.itemL(text="Scale:")
+               sub.itemR(con, "sizex", text="X")
+               sub.itemR(con, "sizey", text="Y")
+               sub.itemR(con, "sizez", text="Z")
+               
+               # Missing
+               row = layout.row()
+               row.itemL(text="SET OFFSET")
+               row.itemL(text="CLEAR OFFSET")
+               
+       def track_to(self, layout, con):
+               self.target_template(layout, con)
+               
+               row = layout.row()
+               row.itemL(text="To:")
+               row.itemR(con, "track", expand=True)
+               
+               row = layout.row()
+               row.itemR(con, "up", text="Up")
+               row.itemR(con, "target_z")
+               
+               self.space_template(layout, con)
+               
+       #def ik(self, layout, con):
+       
+       def follow_path(self, layout, con):
+               self.target_template(layout, con)
+               
+               row = layout.row()
+               row.itemR(con, "curve_follow", toggle=True)
+               row.itemR(con, "offset")
+               
+               row = layout.row()
+               row.itemL(text="Forward:")
+               row.itemR(con, "forward", expand=True)
+               
+               row = layout.row()
+               row.itemR(con, "up", text="Up")
+               row.itemL()
+               
+       def limit_rotation(self, layout, con):
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.itemR(con, "use_limit_x")
+               colsub = col.column()
+               colsub.active = con.use_limit_x
+               colsub.itemR(con, "minimum_x", text="Min")
+               colsub.itemR(con, "maximum_x", text="Max")
+               
+               col = split.column()
+               col.itemR(con, "use_limit_y")
+               colsub = col.column()
+               colsub.active = con.use_limit_y
+               colsub.itemR(con, "minimum_y", text="Min")
+               colsub.itemR(con, "maximum_y", text="Max")
+               
+               col = split.column()
+               col.itemR(con, "use_limit_z")
+               colsub = col.column()
+               colsub.active = con.use_limit_z
+               colsub.itemR(con, "minimum_z", text="Min")
+               colsub.itemR(con, "maximum_z", text="Max")
+               
+               row = layout.row()
+               row.itemR(con, "limit_transform")
+               row.itemL()
+               
+               row = layout.row()
+               row.itemL(text="Convert:")
+               row.itemR(con, "owner_space", text="")
+               
+       def limit_location(self, layout, con):
+               split = layout.split()
+               
+               col = split.column()
+               col.itemR(con, "use_minimum_x")
+               colsub = col.column()
+               colsub.active = con.use_minimum_x
+               colsub.itemR(con, "minimum_x", text="")
+               col.itemR(con, "use_maximum_x")
+               colsub = col.column()
+               colsub.active = con.use_maximum_x
+               colsub.itemR(con, "maximum_x", text="")
+               
+               col = split.column()
+               col.itemR(con, "use_minimum_y")
+               colsub = col.column()
+               colsub.active = con.use_minimum_y
+               colsub.itemR(con, "minimum_y", text="")
+               col.itemR(con, "use_maximum_y")
+               colsub = col.column()
+               colsub.active = con.use_maximum_y
+               colsub.itemR(con, "maximum_y", text="")
+               
+               col = split.column()
+               col.itemR(con, "use_minimum_z")
+               colsub = col.column()
+               colsub.active = con.use_minimum_z
+               colsub.itemR(con, "minimum_z", text="")
+               col.itemR(con, "use_maximum_z")
+               colsub = col.column()
+               colsub.active = con.use_maximum_z
+               colsub.itemR(con, "maximum_z", text="")
+       
+               row = layout.row()
+               row.itemR(con, "limit_transform")
+               row.itemL()
+               
+               row = layout.row()
+               row.itemL(text="Convert:")
+               row.itemR(con, "owner_space", text="")
+               
+       def limit_scale(self, layout, con):
+               split = layout.split()
+
+               col = split.column()
+               col.itemR(con, "use_minimum_x")
+               colsub = col.column()
+               colsub.active = con.use_minimum_x
+               colsub.itemR(con, "minimum_x", text="")
+               col.itemR(con, "use_maximum_x")
+               colsub = col.column()
+               colsub.active = con.use_maximum_x
+               colsub.itemR(con, "maximum_x", text="")
+               
+               col = split.column()
+               col.itemR(con, "use_minimum_y")
+               colsub = col.column()
+               colsub.active = con.use_minimum_y
+               colsub.itemR(con, "minimum_y", text="")
+               col.itemR(con, "use_maximum_y")
+               colsub = col.column()
+               colsub.active = con.use_maximum_y
+               colsub.itemR(con, "maximum_y", text="")
+               
+               col = split.column()
+               col.itemR(con, "use_minimum_z")
+               colsub = col.column()
+               colsub.active = con.use_minimum_z
+               colsub.itemR(con, "minimum_z", text="")
+               col.itemR(con, "use_maximum_z")
+               colsub = col.column()
+               colsub.active = con.use_maximum_z
+               colsub.itemR(con, "maximum_z", text="")
+               
+               row = layout.row()
+               row.itemR(con, "limit_transform")
+               row.itemL()
+               
+               row = layout.row()
+               row.itemL(text="Convert:")
+               row.itemR(con, "owner_space", text="")
+       
+       def copy_rotation(self, layout, con):
+               self.target_template(layout, con)
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.itemR(con, "rotate_like_x", text="X")
+               colsub = col.column()
+               colsub.active = con.rotate_like_x
+               colsub.itemR(con, "invert_x", text="Invert")
+               
+               col = split.column()
+               col.itemR(con, "rotate_like_y", text="Y")
+               colsub = col.column()
+               colsub.active = con.rotate_like_y
+               colsub.itemR(con, "invert_y", text="Invert")
+               
+               col = split.column()
+               col.itemR(con, "rotate_like_z", text="Z")
+               colsub = col.column()
+               colsub.active = con.rotate_like_z
+               colsub.itemR(con, "invert_z", text="Invert")
+
+               layout.itemR(con, "offset")
+               
+               self.space_template(layout, con)
+               
        def copy_location(self, layout, con):
                self.target_template(layout, con)
                
+               split = layout.split()
+               
+               col = split.column()
+               col.itemR(con, "locate_like_x", text="X")
+               colsub = col.column()
+               colsub.active = con.locate_like_x
+               colsub.itemR(con, "invert_x", text="Invert")
+               
+               col = split.column()
+               col.itemR(con, "locate_like_y", text="Y")
+               colsub = col.column()
+               colsub.active = con.locate_like_y
+               colsub.itemR(con, "invert_y", text="Invert")
+               
+               col = split.column()
+               col.itemR(con, "locate_like_z", text="Z")
+               colsub = col.column()
+               colsub.active = con.locate_like_z
+               colsub.itemR(con, "invert_z", text="Invert")
+
+               layout.itemR(con, "offset")
+                       
+               self.space_template(layout, con)
+               
+       def copy_scale(self, layout, con):
+               self.target_template(layout, con)
+               
                row = layout.row(align=True)
-               row.itemR(con, "locate_like_x", text="X", toggle=True)
-               row.itemR(con, "invert_x", text="-", toggle=True)
-               row.itemR(con, "locate_like_y", text="Y", toggle=True)
-               row.itemR(con, "invert_y", text="-", toggle=True)
-               row.itemR(con, "locate_like_z", text="Z", toggle=True)
-               row.itemR(con, "invert_z", text="-", toggle=True)
+               row.itemR(con, "size_like_x", text="X")
+               row.itemR(con, "size_like_y", text="Y")
+               row.itemR(con, "size_like_z", text="Z")
 
                layout.itemR(con, "offset")
+               
+               self.space_template(layout, con)
+               
+       #def script(self, layout, con):
+       
+       def action(self, layout, con):
+               self.target_template(layout, con)
+               
+               layout.itemR(con, "action")
+               layout.itemR(con, "transform_channel")
 
+               split = layout.split()
+       
+               col = split.column(align=True)
+               col.itemR(con, "start_frame", text="Start")
+               col.itemR(con, "end_frame", text="End")
+               
+               col = split.column(align=True)
+               col.itemR(con, "minimum", text="Min")
+               col.itemR(con, "maximum", text="Max")
+               
+               row = layout.row()
+               row.itemL(text="Convert:")
+               row.itemR(con, "owner_space", text="")
+       
+       def locked_track(self, layout, con):
+               self.target_template(layout, con)
+               
+               row = layout.row()
+               row.itemL(text="To:")
+               row.itemR(con, "track", expand=True)
+               
+               row = layout.row()
+               row.itemL(text="Lock:")
+               row.itemR(con, "locked", expand=True)
+               
+       def limit_distance(self, layout, con):
+               self.target_template(layout, con)
+               
+               layout.itemR(con, "distance")
+               
+               row = layout.row()
+               row.itemL(text="Clamp Region:")
+               row.itemR(con, "limit_mode", text="")
+               #Missing: Recalculate Button
+               
+       def stretch_to(self, layout, con):
+               self.target_template(layout, con)
+               
+               row = layout.row()
+               row.itemR(con, "original_length", text="Rest Length")
+               row.itemR(con, "bulge", text="Volume Variation")
+               
+               row = layout.row()
+               row.itemL(text="Volume:")
+               row.itemR(con, "volume", expand=True)
+               row.itemL(text="Plane:")
+               row.itemR(con, "keep_axis", expand=True)
+               #Missing: Recalculate Button
+               
+       def floor(self, layout, con):
+               self.target_template(layout, con)
+               
+               row = layout.row()
+               row.itemR(con, "sticky")
+               row.itemR(con, "use_rotation")
+               
+               layout.itemR(con, "offset")
+               
+               row = layout.row()

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