Depsgraph: minor optimization in order of checks
Checking BKE_image_user_id_has_animation loops over ID users which never needs to run for material & world data-blocks.
This commit is contained in:
parent
3d132ead50
commit
ae1f8315f7
|
@ -1085,7 +1085,7 @@ void DepsgraphNodeBuilder::build_animation_images(ID *id)
|
|||
* tree. */
|
||||
const bool can_have_gpu_material = ELEM(GS(id->name), ID_MA, ID_WO);
|
||||
|
||||
if (BKE_image_user_id_has_animation(id) || can_have_gpu_material) {
|
||||
if (can_have_gpu_material || BKE_image_user_id_has_animation(id)) {
|
||||
ID *id_cow = get_cow_id(id);
|
||||
add_operation_node(
|
||||
id,
|
||||
|
|
|
@ -1423,7 +1423,7 @@ void DepsgraphRelationBuilder::build_animation_images(ID *id)
|
|||
const bool can_have_gpu_material = ELEM(GS(id->name), ID_MA, ID_WO);
|
||||
|
||||
/* TODO: can we check for existence of node for performance? */
|
||||
if (BKE_image_user_id_has_animation(id) || can_have_gpu_material) {
|
||||
if (can_have_gpu_material || BKE_image_user_id_has_animation(id)) {
|
||||
OperationKey image_animation_key(
|
||||
id, NodeType::IMAGE_ANIMATION, OperationCode::IMAGE_ANIMATION);
|
||||
TimeSourceKey time_src_key;
|
||||
|
|
Loading…
Reference in New Issue