161 #ifndef WITH_HEADLESS
164 const int fileflags =
G.fileflags;
165 Main *bmain =
nullptr;
175 G.fileflags = fileflags;
183 #ifndef WITH_HEADLESS
184 static bool base_initialized =
false;
186 if (!base_initialized) {
190 base_initialized =
true;
219 if (pr_main ==
nullptr) {
236 return "Shader Ball";
242 return "World Sphere";
282 return "FloorHidden";
311 if (
STREQ(base->object->id.name + 2,
"Floor")) {
318 if (base->object->type ==
OB_MESH) {
320 pr_main,
static_cast<Mesh *
>(base->object->data),
scene, pr_method);
339 if (
world ==
nullptr) {
383 return &instance_empty->
id;
391 if (!allow_failure) {
497 if (id_type ==
ID_TE) {
502 if (id_type ==
ID_MA) {
538 if (base->object->id.name[2] ==
'p') {
548 if (matar && actcol < base->object->totcol) {
552 else if (base->object->type ==
OB_LAMP) {
558 else if (id_type ==
ID_TE) {
559 Tex *
tex =
nullptr, *origtex = (
Tex *)
id;
568 else if (id_type ==
ID_LA) {
590 if (base->object->id.name[2] ==
'p') {
591 if (base->object->type ==
OB_LAMP) {
592 base->object->data = la;
597 else if (id_type ==
ID_WO) {
598 World *wrld =
nullptr, *origwrld = (
World *)
id;
630 if (!
split || first) {
631 sprintf(
name,
"Preview %p", (
void *)
area);
634 sprintf(
name,
"SecondPreview %p", (
void *)
area);
644 newx = newx - newx / 2;
666 if (rv && rv->
rectf) {
676 float fx = rect->
xmin + offx;
677 float fy = rect->
ymin;
743 if ((sbuts !=
nullptr && sbuts->
preview) ||
746 if (sbuts !=
nullptr) {
789 const float eul[3] = {
M_PI * 0.4f, 0.0f,
M_PI * 0.1f};
846 char err_out[256] =
"unknown";
851 preview_data.
pr_main = preview_main;
875 preview_sized->
sizex,
876 preview_sized->
sizey,
941 if (
object ==
nullptr) {
945 if (object->
pose ==
nullptr) {
947 "Object %s has no pose, unable to apply the Action before rendering",
970 if (pose_backup ==
nullptr) {
984 char err_out[256] =
"";
998 if (camera_eval ==
nullptr) {
999 printf(
"Scene has no camera, unable to render preview of %s without it.\n",
1010 preview_sized->
sizex,
1011 preview_sized->
sizey,
1021 if (err_out[0] !=
'\0') {
1022 printf(
"Error rendering Action %s preview: %s\n",
preview->id->name + 2, err_out);
1072 rv->
rectf =
static_cast<float *
>(
1081 float *rect_float = rv->
rectf;
1082 float tex_coord[3] = {0.0f, 0.0f, 0.0f};
1083 bool color_manage =
true;
1126 sizex = sp->
sizex / 2;
1139 sce->
r.
xsch = sizex;
1146 if (sce ==
nullptr) {
1150 if (!
split || first) {
1151 sprintf(name,
"Preview %p", sp->
owner);
1154 sprintf(name,
"SecondPreview %p", sp->
owner);
1159 if (re ==
nullptr) {
1184 if (sizex > sp->
sizey) {
1189 if (idtype ==
ID_TE) {
1213 if (idtype ==
ID_TE) {
1257 ID *main_id_copy =
nullptr;
1258 ID *sub_id_copy =
nullptr;
1354 uint *drect, *srect;
1355 float scaledx, scaledy;
1356 short ex, ey, dx, dy;
1359 if (ibuf ==
nullptr || (ibuf->
rect ==
nullptr && ibuf->
rect_float ==
nullptr)) {
1370 if (ima->
x > ima->
y) {
1372 scaledy = ((
float)ima->
y / (
float)ima->
x) * (
float)
w;
1375 scaledx = ((
float)ima->
x / (
float)ima->
y) * (
float)h;
1380 ex =
MAX2(1, (
short)scaledx);
1381 ey =
MAX2(1, (
short)scaledy);
1389 if (ima->
rect ==
nullptr) {
1396 drect += dy *
w + dx;
1397 for (; ey > 0; ey--) {
1398 memcpy(drect, srect, ex *
sizeof(
int));
1406 static void set_alpha(
char *cp,
int sizex,
int sizey,
char alpha)
1408 int a,
size = sizex * sizey;
1410 for (
a = 0;
a <
size;
a++, cp += 4) {
1429 if (idtype ==
ID_IM) {
1431 ImBuf *ibuf =
nullptr;
1435 if (ima ==
nullptr) {
1447 if (ibuf ==
nullptr || (ibuf->
rect ==
nullptr && ibuf->
rect_float ==
nullptr)) {
1458 else if (idtype ==
ID_BR) {
1473 else if (idtype ==
ID_SCR) {
1485 if (idtype ==
ID_WO) {
1520 ShaderPreview *sp = MEM_cnew<ShaderPreview>(
"Icon ShaderPreview");
1546 if ((ma ==
nullptr) || (ma->
gp_style ==
nullptr)) {
1567 if ((preview_image->
w[i] == icon_size->
sizex) && (preview_image->
h[i] == icon_size->
sizey)) {
1572 BLI_assert_msg(0,
"The searched icon size does not match any in the preview image");
1585 cur_size = cur_size->
next) {
1619 if (ip->
id !=
nullptr) {
1651 if (cur_size->
sizex == sizex && cur_size->
sizey == sizey) {
1656 cur_size = cur_size->
next;
1659 IconPreviewSize *new_size = MEM_cnew<IconPreviewSize>(
"IconPreviewSize");
1660 new_size->
sizex = sizex;
1661 new_size->
sizey = sizey;
1684 if (prv_img->gputexture[i]) {
1686 prv_img->gputexture[i] =
nullptr;
1720 struct RequestedPreview {
1730 std::list<struct RequestedPreview> requested_previews_;
1742 static void run_fn(
void *customdata,
short *stop,
short *do_update,
float *progress);
1743 static void update_fn(
void *customdata);
1744 static void end_fn(
void *customdata);
1745 static void free_fn(
void *customdata);
1748 static void finish_request(RequestedPreview &request);
1765 PreviewLoadJob *job_data = MEM_new<PreviewLoadJob>(
"PreviewLoadJobData");
1783 short stop = 0, do_update = 0;
1785 run_fn(&job_data, &stop, &do_update, &progress);
1786 update_fn(&job_data);
1793 RequestedPreview requested_preview{};
1794 requested_preview.preview =
preview;
1795 requested_preview.icon_size = icon_size;
1801 requested_previews_.push_back(requested_preview);
1805 void PreviewLoadJob::run_fn(
void *customdata,
1814 while (RequestedPreview *request =
reinterpret_cast<RequestedPreview *
>(
1824 const char *filepath = &deferred_data[1];
1837 preview->w[request->icon_size],
1838 preview->h[request->icon_size],
1839 preview->rect[request->icon_size]);
1850 void PreviewLoadJob::finish_request(RequestedPreview &request)
1858 "Deferred releasing of preview images should only run on the main thread");
1865 void PreviewLoadJob::update_fn(
void *customdata)
1869 for (
auto request_it = job_data->requested_previews_.begin();
1870 request_it != job_data->requested_previews_.end();) {
1871 RequestedPreview &requested = *request_it;
1877 finish_request(requested);
1880 auto next_it = job_data->requested_previews_.erase(request_it);
1881 request_it = next_it;
1885 void PreviewLoadJob::end_fn(
void *customdata)
1890 for (RequestedPreview &request : job_data->requested_previews_) {
1891 finish_request(request);
1893 job_data->requested_previews_.clear();
1896 void PreviewLoadJob::free_fn(
void *customdata)
1915 if (
id ==
nullptr) {
1946 short stop =
false,
update =
false;
1947 float progress = 0.0f;
1964 &ip, prv_img->
rect[icon_size], prv_img->
w[icon_size], prv_img->
h[icon_size]);
2003 ip = MEM_cnew<IconPreview>(
"icon preview");
2016 ip->
owner = prv_img;
2023 ip, prv_img->
rect[icon_size], prv_img->
w[icon_size], prv_img->
h[icon_size]);
2070 sp = MEM_cnew<ShaderPreview>(
"shader preview");
2090 if (id_type ==
ID_MA) {
2094 if ((ma ==
nullptr) || (ma->
gp_style ==
nullptr)) {
2144 queue_entry->
id =
id;
typedef float(TangentPoint)[2]
void immDrawPixelsTexTiled(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, void *rect, float xzoom, float yzoom, const float color[4])
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
const char * BKE_appdir_folder_id(int folder_id, const char *subfolder)
void BKE_pose_apply_action_all_bones(struct Object *ob, struct bAction *action, struct AnimationEvalContext *anim_eval_context)
bool BKE_collection_object_add(struct Main *bmain, struct Collection *collection, struct Object *ob)
struct ScrArea * CTX_wm_area(const bContext *C)
struct Scene * CTX_data_scene(const bContext *C)
struct SpaceProperties * CTX_wm_space_properties(const bContext *C)
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Depsgraph * CTX_data_ensure_evaluated_depsgraph(const bContext *C)
struct Object * CTX_data_active_object(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
struct PreviewImage * BKE_previewimg_id_ensure(struct ID *id)
bool BKE_previewimg_id_supports_jobs(const struct ID *id)
void BKE_icon_changed(int icon_id)
struct PreviewImage ** BKE_previewimg_id_get_p(const struct ID *id)
void BKE_previewimg_clear_single(struct PreviewImage *prv, enum eIconSizes size)
struct PreviewImage * BKE_previewimg_id_get(const struct ID *id)
void BKE_previewimg_deferred_release(struct PreviewImage *prv)
void BKE_previewimg_finish(struct PreviewImage *prv, int size)
bool BKE_previewimg_is_finished(const struct PreviewImage *prv, int size)
int BKE_icon_id_ensure(struct ID *id)
struct IDProperty * IDP_GetProperties(struct ID *id, bool create_if_needed) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_FreePropertyContent_ex(struct IDProperty *prop, bool do_id_user)
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
struct ImagePool * BKE_image_pool_new(void)
void BKE_imageuser_default(struct ImageUser *iuser)
void BKE_image_pool_free(struct ImagePool *pool)
struct Base * BKE_view_layer_base_find(struct ViewLayer *view_layer, struct Object *ob)
void BKE_layer_collection_sync(const struct Scene *scene, struct ViewLayer *view_layer)
@ LIB_ID_COPY_NO_ANIMDATA
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, int flag)
void BKE_libblock_free_datablock(struct ID *id, int flag) ATTR_NONNULL()
General operations, lookup, etc. for blender lights.
struct Main * BKE_main_new(void)
const char * BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL()
void BKE_main_free(struct Main *mainvar)
const char * BKE_main_blendfile_path_from_global(void)
General operations, lookup, etc. for materials.
struct Material *** BKE_object_material_array_p(struct Object *ob)
General operations, lookup, etc. for blender objects.
struct Object * BKE_object_add(struct Main *bmain, struct ViewLayer *view_layer, int type, const char *name) ATTR_NONNULL(1
struct Object * BKE_object_add_only_object(struct Main *bmain, int type, const char *name) ATTR_RETURNS_NONNULL
void BKE_scene_graph_update_tagged(struct Depsgraph *depsgraph, struct Main *bmain)
struct Scene * BKE_scene_add(struct Main *bmain, const char *name)
void BKE_screen_view3d_shading_init(struct View3DShading *shading)
void BKE_texture_fetch_images_for_pool(struct Tex *texture, struct ImagePool *pool)
void BKE_texture_get_value_ex(const struct Scene *scene, 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)
#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)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT 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)
void BLI_make_file_string(const char *relabase, char *string, const char *dir, const char *file)
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
void BLI_thread_queue_push(ThreadQueue *queue, void *work)
void * BLI_thread_queue_pop_timeout(ThreadQueue *queue, int ms)
void BLI_thread_queue_free(ThreadQueue *queue)
int BLI_thread_is_main(void)
ThreadQueue * BLI_thread_queue_init(void)
#define ARRAY_SET_ITEMS(...)
external readfile function prototypes.
BlendFileData * BLO_read_from_memory(const void *mem, int memsize, eBLOReadSkip skip_flags, struct ReportList *reports)
void DEG_evaluate_on_refresh(Depsgraph *graph)
Depsgraph * DEG_graph_new(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, eEvaluationMode mode)
struct Depsgraph Depsgraph
void DEG_graph_free(Depsgraph *graph)
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_graph_build_from_view_layer(struct Depsgraph *graph)
struct Scene * DEG_get_input_scene(const Depsgraph *graph)
struct Object * DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object)
struct Scene * DEG_get_evaluated_scene(const struct Depsgraph *graph)
@ PRV_TAG_DEFFERED_DELETE
@ PRV_TAG_DEFFERED_RENDERING
#define ID_BLEND_PATH_FROM_GLOBAL(_id)
#define PRV_DEFERRED_DATA(prv)
Object groups, one object can be in many groups at once.
Object is a sort of wrapper for general info.
#define OB_TYPE_IS_GEOMETRY(_type)
#define OB_TYPE_SUPPORT_MATERIAL(_type)
#define R_TEXNODE_PREVIEW
#define R_MATNODE_PREVIEW
@ 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
void ED_screen_preview_render(const struct bScreen *screen, int size_x, int size_y, unsigned int *r_rect) ATTR_NONNULL()
bool ED_view3d_camera_to_view_selected_with_set_clipping(struct Main *bmain, struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *camera_ob)
struct ImBuf * ED_view3d_draw_offscreen_imbuf_simple(struct Depsgraph *depsgraph, struct Scene *scene, struct View3DShading *shading_override, eDrawType drawtype, struct Object *camera, int width, int height, eImBufFlags imbuf_flags, eV3DOffscreenDrawFlag draw_flags, int alpha_mode, const char *viewname, struct GPUOffScreen *ofs, char err_out[256])
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
@ GPU_SHADER_2D_IMAGE_COLOR
void GPU_texture_free(GPUTexture *tex)
struct ImBuf * IMB_dupImBuf(const struct ImBuf *ibuf1)
void IMB_rect_from_float(struct ImBuf *ibuf)
struct ImBuf * IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
void IMB_premultiply_alpha(struct ImBuf *ibuf)
bool IMB_scalefastImBuf(struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
Contains defines and structs used throughout the imbuf module.
void IMB_thumb_locks_release(void)
void IMB_thumb_path_unlock(const char *path)
struct ImBuf * IMB_thumb_manage(const char *filepath, ThumbSize size, ThumbSource source)
void IMB_thumb_path_lock(const char *path)
void IMB_thumb_locks_acquire(void)
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 Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise 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
Platform independent time functions.
void UI_icon_render_id(const struct bContext *C, struct Scene *scene, struct 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
SyclQueue void void * src
RenderEngineType * RE_engines_find(const char *idname)
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
void(* MEM_freeN)(void *vmemh)
void *(* MEM_callocN)(size_t len, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
static void area(int d1, int d2, int e1, int e2, float weights[2])
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
static const pxr::TfToken preview("preview", pxr::TfToken::Immortal)
static void update(bNodeTree *ntree)
void RE_ReleaseResultImageViews(Render *re, RenderResult *rr)
Render * RE_GetRender(const char *name)
void RE_PreviewRender(Render *re, Main *bmain, Scene *sce)
Render * RE_NewRender(const char *name)
void RE_InitState(Render *re, Render *source, RenderData *rd, ListBase *render_layers, ViewLayer *single_layer, int winx, int winy, rcti *disprect)
void RE_ReleaseResult(Render *re)
RenderResult * RE_AcquireResultWrite(Render *re)
void RE_display_update_cb(Render *re, void *handle, void(*f)(void *handle, RenderResult *rr, rcti *rect))
void RE_test_break_cb(Render *re, void *handle, int(*f)(void *handle))
void RE_AcquiredResultGet32(Render *re, RenderResult *result, unsigned int *rect, const int view_id)
void RE_AcquireResultImageViews(Render *re, RenderResult *rr)
void RE_SetScene(Render *re, Scene *sce)
void RE_ResultGet32(Render *re, unsigned int *rect)
void ED_pose_backup_free(PoseBackup *pbd)
PoseBackup * ED_pose_backup_create_all_bones(const Object *ob, const bAction *action)
void ED_pose_backup_restore(const PoseBackup *pbd)
static bool preview_method_is_render(const ePreviewRenderMethod pr_method)
static Scene * preview_get_scene(Main *pr_main)
bool ED_preview_id_is_supported(const ID *id)
static void icon_preview_add_size(IconPreview *ip, uint *rect, int sizex, int sizey)
static void other_id_types_preview_render(IconPreview *ip, IconPreviewSize *cur_size, const ePreviewRenderMethod pr_method, short *stop, short *do_update, float *progress)
static void shader_preview_texture(ShaderPreview *sp, Tex *tex, Scene *sce, Render *re)
static void icon_preview_endjob(void *customdata)
static bool render_engine_supports_ray_visibility(const Scene *sce)
static void icon_preview_startjob_all_sizes(void *customdata, short *stop, short *do_update, float *progress)
static bool check_engine_supports_preview(Scene *scene)
static World * preview_get_world(Main *pr_main, const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
void ED_preview_free_dbase()
static ListBase G_restart_previews_queue
static void shader_preview_free(void *customdata)
static Main * load_main_from_memory(const void *blend, int blend_size)
static void preview_sync_exposure(World *dst, const World *src)
static Object * object_preview_camera_create(Main *preview_main, ViewLayer *view_layer, Object *preview_object)
static void common_preview_startjob(void *customdata, short *stop, short *do_update, float *UNUSED(progress))
static Scene * object_preview_scene_create(const struct ObjectPreviewData *preview_data, Depsgraph **r_depsgraph)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *UNUSED(bmain))
static void icon_preview_free(void *customdata)
void ED_preview_icon_render(const bContext *C, Scene *scene, PreviewImage *prv_img, ID *id, eIconSizes icon_size)
static const char * preview_collection_name(const ePreviewType pr_type)
static void set_preview_visibility(Main *pr_main, Scene *scene, ViewLayer *view_layer, const ePreviewType pr_type, const ePreviewRenderMethod pr_method)
static World * preview_get_localized_world(ShaderPreview *sp, World *world)
void ED_preview_restart_queue_work(const bContext *C)
static const char * preview_floor_material_name(const Scene *scene, const ePreviewRenderMethod pr_method)
static void icon_copy_rect(ImBuf *ibuf, uint w, uint h, uint *rect)
static void switch_preview_floor_material(Main *pr_main, Mesh *me, const Scene *scene, const ePreviewRenderMethod pr_method)
static World * preview_prepare_world(Main *pr_main, const Scene *sce, const World *world, const ID_Type id_type, const ePreviewRenderMethod pr_method)
void ED_preview_restart_queue_add(ID *id, enum eIconSizes size)
static bool collection_preview_contains_geometry_recursive(const Collection *collection)
static Scene * preview_prepare_scene(Main *bmain, Scene *scene, ID *id, int id_type, ShaderPreview *sp)
static struct PoseBackup * action_preview_render_prepare(IconPreview *preview)
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()
static void shader_preview_startjob(void *customdata, short *stop, short *do_update)
static const char * preview_world_name(const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static Main * G_pr_main_grease_pencil
void ED_preview_draw(const bContext *C, void *idp, void *parentp, void *slotp, rcti *rect)
static void set_alpha(char *cp, int sizex, int sizey, char alpha)
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)
static bool ed_preview_draw_rect(ScrArea *area, int split, int first, rcti *rect, rcti *newrect)
void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey, ePreviewRenderMethod method)
static ImBuf * icon_preview_imbuf_from_brush(Brush *brush)
static int shader_preview_break(void *spv)
static void action_preview_render_cleanup(IconPreview *preview, struct PoseBackup *pose_backup)
static bool object_preview_is_type_supported(const Object *ob)
static void icon_preview_startjob(void *customdata, short *stop, short *do_update)
static ID * duplicate_ids(ID *id, const bool allow_failure)
void ED_preview_icon_job(const bContext *C, PreviewImage *prv_img, ID *id, eIconSizes icon_size, const bool delay)
void ED_preview_restart_queue_free()
static void shader_preview_update(void *spv, RenderResult *UNUSED(rr), struct rcti *UNUSED(rect))
static void shader_preview_updatejob(void *UNUSED(spv))
RenderView * RE_RenderViewGetById(RenderResult *rr, const int view_id)
const char * RE_engine_id_BLENDER_EEVEE
struct ImBuf * icon_imbuf
struct IconPreviewSize * next
struct IconPreviewSize * prev
struct Object * active_object
struct LayerCollection * next
ListBase layer_collections
struct Collection * collection
struct PreviewImage * preview
struct MaterialGPencilStyle * gp_style
struct Collection * instance_collection
struct PreviewRestartQueueEntry * next
struct PreviewRestartQueueEntry * prev
struct Collection * master_collection
struct SceneDisplay display
ColorManagedViewSettings view_settings
ColorManagedDisplaySettings display_settings
ePreviewRenderMethod pr_method
struct bNodeTree * nodetree
struct ViewLayerEEVEE eevee
ListBase layer_collections
static int blend(const Tex *tex, const float texvec[3], TexResult *texres)
void WM_main_add_notifier(unsigned int type, void *reference)
void WM_report(eReportType type, const char *message)
void WM_reportf(eReportType type, const char *format,...)
bool WM_jobs_is_running(const wmJob *wm_job)
void WM_jobs_kill(wmWindowManager *wm, void *owner, void(*startjob)(void *, short int *, short int *, float *))
void WM_jobs_start(wmWindowManager *wm, wmJob *wm_job)
void * WM_jobs_customdata_from_type(wmWindowManager *wm, const void *owner, int job_type)
void WM_jobs_delay_start(wmJob *wm_job, double delay_time)
void WM_jobs_callbacks(wmJob *wm_job, wm_jobs_start_callback startjob, void(*initjob)(void *), void(*update)(void *), void(*endjob)(void *))
void * WM_jobs_customdata_get(wmJob *wm_job)
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 *))
void WM_jobs_timer(wmJob *wm_job, double timestep, unsigned int note, unsigned int endnote)
wmJob * WM_jobs_get(wmWindowManager *wm, wmWindow *win, const void *owner, const char *name, int flag, int job_type)