41#include "RNA_prototypes.hh"
61 mesh_eval = id_cast<const Mesh *>(ob->
data);
64 const std::optional<Bounds<float3>>
bounds = mesh_eval->bounds_min_max();
75 const std::optional<Bounds<float3>>
bounds =
curves.geometry.wrap().bounds_min_max();
113 mul_m4_v3(ob->object_to_world().ptr(), location);
120 const float pixel_radius)
123 float delta[3],
scale, loc[3];
124 const float xy_delta[2] = {pixel_radius, 0.0f};
126 mul_v3_m4v3(loc, ob->object_to_world().ptr(), center);
146 const float co[3] = {u,
v, 0.0f};
149 mtex, co,
thread, pool,
false,
false, &intensity, r_rgba);
150 *r_intensity = intensity;
153 r_rgba[0] = intensity;
154 r_rgba[1] = intensity;
155 r_rgba[2] = intensity;
170 "Invert action of brush for duration of stroke"},
180 "Switch to smooth brush for duration of stroke"},
185 "Switch to erase brush for duration of stroke"},
190 "Switch to mask brush for duration of stroke"},
204 "Action taken when a paint stroke is made");
210 temporary_brush_toggle_items,
212 "Temporary Brush Toggle Type",
213 "Brush to use for duration of stroke");
220 ot->
srna,
"pen_flip",
false,
"Pen Flip",
"Whether a tablet's eraser mode is being used");
234 ot->
name =
"Select Linked";
236 ot->
idname =
"PAINT_OT_face_select_linked";
257 ot->
name =
"Select Linked Pick";
258 ot->
description =
"Select linked faces under the cursor";
259 ot->
idname =
"PAINT_OT_face_select_linked_pick";
266 RNA_def_boolean(ot->
srna,
"deselect",
false,
"Deselect",
"Deselect rather than select items");
281 ot->
name =
"(De)select All";
282 ot->
description =
"Change selection for all faces";
283 ot->
idname =
"PAINT_OT_face_select_all";
297 if (
mesh ==
nullptr ||
mesh->faces_num == 0) {
311 ot->
name =
"Select More";
312 ot->
description =
"Select Faces connected to existing selection";
313 ot->
idname =
"PAINT_OT_face_select_more";
321 ot->
srna,
"face_step",
true,
"Face Step",
"Also select faces that only touch on a corner");
328 if (
mesh ==
nullptr ||
mesh->faces_num == 0) {
342 ot->
name =
"Select Less";
343 ot->
description =
"Deselect Faces connected to existing selection";
344 ot->
idname =
"PAINT_OT_face_select_less";
352 ot->
srna,
"face_step",
true,
"Face Step",
"Also deselect faces that only touch on a corner");
372 ot->
name =
"Select Loop";
373 ot->
description =
"Select face loop under the cursor";
374 ot->
idname =
"PAINT_OT_face_select_loop";
402 ot->
name =
"Select Loop";
403 ot->
description =
"Select vertex loop under the cursor";
404 ot->
idname =
"PAINT_OT_vert_select_loop";
411 RNA_def_boolean(ot->
srna,
"select",
true,
"Select",
"If false, vertices will be deselected");
426 ot->
name =
"(De)select All";
427 ot->
description =
"Change selection for all vertices";
428 ot->
idname =
"PAINT_OT_vert_select_all";
443 if (
mesh->vertex_group_names.is_empty() ||
mesh->deform_verts().is_empty()) {
457 ot->
name =
"Select Ungrouped";
458 ot->
idname =
"PAINT_OT_vert_select_ungrouped";
459 ot->
description =
"Select vertices without a group";
480 ot->
name =
"Select Linked Vertices";
482 ot->
idname =
"PAINT_OT_vert_select_linked";
504 ot->
name =
"Select Linked Vertices Pick";
505 ot->
description =
"Select linked vertices under the cursor";
506 ot->
idname =
"PAINT_OT_vert_select_linked_pick";
517 "Whether to select or deselect linked vertices under the cursor");
524 if (
mesh ==
nullptr ||
mesh->faces_num == 0) {
540 ot->
name =
"Select More";
541 ot->
description =
"Select Vertices connected to existing selection";
542 ot->
idname =
"PAINT_OT_vert_select_more";
550 ot->
srna,
"face_step",
true,
"Face Step",
"Also select faces that only touch on a corner");
557 if (
mesh ==
nullptr ||
mesh->faces_num == 0) {
573 ot->
name =
"Select Less";
574 ot->
description =
"Deselect Vertices connected to existing selection";
575 ot->
idname =
"PAINT_OT_vert_select_less";
583 ot->
srna,
"face_step",
true,
"Face Step",
"Also deselect faces that only touch on a corner");
597 ot->
name =
"Face Select Hide";
599 ot->
idname =
"PAINT_OT_face_select_hide";
607 ot->
srna,
"unselected",
false,
"Unselected",
"Hide unselected rather than selected objects");
621 ot->
name =
"Vertex Select Hide";
623 ot->
idname =
"PAINT_OT_vert_select_hide";
634 "Hide unselected rather than selected vertices");
663 ot->
name =
"Reveal Faces/Vertices";
664 ot->
description =
"Reveal hidden faces and vertices";
665 ot->
idname =
"PAINT_OT_face_vert_reveal";
676 "Specifies whether the newly revealed geometry should be selected");
Low-level operations for curves.
General operations, lookup, etc. for blender objects.
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
Object is a sort of wrapper for general info.
#define BLI_assert_unreachable()
float3x3 scale(float3x3 mat, float2 scale)
void stroke_set_location(Paint &paint, float3 location)
T midpoint(const T &a, const T &b)
static wmOperatorStatus face_vert_reveal_exec(bContext *C, wmOperator *op)
static wmOperatorStatus paintvert_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void paintface_hide(bContext *C, Object *ob, bool unselected)
void PAINT_OT_face_select_linked(wmOperatorType *ot)
void paintvert_hide(bContext *C, Object *ob, bool unselected)
int RNA_enum_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus paintvert_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void paintvert_tag_select_update(bContext *C, Object *ob)
void PAINT_OT_vert_select_ungrouped(wmOperatorType *ot)
static wmOperatorStatus vert_select_all_exec(bContext *C, wmOperator *op)
static wmOperatorStatus paintvert_select_more_exec(bContext *C, wmOperator *op)
float mat4_to_scale(const float mat[4][4])
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
static wmOperatorStatus paintface_select_loop_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_face_vert_reveal(wmOperatorType *ot)
static float3 paint_init_pivot_curves(Object *ob)
void paintface_select_less(Mesh *mesh, bool face_step)
bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
static wmOperatorStatus vert_select_ungrouped_exec(bContext *C, wmOperator *op)
void PAINT_OT_vert_select_linked(wmOperatorType *ot)
void view3d_operator_needs_gpu(const bContext *C)
PropertyRNA * RNA_def_collection_runtime(StructOrFunctionRNA *cont, const char *identifier, StructRNA *type, const char *ui_name, const char *ui_description)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void PAINT_OT_face_select_linked_pick(wmOperatorType *ot)
void ED_region_tag_redraw(ARegion *region)
void paintvert_select_loop(bContext *C, Object *ob, const int mval[2], const bool select)
void WM_operator_properties_select_all(wmOperatorType *ot)
void PAINT_OT_vert_select_more(wmOperatorType *ot)
void paintface_select_more(Mesh *mesh, bool face_step)
void mul_m4_v3(const float M[4][4], float r[3])
bool vert_paint_poll(bContext *C)
static wmOperatorStatus paint_select_linked_exec(bContext *C, wmOperator *)
void paintface_reveal(bContext *C, Object *ob, bool select)
static wmOperatorStatus paintvert_select_linked_exec(bContext *C, wmOperator *)
void paintvert_select_more(Mesh *mesh, bool face_step)
void PAINT_OT_face_select_loop(wmOperatorType *ot)
void BKE_report(ReportList *reports, eReportType type, const char *message)
Mesh * BKE_mesh_from_object(Object *ob)
bool BKE_paint_select_elem_test(const Object *ob)
static bool face_vert_reveal_poll(bContext *C)
void PAINT_OT_vert_select_loop(wmOperatorType *ot)
bool BKE_paint_always_hide_test(const Object *ob)
float ED_view3d_calc_zfac(const RegionView3D *rv3d, const float co[3])
static wmOperatorStatus face_select_all_exec(bContext *C, wmOperator *op)
bool paintface_deselect_all_visible(bContext *C, Object *ob, int action, bool flush_flags)
void PAINT_OT_face_select_all(wmOperatorType *ot)
bool paint_get_tex_pixel(const MTex *mtex, float u, float v, ImagePool *pool, int thread, float *r_intensity, float r_rgba[4])
MINLINE float len_v3(const float a[3]) ATTR_WARN_UNUSED_RESULT
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
static wmOperatorStatus vert_select_hide_exec(bContext *C, wmOperator *op)
void paintvert_flush_flags(Object *ob)
void paint_stroke_operator_properties(wmOperatorType *ot)
bool RE_texture_evaluate(const MTex *mtex, const float vec[3], const int thread, ImagePool *pool, const bool skip_load_image, const bool texnode_preview, float *r_intensity, float r_rgba[4])
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void PAINT_OT_face_select_less(wmOperatorType *ot)
static wmOperatorStatus paint_select_more_exec(bContext *C, wmOperator *op)
void paintvert_select_linked(bContext *C, Object *ob)
void paintface_select_loop(bContext *C, Object *ob, const int mval[2], bool select)
static wmOperatorStatus paintvert_select_less_exec(bContext *C, wmOperator *op)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void paint_init_pivot(Object *ob, Scene *scene, Paint *paint)
static wmOperatorStatus paint_select_less_exec(bContext *C, wmOperator *op)
void paintface_select_linked(bContext *C, Object *ob, const int mval[2], bool select)
float paint_calc_object_space_radius(const ViewContext &vc, const float3 ¢er, float pixel_radius)
void PAINT_OT_vert_select_all(wmOperatorType *ot)
void paintvert_select_ungrouped(Object *ob, bool extend, bool flush_flags)
void PAINT_OT_face_select_more(wmOperatorType *ot)
void paintface_flush_flags(bContext *C, Object *ob, bool flush_selection, bool flush_hidden)
void PAINT_OT_vert_select_hide(wmOperatorType *ot)
bool facemask_paint_poll(bContext *C)
static float3 paint_init_pivot_grease_pencil(Object *ob, const int frame)
void PAINT_OT_vert_select_less(wmOperatorType *ot)
static wmOperatorStatus paint_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_face_select_hide(wmOperatorType *ot)
VecBase< float, 3 > float3
bool BKE_paint_select_vert_test(const Object *ob)
static float3 paint_init_pivot_mesh(Object *ob)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
static wmOperatorStatus face_select_hide_exec(bContext *C, wmOperator *op)
void paintvert_reveal(bContext *C, Object *ob, bool select)
void paintvert_select_linked_pick(bContext *C, Object *ob, const int region_coordinates[2], bool select)
void paintvert_select_less(Mesh *mesh, bool face_step)
Object * CTX_data_active_object(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
void ED_view3d_win_to_delta(const ARegion *region, const float xy_delta[2], float zfac, float r_out[3], bool precise=false)
void PAINT_OT_vert_select_linked_pick(wmOperatorType *ot)
Mesh * BKE_object_get_evaluated_mesh(const Object *object_eval)
static BMFace * face_step(BMEdge *edge, BMFace *f)
wmOperatorStatus(*) exec(bContext *C, wmOperator *op) ATTR_WARN_UNUSED_RESULT
bool(*) poll(bContext *C) ATTR_WARN_UNUSED_RESULT
wmOperatorStatus(*) invoke(bContext *C, wmOperator *op, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
struct ReportList * reports