Merge branch 'master' into blender2.8
This commit is contained in:
@@ -513,6 +513,8 @@ MALWAYS_INLINE __m128 _bli_math_blend_sse(const __m128 mask,
|
||||
return _mm_or_ps(_mm_and_ps(mask, a), _mm_andnot_ps(mask, b));
|
||||
}
|
||||
|
||||
#endif /* __SSE2__ */
|
||||
|
||||
/* Low level conversion functions */
|
||||
MINLINE unsigned char unit_float_to_uchar_clamp(float val)
|
||||
{
|
||||
@@ -544,6 +546,4 @@ MINLINE unsigned char unit_ushort_to_uchar(unsigned short val)
|
||||
(v1)[3] = unit_float_to_uchar_clamp((v2[3])); \
|
||||
} ((void)0)
|
||||
|
||||
#endif /* __SSE2__ */
|
||||
|
||||
#endif /* __MATH_BASE_INLINE_C__ */
|
||||
|
||||
@@ -653,7 +653,7 @@ void NODE_OT_select_circle(wmOperatorType *ot)
|
||||
|
||||
/* ****** Lasso Select ****** */
|
||||
|
||||
static bool do_lasso_select_node(bContext *C, const int mcords[][2], short moves, short select)
|
||||
static bool do_lasso_select_node(bContext *C, const int mcords[][2], short moves, bool select, bool extend)
|
||||
{
|
||||
SpaceNode *snode = CTX_wm_space_node(C);
|
||||
bNode *node;
|
||||
@@ -668,6 +668,11 @@ static bool do_lasso_select_node(bContext *C, const int mcords[][2], short moves
|
||||
|
||||
/* do actual selection */
|
||||
for (node = snode->edittree->nodes.first; node; node = node->next) {
|
||||
|
||||
if (node->flag & NODE_SELECT && select && extend) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int screen_co[2];
|
||||
const float cent[2] = {BLI_rctf_cent_x(&node->totr),
|
||||
BLI_rctf_cent_y(&node->totr)};
|
||||
@@ -680,6 +685,10 @@ static bool do_lasso_select_node(bContext *C, const int mcords[][2], short moves
|
||||
nodeSetSelected(node, select);
|
||||
changed = true;
|
||||
}
|
||||
else if (select && !extend) {
|
||||
nodeSetSelected(node, false);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
@@ -695,10 +704,9 @@ static int node_lasso_select_exec(bContext *C, wmOperator *op)
|
||||
const int (*mcords)[2] = WM_gesture_lasso_path_to_array(C, op, &mcords_tot);
|
||||
|
||||
if (mcords) {
|
||||
short select;
|
||||
|
||||
select = !RNA_boolean_get(op->ptr, "deselect");
|
||||
do_lasso_select_node(C, mcords, mcords_tot, select);
|
||||
const bool select = !RNA_boolean_get(op->ptr, "deselect");
|
||||
const bool extend = RNA_boolean_get(op->ptr, "extend");
|
||||
do_lasso_select_node(C, mcords, mcords_tot, select, extend);
|
||||
|
||||
MEM_freeN((void *)mcords);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user