Browse Source

Cleanup Plasma Age+Environment panels

Now they look like something a real human would use, rather than a
many-appendaged monster.
pull/6/head
Adam Johnson 11 years ago
parent
commit
acd62b2730
  1. 3
      korman/exporter/manager.py
  2. 3
      korman/properties/prop_world.py
  3. 49
      korman/ui/ui_world.py

3
korman/exporter/manager.py

@ -72,9 +72,10 @@ class ExportManager:
def create_builtins(self, age, textures): def create_builtins(self, age, textures):
# BuiltIn.prp # BuiltIn.prp
# FIXME: Only gen this if the artist wants it if bpy.context.scene.world.plasma_age.age_sdl:
builtin = self.create_page(age, "BuiltIn", -1, True) builtin = self.create_page(age, "BuiltIn", -1, True)
pfm = self.add_object(plPythonFileMod, name="VeryVerySpecialPythonFileMod", loc=builtin) pfm = self.add_object(plPythonFileMod, name="VeryVerySpecialPythonFileMod", loc=builtin)
pfm.filename = age
sdl = self.add_object(plSceneObject, name="AgeSDLHook", loc=builtin) sdl = self.add_object(plSceneObject, name="AgeSDLHook", loc=builtin)
sdl.addModifier(pfm.key) sdl.addModifier(pfm.key)

3
korman/properties/prop_world.py

@ -144,6 +144,9 @@ class PlasmaAge(bpy.types.PropertyGroup):
pages = CollectionProperty(name="Pages", pages = CollectionProperty(name="Pages",
description="Registry pages for this age", description="Registry pages for this age",
type=PlasmaPage) type=PlasmaPage)
age_sdl = BoolProperty(name="Age Global SDL",
description="This age has its own SDL file",
default=False)
# Implementation details # Implementation details
active_page_index = IntProperty(name="Active Page Index") active_page_index = IntProperty(name="Active Page Index")

49
korman/ui/ui_world.py

@ -44,20 +44,34 @@ class PlasmaAgePanel(AgeButtonsPanel, bpy.types.Panel):
# Page Properties # Page Properties
if age.active_page_index < len(age.pages): if age.active_page_index < len(age.pages):
active_page = age.pages[age.active_page_index] active_page = age.pages[age.active_page_index]
split = layout.box().split()
layout.separator()
box = layout.box()
split = box.split()
col = split.column() col = split.column()
col.prop(active_page, "name", text="") col.label("Page Flags:")
col.prop(active_page, "auto_load") col.prop(active_page, "auto_load")
col.prop(active_page, "local_only")
col = split.column() col = split.column()
col.label("Page Info:")
col.prop(active_page, "name", text="")
col.prop(active_page, "seq_suffix") col.prop(active_page, "seq_suffix")
col.prop(active_page, "local_only")
# Core settings # Core settings
row = layout.row() layout.separator()
row.prop(age, "day_length") split = layout.split()
row.prop(age, "seq_prefix", text="ID")
layout.prop(age, "start_time") col = split.column()
col.label("Age Time:")
col.prop(age, "start_time", text="Epoch")
col.prop(age, "day_length")
col = split.column()
col.label("Age Settings:")
col.prop(age, "seq_prefix", text="ID")
col.prop(age, "age_sdl")
class PlasmaEnvironmentPanel(AgeButtonsPanel, bpy.types.Panel): class PlasmaEnvironmentPanel(AgeButtonsPanel, bpy.types.Panel):
@ -74,16 +88,17 @@ class PlasmaEnvironmentPanel(AgeButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(fni, "clear_color") col.prop(fni, "clear_color")
# fog box split = layout.split()
split = layout.box() col = split.column()
row = split.row().split(percentage=0.50) col.label("Fog Settings:")
row.column().prop_menu_enum(fni, "fog_method") col.prop_menu_enum(fni, "fog_method")
col.separator()
if fni.fog_method == "linear": if fni.fog_method == "linear":
row.column().prop(fni, "fog_start") col.prop(fni, "fog_start")
if fni.fog_method != "none": if fni.fog_method != "none":
row = split.row() col.prop(fni, "fog_end")
row.prop(fni, "fog_density") col.prop(fni, "fog_density")
row.prop(fni, "fog_end")
# tacked on: draw distance col = split.column()
layout.prop(fni, "yon") col.label("Draw Settings:")
col.prop(fni, "yon", text="Clipping")

Loading…
Cancel
Save