Blender  V3.3
Classes | Typedefs | Functions
sculpt_pose.c File Reference
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_task.h"
#include "DNA_brush_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "BKE_brush.h"
#include "BKE_ccg.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_mesh.h"
#include "BKE_multires.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_pbvh.h"
#include "BKE_scene.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
#include "bmesh.h"
#include <math.h>
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  PoseGrowFactorTLSData
 
struct  PoseFloodFillData
 

Typedefs

typedef struct PoseGrowFactorTLSData PoseGrowFactorTLSData
 
typedef struct PoseFloodFillData PoseFloodFillData
 

Functions

static void pose_solve_ik_chain (SculptPoseIKChain *ik_chain, const float initial_target[3], const bool use_anchor)
 
static void pose_solve_roll_chain (SculptPoseIKChain *ik_chain, const Brush *brush, const float roll)
 
static void pose_solve_translate_chain (SculptPoseIKChain *ik_chain, const float delta[3])
 
static void pose_solve_scale_chain (SculptPoseIKChain *ik_chain, const float scale[3])
 
static void do_pose_brush_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static void pose_brush_grow_factor_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict tls)
 
static void pose_brush_grow_factor_reduce (const void *__restrict UNUSED(userdata), void *__restrict chunk_join, void *__restrict chunk)
 
static void sculpt_pose_grow_pose_factor (Sculpt *sd, Object *ob, SculptSession *ss, float pose_origin[3], float pose_target[3], float max_len, float *r_pose_origin, float *pose_factor)
 
static bool sculpt_pose_brush_is_vertex_inside_brush_radius (const float vertex[3], const float br_co[3], float radius, char symm)
 
static bool pose_topology_floodfill_cb (SculptSession *ss, int UNUSED(from_v), int to_v, bool is_duplicate, void *userdata)
 
static bool pose_face_sets_floodfill_cb (SculptSession *ss, int UNUSED(from_v), int to_v, bool is_duplicate, void *userdata)
 
void SCULPT_pose_calc_pose_data (Sculpt *sd, Object *ob, SculptSession *ss, float initial_location[3], float radius, float pose_offset, float *r_pose_origin, float *r_pose_factor)
 
