Blender V5.3
paint_sample_color.cc File Reference
#include <cmath>
#include <cstdlib>
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_object_types.h"
#include "DNA_brush_types.h"
#include "DNA_scene_types.h"
#include "BLI_listbase.hh"
#include "BLI_math_color_c.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_vector.hh"
#include "BLI_rect.hh"
#include "BLI_string_utf8.hh"
#include "BLI_utildefines.hh"
#include "BLT_translation.hh"
#include "BKE_brush.hh"
#include "BKE_bvh.hh"
#include "BKE_bvhutils.hh"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_global.hh"
#include "BKE_image.hh"
#include "BKE_layer.hh"
#include "BKE_material.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_sample.hh"
#include "BKE_object.hh"
#include "BKE_paint.hh"
#include "BKE_paint_types.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph_query.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "IMB_imbuf_types.hh"
#include "IMB_interp.hh"
#include "ED_grease_pencil.hh"
#include "ED_image.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "ED_mesh.hh"
#include "UI_interface_types.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "IMB_colormanagement.hh"
#include "paint_intern.hh"
#include "mesh/sculpt_color.hh"
#include "mesh/sculpt_intern.hh"

Go to the source code of this file.

Classes

struct  blender::ed::sculpt_paint::SampleColorData

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::ed
namespace  blender::ed::sculpt_paint

Functions

static float2 blender::ed::sculpt_paint::imapaint_pick_uv (const Mesh *mesh_eval, Scene &scene, Object *ob_eval, const int tri_index, const float3 &bary_coord)
static bool blender::ed::sculpt_paint::imapaint_pick_face (ViewContext *vc, const int mval[2], int *r_tri_index, int *r_face_index, float3 *r_bary_coord, const Mesh &mesh)
static std::optional< float3 > blender::ed::sculpt_paint::sample_texture_paint_color (const Depsgraph &depsgraph, Scene &scene, ViewContext &vc, Object *object, const int2 mval)
static std::optional< float3 > blender::ed::sculpt_paint::sample_mesh_attribute_color (ViewContext &vc, Object &object, int2 mval)
static void blender::ed::sculpt_paint::apply_sampled_color (Main &bMain, Paint &paint, const float3 &sampled_color, const bool use_palette)
static float3 blender::ed::sculpt_paint::paint_sample_color (bContext *C, ARegion *region, const int2 mval, const bool use_merged_texture)
static void blender::ed::sculpt_paint::sample_color_update_header (SampleColorData *data, bContext *C)
static float3 blender::ed::sculpt_paint::sample_average_color (SampleColorData *data, const float3 &sampled_color)
static wmOperatorStatus blender::ed::sculpt_paint::sample_color_exec (bContext *C, wmOperator *op)
static wmOperatorStatus blender::ed::sculpt_paint::sample_color_invoke (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus blender::ed::sculpt_paint::sample_color_modal (bContext *C, wmOperator *op, const wmEvent *event)
static bool blender::ed::sculpt_paint::sample_color_poll (bContext *C)
void blender::ed::sculpt_paint::PAINT_OT_sample_color (wmOperatorType *ot)