Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MOD_gpencil_util.h « intern « gpencil_modifiers « blender « source - git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 73423d9a8eedda5348c0378a04ea83a51c15a24a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/* SPDX-License-Identifier: GPL-2.0-or-later
 * Copyright Blender Foundation. All rights reserved. */

/** \file
 * \ingroup modifiers
 */

#pragma once

struct Depsgraph;
struct GpencilModifierData;
struct MDeformVert;
struct Material;
struct Object;
struct bGPDlayer;
struct bGPDframe;
struct bGPDstroke;

/**
 * Verify if valid layer, material and pass index.
 */
bool is_stroke_affected_by_modifier(struct Object *ob,
                                    char *mlayername,
                                    struct Material *material,
                                    int mpassindex,
                                    int gpl_passindex,
                                    int minpoints,
                                    bGPDlayer *gpl,
                                    bGPDstroke *gps,
                                    bool inv1,
                                    bool inv2,
                                    bool inv3,
                                    bool inv4);

/**
 * Verify if valid vertex group *and return weight.
 */
float get_modifier_point_weight(struct MDeformVert *dvert, bool inverse, int def_nr);
/**
 * Generic bake function for deformStroke.
 */
typedef void (*gpBakeCb)(struct GpencilModifierData *md_,
                         struct Depsgraph *depsgraph_,
                         struct Object *ob_,
                         struct bGPDlayer *gpl_,
                         struct bGPDframe *gpf_,
                         struct bGPDstroke *gps_);

void generic_bake_deform_stroke(struct Depsgraph *depsgraph,
                                struct GpencilModifierData *md,
                                struct Object *ob,
                                bool retime,
                                gpBakeCb bake_cb);