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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-24 18:28:35 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-25 12:16:58 +0300
commit03a80facfc78178632086179e36f1c67128d5c09 (patch)
tree886d3eb3a6bc5cb68aaaae07aa8e0527e4882609 /source/blender/blenkernel/BKE_workspace.h
parent08da2826e0f29a6a43b60deb3b31dac8dba22e6d (diff)
Fix T55183, fix T55174: crashes with workspace / view layer relation.
Don't store pointers to ViewLayer in the workspace, only names. Add specific relation type since the generic mechanism makes the code hard to follow. Integrate with pointer restore for undo and library remapping code to avoid data going out of sync. Also add relation automatically if there doesn't exists one yet in BKE_workspace_view_layer_get, because in general it's really hard to ensure it will exist when making arbitrary scene changes. Differential Revision: https://developer.blender.org/D3432
Diffstat (limited to 'source/blender/blenkernel/BKE_workspace.h')
-rw-r--r--source/blender/blenkernel/BKE_workspace.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_workspace.h b/source/blender/blenkernel/BKE_workspace.h
index 5ee15a08f9b..5442fd43ce5 100644
--- a/source/blender/blenkernel/BKE_workspace.h
+++ b/source/blender/blenkernel/BKE_workspace.h
@@ -53,12 +53,20 @@ void BKE_workspace_layout_remove(
void BKE_workspace_relations_free(
ListBase *relation_list);
+void BKE_workspace_scene_relations_free_invalid(
+ struct WorkSpace *workspace);
/* -------------------------------------------------------------------- */
/* General Utils */
-void BKE_workspace_view_layer_remove_references(
+void BKE_workspace_view_layer_rename(
+ const struct Main *bmain,
+ const struct Scene *scene,
+ const char *old_name,
+ const char *new_name) ATTR_NONNULL();
+
+void BKE_workspace_view_layer_remove(
const struct Main *bmain,
const struct ViewLayer *view_layer) ATTR_NONNULL();
@@ -92,6 +100,9 @@ struct Base *BKE_workspace_active_base_get(const struct WorkSpace *workspace, co
struct ViewLayer *BKE_workspace_view_layer_get(
const struct WorkSpace *workspace,
const struct Scene *scene) GETTER_ATTRS;
+struct ViewLayer *BKE_workspace_view_layer_exists(
+ const struct WorkSpace *workspace,
+ const struct Scene *scene) GETTER_ATTRS;
void BKE_workspace_view_layer_set(
struct WorkSpace *workspace,
struct ViewLayer *layer,