Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_ID.c')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index f1c125fcbb9..320476c22b1 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -523,16 +523,12 @@ static ID *rna_ID_evaluated_get(ID *id, struct Depsgraph *depsgraph)
static ID *rna_ID_copy(ID *id, Main *bmain)
{
- ID *newid;
+ ID *newid = BKE_id_copy(bmain, id);
- if (BKE_id_copy(bmain, id, &newid)) {
- if (newid != NULL) {
- id_us_min(newid);
- }
- return newid;
+ if (newid != NULL) {
+ id_us_min(newid);
}
-
- return NULL;
+ return newid;
}
static ID *rna_ID_override_create(ID *id, Main *bmain, bool remap_local_usages)