[Bf-blender-cvs] [c436a00] asset-engine: Fix broken behavior e.g. for 'save as' operator...

Bastien Montagne noreply at git.blender.org
Tue Jun 2 20:21:14 CEST 2015


Commit: c436a003724f0a0f4010dd5d758a65527b8dba66
Author: Bastien Montagne
Date:   Tue Jun 2 15:34:10 2015 +0200
Branches: asset-engine
https://developer.blender.org/rBc436a003724f0a0f4010dd5d758a65527b8dba66

Fix broken behavior e.g. for 'save as' operator...

We need to set filename/filepath from sfile->params in case operator does not support multi-files!

===================================================================

M	source/blender/editors/space_file/file_ops.c

===================================================================

diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 097a2e6..a74182c 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -949,10 +949,11 @@ static void file_sfile_to_operator(
 	else {
 		/* We have to ensure those are properly reset!!! */
 		if ((prop = RNA_struct_find_property(op->ptr, "filename"))) {
-			RNA_property_reset(op->ptr, prop, 0);
+			RNA_property_string_set(op->ptr, prop, sfile->params->file);
 		}
 		if ((prop = RNA_struct_find_property(op->ptr, "filepath"))) {
-			RNA_property_reset(op->ptr, prop, 0);
+			BLI_join_dirfile(filepath, FILE_MAX_LIBEXTRA, sfile->params->dir, sfile->params->file);
+			RNA_property_string_set(op->ptr, prop, filepath);
 		}
 		if (prop_files) {
 			RNA_property_reset(op->ptr, prop, 0);




More information about the Bf-blender-cvs mailing list