static void pose_brush_init_task_cb_ex (void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
 
static SculptPoseIKChainpose_ik_chain_new (const int totsegments, const int totverts)
 
static void pose_ik_chain_origin_heads_init (SculptPoseIKChain *ik_chain, const float initial_location[3])
 
static int pose_brush_num_effective_segments (const Brush *brush)
 
static SculptPoseIKChainpose_ik_chain_init_topology (Sculpt *sd, Object *ob, SculptSession *ss, Brush *br, const float initial_location[3], const float radius)
 
static SculptPoseIKChainpose_ik_chain_init_face_sets (Sculpt *sd, Object *ob, SculptSession *ss, Brush *br, const float radius)
 
static bool pose_face_sets_fk_find_masked_floodfill_cb (SculptSession *ss, int from_v, int to_v, bool is_duplicate, void *userdata)
 
static bool pose_face_sets_fk_set_weights_floodfill_cb (SculptSession *ss, int UNUSED(from_v), int to_v, bool UNUSED(is_duplicate), void *userdata)
 
static SculptPoseIKChainpose_ik_chain_init_face_sets_fk (Sculpt *sd, Object *ob, SculptSession *ss, const float radius, const float *initial_location)
 
SculptPoseIKChainSCULPT_pose_ik_chain_init (Sculpt *sd, Object *ob, SculptSession *ss, Brush *br, const float initial_location[3], const float radius)
 
void SCULPT_pose_brush_init (Sculpt *sd, Object *ob, SculptSession *ss, Brush *br)
 
static void sculpt_pose_do_translate_deform (SculptSession *ss, Brush *brush)
 
static float sculpt_pose_get_scale_from_grab_delta (SculptSession *ss, const float ik_target[3])
 
static void sculpt_pose_do_scale_deform (SculptSession *ss, Brush *brush)
 
static void sculpt_pose_do_twist_deform (SculptSession *ss, Brush *brush)
 
static void sculpt_pose_do_rotate_deform (SculptSession *ss, Brush *brush)
 
static void sculpt_pose_do_rotate_twist_deform (SculptSession *ss, Brush *brush)
 
static void sculpt_pose_do_scale_translate_deform (SculptSession *ss, Brush *brush)
 
static void sculpt_pose_do_squash_stretch_deform (SculptSession *ss, Brush *UNUSED(brush))
 
static void sculpt_pose_align_pivot_local_space (float r_mat[4][4], ePaintSymmetryFlags symm, ePaintSymmetryAreas symm_area, SculptPoseIKChainSegment *segment, const float grab_location[3])
 
void SCULPT_do_pose_brush (Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
 
void SCULPT_pose_ik_chain_free (SculptPoseIKChain *ik_chain)
 

Typedef Documentation

◆ PoseFloodFillData

◆ PoseGrowFactorTLSData

Function Documentation

◆ do_pose_brush_task_cb_ex()

static void do_pose_brush_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ pose_brush_grow_factor_reduce()

static void pose_brush_grow_factor_reduce ( const void *__restrict   UNUSEDuserdata,
void *__restrict  chunk_join,
void *__restrict  chunk 
)
static

◆ pose_brush_grow_factor_task_cb_ex()

static void pose_brush_grow_factor_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict  tls 
)
static

◆ pose_brush_init_task_cb_ex()

static void pose_brush_init_task_cb_ex ( void *__restrict  userdata,
const int  n,
const TaskParallelTLS *__restrict   UNUSEDtls 
)
static

◆ pose_brush_num_effective_segments()

static int pose_brush_num_effective_segments ( const Brush brush)
static

◆ pose_face_sets_fk_find_masked_floodfill_cb()

static bool pose_face_sets_fk_find_masked_floodfill_cb ( SculptSession ss,
int  from_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ pose_face_sets_fk_set_weights_floodfill_cb()

static bool pose_face_sets_fk_set_weights_floodfill_cb ( SculptSession ss,
int   UNUSEDfrom_v,
int  to_v,
bool   UNUSEDis_duplicate,
void userdata 
)
static

Definition at line 837 of file sculpt_pose.c.

References data, and SCULPT_vertex_has_face_set().

Referenced by pose_ik_chain_init_face_sets_fk().

◆ pose_face_sets_floodfill_cb()

static bool pose_face_sets_floodfill_cb ( SculptSession ss,
int   UNUSEDfrom_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ pose_ik_chain_init_face_sets()

static SculptPoseIKChain* pose_ik_chain_init_face_sets ( Sculpt sd,
Object ob,
SculptSession ss,
Brush br,
const float  radius 
)
static

◆ pose_ik_chain_init_face_sets_fk()

static SculptPoseIKChain* pose_ik_chain_init_face_sets_fk ( Sculpt sd,
Object ob,
SculptSession ss,
const float  radius,
const float initial_location 
)
static

◆ pose_ik_chain_init_topology()

static SculptPoseIKChain* pose_ik_chain_init_topology ( Sculpt sd,
Object ob,
SculptSession ss,
Brush br,
const float  initial_location[3],
const float  radius 
)
static

◆ pose_ik_chain_new()

static SculptPoseIKChain* pose_ik_chain_new ( const int  totsegments,
const int  totverts 
)
static

◆ pose_ik_chain_origin_heads_init()

static void pose_ik_chain_origin_heads_init ( SculptPoseIKChain ik_chain,
const float  initial_location[3] 
)
static

◆ pose_solve_ik_chain()

static void pose_solve_ik_chain ( SculptPoseIKChain ik_chain,
const float  initial_target[3],
const bool  use_anchor 
)
static

◆ pose_solve_roll_chain()

static void pose_solve_roll_chain ( SculptPoseIKChain ik_chain,
const Brush brush,
const float  roll 
)
static

◆ pose_solve_scale_chain()

static void pose_solve_scale_chain ( SculptPoseIKChain ik_chain,
const float  scale[3] 
)
static

◆ pose_solve_translate_chain()

static void pose_solve_translate_chain ( SculptPoseIKChain ik_chain,
const float  delta[3] 
)
static

◆ pose_topology_floodfill_cb()

static bool pose_topology_floodfill_cb ( SculptSession ss,
int   UNUSEDfrom_v,
int  to_v,
bool  is_duplicate,
void userdata 
)
static

◆ SCULPT_do_pose_brush()

void SCULPT_do_pose_brush ( struct Sculpt sd,
struct Object ob,
struct PBVHNode **  nodes,
int  totnode 
)

◆ sculpt_pose_align_pivot_local_space()

static void sculpt_pose_align_pivot_local_space ( float  r_mat[4][4],
ePaintSymmetryFlags  symm,
ePaintSymmetryAreas  symm_area,
SculptPoseIKChainSegment segment,
const float  grab_location[3] 
)
static

◆ SCULPT_pose_brush_init()

void SCULPT_pose_brush_init ( Sculpt sd,
Object ob,
SculptSession ss,
Brush br 
)

◆ sculpt_pose_brush_is_vertex_inside_brush_radius()

static bool sculpt_pose_brush_is_vertex_inside_brush_radius ( const float  vertex[3],
const float  br_co[3],
float  radius,
char  symm 
)
static

◆ SCULPT_pose_calc_pose_data()

void SCULPT_pose_calc_pose_data ( struct Sculpt sd,
struct Object ob,
struct SculptSession ss,
float  initial_location[3],
float  radius,
float  pose_offset,
float r_pose_origin,
float r_pose_factor 
)

◆ sculpt_pose_do_rotate_deform()

static void sculpt_pose_do_rotate_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_do_rotate_twist_deform()

static void sculpt_pose_do_rotate_twist_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_do_scale_deform()

static void sculpt_pose_do_scale_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_do_scale_translate_deform()

static void sculpt_pose_do_scale_translate_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_do_squash_stretch_deform()

static void sculpt_pose_do_squash_stretch_deform ( SculptSession ss,
Brush UNUSEDbrush 
)
static

◆ sculpt_pose_do_translate_deform()

static void sculpt_pose_do_translate_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_do_twist_deform()

static void sculpt_pose_do_twist_deform ( SculptSession ss,
Brush brush 
)
static

◆ sculpt_pose_get_scale_from_grab_delta()

static float sculpt_pose_get_scale_from_grab_delta ( SculptSession ss,
const float  ik_target[3] 
)
static

◆ sculpt_pose_grow_pose_factor()

static void sculpt_pose_grow_pose_factor ( Sculpt sd,
Object ob,
SculptSession ss,
float  pose_origin[3],
float  pose_target[3],
float  max_len,
float r_pose_origin,
float pose_factor 
)
static

◆ SCULPT_pose_ik_chain_free()

void SCULPT_pose_ik_chain_free ( SculptPoseIKChain ik_chain)

◆ SCULPT_pose_ik_chain_init()

SculptPoseIKChain* SCULPT_pose_ik_chain_init ( Sculpt sd,
Object ob,
SculptSession ss,
Brush br,
const float  initial_location[3],
const float  radius 
)