* Partially revert r30763, where PROP_IMAGEPATH was added.
* Brush icon property back to not using image browser until a better solution is decided on.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -98,7 +98,6 @@ typedef enum PropertySubType {
|
||||
PROP_FILEPATH = 1,
|
||||
PROP_DIRPATH = 2,
|
||||
PROP_FILENAME = 3,
|
||||
PROP_IMAGEPATH = 4,
|
||||
|
||||
/* numbers */
|
||||
PROP_UNSIGNED = 13,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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}};
|
||||
|
||||
Reference in New Issue
Block a user