diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-21 08:44:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-21 08:57:53 +0300 |
commit | 063c4e467da3d926fc6447418e3f04fded9c051f (patch) | |
tree | 700ae5aea6d2d0d33724a3478ecfd2e2683e9d5e /source/blender/blenloader/BLO_readfile.h | |
parent | 2a047fadc021539d51f4cb37995f9bbc33d4b9f5 (diff) |
Cleanup: de-duplicate function to instantiate objects
De-duplicates wm_append_loose_data_instantiate_object_base_instance_init
and object_base_instance_init.
Add BLO_object_instantiate_object_base_instance_init which also adds to
a collection since all callers did this.
Diffstat (limited to 'source/blender/blenloader/BLO_readfile.h')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index d2631840f74..4e1b2c68bd9 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -32,11 +32,13 @@ extern "C" { struct BHead; struct BlendThumbnail; +struct Collection; struct FileData; struct LinkNode; struct ListBase; struct Main; struct MemFile; +struct Object; struct ReportList; struct Scene; struct UserDef; @@ -333,6 +335,14 @@ void BLO_sanitize_experimental_features_userpref_blend(struct UserDef *userdef); struct BlendThumbnail *BLO_thumbnail_from_file(const char *filepath); +void BLO_object_instantiate_object_base_instance_init(struct Main *bmain, + struct Collection *collection, + struct Object *ob, + struct ViewLayer *view_layer, + const struct View3D *v3d, + const int flag, + bool set_active); + /* datafiles (generated theme) */ extern const struct bTheme U_theme_default; extern const struct UserDef U_default; |