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:
authorEthan Hall <Ethan1080>2022-03-02 17:33:48 +0300
committerFabian Schempp <fabianschempp@googlemail.com>2022-04-11 01:30:26 +0300
commit0e9e79acce04f77782cd3c528402003efe56021d (patch)
tree7ba2b75732c9bd7ccc8238efcc264bb5bf635582 /source/blender/editors/space_outliner
parent53f7775c5a5dec6233a296e72a17d10052430443 (diff)
UI: Enable the outliner to use the correct icon for each curve subtype
This patch enables enables the outliner to use the correct icon for each of the curve subtypes (Curve/Surface/Font). Differential Revision: https://developer.blender.org/D14093 Reviewed by: Julian Eisel
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc
index 2da416c8671..423f11e0641 100644
--- a/source/blender/editors/space_outliner/outliner_draw.cc
+++ b/source/blender/editors/space_outliner/outliner_draw.cc
@@ -28,6 +28,7 @@
#include "BKE_armature.h"
#include "BKE_context.h"
+#include "BKE_curve.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_idtype.h"
@@ -2655,9 +2656,23 @@ TreeElementIcon tree_element_get_icon(TreeStoreElem *tselem, TreeElement *te)
case ID_ME:
data.icon = ICON_OUTLINER_DATA_MESH;
break;
- case ID_CU_LEGACY:
- data.icon = ICON_OUTLINER_DATA_CURVE;
+ case ID_CU_LEGACY: {
+ const Curve *cu = (Curve *)tselem->id;
+ const short obtype = BKE_curve_type_get(cu);
+
+ switch (obtype) {
+ case OB_FONT:
+ data.icon = ICON_OUTLINER_DATA_FONT;
+ break;
+ case OB_SURF:
+ data.icon = ICON_OUTLINER_DATA_SURFACE;
+ break;
+ default:
+ data.icon = ICON_OUTLINER_DATA_CURVE;
+ break;
+ }
break;
+ }
case ID_MB:
data.icon = ICON_OUTLINER_DATA_META;
break;