[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20792] branches/bmesh/blender/release/ui: adding files I assumed should be here, heh
Joseph Eagar
joeedh at gmail.com
Wed Jun 10 21:35:16 CEST 2009
Revision: 20792
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20792
Author: joeedh
Date: 2009-06-10 21:35:16 +0200 (Wed, 10 Jun 2009)
Log Message:
-----------
adding files I assumed should be here, heh
Added Paths:
-----------
branches/bmesh/blender/release/ui/buttons_data_mesh.py
branches/bmesh/blender/release/ui/buttons_object_constraint.py
branches/bmesh/blender/release/ui/buttons_particle.py
branches/bmesh/blender/release/ui/buttons_physic_cloth.py
branches/bmesh/blender/release/ui/buttons_texture.py
branches/bmesh/blender/release/ui/space_outliner.py
Added: branches/bmesh/blender/release/ui/buttons_data_mesh.py
===================================================================
--- branches/bmesh/blender/release/ui/buttons_data_mesh.py (rev 0)
+++ branches/bmesh/blender/release/ui/buttons_data_mesh.py 2009-06-10 19:35:16 UTC (rev 20792)
@@ -0,0 +1,34 @@
+
+import bpy
+
+class DataButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "data"
+
+ def poll(self, context):
+ ob = context.active_object
+ return (ob and ob.type == 'MESH')
+
+class DATA_PT_surface(DataButtonsPanel):
+ __idname__ = "DATA_PT_surface"
+ __label__ = "Mesh"
+
+ def draw(self, context):
+ mesh = context.active_object.data
+ layout = self.layout
+
+ split = layout.split()
+
+ col = split.column()
+ col.itemR(mesh, "autosmooth")
+ colsub = col.column()
+ colsub.active = mesh.autosmooth
+ colsub.itemR(mesh, "autosmooth_angle", text="Angle")
+ sub = split.column()
+ sub.itemR(mesh, "vertex_normal_flip")
+ sub.itemR(mesh, "double_sided")
+
+ layout.itemR(mesh, "texco_mesh")
+
+bpy.types.register(DATA_PT_surface)
\ No newline at end of file
Added: branches/bmesh/blender/release/ui/buttons_object_constraint.py
===================================================================
--- branches/bmesh/blender/release/ui/buttons_object_constraint.py (rev 0)
+++ branches/bmesh/blender/release/ui/buttons_object_constraint.py 2009-06-10 19:35:16 UTC (rev 20792)
@@ -0,0 +1,512 @@
+
+import bpy
+
+class ConstraintButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "object"
+
+ def draw_constraint(self, con):
+ layout = self.layout
+ box = layout.template_constraint(con)
+
+ if box:
+ 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"):
+ box.itemR(con, "influence")
+
+ def space_template(self, layout, con, target=True, owner=True):
+ if target or owner:
+ row = layout.row()
+
+ row.itemL(text="Convert:")
+
+ if target:
+ row.itemR(con, "target_space", text="")
+
+ if target and owner:
+ row.itemL(icon=8) # XXX
+
+ if owner:
+ row.itemR(con, "owner_space", text="")
+
+ def target_template(self, layout, con, subtargets=True):
+ layout.itemR(con, "target") # XXX limiting settings for only 'curves' or some type of object
+
+ if con.target and subtargets:
+ if con.target.type == "ARMATURE":
+ layout.itemR(con, "subtarget", text="Bone") # XXX autocomplete
+
+ row = layout.row()
+ row.itemL(text="Head/Tail:")
+ row.itemR(con, "head_tail", text="")
+ 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, "size_like_x", text="X")
+ row.itemR(con, "size_like_y", text="Y")
+ row.itemR(con, "size_like_z", text="Z")
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list