diff --git a/SaveIncremental/IncrementalFileSave_v1-7.py b/SaveIncremental/IncrementalFileSave_v1-7.py index 4679802..9c908ef 100644 --- a/SaveIncremental/IncrementalFileSave_v1-7.py +++ b/SaveIncremental/IncrementalFileSave_v1-7.py @@ -36,7 +36,7 @@ def detect_number(name): return False class FileIncrementalSave(bpy.types.Operator): - bl_idname = "file.save_incremental" + bl_idname = "wm.save_incremental" bl_label = "Save Incremental" def execute(self, context): @@ -87,6 +87,8 @@ def execute(self, context): return {'CANCELLED'} bpy.ops.wm.save_mainfile() bpy.ops.wm.save_as_mainfile(filepath=output, copy=True) + bpy.ops.wm.open_mainfile( filepath = output ) # to make save overwrite the correct file. + bpy.ops.wm.save_mainfile() # to add to recents. self.report({'INFO'}, "File: {0} - Created at: {1}".format(output[len(bpy.path.abspath(d_sep)):], output[:len(bpy.path.abspath(d_sep))])) else: @@ -95,7 +97,7 @@ def execute(self, context): ###### PENSER A TESTER AUTRES FICHIERS DU DOSSIER, VOIR SI TROU DANS NUMEROTATION==> WARNING def draw_into_file_menu(self,context): - self.layout.operator('file.save_incremental', icon='SAVE_COPY') + self.layout.operator('wm.save_incremental', icon='SAVE_COPY') def register():