diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-02-19 17:10:19 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-02-19 17:12:46 +0300 |
commit | a16c0ebc59033b0b26b8e1d832a28739cfbd9ecd (patch) | |
tree | 86402e2429eefb18ed1b91d72400cdd358bf1d38 /source | |
parent | 73079e01fd421a4a1d7b1518334985479fdf744f (diff) |
Fix warning after fix for crash on renaming group collections
Warning introduced on: 73079e01fd4.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_collection.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/collection.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_layer.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/BKE_collection.h b/source/blender/blenkernel/BKE_collection.h index 618e60550b7..3bf14346ccb 100644 --- a/source/blender/blenkernel/BKE_collection.h +++ b/source/blender/blenkernel/BKE_collection.h @@ -51,7 +51,7 @@ bool BKE_collection_remove(struct ID *owner_id, struct SceneCollection *sc); void BKE_collection_copy_data(struct SceneCollection *sc_dst, struct SceneCollection *sc_src, const int flag); struct SceneCollection *BKE_collection_duplicate(struct ID *owner_id, struct SceneCollection *scene_collection); struct SceneCollection *BKE_collection_master(const struct ID *owner_id); -void BKE_collection_rename(const struct Scene *scene, struct SceneCollection *sc, const char *name); +void BKE_collection_rename(const struct ID *owner_id, struct SceneCollection *sc, const char *name); void BKE_collection_master_free(struct ID *owner_id, const bool do_id_user); bool BKE_collection_object_add(const struct ID *owner_id, struct SceneCollection *sc, struct Object *object); void BKE_collection_object_add_from(struct Scene *scene, struct Object *ob_src, struct Object *ob_dst); diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 2f392271157..c92096efd07 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -94,7 +94,7 @@ static SceneCollection *collection_add(ID *owner_id, SceneCollection *sc_parent, } BLI_addtail(&sc_parent->scene_collections, sc); - BKE_collection_rename((Scene *)owner_id, sc, name); + BKE_collection_rename(owner_id, sc, name); if (name != name_custom) { MEM_freeN((char *)name); @@ -345,9 +345,9 @@ static void collection_rename(const ID *owner_id, SceneCollection *sc, const cha BLI_uniquename(&sc_parent->scene_collections, sc, DATA_("Collection"), '.', offsetof(SceneCollection, name), sizeof(sc->name)); } -void BKE_collection_rename(const Scene *scene, SceneCollection *sc, const char *name) +void BKE_collection_rename(const ID *owner_id, SceneCollection *sc, const char *name) { - collection_rename(&scene->id, sc, name); + collection_rename(owner_id, sc, name); } /** diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 558b963a768..7a1c1710a87 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -97,7 +97,7 @@ static void rna_SceneCollection_name_set(PointerRNA *ptr, const char *value) { Scene *scene = (Scene *)ptr->id.data; SceneCollection *sc = (SceneCollection *)ptr->data; - BKE_collection_rename(scene, sc, value); + BKE_collection_rename(&scene->id, sc, value); } static PointerRNA rna_SceneCollection_objects_get(CollectionPropertyIterator *iter) @@ -655,9 +655,9 @@ static int rna_LayerCollection_name_length(PointerRNA *ptr) static void rna_LayerCollection_name_set(PointerRNA *ptr, const char *value) { - Scene *scene = (Scene *)ptr->id.data; + ID *owner_id = (ID *)ptr->id.data; SceneCollection *sc = ((LayerCollection *)ptr->data)->scene_collection; - BKE_collection_rename(scene, sc, value); + BKE_collection_rename(owner_id, sc, value); } static PointerRNA rna_LayerCollection_objects_get(CollectionPropertyIterator *iter) |