diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-04-19 13:52:32 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-04-19 13:52:32 +0300 |
commit | da82269c58bd7ec1c0ebcb5e1433c731120ec389 (patch) | |
tree | d061121ad00e7bd76cd5b299f15e7dfcdbc6c068 /source/blender/editors | |
parent | 63225d7c8b3a45e8189476d537585b011993fb17 (diff) |
Cleanup: rename Icon.type -> id_type
Confusing when adding non-id icons.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index 62244979c12..ed57412c05c 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -139,7 +139,7 @@ static DrawInfo *def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs, new_icon = MEM_callocN(sizeof(Icon), "texicon"); new_icon->obj = NULL; /* icon is not for library object */ - new_icon->type = 0; + new_icon->id_type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); di->type = type; @@ -191,7 +191,7 @@ static void def_internal_vicon(int icon_id, VectorDrawFunc drawFunc) new_icon = MEM_callocN(sizeof(Icon), "texicon"); new_icon->obj = NULL; /* icon is not for library object */ - new_icon->type = 0; + new_icon->id_type = 0; di = MEM_callocN(sizeof(DrawInfo), "drawinfo"); di->type = ICON_TYPE_VECTOR; @@ -849,7 +849,7 @@ void ui_icon_ensure_deferred(const bContext *C, const int icon_id, const bool bi switch (di->type) { case ICON_TYPE_PREVIEW: { - ID *id = (icon->type != 0) ? icon->obj : NULL; + ID *id = (icon->id_type != 0) ? icon->obj : NULL; PreviewImage *prv = id ? BKE_previewimg_id_ensure(id) : icon->obj; if (prv) { @@ -905,7 +905,7 @@ PreviewImage *UI_icon_to_preview(int icon_id) DrawInfo *di = (DrawInfo *)icon->drawinfo; if (di) { if (di->type == ICON_TYPE_PREVIEW) { - PreviewImage *prv = (icon->type != 0) ? BKE_previewimg_id_ensure((ID *)icon->obj) : icon->obj; + PreviewImage *prv = (icon->id_type != 0) ? BKE_previewimg_id_ensure((ID *)icon->obj) : icon->obj; if (prv) { return BKE_previewimg_copy(prv); @@ -1124,7 +1124,7 @@ static void icon_draw_size( glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } else if (di->type == ICON_TYPE_PREVIEW) { - PreviewImage *pi = (icon->type != 0) ? BKE_previewimg_id_ensure((ID *)icon->obj) : icon->obj; + PreviewImage *pi = (icon->id_type != 0) ? BKE_previewimg_id_ensure((ID *)icon->obj) : icon->obj; if (pi) { /* no create icon on this level in code */ |