From acd62b273026c919d1f1d2eb97e949bc0422aa79 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sat, 7 Jun 2014 23:27:00 -0400 Subject: [PATCH] Cleanup Plasma Age+Environment panels Now they look like something a real human would use, rather than a many-appendaged monster. --- korman/exporter/manager.py | 11 ++++---- korman/properties/prop_world.py | 3 ++ korman/ui/ui_world.py | 49 +++++++++++++++++++++------------ 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/korman/exporter/manager.py b/korman/exporter/manager.py index c992f67..6d7705d 100644 --- a/korman/exporter/manager.py +++ b/korman/exporter/manager.py @@ -72,11 +72,12 @@ class ExportManager: def create_builtins(self, age, textures): # BuiltIn.prp - # FIXME: Only gen this if the artist wants it - builtin = self.create_page(age, "BuiltIn", -1, True) - pfm = self.add_object(plPythonFileMod, name="VeryVerySpecialPythonFileMod", loc=builtin) - sdl = self.add_object(plSceneObject, name="AgeSDLHook", loc=builtin) - sdl.addModifier(pfm.key) + if bpy.context.scene.world.plasma_age.age_sdl: + builtin = self.create_page(age, "BuiltIn", -1, True) + pfm = self.add_object(plPythonFileMod, name="VeryVerySpecialPythonFileMod", loc=builtin) + pfm.filename = age + sdl = self.add_object(plSceneObject, name="AgeSDLHook", loc=builtin) + sdl.addModifier(pfm.key) # Textures.prp if textures: diff --git a/korman/properties/prop_world.py b/korman/properties/prop_world.py index 02bcc78..1d9dba3 100644 --- a/korman/properties/prop_world.py +++ b/korman/properties/prop_world.py @@ -144,6 +144,9 @@ class PlasmaAge(bpy.types.PropertyGroup): pages = CollectionProperty(name="Pages", description="Registry pages for this age", type=PlasmaPage) + age_sdl = BoolProperty(name="Age Global SDL", + description="This age has its own SDL file", + default=False) # Implementation details active_page_index = IntProperty(name="Active Page Index") diff --git a/korman/ui/ui_world.py b/korman/ui/ui_world.py index 7428120..6cbebae 100644 --- a/korman/ui/ui_world.py +++ b/korman/ui/ui_world.py @@ -44,20 +44,34 @@ class PlasmaAgePanel(AgeButtonsPanel, bpy.types.Panel): # Page Properties if age.active_page_index < len(age.pages): active_page = age.pages[age.active_page_index] - split = layout.box().split() + + layout.separator() + box = layout.box() + split = box.split() + col = split.column() - col.prop(active_page, "name", text="") + col.label("Page Flags:") col.prop(active_page, "auto_load") + col.prop(active_page, "local_only") col = split.column() + col.label("Page Info:") + col.prop(active_page, "name", text="") col.prop(active_page, "seq_suffix") - col.prop(active_page, "local_only") # Core settings - row = layout.row() - row.prop(age, "day_length") - row.prop(age, "seq_prefix", text="ID") - layout.prop(age, "start_time") + layout.separator() + split = layout.split() + + 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): @@ -74,16 +88,17 @@ class PlasmaEnvironmentPanel(AgeButtonsPanel, bpy.types.Panel): col = split.column() col.prop(fni, "clear_color") - # fog box - split = layout.box() - row = split.row().split(percentage=0.50) - row.column().prop_menu_enum(fni, "fog_method") + split = layout.split() + col = split.column() + col.label("Fog Settings:") + col.prop_menu_enum(fni, "fog_method") + col.separator() if fni.fog_method == "linear": - row.column().prop(fni, "fog_start") + col.prop(fni, "fog_start") if fni.fog_method != "none": - row = split.row() - row.prop(fni, "fog_density") - row.prop(fni, "fog_end") + col.prop(fni, "fog_end") + col.prop(fni, "fog_density") - # tacked on: draw distance - layout.prop(fni, "yon") + col = split.column() + col.label("Draw Settings:") + col.prop(fni, "yon", text="Clipping")