[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37558] trunk/blender/source/blender/ editors/space_buttons/buttons_ops.c: missed this in last commit

Campbell Barton ideasman42 at gmail.com
Thu Jun 16 17:31:35 CEST 2011


Revision: 37558
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37558
Author:   campbellbarton
Date:     2011-06-16 15:31:35 +0000 (Thu, 16 Jun 2011)
Log Message:
-----------
missed this in last commit

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_buttons/buttons_ops.c

Modified: trunk/blender/source/blender/editors/space_buttons/buttons_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_buttons/buttons_ops.c	2011-06-16 15:28:39 UTC (rev 37557)
+++ trunk/blender/source/blender/editors/space_buttons/buttons_ops.c	2011-06-16 15:31:35 UTC (rev 37558)
@@ -104,11 +104,12 @@
 	FileBrowseOp *fbo= op->customdata;
 	ID *id;
 	char *base, *str, path[FILE_MAX];
+	const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
 	
-	if (RNA_property_is_set(op->ptr, "filepath")==0 || fbo==NULL)
+	if (RNA_property_is_set(op->ptr, path_prop)==0 || fbo==NULL)
 		return OPERATOR_CANCELLED;
 	
-	str= RNA_string_get_alloc(op->ptr, "filepath", NULL, 0);
+	str= RNA_string_get_alloc(op->ptr, path_prop, NULL, 0);
 
 	/* add slash for directories, important for some properties */
 	if(RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {




More information about the Bf-blender-cvs mailing list