Blender V5.0
paint_utils.cc File Reference
#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.

Functions

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)
float paint_calc_object_space_radius (const ViewContext &vc, const blender::float3 &center, const float pixel_radius)
bool paint_get_tex_pixel (const MTex *mtex, float u, float v, ImagePool *pool, int thread, float *r_intensity, float r_rgba[4])
void paint_stroke_operator_properties (wmOperatorType *ot)
static wmOperatorStatus paint_select_linked_exec (bContext *C, wmOperator *)
void PAINT_OT_face_select_linked (wmOperatorType *ot)
static wmOperatorStatus paint_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_face_select_linked_pick (wmOperatorType *ot)
static wmOperatorStatus face_select_all_exec (bContext *C, wmOperator *op)
void PAINT_OT_face_select_all (wmOperatorType *ot)
static wmOperatorStatus paint_select_more_exec (bContext *C, wmOperator *op)
void PAINT_OT_face_select_more (wmOperatorType *ot)
static wmOperatorStatus paint_select_less_exec (bContext *C, wmOperator *op)
void PAINT_OT_face_select_less (wmOperatorType *ot)
static wmOperatorStatus paintface_select_loop_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_face_select_loop (wmOperatorType *ot)
static wmOperatorStatus vert_select_all_exec (bContext *C, wmOperator *op)
void PAINT_OT_vert_select_all (wmOperatorType *ot)
static wmOperatorStatus vert_select_ungrouped_exec (bContext *C, wmOperator *op)
void PAINT_OT_vert_select_ungrouped (wmOperatorType *ot)
static wmOperatorStatus paintvert_select_linked_exec (bContext *C, wmOperator *)
void PAINT_OT_vert_select_linked (wmOperatorType *ot)
static wmOperatorStatus paintvert_select_linked_pick_invoke (bContext *C, wmOperator *op, const wmEvent *event)
void PAINT_OT_vert_select_linked_pick (wmOperatorType *ot)
static wmOperatorStatus paintvert_select_more_exec (bContext *C, wmOperator *op)
void PAINT_OT_vert_select_more (wmOperatorType *ot)
static wmOperatorStatus paintvert_select_less_exec (bContext *C, wmOperator *op)
void PAINT_OT_vert_select_less (wmOperatorType *ot)
static wmOperatorStatus face_select_hide_exec (bContext *C, wmOperator *op)
void PAINT_OT_face_select_hide (wmOperatorType *ot)
static wmOperatorStatus vert_select_hide_exec (bContext *C, wmOperator *op)
void PAINT_OT_vert_select_hide (wmOperatorType *ot)
static wmOperatorStatus face_vert_reveal_exec (bContext *C, wmOperator *op)
static bool face_vert_reveal_poll (bContext *C)
void PAINT_OT_face_vert_reveal (wmOperatorType *ot)

Function Documentation

◆ face_select_all_exec()

◆ face_select_hide_exec()

◆ face_vert_reveal_exec()

◆ face_vert_reveal_poll()

bool face_vert_reveal_poll ( bContext * C)
static

◆ paint_calc_object_space_radius()

◆ paint_convert_bb_to_rect()

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().

◆ paint_get_tex_pixel()

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().

◆ PAINT_OT_face_select_all()

void PAINT_OT_face_select_all ( wmOperatorType * ot)

◆ PAINT_OT_face_select_hide()

void PAINT_OT_face_select_hide ( wmOperatorType * ot)

◆ PAINT_OT_face_select_less()

void PAINT_OT_face_select_less ( wmOperatorType * ot)

◆ PAINT_OT_face_select_linked()

void PAINT_OT_face_select_linked ( wmOperatorType * ot)

◆ PAINT_OT_face_select_linked_pick()

void PAINT_OT_face_select_linked_pick ( wmOperatorType * ot)

◆ PAINT_OT_face_select_loop()

void PAINT_OT_face_select_loop ( wmOperatorType * ot)

◆ PAINT_OT_face_select_more()

void PAINT_OT_face_select_more ( wmOperatorType * ot)

◆ PAINT_OT_face_vert_reveal()

void PAINT_OT_face_vert_reveal ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_all()

void PAINT_OT_vert_select_all ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_hide()

void PAINT_OT_vert_select_hide ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_less()

void PAINT_OT_vert_select_less ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_linked()

void PAINT_OT_vert_select_linked ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_linked_pick()

void PAINT_OT_vert_select_linked_pick ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_more()

void PAINT_OT_vert_select_more ( wmOperatorType * ot)

◆ PAINT_OT_vert_select_ungrouped()

void PAINT_OT_vert_select_ungrouped ( wmOperatorType * ot)

◆ paint_select_less_exec()

◆ paint_select_linked_exec()

◆ paint_select_linked_pick_invoke()

◆ paint_select_more_exec()

◆ paint_stroke_operator_properties()

◆ paintface_select_loop_invoke()

◆ paintvert_select_less_exec()

◆ paintvert_select_linked_exec()

wmOperatorStatus paintvert_select_linked_exec ( bContext * C,
wmOperator *  )
static

◆ paintvert_select_linked_pick_invoke()

◆ paintvert_select_more_exec()

◆ vert_select_all_exec()

◆ vert_select_hide_exec()

◆ vert_select_ungrouped_exec()