diff --git a/korman/operators/op_export.py b/korman/operators/op_export.py index 40d59aa..76e16f0 100644 --- a/korman/operators/op_export.py +++ b/korman/operators/op_export.py @@ -41,11 +41,6 @@ class ExportOperator(bpy.types.Operator): "description": "Bake all lightmaps and vertex shading on export", "default": True}), - "version": (EnumProperty, {"name": "Version", - "description": "Version of the Plasma Engine to target", - "default": "pvPots", # This should be changed when moul is easier to target! - "items": game_versions}), - "verbose": (BoolProperty, {"name": "Display Verbose Log", "description": "Shows the verbose export log in the console", "default": False}), @@ -59,12 +54,18 @@ class ExportOperator(bpy.types.Operator): filepath = StringProperty(subtype="FILE_PATH") filter_glob = StringProperty(default="*.age", options={'HIDDEN'}) + version = EnumProperty(name="Version", + description="Plasma version to export this age for", + items=game_versions, + default="pvPots", + options=set()) + def draw(self, context): layout = self.layout age = context.scene.world.plasma_age # The crazy mess we're doing with props on the fly means we have to explicitly draw them :( - layout.prop(age, "version") + layout.prop(self, "version") layout.prop(age, "bake_lighting") row = layout.row() row.enabled = ConsoleToggler.is_platform_supported() diff --git a/korman/ui/ui_world.py b/korman/ui/ui_world.py index 110514e..333dbbc 100644 --- a/korman/ui/ui_world.py +++ b/korman/ui/ui_world.py @@ -65,6 +65,7 @@ class PlasmaGamePanel(AgeButtonsPanel, bpy.types.Panel): row.enabled = bool(age.age_name.strip()) op = row.operator("export.plasma_age", icon="EXPORT") op.filepath = str((Path(active_game.path) / "dat" / age.age_name).with_suffix(".age")) + op.version = active_game.version class PlasmaGameList(bpy.types.UIList):