2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2013 Blender Foundation.
19 * All rights reserved.
21 * Original Author: Joshua Leung
22 * Contributor(s): None Yet
24 * ***** END GPL LICENSE BLOCK *****
27 /** \file blender/depsgraph/intern/nodes/deg_node_operation.h
33 #include "intern/nodes/deg_node.h"
41 struct ComponentDepsNode;
43 /* Flags for Depsgraph Nodes */
44 typedef enum eDepsOperation_Flag {
45 /* node needs to be updated */
46 DEPSOP_FLAG_NEEDS_UPDATE = (1 << 0),
48 /* node was directly modified, causing need for update */
49 DEPSOP_FLAG_DIRECTLY_MODIFIED = (1 << 1),
50 } eDepsOperation_Flag;
52 /* Atomic Operation - Base type for all operations */
53 struct OperationDepsNode : public DepsNode {
57 string identifier() const;
58 string full_identifier() const;
60 void tag_update(Depsgraph *graph);
62 bool is_noop() const { return (bool)evaluate == false; }
64 OperationDepsNode *get_entry_operation() { return this; }
65 OperationDepsNode *get_exit_operation() { return this; }
67 /* Set this operation as compoonent's entry/exit operation. */
71 /* Component that contains the operation. */
72 ComponentDepsNode *owner;
74 /* Callback for operation. */
75 DepsEvalOperationCb evaluate;
77 /* How many inlinks are we still waiting on before we can be evaluated. */
78 uint32_t num_links_pending;
81 /* Identifier for the operation being performed. */
82 eDepsOperation_Code opcode;
84 /* (eDepsOperation_Flag) extra settings affecting evaluation. */
87 /* Extra customdata mask which needs to be evaluated for the object. */
88 uint64_t customdata_mask;
93 void deg_register_operation_depsnodes();