[Bf-committers] [Bf-blender-cvs] [e13fa94] depsgraph_refactor: Removed the IDKey for building relations, due to ambiguity and failing to add relations.
Lukas Tönne
lukas.toenne at gmail.com
Tue May 20 19:09:29 CEST 2014
Sorry, forgot to change the git user name on the shared account here in the
institute, this was my commit in fact and not Keir's :S
On Tue, May 20, 2014 at 7:05 PM, Keir Mierle <noreply at git.blender.org>wrote:
> Commit: e13fa944ee73bc277fc5e60b01776ca19b9bd495
> Author: Keir Mierle
> Date: Tue May 20 18:25:12 2014 +0200
> https://developer.blender.org/rBe13fa944ee73bc277fc5e60b01776ca19b9bd495
>
> Removed the IDKey for building relations, due to ambiguity and failing to
> add
> relations.
>
> To add a relations between operations we need to address a specific
> component or
> operation directly.
>
> ===================================================================
>
> M source/blender/depsgraph/intern/depsgraph_build.cpp
> M source/blender/depsgraph/intern/depsgraph_build.h
> M source/blender/depsgraph/intern/depsgraph_build_relations.cpp
>
> ===================================================================
>
> diff --git a/source/blender/depsgraph/intern/depsgraph_build.cpp
> b/source/blender/depsgraph/intern/depsgraph_build.cpp
> index bf4895e..cc72ed9 100644
> --- a/source/blender/depsgraph/intern/depsgraph_build.cpp
> +++ b/source/blender/depsgraph/intern/depsgraph_build.cpp
> @@ -345,12 +345,6 @@ TimeSourceDepsNode
> *DepsgraphRelationBuilder::find_node(const TimeSourceKey &key
> }
> }
>
> -IDDepsNode *DepsgraphRelationBuilder::find_node(const IDKey &key) const
> -{
> - IDDepsNode *node = m_graph->find_id_node(key.id);
> - return node;
> -}
> -
> ComponentDepsNode *DepsgraphRelationBuilder::find_node(const ComponentKey
> &key) const
> {
> IDDepsNode *id_node = m_graph->find_id_node(key.id);
> @@ -480,7 +474,10 @@ void DEG_graph_build_from_scene(Depsgraph *graph,
> Main *bmain, Scene *scene)
>
> DepsgraphRelationBuilder relation_builder(graph);
> /* hook scene up to the root node as entrypoint to graph */
> - relation_builder.add_relation(RootKey(), IDKey(scene),
> DEPSREL_TYPE_ROOT_TO_ACTIVE, "Root to Active Scene");
> + /* XXX what does this relation actually mean?
> + * it doesnt add any operations anyway and is not clear what part of
> the scene is to be connected.
> + */
> + //relation_builder.add_relation(RootKey(), IDKey(scene),
> DEPSREL_TYPE_ROOT_TO_ACTIVE, "Root to Active Scene");
> relation_builder.build_scene(scene);
>
> #if 0
> diff --git a/source/blender/depsgraph/intern/depsgraph_build.h
> b/source/blender/depsgraph/intern/depsgraph_build.h
> index e14ddcc..423bd6a 100644
> --- a/source/blender/depsgraph/intern/depsgraph_build.h
> +++ b/source/blender/depsgraph/intern/depsgraph_build.h
> @@ -121,14 +121,6 @@ struct TimeSourceKey
> IDPtr id;
> };
>
> -struct IDKey
> -{
> - IDKey() : id(NULL) {}
> - IDKey(IDPtr id) : id(id) {}
> -
> - IDPtr id;
> -};
> -
> struct ComponentKey
> {
> ComponentKey() : id(NULL), type(DEPSNODE_TYPE_UNDEFINED),
> subdata("") {}
> @@ -200,7 +192,6 @@ struct DepsgraphRelationBuilder {
> protected:
> RootDepsNode *find_node(const RootKey &key) const;
> TimeSourceDepsNode *find_node(const TimeSourceKey &key) const;
> - IDDepsNode *find_node(const IDKey &key) const;
> ComponentDepsNode *find_node(const ComponentKey &key) const;
> OperationDepsNode *find_node(const OperationKey &key) const;
> DepsNode *find_node(const RNAPathKey &key) const;
> diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
> b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
> index 1b85c13..b63e4cc 100644
> --- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
> +++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
> @@ -206,7 +206,7 @@ void DepsgraphRelationBuilder::build_object(Scene
> *scene, Object *ob)
>
> void DepsgraphRelationBuilder::build_object_parent(Object *ob)
> {
> - IDKey ob_key(ob);
> + ComponentKey ob_key(ob, DEPSNODE_TYPE_TRANSFORM);
>
> /* type-specific links */
> switch (ob->partype) {
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
More information about the Bf-committers
mailing list