Changeset View
Standalone View
source/blender/blenkernel/BKE_collection.h
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
| } CollectionParent; | } CollectionParent; | ||||
| /* Collections */ | /* Collections */ | ||||
| struct Collection *BKE_collection_add(struct Main *bmain, struct Collection *parent, const char *name); | struct Collection *BKE_collection_add(struct Main *bmain, struct Collection *parent, const char *name); | ||||
| void BKE_collection_free(struct Collection *collection); | void BKE_collection_free(struct Collection *collection); | ||||
| bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bool hierarchy); | bool BKE_collection_delete(struct Main *bmain, struct Collection *collection, bool hierarchy); | ||||
| struct Collection *BKE_collection_copy(struct Main *bmain, struct Collection *parent, struct Collection *collection); | struct Collection *BKE_collection_copy(struct Main *bmain, struct Collection *parent, struct Collection *collection); | ||||
| struct Collection *BKE_collection_copy_master(struct Main *bmain, struct Collection *collection, const int flag); | |||||
| void BKE_collection_copy_data(struct Main *bmain, struct Collection *collection_dst, const struct Collection *collection_src, const int flag); | void BKE_collection_copy_data(struct Main *bmain, struct Collection *collection_dst, const struct Collection *collection_src, const int flag); | ||||
mont29: Not related to this patch, but those tree should really be put below 'generic ID API' that are… | |||||
Not Done Inline ActionsNaming conventions for bools, something like do_hierarchy and keep_linked e.g. ? mont29: Naming conventions for bools, something like `do_hierarchy` and `keep_linked` e.g. ? | |||||
Not Done Inline ActionsIn fact, think I would rather see those renamed to BKE_collection_duplicate()/_duplicate_ex(). Am becoming a bit tired of seeing copy used for all kind of different things, would like to keep it for 'basic' regular ID copying, and any more involved code doing some deep-copy and such would then use duplicate instead. mont29: In fact, think I would rather see those renamed to `BKE_collection_duplicate()`/`_duplicate_ex… | |||||
Not Done Inline ActionsIn fact for the linked guy, I’d rather see it logically reversed, and named something like do_deep_copy or something, because 'linked' behavior should remain default one in general, doing deep-copy being some 'less usual' behavior. mont29: In fact for the `linked` guy, I’d rather see it logically reversed, and named something like… | |||||
| void BKE_collection_copy_full(struct Main *bmain, struct Collection *collection); | |||||
| void BKE_collection_make_local(struct Main *bmain, struct Collection *collection, const bool lib_local); | void BKE_collection_make_local(struct Main *bmain, struct Collection *collection, const bool lib_local); | ||||
Not Done Inline ActionsNot implemented, good oportunity to nuke it and replace its only call (in full scene copying) by one to BKE_collection_copy_ex I guess? mont29: Not implemented, good oportunity to nuke it and replace its only call (in full scene copying)… | |||||
Done Inline ActionsI would rather we do it afterwards. Scene copying is working now, so just remove this and call BKE_collection_duplicate will likely introduce issues. dfelinto: I would rather we do it afterwards. Scene copying is working now, so just remove this and call… | |||||
| struct Collection *BKE_collection_duplicate(struct Main *bmain, struct Collection *parent, struct Collection *collection, const bool do_hierarchy, const bool do_deep_copy); | |||||
| struct Collection *BKE_collection_copy_master(struct Main *bmain, struct Collection *collection, const int flag); | |||||
| void BKE_collection_copy_full(struct Main *bmain, struct Collection *collection); | |||||
Not Done Inline ActionsThat one should not have been renamed, we have BKE_xxx_copy for nearly all our ID types I think, let’s keep it consistent: copy implies "shallow", duplicate implies "[some] deep copy". mont29: That one should not have been renamed, we have `BKE_xxx_copy` for nearly all our ID types I… | |||||
| /* Master Collection for Scene */ | /* Master Collection for Scene */ | ||||
| struct Collection *BKE_collection_master(const struct Scene *scene); | struct Collection *BKE_collection_master(const struct Scene *scene); | ||||
| struct Collection *BKE_collection_master_add(void); | struct Collection *BKE_collection_master_add(void); | ||||
| /* Collection Objects */ | /* Collection Objects */ | ||||
| bool BKE_collection_has_object(struct Collection *collection, struct Object *ob); | bool BKE_collection_has_object(struct Collection *collection, struct Object *ob); | ||||
| ▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines | |||||
Not related to this patch, but those tree should really be put below 'generic ID API' that are _copy_data() and _make_local(), with an empty line in between...