Fix #137135: Grease Pencil Join not reporting non-active layer
Reported because this operator relies on an active layer, now report an error if this is not the case. Pull Request: https://projects.blender.org/blender/blender/pulls/137138
This commit is contained in:
committed by
Philipp Oeser
parent
566c3d0846
commit
2a36b613ca
@@ -9,6 +9,7 @@
|
||||
#include "BKE_attribute.hh"
|
||||
#include "BKE_context.hh"
|
||||
#include "BKE_grease_pencil.hh"
|
||||
#include "BKE_report.hh"
|
||||
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
@@ -433,6 +434,7 @@ wmOperatorStatus grease_pencil_join_selection_exec(bContext *C, wmOperator *op)
|
||||
scene->toolsettings, object);
|
||||
GreasePencil &grease_pencil = *static_cast<GreasePencil *>(object->data);
|
||||
if (!grease_pencil.has_active_layer()) {
|
||||
BKE_report(op->reports, RPT_ERROR, "No active layer");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user