87 "Confirm: Enter/LClick, Cancel: (Esc/RClick), Thickness: %s, "
88 "Depth (Ctrl to tweak): %s (%s), Outset (O): (%s), Boundary (B): (%s), Individual (I): "
143 uint objects_used_len = 0;
148 uint ob_store_len = 0;
152 for (
uint ob_index = 0; ob_index < ob_store_len; ob_index++) {
153 Object *obedit = objects[ob_index];
158 opdata->
ob_store[objects_used_len].
ob = obedit;
169 opdata->
shift =
false;
253 bool changed =
false;
277 if (use_individual) {
281 "inset_individual faces=%hf use_even_offset=%b use_relative_offset=%b "
282 "use_interpolate=%b thickness=%f depth=%f",
295 "inset_region faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b "
296 "use_interpolate=%b thickness=%f depth=%f use_outset=%b use_edge_rail=%b",
314 if (use_select_inset) {
371 mlen[0] = opdata->
mcenter[0] -
event->mval[0];
372 mlen[1] = opdata->
mcenter[1] -
event->mval[1];
393 amounts[0] =
max_ff(amounts[0], 0.0f);
411 bool handled =
false;
412 switch (event->
type) {
423 mdiff[0] = opdata->
mcenter[0] -
event->mval[0];
424 mdiff[1] = opdata->
mcenter[1] -
event->mval[1];
446 amount =
max_ff(amount, 0.0f);
480 opdata->
shift =
true;
485 opdata->
shift =
false;
494 mlen[0] = opdata->
mcenter[0] -
event->mval[0];
495 mlen[1] = opdata->
mcenter[1] -
event->mval[1];
566 amounts[0] =
max_ff(amounts[0], 0.0f);
606 "Scale the offset to give more even thickness");
608 "use_relative_offset",
611 "Scale the offset by surrounding geometry");
613 ot->
srna,
"use_edge_rail",
false,
"Edge Rail",
"Inset the region along existing edges");
616 ot->
srna,
"thickness", 0.0f, 0.0f, 1e12f,
"Thickness",
"", 0.0f, 10.0f);
621 ot->
srna,
"depth", 0.0f, -1e12f, 1e12f,
"Depth",
"", -10.0f, 10.0f);
626 ot->
srna,
"use_select_inset",
false,
"Select Outer",
"Select the new inset faces");
629 ot->
srna,
"use_interpolate",
true,
"Interpolate",
"Blend face data across the inset");
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct ViewLayer * CTX_data_view_layer(const bContext *C)
struct View3D * CTX_wm_view3d(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct RegionView3D * CTX_wm_region_view3d(const bContext *C)
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
#define BKE_view_layer_array_from_objects_in_edit_mode_unique_data(view_layer, v3d, r_len)
size_t BKE_unit_value_as_string(char *str, int len_max, double value, int prec, int type, const struct UnitSettings *settings, bool pad)
MINLINE float max_ff(float a, float b)
float mat4_to_scale(const float M[4][4])
MINLINE float len_v2(const float a[2]) ATTR_WARN_UNUSED_RESULT
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
Object is a sort of wrapper for general info.
@ V3D_AROUND_CENTER_MEDIAN
void EDBM_redo_state_free(struct BMBackup *, struct BMEditMesh *em, int recalctess)
struct BMBackup EDBM_redo_state_store(struct BMEditMesh *em)
void EDBM_update_generic(struct Mesh *me, const bool do_tessellation, const bool is_destructive)
void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag)
void EDBM_redo_state_restore(struct BMBackup, struct BMEditMesh *em, int recalctess)
void ED_area_status_text(ScrArea *area, const char *str)
void ED_region_tag_redraw(struct ARegion *region)
bool ED_operator_editmesh(struct bContext *C)
void * ED_region_draw_cb_activate(struct ARegionType *art, void(*draw)(const struct bContext *, struct ARegion *, void *), void *customdata, int type)
#define REGION_DRAW_POST_PIXEL
void ED_region_draw_cb_exit(struct ARegionType *, void *)
void ED_region_draw_mouse_line_cb(const struct bContext *C, struct ARegion *region, void *arg_info)
float ED_view3d_pixel_size(const struct RegionView3D *rv3d, const float co[3])
Read Guarded memory(de)allocation.
void BMO_slot_buffer_hflag_enable(BMesh *bm, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag, const bool do_flush)
BMO_FLAG_BUFFER.
void BMO_slot_buffer_from_enabled_hflag(BMesh *bm, BMOperator *op, BMOpSlot slot_args[BMO_OP_MAX_SLOTS], const char *slot_name, const char htype, const char hflag)
void BMO_op_exec(BMesh *bm, BMOperator *op)
BMESH OPSTACK EXEC OP.
static int edbm_inset_invoke(bContext *C, wmOperator *op, const wmEvent *event)
static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
static int edbm_inset_exec(bContext *C, wmOperator *op)
static void edbm_inset_cancel(bContext *C, wmOperator *op)
static void edbm_inset_exit(bContext *C, wmOperator *op)
void MESH_OT_inset(wmOperatorType *ot)
static void edbm_inset_update_header(wmOperator *op, bContext *C)
static int edbm_inset_modal(bContext *C, wmOperator *op, const wmEvent *event)
static bool edbm_inset_calc(wmOperator *op)
bool EDBM_op_init(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt,...)
bool EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const bool do_report)
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void RNA_boolean_set(PointerRNA *ptr, const char *name, bool value)
float RNA_float_get(PointerRNA *ptr, const char *name)
void RNA_float_set(PointerRNA *ptr, const char *name, float value)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_float_distance(StructOrFunctionRNA *cont_, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
struct ARegionType * type
struct BMOpSlot slots_out[BMO_OP_MAX_SLOTS]
struct BMOpSlot slots_in[BMO_OP_MAX_SLOTS]
InsetObjectStore * ob_store
int(* invoke)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
int(* modal)(struct bContext *, struct wmOperator *, const struct wmEvent *) ATTR_WARN_UNUSED_RESULT
bool(* poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT
void(* cancel)(struct bContext *, struct wmOperator *)
int(* exec)(struct bContext *, struct wmOperator *) ATTR_WARN_UNUSED_RESULT
int WM_userdef_event_type_from_keymap_type(int kmitype)
wmEventHandler_Op * WM_event_add_modal_handler(bContext *C, wmOperator *op)
const char * WM_bool_as_string(bool test)