Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <julian@blender.org>2022-03-29 16:36:02 +0300
committerJulian Eisel <julian@blender.org>2022-03-29 16:37:22 +0300
commit810e225c260dfc2eac9c6b8bfd3271066dc0224b (patch)
tree78a3fdf108c080787b4ad34e1522d4f07f686afc /source/blender/blenkernel/BKE_object.h
parent9ec77d709c3cd8cc6b210fd4c5fbf762bd18188e (diff)
Assets: Support automatic collection previews
Adds supports for collection previews that are rendered automatically when collections are marked as assets. (Or when preview rendering is triggered differently, e.g. through the //Refresh Data-Block Previews// operator). Idea in this patch is to create a collection instance empty outside of main for the collection, and then reuse the object rendering code to render the preview. This keeps things very simple and works just fine. Differential Revision: https://developer.blender.org/D14460 Reviewed by: Bastien Montagne
Diffstat (limited to 'source/blender/blenkernel/BKE_object.h')
-rw-r--r--source/blender/blenkernel/BKE_object.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 17d90e64459..4d699e1ff54 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -163,9 +163,12 @@ int BKE_object_visibility(const struct Object *ob, int dag_eval_mode);
/**
* More general add: creates minimum required data, but without vertices etc.
+ *
+ * \param bmain: The main to add the object to. May be null for #LIB_ID_CREATE_NO_MAIN behavior.
*/
-struct Object *BKE_object_add_only_object(struct Main *bmain, int type, const char *name)
- ATTR_NONNULL(1) ATTR_RETURNS_NONNULL;
+struct Object *BKE_object_add_only_object(struct Main *bmain,
+ int type,
+ const char *name) ATTR_RETURNS_NONNULL;
/**
* General add: to scene, with layer from area and default name.
*