[Bf-blender-cvs] [cf08eec] asset-engine: Add simple dummy code in outliner to show assets and their status.

Bastien Montagne noreply at git.blender.org
Tue Apr 26 16:42:15 CEST 2016


Commit: cf08eec18720b1beca1f8e11162503dd84cc7cef
Author: Bastien Montagne
Date:   Tue Apr 26 16:02:51 2016 +0200
Branches: asset-engine
https://developer.blender.org/rBcf08eec18720b1beca1f8e11162503dd84cc7cef

Add simple dummy code in outliner to show assets and their status.

This is purely WIP helper stuff, final UI will need real work - but that's for later.

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

M	source/blender/editors/space_outliner/outliner_draw.c

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

diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index b624c7c..235a1cf 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -1573,6 +1573,24 @@ static void outliner_draw_tree_element(
 			else {
 				UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT);
 			}
+			/* TODO use proper icons or other UI feedback, for sake of simplicity for now using basic
+			 *      color code to show assets and their state. */
+			if (tselem->id->uuid) {
+				offsx += UI_UNIT_X;
+				UI_icon_draw((float)startx + offsx - 0.5f * ufac, (float)*starty + 1.5f * ufac, ICON_SOLO_ON);
+				if (tselem->id->uuid->tag & UUID_TAG_ENGINE_MISSING) {
+					UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_GHOST_ENABLED);
+				}
+				else if (tselem->id->uuid->tag & UUID_TAG_ASSET_MISSING) {
+					/* Nothing special (underlying icon is already 'broken' one)... */
+				}
+				else if (tselem->id->uuid->tag & UUID_TAG_ASSET_RELOAD) {
+					UI_icon_draw((float)startx + offsx, (float)*starty + 2 * ufac, ICON_FILE_REFRESH);
+				}
+				else {
+					/* Nothing special (underlying icon is already 'OK' one)... */
+				}
+			}
 			glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
 			offsx += UI_UNIT_X;
 		}




More information about the Bf-blender-cvs mailing list