diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-08-13 11:37:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-08-13 11:37:41 +0400 |
commit | d916c25616b4f5038d9b17fb3eae9de377a2a9e5 (patch) | |
tree | 7950951cce9c469d40a67d4a121aa7452fa61643 /release | |
parent | 127f19cac4378142dfcf1edd18e0e014f248270c (diff) |
- moved unit settings from user prefs into the scene.
- use the scene context for the unit settings since there isn't a better place for it currently.
- added 'chain' to imperial units
- set more rna props to be distances and angles.
Diffstat (limited to 'release')
-rw-r--r-- | release/ui/buttons_scene.py | 20 | ||||
-rw-r--r-- | release/ui/space_info.py | 11 |
2 files changed, 20 insertions, 11 deletions
diff --git a/release/ui/buttons_scene.py b/release/ui/buttons_scene.py index d5ae95a2fb6..514524ceea5 100644 --- a/release/ui/buttons_scene.py +++ b/release/ui/buttons_scene.py @@ -428,6 +428,25 @@ class SCENE_PT_stamp(RenderButtonsPanel): sub.active = rd.stamp_note sub.itemR(rd, "stamp_note_text", text="") +class SCENE_PT_unit(RenderButtonsPanel): + __label__ = "Units" + __default_closed__ = True + COMPAT_ENGINES = set(['BLENDER_RENDER']) + + def draw(self, context): + layout = self.layout + + unit = context.scene.unit_settings + + col = layout.column() + col.itemR(unit, "system") + + col = layout.column() + col.active = (unit.system != 'NONE') + col.itemR(unit, "scale_length") + col.itemR(unit, "use_separate") + + bpy.types.register(SCENE_PT_render) bpy.types.register(SCENE_PT_layers) bpy.types.register(SCENE_PT_dimensions) @@ -438,3 +457,4 @@ bpy.types.register(SCENE_PT_encoding) bpy.types.register(SCENE_PT_performance) bpy.types.register(SCENE_PT_post_processing) bpy.types.register(SCENE_PT_stamp) +bpy.types.register(SCENE_PT_unit) diff --git a/release/ui/space_info.py b/release/ui/space_info.py index fde443f50f6..f07234a4b00 100644 --- a/release/ui/space_info.py +++ b/release/ui/space_info.py @@ -320,17 +320,6 @@ class INFO_PT_edit(bpy.types.Panel): sub1.itemS() sub1.itemL(text="Transform:") sub1.itemR(edit, "drag_immediately") - sub1.itemS() - sub1.itemS() - sub1.itemS() - - sub1.itemL(text="Units:") - sub1.itemR(edit, "unit_system") - - sub2 = sub1.column() - sub2.active = (edit.unit_system != 'NONE') - sub2.itemR(edit, "unit_scale_length") - sub2.itemR(edit, "use_unit_split") col = split.column() sub = col.split(percentage=0.85) |