10 #define DNA_DEPRECATED_ALLOW
46 if (palette ==
NULL) {
66 palette_next = palette->
next;
92 if ((!is_annotation) && (view_layer !=
NULL)) {
112 gp_style->gradient_radius = 0.5f;
125 if ((gps->colorname[0] !=
'\0') && (
STREQ(gps->colorname, palcolor->info))) {
126 gps->mat_nr = ob->
totcol - 1;
127 gps->colorname[0] =
'\0';
160 gpl->tintcolor[3] = 0.0f;
163 if ((gps->colorname[0] !=
'\0') && (
STREQ(gps->colorname, palcolor->info))) {
183 ot->
name =
"Convert Grease Pencil";
184 ot->
idname =
"GPENCIL_OT_convert_old_files";
185 ot->
description =
"Convert 2.7x grease pencil files to 2.80";
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct Material * BKE_gpencil_object_material_new(struct Main *bmain, struct Object *ob, const char *name, int *r_index)
void BKE_gpencil_batch_cache_dirty_tag(struct bGPdata *gpd)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_add_for_data(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name, struct ID *data, bool do_id_user) ATTR_RETURNS_NONNULL
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void zero_v3(float r[3])
#define ARRAY_SET_ITEMS(...)
void DEG_relations_tag_update(struct Main *bmain)
@ GP_MATERIAL_STROKE_SHOW
Object is a sort of wrapper for general info.
Read Guarded memory(de)allocation.
static void free_gpencil_colors(bGPDpalette *palette)
static int gpencil_convert_old_files_exec(bContext *C, wmOperator *op)
static void free_palettes(ListBase *list)
void GPENCIL_OT_convert_old_files(wmOperatorType *ot)
static bool gpencil_convert_old_files_poll(bContext *C)
void ED_gpencil_setup_modes(bContext *C, bGPdata *gpd, int newmode)
void(* MEM_freeN)(void *vmemh)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
struct MaterialGPencilStyle * gp_style
struct bGPDpalette * next
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
void WM_event_add_notifier(const bContext *C, uint type, void *reference)