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.py66
1 files changed, 27 insertions, 39 deletions
diff --git a/release/ui/buttons_objects.py b/release/ui/buttons_objects.py
index c0e1f439df8..6d75146fe5f 100644
--- a/release/ui/buttons_objects.py
+++ b/release/ui/buttons_objects.py
@@ -7,14 +7,14 @@ class ObjectButtonsPanel(bpy.types.Panel):
__context__ = "object"
def poll(self, context):
- return (context.active_object != None)
+ return (context.object != None)
class OBJECT_PT_transform(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_transform"
__label__ = "Transform"
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
row = layout.row()
@@ -27,7 +27,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
__label__ = "Groups"
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
row = layout.row()
@@ -39,22 +39,22 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
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"
__label__ = "Display"
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
row = layout.row()
@@ -74,13 +74,12 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
__label__ = "Duplication"
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
- row = layout.row()
- row.itemR(ob, "dupli_type", expand=True)
+ layout.itemR(ob, "dupli_type", expand=True)
- if ob.dupli_type == "FRAMES":
+ if ob.dupli_type == 'FRAMES':
split = layout.split()
sub = split.column(align=True)
@@ -91,41 +90,30 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
sub.itemR(ob, "dupli_frames_on", text="On")
sub.itemR(ob, "dupli_frames_off", text="Off")
- split = layout.split()
- sub = split.column()
- sub.itemR(ob, "dupli_frames_no_speed", text="No Speed")
+ layout.itemR(ob, "dupli_frames_no_speed", text="No Speed")
- elif ob.dupli_type == "VERTS":
- split = layout.split()
-
- sub = split.column(align=True)
- sub.itemR(ob, "dupli_verts_rotation", text="Rotation")
+ elif ob.dupli_type == 'VERTS':
+ layout.itemR(ob, "dupli_verts_rotation", text="Rotation")
- elif ob.dupli_type == "FACES":
- split = layout.split()
-
- sub = split.column()
- sub.itemR(ob, "dupli_faces_scale", text="Scale")
- sub = split.column()
- sub.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
+ elif ob.dupli_type == 'FACES':
+ row = layout.row()
+ row.itemR(ob, "dupli_faces_scale", text="Scale")
+ row.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
- elif ob.dupli_type == "GROUP":
- split = layout.split()
-
- sub = split.column(align=True)
- sub.itemR(ob, "dupli_group", text="Group")
+ elif ob.dupli_type == 'GROUP':
+ layout.itemR(ob, "dupli_group", text="Group")
class OBJECT_PT_animation(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_animation"
__label__ = "Animation"
def draw(self, context):
- ob = context.active_object
+ ob = context.object
layout = self.layout
-
- row = layout.row()
- sub = row.column()
+ split = layout.split()
+
+ sub = split.column()
sub.itemL(text="Time Offset:")
sub.itemR(ob, "time_offset_edit", text="Edit")
sub.itemR(ob, "time_offset_particle", text="Particle")
@@ -133,7 +121,7 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
sub.itemR(ob, "slow_parent")
sub.itemR(ob, "time_offset", text="Offset")
- sub = row.column()
+ sub = split.column()
sub.itemL(text="Tracking:")
sub.itemR(ob, "track_axis", text="Axis")
sub.itemR(ob, "up_axis", text="Up Axis")