提交 e6dd0093 编写于 作者: J jp9000

libobs: Add function to force a sceneitem transform update

Useful when you need to modify transform properties of group sub-items
and have the transform available immediately (group sub-items always
automatically defer their transform update to the next frame).
上级 b5022385
......@@ -2885,3 +2885,12 @@ void obs_sceneitem_group_enum_items(obs_sceneitem_t *group,
if (scene)
obs_scene_enum_items(scene, callback, param);
}
void obs_sceneitem_force_update_transform(obs_sceneitem_t *item)
{
if (!item)
return;
if (os_atomic_set_bool(&item->update_transform, false))
update_item_transform(item, false);
}
......@@ -1427,6 +1427,8 @@ EXPORT void obs_sceneitem_set_scale_filter(obs_sceneitem_t *item,
EXPORT enum obs_scale_type obs_sceneitem_get_scale_filter(
obs_sceneitem_t *item);
EXPORT void obs_sceneitem_force_update_transform(obs_sceneitem_t *item);
EXPORT void obs_sceneitem_defer_update_begin(obs_sceneitem_t *item);
EXPORT void obs_sceneitem_defer_update_end(obs_sceneitem_t *item);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册