70 if (dist > dist_max) {
73 else if (dist <= dist_max && dist > dist_min) {
74 weight = 1.0f - ((dist_max - dist) /
max_ff((dist_max - dist_min), 0.0001f));
113 if (target_def_nr == -1) {
120 float weight_pt = 1.0f;
121 for (
int i = 0; i < gps->
totpoints; i++) {
137 weight_pt = 1.0f - weight_pt;
202 uiItemR(sub,
ptr,
"use_invert_output", 0,
"", ICON_ARROW_LEFTRIGHT);
231 N_(
"Vertex Weight Proximity"),
232 "WeightProxGpencilModifierData",
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps)
void BKE_gpencil_modifier_copydata_generic(const struct GpencilModifierData *md_src, struct GpencilModifierData *md_dst)
@ eGpencilModifierTypeType_Gpencil
void(* IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin, int cb_flag)
MINLINE float max_ff(float a, float b)
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE float len_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
struct Depsgraph Depsgraph
void DEG_add_object_relation(struct DepsNodeHandle *node_handle, struct Object *object, eDepsObjectComponentType component, const char *description)
#define DNA_struct_default_get(struct_name)
@ GP_WEIGHT_INVERT_VGROUP
@ GP_WEIGHT_INVERT_OUTPUT
@ GP_WEIGHT_INVERT_MATERIAL
@ GP_WEIGHT_INVERT_LAYERPASS
@ GP_WEIGHT_MULTIPLY_DATA
@ eGpencilModifierType_WeightProximity
struct WeightProxGpencilModifierData WeightProxGpencilModifierData
Object is a sort of wrapper for general info.
PointerRNA * gpencil_modifier_panel_get_property_pointers(Panel *panel, PointerRNA *r_ob_ptr)
void gpencil_modifier_masking_panel_draw(Panel *panel, bool use_material, bool use_vertex)
void gpencil_modifier_panel_end(uiLayout *layout, PointerRNA *ptr)
PanelType * gpencil_modifier_subpanel_register(ARegionType *region_type, const char *name, const char *label, PanelDrawFn draw_header, PanelDrawFn draw, PanelType *parent)
PanelType * gpencil_modifier_panel_register(ARegionType *region_type, GpencilModifierType type, PanelDrawFn draw)
float get_modifier_point_weight(MDeformVert *dvert, bool inverse, int def_nr)
void generic_bake_deform_stroke(Depsgraph *depsgraph, GpencilModifierData *md, Object *ob, const bool retime, gpBakeCb bake_cb)
bool is_stroke_affected_by_modifier(Object *ob, char *mlayername, Material *material, const int mpassindex, const int gpl_passindex, const int minpoints, bGPDlayer *gpl, bGPDstroke *gps, const bool inv1, const bool inv2, const bool inv3, const bool inv4)
static void deformStroke(GpencilModifierData *md, Depsgraph *UNUSED(depsgraph), Object *ob, bGPDlayer *gpl, bGPDframe *UNUSED(gpf), bGPDstroke *gps)
static bool isDisabled(GpencilModifierData *md, int UNUSED(userRenderParams))
static void updateDepsgraph(GpencilModifierData *md, const ModifierUpdateDepsgraphContext *ctx, const int UNUSED(mode))
static float calc_point_weight_by_distance(Object *ob, WeightProxGpencilModifierData *mmd, const float dist_max, const float dist_min, bGPDspoint *pt)
static void bakeModifier(struct Main *UNUSED(bmain), Depsgraph *depsgraph, GpencilModifierData *md, Object *ob)
static void mask_panel_draw(const bContext *UNUSED(C), Panel *panel)
static void foreachIDLink(GpencilModifierData *md, Object *ob, IDWalkFunc walk, void *userData)
GpencilModifierTypeInfo modifierType_Gpencil_WeightProximity
static void copyData(const GpencilModifierData *md, GpencilModifierData *target)
static void panel_draw(const bContext *UNUSED(C), Panel *panel)
static void panelRegister(ARegionType *region_type)
static void initData(GpencilModifierData *md)
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
void uiLayoutSetActive(uiLayout *layout, bool active)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiLayoutSetPropSep(uiLayout *layout, bool is_sep)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiLayoutSetPropDecorate(uiLayout *layout, bool is_sep)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
const Depsgraph * depsgraph
int RNA_string_length(PointerRNA *ptr, const char *name)
struct DepsNodeHandle * node
struct Material * material
struct MDeformVert * dvert