quiet some -Wshadow warnings
This commit is contained in:
@@ -68,27 +68,27 @@ void BKE_sequence_iterator_begin(struct Editing *ed, SeqIterator *iter, int use_
|
||||
void BKE_sequence_iterator_next(SeqIterator *iter);
|
||||
void BKE_sequence_iterator_end(SeqIterator *iter);
|
||||
|
||||
#define SEQP_BEGIN(ed, _seq) \
|
||||
#define SEQP_BEGIN(_ed, _seq) \
|
||||
{ \
|
||||
SeqIterator iter; \
|
||||
for (BKE_sequence_iterator_begin(ed, &iter, 1); \
|
||||
iter.valid; \
|
||||
BKE_sequence_iterator_next(&iter)) \
|
||||
SeqIterator iter_macro; \
|
||||
for (BKE_sequence_iterator_begin(_ed, &iter_macro, 1); \
|
||||
iter_macro.valid; \
|
||||
BKE_sequence_iterator_next(&iter_macro)) \
|
||||
{ \
|
||||
_seq = iter.seq;
|
||||
_seq = iter_macro.seq;
|
||||
|
||||
#define SEQ_BEGIN(ed, _seq) \
|
||||
{ \
|
||||
SeqIterator iter; \
|
||||
for (BKE_sequence_iterator_begin(ed, &iter, 0); \
|
||||
iter.valid; \
|
||||
BKE_sequence_iterator_next(&iter)) \
|
||||
SeqIterator iter_macro; \
|
||||
for (BKE_sequence_iterator_begin(ed, &iter_macro, 0); \
|
||||
iter_macro.valid; \
|
||||
BKE_sequence_iterator_next(&iter_macro)) \
|
||||
{ \
|
||||
_seq = iter.seq;
|
||||
_seq = iter_macro.seq;
|
||||
|
||||
#define SEQ_END \
|
||||
} \
|
||||
BKE_sequence_iterator_end(&iter); \
|
||||
BKE_sequence_iterator_end(&iter_macro); \
|
||||
}
|
||||
|
||||
typedef struct SeqRenderData {
|
||||
|
||||
@@ -741,7 +741,7 @@ void BKE_brush_scale_unprojected_radius(float *unprojected_radius,
|
||||
}
|
||||
|
||||
/* scale brush size to reflect a change in the brush's unprojected radius */
|
||||
void BKE_brush_scale_size(int *BKE_brush_size_get,
|
||||
void BKE_brush_scale_size(int *r_brush_size,
|
||||
float new_unprojected_radius,
|
||||
float old_unprojected_radius)
|
||||
{
|
||||
@@ -749,7 +749,7 @@ void BKE_brush_scale_size(int *BKE_brush_size_get,
|
||||
/* avoid division by zero */
|
||||
if (old_unprojected_radius != 0)
|
||||
scale /= new_unprojected_radius;
|
||||
(*BKE_brush_size_get) = (int)((float)(*BKE_brush_size_get) * scale);
|
||||
(*r_brush_size) = (int)((float)(*r_brush_size) * scale);
|
||||
}
|
||||
|
||||
/* Brush Painting */
|
||||
|
||||
@@ -2109,7 +2109,7 @@ static void make_bevel_list_3D_tangent(BevList *bl)
|
||||
BevPoint *bevp2, *bevp1, *bevp0; /* standard for all make_bevel_list_3D_* funcs */
|
||||
int nr;
|
||||
|
||||
float bevp0_tan[3], cross_tmp[3];
|
||||
float bevp0_tan[3];
|
||||
|
||||
bevel_list_calc_bisect(bl);
|
||||
if (bl->poly == -1) /* check its not cyclic */
|
||||
@@ -2123,6 +2123,7 @@ static void make_bevel_list_3D_tangent(BevList *bl)
|
||||
|
||||
nr = bl->nr;
|
||||
while (nr--) {
|
||||
float cross_tmp[3];
|
||||
cross_v3_v3v3(cross_tmp, bevp1->tan, bevp1->dir);
|
||||
cross_v3_v3v3(bevp1->tan, cross_tmp, bevp1->dir);
|
||||
normalize_v3(bevp1->tan);
|
||||
|
||||
@@ -444,7 +444,6 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
|
||||
if (ob->type == OB_ARMATURE) {
|
||||
if (ob->pose) {
|
||||
bPoseChannel *pchan;
|
||||
bConstraint *con;
|
||||
|
||||
for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
|
||||
for (con = pchan->constraints.first; con; con = con->next) {
|
||||
|
||||
@@ -857,23 +857,22 @@ DO_INLINE float fbderiv(float length, float L)
|
||||
|
||||
DO_INLINE float fbstar(float length, float L, float kb, float cb)
|
||||
{
|
||||
float tempfb = kb * fb(length, L);
|
||||
|
||||
float fbstar = cb * (length - L);
|
||||
float tempfb_fl = kb * fb(length, L);
|
||||
float fbstar_fl = cb * (length - L);
|
||||
|
||||
if (tempfb < fbstar)
|
||||
return fbstar;
|
||||
if (tempfb_fl < fbstar_fl)
|
||||
return fbstar_fl;
|
||||
else
|
||||
return tempfb;
|
||||
return tempfb_fl;
|
||||
}
|
||||
|
||||
// function to calculae bending spring force (taken from Choi & Co)
|
||||
DO_INLINE float fbstar_jacobi(float length, float L, float kb, float cb)
|
||||
{
|
||||
float tempfb = kb * fb(length, L);
|
||||
float fbstar = cb * (length - L);
|
||||
float tempfb_fl = kb * fb(length, L);
|
||||
float fbstar_fl = cb * (length - L);
|
||||
|
||||
if (tempfb < fbstar) {
|
||||
if (tempfb_fl < fbstar_fl) {
|
||||
return cb;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2039,7 +2039,7 @@ static void bm_corners_to_loops_ex(ID *id, CustomData *fdata, CustomData *ldata,
|
||||
MDisps *ld = CustomData_get(ldata, loopstart, CD_MDISPS);
|
||||
MDisps *fd = CustomData_get(fdata, findex, CD_MDISPS);
|
||||
float (*disps)[3] = fd->disps;
|
||||
int i, tot = mf->v4 ? 4 : 3;
|
||||
int tot = mf->v4 ? 4 : 3;
|
||||
int side, corners;
|
||||
|
||||
if (CustomData_external_test(fdata, CD_MDISPS)) {
|
||||
|
||||
@@ -228,7 +228,6 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
}
|
||||
|
||||
for (i = 1; i < totvert; i++, mv++) {
|
||||
int j;
|
||||
int fix_normal = TRUE;
|
||||
|
||||
for (j = 0; j < 3; j++) {
|
||||
@@ -717,7 +716,6 @@ int BKE_mesh_validate_arrays(Mesh *mesh,
|
||||
MDeformVert *dv;
|
||||
for (i = 0, dv = dverts; i < totvert; i++, dv++) {
|
||||
MDeformWeight *dw;
|
||||
unsigned int j;
|
||||
|
||||
for (j = 0, dw = dv->dw; j < dv->totweight; j++, dw++) {
|
||||
/* note, greater then max defgroups is accounted for in our code, but not < 0 */
|
||||
@@ -914,7 +912,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, int update)
|
||||
{
|
||||
CustomData edata;
|
||||
EdgeHashIterator *ehi;
|
||||
MPoly *mp = mesh->mpoly;
|
||||
MPoly *mp;
|
||||
MEdge *med, *med_orig;
|
||||
EdgeHash *eh = BLI_edgehash_new();
|
||||
int i, totedge, totpoly = mesh->totpoly;
|
||||
@@ -932,7 +930,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, int update)
|
||||
}
|
||||
|
||||
/* mesh loops (bmesh only) */
|
||||
for (i = 0; i < totpoly; i++, mp++) {
|
||||
for (mp = mesh->mpoly, i = 0; i < totpoly; mp++, i++) {
|
||||
MLoop *l = &mesh->mloop[mp->loopstart];
|
||||
int j, l_prev = (l + (mp->totloop - 1))->v;
|
||||
for (j = 0; j < mp->totloop; j++, l++) {
|
||||
@@ -970,8 +968,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, int update)
|
||||
if (mesh->totpoly) {
|
||||
/* second pass, iterate through all loops again and assign
|
||||
* the newly created edges to them. */
|
||||
MPoly *mp = mesh->mpoly;
|
||||
for (i = 0; i < mesh->totpoly; i++, mp++) {
|
||||
for (mp = mesh->mpoly, i = 0; i < mesh->totpoly; mp++, i++) {
|
||||
MLoop *l = &mesh->mloop[mp->loopstart];
|
||||
MLoop *l_prev = (l + (mp->totloop - 1));
|
||||
int j;
|
||||
|
||||
@@ -1161,7 +1161,6 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm)
|
||||
int totlvl = ccgdm->multires.totlvl;
|
||||
|
||||
if (lvl < totlvl) {
|
||||
Mesh *me = ob->data;
|
||||
DerivedMesh *lowdm, *cddm, *highdm;
|
||||
CCGElem **highGridData, **lowGridData, **subGridData, **gridData, *diffGrid;
|
||||
CCGKey highGridKey, lowGridKey;
|
||||
|
||||
@@ -689,8 +689,8 @@ void BKE_object_unlink(Object *ob)
|
||||
|
||||
if (so->treestore) {
|
||||
TreeStoreElem *tselem = so->treestore->data;
|
||||
int a;
|
||||
for (a = 0; a < so->treestore->usedelem; a++, tselem++) {
|
||||
int i;
|
||||
for (i = 0; i < so->treestore->usedelem; i++, tselem++) {
|
||||
if (tselem->id == (ID *)ob) tselem->id = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1962,7 +1962,6 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
|
||||
ReebArcIterator arc_iter;
|
||||
BArcIterator *iter = (BArcIterator *)&arc_iter;
|
||||
RigEdge *edge;
|
||||
EmbedBucket *bucket = NULL;
|
||||
ReebNode *node_start, *node_end;
|
||||
ReebArc *earc = iarc->link_mesh;
|
||||
float angle_weight = 1.0; // GET FROM CONTEXT
|
||||
@@ -1996,8 +1995,6 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
|
||||
|
||||
/* equal number of joints and potential position, just fill them in */
|
||||
if (nb_joints == earc->bcount) {
|
||||
int i;
|
||||
|
||||
/* init with first values */
|
||||
for (i = 0; i < nb_joints; i++) {
|
||||
best_positions[i] = i + 1;
|
||||
@@ -2011,7 +2008,6 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
|
||||
MemoNode *result;
|
||||
#endif
|
||||
float **positions_cache = MEM_callocN(sizeof(float *) * (nb_positions + 2), "positions cache");
|
||||
int i;
|
||||
|
||||
positions_cache[0] = node_start->p;
|
||||
positions_cache[nb_positions + 1] = node_end->p;
|
||||
@@ -2053,7 +2049,7 @@ static void retargetArctoArcAggresive(bContext *C, RigGraph *rigg, RigArc *iarc,
|
||||
{
|
||||
float *no = NULL;
|
||||
if (i < nb_joints) {
|
||||
bucket = IT_peek(iter, best_positions[i]);
|
||||
EmbedBucket *bucket = IT_peek(iter, best_positions[i]);
|
||||
vec1 = bucket->p;
|
||||
no = bucket->no;
|
||||
}
|
||||
|
||||
@@ -857,8 +857,8 @@ static int editsource_exec(bContext *C, wmOperator *op)
|
||||
!BLI_ghashIterator_isDone(&ghi);
|
||||
BLI_ghashIterator_step(&ghi))
|
||||
{
|
||||
uiBut *but = BLI_ghashIterator_getKey(&ghi);
|
||||
if (but && ui_editsource_uibut_match(&ui_editsource_info->but_orig, but)) {
|
||||
uiBut *but_key = BLI_ghashIterator_getKey(&ghi);
|
||||
if (but_key && ui_editsource_uibut_match(&ui_editsource_info->but_orig, but_key)) {
|
||||
but_store = BLI_ghashIterator_getValue(&ghi);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no
|
||||
&tot_diff_point);
|
||||
|
||||
if (diff_points) {
|
||||
int i, tot_point;
|
||||
int j, tot_point;
|
||||
unsigned int tot_feather_point;
|
||||
float *feather_points = NULL, *points;
|
||||
|
||||
@@ -114,26 +114,26 @@ static int find_nearest_diff_point(const bContext *C, Mask *mask, const float no
|
||||
tot_point = tot_diff_point;
|
||||
}
|
||||
|
||||
for (i = 0; i < tot_point - 1; i++) {
|
||||
for (j = 0; j < tot_point - 1; j++) {
|
||||
float cur_dist, a[2], b[2];
|
||||
|
||||
a[0] = points[2 * i] * scalex;
|
||||
a[1] = points[2 * i + 1] * scaley;
|
||||
a[0] = points[2 * j] * scalex;
|
||||
a[1] = points[2 * j + 1] * scaley;
|
||||
|
||||
b[0] = points[2 * i + 2] * scalex;
|
||||
b[1] = points[2 * i + 3] * scaley;
|
||||
b[0] = points[2 * j + 2] * scalex;
|
||||
b[1] = points[2 * j + 3] * scaley;
|
||||
|
||||
cur_dist = dist_to_line_segment_v2(co, a, b);
|
||||
|
||||
if (cur_dist < dist) {
|
||||
if (tangent)
|
||||
sub_v2_v2v2(tangent, &diff_points[2 * i + 2], &diff_points[2 * i]);
|
||||
sub_v2_v2v2(tangent, &diff_points[2 * j + 2], &diff_points[2 * j]);
|
||||
|
||||
point_masklay = masklay;
|
||||
point_spline = spline;
|
||||
point = use_deform ? &spline->points[(cur_point - spline->points_deform)] : cur_point;
|
||||
dist = cur_dist;
|
||||
u = (float)i / tot_point;
|
||||
u = (float)j / tot_point;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -483,15 +483,15 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, wmEvent *event)
|
||||
customdata->uw = uw;
|
||||
|
||||
if (uw) {
|
||||
float co[2];
|
||||
float co_uw[2];
|
||||
float weight_scalar = BKE_mask_point_weight_scalar(spline, point, uw->u);
|
||||
|
||||
customdata->weight = uw->w;
|
||||
customdata->weight_scalar = weight_scalar;
|
||||
BKE_mask_point_segment_co(spline, point, uw->u, co);
|
||||
BKE_mask_point_segment_co(spline, point, uw->u, co_uw);
|
||||
BKE_mask_point_normal(spline, point, uw->u, customdata->no);
|
||||
|
||||
madd_v2_v2v2fl(customdata->feather, co, customdata->no, uw->w * weight_scalar);
|
||||
madd_v2_v2v2fl(customdata->feather, co_uw, customdata->no, uw->w * weight_scalar);
|
||||
}
|
||||
else {
|
||||
BezTriple *bezt = &point->bezt;
|
||||
|
||||
@@ -3852,8 +3852,8 @@ static void sort_bmelem_flag(Scene *scene, Object *ob,
|
||||
char *pblock[3] = {NULL, NULL, NULL}, *pb;
|
||||
BMElemSort *sblock[3] = {NULL, NULL, NULL}, *sb;
|
||||
int *map[3] = {NULL, NULL, NULL}, *mp;
|
||||
int totelem[3] = {0, 0, 0}, tot;
|
||||
int affected[3] = {0, 0, 0}, aff;
|
||||
int totelem[3] = {0, 0, 0};
|
||||
int affected[3] = {0, 0, 0};
|
||||
int i, j;
|
||||
|
||||
if (!(types && flag && action))
|
||||
@@ -4228,8 +4228,8 @@ static void sort_bmelem_flag(Scene *scene, Object *ob,
|
||||
if (pb && sb && !map[j]) {
|
||||
char *p_blk;
|
||||
BMElemSort *s_blk;
|
||||
tot = totelem[j];
|
||||
aff = affected[j];
|
||||
int tot = totelem[j];
|
||||
int aff = affected[j];
|
||||
|
||||
qsort(sb, aff, sizeof(BMElemSort), bmelemsort_comp);
|
||||
|
||||
|
||||
@@ -162,15 +162,15 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
|
||||
kb = BLI_findlink(&key->block, ob->shapenr - 1);
|
||||
|
||||
if (kb) {
|
||||
int i1, i2;
|
||||
float *fp1, *fp2;
|
||||
float tvec[3];
|
||||
char *tag_elem = MEM_callocN(sizeof(char) * kb->totelem, "shape_key_mirror");
|
||||
|
||||
|
||||
if (ob->type == OB_MESH) {
|
||||
Mesh *me = ob->data;
|
||||
MVert *mv;
|
||||
int i1, i2;
|
||||
float *fp1, *fp2;
|
||||
float tvec[3];
|
||||
|
||||
mesh_octree_table(ob, NULL, NULL, 's');
|
||||
|
||||
|
||||
@@ -381,8 +381,8 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
|
||||
{
|
||||
Main *bmain = CTX_data_main(C);
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
float rsmat[3][3], tmat[3][3], obmat[3][3], iobmat[3][3], mat[4][4], scale;
|
||||
int a, change = 1;
|
||||
float rsmat[3][3], obmat[3][3], iobmat[3][3], mat[4][4], scale;
|
||||
int change = 1;
|
||||
|
||||
/* first check if we can execute */
|
||||
CTX_DATA_BEGIN (C, Object *, ob, selected_editable_objects)
|
||||
@@ -464,6 +464,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
|
||||
copy_v3_v3(mat[3], ob->loc);
|
||||
|
||||
if (!(apply_scale && apply_rot)) {
|
||||
float tmat[3][3];
|
||||
/* correct for scale and rotation that is still applied */
|
||||
BKE_object_to_mat3(ob, obmat);
|
||||
invert_m3_m3(iobmat, obmat);
|
||||
@@ -476,6 +477,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
|
||||
if (ob->type == OB_MESH) {
|
||||
Mesh *me = ob->data;
|
||||
MVert *mvert;
|
||||
int a;
|
||||
|
||||
if (apply_scale)
|
||||
multiresModifier_scale_disp(scene, ob);
|
||||
@@ -518,6 +520,7 @@ static int apply_objects_internal(bContext *C, ReportList *reports, int apply_lo
|
||||
Nurb *nu;
|
||||
BPoint *bp;
|
||||
BezTriple *bezt;
|
||||
int a;
|
||||
|
||||
scale = mat3_to_scale(rsmat);
|
||||
|
||||
@@ -896,6 +899,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* offset other selected objects */
|
||||
if (do_inverse_offset && (centermode != GEOMETRY_TO_ORIGIN)) {
|
||||
CollectionPointerLink *ctx_link_other;
|
||||
|
||||
/* was the object data modified
|
||||
* note: the functions above must set 'cent' */
|
||||
copy_v3_v3(centn, cent);
|
||||
@@ -910,8 +915,16 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
||||
ignore_parent_tx(bmain, scene, ob);
|
||||
|
||||
/* other users? */
|
||||
CTX_DATA_BEGIN (C, Object *, ob_other, selected_editable_objects)
|
||||
//CTX_DATA_BEGIN (C, Object *, ob_other, selected_editable_objects)
|
||||
//{
|
||||
|
||||
/* use existing context looper */
|
||||
for (ctx_link_other = ctx_data_list.first;
|
||||
ctx_link_other;
|
||||
ctx_link_other = ctx_link_other->next)
|
||||
{
|
||||
Object *ob_other = ctx_link_other->ptr.data;
|
||||
|
||||
if ((ob_other->flag & OB_DONE) == 0 &&
|
||||
((ob->data && (ob->data == ob_other->data)) ||
|
||||
(ob->dup_group == ob_other->dup_group &&
|
||||
@@ -931,7 +944,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
||||
ignore_parent_tx(bmain, scene, ob_other);
|
||||
}
|
||||
}
|
||||
CTX_DATA_END;
|
||||
//CTX_DATA_END;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -918,7 +918,6 @@ void ED_vgroup_select_by_name(Object *ob, const char *name)
|
||||
static void vgroup_select_verts(Object *ob, int select)
|
||||
{
|
||||
const int def_nr = ob->actdef - 1;
|
||||
MDeformVert *dv;
|
||||
|
||||
if (!BLI_findlink(&ob->defbase, def_nr)) {
|
||||
return;
|
||||
@@ -934,7 +933,7 @@ static void vgroup_select_verts(Object *ob, int select)
|
||||
|
||||
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
|
||||
if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
|
||||
dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
|
||||
MDeformVert *dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT);
|
||||
if (defvert_find_index(dv, def_nr)) {
|
||||
BM_vert_select_set(em->bm, eve, select);
|
||||
}
|
||||
@@ -971,6 +970,7 @@ static void vgroup_select_verts(Object *ob, int select)
|
||||
Lattice *lt = vgroup_edit_lattice(ob);
|
||||
|
||||
if (lt->dvert) {
|
||||
MDeformVert *dv;
|
||||
BPoint *bp;
|
||||
int a, tot;
|
||||
|
||||
@@ -2451,7 +2451,6 @@ static void vgroup_delete_all(Object *ob)
|
||||
/* only in editmode */
|
||||
static void vgroup_assign_verts(Object *ob, const float weight)
|
||||
{
|
||||
MDeformVert *dv;
|
||||
const int def_nr = ob->actdef - 1;
|
||||
|
||||
if (!BLI_findlink(&ob->defbase, def_nr))
|
||||
@@ -2471,6 +2470,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
|
||||
/* Go through the list of editverts and assign them */
|
||||
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
||||
MDeformVert *dv;
|
||||
MDeformWeight *dw;
|
||||
dv = CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_MDEFORMVERT); /* can be NULL */
|
||||
dw = defvert_verify_index(dv, def_nr);
|
||||
@@ -2505,6 +2505,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
|
||||
}
|
||||
else if (ob->type == OB_LATTICE) {
|
||||
Lattice *lt = vgroup_edit_lattice(ob);
|
||||
MDeformVert *dv;
|
||||
BPoint *bp;
|
||||
int a, tot;
|
||||
|
||||
|
||||
@@ -325,9 +325,9 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
for (pid=pidlist.first; pid; pid=pid->next) {
|
||||
if (pid->cache == cache) {
|
||||
PointCache *cache = BKE_ptcache_add(pid->ptcaches);
|
||||
cache->step = pid->default_step;
|
||||
*(pid->cache_ptr) = cache;
|
||||
PointCache *cache_new = BKE_ptcache_add(pid->ptcaches);
|
||||
cache_new->step = pid->default_step;
|
||||
*(pid->cache_ptr) = cache_new;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,6 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Paint *paint = paint_get_active_from_context(C);
|
||||
Brush *brush = paint_brush(paint);
|
||||
float window[2];
|
||||
int hit;
|
||||
|
||||
@@ -350,6 +349,7 @@ static int sculpt_get_brush_geometry(bContext *C, ViewContext *vc,
|
||||
if (vc->obact->sculpt && vc->obact->sculpt->pbvh &&
|
||||
sculpt_stroke_get_location(C, location, window))
|
||||
{
|
||||
Brush *brush = paint_brush(paint);
|
||||
*pixel_radius =
|
||||
project_brush_radius(vc,
|
||||
BKE_brush_unprojected_radius_get(scene, brush),
|
||||
|
||||
@@ -2554,7 +2554,6 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
|
||||
float (*outset_uv)[2] = ps->faceSeamUVs[face_index];
|
||||
float insetCos[4][3]; /* inset face coords. NOTE!!! ScreenSace for ortho, Worldspace in prespective view */
|
||||
|
||||
float fac;
|
||||
float *vCoSS[4]; /* vertex screenspace coords */
|
||||
|
||||
float bucket_clip_edges[2][2]; /* store the screenspace coords of the face, clipped by the bucket's screen aligned rectangle */
|
||||
@@ -2636,6 +2635,7 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
|
||||
|
||||
/* test we're inside uvspace bucket and triangle bounds */
|
||||
if (isect_point_quad_v2(uv, seam_subsection[0], seam_subsection[1], seam_subsection[2], seam_subsection[3])) {
|
||||
float fac;
|
||||
|
||||
/* We need to find the closest point along the face edge,
|
||||
* getting the screen_px_from_*** wont work because our actual location
|
||||
@@ -2670,9 +2670,9 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
|
||||
#if 1
|
||||
/* get the UV on the line since we want to copy the pixels from there for bleeding */
|
||||
float uv_close[2];
|
||||
float fac = closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]);
|
||||
if (fac < 0.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx1]);
|
||||
else if (fac > 1.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx2]);
|
||||
float uv_fac = closest_to_line_v2(uv_close, uv, tf_uv_pxoffset[fidx1], tf_uv_pxoffset[fidx2]);
|
||||
if (uv_fac < 0.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx1]);
|
||||
else if (uv_fac > 1.0f) copy_v2_v2(uv_close, tf_uv_pxoffset[fidx2]);
|
||||
|
||||
if (side) {
|
||||
barycentric_weights_v2(tf_uv_pxoffset[0], tf_uv_pxoffset[2], tf_uv_pxoffset[3], uv_close, w);
|
||||
@@ -2683,16 +2683,16 @@ static void project_paint_face_init(const ProjPaintState *ps, const int thread_i
|
||||
#else /* this is buggy with quads, don't use for now */
|
||||
|
||||
/* Cheat, we know where we are along the edge so work out the weights from that */
|
||||
fac = fac1 + (fac * (fac2 - fac1));
|
||||
uv_fac = fac1 + (uv_fac * (fac2 - fac1));
|
||||
|
||||
w[0] = w[1] = w[2] = 0.0;
|
||||
if (side) {
|
||||
w[fidx1 ? fidx1 - 1 : 0] = 1.0f - fac;
|
||||
w[fidx2 ? fidx2 - 1 : 0] = fac;
|
||||
w[fidx1 ? fidx1 - 1 : 0] = 1.0f - uv_fac;
|
||||
w[fidx2 ? fidx2 - 1 : 0] = uv_fac;
|
||||
}
|
||||
else {
|
||||
w[fidx1] = 1.0f - fac;
|
||||
w[fidx2] = fac;
|
||||
w[fidx1] = 1.0f - uv_fac;
|
||||
w[fidx2] = uv_fac;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1535,7 +1535,6 @@ static void enforce_locks(MDeformVert *odv, MDeformVert *ndv,
|
||||
}
|
||||
else {
|
||||
/* reset the weights */
|
||||
unsigned int i;
|
||||
MDeformWeight *dw_old = odv->dw;
|
||||
MDeformWeight *dw_new = ndv->dw;
|
||||
|
||||
@@ -2049,7 +2048,6 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNU
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
struct WPaintData *wpd;
|
||||
Mesh *me;
|
||||
bDeformGroup *dg;
|
||||
|
||||
float mat[4][4], imat[4][4];
|
||||
|
||||
@@ -2098,12 +2096,14 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, const float UNU
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* check if we are attempting to paint onto a locked vertex group,
|
||||
* and other options disallow it from doing anything useful */
|
||||
dg = BLI_findlink(&ob->defbase, (ob->actdef - 1));
|
||||
if (dg->flag & DG_LOCK_WEIGHT) {
|
||||
BKE_report(op->reports, RPT_WARNING, "Active group is locked, aborting");
|
||||
return FALSE;
|
||||
{
|
||||
/* check if we are attempting to paint onto a locked vertex group,
|
||||
* and other options disallow it from doing anything useful */
|
||||
bDeformGroup *dg = BLI_findlink(&ob->defbase, (ob->actdef - 1));
|
||||
if (dg->flag & DG_LOCK_WEIGHT) {
|
||||
BKE_report(op->reports, RPT_WARNING, "Active group is locked, aborting");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* ALLOCATIONS! no return after this line */
|
||||
|
||||
@@ -3536,8 +3536,6 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
StrokeCache *cache = ss->cache;
|
||||
Brush *brush = paint_brush(&sd->paint);
|
||||
|
||||
int dx, dy;
|
||||
|
||||
/* RNA_float_get_array(ptr, "location", cache->traced_location); */
|
||||
|
||||
if (cache->first_time ||
|
||||
@@ -3606,8 +3604,8 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
if (brush->flag & BRUSH_ANCHORED) {
|
||||
int hit = 0;
|
||||
|
||||
dx = cache->mouse[0] - cache->initial_mouse[0];
|
||||
dy = cache->mouse[1] - cache->initial_mouse[1];
|
||||
const float dx = cache->mouse[0] - cache->initial_mouse[0];
|
||||
const float dy = cache->mouse[1] - cache->initial_mouse[1];
|
||||
|
||||
sd->anchored_size = cache->pixel_radius = sqrt(dx * dx + dy * dy);
|
||||
|
||||
@@ -3617,8 +3615,8 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
float halfway[2];
|
||||
float out[3];
|
||||
|
||||
halfway[0] = (float)dx * 0.5f + cache->initial_mouse[0];
|
||||
halfway[1] = (float)dy * 0.5f + cache->initial_mouse[1];
|
||||
halfway[0] = dx * 0.5f + cache->initial_mouse[0];
|
||||
halfway[1] = dy * 0.5f + cache->initial_mouse[1];
|
||||
|
||||
if (sculpt_stroke_get_location(C, out, halfway)) {
|
||||
copy_v3_v3(sd->anchored_location, out);
|
||||
@@ -3665,8 +3663,8 @@ static void sculpt_update_cache_variants(bContext *C, Sculpt *sd, Object *ob,
|
||||
sculpt_update_brush_delta(sd, ob, brush);
|
||||
|
||||
if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) {
|
||||
dx = cache->mouse[0] - cache->initial_mouse[0];
|
||||
dy = cache->mouse[1] - cache->initial_mouse[1];
|
||||
const float dx = cache->mouse[0] - cache->initial_mouse[0];
|
||||
const float dy = cache->mouse[1] - cache->initial_mouse[1];
|
||||
|
||||
cache->vertex_rotation = -atan2f(dx, dy) * cache->bstrength;
|
||||
|
||||
|
||||
@@ -900,7 +900,7 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
|
||||
}
|
||||
else {
|
||||
/* get settings from active particle system instead */
|
||||
PointerRNA *ptr = get_pointer_type(path, &RNA_ParticleSystem);
|
||||
ptr = get_pointer_type(path, &RNA_ParticleSystem);
|
||||
|
||||
if (ptr && ptr->data) {
|
||||
ParticleSettings *part = ((ParticleSystem *)ptr->data)->part;
|
||||
|
||||
@@ -291,7 +291,6 @@ static int select_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
MovieTrackingTrack *track = tracking_marker_check_slide(C, event, NULL, NULL, NULL);
|
||||
|
||||
if (track) {
|
||||
SpaceClip *sc = CTX_wm_space_clip(C);
|
||||
MovieClip *clip = ED_space_clip_get_clip(sc);
|
||||
|
||||
clip->tracking.act_track = track;
|
||||
|
||||
@@ -849,8 +849,6 @@ static void draw_nla_channel_list_gl(bAnimContext *ac, ListBase *anim_data, View
|
||||
|
||||
/* draw NLA-action line 'status-icons' - only when there's an action */
|
||||
if ((ale->type == ANIMTYPE_NLAACTION) && (ale->data)) {
|
||||
AnimData *adt = ale->adt;
|
||||
|
||||
offset += 16;
|
||||
|
||||
/* now draw some indicator icons */
|
||||
|
||||
@@ -3098,7 +3098,6 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode)
|
||||
void *lock;
|
||||
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
|
||||
if (ibuf) {
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
float x, y;
|
||||
unsigned char *display_buffer;
|
||||
void *cache_handle;
|
||||
|
||||
@@ -1935,7 +1935,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
bNodeTree *ntree = snode->edittree;
|
||||
bNode *gnode = node_tree_get_editgroup(snode->nodetree);
|
||||
float gnode_x = 0.0f, gnode_y = 0.0f;
|
||||
bNode *node, *new_node;
|
||||
bNode *node;
|
||||
bNodeLink *link, *newlink;
|
||||
|
||||
ED_preview_kill_jobs(C);
|
||||
@@ -1950,6 +1950,7 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
|
||||
for (node = ntree->nodes.first; node; node = node->next) {
|
||||
if (node->flag & SELECT) {
|
||||
bNode *new_node;
|
||||
new_node = nodeCopyNode(NULL, node);
|
||||
BKE_node_clipboard_add_node(new_node);
|
||||
}
|
||||
|
||||
@@ -147,7 +147,7 @@ static void node_socket_remove(Main *bmain, bNodeTree *ntree, bNode *node_to, bN
|
||||
static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_to, bNodeSocket *sock_to, bNodeTemplate *ntemp, int sock_num)
|
||||
{
|
||||
bNode *node_from;
|
||||
bNodeSocket *sock_from;
|
||||
bNodeSocket *sock_from_tmp;
|
||||
bNode *node_prev = NULL;
|
||||
|
||||
/* unlink existing node */
|
||||
@@ -183,8 +183,8 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t
|
||||
nodeSetActive(ntree, node_from);
|
||||
|
||||
/* add link */
|
||||
sock_from = BLI_findlink(&node_from->outputs, sock_num);
|
||||
nodeAddLink(ntree, node_from, sock_from, node_to, sock_to);
|
||||
sock_from_tmp = BLI_findlink(&node_from->outputs, sock_num);
|
||||
nodeAddLink(ntree, node_from, sock_from_tmp, node_to, sock_to);
|
||||
|
||||
/* copy input sockets from previous node */
|
||||
if (node_prev && node_from != node_prev) {
|
||||
|
||||
@@ -2620,7 +2620,6 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
|
||||
Sequence *seq;
|
||||
|
||||
ListBase nseqbase = {NULL, NULL};
|
||||
|
||||
@@ -2656,8 +2655,11 @@ static int sequencer_copy_exec(bContext *C, wmOperator *op)
|
||||
seqbase_clipboard_frame = scene->r.cfra;
|
||||
|
||||
/* Need to remove anything that references the current scene */
|
||||
for (seq = seqbase_clipboard.first; seq; seq = seq->next) {
|
||||
seq_copy_del_sound(scene, seq);
|
||||
{
|
||||
Sequence *seq;
|
||||
for (seq = seqbase_clipboard.first; seq; seq = seq->next) {
|
||||
seq_copy_del_sound(scene, seq);
|
||||
}
|
||||
}
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -533,8 +533,7 @@ static void update_tface_color_layer(DerivedMesh *dm)
|
||||
}
|
||||
else {
|
||||
float col[3];
|
||||
Material *ma = give_current_material(Gtexdraw.ob, mface[i].mat_nr + 1);
|
||||
|
||||
|
||||
if (ma) {
|
||||
if (Gtexdraw.color_profile) linearrgb_to_srgb_v3_v3(col, &ma->r);
|
||||
else copy_v3_v3(col, &ma->r);
|
||||
|
||||
@@ -158,7 +158,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
||||
TransformProperties *tfp;
|
||||
float median[NBR_TRANSFORM_PROPERTIES], ve_median[NBR_TRANSFORM_PROPERTIES];
|
||||
int tot, totedgedata, totcurvedata, totlattdata, totskinradius, totcurvebweight;
|
||||
int meshdata = FALSE, i;
|
||||
int meshdata = FALSE;
|
||||
char defstr[320];
|
||||
PointerRNA data_ptr;
|
||||
|
||||
@@ -470,6 +470,8 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
||||
|
||||
}
|
||||
else { /* apply */
|
||||
int i;
|
||||
|
||||
memcpy(ve_median, tfp->ve_median, sizeof(tfp->ve_median));
|
||||
|
||||
if (v3d->flag & V3D_GLOBAL_STATS) {
|
||||
@@ -485,10 +487,10 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
||||
Mesh *me = ob->data;
|
||||
BMEditMesh *em = me->edit_btmesh;
|
||||
BMesh *bm = em->bm;
|
||||
BMVert *eve;
|
||||
BMIter iter;
|
||||
|
||||
if (len_v3(&median[LOC_X]) > 0.000001f) {
|
||||
BMVert *eve;
|
||||
|
||||
BM_ITER_MESH (eve, &iter, bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
|
||||
|
||||
@@ -2014,12 +2014,10 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, i
|
||||
}
|
||||
|
||||
if (bone_selected) {
|
||||
Object *ob = base->object;
|
||||
|
||||
if (ob && (ob->type == OB_ARMATURE)) {
|
||||
bArmature *arm = ob->data;
|
||||
if (base->object && (base->object->type == OB_ARMATURE)) {
|
||||
bArmature *arm = base->object->data;
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, ob);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, base->object);
|
||||
|
||||
if (arm && (arm->flag & ARM_HAS_VIZ_DEPS)) {
|
||||
/* mask modifier ('armature' mode), etc. */
|
||||
|
||||
@@ -4860,10 +4860,9 @@ static int createSlideVerts(TransInfo *t)
|
||||
{
|
||||
BMEditMesh *em = BMEdit_FromObject(t->obedit);
|
||||
BMesh *bm = em->bm;
|
||||
BMIter iter, iter2;
|
||||
BMIter iter;
|
||||
BMEdge *e, *e1;
|
||||
BMVert *v, *v2, *first;
|
||||
BMLoop *l, *l1, *l2;
|
||||
TransDataSlideVert *sv_array;
|
||||
BMBVHTree *btree = BMBVH_NewBVH(em, BMBVH_RESPECT_HIDDEN, NULL, NULL);
|
||||
SmallHash table;
|
||||
@@ -4903,6 +4902,7 @@ static int createSlideVerts(TransInfo *t)
|
||||
/*ensure valid selection*/
|
||||
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
|
||||
BMIter iter2;
|
||||
numsel = 0;
|
||||
BM_ITER_ELEM (e, &iter2, v, BM_EDGES_OF_VERT) {
|
||||
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
|
||||
@@ -4955,6 +4955,8 @@ static int createSlideVerts(TransInfo *t)
|
||||
|
||||
j = 0;
|
||||
while (1) {
|
||||
BMLoop *l, *l1, *l2;
|
||||
|
||||
v = NULL;
|
||||
BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
|
||||
if (BM_elem_flag_test(v, BM_ELEM_TAG))
|
||||
@@ -5088,7 +5090,7 @@ static int createSlideVerts(TransInfo *t)
|
||||
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) {
|
||||
BMIter iter2;
|
||||
BMEdge *e2;
|
||||
float vec1[3], mval[2] = {t->mval[0], t->mval[1]}, d;
|
||||
float vec1[3], d;
|
||||
|
||||
/* search cross edges for visible edge to the mouse cursor,
|
||||
* then use the shared vertex to calculate screen vector*/
|
||||
|
||||
@@ -631,7 +631,6 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
|
||||
/* if there's an edge available, use that for the tangent */
|
||||
if (em->bm->totedgesel >= 1) {
|
||||
BMEdge *eed = NULL;
|
||||
BMIter iter;
|
||||
|
||||
BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
|
||||
if (BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
|
||||
@@ -746,14 +745,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
|
||||
MetaBall *mb = obedit->data;
|
||||
|
||||
if (mb->lastelem) {
|
||||
float mat[4][4];
|
||||
float qmat[3][3];
|
||||
|
||||
/* Rotation of MetaElem is stored in quat */
|
||||
quat_to_mat4(mat, mb->lastelem->quat);
|
||||
quat_to_mat3(qmat, mb->lastelem->quat);
|
||||
|
||||
copy_v3_v3(normal, mat[2]);
|
||||
copy_v3_v3(normal, qmat[2]);
|
||||
|
||||
negate_v3_v3(plane, mat[1]);
|
||||
negate_v3_v3(plane, qmat[1]);
|
||||
|
||||
result = ORIENTATION_FACE;
|
||||
}
|
||||
|
||||
@@ -170,7 +170,6 @@ void ED_object_assign_active_image(Main *bmain, Object *ob, int mat_nr, Image *i
|
||||
void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *ima, Image *previma)
|
||||
{
|
||||
BMEditMesh *em;
|
||||
BMFace *efa;
|
||||
BMIter iter;
|
||||
MTexPoly *tf;
|
||||
int update = 0;
|
||||
@@ -198,6 +197,8 @@ void ED_uvedit_assign_image(Main *bmain, Scene *scene, Object *obedit, Image *im
|
||||
ED_object_assign_active_image(bmain, obedit, efa->mat_nr + 1, ima);
|
||||
}
|
||||
else {
|
||||
BMFace *efa;
|
||||
|
||||
/* old shading system, assign image to selected faces */
|
||||
#ifdef USE_SWITCH_ASPECT
|
||||
float prev_aspect[2], fprev_aspect;
|
||||
@@ -1310,9 +1311,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
Object *obedit;
|
||||
Image *ima;
|
||||
BMEditMesh *em;
|
||||
BMIter iter, liter;
|
||||
MTexPoly *tf;
|
||||
MLoopUV *luv;
|
||||
float cent[2], min[2], max[2];
|
||||
|
||||
scene = CTX_data_scene(C);
|
||||
@@ -1324,6 +1323,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
INIT_MINMAX2(min, max);
|
||||
|
||||
if (tool == 'a') {
|
||||
BMIter iter, liter;
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
||||
@@ -1335,7 +1335,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
|
||||
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
|
||||
if (uvedit_uv_select_test(em, scene, l)) {
|
||||
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
DO_MINMAX2(luv->uv, min, max);
|
||||
}
|
||||
}
|
||||
@@ -1347,6 +1347,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
uvedit_center(scene, ima, obedit, cent, 0);
|
||||
|
||||
if (tool == 'x' || tool == 'w') {
|
||||
BMIter iter, liter;
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
||||
@@ -1357,7 +1358,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
|
||||
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
|
||||
if (uvedit_uv_select_test(em, scene, l)) {
|
||||
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
luv->uv[0] = cent[0];
|
||||
}
|
||||
|
||||
@@ -1366,6 +1367,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
}
|
||||
|
||||
if (tool == 'y' || tool == 'w') {
|
||||
BMIter iter, liter;
|
||||
BMFace *efa;
|
||||
BMLoop *l;
|
||||
|
||||
@@ -1376,7 +1378,7 @@ static void weld_align_uv(bContext *C, int tool)
|
||||
|
||||
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
|
||||
if (uvedit_uv_select_test(em, scene, l)) {
|
||||
luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
MLoopUV *luv = CustomData_bmesh_get(&em->bm->ldata, l->head.data, CD_MLOOPUV);
|
||||
luv->uv[1] = cent[1];
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
||||
BMLoop *ls[3];
|
||||
float *co[4];
|
||||
float *uv[4];
|
||||
int i, lsel;
|
||||
int lsel;
|
||||
|
||||
if ((BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) || (sel && BM_elem_flag_test(efa, BM_ELEM_SELECT) == 0))
|
||||
continue;
|
||||
@@ -245,6 +245,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
||||
// tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); // UNUSED
|
||||
|
||||
if (efa->len == 3 || efa->len == 4) {
|
||||
int i;
|
||||
/* for quads let parametrize split, it can make better decisions
|
||||
* about which split is best for unwrapping than scanfill */
|
||||
i = 0;
|
||||
@@ -291,6 +292,7 @@ static ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em,
|
||||
|
||||
BLI_scanfill_calc_ex(&sf_ctx, TRUE, efa->no);
|
||||
for (sf_tri = sf_ctx.fillfacebase.first; sf_tri; sf_tri = sf_tri->next) {
|
||||
int i;
|
||||
ls[0] = sf_tri->v1->tmp.p;
|
||||
ls[1] = sf_tri->v2->tmp.p;
|
||||
ls[2] = sf_tri->v3->tmp.p;
|
||||
|
||||
Reference in New Issue
Block a user