Bugfix T42549: Grease pencil layers are not scene-specific for "full copy scenes"
This commit is contained in:
parent
731f3476b7
commit
f425de9341
Notes:
blender-bot
2023-02-14 09:50:42 +01:00
Referenced by issue #42549, Grease pencil layers are not scene-specific for "full-copy scenes
|
@ -70,6 +70,7 @@
|
|||
#include "BKE_fcurve.h"
|
||||
#include "BKE_freestyle.h"
|
||||
#include "BKE_global.h"
|
||||
#include "BKE_gpencil.h"
|
||||
#include "BKE_group.h"
|
||||
#include "BKE_idprop.h"
|
||||
#include "BKE_image.h"
|
||||
|
@ -308,6 +309,19 @@ Scene *BKE_scene_copy(Scene *sce, int type)
|
|||
BKE_sequence_base_dupli_recursive(sce, scen, &scen->ed->seqbase, &sce->ed->seqbase, SEQ_DUPE_ALL);
|
||||
}
|
||||
}
|
||||
|
||||
/* grease pencil */
|
||||
if (scen->gpd) {
|
||||
if (type == SCE_COPY_FULL) {
|
||||
scen->gpd = gpencil_data_duplicate(scen->gpd, false);
|
||||
}
|
||||
else if (type == SCE_COPY_EMPTY) {
|
||||
scen->gpd = NULL;
|
||||
}
|
||||
else {
|
||||
id_us_plus((ID *)scen->gpd);
|
||||
}
|
||||
}
|
||||
|
||||
return scen;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue