[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [20489] branches/soc-2009-yukishiro: merge with 2.5 from 20445 to 20488
Jingyuan Huang
jingyuan.huang at gmail.com
Fri May 29 06:30:42 CEST 2009
Revision: 20489
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=20489
Author: yukishiro
Date: 2009-05-29 06:30:40 +0200 (Fri, 29 May 2009)
Log Message:
-----------
merge with 2.5 from 20445 to 20488
Modified Paths:
--------------
branches/soc-2009-yukishiro/release/ui/buttons_data_bone.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_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/BKE_context.h
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/context.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/fcurve.c
branches/soc-2009-yukishiro/source/blender/blenkernel/intern/ipo.c
branches/soc-2009-yukishiro/source/blender/blenloader/intern/readfile.c
branches/soc-2009-yukishiro/source/blender/editors/animation/keyframing.c
branches/soc-2009-yukishiro/source/blender/editors/armature/poselib.c
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_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_widgets.c
branches/soc-2009-yukishiro/source/blender/editors/object/object_edit.c
branches/soc-2009-yukishiro/source/blender/editors/screen/screen_ops.c
branches/soc-2009-yukishiro/source/blender/editors/space_graph/graph_draw.c
branches/soc-2009-yukishiro/source/blender/editors/space_info/info_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_outliner/space_outliner.c
branches/soc-2009-yukishiro/source/blender/editors/space_sequencer/sequencer_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_text/text_draw.c
branches/soc-2009-yukishiro/source/blender/editors/space_text/text_ops.c
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_buttons.c
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_header.c
branches/soc-2009-yukishiro/source/blender/editors/space_view3d/view3d_toolbar.c
branches/soc-2009-yukishiro/source/blender/makesdna/DNA_anim_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/RNA_access.h
branches/soc-2009-yukishiro/source/blender/makesrna/RNA_define.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/makesrna.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_access.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_brush.c
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_controller.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_curve.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_define.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_internal_types.h
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_lamp.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_material.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_mesh.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_object.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_particle.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_rna.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_scene.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_sensor.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_space.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_texture.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_ui.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_userdef.c
branches/soc-2009-yukishiro/source/blender/makesrna/intern/rna_world.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_rna.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_ui.c
branches/soc-2009-yukishiro/source/blender/python/intern/bpy_util.c
Added Paths:
-----------
branches/soc-2009-yukishiro/release/ui/buttons_light.py
branches/soc-2009-yukishiro/release/ui/space_outliner.py
Modified: branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_data_bone.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -1,7 +1,7 @@
import bpy
-class DataButtonsPanel(bpy.types.Panel):
+class BoneButtonsPanel(bpy.types.Panel):
__space_type__ = "BUTTONS_WINDOW"
__region_type__ = "WINDOW"
__context__ = "bone"
@@ -10,8 +10,8 @@
ob = context.active_object
return (ob and ob.type == 'ARMATURE')
-class DATA_PT_bone(DataButtonsPanel):
- __idname__ = "DATA_PT_bone"
+class BONE_PT_bone(BoneButtonsPanel):
+ __idname__ = "BONE_PT_bone"
__label__ = "Bone"
def draw(self, context):
@@ -49,16 +49,5 @@
sub.itemR(bone, "cyclic_offset")
-class DATA_PT_constraints(DataButtonsPanel):
- __idname__ = "DATA_PT_constraints"
- __label__ = "Constraints"
-
- def draw(self, context):
- bone = context.active_object.data.bones[0]
- layout = self.layout
- split = layout.split()
-
- sub = split.column()
+bpy.types.register(BONE_PT_bone)
-bpy.types.register(DATA_PT_bone)
-#bpy.types.register(DATA_PT_constraints)
\ No newline at end of file
Added: branches/soc-2009-yukishiro/release/ui/buttons_light.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_light.py (rev 0)
+++ branches/soc-2009-yukishiro/release/ui/buttons_light.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -0,0 +1,16 @@
+
+import bpy
+
+class LightButtonsPanel(bpy.types.Panel):
+ __space_type__ = "BUTTONS_WINDOW"
+ __region_type__ = "WINDOW"
+ __context__ = "light"
+
+class LIGHT_PT_type(LightButtonsPanel):
+ __idname__= "LIGHT_PT_type"
+ __label__ = "Light Environment Type"
+
+ def draw(self, context):
+ layout = self.layout
+
+bpy.types.register(LIGHT_PT_type)
Modified: branches/soc-2009-yukishiro/release/ui/buttons_material.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_material.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_material.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -9,6 +9,16 @@
def poll(self, context):
ob = context.active_object
return (ob and ob.active_material)
+
+class MATERIAL_PT_preview(MaterialButtonsPanel):
+ __idname__= "MATERIAL_PT_preview"
+ __label__ = "Preview"
+
+ def draw(self, context):
+ layout = self.layout
+
+ mat = context.active_object.active_material
+ layout.template_preview(mat)
class MATERIAL_PT_material(MaterialButtonsPanel):
__idname__= "MATERIAL_PT_material"
@@ -188,8 +198,10 @@
sub.itemR(halo, "flare_seed", text="Seed")
sub.itemR(halo, "flares_sub", text="Sub")
+bpy.types.register(MATERIAL_PT_preview)
bpy.types.register(MATERIAL_PT_material)
bpy.types.register(MATERIAL_PT_raymir)
bpy.types.register(MATERIAL_PT_raytransp)
bpy.types.register(MATERIAL_PT_sss)
-bpy.types.register(MATERIAL_PT_halo)
\ No newline at end of file
+bpy.types.register(MATERIAL_PT_halo)
+
Modified: branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_object_constraint.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -1,19 +1,76 @@
import bpy
-class DataButtonsPanel(bpy.types.Panel):
+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 == "COPY_LOCATION":
+ self.copy_location(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 copy_location(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)
+
+ layout.itemR(con, "offset")
+
+ self.space_template(layout, con)
+
+class OBJECT_PT_constraints(ConstraintButtonsPanel):
+ __idname__ = "OBJECT_PT_constraints"
+ __label__ = "Constraints"
+ __context__ = "object"
+
def poll(self, context):
ob = context.active_object
return (ob != None)
-class DATA_PT_constraints(DataButtonsPanel):
- __idname__ = "DATA_PT_constraints"
- __label__ = "Constraints"
-
def draw(self, context):
ob = context.active_object
layout = self.layout
@@ -23,32 +80,29 @@
row.itemL();
for con in ob.constraints:
- box = layout.template_constraint(con)
+ self.draw_constraint(con)
- if box:
- if con.type == 'COPY_LOCATION':
- self.copy_location(box, con)
-
- def copy_location(self, layout, con):
- layout.itemR(con, "target")
+class BONE_PT_constraints(ConstraintButtonsPanel):
+ __idname__ = "BONE_PT_constraints"
+ __label__ = "Constraints"
+ __context__ = "bone"
- if con.target and 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 and con.target.type == "MESH":
- layout.itemR(con, "subtarget", text="Vertex Group") # XXX autocomplete
+ def poll(self, context):
+ ob = context.active_object
+ return (ob and ob.type == "ARMATURE")
+
+ def draw(self, context):
+ ob = context.active_object
+ pchan = ob.pose.pose_channels[0]
+ layout = self.layout
- 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 = layout.row()
+ #row.item_menu_enumO("BONE_OT_constraint_add", "type")
+ #row.itemL();
- layout.itemR(con, "offset")
+ for con in pchan.constraints:
+ self.draw_constraint(con)
-bpy.types.register(DATA_PT_constraints)
+bpy.types.register(OBJECT_PT_constraints)
+bpy.types.register(BONE_PT_constraints)
Modified: branches/soc-2009-yukishiro/release/ui/buttons_objects.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_objects.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_objects.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -39,15 +39,15 @@
for group in bpy.data.groups:
if ob in group.objects:
- box = layout.box()
+ col = layout.column(align=True)
- row = box.row()
- row.itemR(group, "name")
+ row = col.box().row()
+ row.itemR(group, "name", text="")
#row.itemO("OBJECT_OT_remove_group")
- row = box.row()
- row.column().itemR(group, "layer")
- row.column().itemR(group, "dupli_offset")
+ split = col.box().split()
+ split.column().itemR(group, "layer")
+ split.column().itemR(group, "dupli_offset")
class OBJECT_PT_display(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_display"
@@ -131,4 +131,4 @@
bpy.types.register(OBJECT_PT_groups)
bpy.types.register(OBJECT_PT_display)
bpy.types.register(OBJECT_PT_duplication)
-bpy.types.register(OBJECT_PT_animation)
\ No newline at end of file
+bpy.types.register(OBJECT_PT_animation)
Modified: branches/soc-2009-yukishiro/release/ui/buttons_scene.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_scene.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_scene.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -77,10 +77,11 @@
def draw(self, context):
scene = context.scene
+ rd = scene.render_data
+
layout = self.layout
+ layout.active = rd.antialiasing
- rd = scene.render_data
-
split = layout.split()
sub = split.column()
@@ -182,10 +183,11 @@
def draw(self, context):
scene = context.scene
+ rd = scene.render_data
+
layout = self.layout
+ layout.active = rd.stamp
- rd = scene.render_data
-
split = layout.split()
sub = split.column()
@@ -211,4 +213,5 @@
bpy.types.register(RENDER_PT_antialiasing)
bpy.types.register(RENDER_PT_shading)
bpy.types.register(RENDER_PT_output)
-bpy.types.register(RENDER_PT_stamp)
\ No newline at end of file
+bpy.types.register(RENDER_PT_stamp)
+
Modified: branches/soc-2009-yukishiro/release/ui/buttons_texture.py
===================================================================
--- branches/soc-2009-yukishiro/release/ui/buttons_texture.py 2009-05-29 04:21:32 UTC (rev 20488)
+++ branches/soc-2009-yukishiro/release/ui/buttons_texture.py 2009-05-29 04:30:40 UTC (rev 20489)
@@ -10,6 +10,16 @@
try: return (context.active_object.active_material.active_texture.texture != None)
except:return False
+class TEXTURE_PT_preview(TextureButtonsPanel):
+ __idname__= "TEXTURE_PT_preview"
+ __label__ = "Preview"
+
+ def draw(self, context):
+ layout = self.layout
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list