Beispiel #1
0
void paintvert_select_ungrouped(Object *ob, bool extend, bool flush_flags)
{
  Mesh *me = BKE_mesh_from_object(ob);
  MVert *mv;
  MDeformVert *dv;
  int a, tot;

  if (me == NULL || me->dvert == NULL) {
    return;
  }

  if (!extend) {
    paintvert_deselect_all_visible(ob, SEL_DESELECT, false);
  }

  dv = me->dvert;
  tot = me->totvert;

  for (a = 0, mv = me->mvert; a < tot; a++, mv++, dv++) {
    if ((mv->flag & ME_HIDE) == 0) {
      if (dv->dw == NULL) {
        /* if null weight then not grouped */
        mv->flag |= SELECT;
      }
    }
  }

  if (flush_flags) {
    paintvert_flush_flags(ob);
  }
}
Beispiel #2
0
static int vert_select_all_exec(bContext *C, wmOperator *op)
{
	Object *ob = CTX_data_active_object(C);
	paintvert_deselect_all_visible(ob, RNA_enum_get(op->ptr, "action"), true);
	ED_region_tag_redraw(CTX_wm_region(C));
	return OPERATOR_FINISHED;
}