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_world.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_world.py') diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index c577af01374..71ee03296a0 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -18,6 +18,7 @@ # import bpy +from bpy.types import Panel from rna_prop_ui import PropertyPanel @@ -32,7 +33,7 @@ class WorldButtonsPanel(): return (context.world and context.scene.render.engine in cls.COMPAT_ENGINES) -class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_context_world(WorldButtonsPanel, Panel): bl_label = "" bl_options = {'HIDE_HEADER'} COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -61,7 +62,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel): split.label(text=str(texture_count), icon='TEXTURE') -class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_preview(WorldButtonsPanel, Panel): bl_label = "Preview" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -74,7 +75,7 @@ class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel): self.layout.template_preview(context.world) -class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_world(WorldButtonsPanel, Panel): bl_label = "World" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -99,7 +100,7 @@ class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel): row.prop(world, "color_range") -class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_ambient_occlusion(WorldButtonsPanel, Panel): bl_label = "Ambient Occlusion" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -118,7 +119,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel): split.prop(light, "ao_blend_type", text="") -class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_environment_lighting(WorldButtonsPanel, Panel): bl_label = "Environment Lighting" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -137,7 +138,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel): split.prop(light, "environment_color", text="") -class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_indirect_lighting(WorldButtonsPanel, Panel): bl_label = "Indirect Lighting" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -159,7 +160,7 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel): layout.label(text="Only works with Approximate gather method") -class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_gather(WorldButtonsPanel, Panel): bl_label = "Gather" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -207,7 +208,7 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel): col.prop(light, "correction") -class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_mist(WorldButtonsPanel, Panel): bl_label = "Mist" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -236,7 +237,7 @@ class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel): layout.prop(world.mist_settings, "falloff") -class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel): +class WORLD_PT_stars(WorldButtonsPanel, Panel): bl_label = "Stars" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -263,7 +264,7 @@ class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel): col.prop(world.star_settings, "average_separation", text="Separation") -class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel): +class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "world" _property_type = bpy.types.World -- cgit v1.2.3