[Bf-blender-cvs] [5f61756f469] asset-engine: Merge branch 'blender2.8' into asset-engine
Bastien Montagne
noreply at git.blender.org
Mon Sep 10 19:12:27 CEST 2018
Commit: 5f61756f469c3e3064204a626d2bfe5a56b04289
Author: Bastien Montagne
Date: Mon Sep 10 19:12:10 2018 +0200
Branches: asset-engine
https://developer.blender.org/rB5f61756f469c3e3064204a626d2bfe5a56b04289
Merge branch 'blender2.8' into asset-engine
Conflicts:
release/scripts/startup/bl_ui/space_filebrowser.py
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/versioning_280.c
source/blender/blenloader/intern/versioning_defaults.c
source/blender/editors/include/UI_interface.h
source/blender/editors/space_view3d/space_view3d.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_files_link.c
===================================================================
===================================================================
diff --cc release/scripts/startup/bl_ui/space_filebrowser.py
index 298b46f875b,2f659b8d248..4042cf357ea
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@@ -33,76 -32,64 +33,76 @@@ class FILEBROWSER_HT_header(Header)
if st.active_operator is None:
layout.template_header()
+ layout.separator()
+
+ if is_lib_browser:
+ row = layout.row()
+ row.prop(st, "asset_engine_type", text="")
+ layout.separator()
+ layout.menu("FILEBROWSER_MT_view")
+
row = layout.row(align=True)
row.operator("file.previous", text="", icon='BACK')
row.operator("file.next", text="", icon='FORWARD')
row.operator("file.parent", text="", icon='FILE_PARENT')
row.operator("file.refresh", text="", icon='FILE_REFRESH')
- layout.operator_context = 'EXEC_DEFAULT'
- layout.operator("file.directory_new", icon='NEWFOLDER', text="")
-
- layout.operator_context = 'INVOKE_DEFAULT'
-
- # can be None when save/reload with a file selector open
- if params:
- is_lib_browser = params.use_library_browsing
-
- layout.prop(params, "display_type", expand=True, text="")
- layout.prop(params, "sort_method", expand=True, text="")
- layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN')
-
- layout.separator_spacer()
-
- layout.template_running_jobs()
-
- if params:
- layout.prop(params, "use_filter", text="", icon='FILTER')
-
- row = layout.row(align=True)
- row.active = params.use_filter
- row.prop(params, "use_filter_folder", text="")
-
- if params.filter_glob:
- # if st.active_operator and hasattr(st.active_operator, "filter_glob"):
- # row.prop(params, "filter_glob", text="")
- row.label(text=params.filter_glob)
- else:
- row.prop(params, "use_filter_blender", text="")
- row.prop(params, "use_filter_backup", text="")
- row.prop(params, "use_filter_image", text="")
- row.prop(params, "use_filter_movie", text="")
- row.prop(params, "use_filter_script", text="")
- row.prop(params, "use_filter_font", text="")
- row.prop(params, "use_filter_sound", text="")
- row.prop(params, "use_filter_text", text="")
-
- if is_lib_browser:
- row.prop(params, "use_filter_blendid", text="")
- if params.use_filter_blendid:
- row.separator()
- row.prop(params, "filter_id_category", text="")
-
- row.separator()
- row.prop(params, "filter_search", text="", icon='VIEWZOOM')
+ layout.separator()
+ if st.asset_engine and is_lib_browser:
+ draw_header = getattr(st.asset_engine, "draw_header", None)
+ if draw_header:
+ draw_header(layout, context)
+ else:
+ layout.operator_context = 'EXEC_DEFAULT'
+ layout.operator("file.directory_new", icon='NEWFOLDER', text="")
+ layout.separator()
+
+ layout.operator_context = 'INVOKE_DEFAULT'
+
+ # can be None when save/reload with a file selector open
+ if params:
- layout.prop(params, "recursion_level", text="")
-
+ layout.prop(params, "display_type", expand=True, text="")
++ layout.prop(params, "sort_method", expand=True, text="")
++ layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN')
+
- layout.prop(params, "display_size", text="")
++ layout.separator_spacer()
+
- layout.prop(params, "sort_method", expand=True, text="")
++ layout.template_running_jobs()
+
- layout.prop(params, "show_hidden", text="", icon='FILE_HIDDEN')
++ if params:
+ layout.prop(params, "use_filter", text="", icon='FILTER')
+
+ row = layout.row(align=True)
+ row.active = params.use_filter
+
+ row.prop(params, "use_filter_folder", text="")
+
+ if params.filter_glob:
+ # if st.active_operator and hasattr(st.active_operator, "filter_glob"):
+ # row.prop(params, "filter_glob", text="")
+ row.label(params.filter_glob)
+ else:
+ row.prop(params, "use_filter_blender", text="")
+ row.prop(params, "use_filter_backup", text="")
+ row.prop(params, "use_filter_image", text="")
+ row.prop(params, "use_filter_movie", text="")
+ row.prop(params, "use_filter_script", text="")
+ row.prop(params, "use_filter_font", text="")
+ row.prop(params, "use_filter_sound", text="")
+ row.prop(params, "use_filter_text", text="")
+
+ if is_lib_browser:
+ row.prop(params, "use_filter_blendid", text="")
+ if params.use_filter_blendid:
+ row.separator()
+ row.prop(params, "filter_id_category", text="")
+
+ row.separator()
+ row.prop(params, "filter_search", text="", icon='VIEWZOOM')
- layout.template_running_jobs()
-
- class FILEBROWSER_UL_dir(bpy.types.UIList):
+ class FILEBROWSER_UL_dir(UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
direntry = item
# space = context.space_data
diff --cc source/blender/blenkernel/intern/library.c
index 8647fe1d7db,04ebaaf80b7..59d1f3dd712
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@@ -2533,13 -2535,27 +2544,32 @@@ void BKE_id_ui_prefix(char name[MAX_ID_
strcpy(name + 3, id->name + 2);
}
+ /**
+ * Returns an allocated string concatenating ID name (including two-chars type code) and its lib name if any,
+ * which is expected to be unique in a given Main database..
+ */
+ char *BKE_id_to_unique_string_key(const struct ID *id)
+ {
+ const size_t key_len_base = strlen(id->name) + 1;
+ const size_t key_len_ext = ((id->lib != NULL) ? strlen(id->lib->name) : 0) + 1;
+ const size_t key_len = key_len_base + key_len_ext - 1;
+ char *key = MEM_mallocN(key_len, __func__);
+
+ BLI_strncpy(key, id->name, key_len_base);
+ if (id->lib != NULL) {
+ BLI_strncpy(key + key_len_base - 1, id->lib->name, key_len_ext);
+ }
+
+ return key;
+ }
+
void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath)
{
+ if (lib->flag & LIBRARY_FLAG_VIRTUAL) {
+ BLI_assert(!"Setting path for virtual libraries makes no sense.");
+ return;
+ }
+
/* in some cases this is used to update the absolute path from the
* relative */
if (lib->name != filepath) {
diff --cc source/blender/blenloader/intern/readfile.c
index 8466260dd74,810bc466275..cfeb02ca994
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@@ -2304,11 -2340,10 +2343,16 @@@ static void direct_link_id(FileData *fd
link_list_ex(fd, &id->override_static->properties, direct_link_id_override_property_cb);
}
+ DrawDataList *drawdata = DRW_drawdatalist_from_id(id);
+ if (drawdata) {
+ BLI_listbase_clear((ListBase *)drawdata);
+ }
++
+ if (id->uuid) {
+ id->uuid = newdataadr(fd, id->uuid);
+ id->uuid->ibuff = NULL; /* Just in case... */
+ id->uuid->width = id->uuid->height = 0;
+ }
}
/* ************ READ CurveMapping *************** */
diff --cc source/blender/blenloader/intern/versioning_280.c
index 3a88797f7ad,a35c0531059..6b9a8c35ecc
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@@ -1585,5 -1865,84 +1866,119 @@@ void blo_do_versions_280(FileData *fd,
}
}
}
+ /* default loc axis */
+ if (!DNA_struct_elem_find(fd->filesdna, "GP_BrushEdit_Settings", "int", "lock_axis")) {
+ for (Scene *scene = bmain->scene.first; scene; scene = scene->id.next) {
+ /* lock axis */
+ GP_BrushEdit_Settings *gset = &scene->toolsettings->gp_sculpt;
+ if (gset) {
+ gset->lock_axis = GP_LOCKAXIS_Y;
+ }
+ }
+ }
}
+
+ {
+ /* Versioning code for Subsurf modifier. */
+ if (!DNA_struct_elem_find(fd->filesdna, "SubsurfModifier", "short", "uv_smooth")) {
+ for (Object *object = bmain->object.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Subsurf) {
+ SubsurfModifierData *smd = (SubsurfModifierData *)md;
+ if (smd->flags & eSubsurfModifierFlag_SubsurfUv_DEPRECATED) {
+ smd->uv_smooth = SUBSURF_UV_SMOOTH_PRESERVE_CORNERS;
+ }
+ else {
+ smd->uv_smooth = SUBSURF_UV_SMOOTH_NONE;
+ }
+ }
+ }
+ }
+ }
+
+ if (!DNA_struct_elem_find(fd->filesdna, "SubsurfModifier", "short", "quality")) {
+ for (Object *object = bmain->object.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Subsurf) {
+ SubsurfModifierData *smd = (SubsurfModifierData *)md;
+ smd->quality = 3;
+ }
+ }
+ }
+ }
+ /* Versioning code for Multires modifier. */
+ if (!DNA_struct_elem_find(fd->filesdna, "MultiresModifier", "short", "quality")) {
+ for (Object *object = bmain->object.first; object != NULL; object = object->id.next) {
+ for (ModifierData *md = object->modifiers.first; md; md = md->next) {
+ if (md->type == eModifierType_Multires) {
+ MultiresModifierData *mmd = (MultiresModifierData *)md;
+ mmd->quality = 3;
+ if (mmd->flags & eMultiresModifierFlag_PlainUv_DEPRECATED) {
+
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list