Cleanup: Various clang-tidy warnings in depsgraph
Pull Request: https://projects.blender.org/blender/blender/pulls/133734
This commit is contained in:
@@ -43,9 +43,11 @@ bool BLI_session_uid_ghash_compare(const void *lhs_v, const void *rhs_v);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
# include "BLI_hash.hh"
|
||||
|
||||
namespace blender {
|
||||
|
||||
inline const bool operator==(const SessionUID &lhs, const SessionUID &rhs)
|
||||
inline bool operator==(const SessionUID &lhs, const SessionUID &rhs)
|
||||
{
|
||||
return BLI_session_uid_is_equal(&lhs, &rhs);
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
/* ************************************************* */
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#include "BLI_span.hh"
|
||||
|
||||
struct Object;
|
||||
struct Depsgraph;
|
||||
|
||||
|
||||
@@ -11,14 +11,12 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_layer_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
#include "BLI_stack.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_string.h"
|
||||
|
||||
#include "BKE_action.hh"
|
||||
#include "BKE_collection.hh"
|
||||
@@ -29,7 +27,6 @@
|
||||
#include "intern/builder/deg_builder_cache.h"
|
||||
#include "intern/builder/deg_builder_remove_noop.h"
|
||||
#include "intern/depsgraph.hh"
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
#include "intern/depsgraph_tag.hh"
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
@@ -37,7 +34,6 @@
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
|
||||
@@ -8,12 +8,8 @@
|
||||
|
||||
#include "intern/builder/deg_builder_cache.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_anim_data.hh"
|
||||
|
||||
#include "RNA_path.hh"
|
||||
|
||||
@@ -10,10 +10,11 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_set.hh"
|
||||
|
||||
struct ID;
|
||||
struct PointerRNA;
|
||||
struct PropertyRNA;
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#include <cstdlib>
|
||||
|
||||
#include "BLI_stack.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "intern/builder/deg_builder_key.h"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_path.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_types.hh"
|
||||
|
||||
struct ID;
|
||||
@@ -33,8 +32,7 @@ struct TimeSourceKey {
|
||||
struct ComponentKey {
|
||||
ComponentKey() = default;
|
||||
|
||||
inline ComponentKey(const ID *id, NodeType type, const char *name = "")
|
||||
: id(id), type(type), name(name)
|
||||
ComponentKey(const ID *id, NodeType type, const char *name = "") : id(id), type(type), name(name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -48,13 +46,8 @@ struct ComponentKey {
|
||||
struct OperationKey {
|
||||
OperationKey() = default;
|
||||
|
||||
inline OperationKey(const ID *id, NodeType component_type, const char *name, int name_tag = -1)
|
||||
: id(id),
|
||||
component_type(component_type),
|
||||
component_name(""),
|
||||
opcode(OperationCode::OPERATION),
|
||||
name(name),
|
||||
name_tag(name_tag)
|
||||
OperationKey(const ID *id, NodeType component_type, const char *name, int name_tag = -1)
|
||||
: id(id), component_type(component_type), name(name), name_tag(name_tag)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -66,19 +59,13 @@ struct OperationKey {
|
||||
: id(id),
|
||||
component_type(component_type),
|
||||
component_name(component_name),
|
||||
opcode(OperationCode::OPERATION),
|
||||
name(name),
|
||||
name_tag(name_tag)
|
||||
{
|
||||
}
|
||||
|
||||
OperationKey(const ID *id, NodeType component_type, OperationCode opcode)
|
||||
: id(id),
|
||||
component_type(component_type),
|
||||
component_name(""),
|
||||
opcode(opcode),
|
||||
name(""),
|
||||
name_tag(-1)
|
||||
: id(id), component_type(component_type), opcode(opcode)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -86,12 +73,7 @@ struct OperationKey {
|
||||
NodeType component_type,
|
||||
const char *component_name,
|
||||
OperationCode opcode)
|
||||
: id(id),
|
||||
component_type(component_type),
|
||||
component_name(component_name),
|
||||
opcode(opcode),
|
||||
name(""),
|
||||
name_tag(-1)
|
||||
: id(id), component_type(component_type), component_name(component_name), opcode(opcode)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -100,15 +82,9 @@ struct OperationKey {
|
||||
OperationCode opcode,
|
||||
const char *name,
|
||||
int name_tag = -1)
|
||||
: id(id),
|
||||
component_type(component_type),
|
||||
component_name(""),
|
||||
opcode(opcode),
|
||||
name(name),
|
||||
name_tag(name_tag)
|
||||
: id(id), component_type(component_type), opcode(opcode), name(name), name_tag(name_tag)
|
||||
{
|
||||
}
|
||||
|
||||
OperationKey(const ID *id,
|
||||
NodeType component_type,
|
||||
const char *component_name,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "BLI_map.hh"
|
||||
|
||||
struct ID;
|
||||
|
||||
|
||||
@@ -15,9 +15,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
@@ -29,8 +27,6 @@
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_curves_types.h"
|
||||
#include "DNA_effect_types.h"
|
||||
#include "DNA_gpencil_legacy_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_light_types.h"
|
||||
#include "DNA_lightprobe_types.h"
|
||||
@@ -38,7 +34,6 @@
|
||||
#include "DNA_mask_types.h"
|
||||
#include "DNA_material_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
#include "DNA_movieclip_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
@@ -1409,7 +1404,7 @@ void DepsgraphNodeBuilder::build_driver_id_property(const PointerRNA &target_pro
|
||||
if (ptr.owner_id) {
|
||||
build_id(ptr.owner_id);
|
||||
}
|
||||
const char *prop_identifier = RNA_property_identifier((PropertyRNA *)prop);
|
||||
const char *prop_identifier = RNA_property_identifier(prop);
|
||||
/* Custom properties of bones are placed in their components to improve granularity. */
|
||||
if (RNA_struct_is_a(ptr.type, &RNA_PoseBone)) {
|
||||
const bPoseChannel *pchan = static_cast<const bPoseChannel *>(ptr.data);
|
||||
@@ -1723,7 +1718,7 @@ void DepsgraphNodeBuilder::build_object_data_geometry_datablock(ID *obdata)
|
||||
}
|
||||
OperationNode *op_node;
|
||||
/* Make sure we've got an ID node before requesting evaluated pointer. */
|
||||
(void)add_id_node((ID *)obdata);
|
||||
(void)add_id_node(obdata);
|
||||
ID *obdata_cow = get_cow_id(obdata);
|
||||
build_idproperties(obdata->properties);
|
||||
/* Animation. */
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_span.hh"
|
||||
|
||||
#include "BKE_lib_query.hh" /* For LibraryForeachIDCallbackFlag enum. */
|
||||
|
||||
#include "DNA_armature_types.h"
|
||||
#include "intern/builder/deg_builder.h"
|
||||
#include "intern/builder/deg_builder_key.h"
|
||||
#include "intern/builder/deg_builder_map.h"
|
||||
@@ -21,6 +20,7 @@
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
struct BoneCollection;
|
||||
struct CacheFile;
|
||||
struct Camera;
|
||||
struct Collection;
|
||||
@@ -68,7 +68,7 @@ struct TimeSourceNode;
|
||||
class DepsgraphNodeBuilder : public DepsgraphBuilder {
|
||||
public:
|
||||
DepsgraphNodeBuilder(Main *bmain, Depsgraph *graph, DepsgraphBuilderCache *cache);
|
||||
~DepsgraphNodeBuilder();
|
||||
~DepsgraphNodeBuilder() override;
|
||||
|
||||
/* For given original ID get ID which is created by copy-on-evaluation system. */
|
||||
ID *get_cow_id(const ID *id_orig) const;
|
||||
|
||||
@@ -10,16 +10,8 @@
|
||||
|
||||
#include "intern/builder/deg_builder_nodes.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
@@ -33,7 +25,6 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
#include "intern/builder/deg_builder.h"
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
@@ -10,19 +10,11 @@
|
||||
|
||||
#include "intern/builder/deg_builder_nodes.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_freestyle_types.h"
|
||||
#include "DNA_layer_types.h"
|
||||
#include "DNA_linestyle_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
void RootPChanMap::print_debug()
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_set.hh"
|
||||
#include "BLI_string_ref.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
|
||||
@@ -15,10 +15,9 @@
|
||||
#include <cstring> /* required for STREQ later on. */
|
||||
#include <optional>
|
||||
|
||||
#include "BKE_global.hh"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
@@ -97,10 +96,10 @@
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
#include "intern/builder/deg_builder.h"
|
||||
#include "intern/builder/deg_builder_pchanmap.h"
|
||||
#include "intern/builder/deg_builder_relations_drivers.h"
|
||||
#include "intern/debug/deg_debug.h"
|
||||
#include "intern/depsgraph_physics.hh"
|
||||
#include "intern/depsgraph_tag.hh"
|
||||
@@ -2180,7 +2179,7 @@ void DepsgraphRelationBuilder::build_driver_id_property(const PointerRNA &target
|
||||
if (ptr.owner_id) {
|
||||
build_id(ptr.owner_id);
|
||||
}
|
||||
const char *prop_identifier = RNA_property_identifier((PropertyRNA *)prop);
|
||||
const char *prop_identifier = RNA_property_identifier(prop);
|
||||
/* Custom properties of bones are placed in their components to improve granularity. */
|
||||
OperationKey id_property_key;
|
||||
if (RNA_struct_is_a(ptr.type, &RNA_PoseBone)) {
|
||||
|
||||
@@ -8,18 +8,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#include "RNA_path.hh"
|
||||
|
||||
#include "BLI_span.hh"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_lib_query.hh" /* For LibraryForeachIDCallbackFlag enum. */
|
||||
|
||||
@@ -366,4 +361,4 @@ struct DepsNodeHandle {
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
#include "intern/builder/deg_builder_relations_impl.h"
|
||||
#include "intern/builder/deg_builder_relations_impl.h" // IWYU pragma: export
|
||||
|
||||
@@ -16,6 +16,9 @@
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_path.hh"
|
||||
|
||||
#include "BKE_anim_data.hh"
|
||||
|
||||
#include "intern/builder/deg_builder_relations.h"
|
||||
|
||||
@@ -36,7 +36,6 @@ class DriverDescriptor {
|
||||
StringRef rna_prefix;
|
||||
StringRef rna_suffix;
|
||||
|
||||
public:
|
||||
DriverDescriptor(PointerRNA *id_ptr, FCurve *fcu);
|
||||
|
||||
bool driver_relations_needed() const;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "intern/builder/deg_builder_relations.h"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
|
||||
#include <iostream>
|
||||
@@ -89,20 +90,19 @@ Relation *DepsgraphRelationBuilder::add_node_handle_relation(const KeyType &key_
|
||||
if (op_from != nullptr && op_to != nullptr) {
|
||||
return add_operation_relation(op_from, op_to, description, flags);
|
||||
}
|
||||
else {
|
||||
if (!op_from) {
|
||||
fprintf(stderr,
|
||||
"add_node_handle_relation(%s) - Could not find op_from (%s)\n",
|
||||
description,
|
||||
key_from.identifier().c_str());
|
||||
}
|
||||
if (!op_to) {
|
||||
fprintf(stderr,
|
||||
"add_node_handle_relation(%s) - Could not find op_to (%s)\n",
|
||||
description,
|
||||
key_from.identifier().c_str());
|
||||
}
|
||||
if (!op_from) {
|
||||
fprintf(stderr,
|
||||
"add_node_handle_relation(%s) - Could not find op_from (%s)\n",
|
||||
description,
|
||||
key_from.identifier().c_str());
|
||||
}
|
||||
if (!op_to) {
|
||||
fprintf(stderr,
|
||||
"add_node_handle_relation(%s) - Could not find op_to (%s)\n",
|
||||
description,
|
||||
key_from.identifier().c_str());
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,19 +8,16 @@
|
||||
* Methods for constructing depsgraph
|
||||
*/
|
||||
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
#include "intern/builder/deg_builder_relations.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring> /* required for STREQ later on. */
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_customdata_types.h"
|
||||
@@ -29,7 +26,6 @@
|
||||
#include "BKE_action.hh"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_constraint.h"
|
||||
#include "BKE_lib_query.hh"
|
||||
|
||||
#include "RNA_prototypes.hh"
|
||||
|
||||
@@ -41,7 +37,6 @@
|
||||
#include "intern/builder/deg_builder_pchanmap.h"
|
||||
#include "intern/debug/deg_debug.h"
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
|
||||
@@ -10,19 +10,10 @@
|
||||
|
||||
#include "intern/builder/deg_builder_relations.h"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring> /* required for STREQ later on. */
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_blenlib.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_linestyle_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "BKE_layer.hh"
|
||||
@@ -33,15 +24,12 @@
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
#include "intern/builder/deg_builder.h"
|
||||
#include "intern/builder/deg_builder_pchanmap.h"
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
bool DepsgraphRelationBuilder::build_layer_collection(LayerCollection *layer_collection)
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#include "intern/builder/deg_builder_remove_noop.h"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
@@ -18,6 +16,8 @@
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
static inline bool is_unused_noop(OperationNode *op_node)
|
||||
|
||||
@@ -10,17 +10,14 @@
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_constraint_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
|
||||
#include "BKE_constraint.h"
|
||||
|
||||
@@ -175,8 +172,7 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr,
|
||||
node_identifier.type = NodeType::PARAMETERS;
|
||||
}
|
||||
node_identifier.operation_code = OperationCode::ID_PROPERTY;
|
||||
node_identifier.operation_name = RNA_property_identifier(
|
||||
reinterpret_cast<const PropertyRNA *>(prop));
|
||||
node_identifier.operation_name = RNA_property_identifier(prop);
|
||||
return node_identifier;
|
||||
}
|
||||
if (ptr->type == &RNA_PoseBone) {
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "BLI_map.hh"
|
||||
|
||||
#include <memory>
|
||||
|
||||
struct ID;
|
||||
struct PointerRNA;
|
||||
struct PropertyRNA;
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
struct ID;
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
* \ingroup depsgraph
|
||||
*/
|
||||
|
||||
#include "intern/builder/deg_builder_transitive.h"
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
#include "intern/builder/deg_builder_transitive.h"
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
|
||||
@@ -20,8 +20,8 @@ class AllObjectsBuilderPipeline : public ViewLayerBuilderPipeline {
|
||||
AllObjectsBuilderPipeline(::Depsgraph *graph);
|
||||
|
||||
protected:
|
||||
virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
virtual unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
};
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -22,8 +22,8 @@ class CompositorBuilderPipeline : public AbstractBuilderPipeline {
|
||||
unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
|
||||
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
|
||||
private:
|
||||
bNodeTree *nodetree_;
|
||||
|
||||
@@ -29,11 +29,11 @@ class FromCollectionBuilderPipeline : public AbstractBuilderPipeline {
|
||||
FromCollectionBuilderPipeline(::Depsgraph *graph, Collection *collection);
|
||||
|
||||
protected:
|
||||
virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
virtual unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
|
||||
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
|
||||
private:
|
||||
Set<ID *> ids_;
|
||||
|
||||
@@ -29,11 +29,11 @@ class FromIDsBuilderPipeline : public AbstractBuilderPipeline {
|
||||
FromIDsBuilderPipeline(::Depsgraph *graph, Span<ID *> ids);
|
||||
|
||||
protected:
|
||||
virtual unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
virtual unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
|
||||
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
};
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -20,8 +20,8 @@ class RenderBuilderPipeline : public AbstractBuilderPipeline {
|
||||
unique_ptr<DepsgraphNodeBuilder> construct_node_builder() override;
|
||||
unique_ptr<DepsgraphRelationBuilder> construct_relation_builder() override;
|
||||
|
||||
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
};
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "intern/builder/deg_builder_nodes.h"
|
||||
#include "intern/builder/deg_builder_relations.h"
|
||||
#include "intern/depsgraph.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ class ViewLayerBuilderPipeline : public AbstractBuilderPipeline {
|
||||
ViewLayerBuilderPipeline(::Depsgraph *graph);
|
||||
|
||||
protected:
|
||||
virtual void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
virtual void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
void build_nodes(DepsgraphNodeBuilder &node_builder) override;
|
||||
void build_relations(DepsgraphRelationBuilder &relation_builder) override;
|
||||
};
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -11,13 +11,10 @@
|
||||
#include "BLI_console.h"
|
||||
#include "BLI_hash.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_time_utildefines.h"
|
||||
#include "BLI_utildefines.h"
|
||||
#include "BLI_time.h"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
DepsgraphDebug::DepsgraphDebug() : flags(G.debug), graph_evaluation_start_time_(0) {}
|
||||
|
||||
@@ -8,12 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BKE_global.hh" // IWYU pragma: keep
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
class DepsgraphDebug {
|
||||
@@ -63,8 +61,8 @@ class DepsgraphDebug {
|
||||
fflush(stderr); \
|
||||
} while (0)
|
||||
|
||||
bool terminal_do_color(void);
|
||||
bool terminal_do_color();
|
||||
string color_for_pointer(const void *pointer);
|
||||
string color_end(void);
|
||||
string color_end();
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -11,9 +11,6 @@
|
||||
#include <cstdarg>
|
||||
|
||||
#include "BLI_dot_export.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
@@ -10,13 +10,8 @@
|
||||
|
||||
#include "intern/depsgraph.hh" /* own include */
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_console.h"
|
||||
#include "BLI_hash.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
@@ -29,7 +24,6 @@
|
||||
#include "intern/depsgraph_physics.hh"
|
||||
#include "intern/depsgraph_registry.hh"
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
#include "intern/depsgraph_update.hh"
|
||||
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
|
||||
|
||||
@@ -14,14 +14,15 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "DNA_ID.h" /* for ID_Type and INDEX_ID_MAX */
|
||||
|
||||
#include "BLI_set.hh"
|
||||
#include "BLI_threads.h" /* for SpinLock */
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
@@ -29,7 +30,6 @@
|
||||
|
||||
#include "intern/debug/deg_debug.h"
|
||||
#include "intern/depsgraph_light_linking.hh"
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
struct ID;
|
||||
struct Scene;
|
||||
|
||||
@@ -8,14 +8,9 @@
|
||||
* Methods for constructing depsgraph.
|
||||
*/
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_time_utildefines.h"
|
||||
|
||||
#include "DNA_cachefile_types.h"
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_node_types.h"
|
||||
@@ -23,6 +18,7 @@
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "BKE_collection.hh"
|
||||
#include "BKE_global.hh"
|
||||
#include "BKE_main.hh"
|
||||
#include "BKE_scene.hh"
|
||||
|
||||
|
||||
@@ -8,11 +8,9 @@
|
||||
* Implementation of tools for debugging the depsgraph
|
||||
*/
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
#include "BKE_global.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
@@ -8,14 +8,8 @@
|
||||
* Evaluation engine entry-points for Depsgraph Engine.
|
||||
*/
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_scene.hh"
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
@@ -27,7 +21,6 @@
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
#include "intern/depsgraph_tag.hh"
|
||||
|
||||
@@ -14,12 +14,8 @@
|
||||
#include "BLI_hash.hh"
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_collection.hh"
|
||||
|
||||
#include "DNA_collection_types.h"
|
||||
#include "DNA_layer_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@@ -53,7 +49,7 @@ void eval_runtime_data(const ::Depsgraph *depsgraph, Object &object_eval)
|
||||
namespace {
|
||||
|
||||
/* TODO(sergey): Move to a public API, solving the const-correctness. */
|
||||
template<class T> static inline const T *get_original(const T *id)
|
||||
template<class T> inline const T *get_original(const T *id)
|
||||
{
|
||||
if (!id) {
|
||||
return nullptr;
|
||||
@@ -323,10 +319,9 @@ namespace {
|
||||
* Note that if an object is reachable from multiple children collection the callback is invoked
|
||||
* for all of them. */
|
||||
template<class Proc>
|
||||
static void foreach_light_collection_object_inner(
|
||||
const CollectionLightLinking &collection_light_linking,
|
||||
const Collection &collection,
|
||||
Proc &&callback)
|
||||
void foreach_light_collection_object_inner(const CollectionLightLinking &collection_light_linking,
|
||||
const Collection &collection,
|
||||
Proc &&callback)
|
||||
{
|
||||
LISTBASE_FOREACH (const CollectionChild *, collection_child, &collection.children) {
|
||||
foreach_light_collection_object_inner(
|
||||
@@ -347,7 +342,7 @@ static void foreach_light_collection_object_inner(
|
||||
* Note that if an object is reachable from multiple children collection the callback is invoked
|
||||
* for all of them. */
|
||||
template<class Proc>
|
||||
static void foreach_light_collection_object(const Collection &collection, Proc &&callback)
|
||||
void foreach_light_collection_object(const Collection &collection, Proc &&callback)
|
||||
{
|
||||
LISTBASE_FOREACH (const CollectionChild *, collection_child, &collection.children) {
|
||||
foreach_light_collection_object_inner(
|
||||
|
||||
@@ -125,7 +125,7 @@ class EmitterDataMap {
|
||||
/* Get linked collection depending on whether this is emitter information for light or shadow
|
||||
* linking. */
|
||||
/* TODO(sergey): Check whether template specialization is preferred here. */
|
||||
inline const Collection *get_collection(const Object &emitter) const
|
||||
const Collection *get_collection(const Object &emitter) const
|
||||
{
|
||||
return BKE_light_linking_collection_get(&emitter, link_type_);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ class LinkingData {
|
||||
/* Get light set membership information of the emitter data depending whether this linking
|
||||
* data is a light or shadow linking. */
|
||||
/* TODO(sergey): Check whether template specialization is preferred here. */
|
||||
inline EmitterSetMembership &get_emitter_set_membership(EmitterData &emitter_data) const
|
||||
EmitterSetMembership &get_emitter_set_membership(EmitterData &emitter_data) const
|
||||
{
|
||||
if (link_type_ == LIGHT_LINKING_BLOCKER) {
|
||||
return emitter_data.shadow_membership;
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
|
||||
#include "intern/depsgraph_physics.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_compiler_compat.h"
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
#include "BKE_collision.h"
|
||||
|
||||
@@ -8,15 +8,11 @@
|
||||
* Implementation of Querying API
|
||||
*/
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include <cstring> /* XXX: `memcpy`. */
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_action.hh" /* XXX: BKE_pose_channel_find_name */
|
||||
#include "BKE_customdata.hh"
|
||||
#include "BKE_idtype.hh"
|
||||
#include "BKE_main.hh"
|
||||
|
||||
|
||||
@@ -8,13 +8,6 @@
|
||||
* Implementation of Querying and Filtering API's
|
||||
*/
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
|
||||
@@ -11,10 +11,7 @@
|
||||
/* Silence warnings from copying deprecated fields. */
|
||||
#define DNA_DEPRECATED_ALLOW
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BKE_duplilist.hh"
|
||||
#include "BKE_geometry_set.hh"
|
||||
#include "BKE_idprop.hh"
|
||||
#include "BKE_layer.hh"
|
||||
#include "BKE_modifier.hh"
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
* \ingroup depsgraph
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
#include "intern/depsgraph_registry.hh"
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_vector_set.hh"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
#include "intern/depsgraph_registry.hh"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "BLI_span.hh"
|
||||
|
||||
struct Main;
|
||||
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
#include "intern/depsgraph_relation.hh" /* own include */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -12,22 +12,16 @@
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring> /* required for memset */
|
||||
#include <queue>
|
||||
|
||||
#include "BLI_index_range.hh"
|
||||
#include "BLI_math_bits.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_curve_types.h"
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_lattice_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_particle_types.h"
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_windowmanager_types.h"
|
||||
|
||||
#include "BKE_anim_data.hh"
|
||||
#include "BKE_global.hh"
|
||||
@@ -35,7 +29,6 @@
|
||||
#include "BKE_lib_override.hh"
|
||||
#include "BKE_node.hh"
|
||||
#include "BKE_scene.hh"
|
||||
#include "BKE_screen.hh"
|
||||
#include "BKE_workspace.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
@@ -53,7 +46,6 @@
|
||||
#include "intern/node/deg_node_factory.hh"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
namespace deg = blender::deg;
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include <cstdlib> /* for BLI_assert() */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_customdata_types.h"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
@@ -19,7 +17,6 @@
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/node/deg_node.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_factory.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
namespace deg = blender::deg;
|
||||
|
||||
@@ -15,21 +15,14 @@
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
/* TODO(sergey): Ideally we'll just use char* and statically allocated strings
|
||||
* to avoid any possible overhead caused by string (re)allocation/formatting. */
|
||||
#include <algorithm>
|
||||
#include <deque>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_set.hh"
|
||||
#include "BLI_string_ref.hh"
|
||||
#include "BLI_vector.hh"
|
||||
#include "BLI_vector_set.hh"
|
||||
|
||||
struct Depsgraph;
|
||||
struct CustomData_MeshMasks;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
namespace deg = blender::deg;
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_writeback_sync.hh"
|
||||
|
||||
#include "BLI_map.hh"
|
||||
|
||||
#include "depsgraph.hh"
|
||||
|
||||
namespace blender::deg::sync_writeback {
|
||||
|
||||
@@ -10,16 +10,13 @@
|
||||
|
||||
#include "intern/eval/deg_eval.h"
|
||||
|
||||
#include "BLI_compiler_attrs.h"
|
||||
#include "BLI_function_ref.hh"
|
||||
#include "BLI_gsqueue.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_time.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
|
||||
#include "DNA_node_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@@ -43,7 +40,6 @@
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
|
||||
@@ -21,18 +21,13 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_threads.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_curve.hh"
|
||||
#include "BKE_global.hh"
|
||||
#include "BKE_gpencil_legacy.h"
|
||||
#include "BKE_idprop.hh"
|
||||
#include "BKE_layer.hh"
|
||||
#include "BKE_lib_id.hh"
|
||||
#include "BKE_mesh_types.hh"
|
||||
#include "BKE_object_types.hh"
|
||||
#include "BKE_scene.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
@@ -43,15 +38,11 @@
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_anim_types.h"
|
||||
#include "DNA_armature_types.h"
|
||||
#include "DNA_gpencil_legacy_types.h"
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_modifier_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_particle_types.h"
|
||||
#include "DNA_rigidbody_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
#include "DNA_sequence_types.h"
|
||||
#include "DNA_sound_types.h"
|
||||
|
||||
#include "DRW_engine.hh"
|
||||
|
||||
@@ -68,12 +59,12 @@
|
||||
# include "DNA_world_types.h"
|
||||
#endif
|
||||
|
||||
#include "BKE_action.hh"
|
||||
#include "BKE_anim_data.hh"
|
||||
#include "BKE_animsys.h"
|
||||
#include "BKE_armature.hh"
|
||||
#include "BKE_editmesh.hh"
|
||||
#include "BKE_lib_query.hh"
|
||||
#include "BKE_mesh_types.hh"
|
||||
#include "BKE_modifier.hh"
|
||||
#include "BKE_object.hh"
|
||||
#include "BKE_pointcache.h"
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
@@ -26,8 +26,6 @@ struct ID;
|
||||
# define DEG_COW_PRINT(format, ...)
|
||||
#endif
|
||||
|
||||
struct Depsgraph;
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
struct Depsgraph;
|
||||
|
||||
@@ -10,24 +10,19 @@
|
||||
|
||||
#include "intern/eval/deg_eval_flush.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "BLI_math_vector.h"
|
||||
#include "BLI_task.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_global.hh"
|
||||
#include "BKE_key.hh"
|
||||
#include "BKE_object.hh"
|
||||
#include "BKE_scene.hh"
|
||||
|
||||
#include "DNA_key_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "DRW_engine.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_debug.hh"
|
||||
|
||||
#include "intern/debug/deg_debug.h"
|
||||
#include "intern/depsgraph.hh"
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DRW_engine.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -8,7 +8,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BKE_modifier.hh"
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BKE_modifier.hh"
|
||||
#include "DNA_modifier_types.h"
|
||||
|
||||
struct ModifierData;
|
||||
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
|
||||
#include "DNA_movieclip_types.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
MovieClipBackup::MovieClipBackup(const Depsgraph * /*depsgraph*/)
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* \ingroup depsgraph
|
||||
*/
|
||||
|
||||
#include "BLI_session_uid.h"
|
||||
|
||||
#include "intern/eval/deg_eval_runtime_backup_object.h"
|
||||
|
||||
#include <cstring>
|
||||
@@ -16,6 +18,7 @@
|
||||
|
||||
#include "BKE_action.hh"
|
||||
#include "BKE_mesh_types.hh"
|
||||
#include "BKE_modifier.hh"
|
||||
#include "BKE_object.hh"
|
||||
#include "BKE_object_types.hh"
|
||||
|
||||
|
||||
@@ -13,11 +13,10 @@
|
||||
|
||||
#include "BKE_object_types.hh"
|
||||
|
||||
#include "BLI_session_uid.h"
|
||||
#include "BLI_map.hh"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/eval/deg_eval_runtime_backup_modifier.h"
|
||||
#include "intern/eval/deg_eval_runtime_backup_pose.h"
|
||||
|
||||
struct Object;
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "DNA_action_types.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
} // namespace blender::deg
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
|
||||
#include "DNA_sequence_types.h"
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
SequenceBackup::SequenceBackup(const Depsgraph * /*depsgraph*/)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_listbase.h"
|
||||
#include "DNA_listBase.h"
|
||||
|
||||
struct Strip;
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
* \ingroup depsgraph
|
||||
*/
|
||||
|
||||
#include "BLI_session_uid.h"
|
||||
|
||||
#include "intern/eval/deg_eval_runtime_backup_sequencer.h"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@@ -10,9 +10,8 @@
|
||||
|
||||
#include "DNA_session_uid_types.h"
|
||||
|
||||
#include "BLI_session_uid.h"
|
||||
#include "BLI_map.hh"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/eval/deg_eval_runtime_backup_sequence.h"
|
||||
|
||||
struct Scene;
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#include "intern/eval/deg_eval_runtime_backup_sound.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_sound_types.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -10,14 +10,11 @@
|
||||
|
||||
#include "BLI_assert.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_volume_types.h"
|
||||
|
||||
#include "BKE_volume.hh"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
VolumeBackup::VolumeBackup(const Depsgraph * /*depsgraph*/) : grids(nullptr) {}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#include "intern/eval/deg_eval_stats.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
@@ -8,17 +8,12 @@
|
||||
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_factory.hh"
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
@@ -12,10 +12,10 @@
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DEG_depsgraph_build.hh"
|
||||
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
struct ID;
|
||||
struct Scene;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include <cstring> /* required for STREQ later on. */
|
||||
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_hash.hh"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
@@ -13,12 +13,8 @@
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "BKE_object.hh"
|
||||
|
||||
#include "DNA_object_types.h"
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_vector.hh"
|
||||
|
||||
struct ID;
|
||||
struct bPoseChannel;
|
||||
@@ -48,12 +44,12 @@ struct ComponentNode : public Node {
|
||||
|
||||
/* Typedef for container of operations */
|
||||
ComponentNode();
|
||||
~ComponentNode();
|
||||
~ComponentNode() override;
|
||||
|
||||
/** Initialize 'component' node - from pointer data given. */
|
||||
void init(const ID *id, const char *subdata) override;
|
||||
|
||||
virtual string identifier() const override;
|
||||
string identifier() const override;
|
||||
|
||||
/* Find an existing operation, if requested operation does not exist nullptr will be returned.
|
||||
* See #add_operation for the meaning and examples of #name and #name_tag.
|
||||
@@ -103,10 +99,10 @@ struct ComponentNode : public Node {
|
||||
|
||||
void clear_operations();
|
||||
|
||||
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
|
||||
virtual OperationNode *get_entry_operation() override;
|
||||
virtual OperationNode *get_exit_operation() override;
|
||||
OperationNode *get_entry_operation() override;
|
||||
OperationNode *get_exit_operation() override;
|
||||
|
||||
void finalize_build(Depsgraph *graph);
|
||||
|
||||
@@ -215,7 +211,7 @@ DEG_COMPONENT_NODE_DECLARE_GENERIC(NTreeGeometryPreprocess);
|
||||
/* Bone Component */
|
||||
struct BoneComponentNode : public ComponentNode {
|
||||
/** Initialize 'bone component' node - from pointer data given. */
|
||||
void init(const ID *id, const char *subdata);
|
||||
void init(const ID *id, const char *subdata) override;
|
||||
|
||||
struct bPoseChannel *pchan; /* the bone that this component represents */
|
||||
|
||||
@@ -225,7 +221,7 @@ struct BoneComponentNode : public ComponentNode {
|
||||
/* Eventually we would not tag parameters in all cases.
|
||||
* Support for this each ID needs to be added on an individual basis. */
|
||||
struct ParametersComponentNode : public ComponentNode {
|
||||
virtual bool need_tag_cow_before_update(const IDRecalcFlag /*tag*/) override
|
||||
bool need_tag_cow_before_update(const IDRecalcFlag /*tag*/) override
|
||||
{
|
||||
if (ID_TYPE_SUPPORTS_PARAMS_WITHOUT_COW(owner->id_type)) {
|
||||
/* Disabled as this is not true for newly added objects, needs investigation. */
|
||||
@@ -240,7 +236,7 @@ struct ParametersComponentNode : public ComponentNode {
|
||||
|
||||
/* Audio component. */
|
||||
struct AudioComponentNode : public ComponentNode {
|
||||
virtual bool need_tag_cow_before_update(const IDRecalcFlag tag) override
|
||||
bool need_tag_cow_before_update(const IDRecalcFlag tag) override
|
||||
{
|
||||
/* Frame change doesn't require a copy of the scene, doing so can be a heavy operation
|
||||
* especially when the collection contains many objects, see #104798. */
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "intern/depsgraph_type.hh"
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
struct ID;
|
||||
@@ -26,12 +23,12 @@ struct DepsNodeFactory {
|
||||
};
|
||||
|
||||
template<class ModeObjectType> struct DepsNodeFactoryImpl : public DepsNodeFactory {
|
||||
virtual NodeType type() const override;
|
||||
virtual const char *type_name() const override;
|
||||
NodeType type() const override;
|
||||
const char *type_name() const override;
|
||||
|
||||
virtual int id_recalc_tag() const override;
|
||||
int id_recalc_tag() const override;
|
||||
|
||||
virtual Node *create_node(const ID *id, const char *subdata, const char *name) const override;
|
||||
Node *create_node(const ID *id, const char *subdata, const char *name) const override;
|
||||
};
|
||||
|
||||
/* Register typeinfo */
|
||||
|
||||
@@ -8,23 +8,19 @@
|
||||
|
||||
#include "intern/node/deg_node_id.hh"
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstring> /* required for STREQ later on. */
|
||||
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_string.h"
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
#include "DNA_anim_types.h"
|
||||
|
||||
#include "BKE_lib_id.hh"
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
#include "intern/eval/deg_eval_copy_on_write.h"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_factory.hh"
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
|
||||
@@ -8,11 +8,13 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_ghash.h"
|
||||
#include "BLI_sys_types.h"
|
||||
#include "DNA_ID.h"
|
||||
#include "intern/node/deg_node.hh"
|
||||
|
||||
#include "DNA_ID.h"
|
||||
|
||||
#include "BLI_map.hh"
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
namespace blender::deg {
|
||||
|
||||
struct ComponentNode;
|
||||
@@ -43,17 +45,17 @@ struct IDNode : public Node {
|
||||
};
|
||||
|
||||
/** Initialize 'id' node - from pointer data given. */
|
||||
virtual void init(const ID *id, const char *subdata) override;
|
||||
void init(const ID *id, const char *subdata) override;
|
||||
void init_copy_on_write(Depsgraph &depsgraph, ID *id_cow_hint = nullptr);
|
||||
~IDNode();
|
||||
~IDNode() override;
|
||||
void destroy();
|
||||
|
||||
virtual string identifier() const override;
|
||||
string identifier() const override;
|
||||
|
||||
ComponentNode *find_component(NodeType type, const char *name = "") const;
|
||||
ComponentNode *add_component(NodeType type, const char *name = "");
|
||||
|
||||
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
|
||||
void finalize_build(Depsgraph *graph);
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@
|
||||
|
||||
#include "intern/node/deg_node_operation.hh"
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
#include "intern/node/deg_node_component.hh"
|
||||
#include "intern/node/deg_node_factory.hh"
|
||||
|
||||
@@ -245,25 +245,25 @@ enum OperationFlag {
|
||||
struct OperationNode : public Node {
|
||||
OperationNode();
|
||||
|
||||
virtual string identifier() const override;
|
||||
string identifier() const override;
|
||||
/**
|
||||
* Full node identifier, including owner name.
|
||||
* used for logging and debug prints.
|
||||
*/
|
||||
string full_identifier() const;
|
||||
|
||||
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
|
||||
bool is_noop() const
|
||||
{
|
||||
return (bool)evaluate == false;
|
||||
}
|
||||
|
||||
virtual OperationNode *get_entry_operation() override
|
||||
OperationNode *get_entry_operation() override
|
||||
{
|
||||
return this;
|
||||
}
|
||||
virtual OperationNode *get_exit_operation() override
|
||||
OperationNode *get_exit_operation() override
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
|
||||
#include "intern/node/deg_node_time.hh"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
#include "intern/depsgraph.hh"
|
||||
#include "intern/depsgraph_relation.hh"
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ struct TimeSourceNode : public Node {
|
||||
|
||||
/* TODO: evaluate() operation needed */
|
||||
|
||||
virtual void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
void tag_update(Depsgraph *graph, eUpdateSource source) override;
|
||||
|
||||
void flush_update_tag(Depsgraph *graph);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user