[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25825] trunk/blender/source/blender/ editors/space_image/image_ops.c: Make the image open operator work even if there's no scene in context.
Martin Poirier
theeth at yahoo.com
Fri Jan 8 04:55:08 CET 2010
Revision: 25825
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25825
Author: theeth
Date: 2010-01-08 04:55:06 +0100 (Fri, 08 Jan 2010)
Log Message:
-----------
Make the image open operator work even if there's no scene in context.
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 2010-01-08 02:54:33 UTC (rev 25824)
+++ trunk/blender/source/blender/editors/space_image/image_ops.c 2010-01-08 03:55:06 UTC (rev 25825)
@@ -649,7 +649,8 @@
char str[FILE_MAX];
RNA_string_get(op->ptr, "path", str);
- ima= BKE_add_image_file(str, scene->r.cfra);
+ /* default to frame 1 if there's no scene in context */
+ ima= BKE_add_image_file(str, scene ? scene->r.cfra : 1);
if(!ima) {
if(op->customdata) MEM_freeN(op->customdata);
More information about the Bf-blender-cvs
mailing list