|
Blender V5.0
|
#include <cmath>#include "DNA_mesh_types.h"#include "DNA_object_types.h"#include "DNA_brush_types.h"#include "DNA_scene_types.h"#include "BLI_listbase.h"#include "BLI_math_color.h"#include "BLI_math_matrix.h"#include "BLI_math_matrix.hh"#include "BLI_rect.h"#include "BLT_translation.hh"#include "BKE_brush.hh"#include "BKE_bvhutils.hh"#include "BKE_colortools.hh"#include "BKE_context.hh"#include "BKE_layer.hh"#include "BKE_mesh.hh"#include "BKE_mesh_sample.hh"#include "BKE_paint.hh"#include "BKE_report.hh"#include "RNA_access.hh"#include "RNA_define.hh"#include "RNA_prototypes.hh"#include "RE_texture.h"#include "ED_screen.hh"#include "ED_select_utils.hh"#include "ED_view3d.hh"#include "ED_mesh.hh"#include "WM_api.hh"#include "WM_types.hh"#include "paint_intern.hh"Go to the source code of this file.
|
static |
Definition at line 227 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_CANCELLED, OPERATOR_FINISHED, paintface_deselect_all_visible(), wmOperator::ptr, and RNA_enum_get().
Referenced by PAINT_OT_face_select_all().
|
static |
Definition at line 514 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, paintface_hide(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_face_select_hide().
|
static |
Definition at line 565 of file paint_utils.cc.
References BKE_paint_select_vert_test(), C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, paintface_reveal(), paintvert_reveal(), wmOperator::ptr, RNA_boolean_get(), and select.
Referenced by PAINT_OT_face_vert_reveal().
|
static |
Definition at line 581 of file paint_utils.cc.
References BKE_paint_always_hide_test(), BKE_paint_select_elem_test(), C, and CTX_data_active_object().
Referenced by PAINT_OT_face_vert_reveal().
| float paint_calc_object_space_radius | ( | const ViewContext & | vc, |
| const blender::float3 & | center, | ||
| const float | pixel_radius ) |
Definition at line 95 of file paint_utils.cc.
References ED_view3d_calc_zfac(), ED_view3d_win_to_delta(), fabsf, len_v3(), mat4_to_scale(), mul_v3_m4v3(), ViewContext::obact, ViewContext::region, and ViewContext::rv3d.
Referenced by blender::ed::sculpt_paint::filter::cache_init(), blender::ed::sculpt_paint::object_space_radius_get(), blender::ed::sculpt_paint::paint_cursor_update_unprojected_size(), blender::ed::sculpt_paint::sculpt_update_cache_variants(), blender::ed::sculpt_paint::vwpaint::update_cache_variants(), and blender::ed::sculpt_paint::update_modal_transform().
| bool paint_convert_bb_to_rect | ( | rcti * | rect, |
| const float | bb_min[3], | ||
| const float | bb_max[3], | ||
| const ARegion & | region, | ||
| const RegionView3D & | rv3d, | ||
| const Object & | ob ) |
Convert the object-space axis-aligned bounding box (expressed as its minimum and maximum corners) into a screen-space rectangle, returns zero if the result is empty.
Definition at line 52 of file paint_utils.cc.
References BLI_rcti_do_minmax_v(), BLI_rcti_init_minmax(), ED_view3d_ob_project_mat_get(), ED_view3d_project_float_v2_m4(), i, rcti::xmax, rcti::xmin, rcti::ymax, and rcti::ymin.
Referenced by blender::ed::sculpt_paint::trim::calc_expand_factor().
| bool paint_get_tex_pixel | ( | const MTex * | mtex, |
| float | u, | ||
| float | v, | ||
| ImagePool * | pool, | ||
| int | thread, | ||
| float * | r_intensity, | ||
| float | r_rgba[4] ) |
Returns true when a color was sampled and false when a value was sampled.
Definition at line 114 of file paint_utils.cc.
References RE_texture_evaluate(), and v.
Referenced by blender::ed::sculpt_paint::load_tex_task_cb_ex(), and sculpt_apply_texture().
| void PAINT_OT_face_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 237 of file paint_utils.cc.
References face_select_all_exec(), facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_hide | ( | wmOperatorType * | ot | ) |
Definition at line 523 of file paint_utils.cc.
References face_select_hide_exec(), facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 298 of file paint_utils.cc.
References facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_select_less_exec(), and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 190 of file paint_utils.cc.
References facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and paint_select_linked_exec().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 213 of file paint_utils.cc.
References facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_select_linked_pick_invoke(), and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_loop | ( | wmOperatorType * | ot | ) |
Definition at line 328 of file paint_utils.cc.
References facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, paintface_select_loop_invoke(), and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 267 of file paint_utils.cc.
References facemask_paint_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, paint_select_more_exec(), and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_face_vert_reveal | ( | wmOperatorType * | ot | ) |
Definition at line 589 of file paint_utils.cc.
References face_vert_reveal_exec(), face_vert_reveal_poll(), OPTYPE_REGISTER, OPTYPE_UNDO, ot, and RNA_def_boolean().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 352 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, vert_paint_poll(), vert_select_all_exec(), and WM_operator_properties_select_all().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_hide | ( | wmOperatorType * | ot | ) |
Definition at line 547 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), vert_paint_poll(), and vert_select_hide_exec().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_less | ( | wmOperatorType * | ot | ) |
Definition at line 499 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, paintvert_select_less_exec(), RNA_def_boolean(), and vert_paint_poll().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_linked | ( | wmOperatorType * | ot | ) |
Definition at line 406 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, paintvert_select_linked_exec(), and vert_paint_poll().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_linked_pick | ( | wmOperatorType * | ot | ) |
Definition at line 430 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, paintvert_select_linked_pick_invoke(), RNA_def_boolean(), and vert_paint_poll().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_more | ( | wmOperatorType * | ot | ) |
Definition at line 466 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, paintvert_select_more_exec(), RNA_def_boolean(), and vert_paint_poll().
Referenced by ED_operatortypes_paint().
| void PAINT_OT_vert_select_ungrouped | ( | wmOperatorType * | ot | ) |
Definition at line 382 of file paint_utils.cc.
References OPTYPE_REGISTER, OPTYPE_UNDO, ot, RNA_def_boolean(), vert_paint_poll(), and vert_select_ungrouped_exec().
Referenced by ED_operatortypes_paint().
|
static |
Definition at line 282 of file paint_utils.cc.
References BKE_mesh_from_object(), C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), face_step(), Mesh::faces_num, OPERATOR_CANCELLED, OPERATOR_FINISHED, paintface_flush_flags(), paintface_select_less(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_face_select_less().
|
static |
Definition at line 183 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, and paintface_select_linked().
Referenced by PAINT_OT_face_select_linked().
|
static |
Definition at line 202 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), wmEvent::mval, OPERATOR_FINISHED, paintface_select_linked(), wmOperator::ptr, RNA_boolean_get(), select, and view3d_operator_needs_gpu().
Referenced by PAINT_OT_face_select_linked_pick().
|
static |
Definition at line 251 of file paint_utils.cc.
References BKE_mesh_from_object(), C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), face_step(), Mesh::faces_num, OPERATOR_CANCELLED, OPERATOR_FINISHED, paintface_flush_flags(), paintface_select_more(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_face_select_more().
| void paint_stroke_operator_properties | ( | wmOperatorType * | ot | ) |
Definition at line 139 of file paint_utils.cc.
References BLT_I18NCONTEXT_OPERATOR_DEFAULT, BRUSH_STROKE_ERASE, BRUSH_STROKE_INVERT, BRUSH_STROKE_NORMAL, BRUSH_STROKE_SMOOTH, ot, PROP_HIDDEN, PROP_SKIP_SAVE, RNA_def_boolean(), RNA_def_collection_runtime(), RNA_def_enum(), RNA_def_property_flag(), and RNA_def_property_translation_context().
Referenced by blender::ed::sculpt_paint::GREASE_PENCIL_OT_brush_stroke(), blender::ed::sculpt_paint::GREASE_PENCIL_OT_sculpt_paint(), blender::ed::sculpt_paint::GREASE_PENCIL_OT_vertex_brush_stroke(), blender::ed::sculpt_paint::GREASE_PENCIL_OT_weight_brush_stroke(), PAINT_OT_image_paint(), PAINT_OT_vertex_paint(), PAINT_OT_weight_paint(), blender::ed::sculpt_paint::SCULPT_CURVES_OT_brush_stroke(), and blender::ed::sculpt_paint::SCULPT_OT_brush_stroke().
|
static |
Definition at line 313 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), wmEvent::mval, OPERATOR_FINISHED, paintface_deselect_all_visible(), paintface_select_loop(), wmOperator::ptr, RNA_boolean_get(), SEL_DESELECT, select, and view3d_operator_needs_gpu().
Referenced by PAINT_OT_face_select_loop().
|
static |
Definition at line 481 of file paint_utils.cc.
References BKE_mesh_from_object(), C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), face_step(), Mesh::faces_num, OPERATOR_CANCELLED, OPERATOR_FINISHED, paintvert_flush_flags(), paintvert_select_less(), paintvert_tag_select_update(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_vert_select_less().
|
static |
Definition at line 399 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, and paintvert_select_linked().
Referenced by PAINT_OT_vert_select_linked().
|
static |
Definition at line 418 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), wmEvent::mval, OPERATOR_FINISHED, paintvert_select_linked_pick(), wmOperator::ptr, RNA_boolean_get(), select, and view3d_operator_needs_gpu().
Referenced by PAINT_OT_vert_select_linked_pick().
|
static |
Definition at line 448 of file paint_utils.cc.
References BKE_mesh_from_object(), C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), face_step(), Mesh::faces_num, OPERATOR_CANCELLED, OPERATOR_FINISHED, paintvert_flush_flags(), paintvert_select_more(), paintvert_tag_select_update(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_vert_select_more().
|
static |
Definition at line 343 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, paintvert_deselect_all_visible(), paintvert_tag_select_update(), wmOperator::ptr, and RNA_enum_get().
Referenced by PAINT_OT_vert_select_all().
|
static |
Definition at line 538 of file paint_utils.cc.
References C, CTX_data_active_object(), CTX_wm_region(), ED_region_tag_redraw(), OPERATOR_FINISHED, paintvert_hide(), wmOperator::ptr, and RNA_boolean_get().
Referenced by PAINT_OT_vert_select_hide().
|
static |
Definition at line 366 of file paint_utils.cc.
References BKE_report(), BLI_listbase_is_empty(), C, CTX_data_active_object(), CTX_wm_region(), Object::data, ED_region_tag_redraw(), OPERATOR_CANCELLED, OPERATOR_FINISHED, paintvert_select_ungrouped(), paintvert_tag_select_update(), wmOperator::ptr, wmOperator::reports, RNA_boolean_get(), RPT_ERROR, and Mesh::vertex_group_names.
Referenced by PAINT_OT_vert_select_ungrouped().