瀏覽代碼

docs: Update documentation about utility functions for undo/redo

Ford Smith 4 年之前
父節點
當前提交
d0dfae6a3c
共有 2 個文件被更改,包括 49 次插入2 次删除
  1. 36 2
      docs/sphinx/reference-scenes.rst
  2. 13 0
      docs/sphinx/reference-sources.rst

+ 36 - 2
docs/sphinx/reference-scenes.rst

@@ -298,9 +298,37 @@ 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.
+
+---------------------
+
+.. 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
+   normally be used. It can cause errors within obs.
+
+---------------------
+
 .. function:: int64_t obs_sceneitem_get_id(const obs_sceneitem_t *item)
 
-   :return: The unique numeric identifier of the scene item.
+   This is a dangerous function and should not
+   normally be used. It can cause errors within obs.
+
+   :return: Gets the unique numeric identifier of the scene item.
+
+---------------------
+
+.. function:: obs_data_t *obs_scene_save_transform_states(obs_scene_t *scene, bool all_items)
+.. function:: void obs_scene_load_transform_states(oconst char *states)
+
+   Saves all the transformation states for the sceneitms in scene. When all_items is false, it
+   will only save selected items
+
+   :return: Data containing transformation states for all* sceneitems in scene
 
 ---------------------
 
@@ -354,7 +382,13 @@ Scene Item Functions
 
 .. function:: void obs_sceneitem_set_order_position(obs_sceneitem_t *item, int position)
 
-   Changes the scene item's order index.
+   Changes the sceneitem's order index.
+
+---------------------
+
+.. function:: int obs_sceneitem_get_order_position(obs_sceneitem_t *item)
+
+   :return: Gets position of sceneitem in its scene.
 
 ---------------------
 

+ 13 - 0
docs/sphinx/reference-sources.rst

@@ -753,6 +753,19 @@ General Source Functions
 
 ---------------------
 
+.. function:: void obs_source_set_hidden(obs_source_t *source, bool hidden)
+
+   Sets the hidden flag that determines whether it should be hidden from the user.
+   Used when the source is still alive but should not be referenced.
+
+---------------------
+
+.. function:: bool obs_source_is_hidden(obs_source_t *source)
+
+  :return: *true* if source's 'hidden' is set true
+
+---------------------
+
 .. function:: uint32_t obs_source_get_output_flags(const obs_source_t *source)
               uint32_t obs_get_source_output_flags(const char *id)