* Partially revert r30763, where PROP_IMAGEPATH was added.
authorNicholas Bishop <nicholasbishop@gmail.com>
Mon, 26 Jul 2010 23:40:46 +0000 (23:40 +0000)
committerNicholas Bishop <nicholasbishop@gmail.com>
Mon, 26 Jul 2010 23:40:46 +0000 (23:40 +0000)
* Brush icon property back to not using image browser until a better solution is decided on.

source/blender/editors/interface/interface_layout.c
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_brush.c
source/blender/python/intern/bpy_props.c

index 7044c10e523097d99aae44743647381a2da8df71..b7b9a2156efdced11a7c4d8738d6be393d657fc8 100644 (file)
@@ -508,16 +508,12 @@ static uiBut *ui_item_with_label(uiLayout *layout, uiBlock *block, char *name, i
        type= RNA_property_type(prop);
        subtype= RNA_property_subtype(prop);
 
-       if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH || subtype == PROP_IMAGEPATH) {
+       if(subtype == PROP_FILEPATH || subtype == PROP_DIRPATH) {
                uiBlockSetCurLayout(block, uiLayoutRow(sub, 1));
                uiDefAutoButR(block, ptr, prop, index, "", icon, x, y, w-UI_UNIT_X, h);
 
                /* BUTTONS_OT_file_browse calls uiFileBrowseContextProperty */
                but= uiDefIconButO(block, BUT, "BUTTONS_OT_file_browse", WM_OP_INVOKE_DEFAULT, ICON_FILESEL, x, y, UI_UNIT_X, h, NULL);
-               if(subtype == PROP_IMAGEPATH) {
-                       RNA_boolean_set(uiButGetOperatorPtrRNA(but), "filter_folder", 1);
-                       RNA_boolean_set(uiButGetOperatorPtrRNA(but), "filter_image", 1);
-               }
        }
        else if(subtype == PROP_DIRECTION) {
                uiDefButR(block, BUT_NORMAL, 0, name, x, y, 100, 100, ptr, RNA_property_identifier(prop), index, 0, 0, -1, -1, NULL);
index 06e42c77daf6033291e3ff69655f9ef36cffa152..88058769f4b8196b8e17cd7025a52283cfb1edf8 100644 (file)
@@ -98,7 +98,6 @@ typedef enum PropertySubType {
        PROP_FILEPATH = 1,
        PROP_DIRPATH = 2,
        PROP_FILENAME = 3,
-       PROP_IMAGEPATH = 4,
 
        /* numbers */
        PROP_UNSIGNED = 13,
index 42b72ce43419f2054b7b5a19d0156f7bc09e76be..35b2eff9c62bb72846e2ead976378a9425a0701c 100644 (file)
@@ -1652,7 +1652,6 @@ static const char *rna_property_subtypename(PropertySubType type)
                case PROP_FILEPATH: return "PROP_FILEPATH";
                case PROP_FILENAME: return "PROP_FILENAME";
                case PROP_DIRPATH: return "PROP_DIRPATH";
-               case PROP_IMAGEPATH: return "PROP_IMAGEPATH";
                case PROP_UNSIGNED: return "PROP_UNSIGNED";
                case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
                case PROP_FACTOR: return "PROP_FACTOR";
index cd4aff5d1870d70f8511dab50cfc44c443d6c75a..7a08e1403e3a976fdabcb9ad778f10f5c9e11208 100644 (file)
@@ -770,7 +770,7 @@ static void rna_def_brush(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Custom Icon", "Set the brush icon from an image file");
        RNA_def_property_update(prop, 0, "rna_Brush_icon_update");
 
-       prop= RNA_def_property(srna, "icon_filepath", PROP_STRING, PROP_IMAGEPATH);
+       prop= RNA_def_property(srna, "icon_filepath", PROP_STRING, PROP_FILEPATH);
        RNA_def_property_string_sdna(prop, NULL, "icon_filepath");
        RNA_def_property_ui_text(prop, "Brush Icon Filepath", "File path to brush icon");
        RNA_def_property_update(prop, 0, "rna_Brush_icon_update");
index b860a4d3957e616606dd08cb0bc0de66e24b2ef5..c278ad56ab9e273e2dcafc33f14a56491d0d2512 100644 (file)
@@ -41,7 +41,6 @@ EnumPropertyItem property_subtype_string_items[] = {
        {PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
        {PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
        {PROP_FILENAME, "FILENAME", 0, "Filename", ""},
-       {PROP_IMAGEPATH, "IMAGE_PATH", 0, "Image Path", ""},
 
        {PROP_NONE, "NONE", 0, "None", ""},
        {0, NULL, 0, NULL, NULL}};