| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | # ##### BEGIN GPL LICENSE BLOCK ##### | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | #  This program is free software; you can redistribute it and/or | 
					
						
							|  |  |  | #  modify it under the terms of the GNU General Public License | 
					
						
							|  |  |  | #  as published by the Free Software Foundation; either version 2 | 
					
						
							|  |  |  | #  of the License, or (at your option) any later version. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  This program is distributed in the hope that it will be useful, | 
					
						
							|  |  |  | #  but WITHOUT ANY WARRANTY; without even the implied warranty of | 
					
						
							|  |  |  | #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
					
						
							|  |  |  | #  GNU General Public License for more details. | 
					
						
							| 
									
										
										
										
											2009-11-03 07:23:02 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2009-11-01 15:21:20 +00:00
										 |  |  | #  You should have received a copy of the GNU General Public License | 
					
						
							|  |  |  | #  along with this program; if not, write to the Free Software Foundation, | 
					
						
							|  |  |  | #  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | # ##### END GPL LICENSE BLOCK ##### | 
					
						
							| 
									
										
										
										
											2009-10-31 20:16:59 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | # <pep8 compliant> | 
					
						
							| 
									
										
										
										
											2009-04-11 16:17:39 +00:00
										 |  |  | import bpy | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  | narrowui = 180 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class ObjectButtonsPanel(bpy.types.Panel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_space_type = 'PROPERTIES' | 
					
						
							|  |  |  |     bl_region_type = 'WINDOW' | 
					
						
							|  |  |  |     bl_context = "object" | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-09 09:42:34 +00:00
										 |  |  | class OBJECT_PT_context_object(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "" | 
					
						
							|  |  |  |     bl_show_header = False | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  |         row.itemL(text="", icon='ICON_OBJECT_DATA') | 
					
						
							|  |  |  |         row.itemR(ob, "name", text="") | 
					
						
							| 
									
										
										
										
											2009-07-09 16:09:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class OBJECT_PT_transform(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Transform" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             row = layout.row() | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             row.column().itemR(ob, "location") | 
					
						
							|  |  |  |             if ob.rotation_mode == 'QUATERNION': | 
					
						
							|  |  |  |                 row.column().itemR(ob, "rotation_quaternion", text="Rotation") | 
					
						
							|  |  |  |             elif ob.rotation_mode == 'AXIS_ANGLE': | 
					
						
							|  |  |  |                 #row.column().itemL(text="Rotation") | 
					
						
							|  |  |  |                 #row.column().itemR(pchan, "rotation_angle", text="Angle") | 
					
						
							|  |  |  |                 #row.column().itemR(pchan, "rotation_axis", text="Axis") | 
					
						
							|  |  |  |                 row.column().itemR(ob, "rotation_axis_angle", text="Rotation") | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 row.column().itemR(ob, "rotation_euler", text="Rotation") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             row.column().itemR(ob, "scale") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             layout.itemR(ob, "rotation_mode") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         else: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col = layout.column() | 
					
						
							|  |  |  |             col.itemR(ob, "location") | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |             col.itemL(text="Rotation:") | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col.itemR(ob, "rotation_mode", text="") | 
					
						
							|  |  |  |             if ob.rotation_mode == 'QUATERNION': | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |                 col.itemR(ob, "rotation_quaternion", text="") | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             elif ob.rotation_mode == 'AXIS_ANGLE': | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |                 col.itemR(ob, "rotation_axis_angle", text="") | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2009-11-12 21:44:35 +00:00
										 |  |  |                 col.itemR(ob, "rotation_euler", text="") | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col.itemR(ob, "scale") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-09-28 10:19:20 +00:00
										 |  |  | class OBJECT_PT_transform_locks(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Transform Locks" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         # wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         row = layout.row() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = row.column() | 
					
						
							| 
									
										
										
										
											2009-11-08 11:07:00 +00:00
										 |  |  |         col.itemR(ob, "lock_location", text="Location") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         col = row.column() | 
					
						
							|  |  |  |         if ob.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'): | 
					
						
							| 
									
										
										
										
											2009-11-08 11:07:00 +00:00
										 |  |  |             col.itemR(ob, "lock_rotations_4d", text="Rotation") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             if ob.lock_rotations_4d: | 
					
						
							|  |  |  |                 col.itemR(ob, "lock_rotation_w", text="W") | 
					
						
							|  |  |  |             col.itemR(ob, "lock_rotation", text="") | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             col.itemR(ob, "lock_rotation", text="Rotation") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-08 11:07:00 +00:00
										 |  |  |         row.column().itemR(ob, "lock_scale", text="Scale") | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-14 20:27:28 +00:00
										 |  |  | class OBJECT_PT_relations(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Relations" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.itemR(ob, "layers") | 
					
						
							|  |  |  |         col.itemS() | 
					
						
							|  |  |  |         col.itemR(ob, "pass_index") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col.itemL(text="Parent:") | 
					
						
							|  |  |  |         col.itemR(ob, "parent", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         sub = col.column() | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |         sub.itemR(ob, "parent_type", text="") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         parent = ob.parent | 
					
						
							|  |  |  |         if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE': | 
					
						
							|  |  |  |             sub.item_pointerR(ob, "parent_bone", parent.data, "bones", text="") | 
					
						
							|  |  |  |         sub.active = parent != None | 
					
						
							| 
									
										
										
										
											2009-07-14 20:27:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class OBJECT_PT_groups(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Groups" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             split = layout.split() | 
					
						
							|  |  |  |             split.item_menu_enumO("object.group_add", "group", text="Add to Group") | 
					
						
							|  |  |  |             split.itemL() | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             layout.item_menu_enumO("object.group_add", "group", text="Add to Group") | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         for group in bpy.data.groups: | 
					
						
							|  |  |  |             if ob.name in group.objects: | 
					
						
							|  |  |  |                 col = layout.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 col.set_context_pointer("group", group) | 
					
						
							| 
									
										
										
										
											2009-07-14 20:27:28 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 row = col.box().row() | 
					
						
							|  |  |  |                 row.itemR(group, "name", text="") | 
					
						
							|  |  |  |                 row.itemO("object.group_remove", text="", icon='VICON_X') | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |                 split = col.box().split() | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |                 col = split.column() | 
					
						
							|  |  |  |                 col.itemR(group, "layer", text="Dupli") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |                 if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |                     col = split.column() | 
					
						
							|  |  |  |                 col.itemR(group, "dupli_offset", text="") | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class OBJECT_PT_display(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Display" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.itemR(ob, "max_draw_type", text="Type") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.itemR(ob, "draw_bounds", text="Bounds") | 
					
						
							|  |  |  |         sub = row.row() | 
					
						
							|  |  |  |         sub.active = ob.draw_bounds | 
					
						
							|  |  |  |         sub.itemR(ob, "draw_bounds_type", text="") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |         split = layout.split() | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.itemR(ob, "draw_name", text="Name") | 
					
						
							|  |  |  |         col.itemR(ob, "draw_axis", text="Axis") | 
					
						
							|  |  |  |         col.itemR(ob, "draw_wire", text="Wire") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col = split.column() | 
					
						
							|  |  |  |         col.itemR(ob, "draw_texture_space", text="Texture Space") | 
					
						
							|  |  |  |         col.itemR(ob, "x_ray", text="X-Ray") | 
					
						
							|  |  |  |         col.itemR(ob, "draw_transparent", text="Transparency") | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class OBJECT_PT_duplication(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Duplication" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             layout.itemR(ob, "dupli_type", expand=True) | 
					
						
							|  |  |  |         else: | 
					
						
							|  |  |  |             layout.itemR(ob, "dupli_type", text="") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         if ob.dupli_type == 'FRAMES': | 
					
						
							|  |  |  |             split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column(align=True) | 
					
						
							|  |  |  |             col.itemR(ob, "dupli_frames_start", text="Start") | 
					
						
							|  |  |  |             col.itemR(ob, "dupli_frames_end", text="End") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |                 col = split.column(align=True) | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |             col.itemR(ob, "dupli_frames_on", text="On") | 
					
						
							|  |  |  |             col.itemR(ob, "dupli_frames_off", text="Off") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             layout.itemR(ob, "dupli_frames_no_speed", text="No Speed") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         elif ob.dupli_type == 'VERTS': | 
					
						
							|  |  |  |             layout.itemR(ob, "dupli_verts_rotation", text="Rotation") | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         elif ob.dupli_type == 'FACES': | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             col = split.column() | 
					
						
							|  |  |  |             col.itemR(ob, "dupli_faces_scale", text="Scale") | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |                 col = split.column() | 
					
						
							|  |  |  |             col.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale") | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |         elif ob.dupli_type == 'GROUP': | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |             if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |                 layout.itemR(ob, "dupli_group", text="Group") | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 layout.itemR(ob, "dupli_group", text="") | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 23:35:56 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | class OBJECT_PT_animation(ObjectButtonsPanel): | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |     bl_label = "Animation" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         layout = self.layout | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         ob = context.object | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         wide_ui = context.region.width > narrowui | 
					
						
							| 
									
										
										
										
											2009-11-14 13:35:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         split = layout.split() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         col = split.column() | 
					
						
							|  |  |  |         col.itemL(text="Time Offset:") | 
					
						
							|  |  |  |         col.itemR(ob, "time_offset_edit", text="Edit") | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.itemR(ob, "time_offset_particle", text="Particle") | 
					
						
							|  |  |  |         row.active = len(ob.particle_systems) != 0 | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.itemR(ob, "time_offset_parent", text="Parent") | 
					
						
							|  |  |  |         row.active = ob.parent != None | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.itemR(ob, "slow_parent") | 
					
						
							|  |  |  |         row.active = ob.parent != None | 
					
						
							|  |  |  |         col.itemR(ob, "time_offset", text="Offset") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-19 13:26:51 +00:00
										 |  |  |         if wide_ui: | 
					
						
							| 
									
										
										
										
											2009-11-12 12:35:37 +00:00
										 |  |  |             col = split.column() | 
					
						
							| 
									
										
										
										
											2009-10-31 19:31:45 +00:00
										 |  |  |         col.itemL(text="Track:") | 
					
						
							|  |  |  |         col.itemR(ob, "track", text="") | 
					
						
							|  |  |  |         col.itemR(ob, "track_axis", text="Axis") | 
					
						
							|  |  |  |         col.itemR(ob, "up_axis", text="Up Axis") | 
					
						
							|  |  |  |         row = col.row() | 
					
						
							|  |  |  |         row.itemR(ob, "track_override_parent", text="Override Parent") | 
					
						
							|  |  |  |         row.active = ob.parent != None | 
					
						
							| 
									
										
										
										
											2009-04-11 02:18:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 22:53:28 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | class OBJECT_PT_properties(ObjectButtonsPanel): | 
					
						
							|  |  |  |     bl_label = "Properties" | 
					
						
							|  |  |  |     bl_default_closed = True | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def draw(self, context): | 
					
						
							|  |  |  |         import rna_prop_ui | 
					
						
							|  |  |  |         # reload(rna_prop_ui) | 
					
						
							| 
									
										
										
										
											2009-11-18 20:01:35 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-11-16 22:53:28 +00:00
										 |  |  |         rna_prop_ui.draw(self.layout, context, "object") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-07-09 09:42:34 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_context_object) | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_transform) | 
					
						
							| 
									
										
										
										
											2009-09-28 10:19:20 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_transform_locks) | 
					
						
							| 
									
										
										
										
											2009-07-14 20:27:28 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_relations) | 
					
						
							| 
									
										
										
										
											2009-04-19 13:37:59 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_groups) | 
					
						
							|  |  |  | bpy.types.register(OBJECT_PT_display) | 
					
						
							|  |  |  | bpy.types.register(OBJECT_PT_duplication) | 
					
						
							| 
									
										
										
										
											2009-07-09 19:45:27 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_animation) | 
					
						
							| 
									
										
										
										
											2009-11-16 22:53:28 +00:00
										 |  |  | bpy.types.register(OBJECT_PT_properties) |