예제 #1
0
static int paintcurve_add_point_exec(bContext *C, wmOperator *op)
{
  int loc[2];

  if (RNA_struct_property_is_set(op->ptr, "location")) {
    RNA_int_get_array(op->ptr, "location", loc);
    paintcurve_point_add(C, op, loc);
    return OPERATOR_FINISHED;
  }

  return OPERATOR_CANCELLED;
}
예제 #2
0
static int paintcurve_select_point_exec(bContext *C, wmOperator *op)
{
	int loc[2];

	if (RNA_struct_property_is_set(op->ptr, "location")) {
		bool toggle = RNA_boolean_get(op->ptr, "toggle");
		bool extend = RNA_boolean_get(op->ptr, "extend");
		RNA_int_get_array(op->ptr, "location", loc);
		if (paintcurve_point_select(C, op, loc, toggle, extend))
			return OPERATOR_FINISHED;
	}

	return OPERATOR_CANCELLED;
}