67 if (gpd_ptr ==
nullptr) {
103 ot->name =
"Annotation Add New";
104 ot->idname =
"GPENCIL_OT_annotation_add";
105 ot->description =
"Add new Annotation data-block";
121 if ((gpd_ptr !=
nullptr) && (*gpd_ptr !=
nullptr)) {
128 return (gpd_ptr && *gpd_ptr);
136 if (gpd_ptr ==
nullptr) {
155 ot->name =
"Annotation Unlink";
156 ot->idname =
"GPENCIL_OT_data_unlink";
157 ot->description =
"Unlink active Annotation data-block";
179 if (gpd_ptr ==
nullptr) {
184 if (*gpd_ptr ==
nullptr) {
211 ot->name =
"Add New Annotation Layer";
212 ot->idname =
"GPENCIL_OT_layer_annotation_add";
213 ot->description =
"Add new Annotation layer or note for the active data-block";
229 if (
ELEM(
nullptr, gpd, gpl)) {
280 return (gpl !=
nullptr);
286 ot->name =
"Remove Annotation Layer";
287 ot->idname =
"GPENCIL_OT_layer_annotation_remove";
288 ot->description =
"Remove active Annotation layer";
311 if (
ELEM(
nullptr, gpd, gpl)) {
329 {0,
nullptr, 0,
nullptr,
nullptr},
333 ot->name =
"Move Annotation Layer";
334 ot->idname =
"GPENCIL_OT_layer_annotation_move";
335 ot->description =
"Move the active Annotation layer up/down in the list";
Main * CTX_data_main(const bContext *C)
void BKE_gpencil_layer_active_set(struct bGPdata *gpd, struct bGPDlayer *active)
void BKE_gpencil_free_data(struct bGPdata *gpd, bool free_all)
struct bGPDlayer * BKE_gpencil_layer_addnew(struct bGPdata *gpd, const char *name, bool setactive, bool add_to_header)
struct bGPDlayer * BKE_gpencil_layer_active_get(struct bGPdata *gpd)
struct bGPdata * BKE_gpencil_data_addnew(struct Main *bmain, const char name[])
void BKE_gpencil_layer_delete(struct bGPdata *gpd, struct bGPDlayer *gpl)
void BKE_id_free_us(Main *bmain, void *idv) ATTR_NONNULL()
General operations, lookup, etc. for materials.
void BKE_report(ReportList *reports, eReportType type, const char *message)
void void void bool BLI_listbase_link_move(ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
void DEG_id_tag_update(ID *id, unsigned int flags)
void ED_view3d_gizmo_ruler_remove_by_gpencil_layer(struct bContext *C, bGPDlayer *gpl)
static bool gpencil_active_layer_annotation_poll(bContext *C)
static wmOperatorStatus gpencil_layer_move_exec(bContext *C, wmOperator *op)
void GPENCIL_OT_layer_annotation_move(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_remove(wmOperatorType *ot)
static bool gpencil_data_unlink_poll(bContext *C)
static wmOperatorStatus gpencil_layer_add_exec(bContext *C, wmOperator *op)
static wmOperatorStatus gpencil_data_add_exec(bContext *C, wmOperator *op)
static bool gpencil_data_add_poll(bContext *C)
static wmOperatorStatus gpencil_layer_remove_exec(bContext *C, wmOperator *op)
static bool gpencil_add_annotation_poll(bContext *C)
void GPENCIL_OT_annotation_add(wmOperatorType *ot)
void GPENCIL_OT_data_unlink(wmOperatorType *ot)
void GPENCIL_OT_layer_annotation_add(wmOperatorType *ot)
static wmOperatorStatus gpencil_data_unlink_exec(bContext *C, wmOperator *op)
bGPdata * ED_annotation_data_get_active(const bContext *C)
bGPdata ** ED_annotation_data_get_pointers(const bContext *C, PointerRNA *r_ptr)
int RNA_enum_get(PointerRNA *ptr, const char *name)
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 ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)