diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-15 00:16:04 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-06-15 00:21:12 +0300 |
commit | 23254ce4ee6b21b202549b421cf1d98f6a03b33d (patch) | |
tree | 77ebd72c7f1cd2776e058f04b5e6e49f14a327ec /source/blender/blenloader/intern/readfile.c | |
parent | f64070185808f153d141b26e63942424a1b258b1 (diff) |
Cleanup: Rename: Static Override -> Library Override.
Better to make internal code naming match official/UI naming to some
extent, this will reduce confusion in the future.
This is 'breaking' scripts and files that would use that feature, but
since it is not yet officially supported nor exposed in 2.80, as far
as that release is concerned, it is effectively
a 'no functional changes' commit.
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 5c2618f61da..3c8e5b29bb1 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2622,9 +2622,10 @@ static void lib_link_id(FileData *fd, Main *main) ID *id; for (id = lb->first; id; id = id->next) { - if (id->override_static) { - id->override_static->reference = newlibadr_us(fd, id->lib, id->override_static->reference); - id->override_static->storage = newlibadr_us(fd, id->lib, id->override_static->storage); + if (id->override_library) { + id->override_library->reference = newlibadr_us( + fd, id->lib, id->override_library->reference); + id->override_library->storage = newlibadr_us(fd, id->lib, id->override_library->storage); } } } @@ -2632,7 +2633,7 @@ static void lib_link_id(FileData *fd, Main *main) static void direct_link_id_override_property_operation_cb(FileData *fd, void *data) { - IDOverrideStaticPropertyOperation *opop = data; + IDOverrideLibraryPropertyOperation *opop = data; opop->subitem_reference_name = newdataadr(fd, opop->subitem_reference_name); opop->subitem_local_name = newdataadr(fd, opop->subitem_local_name); @@ -2640,7 +2641,7 @@ static void direct_link_id_override_property_operation_cb(FileData *fd, void *da static void direct_link_id_override_property_cb(FileData *fd, void *data) { - IDOverrideStaticProperty *op = data; + IDOverrideLibraryProperty *op = data; op->rna_path = newdataadr(fd, op->rna_path); link_list_ex(fd, &op->operations, direct_link_id_override_property_operation_cb); @@ -2662,9 +2663,9 @@ static void direct_link_id(FileData *fd, ID *id) id->tag = 0; /* Link direct data of overrides. */ - if (id->override_static) { - id->override_static = newdataadr(fd, id->override_static); - link_list_ex(fd, &id->override_static->properties, direct_link_id_override_property_cb); + if (id->override_library) { + id->override_library = newdataadr(fd, id->override_library); + link_list_ex(fd, &id->override_library->properties, direct_link_id_override_property_cb); } DrawDataList *drawdata = DRW_drawdatalist_from_id(id); @@ -3675,9 +3676,9 @@ static void lib_link_constraints(FileData *fd, ID *id, ListBase *conlist) /* own ipo, all constraints have it */ con->ipo = newlibadr_us(fd, id->lib, con->ipo); // XXX deprecated - old animation system - /* If linking from a library, clear 'local' static override flag. */ + /* If linking from a library, clear 'local' library override flag. */ if (id->lib != NULL) { - con->flag &= ~CONSTRAINT_STATICOVERRIDE_LOCAL; + con->flag &= ~CONSTRAINT_OVERRIDE_LIBRARY_LOCAL; } } @@ -5161,10 +5162,10 @@ static void lib_link_modifiers(FileData *fd, Object *ob) { modifiers_foreachIDLink(ob, lib_link_modifiers_common, fd); - /* If linking from a library, clear 'local' static override flag. */ + /* If linking from a library, clear 'local' library override flag. */ if (ob->id.lib != NULL) { for (ModifierData *mod = ob->modifiers.first; mod != NULL; mod = mod->next) { - mod->flag &= ~eModifierFlag_StaticOverride_Local; + mod->flag &= ~eModifierFlag_OverrideLibrary_Local; } } } @@ -5173,11 +5174,11 @@ static void lib_link_gpencil_modifiers(FileData *fd, Object *ob) { BKE_gpencil_modifiers_foreachIDLink(ob, lib_link_modifiers_common, fd); - /* If linking from a library, clear 'local' static override flag. */ + /* If linking from a library, clear 'local' library override flag. */ if (ob->id.lib != NULL) { for (GpencilModifierData *mod = ob->greasepencil_modifiers.first; mod != NULL; mod = mod->next) { - mod->flag &= ~eGpencilModifierFlag_StaticOverride_Local; + mod->flag &= ~eGpencilModifierFlag_OverrideLibrary_Local; } } } @@ -5186,10 +5187,10 @@ static void lib_link_shaderfxs(FileData *fd, Object *ob) { BKE_shaderfx_foreachIDLink(ob, lib_link_modifiers_common, fd); - /* If linking from a library, clear 'local' static override flag. */ + /* If linking from a library, clear 'local' library override flag. */ if (ob->id.lib != NULL) { for (ShaderFxData *fx = ob->shader_fx.first; fx != NULL; fx = fx->next) { - fx->flag &= ~eShaderFxFlag_StaticOverride_Local; + fx->flag &= ~eShaderFxFlag_OverrideLibrary_Local; } } } @@ -9739,7 +9740,7 @@ BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath) * we can re-generate overrides from their references. */ if (fd->memfile == NULL) { /* Do not apply in undo case! */ - BKE_main_override_static_update(bfd->main); + BKE_main_override_library_update(bfd->main); } BKE_collections_after_lib_link(bfd->main); @@ -10028,9 +10029,9 @@ static void expand_constraint_channels(FileData *fd, Main *mainvar, ListBase *ch static void expand_id(FileData *fd, Main *mainvar, ID *id) { - if (id->override_static) { - expand_doit(fd, mainvar, id->override_static->reference); - expand_doit(fd, mainvar, id->override_static->storage); + if (id->override_library) { + expand_doit(fd, mainvar, id->override_library->reference); + expand_doit(fd, mainvar, id->override_library->storage); } } |