2.5 User Interface / UI Scripts

* Fixed some panel ordering after recent register changes.
* Placed "Custom Props" to the bottom again, where possible

This fixes [#23171] Material context is messed up.
This commit is contained in:
2010-08-12 19:36:10 +00:00
parent 6faa930369
commit 76e1773548
12 changed files with 461 additions and 453 deletions

View File

@@ -33,19 +33,6 @@ class WorldButtonsPanel():
return (rd.engine in cls.COMPAT_ENGINES)
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
rd = context.scene.render
return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
self.layout.template_preview(context.world)
class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = ""
bl_show_header = False
@@ -70,9 +57,23 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
split.template_ID(space, "pin_id")
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "world"
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
def poll(cls, context):
rd = context.scene.render
return (context.world) and (not rd.use_game_engine) and (rd.engine in cls.COMPAT_ENGINES)
def draw(self, context):
self.layout.template_preview(context.world)
class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
@@ -96,62 +97,6 @@ class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
row.column().prop(world, "ambient_color")
class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
world = context.world
self.layout.prop(world.mist, "use_mist", text="")
def draw(self, context):
layout = self.layout
world = context.world
layout.active = world.mist.use_mist
split = layout.split()
col = split.column()
col.prop(world.mist, "intensity", slider=True)
col.prop(world.mist, "start")
col = split.column()
col.prop(world.mist, "depth")
col.prop(world.mist, "height")
layout.prop(world.mist, "falloff")
class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Stars"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
world = context.world
self.layout.prop(world.stars, "use_stars", text="")
def draw(self, context):
layout = self.layout
world = context.world
layout.active = world.stars.use_stars
split = layout.split()
col = split.column()
col.prop(world.stars, "size")
col.prop(world.stars, "color_randomization", text="Colors")
col = split.column()
col.prop(world.stars, "min_distance", text="Min. Dist")
col.prop(world.stars, "average_separation", text="Separation")
class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Ambient Occlusion"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -262,6 +207,67 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
col.prop(light, "correction")
class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
world = context.world
self.layout.prop(world.mist, "use_mist", text="")
def draw(self, context):
layout = self.layout
world = context.world
layout.active = world.mist.use_mist
split = layout.split()
col = split.column()
col.prop(world.mist, "intensity", slider=True)
col.prop(world.mist, "start")
col = split.column()
col.prop(world.mist, "depth")
col.prop(world.mist, "height")
layout.prop(world.mist, "falloff")
class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Stars"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
world = context.world
self.layout.prop(world.stars, "use_stars", text="")
def draw(self, context):
layout = self.layout
world = context.world
layout.active = world.stars.use_stars
split = layout.split()
col = split.column()
col.prop(world.stars, "size")
col.prop(world.stars, "color_randomization", text="Colors")
col = split.column()
col.prop(world.stars, "min_distance", text="Min. Dist")
col.prop(world.stars, "average_separation", text="Separation")
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
_context_path = "world"
def register():
pass