Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_gpencil.h
| Show All 27 Lines | |||||
| /** \file BKE_gpencil.h | /** \file BKE_gpencil.h | ||||
| * \ingroup bke | * \ingroup bke | ||||
| * \author Joshua Leung | * \author Joshua Leung | ||||
| */ | */ | ||||
| struct CurveMapping; | struct CurveMapping; | ||||
| struct Depsgraph; | struct Depsgraph; | ||||
| struct GpencilModifierData; | |||||
| struct ToolSettings; | struct ToolSettings; | ||||
| struct ListBase; | struct ListBase; | ||||
| struct bGPdata; | struct bGPdata; | ||||
| struct bGPDlayer; | struct bGPDlayer; | ||||
| struct bGPDframe; | struct bGPDframe; | ||||
| struct bGPDspoint; | struct bGPDspoint; | ||||
| struct bGPDstroke; | struct bGPDstroke; | ||||
| struct Material; | struct Material; | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | void BKE_gpencil_stroke_add_points( | ||||
| const float *array, const int totpoints, | const float *array, const int totpoints, | ||||
| const float mat[4][4]); | const float mat[4][4]); | ||||
| struct bGPDstroke *BKE_gpencil_add_stroke(struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness); | struct bGPDstroke *BKE_gpencil_add_stroke(struct bGPDframe *gpf, int mat_idx, int totpoints, short thickness); | ||||
| /* Stroke and Fill - Alpha Visibility Threshold */ | /* Stroke and Fill - Alpha Visibility Threshold */ | ||||
| #define GPENCIL_ALPHA_OPACITY_THRESH 0.001f | #define GPENCIL_ALPHA_OPACITY_THRESH 0.001f | ||||
| #define GPENCIL_STRENGTH_MIN 0.003f | #define GPENCIL_STRENGTH_MIN 0.003f | ||||
| #define GPENCIL_MODIFIER_ACTIVE(_md, _is_render) (((_md->mode & eModifierMode_Realtime) && (_is_render == false)) || \ | |||||
| ((_md->mode & eModifierMode_Render) && (_is_render == true))) | |||||
| #define GPENCIL_MODIFIER_EDIT(_md, _is_edit) (((_md->mode & eModifierMode_Editmode) == 0) && (_is_edit)) | |||||
| bool gpencil_layer_is_editable(const struct bGPDlayer *gpl); | bool gpencil_layer_is_editable(const struct bGPDlayer *gpl); | ||||
aligorith: Since we have a BKE GP Modifiers header now, these macros should go there too | |||||
| /* How gpencil_layer_getframe() should behave when there | /* How gpencil_layer_getframe() should behave when there | ||||
| * is no existing GP-Frame on the frame requested. | * is no existing GP-Frame on the frame requested. | ||||
| */ | */ | ||||
| typedef enum eGP_GetFrame_Mode { | typedef enum eGP_GetFrame_Mode { | ||||
| /* Use the preceeding gp-frame (i.e. don't add anything) */ | /* Use the preceeding gp-frame (i.e. don't add anything) */ | ||||
| GP_GETFRAME_USE_PREV = 0, | GP_GETFRAME_USE_PREV = 0, | ||||
| Show All 26 Lines | |||||
| float BKE_gpencil_vgroup_use_index(struct MDeformVert *dvert, int index); | float BKE_gpencil_vgroup_use_index(struct MDeformVert *dvert, int index); | ||||
| void BKE_gpencil_vgroup_remove(struct Object *ob, struct bDeformGroup *defgroup); | void BKE_gpencil_vgroup_remove(struct Object *ob, struct bDeformGroup *defgroup); | ||||
| struct MDeformWeight *BKE_gpencil_vgroup_add_point_weight(struct MDeformVert *dvert, int index, float weight); | struct MDeformWeight *BKE_gpencil_vgroup_add_point_weight(struct MDeformVert *dvert, int index, float weight); | ||||
| bool BKE_gpencil_vgroup_remove_point_weight(struct MDeformVert *dvert, int index); | bool BKE_gpencil_vgroup_remove_point_weight(struct MDeformVert *dvert, int index); | ||||
| void BKE_gpencil_stroke_weights_duplicate(struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst); | void BKE_gpencil_stroke_weights_duplicate(struct bGPDstroke *gps_src, struct bGPDstroke *gps_dst); | ||||
| /* GPencil geometry evaluation */ | /* GPencil geometry evaluation */ | ||||
| void BKE_gpencil_eval_geometry(struct Depsgraph *depsgraph, struct bGPdata *gpd); | void BKE_gpencil_eval_geometry(struct Depsgraph *depsgraph, struct bGPdata *gpd); | ||||
| /* modifiers */ | |||||
| bool BKE_gpencil_has_geometry_modifiers(struct Object *ob); | |||||
| void BKE_gpencil_stroke_modifiers( | |||||
| struct Depsgraph *depsgraph, struct Object *ob, | |||||
| struct bGPDlayer *gpl, struct bGPDframe *gpf, struct bGPDstroke *gps, bool is_render); | |||||
| void BKE_gpencil_geometry_modifiers( | |||||
| struct Depsgraph *depsgraph, struct Object *ob, | |||||
| struct bGPDlayer *gpl, struct bGPDframe *gpf, bool is_render); | |||||
| void BKE_gpencil_instance_modifier_instance_tfm(struct InstanceGpencilModifierData *mmd, const int elem_idx[3], float r_mat[4][4]); | |||||
| void BKE_gpencil_lattice_init(struct Object *ob); | |||||
| void BKE_gpencil_lattice_clear(struct Object *ob); | |||||
| /* stroke geometry utilities */ | /* stroke geometry utilities */ | ||||
Not Done Inline ActionsThese defines (and a few others that are specifically for GP modifiers) should go into the BKE GP modifiers header aligorith: These defines (and a few others that are specifically for GP modifiers) should go into the BKE… | |||||
Not Done Inline Actions-> BKE_gpencil_modifiers.h aligorith: -> BKE_gpencil_modifiers.h | |||||
| void BKE_gpencil_stroke_normal(const struct bGPDstroke *gps, float r_normal[3]); | void BKE_gpencil_stroke_normal(const struct bGPDstroke *gps, float r_normal[3]); | ||||
Not Done Inline ActionsThese ones should stay here. They're not really modifier specific, but rather, can be used for general GP stuff too. aligorith: These ones should stay here. They're not really modifier specific, but rather, can be used for… | |||||
| void BKE_gpencil_simplify_stroke(struct bGPDstroke *gps, float factor); | void BKE_gpencil_simplify_stroke(struct bGPDstroke *gps, float factor); | ||||
| void BKE_gpencil_simplify_fixed(struct bGPDstroke *gps); | void BKE_gpencil_simplify_fixed(struct bGPDstroke *gps); | ||||
| void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]); | void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]); | ||||
| bool BKE_gpencil_smooth_stroke(struct bGPDstroke *gps, int i, float inf); | bool BKE_gpencil_smooth_stroke(struct bGPDstroke *gps, int i, float inf); | ||||
| bool BKE_gpencil_smooth_stroke_strength(struct bGPDstroke *gps, int point_index, float influence); | bool BKE_gpencil_smooth_stroke_strength(struct bGPDstroke *gps, int point_index, float influence); | ||||
| bool BKE_gpencil_smooth_stroke_thickness(struct bGPDstroke *gps, int point_index, float influence); | bool BKE_gpencil_smooth_stroke_thickness(struct bGPDstroke *gps, int point_index, float influence); | ||||
| bool BKE_gpencil_smooth_stroke_uv(struct bGPDstroke *gps, int point_index, float influence); | bool BKE_gpencil_smooth_stroke_uv(struct bGPDstroke *gps, int point_index, float influence); | ||||
| void BKE_gpencil_get_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe); | void BKE_gpencil_get_range_selected(struct bGPDlayer *gpl, int *r_initframe, int *r_endframe); | ||||
| float BKE_gpencil_multiframe_falloff_calc(struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff); | float BKE_gpencil_multiframe_falloff_calc(struct bGPDframe *gpf, int actnum, int f_init, int f_end, struct CurveMapping *cur_falloff); | ||||
| #endif /* __BKE_GPENCIL_H__ */ | #endif /* __BKE_GPENCIL_H__ */ | ||||
Since we have a BKE GP Modifiers header now, these macros should go there too