Blender
V3.3
|
#include "DRW_render.h"
#include "BKE_camera.h"
#include "BKE_image.h"
#include "BKE_movieclip.h"
#include "BKE_object.h"
#include "BLI_listbase.h"
#include "DNA_camera_types.h"
#include "DNA_screen_types.h"
#include "DEG_depsgraph_query.h"
#include "ED_view3d.h"
#include "IMB_imbuf_types.h"
#include "overlay_private.h"
Go to the source code of this file.
|
static |
Definition at line 95 of file overlay_image.c.
References View3D::multiview_eye, Scene::r, R_MULTIVIEW, RenderData::scemode, scene, View3D::stereo3d_camera, STEREO_3D_ID, and STEREO_LEFT_ID.
Referenced by camera_background_images_stereo_setup(), and OVERLAY_image_camera_cache_populate().
|
static |
Definition at line 108 of file overlay_image.c.
References BKE_image_is_stereo(), BKE_image_multiview_index(), camera_background_images_stereo_eye(), ImageUser::flag, IMA_SHOW_STEREO, ImageUser::multiview_eye, and scene.
Referenced by image_camera_background_texture_get(), and OVERLAY_image_empty_cache_populate().
|
static |
Definition at line 229 of file overlay_image.c.
References axis_angle_to_mat4_single(), BKE_camera_view_frame(), CAM_BGIMG_FLAG_CAMERA_ASPECT, CAM_BGIMG_FLAG_CAMERA_CROP, CAM_BGIMG_FLAG_FLIP_X, CAM_BGIMG_FLAG_FLIP_Y, CAM_ORTHO, fabsf, CameraBGImage::flag, max_ff(), min_ff(), mul_m4_series, mul_v2_fl(), CameraBGImage::offset, Camera::ortho_scale, rotate(), CameraBGImage::rotation, CameraBGImage::scale, DRWContextState::scene, Camera::type, and unit_m4().
Referenced by OVERLAY_image_camera_cache_populate().
|
static |
Definition at line 123 of file overlay_image.c.
References Image::aspx, MovieClip::aspx, Image::aspy, MovieClip::aspy, OVERLAY_PrivateData::bg_movie_clips, BKE_image_acquire_ibuf(), BKE_image_get_gpu_texture(), BKE_image_release_ibuf(), BKE_image_user_frame_calc(), BKE_movieclip_get_gpu_texture(), BKE_movieclip_get_size(), BKE_movieclip_user_set_frame(), BKE_object_movieclip_get(), BLI_addtail(), BLI_genericNodeN(), CAM_BGIMG_FLAG_CAMERACLIP, CAM_BGIMG_SOURCE_IMAGE, CAM_BGIMG_SOURCE_MOVIE, Scene::camera, camera_background_images_stereo_setup(), CameraBGImage::clip, CameraBGImage::cuser, DEG_get_ctime(), DRWContextState::depsgraph, CameraBGImage::flag, ImageUser::flag, height, CameraBGImage::ima, IMA_ALPHA_PREMUL, IMA_SRC_SEQUENCE, IMA_USER_FRAME_IN_RANGE, IMA_VIEW_AS_RENDER, image(), CameraBGImage::iuser, lock, NULL, scene, DRWContextState::scene, ImageUser::scene, CameraBGImage::source, tex, DRWContextState::v3d, width, ImBuf::x, and ImBuf::y.
Referenced by OVERLAY_image_camera_cache_populate().
void OVERLAY_image_background_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 464 of file overlay_image.c.
References DRW_draw_pass(), OVERLAY_PassList::image_background_ps, OVERLAY_PassList::image_empties_back_ps, and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().
void OVERLAY_image_cache_finish | ( | OVERLAY_Data * | vedata | ) |
Definition at line 441 of file overlay_image.c.
References DRW_pass_sort_shgroup_z(), OVERLAY_PassList::image_empties_back_ps, OVERLAY_PassList::image_empties_blend_ps, OVERLAY_PassList::image_empties_front_ps, and OVERLAY_Data::psl.
Referenced by OVERLAY_cache_finish().
void OVERLAY_image_cache_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 37 of file overlay_image.c.
References OVERLAY_PrivateData::clipping_state, DRW_PASS_CREATE, DRW_STATE_BLEND_ALPHA_PREMUL, DRW_STATE_BLEND_ALPHA_UNDER_PREMUL, DRW_STATE_DEPTH_GREATER, DRW_STATE_DEPTH_LESS, DRW_STATE_DEPTH_LESS_EQUAL, DRW_STATE_WRITE_COLOR, DRW_STATE_WRITE_DEPTH, OVERLAY_PassList::image_background_ps, OVERLAY_PassList::image_background_scene_ps, OVERLAY_PassList::image_empties_back_ps, OVERLAY_PassList::image_empties_blend_ps, OVERLAY_PassList::image_empties_front_ps, OVERLAY_PassList::image_empties_ps, OVERLAY_PassList::image_foreground_ps, OVERLAY_PassList::image_foreground_scene_ps, OVERLAY_StorageList::pd, OVERLAY_Data::psl, state, and OVERLAY_Data::stl.
Referenced by OVERLAY_cache_init().
|
static |
Definition at line 61 of file overlay_image.c.
References Image::aspx, Image::aspy, and size().
Referenced by OVERLAY_image_empty_cache_populate().
void OVERLAY_image_camera_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 295 of file overlay_image.c.
References Camera::bg_images, BKE_camera_multiview_model_matrix(), BKE_object_empty_image_frame_is_visible_in_view3d(), CAM_BGIMG_FLAG_DISABLED, CAM_BGIMG_FLAG_FOREGROUND, camera_background_images_stereo_eye(), Object::data, DRW_cache_quad_get(), DRW_context_state_get(), DRW_shgroup_call_obmat, DRW_shgroup_create(), DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_texture(), DRW_shgroup_uniform_vec4_copy(), DRW_state_is_select(), OVERLAY_PassList::image_background_ps, OVERLAY_PassList::image_background_scene_ps, image_camera_background_matrix_get(), image_camera_background_texture_get(), OVERLAY_PassList::image_foreground_ps, OVERLAY_PassList::image_foreground_scene_ps, LISTBASE_FOREACH, MIN2, OVERLAY_shader_image(), OVERLAY_StorageList::pd, OVERLAY_Data::psl, Scene::r, DRWContextState::rv3d, scene, DRWContextState::scene, sh, STEREO_LEFT_ID, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, OVERLAY_Data::stl, tex, and DRWContextState::v3d.
Referenced by OVERLAY_camera_cache_populate().
void OVERLAY_image_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 472 of file overlay_image.c.
References DRW_draw_pass(), DRW_view_set_active(), OVERLAY_PassList::image_empties_blend_ps, OVERLAY_PassList::image_empties_ps, NULL, OVERLAY_StorageList::pd, OVERLAY_Data::psl, OVERLAY_Data::stl, and OVERLAY_PrivateData::view_reference_images.
Referenced by OVERLAY_draw_scene().
void OVERLAY_image_empty_cache_populate | ( | OVERLAY_Data * | vedata, |
Object * | ob | ||
) |
Definition at line 356 of file overlay_image.c.
References Image::alpha_mode, BKE_image_get_gpu_texture(), BKE_object_empty_image_data_is_visible_in_view3d(), BKE_object_empty_image_frame_is_visible_in_view3d(), camera_background_images_stereo_setup(), CLAMP_MIN, Object::color, color, copy_m4_m4(), Object::data, DRW_cache_quad_get(), DRW_context_state_get(), DRW_object_wire_theme_get(), DRW_shgroup_call_obmat, DRW_shgroup_create(), DRW_shgroup_uniform_bool_copy(), DRW_shgroup_uniform_texture(), DRW_shgroup_uniform_vec4_copy(), DRW_state_is_depth(), Object::dtx, Object::empty_drawsize, Object::empty_image_depth, Object::empty_image_flag, GPU_texture_orig_height(), GPU_texture_orig_width(), IMA_ALPHA_PREMUL, Object::ima_ofs, OVERLAY_PassList::image_empties_back_ps, OVERLAY_PassList::image_empties_blend_ps, OVERLAY_PassList::image_empties_front_ps, OVERLAY_PassList::image_empties_ps, Object::iuser, madd_v3_v3fl(), mul_v3_fl(), NULL, OB_DRAW_IN_FRONT, OB_EMPTY_IMAGE, OB_EMPTY_IMAGE_DEPTH_BACK, OB_EMPTY_IMAGE_DEPTH_DEFAULT, OB_EMPTY_IMAGE_DEPTH_FRONT, OB_EMPTY_IMAGE_USE_ALPHA_BLEND, Object::obmat, OVERLAY_empty_shape(), OVERLAY_extra_call_buffer_get(), overlay_image_calc_aspect(), OVERLAY_shader_image(), OVERLAY_Data::psl, DRWContextState::rv3d, DRWContextState::scene, sh, size(), tex, DRWContextState::v3d, and DRWContextState::view_layer.
Referenced by OVERLAY_empty_cache_populate().
|
static |
Definition at line 218 of file overlay_image.c.
References BKE_movieclip_free_gputexture(), BLI_pophead(), data, LinkData::data, and MEM_freeN.
Referenced by OVERLAY_image_in_front_draw().
void OVERLAY_image_in_front_draw | ( | OVERLAY_Data * | vedata | ) |
Definition at line 485 of file overlay_image.c.
References DRW_draw_pass(), DRW_view_set_active(), OVERLAY_PassList::image_empties_front_ps, OVERLAY_PassList::image_foreground_ps, NULL, OVERLAY_image_free_movieclips_textures(), OVERLAY_StorageList::pd, OVERLAY_Data::psl, OVERLAY_Data::stl, and OVERLAY_PrivateData::view_reference_images.
Referenced by OVERLAY_draw_scene().
void OVERLAY_image_init | ( | OVERLAY_Data * | vedata | ) |
Definition at line 28 of file overlay_image.c.
References DRW_context_state_get(), DRW_view_create_with_zoffset(), DRW_view_default_get(), OVERLAY_StorageList::pd, DRWContextState::rv3d, OVERLAY_Data::stl, and OVERLAY_PrivateData::view_reference_images.
Referenced by OVERLAY_engine_init().
void OVERLAY_image_scene_background_draw | ( | OVERLAY_Data * | vedata | ) |
This function draws images that needs the view transform applied. It draws these images directly into the scene color buffer.
Definition at line 450 of file overlay_image.c.
References DefaultFramebufferList::default_fb, DRW_draw_pass(), DRW_pass_is_empty(), DRW_state_is_fbo(), DRW_viewport_framebuffer_list_get(), GPU_framebuffer_bind(), OVERLAY_PassList::image_background_scene_ps, OVERLAY_PassList::image_foreground_scene_ps, and OVERLAY_Data::psl.
Referenced by OVERLAY_draw_scene().