[Bf-blender-cvs] [0829cebeb02] asset-uuid--archived: Merge branch 'master' into asset-uuid--archived
Julian Eisel
noreply at git.blender.org
Wed Jul 1 17:14:15 CEST 2020
Commit: 0829cebeb024095c268f190c34daa8ae9a5a224c
Author: Julian Eisel
Date: Wed Jul 1 17:13:57 2020 +0200
Branches: asset-uuid--archived
https://developer.blender.org/rB0829cebeb024095c268f190c34daa8ae9a5a224c
Merge branch 'master' into asset-uuid--archived
===================================================================
===================================================================
diff --cc source/blender/editors/space_outliner/outliner_draw.c
index 9a9bd610322,6ea1d74112d..5eee97e3fee
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@@ -3129,55 -3108,15 +3108,43 @@@ static void outliner_draw_tree_element(
offsx += 2 * ufac;
}
- if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) && ID_IS_LINKED(tselem->id)) {
- if (tselem->id->tag & LIB_TAG_MISSING) {
- UI_icon_draw_alpha((float)startx + offsx + 2 * ufac,
- (float)*starty + 2 * ufac,
- ICON_LIBRARY_DATA_BROKEN,
- alpha_fac);
- }
- else if (tselem->id->tag & LIB_TAG_INDIRECT) {
- UI_icon_draw_alpha((float)startx + offsx + 2 * ufac,
- (float)*starty + 2 * ufac,
- ICON_LIBRARY_DATA_INDIRECT,
- alpha_fac);
+ if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) ||
+ ((tselem->type == TSE_RNA_STRUCT) && RNA_struct_is_ID(te->rnaptr.type))) {
+ const BIFIconID lib_icon = UI_library_icon_get(tselem->id);
+ if (lib_icon != ICON_NONE) {
+ UI_icon_draw_alpha(
+ (float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, lib_icon, alpha_fac);
+ offsx += UI_UNIT_X + 4 * ufac;
}
+ else {
+ UI_icon_draw_alpha((float)startx + offsx + 2 * ufac,
+ (float)*starty + 2 * ufac,
+ ICON_LIBRARY_DATA_DIRECT,
+ alpha_fac);
+ }
+ if (tselem->id->uuid) {
+ offsx += UI_UNIT_X;
+ UI_icon_draw_alpha((float)startx + offsx - 0.5f * ufac,
+ (float)*starty + 1.5f * ufac,
+ ICON_SOLO_ON,
+ alpha_fac);
+ if (tselem->id->uuid->tag & UUID_TAG_ENGINE_MISSING) {
+ UI_icon_draw_alpha(
+ (float)startx + offsx, (float)*starty + 2 * ufac, ICON_GHOST_ENABLED, alpha_fac);
+ }
+ 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_alpha(
+ (float)startx + offsx, (float)*starty + 2 * ufac, ICON_FILE_REFRESH, alpha_fac);
+ }
+ else {
+ /* Nothing special (underlying icon is already 'OK' one)... */
+ }
+ }
+ offsx += UI_UNIT_X + 4 * ufac;
}
- else if (ELEM(tselem->type, 0, TSE_LAYER_COLLECTION) && ID_IS_OVERRIDE_LIBRARY(tselem->id)) {
- UI_icon_draw_alpha((float)startx + offsx + 2 * ufac,
- (float)*starty + 2 * ufac,
- ICON_LIBRARY_DATA_OVERRIDE,
- alpha_fac);
- offsx += UI_UNIT_X + 4 * ufac;
- }
GPU_blend(false);
/* name */
diff --cc source/blender/makesrna/intern/rna_ID.c
index 50658ef412b,46001f27fef..bb67783622b
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@@ -1565,17 -1523,9 +1543,18 @@@ static void rna_def_ID(BlenderRNA *brna
"Preview",
"Preview image and icon of this data-block (None if not supported for this type of data)");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON);
RNA_def_property_pointer_funcs(prop, "rna_IDPreview_get", NULL, NULL, NULL);
+ prop = RNA_def_pointer(
+ srna,
+ "asset_uuid",
+ "AssetUUID",
+ "Asset UUID",
+ "Unique identifier of the asset represented by that ID (NULL if not an asset)");
+ RNA_def_property_pointer_sdna(prop, NULL, "uuid");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+
/* functions */
func = RNA_def_function(srna, "evaluated_get", "rna_ID_evaluated_get");
RNA_def_function_ui_description(
More information about the Bf-blender-cvs
mailing list