[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58040] trunk/blender/source/blender/ editors/space_image/image_ops.c: fix [#36022] inconsistent naming for new images
Campbell Barton
ideasman42 at gmail.com
Sat Jul 6 10:10:41 CEST 2013
Revision: 58040
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58040
Author: campbellbarton
Date: 2013-07-06 08:10:41 +0000 (Sat, 06 Jul 2013)
Log Message:
-----------
fix [#36022] inconsistent naming for new images
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_image/image_ops.c
Modified: trunk/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_ops.c 2013-07-06 07:34:38 UTC (rev 58039)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c 2013-07-06 08:10:41 UTC (rev 58040)
@@ -1253,13 +1253,8 @@
/* check for empty path */
if (guess_path && simopts->filepath[0] == 0) {
- if ((G.ima[0] == '/') && (G.ima[1] == '/') && (G.ima[2] == '\0')) {
- BLI_strncpy(simopts->filepath, "//untitled", FILE_MAX);
- }
- else {
- BLI_strncpy(simopts->filepath, G.ima, FILE_MAX);
- }
- BLI_path_abs(simopts->filepath, G.main->name);
+ BLI_snprintf(simopts->filepath, sizeof(simopts->filepath), "//%s", ima->id.name + 2);
+ BLI_path_abs(simopts->filepath, STREQ(G.ima, "//") ? G.main->name : G.ima);
}
/* color management */
More information about the Bf-blender-cvs
mailing list