[Bf-blender-cvs] [237e17a957e] blender2.8: Merge branch 'master' into blender2.8

Sergey Sharybin noreply at git.blender.org
Thu Jun 1 16:32:04 CEST 2017


Commit: 237e17a957ea16d4f326f8babfdb49b8d954e529
Author: Sergey Sharybin
Date:   Thu Jun 1 16:31:56 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB237e17a957ea16d4f326f8babfdb49b8d954e529

Merge branch 'master' into blender2.8

===================================================================



===================================================================

diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index e4b5fd6ffec,1e51b8131e4..eb8b175a423
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -349,45 -317,25 +314,10 @@@ void DepsgraphNodeBuilder::build_group(
  	}
  }
  
- SubgraphDepsNode *DepsgraphNodeBuilder::build_subgraph(Group *group)
- {
- 	/* sanity checks */
- 	if (!group)
- 		return NULL;
- 
- 	/* create new subgraph's data */
- 	Depsgraph *subgraph = reinterpret_cast<Depsgraph *>(DEG_graph_new());
- 
- 	DepsgraphNodeBuilder subgraph_builder(m_bmain, subgraph);
- 
- 	/* add group objects */
- 	LINKLIST_FOREACH (GroupObject *, go, &group->gobject) {
- 		/*Object *ob = go->ob;*/
- 
- 		/* Each "group object" is effectively a separate instance of the
- 		 * underlying object data. When the group is evaluated, the transform
- 		 * results and/or some other attributes end up getting overridden by
- 		 * the group.
- 		 */
- 	}
- 
- 	/* Create a node for representing subgraph. */
- 	SubgraphDepsNode *subgraph_node = m_graph->add_subgraph_node(&group->id);
- 	subgraph_node->graph = subgraph;
- 
- 	/* Make a copy of the data this node will need? */
- 	/* XXX: do we do this now, or later? */
- 	/* TODO: need API function which queries graph's ID's hash, and duplicates
- 	 * those blocks thoroughly with all outside links removed.
- 	 */
- 
- 	return subgraph_node;
- }
- 
 -void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
 +void DepsgraphNodeBuilder::build_object(Scene *scene, Object *ob)
  {
 -	const bool has_object = (ob->id.tag & LIB_TAG_DOIT);
 -	IDDepsNode *id_node = (has_object)
 -	        ? m_graph->find_id_node(&ob->id)
 -	        : add_id_node(&ob->id);
 -	/* Update node layers.
 -	 * Do it for both new and existing ID nodes. This is so because several
 -	 * bases might be sharing same object.
 -	 */
 -	if (base != NULL) {
 -		id_node->layers |= base->lay;
 -	}
 -	if (ob == scene->camera) {
 -		/* Camera should always be updated, it used directly by viewport. */
 -		id_node->layers |= (unsigned int)(-1);
 -	}
  	/* Skip rest of components if the ID node was already there. */
 -	if (has_object) {
 +	if (ob->id.tag & LIB_TAG_DOIT) {
  		return;
  	}
  	ob->id.tag |= LIB_TAG_DOIT;
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.h
index b6279ed4217,ba8a5d01cb0..83a4dfda8a5
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.h
@@@ -125,9 -121,8 +121,8 @@@ struct DepsgraphNodeBuilder 
  	                                       int name_tag = -1);
  
  	void build_scene(Main *bmain, Scene *scene);
- 	SubgraphDepsNode *build_subgraph(Group *group);
 -	void build_group(Scene *scene, Base *base, Group *group);
 -	void build_object(Scene *scene, Base *base, Object *ob);
 +	void build_group(Scene *scene, Group *group);
 +	void build_object(Scene *scene, Object *ob);
  	void build_object_transform(Scene *scene, Object *ob);
  	void build_object_constraints(Scene *scene, Object *ob);
  	void build_pose_constraints(Scene *scene, Object *ob, bPoseChannel *pchan);
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes_layer.cc
index 9fd59608d9e,00000000000..e419b72fee8
mode 100644,000000..100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_layer.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_layer.cc
@@@ -1,120 -1,0 +1,117 @@@
 +/*
 + * ***** BEGIN GPL LICENSE BLOCK *****
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * The Original Code is Copyright (C) 2013 Blender Foundation.
 + * All rights reserved.
 + *
 + * Original Author: Joshua Leung
 + * Contributor(s): Based on original depsgraph.c code - Blender Foundation (2005-2013)
 + *
 + * ***** END GPL LICENSE BLOCK *****
 + */
 +
 +/** \file blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
 + *  \ingroup depsgraph
 + *
 + * Methods for constructing depsgraph's nodes
 + */
 +
 +#include "intern/builder/deg_builder_nodes.h"
 +
 +#include <stdio.h>
 +#include <stdlib.h>
 +
 +#include "MEM_guardedalloc.h"
 +
 +extern "C" {
 +#include "BLI_utildefines.h"
 +
 +#include "BKE_layer.h"
 +
 +#include "DNA_scene_types.h"
 +
 +#include "DEG_depsgraph.h"
 +#include "DEG_depsgraph_build.h"
 +} /* extern "C" */
 +
 +#include "intern/builder/deg_builder.h"
 +#include "intern/nodes/deg_node.h"
 +#include "intern/nodes/deg_node_component.h"
 +#include "intern/nodes/deg_node_operation.h"
 +#include "intern/depsgraph_types.h"
 +#include "intern/depsgraph_intern.h"
 +#include "util/deg_util_foreach.h"
 +
 +namespace DEG {
 +
 +void DepsgraphNodeBuilder::build_layer_collection(Scene *scene,
 +                                                  LayerCollection *layer_collection,
 +                                                  LayerCollectionState *state)
 +{
 +	/* TODO(sergey): This will attempt to create component for each collection.
 +	 * Harmless but could be optimized.
 +	 */
- 	ComponentDepsNode *comp = add_component_node(&scene->id, DEPSNODE_TYPE_LAYER_COLLECTIONS);
++	ComponentDepsNode *comp = add_component_node(&scene->id, DEG_NODE_TYPE_LAYER_COLLECTIONS);
 +
 +	add_operation_node(comp,
- 	                   DEPSOP_TYPE_EXEC,
 +	                   function_bind(BKE_layer_eval_layer_collection,
 +	                                 _1,
 +	                                 layer_collection,
 +	                                 state->parent),
 +	                   DEG_OPCODE_SCENE_LAYER_EVAL,
 +	                   layer_collection->scene_collection->name,
 +	                   state->index);
 +	++state->index;
 +
 +	/* Recurs into nested layer collections. */
 +	LayerCollection *parent = state->parent;
 +	state->parent = layer_collection;
 +	build_layer_collections(scene, &layer_collection->layer_collections, state);
 +	state->parent = parent;
 +}
 +
 +void DepsgraphNodeBuilder::build_layer_collections(Scene *scene,
 +                                                   ListBase *layer_collections,
 +                                                   LayerCollectionState *state)
 +{
 +	LINKLIST_FOREACH (LayerCollection *, layer_collection, layer_collections) {
 +		build_layer_collection(scene, layer_collection, state);
 +	}
 +}
 +
 +void DepsgraphNodeBuilder::build_scene_layer_collections(Scene *scene)
 +{
 +	LayerCollectionState state;
 +	state.index = 0;
 +	LINKLIST_FOREACH (SceneLayer *, scene_layer, &scene->render_layers) {
- 		ComponentDepsNode *comp = add_component_node(&scene->id, DEPSNODE_TYPE_LAYER_COLLECTIONS);
++		ComponentDepsNode *comp = add_component_node(&scene->id, DEG_NODE_TYPE_LAYER_COLLECTIONS);
 +
 +		add_operation_node(comp,
- 		                   DEPSOP_TYPE_EXEC,
 +		                   function_bind(BKE_layer_eval_layer_collection_pre, _1, scene, scene_layer),
 +		                   DEG_OPCODE_SCENE_LAYER_INIT,
 +		                   scene_layer->name);
 +		add_operation_node(comp,
- 		                   DEPSOP_TYPE_EXEC,
 +		                   function_bind(BKE_layer_eval_layer_collection_post, _1, scene_layer),
 +		                   DEG_OPCODE_SCENE_LAYER_DONE,
 +		                   scene_layer->name);
 +
 +		state.parent = NULL;
 +		build_layer_collections(scene, &scene_layer->layer_collections, &state);
 +	}
 +}
 +
 +}  // namespace DEG
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations_layer.cc
index 46bef7a0131,00000000000..a6c9fdfc6bc
mode 100644,000000..100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_layer.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_layer.cc
@@@ -1,134 -1,0 +1,127 @@@
 +/*
 + * ***** BEGIN GPL LICENSE BLOCK *****
 + *
 + * This program is free software; you can redistribute it and/or
 + * modify it under the terms of the GNU General Public License
 + * as published by the Free Software Foundation; either version 2
 + * of the License, or (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software Foundation,
 + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + *
 + * The Original Code is Copyright (C) 2013 Blender Foundation.
 + * All rights reserved.
 + *
 + * Original Author: Joshua Leung
 + * Contributor(s): Based on original depsgraph.c code - Blender Foundation (2005-2013)
 + *
 + * ***** END GPL LICENSE BLOCK *****
 + */
 +
 +/** \file blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
 + *  \ingroup depsgraph
 + *
 + * Methods for constructing depsgraph
 + */
 +
 +#include "intern/builder/deg_builder_relations.h"
 +
 +#include <stdio.h>
 +#include <stdlib.h>
 +#include <cstring>  /* required for STREQ later on. */
 +
 +#include "MEM_guardedalloc.h"
 +
 +extern "C" {
 +#include "BLI_blenlib.h"
 +#include "BLI_utildefines.h"
 +
 +#include "DNA_node_types.h"
 +#include "DNA_object_types.h"
 +#include "DNA_scene_types.h"
 +
 +#include "BKE_layer.h"
 +#include "BKE_main.h"
 +#include "BKE_node.h"
 +
 +#include "DEG_depsgraph.h"
 +#include "DEG_depsgraph_build.h"
 +} /* extern "C" */
 +
 +#include "intern/builder/deg_builder.h"
 +#include "intern/builde

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list