[Bf-blender-cvs] [940ffe2] cycles-ptex-49: Set "*.ptx" filter glob for Ptex import operator

Nicholas Bishop noreply at git.blender.org
Mon Feb 9 00:48:57 CET 2015


Commit: 940ffe2dd3da7e3aa08016ace3500f1da378f3b3
Author: Nicholas Bishop
Date:   Mon Feb 9 00:48:34 2015 +0100
Branches: cycles-ptex-49
https://developer.blender.org/rB940ffe2dd3da7e3aa08016ace3500f1da378f3b3

Set "*.ptx" filter glob for Ptex import operator

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

M	source/blender/editors/mesh/mesh_data.c

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

diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 9384607..1eb12b9 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -956,6 +956,8 @@ static int mesh_ptex_import_invoke(bContext *C, wmOperator *op,
 
 void MESH_OT_ptex_import(wmOperatorType *ot)
 {
+	PropertyRNA *prop;
+
 	/* identifiers */
 	ot->name = "Import Ptex";
 	ot->description = "Import Ptex layer";
@@ -970,10 +972,13 @@ void MESH_OT_ptex_import(wmOperatorType *ot)
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
 	/* TODO(nicholasbishop): lots of options here, not sure what's correct */
-	WM_operator_properties_filesel(ot, FILE_TYPE_FOLDER | FILE_TYPE_IMAGE,
-								   FILE_SPECIAL, FILE_OPENFILE,
+	WM_operator_properties_filesel(ot, FILE_TYPE_FOLDER, FILE_SPECIAL,
+								   FILE_OPENFILE,
 	                               WM_FILESEL_FILEPATH | WM_FILESEL_DIRECTORY | WM_FILESEL_FILES,
 								   FILE_DEFAULTDISPLAY);
+
+	prop = RNA_def_string(ot->srna, "filter_glob", "*.ptx", 0, "Filter glob", "");
+	RNA_def_property_flag(prop, PROP_HIDDEN | PROP_SKIP_SAVE);
 }
 
 /* *** CustomData clear functions, we need an operator for each *** */




More information about the Bf-blender-cvs mailing list