Blender V4.3
sculpt_pose.cc File Reference
#include "MEM_guardedalloc.h"
#include "BLI_enumerable_thread_specific.hh"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_matrix.hh"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_math_vector.hh"
#include "DNA_brush_types.h"
#include "DNA_object_types.h"
#include "BKE_brush.hh"
#include "BKE_ccg.hh"
#include "BKE_colortools.hh"
#include "BKE_mesh.hh"
#include "BKE_paint.hh"
#include "BKE_pbvh_api.hh"
#include "mesh_brush_common.hh"
#include "paint_intern.hh"
#include "sculpt_automask.hh"
#include "sculpt_cloth.hh"
#include "sculpt_face_set.hh"
#include "sculpt_flood_fill.hh"
#include "sculpt_hide.hh"
#include "sculpt_intern.hh"
#include "sculpt_pose.hh"
#include "sculpt_smooth.hh"
#include "bmesh.hh"
#include <cmath>
#include <cstdlib>

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::pose::BrushLocalData
 
struct  blender::ed::sculpt_paint::pose::PoseGrowFactorData
 
struct  blender::ed::sculpt_paint::pose::GrowFactorLocalData
 

Namespaces

namespace  blender
 
namespace  blender::ed
 
namespace  blender::ed::sculpt_paint
 
namespace  blender::ed::sculpt_paint::pose
 

Functions

static void blender::ed::sculpt_paint::pose::solve_ik_chain (IKChain &ik_chain, const float3 &initial_target, const bool use_anchor)
 
static void blender::ed::sculpt_paint::pose::solve_roll_chain (IKChain &ik_chain, const Brush &brush, const float roll)
 
static void blender::ed::sculpt_paint::pose::solve_translate_chain (IKChain &ik_chain, const float delta[3])
 
static void blender::ed::sculpt_paint::pose::solve_scale_chain (IKChain &ik_chain, const float scale[3])
 
static BLI_NOINLINE void blender::ed::sculpt_paint::pose::calc_segment_translations (const Span< float3 > positions, const IKChainSegment &segment, const MutableSpan< float3 > translations)
 
static BLI_NOINLINE void blender::ed::sculpt_paint::pose::add_arrays (const MutableSpan< float3 > a, const Span< float3 > b)
 
static void blender::ed::sculpt_paint::pose::calc_mesh (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const MeshAttributeData &attribute_data, const bke::pbvh::MeshNode &node, Object &object, BrushLocalData &tls, const PositionDeformData &position_data)
 
static void blender::ed::sculpt_paint::pose::calc_grids (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, const bke::pbvh::GridsNode &node, Object &object, BrushLocalData &tls)
 
static void blender::ed::sculpt_paint::pose::calc_bmesh (const Depsgraph &depsgraph, const Sculpt &sd, const Brush &brush, bke::pbvh::BMeshNode &node, Object &object, BrushLocalData &tls)
 
static BLI_NOINLINE void blender::ed::sculpt_paint::pose::add_fake_neighbors (const Span< int > fake_neighbors, const Span< int > verts, const MutableSpan< Vector< int > > neighbors)
 
static void blender::ed::sculpt_paint::pose::grow_factors_mesh (const ePaintSymmetryFlags symm, const float3 &pose_initial_position, const Span< float3 > vert_positions, const OffsetIndices< int > faces, const Span< int > corner_verts, const GroupedSpan< int > vert_to_face_map, const Span< bool > hide_vert, const Span< bool > hide_poly, const Span< int > fake_neighbors, const Span< float > prev_mask, const bke::pbvh::MeshNode &node, GrowFactorLocalData &tls, const MutableSpan< float > pose_factor, PoseGrowFactorData &gftd)
 
static void blender::ed::sculpt_paint::pose::grow_factors_grids (const ePaintSymmetryFlags symm, const float3 &pose_initial_position, const SubdivCCG &subdiv_ccg, const Span< int > fake_neighbors, const Span< float > prev_mask, const bke::pbvh::GridsNode &node, const MutableSpan< float > pose_factor, PoseGrowFactorData &gftd)
 
static void blender::ed::sculpt_paint::pose::grow_factors_bmesh (const ePaintSymmetryFlags symm, const float3 &pose_initial_position, const Span< int > fake_neighbors, const Span< float > prev_mask, bke::pbvh::BMeshNode &node, const MutableSpan< float > pose_factor, PoseGrowFactorData &gftd)
 
