69 if (gpd_ptr ==
nullptr) {
105 ot->
name =
"Annotation Add New";
106 ot->
idname =
"GPENCIL_OT_annotation_add";
123 if ((gpd_ptr !=
nullptr) && (*gpd_ptr !=
nullptr)) {
130 return (gpd_ptr && *gpd_ptr);
138 if (gpd_ptr ==
nullptr) {
157 ot->
name =
"Annotation Unlink";
158 ot->
idname =
"GPENCIL_OT_data_unlink";
159 ot->
description =
"Unlink active Annotation data-block";
181 if (gpd_ptr ==
nullptr) {
186 if (*gpd_ptr ==
nullptr) {
213 ot->
name =
"Add New Annotation Layer";
214 ot->
idname =
"GPENCIL_OT_layer_annotation_add";
215 ot->
description =
"Add new Annotation layer or note for the active data-block";
231 if (
ELEM(
nullptr, gpd, gpl)) {
259 if (gpd->
layers.is_empty()) {
261 if (gpd_ptr !=
nullptr) {
285 return (gpl !=
nullptr);
291 ot->
name =
"Remove Annotation Layer";
292 ot->
idname =
"GPENCIL_OT_layer_annotation_remove";
293 ot->
description =
"Remove active Annotation layer";
316 if (
ELEM(
nullptr, gpd, gpl)) {
334 {0,
nullptr, 0,
nullptr,
nullptr},
338 ot->
name =
"Move Annotation Layer";
339 ot->
idname =
"GPENCIL_OT_layer_annotation_move";
340 ot->
description =
"Move the active Annotation layer up/down in the list";
General operations, lookup, etc. for materials.
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
static wmOperatorStatus gpencil_layer_remove_exec(bContext *C, wmOperator *op)
static wmOperatorStatus gpencil_layer_add_exec(bContext *C, wmOperator *op)
void BKE_annotations_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
static wmOperatorStatus gpencil_data_unlink_exec(bContext *C, wmOperator *op)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void BKE_id_delete(Main *bmain, void *idv, const BKEIDDeleteOptions &options={}) ATTR_NONNULL()
void GPENCIL_OT_layer_annotation_move(wmOperatorType *ot)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
static wmOperatorStatus gpencil_layer_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_data_unlink(wmOperatorType *ot)
struct bGPDlayer * BKE_annotations_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
static bool gpencil_add_annotation_poll(bContext *C)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
struct bGPdata * BKE_annotations_data_addnew(struct Main *bmain, const char name[])
void ED_view3d_gizmo_ruler_remove_by_gpencil_layer(struct bContext *C, bGPDlayer *gpl)
void BKE_annotations_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl)
void DEG_id_tag_update(ID *id, unsigned int flags)
void BKE_report(ReportList *reports, eReportType type, const char *message)
void GPENCIL_OT_layer_annotation_add(wmOperatorType *ot)
bGPdata * ED_annotation_data_get_active(const bContext *C)
struct bGPDlayer * BKE_annotations_layer_active_get(struct bGPdata *gpd)
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
static bool gpencil_data_add_poll(bContext *C)
void GPENCIL_OT_layer_annotation_remove(wmOperatorType *ot)
Main * CTX_data_main(const bContext *C)
void GPENCIL_OT_annotation_add(wmOperatorType *ot)
static bool gpencil_active_layer_annotation_poll(bContext *C)
static bool gpencil_data_unlink_poll(bContext *C)
static wmOperatorStatus gpencil_data_add_exec(bContext *C, wmOperator *op)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
ListBaseT< bGPDlayer > layers
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports