diff options
author | Bastien Montagne <bastien@blender.org> | 2020-12-11 12:52:23 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2020-12-11 12:53:08 +0300 |
commit | f7e5f96f56b1594c718232a9541c35389f23abab (patch) | |
tree | 302b587074659c914d19707068c357028af01f85 /source/blender/blenloader/intern/versioning_290.c | |
parent | b62a9ef66faad1ba37dde053af3394eca9559e46 (diff) |
GeometryNodes: Make properties exposed in modifier overridable.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_290.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_290.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_290.c b/source/blender/blenloader/intern/versioning_290.c index a98e7c46f10..f390f0b48d8 100644 --- a/source/blender/blenloader/intern/versioning_290.c +++ b/source/blender/blenloader/intern/versioning_290.c @@ -1243,5 +1243,20 @@ void blo_do_versions_290(FileData *fd, Library *UNUSED(lib), Main *bmain) */ { /* Keep this block, even when empty. */ + + /* Make all IDProperties used as interface of geometry node trees overridable. */ + LISTBASE_FOREACH (Object *, ob, &bmain->objects) { + LISTBASE_FOREACH (ModifierData *, md, &ob->modifiers) { + if (md->type == eModifierType_Nodes) { + NodesModifierData *nmd = (NodesModifierData *)md; + IDProperty *nmd_properties = nmd->settings.properties; + + BLI_assert(nmd_properties->type == IDP_GROUP); + LISTBASE_FOREACH (IDProperty *, nmd_socket_idprop, &nmd_properties->data.group) { + nmd_socket_idprop->flag |= IDP_FLAG_OVERRIDABLE_LIBRARY; + } + } + } + } } } |