Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
#include "BLI_pbvh.h"
#include "BLI_threads.h"
#include "BLI_editVert.h"
#include "BLI_rand.h"
#include "DNA_meshdata_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_brush_types.h"
#include "BKE_brush.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_key.h"
#include "BKE_library.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_paint.h"
#include "BKE_report.h"
#include "BKE_lattice.h"
#include "BKE_node.h"
#include "BIF_glutil.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_sculpt.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RE_render_ext.h"
#include "GPU_buffers.h"
#include <math.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Classes | |
struct | StrokeCache |
struct | SculptBrushTest |
struct | SculptSearchSphereData |
struct | SculptRaycastData |
Typedefs | |
typedef enum StrokeFlags | StrokeFlags |
typedef struct StrokeCache | StrokeCache |
typedef struct SculptBrushTest | SculptBrushTest |
Enumerations | |
enum | StrokeFlags { CLIP_X = 1, CLIP_Y = 2, CLIP_Z = 4 } |
Functions | |
void | ED_sculpt_force_update (bContext *C) |
struct MultiresModifierData * | sculpt_multires_active (Scene *scene, Object *ob) |
static int | sculpt_has_active_modifiers (Scene *scene, Object *ob) |
static int | sculpt_modifiers_active (Scene *scene, Sculpt *sd, Object *ob) |
static int | sculpt_get_redraw_rect (ARegion *ar, RegionView3D *rv3d, Object *ob, rcti *rect) |
void | sculpt_get_redraw_planes (float planes[4][4], ARegion *ar, RegionView3D *rv3d, Object *ob) |
static void | sculpt_brush_test_init (SculptSession *ss, SculptBrushTest *test) |
static int | sculpt_brush_test (SculptBrushTest *test, float co[3]) |
static int | sculpt_brush_test_sq (SculptBrushTest *test, float co[3]) |
static int | sculpt_brush_test_fast (SculptBrushTest *test, float co[3]) |
static int | sculpt_brush_test_cube (SculptBrushTest *test, float co[3], float local[4][4]) |
static float | frontface (Brush *brush, const float sculpt_normal[3], const short no[3], const float fno[3]) |
static float | overlapped_curve (Brush *br, float x) |
static float | integrate_overlap (Brush *br) |
static void | flip_coord (float out[3], float in[3], const char symm) |
static float | calc_overlap (StrokeCache *cache, const char symm, const char axis, const float angle) |
static float | calc_radial_symmetry_feather (Sculpt *sd, StrokeCache *cache, const char symm, const char axis) |
static float | calc_symmetry_feather (Sculpt *sd, StrokeCache *cache) |
static float | brush_strength (Sculpt *sd, StrokeCache *cache, float feather) |
static float | tex_strength (SculptSession *ss, Brush *br, float point[3], const float len, const float sculpt_normal[3], const short vno[3], const float fno[3]) |
static int | sculpt_search_sphere_cb (PBVHNode *node, void *data_v) |
static void | sculpt_clip (Sculpt *sd, SculptSession *ss, float *co, const float val[3]) |
static void | add_norm_if (float view_vec[3], float out[3], float out_flip[3], float fno[3]) |
static void | calc_area_normal (Sculpt *sd, Object *ob, float an[3], PBVHNode **nodes, int totnode) |
static void | calc_sculpt_normal (Sculpt *sd, Object *ob, float an[3], PBVHNode **nodes, int totnode) |
static void | neighbor_average (SculptSession *ss, float avg[3], const unsigned vert) |
static void | do_mesh_smooth_brush (Sculpt *sd, SculptSession *ss, PBVHNode *node, float bstrength) |
static void | do_multires_smooth_brush (Sculpt *sd, SculptSession *ss, PBVHNode *node, float bstrength) |
static void | smooth (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float bstrength) |
static void | do_smooth_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_draw_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_crease_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_pinch_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_grab_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_nudge_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_snake_hook_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_thumb_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_rotate_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_layer_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_inflate_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | calc_flatten_center (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float fc[3]) |
static void | calc_area_normal_and_flatten_center (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float an[3], float fc[3]) |
static void | calc_sculpt_plane (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode, float an[3], float fc[3]) |
static void | point_plane_project (float intr[3], float co[3], float plane_normal[3], float plane_center[3]) |
static int | plane_trim (StrokeCache *cache, Brush *brush, float val[3]) |
static int | plane_point_side_flip (float co[3], float plane_normal[3], float plane_center[3], int flip) |
static int | plane_point_side (float co[3], float plane_normal[3], float plane_center[3]) |
static float | get_offset (Sculpt *sd, SculptSession *ss) |
static void | do_flatten_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_clay_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_clay_tubes_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_fill_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
static void | do_scrape_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode) |
void | sculpt_vertcos_to_key (Object *ob, KeyBlock *kb, float(*vertCos)[3]) |
static void | do_brush_action (Sculpt *sd, Object *ob, Brush *brush) |
static void | sculpt_flush_pbvhvert_deform (Object *ob, PBVHVertexIter *vd) |
static void | sculpt_combine_proxies (Sculpt *sd, Object *ob) |
static void | sculpt_update_keyblock (Object *ob) |
static void | sculpt_flush_stroke_deform (Sculpt *sd, Object *ob) |
static void | calc_brushdata_symm (Sculpt *sd, StrokeCache *cache, const char symm, const char axis, const float angle, const float UNUSED(feather)) |
static void | do_radial_symmetry (Sculpt *sd, Object *ob, Brush *brush, const char symm, const int axis, const float feather) |
static void | sculpt_fix_noise_tear (Sculpt *sd, Object *ob) |
static void | do_symmetrical_brush_actions (Sculpt *sd, Object *ob) |
static void | sculpt_update_tex (const Scene *scene, Sculpt *sd, SculptSession *ss) |
void | sculpt_update_mesh_elements (Scene *scene, Sculpt *sd, Object *ob, int need_fmap) |
static int | sculpt_mode_poll (bContext *C) |
int | sculpt_poll (bContext *C) |
static const char * | sculpt_tool_name (Sculpt *sd) |
static void | sculpt_cache_free (StrokeCache *cache) |
static void | sculpt_init_mirror_clipping (Object *ob, SculptSession *ss) |
static void | sculpt_update_cache_invariants (bContext *C, Sculpt *sd, SculptSession *ss, wmOperator *op, wmEvent *event) |
static void | sculpt_update_brush_delta (Sculpt *sd, Object *ob, Brush *brush) |
static void | sculpt_update_cache_variants (bContext *C, Sculpt *sd, Object *ob, struct PaintStroke *stroke, PointerRNA *ptr) |
static void | sculpt_stroke_modifiers_check (bContext *C, Object *ob) |
static void | sculpt_raycast_cb (PBVHNode *node, void *data_v, float *tmin) |
int | sculpt_stroke_get_location (bContext *C, struct PaintStroke *stroke, float out[3], float mouse[2]) |
static void | sculpt_brush_init_tex (const Scene *scene, Sculpt *sd, SculptSession *ss) |
static int | sculpt_brush_stroke_init (bContext *C, wmOperator *op) |
static void | sculpt_restore_mesh (Sculpt *sd, SculptSession *ss) |
static void | sculpt_flush_update (bContext *C) |
static int | over_mesh (bContext *C, struct wmOperator *op, float x, float y) |
static int | sculpt_stroke_test_start (bContext *C, struct wmOperator *op, wmEvent *event) |
static void | sculpt_stroke_update_step (bContext *C, struct PaintStroke *stroke, PointerRNA *itemptr) |
static void | sculpt_brush_exit_tex (Sculpt *sd) |
static void | sculpt_stroke_done (bContext *C, struct PaintStroke *UNUSED(stroke)) |
static int | sculpt_brush_stroke_invoke (bContext *C, wmOperator *op, wmEvent *event) |
static int | sculpt_brush_stroke_exec (bContext *C, wmOperator *op) |
static int | sculpt_brush_stroke_cancel (bContext *C, wmOperator *op) |
static void | SCULPT_OT_brush_stroke (wmOperatorType *ot) |
static int | sculpt_set_persistent_base (bContext *C, wmOperator *UNUSED(op)) |
static void | SCULPT_OT_set_persistent_base (wmOperatorType *ot) |
static void | sculpt_init_session (Scene *scene, Object *ob) |
static int | sculpt_toggle_mode (bContext *C, wmOperator *UNUSED(op)) |
static void | SCULPT_OT_sculptmode_toggle (wmOperatorType *ot) |
void | ED_operatortypes_sculpt (void) |
Definition in file sculpt.c.
typedef struct SculptBrushTest SculptBrushTest |
typedef struct StrokeCache StrokeCache |
typedef enum StrokeFlags StrokeFlags |
enum StrokeFlags |
static void add_norm_if | ( | float | view_vec[3], |
float | out[3], | ||
float | out_flip[3], | ||
float | fno[3] | ||
) | [static] |
Definition at line 780 of file sculpt.c.
References add_v3_v3(), and dot_v3v3().
Referenced by calc_area_normal(), and calc_area_normal_and_flatten_center().
static float brush_strength | ( | Sculpt * | sd, |
StrokeCache * | cache, | ||
float | feather | ||
) | [static] |
Definition at line 544 of file sculpt.c.
References brush_alpha(), BRUSH_ANCHORED, BRUSH_DIR_IN, BRUSH_SPACE, BRUSH_SPACE_ATTEN, brush_use_alpha_pressure(), Brush::flag, integrate_overlap(), StrokeCache::invert, invert(), Sculpt::paint, paint_brush(), StrokeCache::pen_flip, StrokeCache::pressure, ViewContext::scene, Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PINCH, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, Brush::spacing, and StrokeCache::vc.
Referenced by do_symmetrical_brush_actions().
static void calc_area_normal | ( | Sculpt * | sd, |
Object * | ob, | ||
float | an[3], | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) | [static] |
Definition at line 789 of file sculpt.c.
References add_norm_if(), add_v3_v3(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, SculptSession::cache, PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), PBVHVertexIter::fno, PBVHVertexIter::i, is_zero_v3(), PBVHVertexIter::no, SculptUndoNode::no, normal_short_to_float_v3(), normalize_v3(), StrokeCache::original, SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test_fast(), sculpt_brush_test_init(), sculpt_undo_push_node(), rna_array::test, StrokeCache::view_normal, and zero_v3().
Referenced by calc_sculpt_normal(), and do_clay_tubes_brush().
static void calc_area_normal_and_flatten_center | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | an[3], | ||
float | fc[3] | ||
) | [static] |
Definition at line 1687 of file sculpt.c.
References add_norm_if(), add_v3_v3(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, SculptSession::cache, PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), PBVHVertexIter::fno, PBVHVertexIter::i, is_zero_v3(), mul_v3_fl(), PBVHVertexIter::no, SculptUndoNode::no, normal_short_to_float_v3(), normalize_v3(), StrokeCache::original, SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test_fast(), sculpt_brush_test_init(), sculpt_undo_push_node(), rna_array::test, StrokeCache::view_normal, and zero_v3().
Referenced by calc_sculpt_plane().
static void calc_brushdata_symm | ( | Sculpt * | sd, |
StrokeCache * | cache, | ||
const char | symm, | ||
const char | axis, | ||
const float | angle, | ||
const float | UNUSEDfeather | ||
) | [static] |
Definition at line 2561 of file sculpt.c.
References flip_coord(), StrokeCache::grab_delta, StrokeCache::grab_delta_symmetry, StrokeCache::location, mul_m4_v3(), rotate_m4(), StrokeCache::symm_rot_mat, StrokeCache::symm_rot_mat_inv, StrokeCache::true_location, StrokeCache::true_view_normal, unit_m4(), and StrokeCache::view_normal.
Referenced by do_radial_symmetry(), and do_symmetrical_brush_actions().
static void calc_flatten_center | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | fc[3] | ||
) | [static] |
Definition at line 1634 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, SculptSession::cache, PBVHVertexIter::co, SculptUndoNode::co, PBVHVertexIter::i, mul_v3_fl(), StrokeCache::original, SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test_fast(), sculpt_brush_test_init(), sculpt_undo_push_node(), rna_array::test, and zero_v3().
Referenced by calc_sculpt_plane().
static float calc_overlap | ( | StrokeCache * | cache, |
const char | symm, | ||
const char | axis, | ||
const float | angle | ||
) | [static] |
Definition at line 478 of file sculpt.c.
References flip_coord(), len_squared_v3v3(), MAT4_UNITY, mul_m4_v3(), StrokeCache::radius, StrokeCache::radius_squared, rotate_m4(), sqrtf, and StrokeCache::true_location.
Referenced by calc_radial_symmetry_feather(), and calc_symmetry_feather().
static float calc_radial_symmetry_feather | ( | Sculpt * | sd, |
StrokeCache * | cache, | ||
const char | symm, | ||
const char | axis | ||
) | [static] |
Definition at line 501 of file sculpt.c.
References angle(), calc_overlap(), i, M_PI, and Sculpt::radial_symm.
Referenced by calc_symmetry_feather().
static void calc_sculpt_normal | ( | Sculpt * | sd, |
Object * | ob, | ||
float | an[3], | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) | [static] |
Definition at line 854 of file sculpt.c.
References BRUSH_ORIGINAL_NORMAL, SculptSession::cache, calc_area_normal(), copy_v3_v3(), ED_view3d_global_to_vector(), StrokeCache::first_time, Brush::flag, flip_coord(), StrokeCache::last_area_normal, StrokeCache::mirror_symmetry_pass, mul_m4_v3(), Sculpt::paint, paint_brush(), StrokeCache::radial_symmetry_pass, ViewContext::rv3d, Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, Brush::sculpt_plane, StrokeCache::symm_rot_mat, RegionView3D::twmat, and StrokeCache::vc.
Referenced by do_crease_brush(), do_draw_brush(), do_grab_brush(), do_layer_brush(), do_nudge_brush(), do_rotate_brush(), do_snake_hook_brush(), and do_thumb_brush().
static void calc_sculpt_plane | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | an[3], | ||
float | fc[3] | ||
) | [static] |
Definition at line 1786 of file sculpt.c.
References BRUSH_ORIGINAL_NORMAL, SculptSession::cache, calc_area_normal_and_flatten_center(), calc_flatten_center(), copy_v3_v3(), ED_view3d_global_to_vector(), StrokeCache::first_time, Brush::flag, flip_coord(), StrokeCache::last_area_normal, StrokeCache::last_center, StrokeCache::mirror_symmetry_pass, mul_m4_v3(), Sculpt::paint, paint_brush(), StrokeCache::radial_symmetry_pass, ViewContext::rv3d, Object::sculpt, SCULPT_DISP_DIR_AREA, SCULPT_DISP_DIR_VIEW, SCULPT_DISP_DIR_X, SCULPT_DISP_DIR_Y, SCULPT_DISP_DIR_Z, Brush::sculpt_plane, StrokeCache::symm_rot_mat, RegionView3D::twmat, and StrokeCache::vc.
Referenced by do_clay_brush(), do_clay_tubes_brush(), do_fill_brush(), do_flatten_brush(), and do_scrape_brush().
static float calc_symmetry_feather | ( | Sculpt * | sd, |
StrokeCache * | cache | ||
) | [static] |
Definition at line 515 of file sculpt.c.
References calc_overlap(), calc_radial_symmetry_feather(), Sculpt::flags, i, SCULPT_SYMMETRY_FEATHER, and StrokeCache::symmetry.
Referenced by do_symmetrical_brush_actions().
Definition at line 2311 of file sculpt.c.
References Brush::autosmooth_factor, BLI_pbvh_node_mark_update(), BLI_pbvh_search_gather(), BRUSH_INVERSE_SMOOTH_PRESSURE, SculptSession::cache, data, do_clay_brush(), do_clay_tubes_brush(), do_crease_brush(), do_draw_brush(), do_fill_brush(), do_flatten_brush(), do_grab_brush(), do_inflate_brush(), do_layer_brush(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_scrape_brush(), do_smooth_brush(), do_snake_hook_brush(), do_thumb_brush(), ELEM4, Brush::flag, MEM_freeN(), nodes, NULL, SculptSearchSphereData::original, SculptSession::pbvh, StrokeCache::pressure, StrokeCache::radius_squared, SculptSearchSphereData::radius_squared, Object::sculpt, sculpt_search_sphere_cb(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PINCH, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, sculpt_undo_push_node(), SculptSearchSphereData::sd, smooth(), and SculptSearchSphereData::ss.
Referenced by do_radial_symmetry(), and do_symmetrical_brush_actions().
Definition at line 1965 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_plane(), PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, get_offset(), PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_point_side_flip(), plane_trim(), point_plane_project(), StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test_init(), sculpt_brush_test_sq(), sqrt(), sub_v3_v3v3(), rna_array::test, tex_strength(), and simple_enum_gen::val.
Referenced by do_brush_action().
static void do_clay_tubes_brush | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) | [static] |
Definition at line 2041 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BRUSH_ORIGINAL_NORMAL, StrokeCache::bstrength, SculptSession::cache, calc_area_normal(), calc_sculpt_plane(), PBVHVertexIter::co, PBVHProxyNode::co, copy_v3_v3(), cross_v3_v3v3(), SculptBrushTest::dist, fade(), StrokeCache::first_time, MVert::flag, Brush::flag, PBVHVertexIter::fno, get_offset(), StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, invert_m4_m4(), StrokeCache::location, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), mult_m4_m4m4(), PBVHVertexIter::mvert, PBVHVertexIter::no, normalize_m4(), Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_point_side_flip(), plane_trim(), point_plane_project(), StrokeCache::radius, StrokeCache::scale, scale_m4_fl(), Object::sculpt, sculpt_brush_test_cube(), sculpt_brush_test_init(), SCULPT_DISP_DIR_AREA, Brush::sculpt_plane, sub_v3_v3v3(), rna_array::test, tex_strength(), and simple_enum_gen::val.
Referenced by do_brush_action().
Definition at line 1168 of file sculpt.c.
References add_v3_v3v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, brush_alpha(), StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHVertexIter::co, PBVHProxyNode::co, Brush::crease_pinch_factor, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::i, SculptBrushTest::location, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, StrokeCache::scale, ViewContext::scene, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, sub_v3_v3v3(), rna_array::test, tex_strength(), and StrokeCache::vc.
Referenced by do_brush_action().
Definition at line 1126 of file sculpt.c.
References BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3(), mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), rna_array::test, and tex_strength().
Referenced by do_brush_action().
Definition at line 2134 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_plane(), PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, get_offset(), PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_point_side(), plane_trim(), point_plane_project(), StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test_init(), sculpt_brush_test_sq(), sqrt(), sub_v3_v3v3(), rna_array::test, tex_strength(), and simple_enum_gen::val.
Referenced by do_brush_action().
Definition at line 1904 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_plane(), PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, get_offset(), PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_trim(), point_plane_project(), StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test_init(), sculpt_brush_test_sq(), sqrt(), sub_v3_v3v3(), rna_array::test, tex_strength(), and simple_enum_gen::val.
Referenced by do_brush_action().
Definition at line 1268 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BRUSH_FRONTFACE, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHProxyNode::co, SculptUndoNode::co, copy_v3_v3(), SculptBrushTest::dist, fade(), MVert::flag, Brush::flag, StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, len(), len_v3(), ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, SculptUndoNode::no, Brush::normal_weight, NULL, StrokeCache::original, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_undo_push_node(), SWAP, rna_array::test, and tex_strength().
Referenced by do_brush_action().
Definition at line 1597 of file sculpt.c.
References BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, PBVHProxyNode::co, copy_v3_v3(), SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, normal_short_to_float_v3(), Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), rna_array::test, tex_strength(), simple_enum_gen::val, and StrokeCache::view_normal.
Referenced by do_brush_action().
Definition at line 1524 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BRUSH_PERSISTENT, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHVertexIter::co, SculptUndoNode::co, SculptBrushTest::dist, fade(), MVert::flag, Brush::flag, PBVHVertexIter::fno, Brush::height, PBVHVertexIter::i, SculptSession::layer_co, SculptUndoNode::layer_disp, ME_VERT_PBVH_UPDATE, MEM_callocN(), mul_v3_v3fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, StrokeCache::scale, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_clip(), sculpt_undo_push_node(), rna_array::test, tex_strength(), SculptUndoNode::totvert, simple_enum_gen::val, and PBVHVertexIter::vert_indices.
Referenced by do_brush_action().
static void do_mesh_smooth_brush | ( | Sculpt * | sd, |
SculptSession * | ss, | ||
PBVHNode * | node, | ||
float | bstrength | ||
) | [static] |
Definition at line 951 of file sculpt.c.
References add_v3_v3(), avg, BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, SculptSession::cache, CLAMP(), PBVHVertexIter::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), PBVHVertexIter::mvert, neighbor_average(), PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_clip(), sub_v3_v3v3(), rna_array::test, tex_strength(), simple_enum_gen::val, PBVHVertexIter::vert_indices, and StrokeCache::view_normal.
Referenced by smooth().
static void do_multires_smooth_brush | ( | Sculpt * | sd, |
SculptSession * | ss, | ||
PBVHNode * | node, | ||
float | bstrength | ||
) | [static] |
Definition at line 982 of file sculpt.c.
References add_v3_v3(), add_v3_v3v3(), avg, BLI_pbvh_node_get_grids(), SculptSession::cache, CLAMP(), DMGridData::co, co, data, SculptBrushTest::dist, fade(), i, DMGridAdjacency::index, MEM_freeN(), MEM_mallocN(), mul_v3_fl(), DMGridData::no, NULL, Sculpt::paint, paint_brush(), SculptSession::pbvh, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_clip(), sub_v3_v3v3(), rna_array::test, tex_strength(), simple_enum_gen::val, and StrokeCache::view_normal.
Referenced by smooth().
Definition at line 1327 of file sculpt.c.
References BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHVertexIter::co, PBVHProxyNode::co, copy_v3_v3(), cross_v3_v3v3(), SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), rna_array::test, and tex_strength().
Referenced by do_brush_action().
Definition at line 1234 of file sculpt.c.
References BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, PBVHVertexIter::i, SculptBrushTest::location, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), sub_v3_v3v3(), rna_array::test, tex_strength(), simple_enum_gen::val, and StrokeCache::view_normal.
Referenced by do_brush_action().
static void do_radial_symmetry | ( | Sculpt * | sd, |
Object * | ob, | ||
Brush * | brush, | ||
const char | symm, | ||
const int | axis, | ||
const float | feather | ||
) | [static] |
Definition at line 2595 of file sculpt.c.
References SculptSession::cache, calc_brushdata_symm(), do_brush_action(), i, M_PI, Sculpt::radial_symm, StrokeCache::radial_symmetry_pass, and Object::sculpt.
Referenced by do_symmetrical_brush_actions().
Definition at line 1468 of file sculpt.c.
References angle(), axis_angle_to_mat4(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHProxyNode::co, SculptUndoNode::co, copy_v3_v3(), SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::i, invert_m4_m4(), StrokeCache::location, ME_VERT_PBVH_UPDATE, StrokeCache::mirror_symmetry_pass, mul_serie_m4(), mul_v3_fl(), mul_v3_m4v3(), PBVHVertexIter::mvert, SculptUndoNode::no, NULL, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, rot, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_undo_push_node(), sub_v3_v3(), rna_array::test, tex_strength(), unit_m4(), and StrokeCache::vertex_rotation.
Referenced by do_brush_action().
Definition at line 2197 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_plane(), PBVHVertexIter::co, PBVHProxyNode::co, SculptBrushTest::dist, fade(), MVert::flag, PBVHVertexIter::fno, get_offset(), PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), mul_v3_v3v3(), PBVHVertexIter::mvert, PBVHVertexIter::no, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, plane_point_side(), plane_trim(), point_plane_project(), StrokeCache::radius, StrokeCache::scale, Object::sculpt, sculpt_brush_test_init(), sculpt_brush_test_sq(), sqrt(), sub_v3_v3v3(), rna_array::test, tex_strength(), and simple_enum_gen::val.
Referenced by do_brush_action().
Definition at line 1120 of file sculpt.c.
References StrokeCache::bstrength, SculptSession::cache, Object::sculpt, and smooth().
Referenced by do_brush_action().
static void do_snake_hook_brush | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode | ||
) | [static] |
Definition at line 1369 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BRUSH_FRONTFACE, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHVertexIter::co, PBVHProxyNode::co, copy_v3_v3(), SculptBrushTest::dist, fade(), MVert::flag, Brush::flag, PBVHVertexIter::fno, StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, len(), len_v3(), ME_VERT_PBVH_UPDATE, mul_v3_fl(), mul_v3_v3fl(), PBVHVertexIter::mvert, negate_v3(), PBVHVertexIter::no, Brush::normal_weight, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), rna_array::test, and tex_strength().
Referenced by do_brush_action().
Definition at line 2623 of file sculpt.c.
References brush_strength(), StrokeCache::bstrength, SculptSession::cache, calc_brushdata_symm(), calc_symmetry_feather(), do_brush_action(), do_radial_symmetry(), StrokeCache::first_time, Sculpt::flags, i, StrokeCache::mirror_symmetry_pass, SculptSession::modifiers_active, Sculpt::paint, paint_brush(), StrokeCache::radial_symmetry_pass, Object::sculpt, sculpt_combine_proxies(), sculpt_fix_noise_tear(), sculpt_flush_stroke_deform(), and StrokeCache::symmetry.
Referenced by sculpt_stroke_update_step().
Definition at line 1419 of file sculpt.c.
References BLI_pbvh_node_add_proxy(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, StrokeCache::bstrength, SculptSession::cache, calc_sculpt_normal(), PBVHProxyNode::co, SculptUndoNode::co, copy_v3_v3(), cross_v3_v3v3(), SculptBrushTest::dist, fade(), MVert::flag, StrokeCache::grab_delta_symmetry, PBVHVertexIter::i, ME_VERT_PBVH_UPDATE, mul_v3_v3fl(), PBVHVertexIter::mvert, SculptUndoNode::no, NULL, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_brush_test(), sculpt_brush_test_init(), sculpt_undo_push_node(), rna_array::test, and tex_strength().
Referenced by do_brush_action().
void ED_operatortypes_sculpt | ( | void | ) |
Definition at line 3701 of file sculpt.c.
References SCULPT_OT_brush_stroke(), SCULPT_OT_sculptmode_toggle(), SCULPT_OT_set_persistent_base(), and WM_operatortype_append().
Referenced by ED_spacetypes_init().
void ED_sculpt_force_update | ( | bContext * | C | ) |
Definition at line 95 of file sculpt.c.
References CTX_data_active_object(), Object::mode, multires_force_update(), and OB_MODE_SCULPT.
Referenced by WM_write_file().
static void flip_coord | ( | float | out[3], |
float | in[3], | ||
const char | symm | ||
) | [static] |
Definition at line 462 of file sculpt.c.
References SCULPT_SYMM_X, SCULPT_SYMM_Y, and SCULPT_SYMM_Z.
Referenced by calc_brushdata_symm(), calc_overlap(), calc_sculpt_normal(), calc_sculpt_plane(), and tex_strength().
static float frontface | ( | Brush * | brush, |
const float | sculpt_normal[3], | ||
const short | no[3], | ||
const float | fno[3] | ||
) | [static] |
Definition at line 370 of file sculpt.c.
References BRUSH_FRONTFACE, dot(), dot_v3v3(), Brush::flag, and normal_short_to_float_v3().
Referenced by tex_strength().
static float get_offset | ( | Sculpt * | sd, |
SculptSession * | ss | ||
) | [static] |
Definition at line 1891 of file sculpt.c.
References BRUSH_OFFSET_PRESSURE, SculptSession::cache, Brush::flag, Sculpt::paint, paint_brush(), Brush::plane_offset, and StrokeCache::pressure.
Referenced by do_clay_brush(), do_clay_tubes_brush(), do_fill_brush(), do_flatten_brush(), and do_scrape_brush().
static float integrate_overlap | ( | Brush * | br | ) | [static] |
Definition at line 443 of file sculpt.c.
References g, i, max, and overlapped_curve().
Referenced by brush_strength().
static void neighbor_average | ( | SculptSession * | ss, |
float | avg[3], | ||
const unsigned | vert | ||
) | [static] |
Definition at line 905 of file sculpt.c.
References add_v3_v3(), BLI_countlist(), MVert::co, copy_v3_v3(), SculptSession::deform_cos, ListBase::first, SculptSession::fmap, i, IndexNode::index, SculptSession::mface, mul_v3_fl(), SculptSession::mvert, IndexNode::next, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by do_mesh_smooth_brush().
static int over_mesh | ( | bContext * | C, |
struct wmOperator * | op, | ||
float | x, | ||
float | y | ||
) | [static] |
Definition at line 3374 of file sculpt.c.
References wmOperator::customdata, and sculpt_stroke_get_location().
Referenced by sculpt_brush_stroke_invoke(), and sculpt_stroke_test_start().
static float overlapped_curve | ( | Brush * | br, |
float | x | ||
) | [static] |
Definition at line 421 of file sculpt.c.
References brush_curve_strength(), fabs(), i, Brush::spacing, and sum().
Referenced by integrate_overlap().
static int plane_point_side | ( | float | co[3], |
float | plane_normal[3], | ||
float | plane_center[3] | ||
) | [static] |
Definition at line 1883 of file sculpt.c.
References dot_v3v3(), and sub_v3_v3v3().
Referenced by do_fill_brush(), and do_scrape_brush().
static int plane_point_side_flip | ( | float | co[3], |
float | plane_normal[3], | ||
float | plane_center[3], | ||
int | flip | ||
) | [static] |
Definition at line 1870 of file sculpt.c.
References simple_enum_gen::d, dot_v3v3(), and sub_v3_v3v3().
Referenced by do_clay_brush(), and do_clay_tubes_brush().
static int plane_trim | ( | StrokeCache * | cache, |
Brush * | brush, | ||
float | val[3] | ||
) | [static] |
Definition at line 1865 of file sculpt.c.
References BRUSH_PLANE_TRIM, dot_v3v3(), Brush::flag, StrokeCache::plane_trim_squared, and StrokeCache::radius_squared.
Referenced by brush_debug_print_state(), do_clay_brush(), do_clay_tubes_brush(), do_fill_brush(), do_flatten_brush(), and do_scrape_brush().
static void point_plane_project | ( | float | intr[3], |
float | co[3], | ||
float | plane_normal[3], | ||
float | plane_center[3] | ||
) | [static] |
Definition at line 1858 of file sculpt.c.
References dot_v3v3(), mul_v3_v3fl(), and sub_v3_v3v3().
Referenced by do_clay_brush(), do_clay_tubes_brush(), do_fill_brush(), do_flatten_brush(), and do_scrape_brush().
static void sculpt_brush_exit_tex | ( | Sculpt * | sd | ) | [static] |
Definition at line 3434 of file sculpt.c.
References bNodeTree::execdata, Brush::mtex, Tex::nodetree, ntreeTexEndExecTree(), Sculpt::paint, paint_brush(), and MTex::tex.
Referenced by sculpt_brush_stroke_cancel(), and sculpt_stroke_done().
static void sculpt_brush_init_tex | ( | const Scene * | scene, |
Sculpt * | sd, | ||
SculptSession * | ss | ||
) | [static] |
Definition at line 3251 of file sculpt.c.
References Brush::mtex, Tex::nodetree, ntreeTexBeginExecTree(), Sculpt::paint, paint_brush(), sculpt_update_tex(), and MTex::tex.
Referenced by sculpt_brush_stroke_init().
static int sculpt_brush_stroke_cancel | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3540 of file sculpt.c.
References SculptSession::cache, CTX_data_active_object(), CTX_data_tool_settings(), NULL, OPERATOR_CANCELLED, paint_stroke_cancel(), ToolSettings::sculpt, Object::sculpt, sculpt_brush_exit_tex(), and sculpt_cache_free().
Referenced by SCULPT_OT_brush_stroke().
static int sculpt_brush_stroke_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3526 of file sculpt.c.
References wmOperator::customdata, OPERATOR_CANCELLED, OPERATOR_FINISHED, paint_stroke_exec(), paint_stroke_new(), sculpt_brush_stroke_init(), sculpt_stroke_done(), sculpt_stroke_get_location(), sculpt_stroke_test_start(), and sculpt_stroke_update_step().
Referenced by SCULPT_OT_brush_stroke().
static int sculpt_brush_stroke_init | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 3266 of file sculpt.c.
References BRUSH_STROKE_SMOOTH, CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), Sculpt::paint, paint_brush(), wmOperator::ptr, RNA_enum_get(), Object::sculpt, ToolSettings::sculpt, sculpt_brush_init_tex(), Brush::sculpt_tool, SCULPT_TOOL_SMOOTH, sculpt_update_mesh_elements(), and view3d_operator_needs_opengl().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
static int sculpt_brush_stroke_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3494 of file sculpt.c.
References wmOperator::customdata, wmOperatorType::modal, OPERATOR_CANCELLED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, over_mesh(), paint_stroke_free(), paint_stroke_new(), wmOperator::ptr, RNA_boolean_get(), sculpt_brush_stroke_init(), sculpt_stroke_done(), sculpt_stroke_get_location(), sculpt_stroke_test_start(), sculpt_stroke_update_step(), wmOperator::type, wmEvent::type, WM_event_add_modal_handler(), wmEvent::x, and wmEvent::y.
Referenced by SCULPT_OT_brush_stroke().
static int sculpt_brush_test | ( | SculptBrushTest * | test, |
float | co[3] | ||
) | [static] |
Definition at line 317 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), SculptBrushTest::location, and sqrt().
Referenced by do_crease_brush(), do_draw_brush(), do_grab_brush(), do_inflate_brush(), do_layer_brush(), do_mesh_smooth_brush(), do_multires_smooth_brush(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_snake_hook_brush(), and do_thumb_brush().
static int sculpt_brush_test_cube | ( | SculptBrushTest * | test, |
float | co[3], | ||
float | local[4][4] | ||
) | [static] |
Definition at line 348 of file sculpt.c.
References SculptBrushTest::dist, fabs(), MAX3(), and mul_v3_m4v3().
Referenced by do_clay_tubes_brush().
static int sculpt_brush_test_fast | ( | SculptBrushTest * | test, |
float | co[3] | ||
) | [static] |
Definition at line 343 of file sculpt.c.
References len_squared_v3v3(), SculptBrushTest::location, and SculptBrushTest::radius_squared.
Referenced by calc_area_normal(), calc_area_normal_and_flatten_center(), and calc_flatten_center().
static void sculpt_brush_test_init | ( | SculptSession * | ss, |
SculptBrushTest * | test | ||
) | [static] |
Definition at line 310 of file sculpt.c.
References SculptSession::cache, copy_v3_v3(), SculptBrushTest::dist, StrokeCache::location, SculptBrushTest::location, StrokeCache::radius_squared, and SculptBrushTest::radius_squared.
Referenced by calc_area_normal(), calc_area_normal_and_flatten_center(), calc_flatten_center(), do_clay_brush(), do_clay_tubes_brush(), do_crease_brush(), do_draw_brush(), do_fill_brush(), do_flatten_brush(), do_grab_brush(), do_inflate_brush(), do_layer_brush(), do_mesh_smooth_brush(), do_multires_smooth_brush(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_scrape_brush(), do_snake_hook_brush(), and do_thumb_brush().
static int sculpt_brush_test_sq | ( | SculptBrushTest * | test, |
float | co[3] | ||
) | [static] |
Definition at line 330 of file sculpt.c.
References SculptBrushTest::dist, len_squared_v3v3(), and SculptBrushTest::location.
Referenced by do_clay_brush(), do_fill_brush(), do_flatten_brush(), and do_scrape_brush().
static void sculpt_cache_free | ( | StrokeCache * | cache | ) | [static] |
Definition at line 2796 of file sculpt.c.
References StrokeCache::face_norms, and MEM_freeN().
Referenced by sculpt_brush_stroke_cancel(), and sculpt_stroke_done().
static void sculpt_clip | ( | Sculpt * | sd, |
SculptSession * | ss, | ||
float * | co, | ||
const float | val[3] | ||
) | [static] |
Definition at line 765 of file sculpt.c.
References SculptSession::cache, StrokeCache::clip_tolerance, CLIP_X, fabsf, StrokeCache::flag, Sculpt::flags, i, and SCULPT_LOCK_X.
Referenced by do_layer_brush(), do_mesh_smooth_brush(), do_multires_smooth_brush(), and sculpt_combine_proxies().
Definition at line 2420 of file sculpt.c.
References add_v3_v3(), BLI_pbvh_gather_proxies(), BLI_pbvh_node_free_proxies(), BLI_pbvh_node_get_proxies(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), ELEM, ELEM3, PBVHVertexIter::i, MEM_freeN(), SculptSession::modifiers_active, nodes, p, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_clip(), sculpt_flush_pbvhvert_deform(), Brush::sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_LAYER, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SMOOTH, SCULPT_TOOL_THUMB, sculpt_undo_push_node(), and simple_enum_gen::val.
Referenced by do_symmetrical_brush_actions().
Definition at line 2613 of file sculpt.c.
References Brush::mtex, SculptSession::multires, multires_stitch_grids(), Sculpt::paint, paint_brush(), Object::sculpt, MTex::tex, TEX_NOISE, and Tex::type.
Referenced by do_symmetrical_brush_actions().
static void sculpt_flush_pbvhvert_deform | ( | Object * | ob, |
PBVHVertexIter * | vd | ||
) | [static] |
Definition at line 2402 of file sculpt.c.
References add_v3_v3v3(), MVert::co, PBVHVertexIter::co, copy_v3_v3(), Object::data, SculptSession::deform_cos, SculptSession::deform_imats, PBVHVertexIter::i, SculptSession::kb, mul_m3_v3(), Mesh::mvert, SculptSession::orig_cos, Object::sculpt, sub_v3_v3v3(), and PBVHVertexIter::vert_indices.
Referenced by sculpt_combine_proxies(), and sculpt_flush_stroke_deform().
Definition at line 2493 of file sculpt.c.
References BLI_pbvh_search_gather(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, copy_v3_v3(), Object::data, ELEM, PBVHVertexIter::i, SculptSession::kb, MEM_callocN(), MEM_freeN(), mesh_calc_normals(), Mesh::mface, Mesh::mvert, nodes, NULL, SculptSession::orig_cos, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, Object::sculpt, sculpt_flush_pbvhvert_deform(), Brush::sculpt_tool, SCULPT_TOOL_LAYER, SCULPT_TOOL_SMOOTH, sculpt_update_keyblock(), sculpt_vertcos_to_key(), Mesh::totface, Mesh::totvert, and PBVHVertexIter::vert_indices.
Referenced by do_symmetrical_brush_actions().
static void sculpt_flush_update | ( | bContext * | C | ) | [static] |
Definition at line 3337 of file sculpt.c.
References BLI_pbvh_update(), SculptSession::cache, CTX_data_active_object(), CTX_wm_region(), CTX_wm_region_view3d(), DAG_id_tag_update(), Object::derivedFinal, ED_region_tag_redraw(), ED_region_tag_redraw_partial(), GPU_drawobject_free(), Object::id, SculptSession::modifiers_active, SculptSession::multires, multires_mark_as_modified(), NULL, OB_RECALC_DATA, SculptSession::partial_redraw, SculptSession::pbvh, PBVH_UpdateBB, StrokeCache::previous_r, Object::sculpt, sculpt_get_redraw_rect(), ARegion::winrct, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by sculpt_stroke_update_step().
void sculpt_get_redraw_planes | ( | float | planes[4][4], |
ARegion * | ar, | ||
RegionView3D * | rv3d, | ||
Object * | ob | ||
) |
Definition at line 287 of file sculpt.c.
References BLI_pbvh_update(), NULL, paint_calc_redraw_planes(), SculptSession::pbvh, PBVH_UpdateRedraw, Object::sculpt, and sculpt_get_redraw_rect().
Referenced by draw_mesh_fancy().
static int sculpt_get_redraw_rect | ( | ARegion * | ar, |
RegionView3D * | rv3d, | ||
Object * | ob, | ||
rcti * | rect | ||
) | [static] |
Definition at line 250 of file sculpt.c.
References BLI_pbvh_redraw_BB(), BLI_rcti_is_empty(), BLI_union_rcti(), SculptSession::cache, paint_convert_bb_to_rect(), SculptSession::pbvh, StrokeCache::previous_r, and Object::sculpt.
Referenced by sculpt_flush_update(), and sculpt_get_redraw_planes().
Definition at line 131 of file sculpt.c.
References eModifierMode_Realtime, modifier_isEnabled(), modifiers_getVirtualModifierList(), and ModifierData::next.
Referenced by sculpt_toggle_mode().
static void sculpt_init_mirror_clipping | ( | Object * | ob, |
SculptSession * | ss | ||
) | [static] |
Definition at line 2804 of file sculpt.c.
References SculptSession::cache, StrokeCache::clip_tolerance, CLIP_X, eModifierMode_Realtime, eModifierType_Mirror, ListBase::first, StrokeCache::flag, MirrorModifierData::flag, i, MOD_MIR_AXIS_X, MOD_MIR_CLIPPING, ModifierData::mode, Object::modifiers, ModifierData::next, MirrorModifierData::tolerance, and ModifierData::type.
Referenced by sculpt_update_cache_invariants().
Definition at line 3625 of file sculpt.c.
References MEM_callocN(), Object::sculpt, ToolSettings::sculpt, sculpt_update_mesh_elements(), and Scene::toolsettings.
Referenced by sculpt_toggle_mode().
static int sculpt_mode_poll | ( | bContext * | C | ) | [static] |
Definition at line 2742 of file sculpt.c.
References CTX_data_active_object(), Object::mode, and OB_MODE_SCULPT.
Referenced by SCULPT_OT_set_persistent_base(), and sculpt_poll().
Definition at line 147 of file sculpt.c.
References Object::data, eModifierMode_Realtime, eModifierType_ShapeKey, eModifierTypeType_OnlyDeform, Sculpt::flags, Mesh::key, modifier_isEnabled(), modifiers_getVirtualModifierList(), modifierType_getInfo(), mti, ModifierData::next, OB_SHAPE_LOCK, sculpt_multires_active(), SCULPT_ONLY_DEFORM, Object::shapeflag, Object::shapenr, ModifierTypeInfo::type, and ModifierData::type.
Referenced by sculpt_update_mesh_elements().
struct MultiresModifierData* sculpt_multires_active | ( | Scene * | scene, |
Object * | ob | ||
) | [read] |
Definition at line 105 of file sculpt.c.
References CD_MDISPS, CustomData_get_layer(), Object::data, eModifierMode_Realtime, eModifierType_Multires, Mesh::fdata, modifier_isEnabled(), modifiers_getVirtualModifierList(), ModifierData::next, NULL, and MultiresModifierData::sculptlvl.
Referenced by sculpt_modifiers_active(), sculpt_toggle_mode(), sculpt_undo_restore(), and sculpt_update_mesh_elements().
static void SCULPT_OT_brush_stroke | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 3558 of file sculpt.c.
References BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, wmOperatorType::cancel, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::modal, wmOperatorType::name, OPTYPE_BLOCKING, paint_stroke_modal(), wmOperatorType::poll, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_enum(), RNA_OperatorStrokeElement, sculpt_brush_stroke_cancel(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_sculpt().
static void SCULPT_OT_sculptmode_toggle | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 3688 of file sculpt.c.
References ED_operator_object_active_editable_mesh(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and sculpt_toggle_mode().
Referenced by ED_operatortypes_sculpt().
static void SCULPT_OT_set_persistent_base | ( | wmOperatorType * | ot | ) | [static] |
Definition at line 3610 of file sculpt.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, sculpt_mode_poll(), and sculpt_set_persistent_base().
Referenced by ED_operatortypes_sculpt().
int sculpt_poll | ( | bContext * | C | ) |
Definition at line 2748 of file sculpt.c.
References paint_poll(), and sculpt_mode_poll().
Referenced by ED_keymap_paint(), SCULPT_OT_brush_stroke(), and sculpt_toggle_mode().
static void sculpt_raycast_cb | ( | PBVHNode * | node, |
void * | data_v, | ||
float * | tmin | ||
) | [static] |
Definition at line 3187 of file sculpt.c.
References BLI_pbvh_node_get_tmin(), BLI_pbvh_node_raycast(), SculptSession::cache, SculptUndoNode::co, SculptRaycastData::dist, SculptRaycastData::hit, NULL, SculptRaycastData::original, SculptSession::pbvh, SculptRaycastData::ray_normal, SculptRaycastData::ray_start, sculpt_undo_get_node(), and SculptRaycastData::ss.
Referenced by sculpt_stroke_get_location().
static void sculpt_restore_mesh | ( | Sculpt * | sd, |
SculptSession * | ss | ||
) | [static] |
Definition at line 3287 of file sculpt.c.
References BLI_pbvh_node_mark_update(), BLI_pbvh_search_gather(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BRUSH_ANCHORED, BRUSH_RESTORE_MESH, brush_use_size_pressure(), SculptSession::cache, SculptUndoNode::co, PBVHVertexIter::co, copy_v3_v3(), copy_v3_v3_short(), SculptSession::face_normals, StrokeCache::face_norms, MVert::flag, Brush::flag, PBVHVertexIter::fno, PBVHVertexIter::i, i, ME_VERT_PBVH_UPDATE, MEM_freeN(), PBVHVertexIter::mvert, SculptUndoNode::no, PBVHVertexIter::no, nodes, normal_short_to_float_v3(), NULL, Sculpt::paint, paint_brush(), SculptSession::pbvh, PBVH_ITER_UNIQUE, ViewContext::scene, Brush::sculpt_tool, SCULPT_TOOL_GRAB, sculpt_undo_get_node(), SculptSession::totface, and StrokeCache::vc.
Referenced by sculpt_stroke_update_step().
static int sculpt_search_sphere_cb | ( | PBVHNode * | node, |
void * | data_v | ||
) | [static] |
Definition at line 738 of file sculpt.c.
References BLI_pbvh_node_get_BB(), BLI_pbvh_node_get_original_BB(), SculptSession::cache, data, dot_v3v3(), i, StrokeCache::location, SculptSearchSphereData::original, SculptSearchSphereData::radius_squared, SculptSearchSphereData::ss, and sub_v3_v3v3().
Referenced by do_brush_action().
static int sculpt_set_persistent_base | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 3597 of file sculpt.c.
References CTX_data_active_object(), SculptSession::layer_co, MEM_freeN(), NULL, OPERATOR_FINISHED, and Object::sculpt.
Referenced by SCULPT_OT_set_persistent_base().
static void sculpt_stroke_done | ( | bContext * | C, |
struct PaintStroke * | UNUSEDstroke | ||
) | [static] |
Definition at line 3443 of file sculpt.c.
References StrokeCache::alt_smooth, BLI_pbvh_update(), BRUSH_INVERTED, SculptSession::cache, CTX_data_active_object(), CTX_data_tool_settings(), DAG_id_tag_update(), Object::data, Sculpt::draw_anchored, Sculpt::draw_pressure, find_id(), Brush::flag, Object::id, SculptSession::kb, SculptSession::modifiers_active, NC_OBJECT, ND_DRAW, NULL, OB_RECALC_DATA, p, Sculpt::paint, paint_brush(), paint_brush_set(), SculptSession::partial_redraw, SculptSession::pbvh, PBVH_UpdateOriginalBB, StrokeCache::saved_active_brush_name, ToolSettings::sculpt, Object::sculpt, sculpt_brush_exit_tex(), sculpt_cache_free(), sculpt_stroke_modifiers_check(), sculpt_undo_push_end(), sculpt_update_keyblock(), Sculpt::special_rotation, and WM_event_add_notifier().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
int sculpt_stroke_get_location | ( | bContext * | C, |
struct PaintStroke * | stroke, | ||
float | out[3], | ||
float | mouse[2] | ||
) |
Definition at line 3210 of file sculpt.c.
References add_v3_v3(), ViewContext::ar, BLI_pbvh_raycast(), SculptSession::cache, copy_v3_v3(), SculptRaycastData::dist, ED_view3d_win_to_segment_clip(), SculptRaycastData::hit, invert_m4_m4(), mul_m4_v3(), mul_v3_fl(), normalize_v3(), ViewContext::obact, Object::obmat, SculptRaycastData::original, StrokeCache::original, paint_stroke_view_context(), SculptSession::pbvh, SculptRaycastData::ray_normal, SculptRaycastData::ray_start, Object::sculpt, sculpt_raycast_cb(), sculpt_stroke_modifiers_check(), SculptRaycastData::ss, sub_v3_v3v3(), ViewContext::v3d, ARegion::winrct, rcti::xmin, and rcti::ymin.
Referenced by over_mesh(), sculpt_brush_stroke_exec(), sculpt_brush_stroke_invoke(), sculpt_get_brush_geometry(), and sculpt_update_cache_variants().
Definition at line 3167 of file sculpt.c.
References CTX_data_scene(), CTX_data_tool_settings(), SculptSession::modifiers_active, Sculpt::paint, paint_brush(), ToolSettings::sculpt, Object::sculpt, Brush::sculpt_tool, SCULPT_TOOL_SMOOTH, and sculpt_update_mesh_elements().
Referenced by sculpt_stroke_done(), sculpt_stroke_get_location(), and sculpt_stroke_update_step().
static int sculpt_stroke_test_start | ( | bContext * | C, |
struct wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 3384 of file sculpt.c.
References CTX_data_active_object(), CTX_data_tool_settings(), CTX_wm_region_view3d(), ED_view3d_init_mats_rv3d(), Sculpt::flags, NULL, over_mesh(), ToolSettings::sculpt, Object::sculpt, sculpt_tool_name(), sculpt_undo_push_begin(), sculpt_update_cache_invariants(), SCULPT_USE_OPENMP, wmEvent::x, and wmEvent::y.
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
static void sculpt_stroke_update_step | ( | bContext * | C, |
struct PaintStroke * | stroke, | ||
PointerRNA * | itemptr | ||
) | [static] |
Definition at line 3419 of file sculpt.c.
References CTX_data_active_object(), CTX_data_tool_settings(), do_symmetrical_brush_actions(), Object::sculpt, ToolSettings::sculpt, sculpt_flush_update(), sculpt_restore_mesh(), sculpt_stroke_modifiers_check(), and sculpt_update_cache_variants().
Referenced by sculpt_brush_stroke_exec(), and sculpt_brush_stroke_invoke().
static int sculpt_toggle_mode | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 3632 of file sculpt.c.
References CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), DAG_id_tag_update(), Sculpt::flags, free_sculptsession(), Object::id, MultiresModifierData::lvl, MEM_callocN(), Object::mode, multires_force_update(), NC_SCENE, ND_MODE, OB_MODE_SCULPT, OB_RECALC_DATA, OPERATOR_FINISHED, Sculpt::paint, PAINT_CURSOR_SCULPT, paint_cursor_start(), paint_init(), Object::sculpt, ToolSettings::sculpt, sculpt_has_active_modifiers(), sculpt_init_session(), sculpt_multires_active(), sculpt_poll(), SCULPT_SYMM_X, MultiresModifierData::sculptlvl, and WM_event_add_notifier().
Referenced by SCULPT_OT_sculptmode_toggle().
static const char* sculpt_tool_name | ( | Sculpt * | sd | ) | [static] |
Definition at line 2753 of file sculpt.c.
References Sculpt::paint, paint_brush(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_FILL, SCULPT_TOOL_FLATTEN, SCULPT_TOOL_GRAB, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_NUDGE, SCULPT_TOOL_PINCH, SCULPT_TOOL_SCRAPE, SCULPT_TOOL_SMOOTH, and SCULPT_TOOL_THUMB.
Referenced by sculpt_stroke_test_start().
Definition at line 2947 of file sculpt.c.
References add_v3_v3(), Sculpt::anchored_initial_mouse, Sculpt::anchored_location, Sculpt::anchored_size, ViewContext::ar, SculptSession::cache, copy_v2_v2(), copy_v3_v3(), Sculpt::draw_anchored, ED_view3d_win_to_delta(), ELEM, ELEM5, StrokeCache::first_time, StrokeCache::grab_delta, initgrabz(), StrokeCache::initial_mouse, invert_m4_m4(), StrokeCache::mouse, mul_mat3_m4_v3(), mul_v3_m4v3(), Object::obmat, StrokeCache::old_grab_location, StrokeCache::orig_grab_location, StrokeCache::pixel_radius, ViewContext::rv3d, Object::sculpt, Brush::sculpt_tool, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_GRAB, SCULPT_TOOL_NUDGE, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, sub_v3_v3v3(), StrokeCache::true_location, StrokeCache::vc, and zero_v3().
Referenced by sculpt_update_cache_variants().
static void sculpt_update_cache_invariants | ( | bContext * | C, |
Sculpt * | sd, | ||
SculptSession * | ss, | ||
wmOperator * | op, | ||
wmEvent * | event | ||
) | [static] |
Definition at line 2834 of file sculpt.c.
References StrokeCache::alt_smooth, BLI_strncpy(), StrokeCache::brush, BRUSH_ACCUMULATE, BRUSH_ANCHORED, BRUSH_INVERTED, BRUSH_PERSISTENT, BRUSH_RAKE, BRUSH_STROKE_INVERT, BRUSH_STROKE_SMOOTH, SculptSession::cache, MVert::co, copy_v2_v2(), copy_v3_v3(), CTX_data_active_object(), wmOperator::customdata, SculptSession::deform_cos, ED_view3d_global_to_vector(), ED_view3d_ob_project_mat_get(), ELEM8, SculptSession::face_normals, StrokeCache::face_norms, find_id(), StrokeCache::first_time, Brush::flag, StrokeCache::flag, i, Brush::id, StrokeCache::initial_mouse, StrokeCache::invert, Sculpt::last_angle, SculptSession::layer_co, MEM_callocN(), MEM_mallocN(), StrokeCache::mouse, SculptSession::multires, SculptSession::mvert, ID::name, StrokeCache::original, p, Sculpt::paint, paint_brush(), paint_brush_set(), paint_stroke_view_context(), Brush::plane_trim, StrokeCache::plane_trim_squared, StrokeCache::projection_mat, wmOperator::ptr, RNA_enum_get(), ViewContext::rv3d, StrokeCache::saved_active_brush_name, StrokeCache::scale, sculpt_init_mirror_clipping(), Brush::sculpt_tool, SCULPT_TOOL_BLOB, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_CREASE, SCULPT_TOOL_DRAW, SCULPT_TOOL_INFLATE, SCULPT_TOOL_LAYER, SCULPT_TOOL_ROTATE, Object::size, StrokeCache::special_rotation, StrokeCache::tex_mouse, SculptSession::totface, SculptSession::totvert, StrokeCache::true_view_normal, RegionView3D::twmat, StrokeCache::vc, and StrokeCache::vertex_rotation.
Referenced by sculpt_stroke_test_start().
static void sculpt_update_cache_variants | ( | bContext * | C, |
Sculpt * | sd, | ||
Object * | ob, | ||
struct PaintStroke * | stroke, | ||
PointerRNA * | ptr | ||
) | [static] |
Definition at line 3018 of file sculpt.c.
References Sculpt::anchored_initial_mouse, Sculpt::anchored_location, Sculpt::anchored_size, KDL::atan2(), BLI_frand(), BRUSH_ANCHORED, BRUSH_EDGE_TO_EDGE, MTex::brush_map_mode, BRUSH_RAKE, BRUSH_RANDOM_ROTATION, brush_set_unprojected_radius(), brush_size(), brush_unprojected_radius(), brush_use_locked_size(), brush_use_size_pressure(), StrokeCache::bstrength, SculptSession::cache, copy_v2_v2(), copy_v3_v3(), CTX_data_scene(), Sculpt::draw_anchored, Sculpt::draw_pressure, ELEM4, StrokeCache::first_time, Brush::flag, StrokeCache::initial_mouse, StrokeCache::initial_radius, StrokeCache::last_rake, M_PI, StrokeCache::mouse, Brush::mtex, MTEX_MAP_MODE_FIXED, Sculpt::paint, paint_brush(), paint_calc_object_space_radius(), paint_space_stroke_enabled(), paint_stroke_view_context(), StrokeCache::pen_flip, StrokeCache::pixel_radius, StrokeCache::pressure, Sculpt::pressure_value, StrokeCache::previous_pixel_radius, StrokeCache::radius, StrokeCache::radius_squared, RNA_boolean_get(), RNA_float_get(), RNA_float_get_array(), Object::sculpt, sculpt_stroke_get_location(), Brush::sculpt_tool, SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE, SCULPT_TOOL_SNAKE_HOOK, SCULPT_TOOL_THUMB, sculpt_update_brush_delta(), Sculpt::special_rotation, StrokeCache::special_rotation, sqrt(), StrokeCache::tex_mouse, StrokeCache::true_location, StrokeCache::vc, and StrokeCache::vertex_rotation.
Referenced by sculpt_stroke_update_step().
static void sculpt_update_keyblock | ( | Object * | ob | ) | [static] |
Definition at line 2474 of file sculpt.c.
References BLI_pbvh_get_vertCos(), SculptSession::kb, MEM_freeN(), SculptSession::orig_cos, SculptSession::pbvh, Object::sculpt, and sculpt_vertcos_to_key().
Referenced by sculpt_flush_stroke_deform(), and sculpt_stroke_done().
Definition at line 2681 of file sculpt.c.
References BLI_pbvh_apply_vertCos(), BLI_pbvh_isDeformed(), CD_MASK_BAREMESH, crazyspace_build_sculpt(), Object::data, SculptSession::deform_cos, SculptSession::deform_imats, SculptSession::face_normals, SculptSession::fmap, free_sculptsession_deformMats(), get_mesh(), DerivedMesh::getFaceMap, DerivedMesh::getNumFaces, DerivedMesh::getNumVerts, DerivedMesh::getPBVH, invert_m3(), SculptSession::kb, key_to_vertcos(), MEM_freeN(), mesh_get_derived_final(), mesh_getVertexCos(), Mesh::mface, SculptSession::mface, SculptSession::modifiers_active, SculptSession::multires, SculptSession::mvert, Mesh::mvert, NULL, ob_get_keyblock(), SculptSession::orig_cos, SculptSession::pbvh, Object::sculpt, sculpt_modifiers_active(), sculpt_multires_active(), Mesh::totface, SculptSession::totface, SculptSession::totvert, and Mesh::totvert.
Referenced by sculpt_brush_stroke_init(), sculpt_init_session(), sculpt_stroke_modifiers_check(), and sculpt_undo_restore().
static void sculpt_update_tex | ( | const Scene * | scene, |
Sculpt * | sd, | ||
SculptSession * | ss | ||
) | [static] |
Definition at line 2663 of file sculpt.c.
References brush_gen_texture_cache(), brush_size(), MEM_freeN(), NULL, Sculpt::paint, paint_brush(), SculptSession::texcache, SculptSession::texcache_actual, and SculptSession::texcache_side.
Referenced by sculpt_brush_init_tex().
Definition at line 2260 of file sculpt.c.
References Key::block, MVert::co, copy_v3_v3(), Object::data, ListBase::first, Mesh::key, KEY_RELATIVE, key_to_vertcos(), MEM_freeN(), mesh_calc_normals(), Mesh::mface, Mesh::mvert, KeyBlock::next, NULL, offset_to_key(), Key::refkey, KeyBlock::relative, Object::shapenr, sub_v3_v3v3(), Mesh::totface, Mesh::totvert, Key::type, and vertcos_to_key().
Referenced by sculpt_flush_stroke_deform(), sculpt_undo_restore(), and sculpt_update_keyblock().
static void smooth | ( | Sculpt * | sd, |
Object * | ob, | ||
PBVHNode ** | nodes, | ||
int | totnode, | ||
float | bstrength | ||
) | [static] |
Definition at line 1092 of file sculpt.c.
References CLAMP(), do_mesh_smooth_brush(), do_multires_smooth_brush(), SculptSession::fmap, SculptSession::multires, multires_stitch_grids(), and Object::sculpt.
Referenced by create_mesh(), do_brush_action(), do_smooth_brush(), dynamicPaint_paintParticles(), fix_new_face(), IsoSurface::getTriangles(), init_brush_icons(), ntlTriangle::ntlTriangle(), nurbs_to_mdata_customdb(), subdivide_exec(), and xml_read_mesh().
static float tex_strength | ( | SculptSession * | ss, |
Brush * | br, | ||
float | point[3], | ||
const float | len, | ||
const float | sculpt_normal[3], | ||
const short | vno[3], | ||
const float | fno[3] | ||
) | [static] |
Definition at line 629 of file sculpt.c.
References angle(), ViewContext::ar, atan2f, avg, brush_curve_strength(), MTex::brush_map_mode, brush_size(), SculptSession::cache, cosf, ED_view3d_project_float(), externtex(), flip_coord(), frontface(), StrokeCache::mirror_symmetry_pass, Brush::mtex, MTEX_MAP_MODE_3D, MTEX_MAP_MODE_FIXED, MTEX_MAP_MODE_TILED, mul_m4_v3(), MTex::ofs, paint_get_tex_pixel(), StrokeCache::pixel_radius, StrokeCache::projection_mat, StrokeCache::radial_symmetry_pass, StrokeCache::radius, MTex::rot, ViewContext::scene, sinf, MTex::size, StrokeCache::special_rotation, sqrtf, StrokeCache::symm_rot_mat_inv, MTex::tex, StrokeCache::tex_mouse, SculptSession::texcache, Brush::texture_sample_bias, StrokeCache::vc, ARegion::winrct, ARegion::winx, ARegion::winy, rcti::xmin, and rcti::ymin.
Referenced by do_clay_brush(), do_clay_tubes_brush(), do_crease_brush(), do_draw_brush(), do_fill_brush(), do_flatten_brush(), do_grab_brush(), do_inflate_brush(), do_layer_brush(), do_mesh_smooth_brush(), do_multires_smooth_brush(), do_nudge_brush(), do_pinch_brush(), do_rotate_brush(), do_scrape_brush(), do_snake_hook_brush(), and do_thumb_brush().