[Bf-blender-cvs] [9137a4f03ce] blender-v3.3-release: Fix: new Grease Pencil layer not selected when added from the viewport
Amelie Fondevilla
noreply at git.blender.org
Thu Jan 12 22:26:57 CET 2023
Commit: 9137a4f03ce6571ae5ab8497ba35ffa7d8cc43e5
Author: Amelie Fondevilla
Date: Tue Jan 10 14:18:09 2023 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rB9137a4f03ce6571ae5ab8497ba35ffa7d8cc43e5
Fix: new Grease Pencil layer not selected when added from the viewport
When adding a new layer from the viewport, the newly created layer
is set as active, which is visible in the properties panel,
but the selection in the dopesheet was not updated accordingly,
due to a missing notifier which is added in this patch.
===================================================================
M source/blender/editors/gpencil/gpencil_data.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 340288b2d74..7897763ab58 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -237,6 +237,7 @@ static int gpencil_layer_add_exec(bContext *C, wmOperator *op)
ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE);
}
WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, NULL);
return OPERATOR_FINISHED;
}
More information about the Bf-blender-cvs
mailing list