Blender
V3.3
|
#include <stdio.h>
#include "BLI_hash.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "MEM_guardedalloc.h"
#include "DNA_defaults.h"
#include "DNA_gpencil_modifier_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_lib_query.h"
#include "BKE_modifier.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "MOD_gpencil_modifiertypes.h"
#include "MOD_gpencil_ui_common.h"
#include "MOD_gpencil_util.h"
Go to the source code of this file.
Variables | |
GpencilModifierTypeInfo | modifierType_Gpencil_Noise |
|
static |
Definition at line 257 of file MOD_gpencilnoise.c.
References deformStroke(), depsgraph, and generic_bake_deform_stroke().
|
static |
Definition at line 71 of file MOD_gpencilnoise.c.
References BKE_curvemapping_copy(), BKE_curvemapping_free(), BKE_gpencil_modifier_copydata_generic(), NoiseGpencilModifierData::curve_intensity, and NULL.
|
static |
Apply noise effect based on stroke direction.
Definition at line 109 of file MOD_gpencilnoise.c.
References BKE_curvemapping_evaluateF(), BKE_gpencil_stroke_normal(), BKE_object_defgroup_name_index(), BLI_findindex(), BLI_hash_string(), ceilf, CLAMP, clamp_f(), CLAMP_MIN, copy_v3_fl(), copy_v3_fl3(), cross_v3_v3v3(), NoiseGpencilModifierData::curve_intensity, DEG_get_ctime(), depsgraph, bGPDstroke::dvert, NoiseGpencilModifierData::factor, NoiseGpencilModifierData::factor_strength, NoiseGpencilModifierData::factor_thickness, NoiseGpencilModifierData::factor_uvs, NoiseGpencilModifierData::flag, float(), blender::math::floor(), fractf(), bGPDframe::framenum, get_modifier_point_weight(), GP_NOISE_CUSTOM_CURVE, GP_NOISE_INVERT_LAYER, GP_NOISE_INVERT_LAYERPASS, GP_NOISE_INVERT_MATERIAL, GP_NOISE_INVERT_PASS, GP_NOISE_INVERT_VGROUP, GP_NOISE_RANDOM_KEYFRAME, GP_NOISE_USE_RANDOM, GPENCIL_STRENGTH_MIN, Object::id, is_stroke_affected_by_modifier(), is_zero_v3(), NoiseGpencilModifierData::layer_pass, NoiseGpencilModifierData::layername, len, len_squared_v3(), M_PI_2, madd_v3_v3fl(), NoiseGpencilModifierData::material, max_ff(), MEM_SAFE_FREE, GpencilModifierData::name, ID::name, noise(), NoiseGpencilModifierData::noise_mode, NoiseGpencilModifierData::noise_offset, NoiseGpencilModifierData::noise_scale, noise_table(), normal, normalize_v3(), NULL, NoiseGpencilModifierData::pass_index, bGPDstroke::points, bGPDspoint::pressure, seed, NoiseGpencilModifierData::seed, NoiseGpencilModifierData::step, bGPDspoint::strength, bGPDframe::strokes, sub_v3_v3v3(), table_sample(), bGPDstroke::totpoints, bGPDspoint::uv_rot, NoiseGpencilModifierData::vgname, and bGPDspoint::x.
Referenced by bakeModifier().
|
static |
Definition at line 86 of file MOD_gpencilnoise.c.
References NoiseGpencilModifierData::flag, and GP_NOISE_USE_RANDOM.
|
static |
Definition at line 265 of file MOD_gpencilnoise.c.
References IDWALK_CB_USER, and NoiseGpencilModifierData::material.
|
static |
Definition at line 62 of file MOD_gpencilnoise.c.
References BKE_curvemapping_free(), and NoiseGpencilModifierData::curve_intensity.
|
static |
Definition at line 48 of file MOD_gpencilnoise.c.
References BKE_curvemap_reset(), BKE_curvemapping_add(), BKE_curvemapping_init(), BLI_assert, curve, NoiseGpencilModifierData::curve_intensity, CURVE_PRESET_BELL, CURVEMAP_SLOPE_POSITIVE, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, and MEMCPY_STRUCT_AFTER.
Definition at line 320 of file MOD_gpencilnoise.c.
References gpencil_modifier_masking_panel_draw().
Referenced by panelRegister().
|
static |
Definition at line 92 of file MOD_gpencilnoise.c.
References BLI_hash_int_01(), BLI_hash_int_2d(), len, MEM_callocN, offset, and seed.
Referenced by deformStroke().
Definition at line 272 of file MOD_gpencilnoise.c.
References col, gpencil_modifier_panel_end(), gpencil_modifier_panel_get_property_pointers(), IFACE_, Panel::layout, NULL, ptr, uiItemR(), uiLayoutColumn(), and uiLayoutSetPropSep().
Referenced by panelRegister().
|
static |
Definition at line 325 of file MOD_gpencilnoise.c.
References eGpencilModifierType_Noise, gpencil_modifier_curve_header_draw(), gpencil_modifier_curve_panel_draw(), gpencil_modifier_panel_register(), gpencil_modifier_subpanel_register(), mask_panel_draw(), NULL, panel_draw(), random_header_draw(), and random_panel_draw().
Definition at line 293 of file MOD_gpencilnoise.c.
References gpencil_modifier_panel_get_property_pointers(), IFACE_, Panel::layout, NULL, ptr, and uiItemR().
Referenced by panelRegister().
Definition at line 302 of file MOD_gpencilnoise.c.
References GP_NOISE_RANDOM_KEYFRAME, gpencil_modifier_panel_get_property_pointers(), Panel::layout, NULL, ptr, RNA_boolean_get(), RNA_enum_get(), uiItemR(), uiLayoutSetActive(), and uiLayoutSetPropSep().
Referenced by panelRegister().
BLI_INLINE float table_sample | ( | float * | table, |
float | x | ||
) |
Definition at line 101 of file MOD_gpencilnoise.c.
References ceilf, blender::math::floor(), fractf(), interpf(), and x.
Referenced by deformStroke().
GpencilModifierTypeInfo modifierType_Gpencil_Noise |
Definition at line 341 of file MOD_gpencilnoise.c.