diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-19 21:37:00 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-19 21:39:23 +0300 |
commit | 12b621059a6f1337e8ae8fdd9533e7808225e71e (patch) | |
tree | d04a2fddc28152235191e2d93884f4d143410d85 /source/blender/depsgraph/intern | |
parent | 0b7854323d41f3a1a55a40ddf76a90e2017a0784 (diff) |
Cleanup/refactor: remove BKE_idcode, in favour of BKE_idtype.
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
Diffstat (limited to 'source/blender/depsgraph/intern')
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 672cf29ac0e..2912d3aecd7 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -76,7 +76,7 @@ extern "C" { #include "BKE_fcurve.h" #include "BKE_gpencil.h" #include "BKE_gpencil_modifier.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_image.h" #include "BKE_key.h" #include "BKE_lattice.h" diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index 2ce8f1aa071..6d88782d68c 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -37,7 +37,7 @@ extern "C" { #include "BKE_global.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_scene.h" } @@ -135,7 +135,7 @@ IDNode *Depsgraph::add_id_node(ID *id, ID *id_cow_hint) BLI_ghash_insert(id_hash, id, id_node); id_nodes.push_back(id_node); - id_type_exist[BKE_idcode_to_index(GS(id->name))] = 1; + id_type_exist[BKE_idtype_idcode_to_index(GS(id->name))] = 1; } return id_node; } diff --git a/source/blender/depsgraph/intern/depsgraph_query.cc b/source/blender/depsgraph/intern/depsgraph_query.cc index 1f1e2482094..6e85b2e8bd9 100644 --- a/source/blender/depsgraph/intern/depsgraph_query.cc +++ b/source/blender/depsgraph/intern/depsgraph_query.cc @@ -34,7 +34,7 @@ extern "C" { #include "BKE_action.h" // XXX: BKE_pose_channel_find_name #include "BKE_customdata.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_main.h" } /* extern "C" */ @@ -78,7 +78,7 @@ float DEG_get_ctime(const Depsgraph *graph) bool DEG_id_type_updated(const Depsgraph *graph, short id_type) { const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(graph); - return deg_graph->id_type_updated[BKE_idcode_to_index(id_type)] != 0; + return deg_graph->id_type_updated[BKE_idtype_idcode_to_index(id_type)] != 0; } bool DEG_id_type_any_updated(const Depsgraph *graph) @@ -98,7 +98,7 @@ bool DEG_id_type_any_updated(const Depsgraph *graph) bool DEG_id_type_any_exists(const Depsgraph *depsgraph, short id_type) { const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(depsgraph); - return deg_graph->id_type_exist[BKE_idcode_to_index(id_type)] != 0; + return deg_graph->id_type_exist[BKE_idtype_idcode_to_index(id_type)] != 0; } uint32_t DEG_get_eval_flags_for_id(const Depsgraph *graph, ID *id) diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 2c8f89b99f9..3b0782cd5d6 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -46,7 +46,7 @@ extern "C" { #include "BKE_animsys.h" #include "BKE_global.h" -#include "BKE_idcode.h" +#include "BKE_idtype.h" #include "BKE_node.h" #include "BKE_scene.h" #include "BKE_workspace.h" @@ -777,7 +777,7 @@ void DEG_graph_id_type_tag(Depsgraph *depsgraph, short id_type) DEG_graph_id_type_tag(depsgraph, ID_WO); DEG_graph_id_type_tag(depsgraph, ID_SCE); } - const int id_type_index = BKE_idcode_to_index(id_type); + const int id_type_index = BKE_idtype_idcode_to_index(id_type); DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(depsgraph); deg_graph->id_type_updated[id_type_index] = 1; } |