mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-08-28 17:42:28 +08:00
libobs: Remove obs_scene_sceneitem_from_source
Use obs_scene_enum_items to find sources instead.
Deprecated since 4dd3cf6758 (31.0).
This commit is contained in:
committed by
Ryan Foster
parent
163493d1e1
commit
d283181c83
@@ -320,19 +320,6 @@ Scene Item Functions
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: obs_sceneitem_t *obs_scene_sceneitem_from_source(obs_scene_t *scene, obs_source_t *source)
|
||||
|
||||
This will add a reference to the sceneitem.
|
||||
|
||||
:return: The sceneitem associated with a source in a scene. Returns NULL if not found.
|
||||
|
||||
.. deprecated:: 31.0
|
||||
This function is problematic because there can be multiple items of the same source in a scene.
|
||||
In that case, which of those this function will return is undefined.
|
||||
If this is the behavior you need, manually use :c:func:`obs_scene_enum_items` instead.
|
||||
|
||||
---------------------
|
||||
|
||||
.. function:: void obs_sceneitem_set_id(obs_sceneitem_t *item);
|
||||
|
||||
Sets the unique numeric identifier of the sceneitem. This is dangerous function and should not
|
||||
|
||||
@@ -2185,13 +2185,6 @@ bool check_sceneitem_exists(obs_scene_t *scene, obs_sceneitem_t *item, void *vp_
|
||||
return true;
|
||||
}
|
||||
|
||||
obs_sceneitem_t *obs_scene_sceneitem_from_source(obs_scene_t *scene, obs_source_t *source)
|
||||
{
|
||||
struct sceneitem_check check = {source, NULL};
|
||||
obs_scene_enum_items(scene, check_sceneitem_exists, (void *)&check);
|
||||
return check.item_out;
|
||||
}
|
||||
|
||||
obs_sceneitem_t *obs_scene_find_sceneitem_by_id(obs_scene_t *scene, int64_t id)
|
||||
{
|
||||
struct obs_scene_item *item;
|
||||
|
||||
@@ -1671,9 +1671,6 @@ EXPORT void obs_sceneitem_save(obs_sceneitem_t *item, obs_data_array_t *arr);
|
||||
/** Set the ID of a sceneitem */
|
||||
EXPORT void obs_sceneitem_set_id(obs_sceneitem_t *sceneitem, int64_t id);
|
||||
|
||||
/** Tries to find the sceneitem of the source in a given scene. Returns NULL if not found */
|
||||
OBS_DEPRECATED EXPORT obs_sceneitem_t *obs_scene_sceneitem_from_source(obs_scene_t *scene, obs_source_t *source);
|
||||
|
||||
/** Save all the transform states for a current scene's sceneitems */
|
||||
EXPORT obs_data_t *obs_scene_save_transform_states(obs_scene_t *scene, bool all_items);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user