[Bf-blender-cvs] [d2a75fb6dcb] hair_guides: Add basic outliner support for the groom object type.

Lukas Tönne noreply at git.blender.org
Mon Dec 11 10:08:35 CET 2017


Commit: d2a75fb6dcb2b3b90f37d9e2ce9833f4fd50079b
Author: Lukas Tönne
Date:   Mon Dec 11 09:08:12 2017 +0000
Branches: hair_guides
https://developer.blender.org/rBd2a75fb6dcb2b3b90f37d9e2ce9833f4fd50079b

Add basic outliner support for the groom object type.

===================================================================

M	source/blender/editors/space_outliner/outliner_draw.c
M	source/blender/editors/space_outliner/outliner_intern.h
M	source/blender/editors/space_outliner/outliner_tree.c

===================================================================

diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index c1072ad37ce..725582b3463 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1159,6 +1159,8 @@ static void tselem_draw_icon(uiBlock *block, int xmax, float x, float y, TreeSto
 					tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_CURVE); break;
 				case OB_MBALL:
 					tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_META); break;
+				case OB_GROOM:
+					tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_CURVE); break;
 				case OB_LATTICE:
 					tselem_draw_icon_uibut(&arg, ICON_OUTLINER_OB_LATTICE); break;
 				case OB_ARMATURE:
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index f69eb9af1bf..1f6e12b605c 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -108,7 +108,7 @@ typedef struct TreeElement {
 #define TREESTORE_ID_TYPE(_id) \
 	(ELEM(GS((_id)->name), ID_SCE, ID_LI, ID_OB, ID_ME, ID_CU, ID_MB, ID_NT, ID_MA, ID_TE, ID_IM, ID_LT, ID_LA, ID_CA) || \
 	 ELEM(GS((_id)->name), ID_KE, ID_WO, ID_SPK, ID_GR, ID_AR, ID_AC, ID_BR, ID_PA, ID_GD, ID_LS, ID_LP) || \
-	 ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_WS))  /* Only in 'blendfile' mode ... :/ */
+	 ELEM(GS((_id)->name), ID_SCR, ID_WM, ID_TXT, ID_VF, ID_SO, ID_CF, ID_PAL, ID_WS, ID_GM))  /* Only in 'blendfile' mode ... :/ */
 
 /* TreeElement->flag */
 enum {
diff --git a/source/blender/editors/space_outliner/outliner_tree.c b/source/blender/editors/space_outliner/outliner_tree.c
index a9c9ab74970..2fe860508d5 100644
--- a/source/blender/editors/space_outliner/outliner_tree.c
+++ b/source/blender/editors/space_outliner/outliner_tree.c
@@ -40,6 +40,7 @@
 #include "DNA_camera_types.h"
 #include "DNA_cachefile_types.h"
 #include "DNA_gpencil_types.h"
+#include "DNA_groom_types.h"
 #include "DNA_group_types.h"
 #include "DNA_key_types.h"
 #include "DNA_lamp_types.h"
@@ -666,6 +667,14 @@ static void outliner_add_id_contents(SpaceOops *soops, TreeElement *te, TreeStor
 				outliner_add_element(soops, &te->subtree, mb->mat[a], te, 0, a);
 			break;
 		}
+		case ID_GM:
+		{
+			Groom *groom = (Groom *)id;
+			
+			if (outliner_animdata_test(groom->adt))
+				outliner_add_element(soops, &te->subtree, groom, te, TSE_ANIM_DATA, 0);
+			break;
+		}
 		case ID_MA:
 		{
 			Material *ma = (Material *)id;



More information about the Bf-blender-cvs mailing list