Blender
V3.3
|
#include <stdio.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "BKE_brush.h"
#include "BKE_context.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_report.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_gpencil.h"
#include "ED_screen.h"
#include "DEG_depsgraph.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Classes | |
struct | tGPencilPointCache |
Typedefs | |
typedef struct tGPencilPointCache | tGPencilPointCache |
Operators for merge Grease Pencil strokes.
Definition in file gpencil_merge.c.
typedef struct tGPencilPointCache tGPencilPointCache |
|
static |
Definition at line 348 of file gpencil_merge.c.
References BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_ptr_new(), bool, copy_v3_v3(), gpencil_get_extremes(), gpencil_insert_to_array(), tGPencilPointCache::gps, len_v3v3(), NULL, and tGPencilPointCache::x.
Referenced by gpencil_stroke_merge_exec().
|
static |
Definition at line 183 of file gpencil_merge.c.
References angle(), angle_signed_v2v2(), BKE_gpencil_stroke_2d_flat(), BKE_gpencil_stroke_select_index_reset(), C, center, clear_stroke(), copy_v3_v3(), copy_v4_v4(), CTX_DATA_BEGIN, CTX_DATA_END, fabsf, tGPencilPointCache::factor, bGPDspoint::flag, bGPDstroke::flag, float(), GP_MERGE_STROKE, GP_SPOINT_SELECT, GP_SPOINT_TAG, GP_STROKE_SELECT, tGPencilPointCache::gps, len_v2v2(), LISTBASE_FOREACH, M_PI, MEM_callocN, MEM_mallocN, MEM_SAFE_FREE, mul_v2_fl(), NULL, tGPencilPointCache::pressure, bGPDspoint::pressure, tGPencilPointCache::strength, bGPDspoint::strength, bGPDframe::strokes, sub_v2_v2v2(), v1, tGPencilPointCache::vert_color, bGPDspoint::vert_color, tGPencilPointCache::x, and bGPDspoint::x.
Referenced by gpencil_stroke_merge_exec().
Definition at line 157 of file gpencil_merge.c.
References BKE_gpencil_stroke_delete_tagged_points(), C, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, Object::data, GP_SPOINT_TAG, LISTBASE_FOREACH_MUTABLE, bGPDframe::next, NULL, and bGPDframe::strokes.
Referenced by gpencil_stroke_merge_exec().
Definition at line 138 of file gpencil_merge.c.
References C, CTX_DATA_BEGIN, CTX_DATA_END, bGPDspoint::flag, GP_SPOINT_SELECT, and GP_STROKE_SELECT.
Referenced by gpencil_stroke_merge_exec().
|
static |
Definition at line 325 of file gpencil_merge.c.
References copy_v3_v3(), tGPencilPointCache::gps, NULL, and tGPencilPointCache::x.
Referenced by gpencil_analyze_strokes().
|
static |
Definition at line 66 of file gpencil_merge.c.
References copy_v3_v3(), copy_v4_v4(), bGPDspoint::flag, GP_SPOINT_SELECT, NULL, bGPDstroke::points, tGPencilPointCache::pressure, bGPDspoint::pressure, tGPencilPointCache::strength, bGPDspoint::strength, bGPDspoint::uv_fac, bGPDspoint::uv_rot, tGPencilPointCache::vert_color, bGPDspoint::vert_color, tGPencilPointCache::x, and bGPDspoint::x.
Referenced by gpencil_stroke_merge_exec().
|
static |
Definition at line 286 of file gpencil_merge.c.
References copy_v3_v3(), copy_v4_v4(), ELEM, tGPencilPointCache::factor, tGPencilPointCache::gps, NULL, tGPencilPointCache::pressure, tGPencilPointCache::strength, tGPencilPointCache::vert_color, and tGPencilPointCache::x.
Referenced by gpencil_analyze_strokes().
void GPENCIL_OT_stroke_merge | ( | wmOperatorType * | ot | ) |
Definition at line 524 of file gpencil_merge.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GP_MERGE_POINT, GP_MERGE_STROKE, gpencil_stroke_merge_exec(), gpencil_strokes_merge_poll(), wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_boolean(), RNA_def_enum(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
void GPENCIL_OT_stroke_merge_material | ( | wmOperatorType * | ot | ) |
Definition at line 596 of file gpencil_merge.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_stroke_merge_material_exec(), gpencil_stroke_merge_material_poll(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_SKIP_SAVE, RNA_def_float(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
|
static |
Definition at line 86 of file gpencil_merge.c.
References Object::actcol, BKE_brush_gpencil_paint_presets(), BKE_gpencil_layer_frame_get(), BKE_gpencil_stroke_new(), BKE_gpencil_stroke_select_index_set(), BLI_addhead(), BLI_addtail(), Paint::brush, C, RenderData::cfra, CTX_data_active_gpencil_layer(), CTX_data_active_object(), CTX_data_main(), CTX_data_scene(), CTX_data_tool_settings(), Object::data, bGPDstroke::flag, GP_GETFRAME_ADD_COPY, GP_GETFRAME_ADD_NEW, ToolSettings::gp_paint, GP_STROKE_CYCLIC, GP_STROKE_SELECT, Brush::gpencil_settings, MAX2, NULL, GpPaint::paint, wmOperator::ptr, Scene::r, RNA_boolean_get(), scene, Brush::size, and bGPDframe::strokes.
Referenced by gpencil_stroke_merge_exec().
Definition at line 51 of file gpencil_merge.c.
References tGPencilPointCache::factor.
Referenced by gpencil_stroke_merge_exec().
|
static |
Definition at line 454 of file gpencil_merge.c.
References BKE_gpencil_stroke_geometry_update(), C, clear_stroke(), CTX_data_active_gpencil_layer(), CTX_data_active_object(), Object::data, DEG_id_tag_update(), GP_MERGE_STROKE, gpencil_analyze_strokes(), gpencil_calc_points_factor(), gpencil_dissolve_points(), gpencil_get_elements_len(), gpencil_insert_points_to_stroke(), gpencil_prepare_stroke(), gpencil_sort_points(), bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, MEM_callocN, MEM_dupallocN, MEM_SAFE_FREE, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, OB_GPENCIL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), RNA_enum_get(), Object::type, and WM_event_add_notifier().
Referenced by GPENCIL_OT_stroke_merge().
|
static |
Definition at line 566 of file gpencil_merge.c.
References BKE_gpencil_merge_materials(), BKE_object_material_len_p(), BKE_report(), BKE_reportf(), C, CTX_data_active_object(), Object::data, DEG_id_tag_update(), bGPdata::id, ID_RECALC_GEOMETRY, ID_RECALC_TRANSFORM, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, wmOperator::reports, RNA_float_get(), RPT_INFO, and WM_event_add_notifier().
Referenced by GPENCIL_OT_stroke_merge_material().
Definition at line 555 of file gpencil_merge.c.
References C, CTX_data_active_object(), NULL, OB_GPENCIL, and Object::type.
Referenced by GPENCIL_OT_stroke_merge_material().
Definition at line 423 of file gpencil_merge.c.
References Object::actcol, BKE_gpencil_material(), C, CTX_data_active_gpencil_layer(), CTX_data_active_object(), CTX_DATA_COUNT, ED_operator_view3d_active(), bGPDlayer::flag, MaterialGPencilStyle::flag, GP_LAYER_HIDE, GP_LAYER_LOCKED, GP_MATERIAL_HIDE, GP_MATERIAL_LOCKED, Material::gp_style, NULL, OB_GPENCIL, and Object::type.
Referenced by GPENCIL_OT_stroke_merge().