[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46213] trunk/blender/source/blender/ windowmanager/intern/wm_operators.c: Fix #31253: collada export default file name now is no longer always

Brecht Van Lommel brechtvanlommel at pandora.be
Thu May 3 01:36:32 CEST 2012


Revision: 46213
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46213
Author:   blendix
Date:     2012-05-02 23:36:31 +0000 (Wed, 02 May 2012)
Log Message:
-----------
Fix #31253: collada export default file name now is no longer always
untitled.dae, but rather uses .blend file name like other exporters.

Patch by Gaia Clary.

Modified Paths:
--------------
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/windowmanager/intern/wm_operators.c
===================================================================
--- trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2012-05-02 23:29:52 UTC (rev 46212)
+++ trunk/blender/source/blender/windowmanager/intern/wm_operators.c	2012-05-02 23:36:31 UTC (rev 46213)
@@ -2132,7 +2132,12 @@
 {	
 	if (!RNA_struct_property_is_set(op->ptr, "filepath")) {
 		char filepath[FILE_MAX];
-		BLI_strncpy(filepath, G.main->name, sizeof(filepath));
+
+		if (G.main->name[0] == 0)
+			BLI_strncpy(filepath, "untitled", sizeof(filepath));
+		else
+			BLI_strncpy(filepath, G.main->name, sizeof(filepath));
+
 		BLI_replace_extension(filepath, sizeof(filepath), ".dae");
 		RNA_string_set(op->ptr, "filepath", filepath);
 	}




More information about the Bf-blender-cvs mailing list