diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:19:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-07 09:38:48 +0300 |
commit | ffc4c126f5416b04a01653e7a03451797b98aba4 (patch) | |
tree | ac63d70d33aae5ab1666c9c2f62058c9c1eebd5c /source/blender/blenkernel/BKE_context.h | |
parent | f159d49f56cedccd509ee93f5a5fb51f4f39eeb8 (diff) |
Cleanup: move public doc-strings into headers for 'blenkernel'
- Added space below non doc-string comments to make it clear
these aren't comments for the symbols directly below them.
- Use doxy sections for some headers.
- Minor improvements to doc-strings.
Ref T92709
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r-- | source/blender/blenkernel/BKE_context.h | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index b0705ff411f..ac864c7f82c 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -247,6 +247,12 @@ PointerRNA CTX_data_pointer_get_type_silent(const bContext *C, const char *member, StructRNA *type); ListBase CTX_data_collection_get(const bContext *C, const char *member); +/** + * \param C: Context. + * \param use_store: Use 'C->wm.store'. + * \param use_rna: Use Include the properties from 'RNA_Context'. + * \param use_all: Don't skip values (currently only "scene"). + */ ListBase CTX_data_dir_get_ex(const bContext *C, const bool use_store, const bool use_rna, @@ -297,6 +303,13 @@ int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBas struct Main *CTX_data_main(const bContext *C); struct Scene *CTX_data_scene(const bContext *C); +/** + * This is tricky. Sometimes the user overrides the render_layer + * but not the scene_collection. In this case what to do? + * + * If the scene_collection is linked to the #ViewLayer we use it. + * Otherwise we fallback to the active one of the #ViewLayer. + */ struct LayerCollection *CTX_data_layer_collection(const bContext *C); struct Collection *CTX_data_collection(const bContext *C); struct ViewLayer *CTX_data_view_layer(const bContext *C); @@ -367,28 +380,34 @@ struct AssetHandle CTX_wm_asset_handle(const bContext *C, bool *r_is_valid); bool CTX_wm_interface_locked(const bContext *C); -/* Gets pointer to the dependency graph. +/** + * Gets pointer to the dependency graph. * If it doesn't exist yet, it will be allocated. * * The result dependency graph is NOT guaranteed to be up-to-date neither from relation nor from * evaluated data points of view. * - * NOTE: Can not be used if access to a fully evaluated datablock is needed. */ + * \note Can not be used if access to a fully evaluated data-block is needed. + */ struct Depsgraph *CTX_data_depsgraph_pointer(const bContext *C); -/* Get dependency graph which is expected to be fully evaluated. +/** + * Get dependency graph which is expected to be fully evaluated. * * In the release builds it is the same as CTX_data_depsgraph_pointer(). In the debug builds extra * sanity checks are done. Additionally, this provides more semantic meaning to what is exactly - * expected to happen. */ + * expected to happen. + */ struct Depsgraph *CTX_data_expect_evaluated_depsgraph(const bContext *C); -/* Gets fully updated and evaluated dependency graph. +/** + * Gets fully updated and evaluated dependency graph. * * All the relations and evaluated objects are guaranteed to be up to date. * - * NOTE: Will be expensive if there are relations or objects tagged for update. - * NOTE: If there are pending updates depsgraph hooks will be invoked. */ + * \note Will be expensive if there are relations or objects tagged for update. + * \note If there are pending updates depsgraph hooks will be invoked. + */ struct Depsgraph *CTX_data_ensure_evaluated_depsgraph(const bContext *C); /* Will Return NULL if depsgraph is not allocated yet. |