GPv3: Conversion: Copy over FakeUser and IDProperties.
When creating a new GreasePencil ID from an existing bGPdata legacy ID, also copy FakeUser flag, and the IDProperties.
This commit is contained in:
@@ -391,6 +391,15 @@ void legacy_gpencil_to_grease_pencil(Main &bmain, GreasePencil &grease_pencil, b
|
||||
{
|
||||
using namespace blender::bke::greasepencil;
|
||||
|
||||
if (gpd.flag & LIB_FAKEUSER) {
|
||||
id_fake_user_set(&grease_pencil.id);
|
||||
}
|
||||
|
||||
BLI_assert(!grease_pencil.id.properties);
|
||||
if (gpd.id.properties) {
|
||||
grease_pencil.id.properties = IDP_CopyProperty(gpd.id.properties);
|
||||
}
|
||||
|
||||
int num_drawings = 0;
|
||||
LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd.layers) {
|
||||
num_drawings += BLI_listbase_count(&gpl->frames);
|
||||
|
||||
Reference in New Issue
Block a user