|
Blender V5.3
|
#include <ED_view3d.hh>
Public Member Functions | |
| ViewportColorSampleSession ()=default | |
Viewport color picker | |
| ~ViewportColorSampleSession () | |
| bool | init (ARegion *region) |
| bool | sample (const int mval[2], float r_col[3]) |
Returns viewport color in linear space, matching ED_space_node_color_sample().
Definition at line 967 of file ED_view3d.hh.
|
default |
References init(), sample(), and ViewportColorSampleSession().
Referenced by ViewportColorSampleSession().
| blender::ViewportColorSampleSession::~ViewportColorSampleSession | ( | ) |
Definition at line 2864 of file view3d_draw.cc.
References blender::GPU_texture_free().
| bool blender::ViewportColorSampleSession::init | ( | ARegion * | region | ) |
Definition at line 2799 of file view3d_draw.cc.
References blender::BLI_rcti_init(), blender::GPU_BARRIER_TEXTURE_UPDATE, blender::GPU_DATA_HALF_FLOAT, blender::GPU_memory_barrier(), blender::GPU_texture_copy(), blender::GPU_texture_create_2d(), blender::GPU_texture_height(), blender::GPU_texture_read(), blender::GPU_TEXTURE_USAGE_HOST_READ, blender::GPU_texture_width(), blender::GPU_viewport_color_texture(), blender::min_ii(), blender::ARegion::winx, blender::ARegion::winy, and blender::WM_draw_region_get_viewport().
Referenced by blender::ui::eyedropper_color_sample_fl(), and ViewportColorSampleSession().
| bool blender::ViewportColorSampleSession::sample | ( | const int | mval[2], |
| float | r_col[3] ) |
Definition at line 2839 of file view3d_draw.cc.
References blender::BLI_rcti_isect_pt_v(), and blender::math::half_to_float().
Referenced by blender::ui::eyedropper_color_sample_fl(), and ViewportColorSampleSession().