Fix T64058: GPencil - Ensure object mode if linking from a library
If the linked or append grease pencil object was added to the scene, the original file could have the datablock status in a different mode, so it's necessary to be sure is in object mode. Differential Revision: https://developer.blender.org/D6759
This commit is contained in:
@@ -7227,6 +7227,14 @@ static void direct_link_gpencil(FileData *fd, bGPdata *gpd)
|
||||
gpd->adt = newdataadr(fd, gpd->adt);
|
||||
direct_link_animdata(fd, gpd->adt);
|
||||
|
||||
/* If linking from a library ensure full objectmode. */
|
||||
if (gpd->id.lib != NULL) {
|
||||
gpd->flag &= ~GP_DATA_STROKE_PAINTMODE;
|
||||
gpd->flag &= ~GP_DATA_STROKE_EDITMODE;
|
||||
gpd->flag &= ~GP_DATA_STROKE_SCULPTMODE;
|
||||
gpd->flag &= ~GP_DATA_STROKE_WEIGHTMODE;
|
||||
}
|
||||
|
||||
/* init stroke buffer */
|
||||
gpd->runtime.sbuffer = NULL;
|
||||
gpd->runtime.sbuffer_used = 0;
|
||||
|
||||
Reference in New Issue
Block a user