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:
authorCampbell Barton <ideasman42@gmail.com>2020-09-18 03:24:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-09-18 03:24:14 +0300
commit1dda60792cc303ec81785d6a79926eed9a4da3d3 (patch)
treedde8200f426561b524a3e8526d6570aff879b1bb /source/blender/editors/interface
parentcacd57b67a15e08bce3b1c9a136004516c593672 (diff)
Cleanup: use 'UI_icon_*' prefix for icons API
- UI_collection_color_icon_get -> UI_icon_color_from_collection - UI_idcode_icon_get -> UI_icon_from_idcode - UI_library_icon_get -> UI_icon_from_library - UI_mode_icon_get -> UI_icon_from_object_mode - UI_rnaptr_icon_get -> UI_icon_from_rnaptr - UI_alert_image -> UI_icon_alert_imbuf_get - UI_preview_render_size -> UI_icon_preview_to_render_size - UI_id_icon_render -> UI_icon_render_id
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/interface/interface_icons.c22
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/interface/interface_utils.c2
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 11c7f68ae55..e1e16636253 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -4734,7 +4734,7 @@ uiBut *uiDefButImage(
uiBut *uiDefButAlert(uiBlock *block, int icon, int x, int y, short width, short height)
{
- struct ImBuf *ibuf = UI_alert_image(icon);
+ struct ImBuf *ibuf = UI_icon_alert_imbuf_get(icon);
if (icon == ALERT_ICON_BLENDER) {
return uiDefButImage(block, ibuf, x, y, width, height, NULL);
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 951321b93e6..6cd005b59e5 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1250,7 +1250,7 @@ void UI_icons_init()
/* Render size for preview images and icons
*/
-int UI_preview_render_size(enum eIconSizes size)
+int UI_icon_preview_to_render_size(enum eIconSizes size)
{
switch (size) {
case ICON_SIZE_ICON:
@@ -1266,7 +1266,7 @@ int UI_preview_render_size(enum eIconSizes size)
*/
static void icon_create_rect(struct PreviewImage *prv_img, enum eIconSizes size)
{
- const uint render_size = UI_preview_render_size(size);
+ const uint render_size = UI_icon_preview_to_render_size(size);
if (!prv_img) {
if (G.debug & G_DEBUG) {
@@ -1946,7 +1946,7 @@ static void ui_id_preview_image_render_size(
}
}
-void UI_id_icon_render(const bContext *C, Scene *scene, ID *id, const bool big, const bool use_job)
+void UI_icon_render_id(const bContext *C, Scene *scene, ID *id, const bool big, const bool use_job)
{
PreviewImage *pi = BKE_previewimg_id_ensure(id);
@@ -2165,13 +2165,13 @@ int ui_id_icon_get(const bContext *C, ID *id, const bool big)
case ID_LA: /* fall through */
iconid = BKE_icon_id_ensure(id);
/* checks if not exists, or changed */
- UI_id_icon_render(C, NULL, id, big, true);
+ UI_icon_render_id(C, NULL, id, big, true);
break;
case ID_SCR:
iconid = ui_id_screen_get_icon(C, id);
break;
case ID_GR:
- iconid = UI_collection_color_icon_get((Collection *)id);
+ iconid = UI_icon_color_from_collection((Collection *)id);
break;
default:
break;
@@ -2180,7 +2180,7 @@ int ui_id_icon_get(const bContext *C, ID *id, const bool big)
return iconid;
}
-int UI_library_icon_get(const ID *id)
+int UI_icon_from_library(const ID *id)
{
if (ID_IS_LINKED(id)) {
if (id->tag & LIB_TAG_MISSING) {
@@ -2198,7 +2198,7 @@ int UI_library_icon_get(const ID *id)
return ICON_NONE;
}
-int UI_rnaptr_icon_get(bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
+int UI_icon_from_rnaptr(bContext *C, PointerRNA *ptr, int rnaicon, const bool big)
{
ID *id = NULL;
@@ -2255,7 +2255,7 @@ int UI_rnaptr_icon_get(bContext *C, PointerRNA *ptr, int rnaicon, const bool big
return rnaicon;
}
-int UI_idcode_icon_get(const int idcode)
+int UI_icon_from_idcode(const int idcode)
{
switch (idcode) {
case ID_AC:
@@ -2334,7 +2334,7 @@ int UI_idcode_icon_get(const int idcode)
}
}
-int UI_mode_icon_get(const int mode)
+int UI_icon_from_object_mode(const int mode)
{
switch (mode) {
case OB_MODE_OBJECT:
@@ -2364,7 +2364,7 @@ int UI_mode_icon_get(const int mode)
}
}
-int UI_collection_color_icon_get(const Collection *collection)
+int UI_icon_color_from_collection(const Collection *collection)
{
int icon = ICON_OUTLINER_COLLECTION;
@@ -2415,7 +2415,7 @@ void UI_icon_draw_ex(float x,
/* ********** Alert Icons ********** */
-ImBuf *UI_alert_image(eAlertIcon icon)
+ImBuf *UI_icon_alert_imbuf_get(eAlertIcon icon)
{
#ifdef WITH_HEADLESS
return NULL;
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index a1c7ba711cd..30b98717505 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -374,7 +374,7 @@ static bool id_search_add(const bContext *C, TemplateID *template_ui, uiSearchIt
int name_prefix_offset;
BKE_id_full_name_ui_prefix_get(name_ui, id, use_lib_prefix, UI_SEP_CHAR, &name_prefix_offset);
if (!use_lib_prefix) {
- iconid = UI_library_icon_get(id);
+ iconid = UI_icon_from_library(id);
}
if (!UI_search_item_add(items,
@@ -6252,7 +6252,7 @@ void uiTemplateList(uiLayout *layout,
sub = uiLayoutRow(overlap, false);
- icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ icon = UI_icon_from_rnaptr(C, itemptr, rnaicon, false);
if (icon == ICON_DOT) {
icon = ICON_NONE;
}
@@ -6308,7 +6308,7 @@ void uiTemplateList(uiLayout *layout,
PointerRNA *itemptr = &items_ptr[activei].item;
const int org_i = items_ptr[activei].org_idx;
- icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ icon = UI_icon_from_rnaptr(C, itemptr, rnaicon, false);
if (icon == ICON_DOT) {
icon = ICON_NONE;
}
@@ -6392,7 +6392,7 @@ void uiTemplateList(uiLayout *layout,
sub = uiLayoutRow(overlap, false);
- icon = UI_rnaptr_icon_get(C, itemptr, rnaicon, false);
+ icon = UI_icon_from_rnaptr(C, itemptr, rnaicon, false);
draw_item(ui_list,
C,
sub,
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 7b72e380f5e..30538cc7050 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -486,7 +486,7 @@ void ui_rna_collection_search_update_fn(const struct bContext *C,
* name prefix for showing the library status. */
int name_prefix_offset = cis->name_prefix_offset;
if (!has_id_icon && cis->is_id && !requires_exact_data_name) {
- cis->iconid = UI_library_icon_get(cis->data);
+ cis->iconid = UI_icon_from_library(cis->data);
/* No need to re-allocate, string should be shorter than before (lib status prefix is
* removed). */
BKE_id_full_name_ui_prefix_get(name_buf, cis->data, false, UI_SEP_CHAR, &name_prefix_offset);