Cleanup: comments, formatting
This commit is contained in:
parent
1afdea624c
commit
bf3c382c47
|
@ -2808,6 +2808,13 @@ int BM_mesh_calc_edge_groups(BMesh *bm,
|
|||
return group_curr;
|
||||
}
|
||||
|
||||
/**
|
||||
* This is an alternative to #BM_mesh_calc_edge_groups.
|
||||
*
|
||||
* While we could call this, then create vertex & face arrays,
|
||||
* it requires looping over geometry connectivity twice,
|
||||
* this slows down edit-mesh separate by loose parts, see: T70864.
|
||||
*/
|
||||
int BM_mesh_calc_edge_groups_as_arrays(
|
||||
BMesh *bm, BMVert **verts, BMEdge **edges, BMFace **faces, int (**r_groups)[3])
|
||||
{
|
||||
|
|
|
@ -3887,6 +3887,7 @@ enum {
|
|||
MESH_SEPARATE_LOOSE = 2,
|
||||
};
|
||||
|
||||
/** TODO: Use #mesh_separate_arrays since it's more efficient. */
|
||||
static Base *mesh_separate_tagged(
|
||||
Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old)
|
||||
{
|
||||
|
|
|
@ -63,8 +63,8 @@ static void InputSpringFlip(TransInfo *t, MouseInput *mi, const double mval[2],
|
|||
|
||||
/* flip scale */
|
||||
/* values can become really big when zoomed in so use longs [#26598] */
|
||||
if ((int64_t)((int)mi->center[0] - mval[0]) * (int64_t)((int)mi->center[0] - mi->imval[0]) +
|
||||
(int64_t)((int)mi->center[1] - mval[1]) * (int64_t)((int)mi->center[1] - mi->imval[1]) <
|
||||
if (((int64_t)((int)mi->center[0] - mval[0]) * (int64_t)((int)mi->center[0] - mi->imval[0]) +
|
||||
(int64_t)((int)mi->center[1] - mval[1]) * (int64_t)((int)mi->center[1] - mi->imval[1])) <
|
||||
0) {
|
||||
output[0] *= -1.0f;
|
||||
}
|
||||
|
|
|
@ -43,14 +43,13 @@
|
|||
static void rna_WorkSpaceTool_setup(ID *id,
|
||||
bToolRef *tref,
|
||||
bContext *C,
|
||||
const char *name,
|
||||
const char *tool_idname,
|
||||
/* Args for: 'bToolRef_Runtime'. */
|
||||
int cursor,
|
||||
const char *keymap,
|
||||
const char *gizmo_group,
|
||||
const char *data_block,
|
||||
const char *
|
||||
operator,
|
||||
const char *op_idname,
|
||||
int index)
|
||||
{
|
||||
bToolRef_Runtime tref_rt = {0};
|
||||
|
@ -59,10 +58,10 @@ static void rna_WorkSpaceTool_setup(ID *id,
|
|||
STRNCPY(tref_rt.keymap, keymap);
|
||||
STRNCPY(tref_rt.gizmo_group, gizmo_group);
|
||||
STRNCPY(tref_rt.data_block, data_block);
|
||||
STRNCPY(tref_rt.op, operator);
|
||||
STRNCPY(tref_rt.op, op_idname);
|
||||
tref_rt.index = index;
|
||||
|
||||
WM_toolsystem_ref_set_from_runtime(C, (WorkSpace *)id, tref, &tref_rt, name);
|
||||
WM_toolsystem_ref_set_from_runtime(C, (WorkSpace *)id, tref, &tref_rt, tool_idname);
|
||||
}
|
||||
|
||||
static void rna_WorkSpaceTool_refresh_from_context(ID *id, bToolRef *tref, Main *bmain)
|
||||
|
|
Loading…
Reference in New Issue