Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_gpencil.h
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| struct ViewLayer; | struct ViewLayer; | ||||
| struct bDeformGroup; | struct bDeformGroup; | ||||
| struct bGPDcurve; | struct bGPDcurve; | ||||
| struct bGPDframe; | struct bGPDframe; | ||||
| struct bGPDlayer; | struct bGPDlayer; | ||||
| struct bGPDlayer_Mask; | struct bGPDlayer_Mask; | ||||
| struct bGPDstroke; | struct bGPDstroke; | ||||
| struct bGPdata; | struct bGPdata; | ||||
| struct GPencilUpdateCache; | |||||
| #define GPENCIL_SIMPLIFY(scene) (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE) | #define GPENCIL_SIMPLIFY(scene) (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ENABLE) | ||||
| #define GPENCIL_SIMPLIFY_ONPLAY(playing) \ | #define GPENCIL_SIMPLIFY_ONPLAY(playing) \ | ||||
| (((playing == true) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY)) || \ | (((playing == true) && (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY)) || \ | ||||
| ((scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY) == 0)) | ((scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_ON_PLAY) == 0)) | ||||
| #define GPENCIL_SIMPLIFY_FILL(scene, playing) \ | #define GPENCIL_SIMPLIFY_FILL(scene, playing) \ | ||||
| ((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \ | ((GPENCIL_SIMPLIFY_ONPLAY(playing) && GPENCIL_SIMPLIFY(scene) && \ | ||||
| (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FILL))) | (scene->r.simplify_gpencil & SIMPLIFY_GPENCIL_FILL))) | ||||
| ▲ Show 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Make a copy of a given gpencil layer. | * Make a copy of a given gpencil layer. | ||||
| * \param gpl_src: Source grease pencil layer | * \param gpl_src: Source grease pencil layer | ||||
| * \return Pointer to new layer | * \return Pointer to new layer | ||||
| */ | */ | ||||
| struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src, | struct bGPDlayer *BKE_gpencil_layer_duplicate(const struct bGPDlayer *gpl_src, | ||||
| bool dup_frames, | bool dup_frames, | ||||
| bool dup_strokes); | bool dup_strokes); | ||||
| /** | |||||
| * Make a copy of a given gpencil data settings. | |||||
| */ | |||||
| void BKE_gpencil_data_copy_settings(const struct bGPdata *gpd_src, struct bGPdata *gpd_dst); | |||||
| /** | /** | ||||
| * Make a copy of a given gpencil layer settings. | * Make a copy of a given gpencil layer settings. | ||||
| */ | */ | ||||
| void BKE_gpencil_layer_copy_settings(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst); | void BKE_gpencil_layer_copy_settings(const struct bGPDlayer *gpl_src, struct bGPDlayer *gpl_dst); | ||||
| /** | |||||
| * Make a copy of a given gpencil frame settings. | |||||
| */ | |||||
| void BKE_gpencil_frame_copy_settings(const struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst); | |||||
| /** | |||||
| * Make a copy of a given gpencil stroke settings. | |||||
| */ | |||||
| void BKE_gpencil_stroke_copy_settings(const struct bGPDstroke *gpf_src, | |||||
| struct bGPDstroke *gpf_dst); | |||||
| /** | /** | ||||
| * Make a copy of strokes between gpencil frames. | * Make a copy of strokes between gpencil frames. | ||||
| * \param gpf_src: Source grease pencil frame | * \param gpf_src: Source grease pencil frame | ||||
| * \param gpf_dst: Destination grease pencil frame | * \param gpf_dst: Destination grease pencil frame | ||||
| */ | */ | ||||
| void BKE_gpencil_frame_copy_strokes(struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst); | void BKE_gpencil_frame_copy_strokes(struct bGPDframe *gpf_src, struct bGPDframe *gpf_dst); | ||||
| /* Create a hash with the list of selected frame number. */ | /* Create a hash with the list of selected frame number. */ | ||||
| void BKE_gpencil_frame_selected_hash(struct bGPdata *gpd, struct GHash *r_list); | void BKE_gpencil_frame_selected_hash(struct bGPdata *gpd, struct GHash *r_list); | ||||
| ▲ Show 20 Lines • Show All 480 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * Update original pointers in evaluated frame. | * Update original pointers in evaluated frame. | ||||
| * \param gpf_orig: Original grease-pencil frame. | * \param gpf_orig: Original grease-pencil frame. | ||||
| * \param gpf_eval: Evaluated grease pencil frame. | * \param gpf_eval: Evaluated grease pencil frame. | ||||
| */ | */ | ||||
| void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig, | void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig, | ||||
| const struct bGPDframe *gpf_eval); | const struct bGPDframe *gpf_eval); | ||||
| void BKE_gpencil_layer_original_pointers_update(const struct bGPDlayer *gpl_orig, | |||||
| const struct bGPDlayer *gpl_eval); | |||||
| /** | /** | ||||
| * Update pointers of eval data to original data to keep references. | * Update pointers of eval data to original data to keep references. | ||||
| * \param ob_orig: Original grease pencil object | * \param ob_orig: Original grease pencil object | ||||
| * \param ob_eval: Evaluated grease pencil object | * \param ob_eval: Evaluated grease pencil object | ||||
| */ | */ | ||||
| void BKE_gpencil_update_orig_pointers(const struct Object *ob_orig, const struct Object *ob_eval); | void BKE_gpencil_update_orig_pointers(const struct Object *ob_orig, const struct Object *ob_eval); | ||||
| /** | /** | ||||
| * Update pointers of eval data to original data to keep references. | |||||
| * \param gpd_orig: Original grease pencil data | |||||
| * \param gpd_eval: Evaluated grease pencil data | |||||
| */ | |||||
| void BKE_gpencil_data_update_orig_pointers(const struct bGPdata *gpd_orig, | |||||
| const struct bGPdata *gpd_eval); | |||||
| /** | |||||
| * Get parent matrix, including layer parenting. | * Get parent matrix, including layer parenting. | ||||
| * \param depsgraph: Depsgraph | * \param depsgraph: Depsgraph | ||||
| * \param obact: Grease pencil object | * \param obact: Grease pencil object | ||||
| * \param gpl: Grease pencil layer | * \param gpl: Grease pencil layer | ||||
| * \param diff_mat: Result parent matrix | * \param diff_mat: Result parent matrix | ||||
| */ | */ | ||||
| void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, | void BKE_gpencil_layer_transform_matrix_get(const struct Depsgraph *depsgraph, | ||||
| struct Object *obact, | struct Object *obact, | ||||
| Show All 12 Lines | |||||
| * \param ob: Object pointer | * \param ob: Object pointer | ||||
| * \param name_prefix: Prefix name of the material | * \param name_prefix: Prefix name of the material | ||||
| * \return Index | * \return Index | ||||
| */ | */ | ||||
| int BKE_gpencil_material_find_index_by_name_prefix(struct Object *ob, const char *name_prefix); | int BKE_gpencil_material_find_index_by_name_prefix(struct Object *ob, const char *name_prefix); | ||||
| void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd); | void BKE_gpencil_blend_read_data(struct BlendDataReader *reader, struct bGPdata *gpd); | ||||
| bool BKE_gpencil_can_avoid_full_copy_on_write(const struct Depsgraph *depsgraph, struct bGPdata *gpd); | |||||
| void BKE_gpencil_update_on_write(struct bGPdata *gpd_orig, struct bGPdata *gpd_eval); | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||