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
committerJulian Eisel <julian@blender.org>2022-03-02 17:52:17 +0300
commit1e1d1f15e8750642c29e4d04e09462cc4e4d2baa (patch)
tree9b17527a7a6eb08e5abe61f541b96099b48742a5 /source/blender/editors/space_outliner/outliner_draw.cc
parent13b6cec039681db40e677463aa9fdff6d55896aa (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/outliner_draw.cc')
-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;