Cleanup: compiler warnings
This commit is contained in:
parent
d85026db15
commit
90aa771b30
|
@ -32,7 +32,7 @@
|
|||
namespace DEG {
|
||||
|
||||
RuntimeBackup::RuntimeBackup(const Depsgraph *depsgraph)
|
||||
: have_backup(nullptr),
|
||||
: have_backup(false),
|
||||
animation_backup(depsgraph),
|
||||
scene_backup(depsgraph),
|
||||
sound_backup(depsgraph),
|
||||
|
|
|
@ -816,7 +816,6 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
|
|||
bGPDframe *gpf,
|
||||
bGPDstroke *gps,
|
||||
const float mval[2],
|
||||
const float mvalo[2],
|
||||
const int radius,
|
||||
const rcti *rect)
|
||||
{
|
||||
|
@ -938,7 +937,7 @@ static void gp_stroke_doeraser(tGPsdata *p)
|
|||
* (e.g. 2D space strokes in the 3D view, if the same datablock is shared)
|
||||
*/
|
||||
if (ED_gpencil_stroke_can_use_direct(p->sa, gps)) {
|
||||
gp_stroke_eraser_dostroke(p, gpf, gps, p->mval, p->mvalo, p->radius, &rect);
|
||||
gp_stroke_eraser_dostroke(p, gpf, gps, p->mval, p->radius, &rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -114,13 +114,6 @@ typedef enum eDrawStrokeFlags {
|
|||
/* ----- Tool Buffer Drawing ------ */
|
||||
/* helper functions to set color of buffer point */
|
||||
|
||||
static void gp_set_point_uniform_color(const bGPDspoint *pt, const float ink[4])
|
||||
{
|
||||
float alpha = ink[3] * pt->strength;
|
||||
CLAMP(alpha, GPENCIL_STRENGTH_MIN, 1.0f);
|
||||
immUniformColor3fvAlpha(ink, alpha);
|
||||
}
|
||||
|
||||
static void gp_set_point_varying_color(const bGPDspoint *pt,
|
||||
const float ink[4],
|
||||
uint attr_id,
|
||||
|
@ -134,30 +127,6 @@ static void gp_set_point_varying_color(const bGPDspoint *pt,
|
|||
immAttr4ub(attr_id, F2UB(ink[0]), F2UB(ink[1]), F2UB(ink[2]), F2UB(alpha));
|
||||
}
|
||||
|
||||
/* --------- 2D Stroke Drawing Helpers --------- */
|
||||
/* change in parameter list */
|
||||
static void gp_calc_2d_stroke_fxy(
|
||||
const float pt[3], short sflag, int offsx, int offsy, int winx, int winy, float r_co[2])
|
||||
{
|
||||
if (sflag & GP_STROKE_2DSPACE) {
|
||||
r_co[0] = pt[0];
|
||||
r_co[1] = pt[1];
|
||||
}
|
||||
else if (sflag & GP_STROKE_2DIMAGE) {
|
||||
const float x = (float)((pt[0] * winx) + offsx);
|
||||
const float y = (float)((pt[1] * winy) + offsy);
|
||||
|
||||
r_co[0] = x;
|
||||
r_co[1] = y;
|
||||
}
|
||||
else {
|
||||
const float x = (float)(pt[0] / 100 * winx) + offsx;
|
||||
const float y = (float)(pt[1] / 100 * winy) + offsy;
|
||||
|
||||
r_co[0] = x;
|
||||
r_co[1] = y;
|
||||
}
|
||||
}
|
||||
/* ----------- Volumetric Strokes --------------- */
|
||||
|
||||
/* draw a 3D stroke in "volumetric" style */
|
||||
|
|
|
@ -420,11 +420,11 @@ static bool pose_face_sets_floodfill_cb(
|
|||
if (sculpt_pose_brush_is_vertex_inside_brush_radius(
|
||||
co, data->pose_initial_co, data->radius, data->symm)) {
|
||||
const int visited_face_set = SCULPT_vertex_face_set_get(ss, index);
|
||||
BLI_gset_add(data->visited_face_sets, visited_face_set);
|
||||
BLI_gset_add(data->visited_face_sets, POINTER_FROM_INT(visited_face_set));
|
||||
}
|
||||
else if (symmetry_check) {
|
||||
data->current_face_set = SCULPT_vertex_face_set_get(ss, index);
|
||||
BLI_gset_add(data->visited_face_sets, data->current_face_set);
|
||||
BLI_gset_add(data->visited_face_sets, POINTER_FROM_INT(data->current_face_set));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -436,7 +436,7 @@ static bool pose_face_sets_floodfill_cb(
|
|||
if (data->is_first_iteration) {
|
||||
GSetIterator gs_iter;
|
||||
GSET_ITER (gs_iter, data->visited_face_sets) {
|
||||
const int visited_face_set = BLI_gsetIterator_getKey(&gs_iter);
|
||||
const int visited_face_set = POINTER_AS_INT(BLI_gsetIterator_getKey(&gs_iter));
|
||||
is_vertex_valid |= SCULPT_vertex_has_face_set(ss, index, visited_face_set);
|
||||
}
|
||||
}
|
||||
|
@ -470,7 +470,7 @@ static bool pose_face_sets_floodfill_cb(
|
|||
|
||||
/* Check if we can get a valid face set for the next iteration from this neighbor. */
|
||||
if (SCULPT_vertex_has_unique_face_set(ss, ni.index) &&
|
||||
!BLI_gset_haskey(data->visited_face_sets, next_face_set_candidate)) {
|
||||
!BLI_gset_haskey(data->visited_face_sets, POINTER_FROM_INT(next_face_set_candidate))) {
|
||||
if (!data->next_face_set_found) {
|
||||
data->next_face_set = next_face_set_candidate;
|
||||
data->next_vertex = ni.index;
|
||||
|
@ -603,7 +603,7 @@ static void pose_ik_chain_origin_heads_init(SculptPoseIKChain *ik_chain,
|
|||
}
|
||||
}
|
||||
|
||||
SculptPoseIKChain *SCULPT_pose_ik_chain_init_topology(Sculpt *sd,
|
||||
static SculptPoseIKChain *pose_ik_chain_init_topology(Sculpt *sd,
|
||||
Object *ob,
|
||||
SculptSession *ss,
|
||||
Brush *br,
|
||||
|
@ -682,7 +682,7 @@ SculptPoseIKChain *SCULPT_pose_ik_chain_init_topology(Sculpt *sd,
|
|||
return ik_chain;
|
||||
}
|
||||
|
||||
SculptPoseIKChain *SCULPT_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)
|
||||
{
|
||||
|
||||
|
@ -705,7 +705,7 @@ SculptPoseIKChain *SCULPT_pose_ik_chain_init_face_sets(
|
|||
SCULPT_floodfill_init(ss, &flood);
|
||||
SCULPT_floodfill_add_initial_with_symmetry(sd, ob, ss, &flood, current_vertex, FLT_MAX);
|
||||
|
||||
BLI_gset_add(visited_face_sets, current_face_set);
|
||||
BLI_gset_add(visited_face_sets, POINTER_FROM_INT(current_face_set));
|
||||
|
||||
PoseFloodFillData fdata = {
|
||||
.radius = radius,
|
||||
|
@ -761,10 +761,10 @@ SculptPoseIKChain *SCULPT_pose_ik_chain_init(Sculpt *sd,
|
|||
{
|
||||
switch (br->pose_origin_type) {
|
||||
case BRUSH_POSE_ORIGIN_TOPOLOGY:
|
||||
return SCULPT_pose_ik_chain_init_topology(sd, ob, ss, br, initial_location, radius);
|
||||
return pose_ik_chain_init_topology(sd, ob, ss, br, initial_location, radius);
|
||||
break;
|
||||
case BRUSH_POSE_ORIGIN_FACE_SETS:
|
||||
return SCULPT_pose_ik_chain_init_face_sets(sd, ob, ss, br, radius);
|
||||
return pose_ik_chain_init_face_sets(sd, ob, ss, br, radius);
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue