Blender  V2.93
Public Attributes | List of all members
GpencilModifierTypeInfo Struct Reference

#include <BKE_gpencil_modifier.h>

Public Attributes

char name [32]
 
char struct_name [32]
 
int struct_size
 
GpencilModifierTypeType type
 
GpencilModifierTypeFlag flags
 
void(* copyData )(const struct GpencilModifierData *md, struct GpencilModifierData *target)
 
void(* deformStroke )(struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Object *ob, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps)
 
void(* generateStrokes )(struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Object *ob)
 
void(* bakeModifier )(struct Main *bmain, struct Depsgraph *depsgraph, struct GpencilModifierData *md, struct Object *ob)
 
int(* remapTime )(struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, int cfra)
 
void(* initData )(struct GpencilModifierData *md)
 
void(* freeData )(struct GpencilModifierData *md)
 
bool(* isDisabled )(struct GpencilModifierData *md, int userRenderParams)
 
void(* updateDepsgraph )(struct GpencilModifierData *md, const struct ModifierUpdateDepsgraphContext *ctx, const int mode)
 
bool(* dependsOnTime )(struct GpencilModifierData *md)
 
void(* foreachIDLink )(struct GpencilModifierData *md, struct Object *ob, GreasePencilIDWalkFunc walk, void *userData)
 
void(* foreachTexLink )(struct GpencilModifierData *md, struct Object *ob, GreasePencilTexWalkFunc walk, void *userData)
 
void(* panelRegister )(struct ARegionType *region_type)
 

Detailed Description

Definition at line 97 of file BKE_gpencil_modifier.h.

Member Data Documentation

◆ bakeModifier

void(* GpencilModifierTypeInfo::bakeModifier) (struct Main *bmain, struct Depsgraph *depsgraph, struct GpencilModifierData *md, struct Object *ob)

Bake-down GP modifier's effects into the GP data-block.

This gets called when the user clicks the "Apply" button in the UI. As such, this callback needs to go through all layers/frames in the data-block, mutating the geometry and/or creating new data-blocks/objects

Definition at line 155 of file BKE_gpencil_modifier.h.

Referenced by ED_gpencil_join_objects_exec(), and gpencil_modifier_apply_obdata().

◆ copyData

void(* GpencilModifierTypeInfo::copyData) (const struct GpencilModifierData *md, struct GpencilModifierData *target)

Copy instance data for this modifier type. Should copy all user level settings to the target modifier.

Definition at line 119 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_copydata_ex(), and BKE_object_copy_gpencil_modifier().

◆ deformStroke

void(* GpencilModifierTypeInfo::deformStroke) (struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Object *ob, struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps)

Callback for GP "stroke" modifiers that operate on the shape and parameters of the provided strokes (e.g. Thickness, Noise, etc.)

The gpl parameter contains the GP layer that the strokes come from. While access is provided to this data, you should not directly access the gpl->frames data from the modifier. Instead, use the gpf parameter instead.

The gps parameter contains the GP stroke to operate on. This is usually a copy of the original (unmodified and saved to files) stroke data.

Definition at line 133 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifiers_calc().

◆ dependsOnTime

bool(* GpencilModifierTypeInfo::dependsOnTime) (struct GpencilModifierData *md)

Should return true if the modifier needs to be recalculated on time changes.

This function is optional (assumes false if not present).

Definition at line 218 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_depends_ontime().

◆ flags

GpencilModifierTypeFlag GpencilModifierTypeInfo::flags

◆ foreachIDLink

void(* GpencilModifierTypeInfo::foreachIDLink) (struct GpencilModifierData *md, struct Object *ob, GreasePencilIDWalkFunc walk, void *userData)

Should call the given walk function with a pointer to each ID pointer (i.e. each data-block pointer) that the modifier data stores. This is used for linking on file load and for unlinking data-blocks or forwarding data-block references.

This function is optional.

Definition at line 228 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_copydata_ex(), BKE_gpencil_modifier_free_ex(), and BKE_gpencil_modifiers_foreach_ID_link().

◆ foreachTexLink

void(* GpencilModifierTypeInfo::foreachTexLink) (struct GpencilModifierData *md, struct Object *ob, GreasePencilTexWalkFunc walk, void *userData)

Should call the given walk function for each texture that the modifier data stores. This is used for finding all textures in the context for the UI.

This function is optional. If it is not present, it will be assumed the modifier has no textures.

Definition at line 241 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifiers_foreach_tex_link().

◆ freeData

void(* GpencilModifierTypeInfo::freeData) (struct GpencilModifierData *md)

Free internal modifier data variables, this function should not free the md variable itself.

This function is optional.

Definition at line 190 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_copydata_generic(), and BKE_gpencil_modifier_free_ex().

◆ generateStrokes

void(* GpencilModifierTypeInfo::generateStrokes) (struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Object *ob)

Callback for GP "geometry" modifiers that create extra geometry in the frame (e.g. Array)

Definition at line 144 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_has_geometry_modifiers(), and BKE_gpencil_modifiers_calc().

◆ initData

void(* GpencilModifierTypeInfo::initData) (struct GpencilModifierData *md)

Initialize new instance data for this modifier type, this function should set modifier variables to their default values.

This function is optional.

Definition at line 182 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_new().

◆ isDisabled

bool(* GpencilModifierTypeInfo::isDisabled) (struct GpencilModifierData *md, int userRenderParams)

Return a boolean value indicating if this modifier is able to be calculated based on the modifier data. This is not regarding the md->flag, that is tested by the system, this is just if the data validates (for example, a lattice will return false if the lattice object is not defined).

This function is optional (assumes never disabled if not present).

Definition at line 201 of file BKE_gpencil_modifier.h.

Referenced by gpencil_modifier_apply_obdata(), gpencil_modifier_panel_header(), and lineart_mod_is_disabled().

◆ name

char GpencilModifierTypeInfo::name[32]

The user visible name for this modifier

Definition at line 99 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_new(), BKE_gpencil_modifier_unique_name(), and BKE_gpencil_modifierType_panel_id().

◆ panelRegister

void(* GpencilModifierTypeInfo::panelRegister) (struct ARegionType *region_type)

Definition at line 247 of file BKE_gpencil_modifier.h.

Referenced by ED_spacetype_buttons(), and uiTemplateGpencilModifiers().

◆ remapTime

int(* GpencilModifierTypeInfo::remapTime) (struct GpencilModifierData *md, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct bGPDlayer *gpl, int cfra)

Callback for GP "time" modifiers that offset keyframe time Returns the frame number to be used after apply the modifier. This is usually an offset of the animation for duplicated data-blocks.

This function is optional.

Definition at line 169 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_has_time_modifiers(), and gpencil_time_modifier().

◆ struct_name

char GpencilModifierTypeInfo::struct_name[32]

The DNA struct name for the modifier data type, used to write the DNA data out.

Definition at line 105 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_blend_write(), and BKE_gpencil_modifier_new().

◆ struct_size

int GpencilModifierTypeInfo::struct_size

The size of the modifier data type, used by allocation.

Definition at line 108 of file BKE_gpencil_modifier.h.

Referenced by BKE_gpencil_modifier_copydata_generic(), and BKE_gpencil_modifier_new().

◆ type

GpencilModifierTypeType GpencilModifierTypeInfo::type

Definition at line 110 of file BKE_gpencil_modifier.h.

◆ updateDepsgraph

void(* GpencilModifierTypeInfo::updateDepsgraph) (struct GpencilModifierData *md, const struct ModifierUpdateDepsgraphContext *ctx, const int mode)

Add the appropriate relations to the dependency graph.

This function is optional.

Definition at line 208 of file BKE_gpencil_modifier.h.

Referenced by blender::deg::DepsgraphRelationBuilder::build_object_data_geometry().


The documentation for this struct was generated from the following file: