Removed `BKE_object_is_animated()`
The function isn't used anywhere, and it's deceptively returning false negatives. For example, `modifier_dependsOnTime()` will return `false` for hook modifiers, even when the hook target is animated. Querying the depsgraph for dependency on the time source would be a better approach.
This commit is contained in:
parent
75808620ce
commit
a018a7fb0d
|
@ -345,7 +345,6 @@ bool BKE_object_shapekey_free(struct Main *bmain, struct Object *ob);
|
|||
bool BKE_object_flag_test_recursive(const struct Object *ob, short flag);
|
||||
|
||||
bool BKE_object_is_child_recursive(const struct Object *ob_parent, const struct Object *ob_child);
|
||||
bool BKE_object_is_animated(struct Scene *scene, struct Object *ob);
|
||||
|
||||
/* return ModifierMode flag */
|
||||
int BKE_object_is_modified(struct Scene *scene, struct Object *ob);
|
||||
|
|
|
@ -3826,7 +3826,7 @@ static bool constructive_modifier_is_deform_modified(ModifierData *md)
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool modifiers_has_animation_check(Object *ob)
|
||||
static bool modifiers_has_animation_check(const Object *ob)
|
||||
{
|
||||
/* TODO(sergey): This is a bit code duplication with depsgraph, but
|
||||
* would be nicer to solve this as a part of new dependency graph
|
||||
|
@ -3898,21 +3898,6 @@ int BKE_object_is_deform_modified(Scene *scene, Object *ob)
|
|||
return flag;
|
||||
}
|
||||
|
||||
/* See if an object is using an animated modifier */
|
||||
bool BKE_object_is_animated(Scene *scene, Object *ob)
|
||||
{
|
||||
ModifierData *md;
|
||||
VirtualModifierData virtualModifierData;
|
||||
|
||||
for (md = modifiers_getVirtualModifierList(ob, &virtualModifierData); md; md = md->next) {
|
||||
if (modifier_dependsOnTime(md) && (modifier_isEnabled(scene, md, eModifierMode_Realtime) ||
|
||||
modifier_isEnabled(scene, md, eModifierMode_Render))) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Return the number of scenes using (instantiating) that object in their collections. */
|
||||
int BKE_object_scenes_users_get(Main *bmain, Object *ob)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue