synched with trunk at revision 36569
[blender.git] / release / scripts / startup / bl_ui / properties_scene.py
similarity index 82%
rename from release/scripts/ui/properties_scene.py
rename to release/scripts/startup/bl_ui/properties_scene.py
index 51fe7c9..ce5ac0c 100644 (file)
@@ -55,14 +55,10 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
         col.row().prop(unit, "system", expand=True)
         col.row().prop(unit, "system_rotation", expand=True)
 
-        split = layout.split()
-        split.active = (unit.system != 'NONE')
-
-        col = split.column()
-        col.prop(unit, "scale_length", text="Scale")
-
-        col = split.column()
-        col.prop(unit, "use_separate")
+        row = layout.row()
+        row.active = (unit.system != 'NONE')
+        row.prop(unit, "scale_length", text="Scale")
+        row.prop(unit, "use_separate")
 
 
 class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
@@ -199,9 +195,6 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "scene"
     _property_type = bpy.types.Scene
 
-
-from bpy.props import *
-
 #  XXX, move operator to op/ dir
 
 
@@ -310,83 +303,75 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
         return {'RUNNING_MODAL'}
 
 class SCENE_PT_navmesh(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Navmesh"
-    bl_default_closed = True
-    COMPAT_ENGINES = {'BLENDER_GAME'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        rd = context.scene.game_settings.recast_data
-
-        layout.operator("object.create_navmesh", text='Build navigation mesh')
-
-        layout.label(text="Rasterization:")
-        split = layout.split()
-
-        col = split.column()
-        col.prop(rd, "cell_size")
-        col = split.column()
-        col.prop(rd, "cell_height")
-
-        layout.separator()
-
-        layout.label(text="Agent:")
-        split = layout.split()
-
-        col = split.column()
-        row = col.row()
-        row.prop(rd, "agent_height")
-        row = col.row()
-        row.prop(rd, "agent_radius")
-
-        col = split.column()
-        row = col.row()
-        row.prop(rd, "max_slope")
-        row = col.row()
-        row.prop(rd, "max_climb")
-
-        layout.separator()
-
-        layout.label(text="Region:")
-        split = layout.split()
-        col = split.column()
-        col.prop(rd, "region_min_size")
-
-        col = split.column()
-        col.prop(rd, "region_merge_size")
-
-        layout.separator()
-
-        layout.label(text="Polygonization:")
-        split = layout.split()
-        col = split.column()
-        row = col.row()
-        row.prop(rd, "edge_max_len")
-        row = col.row()
-        row.prop(rd, "edge_max_error")
-
-        col = split.column()
-        row = col.row()
-        row.prop(rd, "verts_per_poly")
-
-        layout.separator()
-
-        layout.label(text="Detail Mesh:")
-        split = layout.split()
-        col = split.column()
-        col.prop(rd, "sample_dist")
-
-        col = split.column()
-        col.prop(rd, "sample_max_error")
-
-
-def register():
+     bl_label = "Navmesh"
+     bl_default_closed = True
+     COMPAT_ENGINES = {'BLENDER_GAME'}
+     def draw(self, context):
+         layout = self.layout
+         rd = context.scene.game_settings.recast_data
+         layout.operator("object.create_navmesh", text='Build navigation mesh')
+         layout.label(text="Rasterization:")
+         split = layout.split()
+         col = split.column()
+         col.prop(rd, "cell_size")
+         col = split.column()
+         col.prop(rd, "cell_height")
+         layout.separator()
+         layout.label(text="Agent:")
+         split = layout.split()
+         col = split.column()
+         row = col.row()
+         row.prop(rd, "agent_height")
+         row = col.row()
+         row.prop(rd, "agent_radius")
+         col = split.column()
+         row = col.row()
+         row.prop(rd, "max_slope")
+         row = col.row()
+         row.prop(rd, "max_climb")
+         layout.separator()
+         layout.label(text="Region:")
+         split = layout.split()
+         col = split.column()
+         col.prop(rd, "region_min_size")
+         col = split.column()
+         col.prop(rd, "region_merge_size")
+         layout.separator()
+         layout.label(text="Polygonization:")
+         split = layout.split()
+         col = split.column()
+         row = col.row()
+         row.prop(rd, "edge_max_len")
+         row = col.row()
+         row.prop(rd, "edge_max_error")
+         col = split.column()
+         row = col.row()
+         row.prop(rd, "verts_per_poly")
+         layout.separator()
+         layout.label(text="Detail Mesh:")
+         split = layout.split()
+         col = split.column()
+         col.prop(rd, "sample_dist")
+         col = split.column()
+         col.prop(rd, "sample_max_error")
+
+if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
-
-
-def unregister():
-    bpy.utils.unregister_module(__name__)
-
-if __name__ == "__main__":
-    register()