Blender
V3.3
|
#include <stdio.h>
#include <string.h>
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_string.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_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_lib_query.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_screen.h"
#include "MEM_guardedalloc.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "RNA_access.h"
#include "RNA_prototypes.h"
#include "BLT_translation.h"
#include "MOD_gpencil_modifiertypes.h"
#include "MOD_gpencil_ui_common.h"
#include "MOD_gpencil_util.h"
#include "DEG_depsgraph.h"
#include "WM_api.h"
Go to the source code of this file.
Variables | |
GpencilModifierTypeInfo | modifierType_Gpencil_Dash |
|
static |
Definition at line 191 of file MOD_gpencildash.c.
References BKE_gpencil_free_stroke(), BKE_gpencil_stroke_geometry_update(), BLI_addtail(), BLI_pophead(), BLI_remlink(), DashGpencilModifierData::flag, GP_LENGTH_INVERT_LAYER, GP_LENGTH_INVERT_LAYERPASS, GP_LENGTH_INVERT_MATERIAL, GP_LENGTH_INVERT_PASS, is_stroke_affected_by_modifier(), DashGpencilModifierData::layer_pass, DashGpencilModifierData::layername, LISTBASE_FOREACH_MUTABLE, DashGpencilModifierData::material, NULL, DashGpencilModifierData::pass_index, result, DashGpencilModifierData::segments_len, stroke_dash(), and bGPDframe::strokes.
Referenced by bakeModifier(), and generateStrokes().
|
static |
Definition at line 226 of file MOD_gpencildash.c.
References apply_dash_for_frame(), Object::data, bGPdata::layers, and LISTBASE_FOREACH.
|
static |
Definition at line 63 of file MOD_gpencildash.c.
References BKE_gpencil_modifier_copydata_generic(), MEM_dupallocN, and DashGpencilModifierData::segments.
|
static |
Definition at line 269 of file MOD_gpencildash.c.
References IDWALK_CB_USER, and DashGpencilModifierData::material.
|
static |
Definition at line 73 of file MOD_gpencildash.c.
References MEM_SAFE_FREE, and DashGpencilModifierData::segments.
|
static |
Definition at line 255 of file MOD_gpencildash.c.
References apply_dash_for_frame(), BKE_gpencil_frame_active_set(), Object::data, depsgraph, bGPdata::layers, LISTBASE_FOREACH, and NULL.
|
static |
Definition at line 48 of file MOD_gpencildash.c.
References BLI_assert, BLI_strncpy(), DATA_, DashGpencilModifierSegment::dmd, DNA_struct_default_alloc, DNA_struct_default_get, MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, DashGpencilModifierSegment::name, and DashGpencilModifierData::segments.
|
static |
Definition at line 242 of file MOD_gpencildash.c.
References DashGpencilModifierSegment::dash, real_gap(), DashGpencilModifierData::segments, and DashGpencilModifierData::segments_len.
Definition at line 351 of file MOD_gpencildash.c.
References gpencil_modifier_masking_panel_draw().
Referenced by panelRegister().
Definition at line 291 of file MOD_gpencildash.c.
References C, col, PointerRNA::data, gpencil_modifier_panel_end(), gpencil_modifier_panel_get_property_pointers(), Panel::layout, NULL, PointerRNA::owner_id, ptr, RNA_pointer_create(), DashGpencilModifierData::segment_active_index, DashGpencilModifierData::segments, DashGpencilModifierData::segments_len, UI_TEMPLATE_LIST_FLAG_NONE, uiItemEnumO_string(), uiItemO(), uiItemR(), uiItemS(), uiLayoutColumn(), uiLayoutRow(), uiLayoutSetPropSep(), and uiTemplateList().
Referenced by panelRegister().
|
static |
Definition at line 356 of file MOD_gpencildash.c.
References uiListType::draw_item, eGpencilModifierType_Dash, gpencil_modifier_panel_register(), gpencil_modifier_subpanel_register(), uiListType::idname, mask_panel_draw(), MEM_callocN, NULL, panel_draw(), segment_list_item(), and WM_uilisttype_add().
|
static |
Gap==0 means to start the next segment at the immediate next point, which will leave a visual gap of "1 point". This makes the algorithm give the same visual appearance as displayed on the UI and also simplifies the check for "no-length" situation where SEG==0 (which will not produce any effective dash).
Definition at line 86 of file MOD_gpencildash.c.
References DashGpencilModifierSegment::gap.
Referenced by isDisabled(), and stroke_dash().
|
static |
Definition at line 276 of file MOD_gpencildash.c.
References UI_ITEM_R_NO_BG, uiItemR(), and uiLayoutRow().
Referenced by panelRegister().
|
static |
Definition at line 91 of file MOD_gpencildash.c.
References BKE_gpencil_dvert_ensure(), BKE_gpencil_stroke_new(), BLI_addtail(), copy_v4_v4(), DashGpencilModifierSegment::dash, DashGpencilModifierData::dash_offset, bGPDstroke::dvert, MDeformVert::dw, DashGpencilModifierSegment::flag, bGPDstroke::flag, MDeformVert::flag, GP_DASH_USE_CYCLIC, GP_STROKE_CYCLIC, bGPDstroke_Runtime::gps_orig, bGPDspoint_Runtime::idx_orig, DashGpencilModifierSegment::mat_nr, bGPDstroke::mat_nr, MEM_callocN, MIN2, DashGpencilModifierSegment::opacity, bGPDstroke::points, bGPDspoint::pressure, bGPDspoint_Runtime::pt_orig, DashGpencilModifierSegment::radius, real_gap(), bGPDspoint::runtime, bGPDstroke::runtime, DashGpencilModifierData::segments, DashGpencilModifierData::segments_len, size(), bGPDspoint::strength, bGPDstroke::thickness, bGPDstroke::totpoints, MDeformVert::totweight, bGPDspoint::vert_color, bGPDspoint::x, bGPDspoint::y, and bGPDspoint::z.
Referenced by apply_dash_for_frame().
GpencilModifierTypeInfo modifierType_Gpencil_Dash |
Definition at line 369 of file MOD_gpencildash.c.