Cleanup: whitespace, duplicate includes
This commit is contained in:
parent
8c96cb55c3
commit
83a83a3d4b
|
@ -1248,7 +1248,7 @@ BVHTree *bvhtree_from_mesh_get(
|
|||
MEM_freeN(mloop);
|
||||
}
|
||||
if (looptri_allocated) {
|
||||
MEM_freeN((void*)looptri);
|
||||
MEM_freeN((void *)looptri);
|
||||
}
|
||||
|
||||
memset(data, 0, sizeof(*data));
|
||||
|
@ -1528,7 +1528,7 @@ BVHTree *BKE_bvhtree_from_mesh_get(
|
|||
MEM_freeN(mloop);
|
||||
}
|
||||
if (looptri_allocated) {
|
||||
MEM_freeN((void*)looptri);
|
||||
MEM_freeN((void *)looptri);
|
||||
}
|
||||
|
||||
memset(data, 0, sizeof(*data));
|
||||
|
|
|
@ -191,7 +191,8 @@ static void ensure_seg_pt_count(ParticleSystem *psys, ParticleBatchCache *cache)
|
|||
PTCacheEdit *edit = PE_get_current_from_psys(psys);
|
||||
if (edit != NULL && edit->pathcache != NULL) {
|
||||
count_cache_segment_keys(edit->pathcache, psys->totpart, cache);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
if (psys->pathcache &&
|
||||
(!psys->childcache || (psys->part->draw & PART_DRAW_PARENT)))
|
||||
{
|
||||
|
@ -373,11 +374,11 @@ static int particle_batch_cache_fill_segments(
|
|||
|
||||
if (psmd != NULL) {
|
||||
for (int k = 0; k < num_uv_layers; k++) {
|
||||
GWN_vertbuf_attr_set(
|
||||
cache->pos, uv_id[k], curr_point,
|
||||
(is_simple && is_child)
|
||||
? (*r_parent_uvs)[psys->child[i].parent][k]
|
||||
: uv[k]);
|
||||
GWN_vertbuf_attr_set(
|
||||
cache->pos, uv_id[k], curr_point,
|
||||
(is_simple && is_child) ?
|
||||
(*r_parent_uvs)[psys->child[i].parent][k] :
|
||||
uv[k]);
|
||||
}
|
||||
if (!is_simple) {
|
||||
MEM_freeN(uv);
|
||||
|
|
|
@ -143,7 +143,7 @@ static void particle_edit_cache_populate(void *vedata, PTCacheEdit *edit)
|
|||
{
|
||||
PARTICLE_StorageList *stl = ((PARTICLE_Data *)vedata)->stl;
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
ParticleEditSettings *pset= PE_settings(draw_ctx->scene);
|
||||
ParticleEditSettings *pset = PE_settings(draw_ctx->scene);
|
||||
{
|
||||
struct Gwn_Batch *strands = DRW_cache_particles_get_edit_strands(edit);
|
||||
DRW_shgroup_call_add(stl->g_data->strands_group, strands, NULL);
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
|
||||
#include "ED_manipulator_library.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_mesh.h"
|
||||
#include "ED_object.h"
|
||||
#include "ED_screen.h"
|
||||
#include "ED_undo.h"
|
||||
|
@ -44,11 +43,9 @@
|
|||
|
||||
#include "RNA_access.h"
|
||||
#include "RNA_define.h"
|
||||
#include "RNA_define.h"
|
||||
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
#include "UI_resources.h"
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ static int edbm_rip_edge_invoke(bContext *C, wmOperator *UNUSED(op), const wmEve
|
|||
float v_sco[2];
|
||||
|
||||
if (BM_elem_flag_test(v, BM_ELEM_SELECT) &&
|
||||
BM_elem_flag_test(v, BM_ELEM_TAG) == false)
|
||||
BM_elem_flag_test(v, BM_ELEM_TAG) == false)
|
||||
{
|
||||
/* Rules for */
|
||||
float angle_best = FLT_MAX;
|
||||
|
|
|
@ -3765,7 +3765,7 @@ static int edbm_select_sharp_edges_exec(bContext *C, wmOperator *op)
|
|||
|
||||
BM_ITER_MESH (e, &iter, em->bm, BM_EDGES_OF_MESH) {
|
||||
if (BM_elem_flag_test(e, BM_ELEM_HIDDEN) == false &&
|
||||
BM_edge_loop_pair(e, &l1, &l2))
|
||||
BM_edge_loop_pair(e, &l1, &l2))
|
||||
{
|
||||
/* edge has exactly two neighboring faces, check angle */
|
||||
const float angle_cos = dot_v3v3(l1->f->no, l2->f->no);
|
||||
|
@ -3953,9 +3953,9 @@ static int edbm_select_non_manifold_exec(bContext *C, wmOperator *op)
|
|||
BM_ITER_MESH (e, &iter, em->bm, BM_EDGES_OF_MESH) {
|
||||
if (!BM_elem_flag_test(e, BM_ELEM_HIDDEN)) {
|
||||
if ((use_wire && BM_edge_is_wire(e)) ||
|
||||
(use_boundary && BM_edge_is_boundary(e)) ||
|
||||
(use_non_contiguous && (BM_edge_is_manifold(e) && !BM_edge_is_contiguous(e))) ||
|
||||
(use_multi_face && (BM_edge_face_count_is_over(e, 2))))
|
||||
(use_boundary && BM_edge_is_boundary(e)) ||
|
||||
(use_non_contiguous && (BM_edge_is_manifold(e) && !BM_edge_is_contiguous(e))) ||
|
||||
(use_multi_face && (BM_edge_face_count_is_over(e, 2))))
|
||||
{
|
||||
/* check we never select perfect edge (in test above) */
|
||||
BLI_assert(!(BM_edge_is_manifold(e) && BM_edge_is_contiguous(e)));
|
||||
|
|
|
@ -1130,35 +1130,34 @@ static int edbm_vert_connect_exec(bContext *C, wmOperator *op)
|
|||
|
||||
if (is_pair) {
|
||||
if (BM_vert_pair_share_face_check_cb(
|
||||
verts[0], verts[1],
|
||||
BM_elem_cb_check_hflag_disabled_simple(BMFace *, BM_ELEM_HIDDEN)))
|
||||
verts[0], verts[1],
|
||||
BM_elem_cb_check_hflag_disabled_simple(BMFace *, BM_ELEM_HIDDEN)))
|
||||
{
|
||||
check_degenerate = false;
|
||||
is_pair = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (is_pair) {
|
||||
if (!EDBM_op_init(
|
||||
em, &bmop, op,
|
||||
"connect_vert_pair verts=%eb verts_exclude=%hv faces_exclude=%hf",
|
||||
verts, verts_len, BM_ELEM_HIDDEN, BM_ELEM_HIDDEN))
|
||||
em, &bmop, op,
|
||||
"connect_vert_pair verts=%eb verts_exclude=%hv faces_exclude=%hf",
|
||||
verts, verts_len, BM_ELEM_HIDDEN, BM_ELEM_HIDDEN))
|
||||
{
|
||||
checks_succeded = false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!EDBM_op_init(
|
||||
em, &bmop, op,
|
||||
"connect_verts verts=%eb faces_exclude=%hf check_degenerate=%b",
|
||||
verts, verts_len, BM_ELEM_HIDDEN, check_degenerate))
|
||||
em, &bmop, op,
|
||||
"connect_verts verts=%eb faces_exclude=%hf check_degenerate=%b",
|
||||
verts, verts_len, BM_ELEM_HIDDEN, check_degenerate))
|
||||
{
|
||||
checks_succeded = false;
|
||||
}
|
||||
}
|
||||
if (checks_succeded)
|
||||
{
|
||||
if (checks_succeded) {
|
||||
BMO_op_exec(bm, &bmop);
|
||||
len = BMO_slot_get(bmop.slots_out, "edges.out")->len;
|
||||
|
||||
|
@ -1179,8 +1178,7 @@ static int edbm_vert_connect_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
}
|
||||
MEM_freeN(verts);
|
||||
if (len == 0)
|
||||
{
|
||||
if (len == 0) {
|
||||
failed_objects_len++;
|
||||
}
|
||||
}
|
||||
|
@ -3815,8 +3813,8 @@ static int edbm_separate_exec(bContext *C, wmOperator *op)
|
|||
|
||||
if (type == 0) {
|
||||
if ((em->bm->totvertsel == 0) &&
|
||||
(em->bm->totedgesel == 0) &&
|
||||
(em->bm->totfacesel == 0))
|
||||
(em->bm->totedgesel == 0) &&
|
||||
(em->bm->totfacesel == 0))
|
||||
{
|
||||
/* when all objects has no selection */
|
||||
if (++empty_selection_len == bases_len) {
|
||||
|
@ -4209,10 +4207,10 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
|
|||
|
||||
BMOperator bmop;
|
||||
if (!EDBM_op_init(
|
||||
em, &bmop, op,
|
||||
"grid_fill edges=%he mat_nr=%i use_smooth=%b use_interp_simple=%b",
|
||||
use_prepare ? BM_ELEM_TAG : BM_ELEM_SELECT,
|
||||
em->mat_nr, use_smooth, use_interp_simple))
|
||||
em, &bmop, op,
|
||||
"grid_fill edges=%he mat_nr=%i use_smooth=%b use_interp_simple=%b",
|
||||
use_prepare ? BM_ELEM_TAG : BM_ELEM_SELECT,
|
||||
em->mat_nr, use_smooth, use_interp_simple))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -4227,7 +4225,7 @@ static int edbm_fill_grid_exec(bContext *C, wmOperator *op)
|
|||
|
||||
/* cancel if nothing was done */
|
||||
if ((totedge_orig == em->bm->totedge) &&
|
||||
(totface_orig == em->bm->totface))
|
||||
(totface_orig == em->bm->totface))
|
||||
{
|
||||
EDBM_op_finish(em, &bmop, op, true);
|
||||
continue;
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include "BKE_editmesh.h"
|
||||
#include "BKE_library.h"
|
||||
#include "BKE_library_query.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_modifier.h"
|
||||
|
||||
#include "DEG_depsgraph.h"
|
||||
|
|
Loading…
Reference in New Issue