Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c59
-rw-r--r--source/blender/blenloader/intern/versioning_250.c46
-rw-r--r--source/blender/blenloader/intern/versioning_260.c2
-rw-r--r--source/blender/blenloader/intern/versioning_270.c2
-rw-r--r--source/blender/blenloader/intern/versioning_280.c2
-rw-r--r--source/blender/blenloader/intern/versioning_300.c172
-rw-r--r--source/blender/blenloader/intern/versioning_defaults.c8
-rw-r--r--source/blender/blenloader/intern/versioning_userdef.c9
-rw-r--r--source/blender/blenloader/intern/writefile.c2
9 files changed, 270 insertions, 32 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 03fb4149d7b..e48c305fc4b 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -464,6 +464,13 @@ void blo_join_main(ListBase *mainlist)
Main *tojoin, *mainl;
mainl = mainlist->first;
+
+ if (mainl->id_map != NULL) {
+ /* Cannot keep this since we add some IDs from joined mains. */
+ BKE_main_idmap_destroy(mainl->id_map);
+ mainl->id_map = NULL;
+ }
+
while ((tojoin = mainl->next)) {
add_main_to_main(mainl, tojoin);
BLI_remlink(mainlist, tojoin);
@@ -502,6 +509,12 @@ void blo_split_main(ListBase *mainlist, Main *main)
return;
}
+ if (main->id_map != NULL) {
+ /* Cannot keep this since we remove some IDs from given main. */
+ BKE_main_idmap_destroy(main->id_map);
+ main->id_map = NULL;
+ }
+
/* (Library.temp_index -> Main), lookup table */
const uint lib_main_array_len = BLI_listbase_count(&main->libraries);
Main **lib_main_array = MEM_malloc_arrayN(lib_main_array_len, sizeof(*lib_main_array), __func__);
@@ -2444,7 +2457,7 @@ static void direct_link_id_common(
BlendDataReader *reader, Library *current_library, ID *id, ID *id_old, const int tag)
{
if (!BLO_read_data_is_undo(reader)) {
- /* When actually reading a file , we do want to reset/re-generate session uuids.
+ /* When actually reading a file, we do want to reset/re-generate session uuids.
* In undo case, we want to re-use existing ones. */
id->session_uuid = MAIN_ID_SESSION_UUID_UNSET;
}
@@ -3209,6 +3222,10 @@ static ID *create_placeholder(Main *mainvar, const short idcode, const char *idn
BLI_addtail(lb, ph_id);
id_sort_by_name(lb, ph_id, NULL);
+ if (mainvar->id_map != NULL) {
+ BKE_main_idmap_insert_id(mainvar->id_map, ph_id);
+ }
+
if ((tag & LIB_TAG_TEMP_MAIN) == 0) {
BKE_lib_libblock_session_uuid_ensure(ph_id);
}
@@ -3667,6 +3684,10 @@ static BHead *read_libblock(FileData *fd,
if (r_id) {
*r_id = id_old;
}
+ if (main->id_map != NULL) {
+ BKE_main_idmap_insert_id(main->id_map, id_old);
+ }
+
return blo_bhead_next(fd, bhead);
}
}
@@ -3725,6 +3746,11 @@ static BHead *read_libblock(FileData *fd,
}
direct_link_id(fd, main, id_tag, id, id_old);
+
+ if (main->id_map != NULL) {
+ BKE_main_idmap_insert_id(main->id_map, id);
+ }
+
return blo_bhead_next(fd, bhead);
}
@@ -3748,6 +3774,13 @@ static BHead *read_libblock(FileData *fd,
else if (id_old) {
/* For undo, store contents read into id at id_old. */
read_libblock_undo_restore_at_old_address(fd, main, id, id_old);
+
+ if (main->id_map != NULL) {
+ BKE_main_idmap_insert_id(main->id_map, id_old);
+ }
+ }
+ else if (main->id_map != NULL) {
+ BKE_main_idmap_insert_id(main->id_map, id);
}
return bhead;
@@ -4299,6 +4332,8 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath)
fd->mainlist = NULL; /* Safety, this is local variable, shall not be used afterward. */
+ BLI_assert(bfd->main->id_map == NULL);
+
return bfd;
}
@@ -4443,9 +4478,16 @@ static BHead *find_bhead_from_idname(FileData *fd, const char *idname)
static ID *is_yet_read(FileData *fd, Main *mainvar, BHead *bhead)
{
+ if (mainvar->id_map == NULL) {
+ mainvar->id_map = BKE_main_idmap_create(mainvar, false, NULL, MAIN_IDMAP_TYPE_NAME);
+ }
+ BLI_assert(BKE_main_idmap_main_get(mainvar->id_map) == mainvar);
+
const char *idname = blo_bhead_id_name(fd, bhead);
- /* which_libbase can be NULL, intentionally not using idname+2 */
- return BLI_findstring(which_libbase(mainvar, GS(idname)), idname, offsetof(ID, name));
+
+ ID *id = BKE_main_idmap_lookup_name(mainvar->id_map, GS(idname), idname + 2, mainvar->curlib);
+ BLI_assert(id == BLI_findstring(which_libbase(mainvar, GS(idname)), idname, offsetof(ID, name)));
+ return id;
}
/** \} */
@@ -5196,6 +5238,10 @@ static void library_link_end(Main *mainl,
Main *mainvar;
Library *curlib;
+ if (mainl->id_map == NULL) {
+ mainl->id_map = BKE_main_idmap_create(mainl, false, NULL, MAIN_IDMAP_TYPE_NAME);
+ }
+
/* expander now is callback function */
BLO_main_expander(expand_doit_library);
@@ -5401,6 +5447,9 @@ static void read_library_linked_ids(FileData *basefd,
ID *id_next = id->next;
if ((id->tag & LIB_TAG_ID_LINK_PLACEHOLDER) && !(id->flag & LIB_INDIRECT_WEAK_LINK)) {
BLI_remlink(lbarray[a], id);
+ if (mainvar->id_map != NULL) {
+ BKE_main_idmap_remove_id(mainvar->id_map, id);
+ }
/* When playing with lib renaming and such, you may end with cases where
* you have more than one linked ID of the same data-block from same
@@ -5569,6 +5618,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
if (fd) {
do_it = true;
+
+ if (mainptr->id_map == NULL) {
+ mainptr->id_map = BKE_main_idmap_create(mainptr, false, NULL, MAIN_IDMAP_TYPE_NAME);
+ }
}
/* Read linked data-locks for each link placeholder, and replace
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 8a7bc375ea9..e56c1995363 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -132,7 +132,7 @@ static void sequencer_init_preview_region(ARegion *region)
region->v2d.max[0] = 12000.0f;
region->v2d.max[1] = 12000.0f;
region->v2d.cur = region->v2d.tot;
- region->v2d.align = V2D_ALIGN_FREE; // (V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y);
+ region->v2d.align = V2D_ALIGN_FREE; /* `(V2D_ALIGN_NO_NEG_X|V2D_ALIGN_NO_NEG_Y)` */
region->v2d.keeptot = V2D_KEEPTOT_FREE;
}
@@ -655,8 +655,10 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
Tex *tx;
ParticleSettings *part;
Object *ob;
- // PTCacheID *pid;
- // ListBase pidlist;
+#if 0
+ PTCacheID *pid;
+ ListBase pidlist;
+#endif
bSound *sound;
Sequence *seq;
@@ -766,12 +768,15 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
/* set old pointcaches to have disk cache flag */
for (ob = bmain->objects.first; ob; ob = ob->id.next) {
- // BKE_ptcache_ids_from_object(&pidlist, ob);
+#if 0
+ BKE_ptcache_ids_from_object(&pidlist, ob);
- // for (pid = pidlist.first; pid; pid = pid->next)
- // pid->cache->flag |= PTCACHE_DISK_CACHE;
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ pid->cache->flag |= PTCACHE_DISK_CACHE;
+ }
- // BLI_freelistN(&pidlist);
+ BLI_freelistN(&pidlist);
+#endif
}
/* type was a mixed flag & enum. move the 2d flag elsewhere */
@@ -789,18 +794,23 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
Tex *tex;
Scene *sce;
ToolSettings *ts;
- // PTCacheID *pid;
- // ListBase pidlist;
+#if 0
+ PTCacheID *pid;
+ ListBase pidlist;
+#endif
for (ob = bmain->objects.first; ob; ob = ob->id.next) {
- // BKE_ptcache_ids_from_object(&pidlist, ob);
+#if 0
+ BKE_ptcache_ids_from_object(&pidlist, ob);
- // for (pid = pidlist.first; pid; pid = pid->next) {
- // if (BLI_listbase_is_empty(pid->ptcaches))
- // pid->ptcaches->first = pid->ptcaches->last = pid->cache;
- //}
+ for (pid = pidlist.first; pid; pid = pid->next) {
+ if (BLI_listbase_is_empty(pid->ptcaches)) {
+ pid->ptcaches->first = pid->ptcaches->last = pid->cache;
+ }
+ }
- // BLI_freelistN(&pidlist);
+ BLI_freelistN(&pidlist);
+#endif
if (ob->totcol && ob->matbits == NULL) {
int a;
@@ -842,7 +852,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
Object *ob;
for (ob = bmain->objects.first; ob; ob = ob->id.next) {
- if (ob->flag & 8192) { // OB_POSEMODE = 8192
+ if (ob->flag & 8192) { /* OB_POSEMODE = 8192. */
ob->mode |= OB_MODE_POSE;
}
}
@@ -1395,7 +1405,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
}
if ((sce->r.ffcodecdata.flags & FFMPEG_MULTIPLEX_AUDIO) == 0) {
- sce->r.ffcodecdata.audio_codec = 0x0; // CODEC_ID_NONE
+ sce->r.ffcodecdata.audio_codec = 0x0; /* `CODEC_ID_NONE` */
}
SEQ_ALL_BEGIN (sce->ed, seq) {
@@ -1735,7 +1745,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
/* New Settings */
if (!MAIN_VERSION_ATLEAST(bmain, 252, 5)) {
- brush->flag |= BRUSH_SPACE_ATTEN; // explicitly enable adaptive space
+ brush->flag |= BRUSH_SPACE_ATTEN; /* Explicitly enable adaptive space. */
/* spacing was originally in pixels, convert it to percentage for new version
* size should not be zero due to sanity check above
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c
index 5bf4d3b68b5..858f5d85a90 100644
--- a/source/blender/blenloader/intern/versioning_260.c
+++ b/source/blender/blenloader/intern/versioning_260.c
@@ -2149,7 +2149,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
- /* NB: scene->nodetree is a local ID block, has been direct_link'ed */
+ /* NOTE: `scene->nodetree` is a local ID block, has been direct_link'ed. */
if (scene->nodetree) {
scene->nodetree->active_viewer_key = active_viewer_key;
}
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 776f6c54363..1d46c0d5790 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -1115,8 +1115,6 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (!DNA_struct_elem_find(fd->filesdna, "ToolSettings", "char", "gpencil_v3d_align")) {
ts->gpencil_v3d_align = GP_PROJECT_VIEWSPACE;
ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE;
- ts->gpencil_seq_align = GP_PROJECT_VIEWSPACE;
- ts->gpencil_ima_align = GP_PROJECT_VIEWSPACE;
}
}
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 0645380c4cb..af05c4b902f 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1939,7 +1939,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ViewLayer *view_layer;
for (view_layer = scene->view_layers.first; view_layer; view_layer = view_layer->next) {
view_layer->flag |= VIEW_LAYER_FREESTYLE;
- view_layer->layflag = 0x7FFF; /* solid ztra halo edge strand */
+ view_layer->layflag = 0x7FFF; /* solid Z-transparency halo edge strand. */
view_layer->passflag = SCE_PASS_COMBINED | SCE_PASS_Z;
view_layer->pass_alpha_threshold = 0.5f;
BKE_freestyle_config_init(&view_layer->freestyle_config);
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c
index 3c58c29c162..9aec18ea279 100644
--- a/source/blender/blenloader/intern/versioning_300.c
+++ b/source/blender/blenloader/intern/versioning_300.c
@@ -29,15 +29,20 @@
#include "DNA_armature_types.h"
#include "DNA_brush_types.h"
#include "DNA_collection_types.h"
+#include "DNA_curve_types.h"
#include "DNA_genfile.h"
#include "DNA_listBase.h"
+#include "DNA_material_types.h"
#include "DNA_modifier_types.h"
#include "DNA_text_types.h"
+#include "DNA_workspace_types.h"
#include "BKE_action.h"
#include "BKE_animsys.h"
+#include "BKE_asset.h"
#include "BKE_collection.h"
#include "BKE_deform.h"
+#include "BKE_fcurve.h"
#include "BKE_fcurve_driver.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
@@ -46,11 +51,10 @@
#include "BLO_readfile.h"
#include "MEM_guardedalloc.h"
#include "readfile.h"
-#include "versioning_common.h"
#include "SEQ_sequencer.h"
-#include "MEM_guardedalloc.h"
+#include "RNA_access.h"
#include "versioning_common.h"
@@ -97,13 +101,87 @@ static void move_vertex_group_names_to_object_data(Main *bmain)
if (ELEM(object->type, OB_MESH, OB_LATTICE, OB_GPENCIL)) {
ListBase *new_defbase = BKE_object_defgroup_list_mutable(object);
- /* Clear the list in case the it was already assigned from another object. */
- BLI_freelistN(new_defbase);
- *new_defbase = object->defbase;
+ /* Choose the longest vertex group name list among all linked duplicates. */
+ if (BLI_listbase_count(&object->defbase) < BLI_listbase_count(new_defbase)) {
+ BLI_freelistN(&object->defbase);
+ }
+ else {
+ /* Clear the list in case the it was already assigned from another object. */
+ BLI_freelistN(new_defbase);
+ *new_defbase = object->defbase;
+ }
}
}
}
+static void do_versions_sequencer_speed_effect_recursive(Scene *scene, const ListBase *seqbase)
+{
+ /* Old SpeedControlVars->flags. */
+#define SEQ_SPEED_INTEGRATE (1 << 0)
+#define SEQ_SPEED_COMPRESS_IPO_Y (1 << 2)
+
+ LISTBASE_FOREACH (Sequence *, seq, seqbase) {
+ if (seq->type == SEQ_TYPE_SPEED) {
+ SpeedControlVars *v = (SpeedControlVars *)seq->effectdata;
+ const char *substr = NULL;
+ float globalSpeed = v->globalSpeed;
+ if (seq->flag & SEQ_USE_EFFECT_DEFAULT_FADE) {
+ if (globalSpeed == 1.0f) {
+ v->speed_control_type = SEQ_SPEED_STRETCH;
+ }
+ else {
+ v->speed_control_type = SEQ_SPEED_MULTIPLY;
+ v->speed_fader = globalSpeed *
+ ((float)seq->seq1->len /
+ max_ff((float)(seq->seq1->enddisp - seq->seq1->start), 1.0f));
+ }
+ }
+ else if (v->flags & SEQ_SPEED_INTEGRATE) {
+ v->speed_control_type = SEQ_SPEED_MULTIPLY;
+ v->speed_fader = seq->speed_fader * globalSpeed;
+ }
+ else if (v->flags & SEQ_SPEED_COMPRESS_IPO_Y) {
+ globalSpeed *= 100.0f;
+ v->speed_control_type = SEQ_SPEED_LENGTH;
+ v->speed_fader_length = seq->speed_fader * globalSpeed;
+ substr = "speed_length";
+ }
+ else {
+ v->speed_control_type = SEQ_SPEED_FRAME_NUMBER;
+ v->speed_fader_frame_number = (int)(seq->speed_fader * globalSpeed);
+ substr = "speed_frame_number";
+ }
+
+ v->flags &= ~(SEQ_SPEED_INTEGRATE | SEQ_SPEED_COMPRESS_IPO_Y);
+
+ if (substr || globalSpeed != 1.0f) {
+ FCurve *fcu = id_data_find_fcurve(&scene->id, seq, &RNA_Sequence, "speed_factor", 0, NULL);
+ if (fcu) {
+ if (globalSpeed != 1.0f) {
+ for (int i = 0; i < fcu->totvert; i++) {
+ BezTriple *bezt = &fcu->bezt[i];
+ bezt->vec[0][1] *= globalSpeed;
+ bezt->vec[1][1] *= globalSpeed;
+ bezt->vec[2][1] *= globalSpeed;
+ }
+ }
+ if (substr) {
+ char *new_path = BLI_str_replaceN(fcu->rna_path, "speed_factor", substr);
+ MEM_freeN(fcu->rna_path);
+ fcu->rna_path = new_path;
+ }
+ }
+ }
+ }
+ else if (seq->type == SEQ_TYPE_META) {
+ do_versions_sequencer_speed_effect_recursive(scene, &seq->seqbase);
+ }
+ }
+
+#undef SEQ_SPEED_INTEGRATE
+#undef SEQ_SPEED_COMPRESS_IPO_Y
+}
+
void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports))
{
if (MAIN_VERSION_ATLEAST(bmain, 300, 0) && !MAIN_VERSION_ATLEAST(bmain, 300, 1)) {
@@ -152,6 +230,14 @@ void do_versions_after_linking_300(Main *bmain, ReportList *UNUSED(reports))
move_vertex_group_names_to_object_data(bmain);
}
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 13)) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ if (scene->ed != NULL) {
+ do_versions_sequencer_speed_effect_recursive(scene, &scene->ed->seqbase);
+ }
+ }
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
@@ -527,6 +613,82 @@ void blo_do_versions_300(FileData *fd, Library *UNUSED(lib), Main *bmain)
tool_settings->snap_uv_mode &= ~(1 << 4);
}
}
+ LISTBASE_FOREACH (Material *, mat, &bmain->materials) {
+ if (!(mat->lineart.flags & LRT_MATERIAL_CUSTOM_OCCLUSION_EFFECTIVENESS)) {
+ mat->lineart.mat_occlusion = 1;
+ }
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 13)) {
+ /* Convert Surface Deform to sparse-capable bind structure. */
+ if (!DNA_struct_elem_find(
+ fd->filesdna, "SurfaceDeformModifierData", "int", "num_mesh_verts")) {
+ LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
+ LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) {
+ if (md->type == eModifierType_SurfaceDeform) {
+ SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
+ if (smd->num_bind_verts && smd->verts) {
+ smd->num_mesh_verts = smd->num_bind_verts;
+
+ for (unsigned int i = 0; i < smd->num_bind_verts; i++) {
+ smd->verts[i].vertex_idx = i;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!DNA_struct_elem_find(
+ fd->filesdna, "WorkSpace", "AssetLibraryReference", "asset_library")) {
+ LISTBASE_FOREACH (WorkSpace *, workspace, &bmain->workspaces) {
+ BKE_asset_library_reference_init_default(&workspace->asset_library);
+ }
+ }
+
+ if (!DNA_struct_elem_find(
+ fd->filesdna, "FileAssetSelectParams", "AssetLibraryReference", "asset_library")) {
+ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (SpaceLink *, space, &area->spacedata) {
+ if (space->spacetype == SPACE_FILE) {
+ SpaceFile *sfile = (SpaceFile *)space;
+ if (sfile->browse_mode != FILE_BROWSE_MODE_ASSETS) {
+ continue;
+ }
+ BKE_asset_library_reference_init_default(&sfile->asset_params->asset_library);
+ }
+ }
+ }
+ }
+ }
+
+ /* Set default 2D annotation placement. */
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ ToolSettings *ts = scene->toolsettings;
+ ts->gpencil_v2d_align = GP_PROJECT_VIEWSPACE | GP_PROJECT_CURSOR;
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 14)) {
+ LISTBASE_FOREACH (Scene *, scene, &bmain->scenes) {
+ ToolSettings *tool_settings = scene->toolsettings;
+ tool_settings->snap_flag &= ~SCE_SNAP_SEQ;
+ }
+ }
+
+ if (!MAIN_VERSION_ATLEAST(bmain, 300, 15)) {
+ LISTBASE_FOREACH (bScreen *, screen, &bmain->screens) {
+ LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
+ LISTBASE_FOREACH (SpaceLink *, sl, &area->spacedata) {
+ if (sl->spacetype == SPACE_SEQ) {
+ SpaceSeq *sseq = (SpaceSeq *)sl;
+ sseq->flag |= SEQ_SHOW_GRID;
+ }
+ }
+ }
+ }
}
/**
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 10b24532014..8362e001ea6 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -183,7 +183,8 @@ static void blo_update_defaults_screen(bScreen *screen,
else if (area->spacetype == SPACE_SEQ) {
SpaceSeq *seq = area->spacedata.first;
seq->flag |= SEQ_SHOW_MARKERS | SEQ_SHOW_FCURVES | SEQ_ZOOM_TO_FIT | SEQ_SHOW_STRIP_OVERLAY |
- SEQ_SHOW_STRIP_SOURCE | SEQ_SHOW_STRIP_NAME | SEQ_SHOW_STRIP_DURATION;
+ SEQ_SHOW_STRIP_SOURCE | SEQ_SHOW_STRIP_NAME | SEQ_SHOW_STRIP_DURATION |
+ SEQ_SHOW_GRID;
seq->render_size = SEQ_RENDER_SIZE_PROXY_100;
seq->flag |= SEQ_USE_PROXIES;
@@ -318,6 +319,11 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene)
/* Rename render layers. */
BKE_view_layer_rename(bmain, scene, scene->view_layers.first, "View Layer");
+ /* Disable Z pass by default. */
+ LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
+ view_layer->passflag &= ~SCE_PASS_Z;
+ }
+
/* New EEVEE defaults. */
scene->eevee.bloom_intensity = 0.05f;
scene->eevee.bloom_clamp = 0.0f;
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c
index 42b27f57e2c..c409f0a71fc 100644
--- a/source/blender/blenloader/intern/versioning_userdef.c
+++ b/source/blender/blenloader/intern/versioning_userdef.c
@@ -286,6 +286,11 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
FROM_DEFAULT_V4_UCHAR(space_spreadsheet.selected_highlight);
}
+ if (!USER_VERSION_ATLEAST(300, 15)) {
+ copy_v4_uchar(btheme->space_sequencer.grid, 33);
+ btheme->space_sequencer.grid[3] = 255;
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
@@ -883,6 +888,10 @@ void blo_do_versions_userdef(UserDef *userdef)
userdef->sequencer_proxy_setup = USER_SEQ_PROXY_SETUP_AUTOMATIC;
}
+ if (!USER_VERSION_ATLEAST(293, 13)) {
+ BKE_addon_ensure(&userdef->addons, "pose_library");
+ }
+
/**
* Versioning code until next subversion bump goes here.
*
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index fc29b1d8915..12839a155e4 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -69,7 +69,7 @@
* - write #TEST (#RenderInfo struct. 128x128 blend file preview is optional).
* - write #GLOB (#FileGlobal struct) (some global vars).
* - write #DNA1 (#SDNA struct)
- * - write #USER (#UserDef struct) if filename is ``~/.config/blender/X.XX/config/startup.blend``.
+ * - write #USER (#UserDef struct) if filename is `~/.config/blender/X.XX/config/startup.blend`.
*/
#include <fcntl.h>