Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/ui/buttons_objects.py')
-rw-r--r--release/ui/buttons_objects.py27
1 files changed, 18 insertions, 9 deletions
diff --git a/release/ui/buttons_objects.py b/release/ui/buttons_objects.py
index 6d75146fe5f..59e19d05959 100644
--- a/release/ui/buttons_objects.py
+++ b/release/ui/buttons_objects.py
@@ -6,16 +6,25 @@ class ObjectButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "object"
- def poll(self, context):
- return (context.object != None)
+class OBJECT_PT_context_object(ObjectButtonsPanel):
+ __idname__ = "OBJECT_PT_context_object"
+ __no_header__ = True
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ split = layout.split(percentage=0.06)
+ split.itemL(text="", icon="ICON_OBJECT_DATA")
+ split.itemR(ob, "name", text="")
class OBJECT_PT_transform(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_transform"
__label__ = "Transform"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.column().itemR(ob, "location")
@@ -27,8 +36,8 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
__label__ = "Groups"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "pass_index")
@@ -38,7 +47,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
# layout.itemO("OBJECT_OT_add_group");
for group in bpy.data.groups:
- if ob in group.objects:
+ if ob.name in group.objects:
col = layout.column(align=True)
row = col.box().row()
@@ -54,8 +63,8 @@ class OBJECT_PT_display(ObjectButtonsPanel):
__label__ = "Display"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
row = layout.row()
row.itemR(ob, "max_draw_type", text="Type")
@@ -74,8 +83,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
__label__ = "Duplication"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
layout.itemR(ob, "dupli_type", expand=True)
@@ -108,8 +117,8 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
__label__ = "Animation"
def draw(self, context):
- ob = context.object
layout = self.layout
+ ob = context.object
split = layout.split()
@@ -127,9 +136,9 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
sub.itemR(ob, "up_axis", text="Up Axis")
sub.itemR(ob, "track_rotation", text="Rotation")
+bpy.types.register(OBJECT_PT_context_object)
bpy.types.register(OBJECT_PT_transform)
bpy.types.register(OBJECT_PT_groups)
bpy.types.register(OBJECT_PT_display)
bpy.types.register(OBJECT_PT_duplication)
bpy.types.register(OBJECT_PT_animation)
-