[Bf-blender-cvs] [d5e9c1f4ab0] asset-engine: Merge blender2.8 branch.
Bastien Montagne
noreply at git.blender.org
Tue Nov 7 15:20:42 CET 2017
Commit: d5e9c1f4ab05ef65207bbdca0754d9dc95f47617
Author: Bastien Montagne
Date: Tue Nov 7 14:04:15 2017 +0100
Branches: asset-engine
https://developer.blender.org/rBd5e9c1f4ab05ef65207bbdca0754d9dc95f47617
Merge blender2.8 branch.
This means that from now own, we work based on Blender2.8!
Conflicts:
source/blender/blenloader/BLO_readfile.h
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_outliner/outliner_draw.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_text_types.h
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files_link.c
source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_info.py
index aa999e72f7d,59003cf7eb0..ce1b6ec9e69
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@@ -85,8 -68,18 +85,18 @@@ class INFO_HT_header(Header)
row.label(bpy.app.autoexec_fail_message)
return
+ if (bpy.app.assets_fail or bpy.app.assets_need_reload) and not bpy.app.assets_quiet:
+ row.operator("script.assets_warn_clear", text="Ignore")
+ if bpy.app.assets_need_reload is True and bpy.app.assets_quiet is False:
+ #~ row.label(icon='SCREEN_BACK', text="Reload Assets")
+ row.operator("wm.assets_reload", icon='SCREEN_BACK', text="Reload Assets")
+ row.label("Some assets have to be reloaded", icon='INFO')
+ if bpy.app.assets_fail is True and bpy.app.assets_quiet is False:
+ row.label("Some asset engine(s) failed to retrieve updated data about their assets...", icon='ERROR')
+ return
+
row.operator("wm.splash", text="", icon='BLENDER', emboss=False)
- row.label(text=scene.statistics(), translate=False)
+ row.label(text=scene.statistics(context.render_layer), translate=False)
class INFO_MT_editor_menus(Menu):
diff --cc source/blender/blenloader/BLO_readfile.h
index b639236e022,9cf160bf9d3..2d160659dfb
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@@ -124,9 -116,14 +126,14 @@@ struct ID *BLO_library_link_named_part(
struct ID *BLO_library_link_named_part_ex(
struct Main *mainl, BlendHandle **bh,
const short idcode, const char *name, const short flag,
- struct Scene *scene, struct View3D *v3d,
+ struct Scene *scene, struct SceneLayer *sl,
const bool use_placeholders, const bool force_indirect);
+ struct ID *BLO_library_link_named_part_asset(
+ struct Main *mainl, BlendHandle **bh, const struct AssetEngineType *aet, const char *root,
+ const short idcode, const char *name, const struct AssetUUID *uuid, const short flag,
- struct Scene *scene, struct View3D *v3d,
++ struct Scene *scene, struct SceneLayer *sl,
+ const bool use_placeholders, const bool force_indirect);
-void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, struct Scene *scene, struct View3D *v3d);
+void BLO_library_link_end(struct Main *mainl, BlendHandle **bh, short flag, struct Scene *scene, struct SceneLayer *sl);
void BLO_library_link_copypaste(struct Main *mainl, BlendHandle *bh);
diff --cc source/blender/blenloader/intern/readfile.c
index e18aecb6dbb,0946c18b45a..238740b5038
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -10404,8 -10235,10 +10442,10 @@@ void BLO_library_link_copypaste(Main *m
}
static ID *link_named_part_ex(
- Main *mainl, FileData *fd, const short idcode, const char *name, const short flag,
- Scene *scene, SceneLayer *sl, const bool use_placeholders, const bool force_indirect)
+ Main *mainl, FileData *fd, const AssetEngineType *aet, const char *root,
+ const short idcode, const char *name, const AssetUUID *uuid, const short flag,
- Scene *scene, View3D *v3d,
++ Scene *scene, SceneLayer *sl,
+ const bool use_placeholders, const bool force_indirect)
{
ID *id = link_named_part(mainl, fd, idcode, name, use_placeholders, force_indirect);
@@@ -10446,7 -10293,7 +10500,7 @@@ ID *BLO_library_link_named_part(Main *m
* \param name The name of the datablock (without the 2 char ID prefix).
* \param flag Options for linking, used for instantiating.
* \param scene The scene in which to instantiate objects/groups (if NULL, no instantiation is done).
-- * \param v3d The active View3D (only to define active layers for instantiated objects & groups, can be NULL).
++ * \param sl The active SceneLayer (where objects & groups would be instantiated, can be NULL).
* \param use_placeholders If true, generate a placeholder (empty ID) if not found in current lib file.
* \param force_indirect If true, force loaded ID to be tagged as LIB_TAG_INDIRECT (used in reload context only).
* \return the linked ID when found.
@@@ -10458,7 -10305,33 +10512,33 @@@ ID *BLO_library_link_named_part_ex
const bool use_placeholders, const bool force_indirect)
{
FileData *fd = (FileData*)(*bh);
- return link_named_part_ex(mainl, fd, idcode, name, flag, scene, sl, use_placeholders, force_indirect);
- return link_named_part_ex(mainl, fd, NULL, NULL, idcode, name, NULL, flag, scene, v3d, use_placeholders, force_indirect);
++ return link_named_part_ex(mainl, fd, NULL, NULL, idcode, name, NULL, flag, scene, sl, use_placeholders, force_indirect);
+ }
+
+ /**
+ * Link a named datablock from an external blend file, using given asset engine & asset UUID.
+ * Optionally instantiate the object/group in the scene when the flags are set.
+ *
+ * \param mainl The main database to link from (not the active one).
+ * \param bh The blender file handle.
+ * \param aet The asset engine type (NULL when no asset engine is used).
+ * \param root the 'path' of the asset repository.
+ * \param idcode The kind of datablock to link.
+ * \param name The name of the datablock (without the 2 char ID prefix).
+ * \param uuid The asset engine's UUID of this datablock (NULL when no asset engine is used).
+ * \param flag Options for linking, used for instantiating.
+ * \param scene The scene in which to instantiate objects/groups (if NULL, no instantiation is done).
- * \param v3d The active View3D (only to define active layers for instantiated objects & groups, can be NULL).
++ * \param sl The active SceneLayer (where objects & groups would be instantiated, can be NULL).
+ * \return the linked ID when found.
+ */
+ struct ID *BLO_library_link_named_part_asset(
+ Main *mainl, BlendHandle **bh, const AssetEngineType *aet, const char *root,
+ const short idcode, const char *name, const AssetUUID *uuid, const short flag,
- Scene *scene, View3D *v3d,
++ Scene *scene, SceneLayer *sl,
+ const bool use_placeholders, const bool force_indirect)
+ {
+ FileData *fd = (FileData*)(*bh);
- return link_named_part_ex(mainl, fd, aet, root, idcode, name, uuid, flag, scene, v3d, use_placeholders, force_indirect);
++ return link_named_part_ex(mainl, fd, aet, root, idcode, name, uuid, flag, scene, sl, use_placeholders, force_indirect);
}
static void link_id_part(ReportList *reports, FileData *fd, Main *mainvar, ID *id, ID **r_id)
diff --cc source/blender/editors/space_file/filesel.c
index 3dfeb5eb5b3,db2979f803a..e2486bc3236
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@@ -108,6 -108,13 +108,14 @@@ short ED_fileselect_set_params(SpaceFil
params = sfile->params;
+ /* For now, always init filterid to 'all true' */
+ params->filter_id = FILTER_ID_AC | FILTER_ID_AR | FILTER_ID_BR | FILTER_ID_CA | FILTER_ID_CU | FILTER_ID_GD |
+ FILTER_ID_GR | FILTER_ID_IM | FILTER_ID_LA | FILTER_ID_LS | FILTER_ID_LT | FILTER_ID_MA |
+ FILTER_ID_MB | FILTER_ID_MC | FILTER_ID_ME | FILTER_ID_MSK | FILTER_ID_NT | FILTER_ID_OB |
+ FILTER_ID_PA | FILTER_ID_PAL | FILTER_ID_PC | FILTER_ID_SCE | FILTER_ID_SPK | FILTER_ID_SO |
- FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF;
++ FILTER_ID_TE | FILTER_ID_TXT | FILTER_ID_VF | FILTER_ID_WO | FILTER_ID_CF | FILTER_ID_WS |
++ FILTER_ID_LP;
+
/* set the parameters from the operator, if it exists */
if (op) {
PropertyRNA *prop;
diff --cc source/blender/editors/space_outliner/outliner_draw.c
index 62eda7d5128,dae14393d2f..40a44aca450
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@@ -1444,18 -1575,33 +1444,35 @@@ static void outliner_draw_tree_element
offsx += 2 * ufac;
if (tselem->type == 0 && ID_IS_LINKED(tselem->id)) {
- glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
if (tselem->id->tag & LIB_TAG_MISSING) {
- UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_BROKEN);
+ 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((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT);
+ UI_icon_draw_alpha((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_INDIRECT,
+ alpha_fac);
}
else {
- UI_icon_draw((float)startx + offsx + 2 * ufac, (float)*starty + 2 * ufac, ICON_LIBRARY_DATA_DIRECT);
+ 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((float)startx + offsx - 0.5f * ufac, (float)*starty + 1.5f * ufac, ICON_SOLO_ON);
++ 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((float)startx + offsx, (float)*starty + 2 * ufac, ICON_GHOST_ENABLED);
++ 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((float)startx + offsx, (float)*starty + 2 * ufac, ICON_FILE_REFRESH);
++ UI_icon_draw_alpha((float)startx + offsx, (float)*starty + 2 * ufac, ICON_FILE_REFRESH, alpha_fac);
+ }
+ else {
+ /* Nothing special (underlying icon
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list