diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 06:45:14 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 06:56:22 +0300 |
commit | c695523687ef5bd43f50b6d057de785fad454be8 (patch) | |
tree | c404ad28366dcffb8b94b81ca9ba8d71664a6cd8 /source/blender/editors/include/ED_object.h | |
parent | d268a43b25f7655db385fd3664301810bdef0c14 (diff) |
Fix OBJECT_OT_data_instance_add creating empty data-blocks
ED_object_add_type creates empty object data, add
ED_object_add_type_with_obdata which can take existing object data.
Diffstat (limited to 'source/blender/editors/include/ED_object.h')
-rw-r--r-- | source/blender/editors/include/ED_object.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index afaf11f5a8e..ed5cbd43cb3 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -289,13 +289,21 @@ bool ED_object_add_generic_get_opts(struct bContext *C, unsigned short *local_view_bits, bool *is_view_aligned); +struct Object *ED_object_add_type_with_obdata(struct bContext *C, + const int type, + const char *name, + const float loc[3], + const float rot[3], + const bool enter_editmode, + const ushort local_view_bits, + struct ID *obdata); struct Object *ED_object_add_type(struct bContext *C, - int type, + const int type, const char *name, const float loc[3], const float rot[3], - bool enter_editmode, - unsigned short local_view_bits) + const bool enter_editmode, + const unsigned short local_view_bits) ATTR_NONNULL(1) ATTR_RETURNS_NONNULL; void ED_object_single_user(struct Main *bmain, struct Scene *scene, struct Object *ob); |