174 const int fileflags =
G.fileflags;
175 Main *bmain =
nullptr;
185 G.fileflags = fileflags;
194 static bool base_initialized =
false;
195 static bool base_initialized_gpencil =
false;
197 if (!base_initialized) {
199 base_initialized =
true;
201 if (!base_initialized_gpencil && with_gpencil) {
204 base_initialized_gpencil =
true;
235 if (pr_main ==
nullptr) {
252 return "Shader Ball";
258 return "World Sphere";
298 return "FloorHidden";
308 if (mesh->totcol == 0) {
328 if (
STREQ(base->object->id.name + 2,
"Floor")) {
329 base->object->visibility_flag &= ~OB_HIDE_RENDER;
335 if (base->object->type ==
OB_MESH) {
337 pr_main,
static_cast<Mesh *
>(base->object->data), scene, pr_method);
356 if (world ==
nullptr) {
380 switch (
GS(id->name)) {
400 return &instance_empty->
id;
408 if (!allow_failure) {
439 World *result =
nullptr;
441 result =
static_cast<World *
>(
445 if (result ==
nullptr) {
509 sce->
r.
cfra = scene->r.cfra;
515 if (id_type ==
ID_TE) {
520 if (id_type ==
ID_MA) {
560 if (base->object->id.name[2] ==
'p') {
568 int actcol =
max_ii(base->object->actcol - 1, 0);
570 if (matar && actcol < base->object->totcol) {
571 (*matar)[actcol] = mat;
574 else if (base->object->type ==
OB_LAMP) {
580 else if (id_type ==
ID_TE) {
581 Tex *
tex =
nullptr, *origtex = (
Tex *)
id;
590 else if (id_type ==
ID_LA) {
613 if (base->object->id.name[2] ==
'p') {
614 if (base->object->type ==
OB_LAMP) {
615 base->object->data = la;
620 else if (id_type ==
ID_WO) {
621 World *wrld =
nullptr, *origwrld = (
World *)
id;
654 if (!split || first) {
655 SNPRINTF(name,
"Preview %p", (
void *)area);
658 SNPRINTF(name,
"SecondPreview %p", (
void *)area);
668 newx = newx - newx / 2;
690 if (rv && rv->
ibuf) {
696 float fx = rect->
xmin + offx;
697 float fy = rect->
ymin;
700 rv->
ibuf, fx, fy,
false, &scene->view_settings, &scene->display_settings, 1.0f, 1.0f);
720 ID *parent = (
ID *)parentp;
754 if (sbuts !=
nullptr) {
758 ui_preview->
tag &= ~UI_PREVIEW_TAG_DIRTY;
769 if (preview->id_session_uid ==
id.session_uid) {
809 float dummy_scale[3];
810 mat4_to_loc_rot_size(camera->loc, rotmat, dummy_scale, preview_object->object_to_world().ptr());
814 const float eul[3] = {
M_PI * 0.4f, 0.0f,
M_PI * 0.1f};
822 ((
Camera *)camera->data)->lens = 85;
828 Depsgraph **r_depsgraph)
833 scene->r.cfra = preview_data->
cfra;
845 preview_data->
pr_main, scene, view_layer, preview_data->
object);
847 scene->camera = camera_object;
848 scene->r.xsch = preview_data->
sizex;
849 scene->r.ysch = preview_data->
sizey;
872 char err_out[256] =
"unknown";
877 preview_data.
pr_main = preview_main;
901 preview_sized->
sizex,
902 preview_sized->
sizey,
968 if (
object ==
nullptr) {
972 if (object->pose ==
nullptr) {
974 "Object %s has no pose, unable to apply the Action before rendering",
975 object->id.name + 2);
998 if (pose_backup ==
nullptr) {
1012 char err_out[256] =
"";
1026 if (camera_eval ==
nullptr) {
1027 printf(
"Scene has no camera, unable to render preview of %s without it.\n",
1039 preview_sized->
sizex,
1040 preview_sized->
sizey,
1051 if (err_out[0] !=
'\0') {
1052 printf(
"Error rendering Action %s preview: %s\n", preview->
id->
name + 2, err_out);
1089 int width = sp->
sizex;
1090 int height = sp->
sizey;
1102 static_cast<float *
>(
MEM_callocN(
sizeof(
float[4]) * width * height,
1103 "texture render result")),
1113 float tex_coord[3] = {0.0f, 0.0f, 0.0f};
1115 for (
int y = 0; y < height; y++) {
1119 for (
int x = 0; x < width; x++) {
1148 short idtype =
GS(id->name);
1156 sizex = sp->
sizex / 2;
1169 sce->
r.
xsch = sizex;
1176 if (sce ==
nullptr) {
1180 if (!split || first) {
1189 if (re ==
nullptr) {
1195 sce->
r.
scemode &= ~R_NO_IMAGE_LOAD;
1214 if (sizex > sp->
sizey) {
1219 if (idtype ==
ID_TE) {
1243 if (idtype ==
ID_TE) {
1287 ID *main_id_copy =
nullptr;
1288 ID *sub_id_copy =
nullptr;
1364 uint *drect, *srect;
1365 float scaledx, scaledy;
1366 short ex, ey, dx, dy;
1381 if (ima->
x > ima->
y) {
1391 ex = std::max(
short(1),
short(scaledx));
1392 ey = std::max(
short(1),
short(scaledy));
1407 drect += dy *
w + dx;
1408 for (; ey > 0; ey--) {
1409 memcpy(drect, srect, ex *
sizeof(
int));
1417static void set_alpha(
char *cp,
int sizex,
int sizey,
char alpha)
1419 int a, size = sizex * sizey;
1421 for (a = 0; a <
size; a++, cp += 4) {
1436 short idtype =
GS(id->name);
1440 if (idtype ==
ID_IM) {
1442 ImBuf *ibuf =
nullptr;
1446 if (ima ==
nullptr) {
1458 if (ibuf ==
nullptr ||
1471 else if (idtype ==
ID_BR) {
1492 if (idtype ==
ID_WO) {
1522 ShaderPreview *sp = MEM_cnew<ShaderPreview>(
"Icon ShaderPreview");
1548 if ((ma ==
nullptr) || (ma->
gp_style ==
nullptr)) {
1569 if ((preview_image->
w[i] == icon_size->
sizex) && (preview_image->
h[i] == icon_size->
sizey)) {
1574 BLI_assert_msg(0,
"The searched icon size does not match any in the preview image");
1589 if (worker_status->
stop) {
1626 if (ip->
id !=
nullptr) {
1657 if (cur_size->
sizex == sizex && cur_size->
sizey == sizey) {
1662 cur_size = cur_size->
next;
1665 IconPreviewSize *new_size = MEM_cnew<IconPreviewSize>(
"IconPreviewSize");
1666 new_size->
sizex = sizex;
1667 new_size->
sizey = sizey;
1668 new_size->
rect = rect;
1690 if (prv_img->gputexture[i]) {
1692 prv_img->gputexture[i] =
nullptr;
1702 prv_img->
runtime->tag &= ~PRV_TAG_DEFFERED_RENDERING;
1726 struct RequestedPreview {
1736 std::list<RequestedPreview> requested_previews_;
1749 static void update_fn(
void *customdata);
1750 static void end_fn(
void *customdata);
1751 static void free_fn(
void *customdata);
1754 static void finish_request(RequestedPreview &request);
1770 PreviewLoadJob *job_data = MEM_new<PreviewLoadJob>(
"PreviewLoadJobData");
1789 run_fn(&job_data, &worker_status);
1790 update_fn(&job_data);
1797 RequestedPreview requested_preview{};
1798 requested_preview.preview = preview;
1799 requested_preview.icon_size = icon_size;
1805 requested_previews_.push_back(requested_preview);
1815 while (RequestedPreview *request =
static_cast<RequestedPreview *
>(
1818 if (worker_status->
stop) {
1827 if (!source || !filepath) {
1842 preview->
w[request->icon_size],
1843 preview->
h[request->icon_size],
1844 preview->
rect[request->icon_size]);
1855void PreviewLoadJob::finish_request(RequestedPreview &request)
1859 preview->
runtime->tag &= ~PRV_TAG_DEFFERED_RENDERING;
1863 "Deferred releasing of preview images should only run on the main thread");
1870void PreviewLoadJob::update_fn(
void *customdata)
1874 for (
auto request_it = job_data->requested_previews_.begin();
1875 request_it != job_data->requested_previews_.end();)
1877 RequestedPreview &requested = *request_it;
1883 finish_request(requested);
1886 auto next_it = job_data->requested_previews_.erase(request_it);
1887 request_it = next_it;
1891void PreviewLoadJob::end_fn(
void *customdata)
1896 for (RequestedPreview &request : job_data->requested_previews_) {
1897 finish_request(request);
1899 job_data->requested_previews_.clear();
1902void PreviewLoadJob::free_fn(
void *customdata)
1921 if (
id ==
nullptr) {
1927 const auto [
result, disabled_hint] = [id]() -> std::pair<bool, const char *> {
1928 switch (
GS(id->name)) {
1930 return {
false,
RPT_(
"Node groups do not support automatic previews")};
1933 RPT_(
"Object type does not support automatic previews")};
1937 RPT_(
"Collection does not contain object types that can be rendered for the automatic "
1941 RPT_(
"Data-block type does not support automatic previews")};
1945 if (result ==
false && disabled_hint && r_disabled_hint) {
1946 *r_disabled_hint = disabled_hint;
1956 if (prv_img->
runtime->deferred_loading_data) {
1983 &ip, prv_img->
rect[icon_size], prv_img->
w[icon_size], prv_img->
h[icon_size]);
2000 if (prv_img->
runtime->deferred_loading_data) {
2023 ip = MEM_cnew<IconPreview>(
"icon preview");
2036 ip->
owner = prv_img;
2043 ip, prv_img->
rect[icon_size], prv_img->
w[icon_size], prv_img->
h[icon_size]);
2090 sp = MEM_cnew<ShaderPreview>(
"shader preview");
2110 if (id_type ==
ID_MA) {
2114 if ((ma ==
nullptr) || (ma->
gp_style ==
nullptr)) {
2163 queue_entry->
id = id;
Functions and classes to work with Actions.
Functions to work with animation poses.
void ED_draw_imbuf(ImBuf *ibuf, float x, float y, bool use_filter, const ColorManagedViewSettings *view_settings, const ColorManagedDisplaySettings *display_settings, float zoom_x, float zoom_y)
bool BKE_collection_object_add(Main *bmain, Collection *collection, Object *ob)
SpaceProperties * CTX_wm_space_properties(const bContext *C)
Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
ScrArea * CTX_wm_area(const bContext *C)
wmWindow * CTX_wm_window(const bContext *C)
Object * CTX_data_active_object(const bContext *C)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_icon_changed(int icon_id)
int BKE_icon_id_ensure(struct ID *id)
void IDP_FreePropertyContent_ex(IDProperty *prop, bool do_id_user)
IDProperty * IDP_GetProperties(ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
void BKE_image_pool_free(ImagePool *pool)
void BKE_imageuser_default(ImageUser *iuser)
ImagePool * BKE_image_pool_new(void)
void BKE_view_layer_synced_ensure(const Scene *scene, ViewLayer *view_layer)
Base * BKE_view_layer_base_find(ViewLayer *view_layer, Object *ob)
void BKE_layer_collection_sync(const Scene *scene, ViewLayer *view_layer)
ListBase * BKE_view_layer_object_bases_get(ViewLayer *view_layer)
void BKE_libblock_free_datablock(ID *id, int flag) ATTR_NONNULL()
@ LIB_ID_COPY_NO_ANIMDATA
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
General operations, lookup, etc. for blender lights.
Main * BKE_main_new(void)
void BKE_main_free(Main *bmain)
const char * BKE_main_blendfile_path(const Main *bmain) ATTR_NONNULL()
General operations, lookup, etc. for materials.
struct Material *** BKE_object_material_array_p(struct Object *ob)
General operations, lookup, etc. for blender objects.
Object * BKE_object_add(Main *bmain, Scene *scene, ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
Object * BKE_object_add_only_object(Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
struct PoseBackup * BKE_pose_backup_create_all_bones(const struct Object *ob, const struct bAction *action) ATTR_WARN_UNUSED_RESULT
void BKE_pose_backup_restore(const struct PoseBackup *pbd)
void BKE_pose_backup_free(struct PoseBackup *pbd)
void BKE_previewimg_deferred_release(PreviewImage *prv)
PreviewImage * BKE_previewimg_id_get(const ID *id)
bool BKE_previewimg_is_finished(const PreviewImage *prv, int size)
std::optional< int > BKE_previewimg_deferred_thumb_source_get(const PreviewImage *prv)
bool BKE_previewimg_id_supports_jobs(const ID *id)
PreviewImage * BKE_previewimg_id_ensure(ID *id)
PreviewImage ** BKE_previewimg_id_get_p(const ID *id)
void BKE_previewimg_clear_single(PreviewImage *prv, enum eIconSizes size)
const char * BKE_previewimg_deferred_filepath_get(const PreviewImage *prv)
void BKE_previewimg_finish(PreviewImage *prv, int size)
Scene * BKE_scene_add(Main *bmain, const char *name)
void BKE_scene_graph_update_tagged(Depsgraph *depsgraph, Main *bmain)
void BKE_screen_view3d_shading_init(View3DShading *shading)
void BKE_texture_fetch_images_for_pool(struct Tex *texture, struct ImagePool *pool)
void BKE_texture_get_value_ex(struct Tex *texture, const float *tex_co, struct TexResult *texres, struct ImagePool *pool, bool use_color_management)
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
BLI_INLINE bool BLI_listbase_is_empty(const struct ListBase *lb)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE int max_ii(int a, int b)
void mul_m3_m3_post(float R[3][3], const float B[3][3])
void mat4_to_loc_rot_size(float loc[3], float rot[3][3], float size[3], const float wmat[4][4])
void eul_to_mat3(float mat[3][3], const float eul[3])
void mat3_to_quat(float q[4], const float mat[3][3])
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v4_fl4(float v[4], float x, float y, float z, float w)
bool BLI_path_abs(char path[FILE_MAX], const char *basepath) ATTR_NONNULL(1
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
#define STRNCPY(dst, src)
#define SNPRINTF(dst, format,...)
void BLI_thread_queue_push(ThreadQueue *queue, void *work)
ThreadQueue * BLI_thread_queue_init(void)
void BLI_thread_queue_free(ThreadQueue *queue)
int BLI_thread_is_main(void)
void * BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms)
Platform independent time functions.
#define ARRAY_SET_ITEMS(...)
external readfile function prototypes.
BlendFileData * BLO_read_from_memory(const void *mem, int memsize, eBLOReadSkip skip_flags, ReportList *reports)
void DEG_id_tag_update(ID *id, unsigned int flags)
Depsgraph * DEG_graph_new(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
void DEG_evaluate_on_refresh(Depsgraph *graph, DepsgraphEvaluateSyncWriteback sync_writeback=DEG_EVALUATE_SYNC_WRITEBACK_NO)
void DEG_graph_free(Depsgraph *graph)
void DEG_graph_build_from_view_layer(Depsgraph *graph)
Scene * DEG_get_evaluated_scene(const Depsgraph *graph)
Scene * DEG_get_input_scene(const Depsgraph *graph)
Object * DEG_get_evaluated_object(const Depsgraph *depsgraph, Object *object)
@ PRV_TAG_DEFFERED_DELETE
@ PRV_TAG_DEFFERED_RENDERING
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define ID_IS_EDITABLE(_id)
Object groups, one object can be in many groups at once.
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
Object is a sort of wrapper for general info.
#define OB_TYPE_IS_GEOMETRY(_type)
#define OB_TYPE_SUPPORT_MATERIAL(_type)
#define BASE_SELECTED(v3d, base)
@ SCE_DISPLAY_AA_SAMPLES_8
@ V3D_OFSDRAW_OVERRIDE_SCENE_SETTINGS
const char datatoc_preview_grease_pencil_blend[]
int datatoc_preview_grease_pencil_blend_size
const char datatoc_preview_blend[]
int datatoc_preview_blend_size
bool ED_view3d_camera_to_view_selected_with_set_clipping(Main *bmain, Depsgraph *depsgraph, const Scene *scene, Object *camera_ob)
ImBuf * ED_view3d_draw_offscreen_imbuf_simple(Depsgraph *depsgraph, Scene *scene, View3DShading *shading_override, eDrawType drawtype, Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, GPUOffScreen *ofs, GPUViewport *viewport, char err_out[256])
void GPU_texture_free(GPUTexture *texture)
void IMB_premultiply_alpha(ImBuf *ibuf)
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
void IMB_rect_from_float(ImBuf *ibuf)
void IMB_assign_float_buffer(ImBuf *ibuf, float *buffer_data, ImBufOwnership ownership)
ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
bool IMB_scale(ImBuf *ibuf, unsigned int newx, unsigned int newy, IMBScaleFilter filter, bool threaded=true)
Contains defines and structs used throughout the imbuf module.
void IMB_thumb_path_unlock(const char *path)
void IMB_thumb_locks_acquire()
ImBuf * IMB_thumb_manage(const char *file_or_lib_path, ThumbSize size, ThumbSource source)
void IMB_thumb_path_lock(const char *path)
void IMB_thumb_locks_release()
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between camera
void UI_icon_render_id(const bContext *C, Scene *scene, ID *id, enum eIconSizes size, bool use_job)
@ WM_JOB_TYPE_RENDER_PREVIEW
@ WM_JOB_TYPE_LOAD_PREVIEW
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
static void load_jobless(PreviewImage *preview, eIconSizes icon_size)
void push_load_request(PreviewImage *preview, eIconSizes icon_size)
static PreviewLoadJob & ensure_job(wmWindowManager *wm, wmWindow *win)
const Depsgraph * depsgraph
draw_view in_light_buf[] float
void IMB_freeImBuf(ImBuf *)
RenderEngineType * RE_engines_find(const char *idname)
void MEM_freeN(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void pose_apply_action_all_bones(Object *ob, bAction *action, slot_handle_t slot_handle, const AnimationEvalContext *anim_eval_context)
slot_handle_t first_slot_handle(const ::bAction &dna_action)
decltype(::ActionSlot::handle) slot_handle_t
static bool preview_method_is_render(const ePreviewRenderMethod pr_method)
static void icon_preview_add_size(IconPreview *ip, uint *rect, int sizex, int sizey)
static void shader_preview_texture(ShaderPreview *sp, Tex *tex, Scene *sce, Render *re)
static ID * duplicate_ids(ID *id, const bool allow_failure)
static void icon_preview_endjob(void *customdata)
static bool render_engine_supports_ray_visibility(const Scene *sce)
void ED_preview_free_dbase()
static void icon_preview_startjob_all_sizes(void *customdata, wmJobWorkerStatus *worker_status)
static ListBase G_restart_previews_queue
static void shader_preview_free(void *customdata)
World * ED_preview_prepare_world(Main *pr_main, const Scene *scene, const World *world, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static void preview_sync_exposure(World *dst, const World *src)
static Main * load_main_from_memory(const void *blend, int blend_size)
static void shader_preview_update(void *spv, RenderResult *, rcti *)
static void action_preview_render_cleanup(IconPreview *preview, PoseBackup *pose_backup)
const char * ED_preview_collection_name(const ePreviewType pr_type)
static World * preview_get_localized_world(ShaderPreview *sp, World *world)
static void icon_preview_free(void *customdata)
void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, uiPreview *ui_preview, rcti *rect)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *)
void ED_preview_icon_render(const bContext *C, Scene *scene, PreviewImage *prv_img, ID *id, eIconSizes icon_size)
static bool ed_preview_draw_rect(Scene *scene, ScrArea *area, int split, int first, const rcti *rect, rcti *newrect)
static Scene * preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_type, ShaderPreview *sp)
static World * preview_get_world(Main *pr_main, const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static void other_id_types_preview_render(IconPreview *ip, IconPreviewSize *cur_size, const ePreviewRenderMethod pr_method, wmJobWorkerStatus *worker_status)
void ED_preview_restart_queue_work(const bContext *C)
static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect)
void ED_preview_restart_queue_add(ID *id, enum eIconSizes size)
static bool collection_preview_contains_geometry_recursive(const Collection *collection)
static Scene * preview_get_scene(Main *pr_main)
static Scene * object_preview_scene_create(const ObjectPreviewData *preview_data, Depsgraph **r_depsgraph)
static void object_preview_render(IconPreview *preview, IconPreviewSize *preview_sized)
static int icon_previewimg_size_index_get(const IconPreviewSize *icon_size, const PreviewImage *preview_image)
static void switch_preview_floor_visibility(Main *pr_main, const Scene *scene, ViewLayer *view_layer, const ePreviewRenderMethod pr_method)
static void action_preview_render(IconPreview *preview, IconPreviewSize *preview_sized)
void ED_preview_ensure_dbase(const bool with_gpencil)
static ImBuf * icon_preview_imbuf_from_brush(Brush *brush)
void ED_preview_set_visibility(Main *pr_main, Scene *scene, ViewLayer *view_layer, const ePreviewType pr_type, const ePreviewRenderMethod pr_method)
static Main * G_pr_main_grease_pencil
static void set_alpha(char *cp, int sizex, int sizey, char alpha)
bool ED_check_engine_supports_preview(const Scene *scene)
static void shader_preview_startjob(void *customdata, bool *stop, bool *do_update)
static const char * preview_world_name(const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static void shader_preview_render(ShaderPreview *sp, ID *id, int split, int first)
static void preview_id_copy_free(ID *id)
static void switch_preview_collection_visibility(ViewLayer *view_layer, const ePreviewType pr_type)
void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey, ePreviewRenderMethod method)
static Object * object_preview_camera_create(Main *preview_main, Scene *scene, ViewLayer *view_layer, Object *preview_object)
bool ED_preview_id_is_supported(const ID *id, const char **r_disabled_hint)
void ED_previews_tag_dirty_by_id(const Main &bmain, const ID &id)
static bool object_preview_is_type_supported(const Object *ob)
static const char * preview_floor_material_name(const Scene *scene, const ePreviewRenderMethod pr_method)
static void common_preview_startjob(void *customdata, wmJobWorkerStatus *worker_status)
void ED_preview_icon_job(const bContext *C, PreviewImage *prv_img, ID *id, eIconSizes icon_size, const bool delay)
static void switch_preview_floor_material(Main *pr_main, Mesh *mesh, const Scene *scene, const ePreviewRenderMethod pr_method)
static void icon_preview_startjob(void *customdata, bool *stop, bool *do_update)
void ED_preview_restart_queue_free()
static bool shader_preview_break(void *spv)
static void shader_preview_updatejob(void *)
static PoseBackup * action_preview_render_prepare(IconPreview *preview)
ImBuf * RE_RenderViewEnsureImBuf(const RenderResult *render_result, RenderView *render_view)
RenderView * RE_RenderViewGetById(RenderResult *rr, const int view_id)
const char * RE_engine_id_BLENDER_EEVEE_NEXT
void RE_ReleaseResultImageViews(Render *re, RenderResult *rr)
void RE_PreviewRender(Render *re, Main *bmain, Scene *sce)
void RE_test_break_cb(Render *re, void *handle, bool(*f)(void *handle))
void RE_InitState(Render *re, Render *source, RenderData *rd, ListBase *, ViewLayer *single_layer, int winx, int winy, const rcti *disprect)
void RE_ResultGet32(Render *re, uint *rect)
Render * RE_NewRender(const char *name)
RenderResult * RE_AcquireResultWrite(Render *re)
Render * RE_GetRender(const char *name)
void RE_ReleaseResult(Render *re)
void RE_display_update_cb(Render *re, void *handle, void(*f)(void *handle, RenderResult *rr, rcti *rect))
void RE_AcquireResultImageViews(Render *re, RenderResult *rr)
void RE_SetScene(Render *re, Scene *sce)
struct ImBuf * icon_imbuf
ImBufFloatBuffer float_buffer
ImBufByteBuffer byte_buffer
struct LayerCollection * next
ListBase layer_collections
struct Collection * collection
struct PreviewImage * preview
struct MaterialGPencilStyle * gp_style
struct Collection * instance_collection
PreviewImageRuntimeHandle * runtime
PreviewRestartQueueEntry * prev
PreviewRestartQueueEntry * next
struct SceneDisplay display
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
ePreviewRenderMethod pr_method
struct bNodeTree * nodetree
struct ViewLayerEEVEE eevee
ListBase layer_collections
ccl_device_inline int abs(int x)
void WM_report(eReportType type, const char *message)
void WM_main_add_notifier(uint type, void *reference)
void WM_reportf(eReportType type, const char *format,...)
bool WM_jobs_is_running(const wmJob *wm_job)
void WM_jobs_timer(wmJob *wm_job, double time_step, uint note, uint endnote)
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void WM_jobs_kill_type(wmWindowManager *wm, const void *owner, int job_type)
void * WM_jobs_customdata_get(wmJob *wm_job)
void WM_jobs_delay_start(wmJob *wm_job, double delay_time)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, const eWM_JobFlag flag, const eWM_JobType job_type)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
bool WM_jobs_test(const wmWindowManager *wm, const void *owner, int job_type)
void WM_jobs_customdata_set(wmJob *wm_job, void *customdata, void(*free)(void *customdata))
void * WM_jobs_customdata_from_type(wmWindowManager *wm, const void *owner, int job_type)