Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_handlers.c70
-rw-r--r--source/blender/editors/interface/interface_icons.c6
-rw-r--r--source/blender/editors/interface/interface_layout.c29
-rw-r--r--source/blender/editors/interface/interface_regions.c6
-rw-r--r--source/blender/editors/interface/interface_templates.c56
-rw-r--r--source/blender/editors/interface/interface_utils.c10
-rw-r--r--source/blender/editors/interface/interface_widgets.c2
7 files changed, 92 insertions, 87 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 1f701ca56f8..4c35b3cf5c8 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -4022,7 +4022,7 @@ static uiBlock *menu_change_shortcut(bContext *C, ARegion *ar, void *arg)
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style);
- uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", 0);
+ uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", ICON_NULL);
uiPopupBoundsBlock(block, 6, -50, 26);
uiEndBlock(C, block);
@@ -4060,7 +4060,7 @@ static uiBlock *menu_add_shortcut(bContext *C, ARegion *ar, void *arg)
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, 0, 0, 200, 20, style);
- uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", 0);
+ uiItemR(layout, &ptr, "type", UI_ITEM_R_FULL_EVENT|UI_ITEM_R_IMMEDIATE, "", ICON_NULL);
uiPopupBoundsBlock(block, 6, -50, 26);
uiEndBlock(C, block);
@@ -4116,7 +4116,7 @@ static int ui_but_menu(bContext *C, uiBut *but)
else
name= "<needs_name>"; // XXX - should never happen.
- pup= uiPupMenuBegin(C, name, 0);
+ pup= uiPupMenuBegin(C, name, ICON_NULL);
layout= uiPupMenuLayout(pup);
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_DEFAULT);
@@ -4133,24 +4133,24 @@ static int ui_but_menu(bContext *C, uiBut *but)
/* Keyframes */
if(but->flag & UI_BUT_ANIMATED_KEY) {
if(length) {
- uiItemBooleanO(layout, "Replace Keyframes", 0, "ANIM_OT_keyframe_insert_button", "all", 1);
- uiItemBooleanO(layout, "Replace Single Keyframe", 0, "ANIM_OT_keyframe_insert_button", "all", 0);
- uiItemBooleanO(layout, "Delete Keyframes", 0, "ANIM_OT_keyframe_delete_button", "all", 1);
- uiItemBooleanO(layout, "Delete Single Keyframe", 0, "ANIM_OT_keyframe_delete_button", "all", 0);
+ uiItemBooleanO(layout, "Replace Keyframes", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 1);
+ uiItemBooleanO(layout, "Replace Single Keyframe", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 0);
+ uiItemBooleanO(layout, "Delete Keyframes", ICON_NULL, "ANIM_OT_keyframe_delete_button", "all", 1);
+ uiItemBooleanO(layout, "Delete Single Keyframe", ICON_NULL, "ANIM_OT_keyframe_delete_button", "all", 0);
}
else {
- uiItemBooleanO(layout, "Replace Keyframe", 0, "ANIM_OT_keyframe_insert_button", "all", 0);
- uiItemBooleanO(layout, "Delete Keyframe", 0, "ANIM_OT_keyframe_delete_button", "all", 0);
+ uiItemBooleanO(layout, "Replace Keyframe", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 0);
+ uiItemBooleanO(layout, "Delete Keyframe", ICON_NULL, "ANIM_OT_keyframe_delete_button", "all", 0);
}
}
else if(but->flag & UI_BUT_DRIVEN);
else if(is_anim) {
if(length) {
- uiItemBooleanO(layout, "Insert Keyframes", 0, "ANIM_OT_keyframe_insert_button", "all", 1);
- uiItemBooleanO(layout, "Insert Single Keyframe", 0, "ANIM_OT_keyframe_insert_button", "all", 0);
+ uiItemBooleanO(layout, "Insert Keyframes", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 1);
+ uiItemBooleanO(layout, "Insert Single Keyframe", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 0);
}
else
- uiItemBooleanO(layout, "Insert Keyframe", 0, "ANIM_OT_keyframe_insert_button", "all", 0);
+ uiItemBooleanO(layout, "Insert Keyframe", ICON_NULL, "ANIM_OT_keyframe_insert_button", "all", 0);
}
/* Drivers */
@@ -4158,29 +4158,29 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemS(layout);
if(length) {
- uiItemBooleanO(layout, "Delete Drivers", 0, "ANIM_OT_driver_button_remove", "all", 1);
- uiItemBooleanO(layout, "Delete Single Driver", 0, "ANIM_OT_driver_button_remove", "all", 0);
+ uiItemBooleanO(layout, "Delete Drivers", ICON_NULL, "ANIM_OT_driver_button_remove", "all", 1);
+ uiItemBooleanO(layout, "Delete Single Driver", ICON_NULL, "ANIM_OT_driver_button_remove", "all", 0);
}
else
- uiItemBooleanO(layout, "Delete Driver", 0, "ANIM_OT_driver_button_remove", "all", 0);
+ uiItemBooleanO(layout, "Delete Driver", ICON_NULL, "ANIM_OT_driver_button_remove", "all", 0);
- uiItemO(layout, "Copy Driver", 0, "ANIM_OT_copy_driver_button");
+ uiItemO(layout, "Copy Driver", ICON_NULL, "ANIM_OT_copy_driver_button");
if (ANIM_driver_can_paste())
- uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
+ uiItemO(layout, "Paste Driver", ICON_NULL, "ANIM_OT_paste_driver_button");
}
else if(but->flag & (UI_BUT_ANIMATED_KEY|UI_BUT_ANIMATED));
else if(is_anim) {
uiItemS(layout);
if(length) {
- uiItemBooleanO(layout, "Add Drivers", 0, "ANIM_OT_driver_button_add", "all", 1);
- uiItemBooleanO(layout, "Add Single Driver", 0, "ANIM_OT_driver_button_add", "all", 0);
+ uiItemBooleanO(layout, "Add Drivers", ICON_NULL, "ANIM_OT_driver_button_add", "all", 1);
+ uiItemBooleanO(layout, "Add Single Driver", ICON_NULL, "ANIM_OT_driver_button_add", "all", 0);
}
else
- uiItemBooleanO(layout, "Add Driver", 0, "ANIM_OT_driver_button_add", "all", 0);
+ uiItemBooleanO(layout, "Add Driver", ICON_NULL, "ANIM_OT_driver_button_add", "all", 0);
if (ANIM_driver_can_paste())
- uiItemO(layout, "Paste Driver", 0, "ANIM_OT_paste_driver_button");
+ uiItemO(layout, "Paste Driver", ICON_NULL, "ANIM_OT_paste_driver_button");
}
/* Keying Sets */
@@ -4188,13 +4188,13 @@ static int ui_but_menu(bContext *C, uiBut *but)
uiItemS(layout);
if(length) {
- uiItemBooleanO(layout, "Add All to Keying Set", 0, "ANIM_OT_keyingset_button_add", "all", 1);
- uiItemBooleanO(layout, "Add Single to Keying Set", 0, "ANIM_OT_keyingset_button_add", "all", 0);
- uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_keyingset_button_remove");
+ uiItemBooleanO(layout, "Add All to Keying Set", ICON_NULL, "ANIM_OT_keyingset_button_add", "all", 1);
+ uiItemBooleanO(layout, "Add Single to Keying Set", ICON_NULL, "ANIM_OT_keyingset_button_add", "all", 0);
+ uiItemO(layout, "Remove from Keying Set", ICON_NULL, "ANIM_OT_keyingset_button_remove");
}
else {
- uiItemBooleanO(layout, "Add to Keying Set", 0, "ANIM_OT_keyingset_button_add", "all", 0);
- uiItemO(layout, "Remove from Keying Set", 0, "ANIM_OT_keyingset_button_remove");
+ uiItemBooleanO(layout, "Add to Keying Set", ICON_NULL, "ANIM_OT_keyingset_button_add", "all", 0);
+ uiItemO(layout, "Remove from Keying Set", ICON_NULL, "ANIM_OT_keyingset_button_remove");
}
}
@@ -4206,14 +4206,14 @@ static int ui_but_menu(bContext *C, uiBut *but)
//Paste Property Value
if(length) {
- uiItemBooleanO(layout, "Reset All to Default Values", 0, "UI_OT_reset_default_button", "all", 1);
- uiItemBooleanO(layout, "Reset Single to Default Value", 0, "UI_OT_reset_default_button", "all", 0);
+ uiItemBooleanO(layout, "Reset All to Default Values", ICON_NULL, "UI_OT_reset_default_button", "all", 1);
+ uiItemBooleanO(layout, "Reset Single to Default Value", ICON_NULL, "UI_OT_reset_default_button", "all", 0);
}
else
- uiItemO(layout, "Reset to Default Value", 0, "UI_OT_reset_default_button");
+ uiItemO(layout, "Reset to Default Value", ICON_NULL, "UI_OT_reset_default_button");
- uiItemO(layout, "Copy Data Path", 0, "UI_OT_copy_data_path_button");
- uiItemO(layout, "Copy To Selected", 0, "UI_OT_copy_to_selected_button");
+ uiItemO(layout, "Copy Data Path", ICON_NULL, "UI_OT_copy_data_path_button");
+ uiItemO(layout, "Copy To Selected", ICON_NULL, "UI_OT_copy_to_selected_button");
uiItemS(layout);
}
@@ -4262,28 +4262,28 @@ static int ui_but_menu(bContext *C, uiBut *but)
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
RNA_string_set(&ptr_props, "doc_id", buf);
- uiItemFullO(layout, "WM_OT_doc_view", "View Docs", 0, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "WM_OT_doc_view", "View Docs", ICON_NULL, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr_props, "WM_OT_doc_edit");
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", RNA_property_description(but->rnaprop));
- uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", 0, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", ICON_NULL, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
}
else if (but->optype) {
WM_operator_py_idname(buf, but->optype->idname);
WM_operator_properties_create(&ptr_props, "WM_OT_doc_view");
RNA_string_set(&ptr_props, "doc_id", buf);
- uiItemFullO(layout, "WM_OT_doc_view", "View Docs", 0, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "WM_OT_doc_view", "View Docs", ICON_NULL, ptr_props.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr_props, "WM_OT_doc_edit");
RNA_string_set(&ptr_props, "doc_id", buf);
RNA_string_set(&ptr_props, "doc_new", but->optype->description);
- uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", 0, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
+ uiItemFullO(layout, "WM_OT_doc_edit", "Submit Description", ICON_NULL, ptr_props.data, WM_OP_INVOKE_DEFAULT, 0);
}
}
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 566400e98d6..b0ab90279f8 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -748,7 +748,7 @@ int UI_icon_get_width(int icon_id)
icon = BKE_icon_get(icon_id);
- if (!icon) {
+ if (icon==ICON_NULL) {
if (G.f & G_DEBUG)
printf("UI_icon_get_width: Internal error, no icon for icon ID: %d\n", icon_id);
return 0;
@@ -773,7 +773,7 @@ int UI_icon_get_height(int icon_id)
icon = BKE_icon_get(icon_id);
- if (!icon) {
+ if (icon==ICON_NULL) {
if (G.f & G_DEBUG)
printf("UI_icon_get_height: Internal error, no icon for icon ID: %d\n", icon_id);
return 0;
@@ -949,7 +949,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
icon = BKE_icon_get(icon_id);
- if (!icon) {
+ if (icon==ICON_NULL) {
if (G.f & G_DEBUG)
printf("icon_draw_mipmap: Internal error, no icon for icon ID: %d\n", icon_id);
return;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index a419fcfe40b..559015715ef 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -406,14 +406,14 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
col= a % dim_size[0];
row= a / dim_size[0];
- but= uiDefAutoButR(block, ptr, prop, a, "", 0, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
+ but= uiDefAutoButR(block, ptr, prop, a, "", ICON_NULL, x + w*col, y+(dim_size[1]*UI_UNIT_Y)-(row*UI_UNIT_Y), w, UI_UNIT_Y);
if(slider && but->type==NUM)
but->type= NUMSLI;
}
}
else {
if(ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) && !expand)
- uiDefAutoButR(block, ptr, prop, -1, "", 0, 0, 0, w, UI_UNIT_Y);
+ uiDefAutoButR(block, ptr, prop, -1, "", ICON_NULL, 0, 0, w, UI_UNIT_Y);
if(!ELEM(subtype, PROP_COLOR, PROP_COLOR_GAMMA) || expand) {
/* layout for known array subtypes */
@@ -752,7 +752,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
block->flag |= UI_BLOCK_NO_FLIP;
}
- uiItemL(column, (char*)item[i].name, 0);
+ uiItemL(column, (char*)item[i].name, ICON_NULL);
bt= block->buttons.last;
bt->flag= UI_TEXT_LEFT;
}
@@ -877,7 +877,7 @@ static void ui_item_rna_size(uiLayout *layout, const char *name, int icon, Point
/* increase height for arrays */
if(index == RNA_NO_INDEX && len > 0) {
- if(!name[0] && icon == 0)
+ if(!name[0] && icon == ICON_NULL)
h= 0;
if(ELEM(subtype, PROP_LAYER, PROP_LAYER_MEMBER))
@@ -917,7 +917,7 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
/* set name and icon */
if(!name)
name= (char*)RNA_property_ui_name(prop);
- if(!icon)
+ if(icon == ICON_NULL)
icon= RNA_property_ui_icon(prop);
if(ELEM4(type, PROP_INT, PROP_FLOAT, PROP_STRING, PROP_POINTER))
@@ -1077,7 +1077,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
for(i=0; i<totitem; i++) {
if(item[i].identifier[0]) {
- uiItemEnumR(column, (char*)item[i].name, 0, ptr, propname, item[i].value);
+ uiItemEnumR(column, (char*)item[i].name, ICON_NULL, ptr, propname, item[i].value);
}
else {
if(item[i].name) {
@@ -1087,7 +1087,7 @@ void uiItemsEnumR(uiLayout *layout, struct PointerRNA *ptr, const char *propname
block->flag |= UI_BLOCK_NO_FLIP;
}
- uiItemL(column, (char*)item[i].name, 0);
+ uiItemL(column, (char*)item[i].name, ICON_NULL);
bt= block->buttons.last;
bt->flag= UI_TEXT_LEFT;
}
@@ -1264,13 +1264,18 @@ void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propna
searchprop= RNA_struct_find_property(searchptr, searchpropname);
- if(!searchprop || RNA_property_type(searchprop) != PROP_COLLECTION) {
+
+ if(!searchprop) {
printf("uiItemPointerR: search collection property not found: %s.%s\n", RNA_struct_identifier(ptr->type), searchpropname);
return;
}
+ else if (RNA_property_type(searchprop) != PROP_COLLECTION) {
+ printf("uiItemPointerR: search collection property is not a collection type: %s.%s\n", RNA_struct_identifier(ptr->type), searchpropname);
+ return;
+ }
/* get icon & name */
- if(!icon) {
+ if(icon==ICON_NULL) {
if(type == PROP_POINTER)
icontype= RNA_property_pointer_type(ptr, prop);
else
@@ -2674,14 +2679,14 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
}
if(flag & UI_LAYOUT_OP_SHOW_TITLE) {
- uiItemL(layout, op->type->name, 0);
+ uiItemL(layout, op->type->name, ICON_NULL);
}
/* poll() on this operator may still fail, at the moment there is no nice feedback when this happens
* just fails silently */
if(!WM_operator_repeat_check(C, op)) {
uiBlockSetButLock(uiLayoutGetBlock(layout), TRUE, "Operator cannot redo");
- uiItemL(layout, "* Redo Unsupported *", 0); // XXX, could give some nicer feedback or not show redo panel at all?
+ uiItemL(layout, "* Redo Unsupported *", ICON_NULL); // XXX, could give some nicer feedback or not show redo panel at all?
}
if(op->type->ui) {
@@ -2702,7 +2707,7 @@ void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,in
empty= uiDefAutoButsRNA(layout, &ptr, check_prop, label_align) == 0;
if(empty && (flag & UI_LAYOUT_OP_SHOW_EMPTY)) {
- uiItemL(layout, "No Properties.", 0);
+ uiItemL(layout, "No Properties.", ICON_NULL);
}
}
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 2230042fb1f..d22106fc6a1 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1487,7 +1487,7 @@ static void ui_block_func_MENUSTR(bContext *UNUSED(C), uiLayout *layout, void *a
uiItemL(layout, md->title, md->titleicon);
}
else {
- uiItemL(layout, md->title, 0);
+ uiItemL(layout, md->title, ICON_NULL);
bt= block->buttons.last;
bt->flag= UI_TEXT_LEFT;
}
@@ -1887,7 +1887,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
bt= uiDefButR(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, propname, 2, 0.0, 0.0, 0, 3, "Blue");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
- // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", 0);
+ // could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", ICON_NULL);
// but need to use uiButSetFunc for updating other fake buttons
/* HSV values */
@@ -2411,7 +2411,7 @@ void uiPupMenuInvoke(bContext *C, const char *idname)
if(mt->poll && mt->poll(C, mt)==0)
return;
- pup= uiPupMenuBegin(C, mt->label, 0);
+ pup= uiPupMenuBegin(C, mt->label, ICON_NULL);
layout= uiPupMenuLayout(pup);
menu.layout= layout;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 3ac86823874..0c917f29623 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -525,16 +525,16 @@ void uiTemplateAnyID(uiLayout *layout, PointerRNA *ptr, const char *propname, co
/* Label - either use the provided text, or will become "ID-Block:" */
if (text)
- uiItemL(row, text, 0);
+ uiItemL(row, text, ICON_NULL);
else
- uiItemL(row, "ID-Block:", 0);
+ uiItemL(row, "ID-Block:", ICON_NULL);
/* ID-Type Selector - just have a menu of icons */
// FIXME: the icon-only setting doesn't work when we supply a blank name
- uiItemFullR(row, ptr, propType, 0, 0, UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemFullR(row, ptr, propType, 0, 0, UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
/* ID-Block Selector - just use pointer widget... */
- uiItemFullR(row, ptr, propID, 0, 0, 0, "", 0);
+ uiItemFullR(row, ptr, propID, 0, 0, 0, "", ICON_NULL);
}
/********************* RNA Path Builder Template ********************/
@@ -679,14 +679,14 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
uiBlockSetEmboss(block, UI_EMBOSSN);
/* Open/Close ................................. */
- uiItemR(row, &ptr, "show_expanded", 0, "", 0);
+ uiItemR(row, &ptr, "show_expanded", 0, "", ICON_NULL);
/* modifier-type icon */
uiItemL(row, "", RNA_struct_ui_icon(ptr.type));
uiBlockSetEmboss(block, UI_EMBOSS);
/* modifier name */
- uiItemR(row, &ptr, "name", 0, "", 0);
+ uiItemR(row, &ptr, "name", 0, "", ICON_NULL);
/* mode enabling buttons */
uiBlockBeginAlign(block);
@@ -694,11 +694,11 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
if ( ((md->type!=eModifierType_Softbody && md->type!=eModifierType_Collision) || !(ob->pd && ob->pd->deflect))
&& (md->type!=eModifierType_Surface) )
{
- uiItemR(row, &ptr, "show_render", 0, "", 0);
- uiItemR(row, &ptr, "show_viewport", 0, "", 0);
+ uiItemR(row, &ptr, "show_render", 0, "", ICON_NULL);
+ uiItemR(row, &ptr, "show_viewport", 0, "", ICON_NULL);
if (mti->flags & eModifierTypeFlag_SupportsEditmode)
- uiItemR(row, &ptr, "show_in_editmode", 0, "", 0);
+ uiItemR(row, &ptr, "show_in_editmode", 0, "", ICON_NULL);
}
if ((ob->type==OB_MESH) && modifier_couldBeCage(scene, md) && (index <= lastCageIndex))
{
@@ -738,9 +738,9 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
if (!(ob->mode & OB_MODE_PARTICLE_EDIT) && psys->pathcache) {
if(ELEM(psys->part->ren_as, PART_DRAW_GR, PART_DRAW_OB))
- uiItemO(row, "Convert", 0, "OBJECT_OT_duplicates_make_real");
+ uiItemO(row, "Convert", ICON_NULL, "OBJECT_OT_duplicates_make_real");
else if(psys->part->ren_as == PART_DRAW_PATH)
- uiItemO(row, "Convert", 0, "OBJECT_OT_modifier_convert");
+ uiItemO(row, "Convert", ICON_NULL, "OBJECT_OT_modifier_convert");
}
}
else {
@@ -755,7 +755,7 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob, Modif
uiBlockSetButLock(block, ob && ob->id.lib, ERROR_LIBDATA_MESSAGE);
if (!ELEM5(md->type, eModifierType_Fluidsim, eModifierType_Softbody, eModifierType_ParticleSystem, eModifierType_Cloth, eModifierType_Smoke))
- uiItemO(row, "Copy", 0, "OBJECT_OT_modifier_copy");
+ uiItemO(row, "Copy", ICON_NULL, "OBJECT_OT_modifier_copy");
}
/* result is the layout block inside the box, that we return so that modifier settings can be drawn */
@@ -913,7 +913,7 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
/* open/close */
uiBlockSetEmboss(block, UI_EMBOSSN);
- uiItemR(row, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", 0);
+ uiItemR(row, &ptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", ICON_NULL);
uiBlockSetEmboss(block, UI_EMBOSS);
/* name */
@@ -923,10 +923,10 @@ static uiLayout *draw_constraint(uiLayout *layout, Object *ob, bConstraint *con)
uiLayoutSetRedAlert(row, 1);
if(proxy_protected == 0) {
- uiItemR(row, &ptr, "name", 0, "", 0);
+ uiItemR(row, &ptr, "name", 0, "", ICON_NULL);
}
else
- uiItemL(row, con->name, 0);
+ uiItemL(row, con->name, ICON_NULL);
uiLayoutSetRedAlert(row, 0);
@@ -1114,7 +1114,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
col = uiLayoutColumn(row, 1);
uiLayoutSetScaleX(col, 1.5);
- uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", 0);
+ uiItemR(col, &material_ptr, "preview_render_type", UI_ITEM_R_EXPAND, "", ICON_NULL);
}
if(pr_texture) {
@@ -1134,7 +1134,7 @@ void uiTemplatePreview(uiLayout *layout, ID *id, int show_buttons, ID *parent, M
/* Alpha buton for texture preview */
if(*pr_texture!=TEX_PR_OTHER) {
row = uiLayoutRow(layout, 0);
- uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, 0);
+ uiItemR(row, &texture_ptr, "use_preview_alpha", 0, NULL, ICON_NULL);
}
}
}
@@ -1249,8 +1249,8 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
PointerRNA ptr;
RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr);
row= uiLayoutRow(layout, 0);
- uiItemR(row, &ptr, "position", 0, "Pos", 0);
- uiItemR(row, &ptr, "color", 0, "", 0);
+ uiItemR(row, &ptr, "position", 0, "Pos", ICON_NULL);
+ uiItemR(row, &ptr, "color", 0, "", ICON_NULL);
}
}
@@ -1274,7 +1274,7 @@ static void colorband_buttons_small(uiLayout *layout, uiBlock *block, ColorBand
CBData *cbd= coba->data + coba->cur;
PointerRNA ptr;
RNA_pointer_create(cb->ptr.id.data, &RNA_ColorRampElement, cbd, &ptr);
- uiItemR(layout, &ptr, "color", 0, "", 0);
+ uiItemR(layout, &ptr, "color", 0, "", ICON_NULL);
}
bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
@@ -1753,8 +1753,8 @@ static void curvemap_buttons_layout(uiLayout *layout, PointerRNA *ptr, char labe
/* black/white levels */
if(levels) {
split= uiLayoutSplit(layout, 0, 0);
- uiItemR(uiLayoutColumn(split, 0), ptr, "black_level", UI_ITEM_R_EXPAND, NULL, 0);
- uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, 0);
+ uiItemR(uiLayoutColumn(split, 0), ptr, "black_level", UI_ITEM_R_EXPAND, NULL, ICON_NULL);
+ uiItemR(uiLayoutColumn(split, 0), ptr, "white_level", UI_ITEM_R_EXPAND, NULL, ICON_NULL);
uiLayoutRow(layout, 0);
bt=uiDefBut(block, BUT, 0, "Reset", 0, 0, UI_UNIT_X*10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "Reset Black/White point and curves");
@@ -1979,7 +1979,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* retrieve icon and name */
icon= list_item_icon_get(C, itemptr, rnaicon);
- if(!icon || icon == ICON_DOT)
+ if(icon == ICON_NULL || icon == ICON_DOT)
icon= 0;
namebuf= RNA_struct_name_get_alloc(itemptr, NULL, 0);
@@ -2020,7 +2020,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiItemL(sub, str, ui_id_icon_get(C, &manode->id, 1));
}
else if(ma->use_nodes) {
- uiItemL(sub, "Node <none>", 0);
+ uiItemL(sub, "Node <none>", ICON_NULL);
}
}
}
@@ -2033,8 +2033,8 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
uiBlockSetEmboss(block, UI_EMBOSSN);
row= uiLayoutRow(split, 1);
- if(i == 0) uiItemL(row, "", 0);
- else uiItemR(row, itemptr, "value", 0, "", 0);
+ if(i == 0) uiItemL(row, "", ICON_NULL);
+ else uiItemR(row, itemptr, "value", 0, "", ICON_NULL);
if(ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH))
uiLayoutSetActive(row, 0);
@@ -2161,7 +2161,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* if not found, add in dummy button */
if(i == 0)
- uiItemL(row, "", 0);
+ uiItemL(row, "", ICON_NULL);
/* next/prev button */
sprintf(str, "%d :", i);
@@ -2214,7 +2214,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* add dummy buttons to fill space */
while(i < pa->list_scroll+items) {
if(i >= pa->list_scroll)
- uiItemL(col, "", 0);
+ uiItemL(col, "", ICON_NULL);
i++;
}
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index b42b5aff33e..dbe3697c76a 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -151,12 +151,12 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper
if(label_align=='V') {
col= uiLayoutColumn(layout, 1);
- uiItemL(col, name, 0);
+ uiItemL(col, name, ICON_NULL);
}
else if(label_align=='H') {
split = uiLayoutSplit(layout, 0.5f, 0);
- uiItemL(uiLayoutColumn(split, 0), name, 0);
+ uiItemL(uiLayoutColumn(split, 0), name, ICON_NULL);
col= uiLayoutColumn(split, 0);
}
else {
@@ -177,7 +177,7 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper
name= NULL; /* no smart label alignment, show default name with button */
}
- uiItemFullR(col, ptr, prop, -1, 0, 0, name, 0);
+ uiItemFullR(col, ptr, prop, -1, 0, 0, name, ICON_NULL);
tot++;
}
RNA_STRUCT_END;
@@ -194,7 +194,7 @@ int uiIconFromID(ID *id)
short idcode;
if(id==NULL)
- return 0;
+ return ICON_NULL;
idcode= GS(id->name);
@@ -212,5 +212,5 @@ int uiIconFromID(ID *id)
will set the right type, also with subclassing */
RNA_id_pointer_create(id, &ptr);
- return (ptr.type)? RNA_struct_ui_icon(ptr.type): 0;
+ return (ptr.type)? RNA_struct_ui_icon(ptr.type) : ICON_NULL;
}
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 1d49735d63a..efdb2ef5f5e 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -749,7 +749,7 @@ static void widget_draw_preview(BIFIconID icon, float aspect, float UNUSED(alpha
{
int w, h, x, y, size;
- if(!icon)
+ if(icon==ICON_NULL)
return;
w = rect->xmax - rect->xmin;