Blender  V2.93
Functions
BKE_gpencil_curve.h File Reference

Go to the source code of this file.

Functions

void BKE_gpencil_convert_curve (struct Main *bmain, struct Scene *scene, struct Object *ob_gp, struct Object *ob_cu, const bool use_collections, const float scale_thickness, const float sample)
 
struct bGPDcurveBKE_gpencil_stroke_editcurve_generate (struct bGPDstroke *gps, const float error_threshold, const float corner_angle, const float stroke_radius)
 
void BKE_gpencil_stroke_editcurve_update (struct bGPdata *gpd, struct bGPDlayer *gpl, struct bGPDstroke *gps)
 
void BKE_gpencil_editcurve_stroke_sync_selection (struct bGPdata *gpd, struct bGPDstroke *gps, struct bGPDcurve *gpc)
 
void BKE_gpencil_stroke_editcurve_sync_selection (struct bGPdata *gpd, struct bGPDstroke *gps, struct bGPDcurve *gpc)
 
void BKE_gpencil_strokes_selected_update_editcurve (struct bGPdata *gpd)
 
void BKE_gpencil_strokes_selected_sync_selection_editcurve (struct bGPdata *gpd)
 
void BKE_gpencil_stroke_update_geometry_from_editcurve (struct bGPDstroke *gps, const uint resolution, const bool is_adaptive)
 
void BKE_gpencil_editcurve_recalculate_handles (struct bGPDstroke *gps)
 
void BKE_gpencil_editcurve_subdivide (struct bGPDstroke *gps, const int cuts)
 

Function Documentation

◆ BKE_gpencil_convert_curve()

void BKE_gpencil_convert_curve ( Main bmain,
Scene scene,
Object ob_gp,
Object ob_cu,
const bool  use_collections,
const float  scale_thickness,
const float  sample 
)

Convert a curve object to grease pencil stroke.

Parameters
bmainMain thread pointer
sceneOriginal scene.
ob_gpGrease pencil object to add strokes.
ob_cuCurve to convert.
use_collectionsCreate layers using collection names.
scale_thicknessScale thickness factor.
sampleSample distance, zero to disable.

Definition at line 491 of file gpencil_curve.c.

References Object::actcol, BKE_gpencil_layer_active_get(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_frame_get(), BKE_gpencil_layer_named_get(), BKE_gpencil_merge_materials(), BKE_object_material_slot_remove(), BKE_object_material_slot_used(), CFRA, Object::data, DATA_, DEG_id_tag_update(), ELEM, ListBase::first, GP_GETFRAME_ADD_COPY, gpencil_convert_spline(), gpencil_get_parent_collection(), Collection::id, Object::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_GEOMETRY, LISTBASE_FOREACH, ID::name, NULL, Curve::nurb, OB_GPENCIL, blender::compositor::sample(), scene, Object::totcol, and Object::type.

Referenced by object_convert_exec().

◆ BKE_gpencil_editcurve_recalculate_handles()

void BKE_gpencil_editcurve_recalculate_handles ( bGPDstroke gps)

◆ BKE_gpencil_editcurve_stroke_sync_selection()

void BKE_gpencil_editcurve_stroke_sync_selection ( struct bGPdata gpd,
struct bGPDstroke gps,
struct bGPDcurve gpc 
)

◆ BKE_gpencil_editcurve_subdivide()

void BKE_gpencil_editcurve_subdivide ( struct bGPDstroke gps,
const int  cuts 
)

◆ BKE_gpencil_stroke_editcurve_generate()

struct bGPDcurve* BKE_gpencil_stroke_editcurve_generate ( bGPDstroke gps,
const float  error_threshold,
const float  corner_angle,
const float  stroke_radius 
)

◆ BKE_gpencil_stroke_editcurve_sync_selection()

void BKE_gpencil_stroke_editcurve_sync_selection ( bGPdata gpd,
bGPDstroke gps,
bGPDcurve gpc 
)

◆ BKE_gpencil_stroke_editcurve_update()

void BKE_gpencil_stroke_editcurve_update ( bGPdata gpd,
bGPDlayer gpl,
bGPDstroke gps 
)

◆ BKE_gpencil_stroke_update_geometry_from_editcurve()

void BKE_gpencil_stroke_update_geometry_from_editcurve ( bGPDstroke gps,
const uint  resolution,
const bool  adaptive 
)

◆ BKE_gpencil_strokes_selected_sync_selection_editcurve()

void BKE_gpencil_strokes_selected_sync_selection_editcurve ( struct bGPdata gpd)

◆ BKE_gpencil_strokes_selected_update_editcurve()

void BKE_gpencil_strokes_selected_update_editcurve ( struct bGPdata gpd)