[Bf-blender-cvs] [6d317f24ec4] asset-metadata: Merge branch 'master' into asset-metadata
Julian Eisel
noreply at git.blender.org
Mon Aug 31 16:04:12 CEST 2020
Commit: 6d317f24ec463e6e259edb2c7152e0a8b237c7b2
Author: Julian Eisel
Date: Mon Aug 31 15:42:02 2020 +0200
Branches: asset-metadata
https://developer.blender.org/rB6d317f24ec463e6e259edb2c7152e0a8b237c7b2
Merge branch 'master' into asset-metadata
===================================================================
===================================================================
diff --cc source/blender/blenloader/intern/writefile.c
index 1c1590b9a70,a9c92719a33..1353d055604
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@@ -659,49 -659,6 +660,45 @@@ static void writelist_id(WriteData *wd
* These functions are used by blender's .blend system for file saving/loading.
* \{ */
+static void write_assetdata(BlendWriter *writer, AssetData *asset_data)
+{
+ BLO_write_struct(writer, AssetData, asset_data);
+
+ if (asset_data->description) {
+ BLO_write_string(writer, asset_data->description);
+ }
+ LISTBASE_FOREACH (CustomTag *, tag, &asset_data->tags) {
+ BLO_write_struct(writer, CustomTag, tag);
+ }
+}
+
+static void write_iddata(BlendWriter *writer, ID *id)
+{
- if (id->asset_data) {
- write_assetdata(writer, id->asset_data);
- }
-
+ /* ID_WM's id->properties are considered runtime only, and never written in .blend file. */
+ if (id->properties && !ELEM(GS(id->name), ID_WM)) {
+ IDP_BlendWrite(writer, id->properties);
+ }
+
+ if (id->override_library) {
+ BLO_write_struct(writer, IDOverrideLibrary, id->override_library);
+
+ BLO_write_struct_list(writer, IDOverrideLibraryProperty, &id->override_library->properties);
+ LISTBASE_FOREACH (IDOverrideLibraryProperty *, op, &id->override_library->properties) {
+ BLO_write_string(writer, op->rna_path);
+
+ BLO_write_struct_list(writer, IDOverrideLibraryPropertyOperation, &op->operations);
+ LISTBASE_FOREACH (IDOverrideLibraryPropertyOperation *, opop, &op->operations) {
+ if (opop->subitem_reference_name) {
+ BLO_write_string(writer, opop->subitem_reference_name);
+ }
+ if (opop->subitem_local_name) {
+ BLO_write_string(writer, opop->subitem_local_name);
+ }
+ }
+ }
+ }
+}
+
static void write_previews(BlendWriter *writer, const PreviewImage *prv_orig)
{
/* Note we write previews also for undo steps. It takes up some memory,
More information about the Bf-blender-cvs
mailing list