[Bf-blender-cvs] [61c684f] layer-manager: Merge branch 'blender2.8' into layer-manager
Julian Eisel
noreply at git.blender.org
Tue Nov 22 12:17:22 CET 2016
Commit: 61c684f39bbf773d6af0c417659c63ce1a73e9fc
Author: Julian Eisel
Date: Tue Nov 22 12:17:02 2016 +0100
Branches: layer-manager
https://developer.blender.org/rB61c684f39bbf773d6af0c417659c63ce1a73e9fc
Merge branch 'blender2.8' into layer-manager
Conflicts:
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/editors/include/BIF_glutil.h
source/blender/editors/interface/resources.c
source/blender/editors/screen/glutil.c
===================================================================
===================================================================
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 05741fb,3cf510e..9a04707
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@@ -1017,27 -816,45 +817,44 @@@ void DepsgraphNodeBuilder::build_obdata
}
case OB_CURVE:
- case OB_SURF:
case OB_FONT:
{
- /* curve evaluation operations */
+ /* Curve/nurms evaluation operations. */
/* - calculate curve geometry (including path) */
- add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
- DEPSOP_TYPE_INIT, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
- DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
-
- /* - calculate curve path - this is used by constraints, etc. */
- add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
- DEPSOP_TYPE_EXEC, function_bind(BKE_curve_eval_path, _1, (Curve *)obdata),
- DEG_OPCODE_GEOMETRY_PATH, "Path");
- break;
- }
+ add_operation_node(obdata,
+ DEPSNODE_TYPE_GEOMETRY,
+ DEPSOP_TYPE_INIT,
+ function_bind(BKE_curve_eval_geometry,
+ _1,
+ (Curve *)obdata),
+ DEG_OPCODE_PLACEHOLDER,
+ "Geometry Eval");
+
+ /* Calculate curve path - this is used by constraints, etc. */
+ if (ELEM(ob->type, OB_CURVE, OB_FONT)) {
+ add_operation_node(obdata,
+ DEPSNODE_TYPE_GEOMETRY,
+ DEPSOP_TYPE_EXEC,
+ function_bind(BKE_curve_eval_path,
+ _1,
+ (Curve *)obdata),
+ DEG_OPCODE_GEOMETRY_PATH,
+ "Path");
+ }
- case OB_SURF: /* Nurbs Surface */
- {
- /* nurbs evaluation operations */
- add_operation_node(obdata, DEPSNODE_TYPE_GEOMETRY,
- DEPSOP_TYPE_INIT, function_bind(BKE_curve_eval_geometry, _1, (Curve *)obdata),
- DEG_OPCODE_PLACEHOLDER, "Geometry Eval");
+ /* Make sure objects used for bevel.taper are in the graph.
+ * NOTE: This objects might be not linked to the scene.
+ */
+ Curve *cu = (Curve *)obdata;
+ if (cu->bevobj != NULL) {
+ build_object(scene, NULL, cu->bevobj);
+ }
+ if (cu->taperobj != NULL) {
+ build_object(scene, NULL, cu->taperobj);
+ }
+ if (ob->type == OB_FONT && cu->textoncurve != NULL) {
+ build_object(scene, NULL, cu->textoncurve);
+ }
break;
}
diff --cc source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
index 0000000,bcd4bc5..85eb94a
mode 000000,100644..100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_scene.cc
@@@ -1,0 -1,159 +1,162 @@@
+ /*
+ * ***** 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_blenlib.h"
+ #include "BLI_string.h"
+ #include "BLI_utildefines.h"
+
+ #include "DNA_node_types.h"
+ #include "DNA_object_types.h"
+ #include "DNA_scene_types.h"
+
+ #include "BKE_main.h"
+ #include "BKE_node.h"
++#include "BKE_object.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_scene(Main *bmain, Scene *scene)
+ {
+ /* LIB_TAG_DOIT is used to indicate whether node for given ID was already
+ * created or not. This flag is being set in add_id_node(), so functions
+ * shouldn't bother with setting it, they only might query this flag when
+ * needed.
+ */
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
+ /* XXX nested node trees are not included in tag-clearing above,
+ * so we need to do this manually.
+ */
+ FOREACH_NODETREE(bmain, nodetree, id) {
+ if (id != (ID *)nodetree)
+ nodetree->id.tag &= ~LIB_TAG_DOIT;
+ } FOREACH_NODETREE_END
+
+ /* scene ID block */
+ add_id_node(&scene->id);
+
+ /* timesource */
+ add_time_source(NULL);
+
+ /* build subgraph for set, and link this in... */
+ // XXX: depending on how this goes, that scene itself could probably store its
+ // own little partial depsgraph?
+ if (scene->set) {
+ build_scene(bmain, scene->set);
+ }
+
+ /* scene objects */
- LINKLIST_FOREACH (Base *, base, &scene->base) {
++ BKE_BASES_ITER_START (scene, base)
++ {
+ Object *ob = base->object;
+
+ /* object itself */
+ build_object(scene, base, ob);
+
+ /* object that this is a proxy for */
+ // XXX: the way that proxies work needs to be completely reviewed!
+ if (ob->proxy) {
+ ob->proxy->proxy_from = ob;
+ build_object(scene, base, ob->proxy);
+ }
+
+ /* Object dupligroup. */
+ if (ob->dup_group) {
+ build_group(scene, base, ob->dup_group);
+ }
+ }
++ BKE_BASES_ITER_END;
+
+ /* rigidbody */
+ if (scene->rigidbody_world) {
+ build_rigidbody(scene);
+ }
+
+ /* scene's animation and drivers */
+ if (scene->adt) {
+ build_animdata(&scene->id);
+ }
+
+ /* world */
+ if (scene->world) {
+ build_world(scene->world);
+ }
+
+ /* compo nodes */
+ if (scene->nodetree) {
+ build_compositor(scene);
+ }
+
+ /* sequencer */
+ // XXX...
+
+ /* grease pencil */
+ if (scene->gpd) {
+ build_gpencil(scene->gpd);
+ }
+
+ /* Cache file. */
+ LINKLIST_FOREACH (CacheFile *, cachefile, &bmain->cachefiles) {
+ build_cachefile(cachefile);
+ }
+
+ /* Masks. */
+ LINKLIST_FOREACH (Mask *, mask, &bmain->mask) {
+ build_mask(mask);
+ }
+
+ /* Movie clips. */
+ LINKLIST_FOREACH (MovieClip *, clip, &bmain->movieclip) {
+ build_movieclip(clip);
+ }
+ }
+
+ } // namespace DEG
diff --cc source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
index 0000000,6b51a95..3c9afbc
mode 000000,100644..100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc
@@@ -1,0 -1,162 +1,165 @@@
+ /*
+ * ***** 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_main.h"
+ #include "BKE_node.h"
++#include "BKE_object.h"
+
+ #include "DEG_depsgraph.h"
+ #include "DEG_depsgraph_build.h"
+ } /* extern "C" */
+
+ #include "intern/builder/deg_builder.h"
+ #include "intern/builder/deg_builder_pchanmap.h"
+
+ #include "intern/nodes/deg_node.h"
+ #include "intern/nodes/deg_node_component.h"
+ #include "intern/nodes/deg_node_operation.h"
+
+ #include "intern/depsgraph_intern.h"
+ #include "intern/depsgraph_types.h"
+
+ #include "util/deg_util_foreach.h"
+
+ namespace DEG {
+
+ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene)
+ {
+ /* LIB_TAG_DOIT is used to indicate whether node for given ID was already
+ * created or not.
+ */
+ BKE_main_id_tag_all(bmain, LIB_TAG_DOIT, false);
+ /* XXX nested node trees are not included in tag-clearing above,
+ * so we need to do this manually.
+ */
+ FOREACH_NODE
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list