Blender
V3.3
|
#include <math.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "PIL_time.h"
#include "BLT_translation.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "BKE_brush.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_gpencil_update_cache.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "UI_interface.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "RNA_prototypes.h"
#include "UI_view2d.h"
#include "ED_gpencil.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Classes | |
struct | tGP_BrushEditData |
struct | tGPSB_Grab_StrokeData |
struct | tGPSB_CloneBrushData |
Typedefs | |
typedef struct tGP_BrushEditData | tGP_BrushEditData |
typedef bool(* | GP_BrushApplyCb) (tGP_BrushEditData *gso, bGPDstroke *gps, float rotation, int pt_index, const int radius, const int co[2]) |
typedef struct tGPSB_Grab_StrokeData | tGPSB_Grab_StrokeData |
typedef struct tGPSB_CloneBrushData | tGPSB_CloneBrushData |
Brush based operators for editing Grease Pencil strokes.
Definition in file gpencil_sculpt_paint.c.
typedef bool(* GP_BrushApplyCb) (tGP_BrushEditData *gso, bGPDstroke *gps, float rotation, int pt_index, const int radius, const int co[2]) |
Definition at line 156 of file gpencil_sculpt_paint.c.
typedef struct tGP_BrushEditData tGP_BrushEditData |
typedef struct tGPSB_CloneBrushData tGPSB_CloneBrushData |
typedef struct tGPSB_Grab_StrokeData tGPSB_Grab_StrokeData |
|
static |
Definition at line 1747 of file gpencil_sculpt_paint.c.
References Object::actcol, tGP_BrushEditData::automasking_strokes, BKE_gpencil_layer_active_get(), BKE_gpencil_layer_is_editable(), BKE_gpencil_layer_transform_matrix_get(), BKE_gpencil_material(), BKE_object_material_get(), BLI_ghash_insert(), bool, tGP_BrushEditData::brush, tGP_BrushEditData::depsgraph, ED_gpencil_stroke_check_collision(), ED_gpencil_stroke_material_editable(), GP_SCULPT_FLAGMODE_AUTOMASK_LAYER, GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL, GP_SCULPT_FLAGMODE_AUTOMASK_STROKE, tGP_BrushEditData::gpd, GPENCIL_MULTIEDIT_SESSIONS_ON, gpencil_point_to_parent_space(), gpencil_point_to_xy(), Brush::gpencil_settings, gpencil_stroke_inside_circle(), tGP_BrushEditData::gsc, bGPdata::layers, len_v2v2_int(), LISTBASE_FOREACH, bGPDstroke::mat_nr, tGP_BrushEditData::mval, bGPDframe::next, NULL, tGP_BrushEditData::object, bGPDstroke::points, round_v2i_v2fl(), BrushGpencilSettings::sculpt_mode_flag, and bGPDstroke::totpoints.
Referenced by gpencil_sculpt_brush_apply().
|
static |
Definition at line 627 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::dvec, ED_view3d_calc_zfac(), ED_view3d_project_float_global(), ED_view3d_win_to_delta(), Object::loc, tGP_BrushEditData::mval, tGP_BrushEditData::object, tGP_BrushEditData::region, ARegion::regiondata, sub_v2_v2v2(), sub_v3_v3v3(), V3D_PROJ_RET_OK, V3D_PROJ_TEST_NOP, and zero_v3().
Referenced by gpencil_brush_clone_add(), and gpencil_sculpt_brush_apply_standard().
|
static |
Definition at line 982 of file gpencil_sculpt_paint.c.
References add_v3_v3(), BKE_gpencil_layer_frame_get(), BKE_gpencil_layer_named_get(), BKE_gpencil_object_material_index_get(), BKE_gpencil_stroke_duplicate(), BLI_addtail(), BLI_ghash_lookup(), C, RenderData::cfra, CTX_data_active_gpencil_layer(), tGP_BrushEditData::customdata, data, Object::data, tGP_BrushEditData::dvec, ED_gpencil_stroke_can_use(), ListBase::first, GP_GETFRAME_ADD_NEW, GP_GETFRAME_USE_PREV, gpencil_brush_calc_midpoint(), gpencil_strokes_copypastebuf, Object::imat, IS_AUTOKEY_ON, bGPDstroke::mat_nr, mul_m4_v3(), mul_mat3_m4_v3(), bGPDstroke::next, NULL, tGP_BrushEditData::object, Object::obmat, POINTER_FROM_INT, bGPDstroke::points, bGPDstroke::prev, Scene::r, bGPDstroke::runtime, scene, tGP_BrushEditData::scene, bGPDframe::strokes, sub_v3_v3v3(), bGPDstroke_Runtime::tmp_layerinfo, and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_apply_clone().
|
static |
Definition at line 1057 of file gpencil_sculpt_paint.c.
References add_v3_v3(), tGP_BrushEditData::brush, tGP_BrushEditData::customdata, data, tGP_BrushEditData::dvec, gpencil_brush_grab_calc_dvec(), gpencil_brush_influence_calc(), gpencil_point_to_xy(), tGP_BrushEditData::gsc, mul_v3_v3fl(), bGPDstroke::points, tGP_BrushEditData::rot_eval, Brush::size, and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_apply_clone().
|
static |
Definition at line 963 of file gpencil_sculpt_paint.c.
References BLI_ghash_free(), tGP_BrushEditData::customdata, data, MEM_freeN, MEM_SAFE_FREE, and NULL.
Referenced by gpencil_sculpt_brush_exit().
|
static |
Definition at line 914 of file gpencil_sculpt_paint.c.
References add_v3_v3(), C, tGP_BrushEditData::customdata, data, ED_gpencil_stroke_can_use(), ListBase::first, float(), gpencil_copybuf_validate_colormap(), gpencil_strokes_copypastebuf, MEM_callocN, mul_v3_fl(), mul_v3_v3fl(), bGPDstroke::next, bGPDstroke::points, bGPDstroke::totpoints, and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_init().
|
static |
Definition at line 537 of file gpencil_sculpt_paint.c.
References add_v3_v3v3(), BLI_ghash_lookup(), copy_m4_m4(), copy_v3_v3(), data, tGP_BrushEditData::dvec, gpencil_brush_grab_calc_dvec(), gpencil_sculpt_compute_lock_axis(), invert_m4_m4(), mul_m4_v3(), mul_v3_m4v3(), mul_v3_v3fl(), NULL, bGPDstroke::points, tGP_BrushEditData::rot_eval, tGP_BrushEditData::stroke_customdata, bGPDspoint::x, and zero_axis_bias_m4().
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 510 of file gpencil_sculpt_paint.c.
References copy_v2_v2(), KDL::cos(), tGP_BrushEditData::dvec, ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), float(), Object::loc, tGP_BrushEditData::mval, tGP_BrushEditData::mval_prev, tGP_BrushEditData::object, r, tGP_BrushEditData::region, ARegion::regiondata, tGP_BrushEditData::rot_eval, and KDL::sin().
Referenced by gpencil_brush_clone_adjust(), gpencil_brush_grab_apply_cached(), and gpencil_sculpt_brush_apply_standard().
|
static |
Definition at line 486 of file gpencil_sculpt_paint.c.
References BLI_assert, BLI_ghash_lookup(), data, gpencil_brush_influence_calc(), NULL, and tGP_BrushEditData::stroke_customdata.
Referenced by gpencil_sculpt_brush_do_frame().
Definition at line 580 of file gpencil_sculpt_paint.c.
References data, MEM_freeN, MEM_SAFE_FREE, and ptr.
Referenced by gpencil_sculpt_brush_exit().
|
static |
Initialize custom data for handling this stroke.
Definition at line 448 of file gpencil_sculpt_paint.c.
References BLI_assert, BLI_ghash_haskey(), BLI_ghash_insert(), BLI_ghash_lookup(), data, MEM_callocN, NULL, tGP_BrushEditData::stroke_customdata, and bGPDstroke::totpoints.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 246 of file gpencil_sculpt_paint.c.
References Brush::alpha, BKE_brush_curve_strength(), tGP_BrushEditData::brush, blender::math::distance(), BrushGpencilSettings::flag, float(), GP_BRUSH_USE_PRESSURE, Brush::gpencil_settings, len_v2v2_int(), tGP_BrushEditData::mf_falloff, tGP_BrushEditData::mval, tGP_BrushEditData::pressure, and round_v2i_v2fl().
Referenced by gpencil_brush_clone_adjust(), gpencil_brush_grab_store_points(), gpencil_brush_pinch_apply(), gpencil_brush_push_apply(), gpencil_brush_randomize_apply(), gpencil_brush_smooth_apply(), gpencil_brush_strength_apply(), gpencil_brush_thickness_apply(), and gpencil_brush_twist_apply().
|
static |
Definition at line 224 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::brush, BRUSH_DIR_IN, tGP_BrushEditData::flag, GP_SCULPT_FLAG_INVERT, GP_SCULPT_FLAG_TMP_INVERT, Brush::gpencil_settings, invert(), and BrushGpencilSettings::sculpt_flag.
Referenced by gpencil_brush_pinch_apply(), gpencil_brush_strength_apply(), gpencil_brush_thickness_apply(), and gpencil_brush_twist_apply().
|
static |
Definition at line 652 of file gpencil_sculpt_paint.c.
References add_v3_v3v3(), copy_v3_v3(), tGP_BrushEditData::dvec, gpencil_brush_influence_calc(), gpencil_brush_invert_check(), gpencil_sculpt_compute_lock_axis(), Object::imat, mul_v3_fl(), mul_v3_m4v3(), tGP_BrushEditData::object, Object::obmat, bGPDstroke::points, sub_v3_v3v3(), and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 596 of file gpencil_sculpt_paint.c.
References add_v3_v3(), copy_v3_v3(), tGP_BrushEditData::dvec, gpencil_brush_influence_calc(), gpencil_sculpt_compute_lock_axis(), tGP_BrushEditData::inv_mat, mul_mat3_m4_v3(), mul_v3_v3fl(), bGPDstroke::points, and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 792 of file gpencil_sculpt_paint.c.
References add_v3_v3(), BLI_rng_get_float(), tGP_BrushEditData::brush, CLAMP, CLAMP_MAX, CLAMP_MIN, copy_v3_v3(), ED_view3d_calc_zfac_ex(), ED_view3d_win_to_delta(), bGPDstroke::flag, float(), GP_SCULPT_FLAGMODE_APPLY_POSITION, GP_SCULPT_FLAGMODE_APPLY_STRENGTH, GP_SCULPT_FLAGMODE_APPLY_THICKNESS, GP_SCULPT_FLAGMODE_APPLY_UV, GP_STROKE_3DSPACE, gpencil_brush_influence_calc(), gpencil_sculpt_compute_lock_axis(), Brush::gpencil_settings, tGP_BrushEditData::gsc, M_PI_2, mul_v2_fl(), tGP_BrushEditData::mval, tGP_BrushEditData::mval_prev, bGPDstroke::points, bGPDspoint::pressure, GP_SpaceConversion::region, tGP_BrushEditData::region, ARegion::regiondata, tGP_BrushEditData::rng, BrushGpencilSettings::sculpt_mode_flag, bGPDspoint::strength, bGPDspoint::uv_rot, and bGPDspoint::x.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 325 of file gpencil_sculpt_paint.c.
References BKE_gpencil_stroke_smooth_point(), BKE_gpencil_stroke_smooth_strength(), BKE_gpencil_stroke_smooth_thickness(), BKE_gpencil_stroke_smooth_uv(), tGP_BrushEditData::brush, GP_SCULPT_FLAGMODE_APPLY_POSITION, GP_SCULPT_FLAGMODE_APPLY_STRENGTH, GP_SCULPT_FLAGMODE_APPLY_THICKNESS, GP_SCULPT_FLAGMODE_APPLY_UV, gpencil_brush_influence_calc(), Brush::gpencil_settings, and BrushGpencilSettings::sculpt_mode_flag.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 399 of file gpencil_sculpt_paint.c.
References clamp_f(), gpencil_brush_influence_calc(), gpencil_brush_invert_check(), bGPDstroke::points, and bGPDspoint::strength.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 355 of file gpencil_sculpt_paint.c.
References gpencil_brush_influence_calc(), gpencil_brush_invert_check(), bGPDstroke::points, and bGPDspoint::pressure.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 709 of file gpencil_sculpt_paint.c.
References add_v3_v3v3(), angle(), axis_angle_normalized_to_mat3(), copy_v2_v2(), copy_v3_v3(), DEG2RADF, tGP_BrushEditData::dvec, bGPDstroke::flag, float(), GP_STROKE_2DSPACE, GP_STROKE_3DSPACE, gpencil_brush_influence_calc(), gpencil_brush_invert_check(), gpencil_sculpt_compute_lock_axis(), tGP_BrushEditData::gsc, Object::imat, mul_m3_v3(), mul_v3_m4v3(), tGP_BrushEditData::mval, negate_v3_v3(), normalize_v3(), tGP_BrushEditData::object, Object::obmat, RegionView3D::persinv, bGPDstroke::points, tGP_BrushEditData::region, ARegion::regiondata, sub_v3_v3v3(), UI_view2d_region_to_view(), GP_SpaceConversion::v2d, bGPDspoint::x, and bGPDspoint::y.
Referenced by gpencil_sculpt_brush_do_frame().
void GPENCIL_OT_sculpt_paint | ( | struct wmOperatorType * | ot | ) |
Also used for weight paint.
Definition at line 2332 of file gpencil_sculpt_paint.c.
References wmOperatorType::cancel, wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, gpencil_sculpt_brush_exec(), gpencil_sculpt_brush_exit(), gpencil_sculpt_brush_invoke(), gpencil_sculpt_brush_modal(), gpencil_sculpt_brush_poll(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_property_flag(), and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
|
static |
Definition at line 277 of file gpencil_sculpt_paint.c.
References bGPDstroke::flag, GP_STROKE_TAG, bGPDstroke_Runtime::gps_orig, and bGPDstroke::runtime.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 1970 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::automasking_ready, tGP_BrushEditData::brush, tGP_BrushEditData::brush_rect, C, wmOperator::customdata, DEG_id_tag_update(), tGP_BrushEditData::first, tGP_BrushEditData::flag, Brush::flag, get_automasking_strokes_list(), GP_BRUSH_USE_PRESSURE, GP_SCULPT_FLAG_INVERT, GP_SCULPT_FLAGMODE_AUTOMASK_LAYER, GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL, GP_SCULPT_FLAGMODE_AUTOMASK_STROKE, tGP_BrushEditData::gpd, gpencil_sculpt_brush_apply_clone(), gpencil_sculpt_brush_apply_standard(), Brush::gpencil_sculpt_tool, Brush::gpencil_settings, GPSCULPT_TOOL_CLONE, bGPdata::id, ID_RECALC_GEOMETRY, tGP_BrushEditData::mval, tGP_BrushEditData::mval_prev, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, tGP_BrushEditData::pressure, tGP_BrushEditData::pressure_prev, RNA_boolean_get(), RNA_float_get(), RNA_float_get_array(), BrushGpencilSettings::sculpt_mode_flag, Brush::size, WM_event_add_notifier(), rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by gpencil_sculpt_brush_apply_event(), and gpencil_sculpt_brush_exec().
|
static |
Definition at line 1094 of file gpencil_sculpt_paint.c.
References C, tGP_BrushEditData::first, gpencil_brush_clone_add(), and gpencil_brush_clone_adjust().
Referenced by gpencil_sculpt_brush_apply().
|
static |
Definition at line 2053 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::automasking_strokes, BLI_ghash_free(), BLI_ghash_ptr_new(), tGP_BrushEditData::brush, tGP_BrushEditData::brush_prev, C, wmOperator::customdata, tGP_BrushEditData::first, GP_SCULPT_FLAGMODE_AUTOMASK_LAYER, GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL, GP_SCULPT_FLAGMODE_AUTOMASK_STROKE, gpencil_sculpt_brush_apply(), gpencil_sculpt_get_smooth_brush(), Brush::gpencil_settings, KM_CTRL, KM_SHIFT, wmEvent::modifier, NULL, wmOperator::ptr, RNA_boolean_set(), RNA_collection_add(), RNA_float_set(), RNA_float_set_array(), and BrushGpencilSettings::sculpt_mode_flag.
Referenced by gpencil_sculpt_brush_invoke(), and gpencil_sculpt_brush_modal().
|
static |
Definition at line 1873 of file gpencil_sculpt_paint.c.
References BKE_gpencil_frame_range_selected(), BKE_gpencil_layer_is_editable(), BKE_gpencil_layer_transform_matrix_get(), BKE_gpencil_multiframe_falloff_calc(), tGP_BrushEditData::brush, C, GP_Sculpt_Settings::cur_falloff, Object::data, DEG_get_evaluated_id(), depsgraph, tGP_BrushEditData::depsgraph, GP_FRAME_SELECT, ToolSettings::gp_sculpt, gpencil_brush_calc_midpoint(), gpencil_brush_grab_calc_dvec(), gpencil_sculpt_brush_do_frame(), Brush::gpencil_sculpt_tool, GPSCULPT_TOOL_GRAB, GPSCULPT_TOOL_PINCH, GPSCULPT_TOOL_PUSH, GPSCULPT_TOOL_RANDOMIZE, GPSCULPT_TOOL_TWIST, Object::id, tGP_BrushEditData::is_multiframe, bGPdata::layers, LISTBASE_FOREACH, tGP_BrushEditData::mf_falloff, mul_m4_m4m4(), NULL, tGP_BrushEditData::object, tGP_BrushEditData::rot_eval, tGP_BrushEditData::scene, Scene::toolsettings, and tGP_BrushEditData::use_multiframe_falloff.
Referenced by gpencil_sculpt_brush_apply().
|
static |
Definition at line 1595 of file gpencil_sculpt_paint.c.
References bGPDlayer::actframe, tGP_BrushEditData::automasking_strokes, BKE_gpencil_layer_transform_matrix_get(), BKE_gpencil_material_settings(), BKE_gpencil_stroke_geometry_update(), BKE_gpencil_tag_full_update(), BLI_ghash_haskey(), tGP_BrushEditData::brush, C, Object::data, tGP_BrushEditData::depsgraph, ED_gpencil_stroke_can_use(), ED_gpencil_stroke_check_collision(), ED_gpencil_stroke_material_editable(), tGP_BrushEditData::first, Brush::flag, MaterialGPencilStyle::flag, GP_BRUSH_USE_PRESSURE, GP_MATERIAL_FILL_SHOW, GP_SCULPT_FLAGMODE_AUTOMASK_LAYER, GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL, GP_SCULPT_FLAGMODE_AUTOMASK_STROKE, gpencil_brush_grab_apply_cached(), gpencil_brush_grab_store_points(), gpencil_brush_grab_stroke_init(), gpencil_brush_pinch_apply(), gpencil_brush_push_apply(), gpencil_brush_randomize_apply(), gpencil_brush_smooth_apply(), gpencil_brush_strength_apply(), gpencil_brush_thickness_apply(), gpencil_brush_twist_apply(), gpencil_recalc_geometry_tag(), gpencil_sculpt_brush_do_stroke(), Brush::gpencil_sculpt_tool, Brush::gpencil_settings, bGPDframe_Runtime::gpf_orig, bGPDlayer_Runtime::gpl_orig, bGPDstroke_Runtime::gps_orig, GPSCULPT_TOOL_GRAB, GPSCULPT_TOOL_PINCH, GPSCULPT_TOOL_PUSH, GPSCULPT_TOOL_RANDOMIZE, GPSCULPT_TOOL_SMOOTH, GPSCULPT_TOOL_STRENGTH, GPSCULPT_TOOL_THICKNESS, GPSCULPT_TOOL_TWIST, tGP_BrushEditData::gsc, if(), LISTBASE_FOREACH, bGPDstroke::mat_nr, tGP_BrushEditData::mval, NULL, tGP_BrushEditData::object, tGP_BrushEditData::pressure, bGPDstroke::runtime, bGPDframe::runtime, bGPDlayer::runtime, BrushGpencilSettings::sculpt_mode_flag, Brush::size, bGPDframe::strokes, and bGPDstroke::totpoints.
Referenced by gpencil_sculpt_brush_apply_standard().
|
static |
Definition at line 1447 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::brush, tGP_BrushEditData::brush_rect, Brush::flag, GP_BRUSH_USE_PRESSURE, GPENCIL_ANY_SCULPT_MASK, Brush::gpencil_sculpt_tool, bGPDstroke_Runtime::gps_orig, tGP_BrushEditData::gsc, tGP_BrushEditData::mask, NULL, tGP_BrushEditData::pressure, bGPDstroke::runtime, and Brush::size.
Referenced by gpencil_sculpt_brush_do_frame().
|
static |
Definition at line 2111 of file gpencil_sculpt_paint.c.
References C, gpencil_sculpt_brush_apply(), gpencil_sculpt_brush_exit(), gpencil_sculpt_brush_init(), OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_BEGIN, and RNA_END.
Referenced by GPENCIL_OT_sculpt_paint().
|
static |
Definition at line 1274 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::automasking_strokes, BLI_ghash_free(), BLI_rng_free(), tGP_BrushEditData::brush, C, CTX_wm_manager(), CTX_wm_window(), wmOperator::customdata, ED_workspace_status_text(), GP_SCULPT_FLAG_TMP_INVERT, tGP_BrushEditData::gpd, gpencil_brush_clone_free(), gpencil_brush_grab_stroke_free(), Brush::gpencil_sculpt_tool, Brush::gpencil_settings, gpencil_update_geometry(), GPSCULPT_TOOL_CLONE, GPSCULPT_TOOL_GRAB, MEM_freeN, NULL, tGP_BrushEditData::rng, BrushGpencilSettings::sculpt_flag, tGP_BrushEditData::stroke_customdata, tGP_BrushEditData::timer, and WM_event_remove_timer().
Referenced by GPENCIL_OT_sculpt_paint(), gpencil_sculpt_brush_exec(), and gpencil_sculpt_brush_modal().
|
static |
Definition at line 1121 of file gpencil_sculpt_paint.c.
References BLI_snprintf(), tGP_BrushEditData::brush, C, ED_workspace_status_text(), Brush::id, ID::name, str, TIP_, and UI_MAX_DRAW_STR.
Referenced by gpencil_sculpt_brush_init().
|
static |
Definition at line 1141 of file gpencil_sculpt_paint.c.
References tGP_BrushEditData::area, tGP_BrushEditData::automasking_strokes, BKE_curvemapping_init(), BKE_gpencil_has_transform_modifiers(), BKE_report(), BLI_findlink(), BLI_ghash_free(), BLI_ghash_ptr_new(), BLI_rng_new(), tGP_BrushEditData::bmain, bool, tGP_BrushEditData::brush, Paint::brush, C, tGP_BrushEditData::cfra, copy_m4_m4(), CTX_data_active_object(), CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_area(), CTX_wm_region(), GP_Sculpt_Settings::cur_falloff, Brush::curve, wmOperator::customdata, tGP_BrushEditData::depsgraph, ED_gpencil_data_get_active(), ED_gpencil_stroke_can_use(), tGP_BrushEditData::first, ListBase::first, GP_Sculpt_Settings::flag, ToolSettings::gp_sculpt, GP_SCULPT_FLAGMODE_AUTOMASK_LAYER, GP_SCULPT_FLAGMODE_AUTOMASK_MATERIAL, GP_SCULPT_FLAGMODE_AUTOMASK_STROKE, GP_SCULPT_SETT_FLAG_FRAME_FALLOFF, ToolSettings::gp_sculptpaint, tGP_BrushEditData::gpd, gpencil_brush_clone_init(), GPENCIL_MULTIEDIT_SESSIONS_ON, gpencil_point_conversion_init(), gpencil_sculpt_brush_header_set(), gpencil_sculpt_get_settings(), Brush::gpencil_sculpt_tool, ToolSettings::gpencil_selectmode_sculpt, Brush::gpencil_settings, gpencil_strokes_copypastebuf, GPSCULPT_TOOL_CLONE, GPSCULPT_TOOL_GRAB, tGP_BrushEditData::gsc, tGP_BrushEditData::inv_mat, invert_m4_m4(), tGP_BrushEditData::is_multiframe, tGP_BrushEditData::is_painting, tGP_BrushEditData::is_transformed, tGP_BrushEditData::mask, MEM_callocN, MEM_freeN, tGP_BrushEditData::mval_prev, bGPDstroke::next, NULL, tGP_BrushEditData::object, Object::obmat, GpSculptPaint::paint, PIL_check_seconds_timer_i(), POINTER_AS_UINT, tGP_BrushEditData::region, wmOperator::reports, tGP_BrushEditData::rng, RPT_ERROR, scene, tGP_BrushEditData::scene, BrushGpencilSettings::sculpt_mode_flag, tGP_BrushEditData::settings, tGP_BrushEditData::stroke_customdata, Scene::toolsettings, UINT_MAX, unit_m4(), tGP_BrushEditData::use_multiframe_falloff, bGPdata::vertex_group_active_index, bGPdata::vertex_group_names, tGP_BrushEditData::vrgroup, and zero_axis_bias_m4().
Referenced by gpencil_sculpt_brush_exec(), and gpencil_sculpt_brush_invoke().
|
static |
Definition at line 1346 of file gpencil_sculpt_paint.c.
References BKE_gpencil_frame_addcopy(), BKE_gpencil_layer_is_editable(), BKE_gpencil_tag_full_update(), C, tGP_BrushEditData::cfra, RenderData::cfra, DEG_id_tag_update(), bGPDframe::framenum, tGP_BrushEditData::gpd, bGPdata::id, ID_RECALC_GEOMETRY, IS_AUTOKEY_ON, bGPdata::layers, LISTBASE_FOREACH, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, Scene::r, scene, tGP_BrushEditData::scene, and WM_event_add_notifier().
Referenced by gpencil_sculpt_brush_invoke(), and gpencil_sculpt_brush_modal().
|
static |
Definition at line 2128 of file gpencil_sculpt_paint.c.
References BKE_report(), tGP_BrushEditData::brush, C, CTX_wm_manager(), CTX_wm_region(), CTX_wm_window(), wmOperator::customdata, ED_region_tag_redraw(), ED_screen_animation_playing(), gpencil_sculpt_brush_apply_event(), gpencil_sculpt_brush_init(), gpencil_sculpt_brush_init_stroke(), Brush::gpencil_sculpt_tool, GPSCULPT_TOOL_PINCH, GPSCULPT_TOOL_STRENGTH, GPSCULPT_TOOL_THICKNESS, GPSCULPT_TOOL_TWIST, tGP_BrushEditData::is_painting, NULL, OPERATOR_CANCELLED, OPERATOR_RUNNING_MODAL, wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, tGP_BrushEditData::timer, TIMER, WM_event_add_modal_handler(), and WM_event_add_timer().
Referenced by GPENCIL_OT_sculpt_paint().
|
static |
Definition at line 2205 of file gpencil_sculpt_paint.c.
References BLI_assert, C, CTX_wm_region(), wmOperator::customdata, wmEvent::customdata, DEG_id_tag_update(), ED_region_tag_redraw(), EVT_DOWNARROWKEY, EVT_ESCKEY, EVT_LEFTARROWKEY, EVT_PAD0, EVT_PAD1, EVT_PAD2, EVT_PAD3, EVT_PAD4, EVT_PAD5, EVT_PAD6, EVT_PAD7, EVT_PAD8, EVT_PAD9, EVT_RIGHTARROWKEY, EVT_UPARROWKEY, tGP_BrushEditData::first, tGP_BrushEditData::gpd, gpencil_sculpt_brush_apply_event(), gpencil_sculpt_brush_exit(), gpencil_sculpt_brush_init_stroke(), bGPdata::id, ID_RECALC_GEOMETRY, INBETWEEN_MOUSEMOVE, tGP_BrushEditData::is_painting, LEFTMOUSE, MIDDLEMOUSE, MOUSEMOVE, NC_SCENE, ND_TOOLSETTINGS, NULL, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, wmOperator::ptr, RIGHTMOUSE, RNA_boolean_get(), tGP_BrushEditData::timer, TIMER, tGP_BrushEditData::timerTick, wmEvent::type, and WM_event_add_notifier().
Referenced by GPENCIL_OT_sculpt_paint().
Definition at line 1333 of file gpencil_sculpt_paint.c.
References blender::compositor::area(), C, CTX_DATA_COUNT, CTX_wm_area(), and SPACE_VIEW3D.
Referenced by GPENCIL_OT_sculpt_paint().
|
static |
Definition at line 167 of file gpencil_sculpt_paint.c.
References closest_to_plane_v3(), copy_v3_v3(), Scene::cursor, GP_LOCKAXIS_CURSOR, GP_LOCKAXIS_X, GP_LOCKAXIS_Y, GP_LOCKAXIS_Z, ToolSettings::gp_sculpt, loc_eul_size_to_mat4(), View3DCursor::location, GP_Sculpt_Settings::lock_axis, mul_mat3_m4_v3(), plane_from_point_normal_v3(), View3DCursor::rotation_euler, tGP_BrushEditData::scene, Scene::toolsettings, bGPDspoint::x, bGPDspoint::y, and bGPDspoint::z.
Referenced by gpencil_brush_grab_apply_cached(), gpencil_brush_pinch_apply(), gpencil_brush_push_apply(), gpencil_brush_randomize_apply(), and gpencil_brush_twist_apply().
|
static |
Definition at line 216 of file gpencil_sculpt_paint.c.
References ToolSettings::gp_sculpt, scene, and Scene::toolsettings.
Referenced by gpencil_sculpt_brush_init().
|
static |
Definition at line 2044 of file gpencil_sculpt_paint.c.
References BLI_findstring(), tGP_BrushEditData::bmain, and Main::brushes.
Referenced by gpencil_sculpt_brush_apply_event().
|
static |
Definition at line 1393 of file gpencil_sculpt_paint.c.
References angle_v2v2(), GP_STROKE_3DSPACE, tGP_BrushEditData::gpd, GPENCIL_MULTIEDIT_SESSIONS_ON, gpencil_point_3d_to_xy(), bGPDstroke_Runtime::gps_orig, tGP_BrushEditData::gsc, bGPDspoint_Runtime::idx_orig, if(), tGP_BrushEditData::is_transformed, NULL, bGPDstroke::points, bGPDspoint::runtime, bGPDstroke::runtime, sub_v2_v2(), bGPDstroke::totpoints, and bGPDspoint::x.
Definition at line 284 of file gpencil_sculpt_paint.c.
References BKE_gpencil_stroke_geometry_update(), BKE_gpencil_tag_full_update(), DEG_id_tag_update(), GP_FRAME_SELECT, GP_STROKE_TAG, bGPdata::id, ID_RECALC_GEOMETRY, bGPdata::layers, LISTBASE_FOREACH, NA_EDITED, NC_GPENCIL, ND_DATA, NULL, and WM_main_add_notifier().
Referenced by gpencil_sculpt_brush_exit().