mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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).
This commit is contained in:
parent
b5022385d1
commit
e6dd009386
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue