Skip to content

Commit 3b18c1f

Browse files
author
Nozomi Miyamori
committed
release version 2.0.2
* Re-improve file dialog handling
1 parent 83e3398 commit 3b18c1f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ninja_gaiden_tmc/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,20 @@ class ImportTMCEntry(Operator, ImportHelper):
5252
'''Load a TMC file (NGS2)'''
5353
bl_idname = 'ninja_gaiden_tmc.import_tmc_entry'
5454
bl_label = 'Select TMC'
55+
old_dir = ''
5556

5657
filter_glob: StringProperty(
5758
default="*.tmc;*.dat",
5859
options={'SKIP_SAVE', 'HIDDEN'},
5960
)
6061
directory: StringProperty(subtype='DIR_PATH')
6162

63+
def invoke(self, context, event):
64+
self.directory = ImportTMCEntry.old_dir
65+
return super().invoke(context, event)
66+
6267
def execute(self, context):
68+
ImportTMCEntry.old_dir = self.directory
6369
return bpy.ops.ninja_gaiden_tmc.select_tmcl_import_tmc('INVOKE_DEFAULT', tmc_path=self.filepath, directory=self.directory)
6470

6571
def mmap_open(path):

src/ninja_gaiden_tmc/blender_manifest.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema_version = "1.0.0"
22

33
id = "ninja_gaiden_tmc"
4-
version = "2.0.1"
4+
version = "2.0.2"
55
name = "Ninja Gaiden Sigma 2 TMC Format"
66
tagline = "Import Ninja Gaiden Sigma 2 TMC"
77
maintainer = "Nozomi Miyamori"

0 commit comments

Comments
 (0)