From b374ab919a4b46d377d88ad0f1f1eced06621eca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Aug 2011 06:57:00 +0000 Subject: import common classes from bpy.types, saves ~1000 python getattrs on startup. --- release/scripts/startup/bl_ui/properties_scene.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 7725f661693..6e96e1228e7 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -18,6 +18,7 @@ # import bpy +from bpy.types import Operator, Panel from rna_prop_ui import PropertyPanel @@ -31,7 +32,7 @@ class SceneButtonsPanel(): return context.scene -class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_scene(SceneButtonsPanel, Panel): bl_label = "Scene" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -43,7 +44,7 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel): layout.prop(scene, "background_set", text="Background") -class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_unit(SceneButtonsPanel, Panel): bl_label = "Units" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -61,7 +62,7 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): row.prop(unit, "use_separate") -class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): bl_label = "Keying Sets" def draw(self, context): @@ -94,7 +95,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col.prop(ks, "bl_options") -class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel): bl_label = "Active Keying Set" @classmethod @@ -144,7 +145,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): col.prop(ksp, "bl_options") -class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_physics(SceneButtonsPanel, Panel): bl_label = "Gravity" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -161,7 +162,7 @@ class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel): layout.prop(scene, "gravity", text="") -class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_simplify(SceneButtonsPanel, Panel): bl_label = "Simplify" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -190,7 +191,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel): col.prop(rd, "simplify_ao_sss", text="AO and SSS") -class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): +class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "scene" _property_type = bpy.types.Scene @@ -198,7 +199,7 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): # XXX, move operator to op/ dir -class ANIM_OT_keying_set_export(bpy.types.Operator): +class ANIM_OT_keying_set_export(Operator): "Export Keying Set to a python script." bl_idname = "anim.keying_set_export" bl_label = "Export Keying Set..." -- cgit v1.2.3