Skip to content
Snippets Groups Projects
Commit f8cfc362 authored by Candoran2's avatar Candoran2 Committed by neomonkeus
Browse files

Added default NONE game for in the scene tab, and a comprehensive error when...

Added default NONE game for in the scene tab, and a comprehensive error when they forget to set the game.
parent fbb4ea47
No related branches found
No related tags found
No related merge requests found
......@@ -88,6 +88,11 @@ class NifExport(NifCommon):
try: # catch export errors
# protect against null nif versions
if bpy.context.scene.niftools_scene.game == 'NONE':
raise NifError("You have not selected a game. Please select a game and"
" nif version in the scene tab.")
# find all objects that do not have a parent
self.exportable_objects, self.root_objects = self.objecthelper.get_export_objects()
if not self.exportable_objects:
......
......@@ -84,14 +84,14 @@ class Scene(PropertyGroup):
# For which game to export.
game: bpy.props.EnumProperty(
items=[
items=[('NONE', 'NONE', 'No game selected')] + [
(_game_to_enum(game), game, "Export for " + game)
for game in sorted(
[x for x in NifFormat.games.keys() if x != '?'])
],
name="Game",
description="For which game to export.",
default='OBLIVION',
default='NONE',
update=update_version_from_game)
# Map game enum to nif version.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment