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:
authorThomas Dinges <blender@dingto.org>2013-12-18 10:35:05 +0400
committerThomas Dinges <blender@dingto.org>2013-12-18 10:35:05 +0400
commitf5616bf8b2d87b0a2fcc17491f327a8eb74cb390 (patch)
tree0e15aa6a2ef31604934ff5d0417a3d4e21137301 /release
parentd963bdf7d9f39b87ef6698ca7f267b3af58160e4 (diff)
Code cleanup: Game Engine related panels belong into properties_game.py.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py52
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py46
2 files changed, 52 insertions, 46 deletions
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index fdbe02ebd47..503b3cd234c 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
-from bpy.types import Panel
+from bpy.types import Panel, Menu
class PhysicsButtonsPanel():
@@ -749,5 +749,55 @@ class DATA_PT_shadow_game(DataButtonsPanel, Panel):
row.prop(lamp, "shadow_frustum_size", text="Frustum Size")
+class ObjectButtonsPanel():
+ bl_space_type = 'PROPERTIES'
+ bl_region_type = 'WINDOW'
+ bl_context = "object"
+
+
+class OBJECT_MT_lod_tools(Menu):
+ bl_label = "Level Of Detail Tools"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("object.lod_by_name", text="Set By Name")
+ layout.operator("object.lod_generate", text="Generate")
+ layout.operator("object.lod_clear_all", text="Clear All", icon='PANEL_CLOSE')
+
+
+class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
+ bl_label = "Levels of Detail"
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+
+ @classmethod
+ def poll(cls, context):
+ return context.scene.render.engine in cls.COMPAT_ENGINES
+
+ def draw(self, context):
+ layout = self.layout
+ ob = context.object
+
+ col = layout.column()
+
+ for i, level in enumerate(ob.lod_levels):
+ if i == 0:
+ continue
+ box = col.box()
+ row = box.row()
+ row.prop(level, "object", text="")
+ row.operator("object.lod_remove", text="", icon='PANEL_CLOSE').index = i
+
+ row = box.row()
+ row.prop(level, "distance")
+ row = row.row(align=True)
+ row.prop(level, "use_mesh", text="")
+ row.prop(level, "use_material", text="")
+
+ row = col.row(align=True)
+ row.operator("object.lod_add", text="Add", icon='ZOOMIN')
+ row.menu("OBJECT_MT_lod_tools", text="", icon='TRIA_DOWN')
+
+
if __name__ == "__main__": # only for live edit.
bpy.utils.register_module(__name__)
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 38975b8459d..cbebdafbf2e 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -18,7 +18,7 @@
# <pep8 compliant>
import bpy
-from bpy.types import Menu, Panel
+from bpy.types import Panel
from rna_prop_ui import PropertyPanel
@@ -125,50 +125,6 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
sub.prop(ob, "lock_rotation_w", text="W")
-class OBJECT_MT_lod_tools(Menu):
- bl_label = "Level Of Detail Tools"
-
- def draw(self, context):
- layout = self.layout
-
- layout.operator("object.lod_by_name", text="Set By Name")
- layout.operator("object.lod_generate", text="Generate")
- layout.operator("object.lod_clear_all", text="Clear All", icon='PANEL_CLOSE')
-
-
-class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel):
- bl_label = "Levels of Detail"
- COMPAT_ENGINES = {'BLENDER_GAME'}
-
- @classmethod
- def poll(cls, context):
- return context.scene.render.engine in cls.COMPAT_ENGINES
-
- def draw(self, context):
- layout = self.layout
- ob = context.object
-
- col = layout.column()
-
- for i, level in enumerate(ob.lod_levels):
- if i == 0:
- continue
- box = col.box()
- row = box.row()
- row.prop(level, "object", text="")
- row.operator("object.lod_remove", text="", icon='PANEL_CLOSE').index = i
-
- row = box.row()
- row.prop(level, "distance")
- row = row.row(align=True)
- row.prop(level, "use_mesh", text="")
- row.prop(level, "use_material", text="")
-
- row = col.row(align=True)
- row.operator("object.lod_add", text="Add", icon='ZOOMIN')
- row.menu("OBJECT_MT_lod_tools", text="", icon='TRIA_DOWN')
-
-
class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
bl_label = "Relations"