Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc199
1 files changed, 86 insertions, 113 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
index 22ff10d3b70..35af968d46e 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_keys.cc
@@ -30,100 +30,85 @@ namespace DEG {
////////////////////////////////////////////////////////////////////////////////
// Time source.
-TimeSourceKey::TimeSourceKey()
- : id(NULL)
+TimeSourceKey::TimeSourceKey() : id(NULL)
{
}
-TimeSourceKey::TimeSourceKey(ID *id)
- : id(id)
+TimeSourceKey::TimeSourceKey(ID *id) : id(id)
{
}
string TimeSourceKey::identifier() const
{
- return string("TimeSourceKey");
+ return string("TimeSourceKey");
}
////////////////////////////////////////////////////////////////////////////////
// Component.
-ComponentKey::ComponentKey()
- : id(NULL),
- type(NodeType::UNDEFINED),
- name("")
+ComponentKey::ComponentKey() : id(NULL), type(NodeType::UNDEFINED), name("")
{
}
ComponentKey::ComponentKey(ID *id, NodeType type, const char *name)
- : id(id),
- type(type),
- name(name)
+ : id(id), type(type), name(name)
{
}
string ComponentKey::identifier() const
{
- const char *idname = (id) ? id->name : "<None>";
- string result = string("ComponentKey(");
- result += idname;
- result += ", " + string(nodeTypeAsString(type));
- if (name[0] != '\0') {
- result += ", '" + string(name) + "'";
- }
- result += ')';
- return result;
+ const char *idname = (id) ? id->name : "<None>";
+ string result = string("ComponentKey(");
+ result += idname;
+ result += ", " + string(nodeTypeAsString(type));
+ if (name[0] != '\0') {
+ result += ", '" + string(name) + "'";
+ }
+ result += ')';
+ return result;
}
////////////////////////////////////////////////////////////////////////////////
// Operation.
OperationKey::OperationKey()
- : id(NULL),
- component_type(NodeType::UNDEFINED),
- component_name(""),
- opcode(OperationCode::OPERATION),
- name(""),
- name_tag(-1)
+ : id(NULL),
+ component_type(NodeType::UNDEFINED),
+ component_name(""),
+ opcode(OperationCode::OPERATION),
+ name(""),
+ name_tag(-1)
{
}
-OperationKey::OperationKey(ID *id,
- NodeType component_type,
- const char *name,
- int name_tag)
- : id(id),
- component_type(component_type),
- component_name(""),
- opcode(OperationCode::OPERATION),
- name(name),
- name_tag(name_tag)
+OperationKey::OperationKey(ID *id, NodeType component_type, const char *name, int name_tag)
+ : id(id),
+ component_type(component_type),
+ component_name(""),
+ opcode(OperationCode::OPERATION),
+ name(name),
+ name_tag(name_tag)
{
}
-OperationKey::OperationKey(ID *id,
- NodeType component_type,
- const char *component_name,
- const char *name,
- int name_tag)
- : id(id),
- component_type(component_type),
- component_name(component_name),
- opcode(OperationCode::OPERATION),
- name(name),
- name_tag(name_tag)
+OperationKey::OperationKey(
+ ID *id, NodeType component_type, const char *component_name, const char *name, int name_tag)
+ : id(id),
+ component_type(component_type),
+ component_name(component_name),
+ opcode(OperationCode::OPERATION),
+ name(name),
+ name_tag(name_tag)
{
}
-OperationKey::OperationKey(ID *id,
- NodeType component_type,
- OperationCode opcode)
- : id(id),
- component_type(component_type),
- component_name(""),
- opcode(opcode),
- name(""),
- name_tag(-1)
+OperationKey::OperationKey(ID *id, NodeType component_type, OperationCode opcode)
+ : id(id),
+ component_type(component_type),
+ component_name(""),
+ opcode(opcode),
+ name(""),
+ name_tag(-1)
{
}
@@ -131,26 +116,23 @@ OperationKey::OperationKey(ID *id,
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),
+ name(""),
+ name_tag(-1)
{
}
-OperationKey::OperationKey(ID *id,
- NodeType component_type,
- OperationCode opcode,
- const char *name,
- int name_tag)
- : id(id),
- component_type(component_type),
- component_name(""),
- opcode(opcode),
- name(name),
- name_tag(name_tag)
+OperationKey::OperationKey(
+ ID *id, NodeType component_type, OperationCode opcode, const char *name, int name_tag)
+ : id(id),
+ component_type(component_type),
+ component_name(""),
+ opcode(opcode),
+ name(name),
+ name_tag(name_tag)
{
}
@@ -160,63 +142,54 @@ OperationKey::OperationKey(ID *id,
OperationCode opcode,
const char *name,
int name_tag)
- : id(id),
- component_type(component_type),
- component_name(component_name),
- opcode(opcode),
- name(name),
- name_tag(name_tag)
+ : id(id),
+ component_type(component_type),
+ component_name(component_name),
+ opcode(opcode),
+ name(name),
+ name_tag(name_tag)
{
}
string OperationKey::identifier() const
{
- string result = string("OperationKey(");
- result += "type: " + string(nodeTypeAsString(component_type));
- result += ", component name: '" + string(component_name) + "'";
- result += ", operation code: " + string(operationCodeAsString(opcode));
- if (name[0] != '\0') {
- result += ", '" + string(name) + "'";
- }
- result += ")";
- return result;
+ string result = string("OperationKey(");
+ result += "type: " + string(nodeTypeAsString(component_type));
+ result += ", component name: '" + string(component_name) + "'";
+ result += ", operation code: " + string(operationCodeAsString(opcode));
+ if (name[0] != '\0') {
+ result += ", '" + string(name) + "'";
+ }
+ result += ")";
+ return result;
}
////////////////////////////////////////////////////////////////////////////////
// RNA path.
-RNAPathKey::RNAPathKey(ID *id, const char *path, RNAPointerSource source)
- : id(id),
- source(source)
+RNAPathKey::RNAPathKey(ID *id, const char *path, RNAPointerSource source) : id(id), source(source)
{
- /* Create ID pointer for root of path lookup. */
- PointerRNA id_ptr;
- RNA_id_pointer_create(id, &id_ptr);
- /* Try to resolve path. */
- int index;
- if (!RNA_path_resolve_full(&id_ptr, path, &ptr, &prop, &index)) {
- ptr = PointerRNA_NULL;
- prop = NULL;
- }
+ /* Create ID pointer for root of path lookup. */
+ PointerRNA id_ptr;
+ RNA_id_pointer_create(id, &id_ptr);
+ /* Try to resolve path. */
+ int index;
+ if (!RNA_path_resolve_full(&id_ptr, path, &ptr, &prop, &index)) {
+ ptr = PointerRNA_NULL;
+ prop = NULL;
+ }
}
-RNAPathKey::RNAPathKey(ID *id,
- const PointerRNA &ptr,
- PropertyRNA *prop,
- RNAPointerSource source)
- : id(id),
- ptr(ptr),
- prop(prop),
- source(source)
+RNAPathKey::RNAPathKey(ID *id, const PointerRNA &ptr, PropertyRNA *prop, RNAPointerSource source)
+ : id(id), ptr(ptr), prop(prop), source(source)
{
}
string RNAPathKey::identifier() const
{
- const char *id_name = (id) ? id->name : "<No ID>";
- const char *prop_name = (prop) ? RNA_property_identifier(prop) : "<No Prop>";
- return string("RnaPathKey(") + "id: " + id_name +
- ", prop: '" + prop_name + "')";
+ const char *id_name = (id) ? id->name : "<No ID>";
+ const char *prop_name = (prop) ? RNA_property_identifier(prop) : "<No Prop>";
+ return string("RnaPathKey(") + "id: " + id_name + ", prop: '" + prop_name + "')";
}
} // namespace DEG