static void blender::ed::sculpt_paint::pose::grow_pose_factor (const Depsgraph &depsgraph, Object &ob, SculptSession &ss, float pose_origin[3], float pose_target[3], float max_len, float *r_pose_origin, MutableSpan< float > pose_factor)
 
static bool blender::ed::sculpt_paint::pose::vert_inside_brush_radius (const float3 &vertex, const float3 &br_co, float radius, char symm)
 
static void blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float3 &initial_location, float radius, float3 &r_pose_origin, MutableSpan< float > r_pose_factor)
 
static void blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids (Object &object, SculptSession &ss, const float3 &initial_location, float radius, float3 &r_pose_origin, MutableSpan< float > r_pose_factor)
 
static void blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh (Object &object, SculptSession &ss, const float3 &initial_location, float radius, float3 &r_pose_origin, MutableSpan< float > r_pose_factor)
 
static void blender::ed::sculpt_paint::pose::calc_pose_data (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float3 &initial_location, float radius, float pose_offset, float3 &r_pose_origin, MutableSpan< float > r_pose_factor)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_new (const int totsegments, const int totverts)
 
static void blender::ed::sculpt_paint::pose::ik_chain_origin_heads_init (IKChain &ik_chain, const float3 &initial_location)
 
static int blender::ed::sculpt_paint::pose::brush_num_effective_segments (const Brush &brush)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_topology (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const Brush &brush, const float3 &initial_location, const float radius)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const Brush &brush, const float radius)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids (Object &object, SculptSession &ss, const Brush &brush, const float radius)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh (Object &object, SculptSession &ss, const Brush &brush, const float radius)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const Brush &brush, const float radius)
 
static std::optional< float3blender::ed::sculpt_paint::pose::calc_average_face_set_center (const Depsgraph &depsgraph, Object &object, const Span< int > floodfill_step, const int active_face_set, const int target_face_set)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float radius, const float3 &initial_location)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float radius, const float3 &initial_location)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float radius, const float3 &initial_location)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk (const Depsgraph &depsgraph, Object &object, SculptSession &ss, const float radius, const float3 &initial_location)
 
static std::unique_ptr< IKChainblender::ed::sculpt_paint::pose::ik_chain_init (const Depsgraph &depsgraph, Object &ob, SculptSession &ss, const Brush &brush, const float3 &initial_location, const float radius)
 
void blender::ed::sculpt_paint::pose::pose_brush_init (const Depsgraph &depsgraph, Object &ob, SculptSession &ss, const Brush &brush)
 
std::unique_ptr< SculptPoseIKChainPreviewblender::ed::sculpt_paint::pose::preview_ik_chain_init (const Depsgraph &depsgraph, Object &ob, SculptSession &ss, const Brush &brush, const float3 &initial_location, const float radius)
 
static void blender::ed::sculpt_paint::pose::sculpt_pose_do_translate_deform (SculptSession &ss, const Brush &brush)
 
static float blender::ed::sculpt_paint::pose::calc_scale_from_grab_delta (SculptSession &ss, const float3 &ik_target)
 
static void blender::ed::sculpt_paint::pose::calc_scale_deform (SculptSession &ss, const Brush &brush)
 
static void blender::ed::sculpt_paint::pose::calc_twist_deform (SculptSession &ss, const Brush &brush)
 
static void blender::ed::sculpt_paint::pose::calc_rotate_deform (SculptSession &ss, const Brush &brush)
 
static void blender::ed::sculpt_paint::pose::calc_rotate_twist_deform (SculptSession &ss, const Brush &brush)
 
static void blender::ed::sculpt_paint::pose::calc_scale_translate_deform (SculptSession &ss, const Brush &brush)
 
static void blender::ed::sculpt_paint::pose::calc_squash_stretch_deform (SculptSession &ss, const Brush &)
 
static void blender::ed::sculpt_paint::pose::align_pivot_local_space (float r_mat[4][4], ePaintSymmetryFlags symm, ePaintSymmetryAreas symm_area, IKChainSegment *segment, const float3 &grab_location)
 
void blender::ed::sculpt_paint::pose::do_pose_brush (const Depsgraph &depsgraph, const Sculpt &sd, Object &ob, const IndexMask &node_mask)