Rename BKE_layer_collection_active > BKE_layer_collection_get_active
This commit is contained in:
@@ -830,7 +830,7 @@ static void import_endjob(void *user_data)
|
||||
|
||||
BKE_scene_layer_base_deselect_all(sl);
|
||||
|
||||
lc = BKE_layer_collection_active(sl);
|
||||
lc = BKE_layer_collection_get_active(sl);
|
||||
if (lc == NULL) {
|
||||
BLI_assert(BLI_listbase_count_ex(&sl->layer_collections, 1) == 0);
|
||||
/* when there is no collection linked to this SceneLayer, create one */
|
||||
|
||||
@@ -78,7 +78,7 @@ void BKE_scene_layer_base_select(struct SceneLayer *sl, struct Base *selbase);
|
||||
|
||||
void BKE_layer_collection_free(struct SceneLayer *sl, struct LayerCollection *lc);
|
||||
|
||||
struct LayerCollection *BKE_layer_collection_active(struct SceneLayer *sl);
|
||||
struct LayerCollection *BKE_layer_collection_get_active(struct SceneLayer *sl);
|
||||
struct LayerCollection *BKE_layer_collection_get_active_ensure(struct Scene *scene, struct SceneLayer *sl);
|
||||
|
||||
int BKE_layer_collection_count(struct SceneLayer *sl);
|
||||
|
||||
@@ -931,7 +931,7 @@ LayerCollection *CTX_data_layer_collection(const bContext *C)
|
||||
}
|
||||
|
||||
/* fallback */
|
||||
return BKE_layer_collection_active(sl);
|
||||
return BKE_layer_collection_get_active(sl);
|
||||
}
|
||||
|
||||
SceneCollection *CTX_data_scene_collection(const bContext *C)
|
||||
|
||||
@@ -364,7 +364,7 @@ static LayerCollection *collection_from_index(ListBase *lb, const int number, in
|
||||
/**
|
||||
* Get the active collection
|
||||
*/
|
||||
LayerCollection *BKE_layer_collection_active(SceneLayer *sl)
|
||||
LayerCollection *BKE_layer_collection_get_active(SceneLayer *sl)
|
||||
{
|
||||
int i = 0;
|
||||
return collection_from_index(&sl->layer_collections, sl->active_collection, &i);
|
||||
@@ -377,7 +377,7 @@ LayerCollection *BKE_layer_collection_active(SceneLayer *sl)
|
||||
*/
|
||||
LayerCollection *BKE_layer_collection_get_active_ensure(Scene *scene, SceneLayer *sl)
|
||||
{
|
||||
LayerCollection *lc = BKE_layer_collection_active(sl);
|
||||
LayerCollection *lc = BKE_layer_collection_get_active(sl);
|
||||
|
||||
if (lc == NULL) {
|
||||
BLI_assert(BLI_listbase_is_empty(&sl->layer_collections));
|
||||
|
||||
@@ -568,7 +568,7 @@ static int buttons_context_path_collection(const bContext *C, ButsContextPath *p
|
||||
}
|
||||
|
||||
SceneLayer *sl = CTX_data_scene_layer(C);
|
||||
LayerCollection *sc = BKE_layer_collection_active(sl);
|
||||
LayerCollection *sc = BKE_layer_collection_get_active(sl);
|
||||
|
||||
if (sc) {
|
||||
RNA_pointer_create(NULL, &RNA_LayerCollection, sc, &path->ptr[path->len]);
|
||||
|
||||
@@ -2856,7 +2856,7 @@ static void rna_LayerCollections_active_collection_index_range(
|
||||
static PointerRNA rna_LayerCollections_active_collection_get(PointerRNA *ptr)
|
||||
{
|
||||
SceneLayer *sl = (SceneLayer *)ptr->data;
|
||||
LayerCollection *lc = BKE_layer_collection_active(sl);
|
||||
LayerCollection *lc = BKE_layer_collection_get_active(sl);
|
||||
return rna_pointer_inherit_refine(ptr, &RNA_LayerCollection, lc);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user