Cleanup: style & de-duplicate
This commit is contained in:
parent
f86fd544c1
commit
a5cd6a029f
|
@ -113,7 +113,7 @@ static float *track_get_search_floatbuf(ImBuf *ibuf, MovieTrackingTrack *track,
|
|||
return gray_pixels;
|
||||
}
|
||||
|
||||
/* Get image boffer for a given frame
|
||||
/* Get image buffer for a given frame
|
||||
*
|
||||
* Frame is in clip space.
|
||||
*/
|
||||
|
|
|
@ -493,7 +493,7 @@ static void set_ffmpeg_properties(RenderData *rd, AVCodecContext *c, const char
|
|||
*
|
||||
* For as long we don't allow editing properties in the interface
|
||||
* it's all good. bug if we allow editing them, we'll need to
|
||||
* repace it with some smarter code which would port settings
|
||||
* replace it with some smarter code which would port settings
|
||||
* from deprecated to new one.
|
||||
*/
|
||||
ffmpeg_set_expert_options(rd);
|
||||
|
|
|
@ -945,36 +945,26 @@ void BM_face_triangulate(BMesh *bm, BMFace *f,
|
|||
|
||||
nf_i = 0;
|
||||
for (i = 0; i < edge_array_len; i++) {
|
||||
BMFace *f_a, *f_b;
|
||||
BMFace *f_pair[2];
|
||||
BMEdge *e = edge_array[i];
|
||||
int j;
|
||||
#ifndef NDEBUG
|
||||
const bool ok = BM_edge_face_pair(e, &f_a, &f_b);
|
||||
const bool ok = BM_edge_face_pair(e, &f_pair[0], &f_pair[1]);
|
||||
BLI_assert(ok);
|
||||
#else
|
||||
BM_edge_face_pair(e, &f_a, &f_b);
|
||||
BM_edge_face_pair(e, &f_pair[0], &f_pair[1]);
|
||||
#endif
|
||||
for (j = 0; j < 2; j++) {
|
||||
if (FACE_USED_TEST(f_pair[j]) == false) {
|
||||
FACE_USED_SET(f_pair[j]); /* set_dirty */
|
||||
|
||||
if (FACE_USED_TEST(f_a) == false) {
|
||||
FACE_USED_SET(f_a); /* set_dirty */
|
||||
|
||||
if (nf_i < edge_array_len) {
|
||||
r_faces_new[nf_i++] = f_a;
|
||||
}
|
||||
else {
|
||||
f_new = f_a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (FACE_USED_TEST(f_b) == false) {
|
||||
FACE_USED_SET(f_b); /* set_dirty */
|
||||
|
||||
if (nf_i < edge_array_len) {
|
||||
r_faces_new[nf_i++] = f_b;
|
||||
}
|
||||
else {
|
||||
f_new = f_b;
|
||||
break;
|
||||
if (nf_i < edge_array_len) {
|
||||
r_faces_new[nf_i++] = f_pair[j];
|
||||
}
|
||||
else {
|
||||
f_new = f_pair[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -400,9 +400,10 @@ static void bm_edge_update_beauty_cost(BMEdge *e, Heap *eheap, HeapNode **eheap_
|
|||
/**
|
||||
* \note This function sets the edge indices to invalid values.
|
||||
*/
|
||||
void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
|
||||
const short flag, const short method,
|
||||
const short oflag_edge, const short oflag_face)
|
||||
void BM_mesh_beautify_fill(
|
||||
BMesh *bm, BMEdge **edge_array, const int edge_array_len,
|
||||
const short flag, const short method,
|
||||
const short oflag_edge, const short oflag_face)
|
||||
{
|
||||
Heap *eheap; /* edge heap */
|
||||
HeapNode **eheap_table; /* edge index aligned table pointing to the eheap */
|
||||
|
|
|
@ -31,12 +31,14 @@ enum {
|
|||
VERT_RESTRICT_TAG = (1 << 0),
|
||||
};
|
||||
|
||||
void BM_mesh_beautify_fill(BMesh *bm, BMEdge **edge_array, const int edge_array_len,
|
||||
const short flag, const short method,
|
||||
const short oflag_edge, const short oflag_face);
|
||||
void BM_mesh_beautify_fill(
|
||||
BMesh *bm, BMEdge **edge_array, const int edge_array_len,
|
||||
const short flag, const short method,
|
||||
const short oflag_edge, const short oflag_face);
|
||||
|
||||
float BM_verts_calc_rotate_beauty(const BMVert *v1, const BMVert *v2,
|
||||
const BMVert *v3, const BMVert *v4,
|
||||
const short flag, const short method);
|
||||
float BM_verts_calc_rotate_beauty(
|
||||
const BMVert *v1, const BMVert *v2,
|
||||
const BMVert *v3, const BMVert *v4,
|
||||
const short flag, const short method);
|
||||
|
||||
#endif /* __BMESH_BEAUTIFY_H__ */
|
||||
|
|
|
@ -714,7 +714,7 @@ static int gpencil_lasso_select_exec(bContext *C, wmOperator *op)
|
|||
|
||||
/* test if in lasso boundbox + within the lasso noose */
|
||||
if ((!ELEM(V2D_IS_CLIPPED, x0, y0)) && BLI_rcti_isect_pt(&rect, x0, y0) &&
|
||||
BLI_lasso_is_point_inside(mcords, mcords_tot, x0, y0, INT_MAX))
|
||||
BLI_lasso_is_point_inside(mcords, mcords_tot, x0, y0, INT_MAX))
|
||||
{
|
||||
if (select) {
|
||||
pt->flag |= GP_SPOINT_SELECT;
|
||||
|
|
|
@ -381,11 +381,13 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
|
|||
min_chain_length = RNA_int_get(op->ptr, "min_chain_length");
|
||||
|
||||
RNA_string_get(op->ptr, "filepath", filename);
|
||||
if (collada_import(C, filename,
|
||||
import_units,
|
||||
find_chains,
|
||||
fix_orientation,
|
||||
min_chain_length)) {
|
||||
if (collada_import(
|
||||
C, filename,
|
||||
import_units,
|
||||
find_chains,
|
||||
fix_orientation,
|
||||
min_chain_length))
|
||||
{
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue