fix [#30907] Inset tool with Select Outer disabled does not allow translation of new faces
inset with select-inner faces gave invalid selection. also correct spelling in some comments.
This commit is contained in:
@@ -1795,7 +1795,7 @@ void DAG_scene_sort(Main *bmain, Scene *sce)
|
||||
}
|
||||
}
|
||||
|
||||
// temporal correction for circular dependancies
|
||||
/* temporal correction for circular dependencies */
|
||||
base = sce->base.first;
|
||||
while (base) {
|
||||
BLI_remlink(&sce->base,base);
|
||||
@@ -2913,7 +2913,7 @@ void DAG_pose_sort(Object *ob)
|
||||
}
|
||||
}
|
||||
|
||||
// temporal correction for circular dependancies
|
||||
/* temporal correction for circular dependencies */
|
||||
while (pose->chanbase.first) {
|
||||
pchan= pose->chanbase.first;
|
||||
BLI_remlink(&pose->chanbase, pchan);
|
||||
|
@@ -395,7 +395,7 @@ void BM_face_select_set(BMesh *bm, BMFace *f, int select)
|
||||
* Sets the selection mode for the bmesh,
|
||||
* updating the selection state.
|
||||
*/
|
||||
void BM_select_mode_set(BMesh *bm, int selectmode)
|
||||
void BM_mesh_select_mode_set(BMesh *bm, int selectmode)
|
||||
{
|
||||
BMIter iter;
|
||||
BMElem *ele;
|
||||
@@ -445,6 +445,47 @@ void BM_select_mode_set(BMesh *bm, int selectmode)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief De-Select, Re-Select elements
|
||||
* Awkwardly named function
|
||||
*
|
||||
* Deselect's one type of elements then re-selects another,
|
||||
* Use case is to de-select stray edges or verts.
|
||||
*/
|
||||
void BM_mesh_select_flush_strip(BMesh *bm, const char htype_desel, const char htype_sel)
|
||||
{
|
||||
const char iter_types[3] = {BM_VERTS_OF_MESH,
|
||||
BM_EDGES_OF_MESH,
|
||||
BM_FACES_OF_MESH};
|
||||
|
||||
const char flag_types[3] = {BM_VERT, BM_EDGE, BM_FACE};
|
||||
|
||||
BMIter iter;
|
||||
BMElem *ele;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (htype_desel & flag_types[i]) {
|
||||
ele = BM_iter_new(&iter, bm, iter_types[i], NULL);
|
||||
for ( ; ele; ele = BM_iter_step(&iter)) {
|
||||
BM_elem_flag_disable(ele, BM_ELEM_SELECT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (htype_sel & flag_types[i]) {
|
||||
ele = BM_iter_new(&iter, bm, iter_types[i], NULL);
|
||||
for ( ; ele; ele = BM_iter_step(&iter)) {
|
||||
if (BM_elem_flag_test(ele, BM_ELEM_SELECT)) {
|
||||
BM_elem_select_set(bm, ele, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* counts number of elements with flag enabled/disabled
|
||||
*/
|
||||
|
@@ -54,12 +54,14 @@ void BM_vert_select_set(BMesh *bm, BMVert *v, int select);
|
||||
void BM_edge_select_set(BMesh *bm, BMEdge *e, int select);
|
||||
void BM_face_select_set(BMesh *bm, BMFace *f, int select);
|
||||
|
||||
void BM_select_mode_set(BMesh *bm, int selectmode);
|
||||
void BM_mesh_select_mode_set(BMesh *bm, int selectmode);
|
||||
void BM_mesh_select_mode_flush(BMesh *bm);
|
||||
|
||||
void BM_mesh_deselect_flush(BMesh *bm);
|
||||
void BM_mesh_select_flush(BMesh *bm);
|
||||
|
||||
void BM_mesh_select_flush_strip(BMesh *bm, const char htype_desel, const char htype_sel);
|
||||
|
||||
int BM_mesh_enabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide);
|
||||
int BM_mesh_disabled_flag_count(BMesh *bm, const char htype, const char hflag, int respecthide);
|
||||
|
||||
|
@@ -4531,7 +4531,10 @@ static int edbm_inset_exec(bContext *C, wmOperator *op)
|
||||
BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
|
||||
}
|
||||
else {
|
||||
BMO_slot_buffer_hflag_disable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
|
||||
BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE, BM_ELEM_SELECT, FALSE);
|
||||
BMO_slot_buffer_hflag_disable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, FALSE);
|
||||
/* so selected faces verts & edges get selected */
|
||||
BM_mesh_select_flush_strip(em->bm, BM_VERT | BM_EDGE, BM_FACE);
|
||||
}
|
||||
|
||||
if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
|
||||
|
@@ -182,7 +182,7 @@ typedef enum eBone_Flag {
|
||||
BONE_CONNECTED = (1<<4), /* when bone has a parent, connect head of bone to parent's tail*/
|
||||
/* 32 used to be quatrot, was always set in files, do not reuse unless you clear it always */
|
||||
BONE_HIDDEN_P = (1<<6), /* hidden Bones when drawing PoseChannels */
|
||||
BONE_DONE = (1<<7), /* For detecting cyclic dependancies */
|
||||
BONE_DONE = (1<<7), /* For detecting cyclic dependencies */
|
||||
BONE_DRAW_ACTIVE = (1<<8), /* active is on mouse clicks only - deprecated, ONLY USE FOR DRAWING */
|
||||
BONE_HINGE = (1<<9), /* No parent rotation or scale */
|
||||
BONE_HIDDEN_A = (1<<10), /* hidden Bones when drawing Armature Editmode */
|
||||
|
@@ -1179,7 +1179,7 @@ int main(int argc, char ** argv)
|
||||
return(return_status);
|
||||
}
|
||||
|
||||
// include files for automatic dependancies
|
||||
/* include files for automatic dependencies */
|
||||
#include "DNA_listBase.h"
|
||||
#include "DNA_vec_types.h"
|
||||
#include "DNA_ID.h"
|
||||
|
@@ -112,7 +112,7 @@ static void updateDepgraph(
|
||||
if (ob1 != ob) {
|
||||
FluidsimModifierData *fluidmdtmp = (FluidsimModifierData *)modifiers_findByType(ob1, eModifierType_Fluidsim);
|
||||
|
||||
// only put dependancies from NON-DOMAIN fluids in here
|
||||
/* only put dependencies from NON-DOMAIN fluids in here */
|
||||
if (fluidmdtmp && fluidmdtmp->fss && (fluidmdtmp->fss->type!=OB_FLUIDSIM_DOMAIN)) {
|
||||
DagNode *curNode = dag_get_node(forest, ob1);
|
||||
dag_add_relation(forest, curNode, obNode, DAG_RL_DATA_DATA|DAG_RL_OB_DATA, "Fluidsim Object");
|
||||
|
Reference in New Issue
Block a user