Blender V5.3
render_preview.cc File Reference
#include <algorithm>
#include <atomic>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "BLI_math_matrix_c.hh"
#include "BLI_math_rotation_c.hh"
#include "BLI_rect.hh"
#include "BLI_set.hh"
#include "BLI_string_utf8.hh"
#include "BLI_utildefines.hh"
#include "BLT_translation.hh"
#include "BLO_readfile.hh"
#include "DNA_camera_types.h"
#include "DNA_collection_types.h"
#include "DNA_light_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_world_types.h"
#include "BKE_animsys.hh"
#include "BKE_armature.hh"
#include "BKE_brush.hh"
#include "BKE_collection.hh"
#include "BKE_colortools.hh"
#include "BKE_context.hh"
#include "BKE_global.hh"
#include "BKE_icons.hh"
#include "BKE_idprop.hh"
#include "BKE_image.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_library.hh"
#include "BKE_light.h"
#include "BKE_main.hh"
#include "BKE_material.hh"
#include "BKE_node.hh"
#include "BKE_node_tree_update.hh"
#include "BKE_object.hh"
#include "BKE_pose_backup.h"
#include "BKE_preview_image.hh"
#include "BKE_report.hh"
#include "BKE_scene.hh"
#include "BKE_screen.hh"
#include "BKE_texture.h"
#include "BKE_world.h"
#include "BLI_math_vector_c.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "DEG_depsgraph_query.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "IMB_thumbs.hh"
#include "BIF_glutil.hh"
#include "RE_engine.h"
#include "RE_pipeline.h"
#include "RE_texture.h"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_datafiles.h"
#include "ED_render.hh"
#include "ED_screen.hh"
#include "ED_view3d.hh"
#include "ED_view3d_offscreen.hh"
#include "UI_interface_icons.hh"
#include "ANIM_action.hh"
#include "ANIM_pose.hh"
#include "BLI_threads.hh"

Go to the source code of this file.

Classes

struct  blender::blender::LinkData
struct  blender::blender::ListBase
struct  blender::blender::ListBaseTIterator< T >
struct  blender::blender::ListBaseEnumerateIterator< T >
struct  blender::blender::ListBaseEnumerateWrapper< T >
struct  blender::blender::ListBaseMutableIterator< T >
struct  blender::blender::ListBaseMutableWrapper< T >
struct  blender::blender::ListBaseBackwardIterator< T >
struct  blender::blender::ListBaseBackwardWrapper< T >
struct  blender::blender::ListBaseMutableBackwardIterator< T >
struct  blender::blender::ListBaseMutableBackwardWrapper< T >
struct  blender::ShaderPreview
struct  blender::IconPreview
struct  blender::ObjectPreviewData
class  blender::PreviewLoadJob

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::blender

Macros

#define ATTR_WARN_UNUSED_RESULT
#define ATTR_NONNULL(...)
#define ATTR_RETURNS_NONNULL
#define ATTR_NORETURN
#define ATTR_MALLOC
#define ATTR_ALLOC_SIZE(...)
#define ATTR_SENTINEL(arg_pos)
#define ATTR_PRINTF_FORMAT(format_param, dots_param)
#define ATTR_FALLTHROUGH   ((void)0)
#define ATTR_ALIGN(x)
#define BLI_ALIGN_STRUCT
#define BLI_INLINE   static inline __attribute__((always_inline)) __attribute__((__unused__))
#define BLI_INLINE_METHOD   inline __attribute__((always_inline)) __attribute__((__unused__))
#define BLI_NOINLINE
#define __MEM_GUARDEDALLOC_H__
#define _MSC_STDINT_H_
#define _W64
#define INT8_MIN   ((int8_t)_I8_MIN)
#define INT8_MAX   _I8_MAX
#define INT16_MIN   ((int16_t)_I16_MIN)
#define INT16_MAX   _I16_MAX
#define INT32_MIN   ((int32_t)_I32_MIN)
#define INT32_MAX   _I32_MAX
#define INT64_MIN   ((int64_t)_I64_MIN)
#define INT64_MAX   _I64_MAX
#define UINT8_MAX   _UI8_MAX
#define UINT16_MAX   _UI16_MAX
#define UINT32_MAX   _UI32_MAX
#define UINT64_MAX   _UI64_MAX
#define INT_LEAST8_MIN   INT8_MIN
#define INT_LEAST8_MAX   INT8_MAX
#define INT_LEAST16_MIN   INT16_MIN
#define INT_LEAST16_MAX   INT16_MAX
#define INT_LEAST32_MIN   INT32_MIN
#define INT_LEAST32_MAX   INT32_MAX
#define INT_LEAST64_MIN   INT64_MIN
#define INT_LEAST64_MAX   INT64_MAX
#define UINT_LEAST8_MAX   UINT8_MAX
#define UINT_LEAST16_MAX   UINT16_MAX
#define UINT_LEAST32_MAX   UINT32_MAX
#define UINT_LEAST64_MAX   UINT64_MAX
#define INT_FAST8_MIN   INT8_MIN
#define INT_FAST8_MAX   INT8_MAX
#define INT_FAST16_MIN   INT16_MIN
#define INT_FAST16_MAX   INT16_MAX
#define INT_FAST32_MIN   INT32_MIN
#define INT_FAST32_MAX   INT32_MAX
#define INT_FAST64_MIN   INT64_MIN
#define INT_FAST64_MAX   INT64_MAX
#define UINT_FAST8_MAX   UINT8_MAX
#define UINT_FAST16_MAX   UINT16_MAX
#define UINT_FAST32_MAX   UINT32_MAX
#define UINT_FAST64_MAX   UINT64_MAX
#define INTPTR_MIN   INT32_MIN
#define INTPTR_MAX   INT32_MAX
#define UINTPTR_MAX   UINT32_MAX
#define INTMAX_MIN   INT64_MIN
#define INTMAX_MAX   INT64_MAX
#define UINTMAX_MAX   UINT64_MAX
#define PTRDIFF_MIN   _I32_MIN
#define PTRDIFF_MAX   _I32_MAX
#define SIG_ATOMIC_MIN   INT_MIN
#define SIG_ATOMIC_MAX   INT_MAX
#define SIZE_MAX   _UI32_MAX
#define WCHAR_MIN   0
#define WCHAR_MAX   _UI16_MAX
#define WINT_MIN   0
#define WINT_MAX   _UI16_MAX
#define INT8_C(val)
#define INT16_C(val)
#define INT32_C(val)
#define INT64_C(val)
#define UINT8_C(val)
#define UINT16_C(val)
#define UINT32_C(val)
#define UINT64_C(val)
#define INTMAX_C   INT64_C
#define UINTMAX_C   UINT64_C
#define MEM_realloc_uninitialized(vmemh, len)
#define MEM_realloc_zeroed(vmemh, len)
#define MEM_SIZE_OVERHEAD   sizeof(size_t)
#define MEM_SIZE_OPTIMAL(size)
#define LISTBASE_CIRCULAR_FORWARD_BEGIN(type, lb, lb_iter, lb_init)
#define LISTBASE_CIRCULAR_FORWARD_END(type, lb, lb_iter, lb_init)
#define LISTBASE_CIRCULAR_BACKWARD_BEGIN(type, lb, lb_iter, lb_init)
#define LISTBASE_CIRCULAR_BACKWARD_END(type, lb, lb_iter, lb_init)
#define BLENDER_MAX_THREADS   1024
#define BLI_MUTEX_INITIALIZER   PTHREAD_MUTEX_INITIALIZER
#define THREAD_LOCK_READ   1
#define THREAD_LOCK_WRITE   2
#define BLI_RWLOCK_INITIALIZER   PTHREAD_RWLOCK_INITIALIZER
#define ThreadLocal(type)
#define BLI_thread_local_create(name)
#define BLI_thread_local_delete(name)
#define BLI_thread_local_get(name)
#define BLI_thread_local_set(name, value)

Typedefs

typedef pthread_mutex_t blender::blender::ThreadMutex
typedef pthread_spinlock_t blender::blender::SpinLock
typedef pthread_rwlock_t blender::blender::ThreadRWMutex
typedef pthread_cond_t blender::blender::ThreadCondition

Enumerations

enum  {
  blender::blender::LOCK_IMAGE = 0 , blender::blender::LOCK_DRAW_IMAGE , blender::blender::LOCK_VIEWER , blender::blender::LOCK_CUSTOM1 ,
  blender::blender::LOCK_NODES , blender::blender::LOCK_MOVIECLIP , blender::blender::LOCK_FFTW , blender::blender::LOCK_VIEW3D
}
enum  blender::blender::ThreadQueueWorkPriority { blender::blender::BLI_THREAD_QUEUE_WORK_PRIORITY_LOW , blender::blender::BLI_THREAD_QUEUE_WORK_PRIORITY_NORMAL , blender::blender::BLI_THREAD_QUEUE_WORK_PRIORITY_HIGH }

Functions

int blender::blender::BLI_findindex (const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
int blender::blender::BLI_findstringindex (const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
ListBase blender::blender::BLI_listbase_from_link (Link *some_link)
template<typename T>
ListBaseT< T > blender::blender::BLI_listbase_from_link (T *some_link)
void * blender::blender::BLI_findlink (const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_findlinkfrom (Link *start, int step) ATTR_WARN_UNUSED_RESULT
void * blender::blender::BLI_findstring (const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_listbase_findafter_string (Link *link, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_findstring_ptr (const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_listbase_findafter_string_ptr (Link *link, const char *id, int offset)
void * blender::blender::BLI_findptr (const ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_listbase_bytes_find (const ListBase *listbase, const void *bytes, size_t bytes_size, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void void * blender::blender::BLI_listbase_string_or_index_find (const ListBase *listbase, const char *string, size_t string_offset, int index) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_rfindlink (const ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_rfindstring (const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_rfindstring_ptr (const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_rfindptr (const ListBase *listbase, const void *ptr, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * blender::blender::BLI_listbase_bytes_rfind (const ListBase *listbase, const void *bytes, size_t bytes_size, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
void void blender::blender::BLI_freelistN (ListBase *listbase) ATTR_NONNULL(1)
void blender::blender::BLI_addtail (ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void blender::blender::BLI_remlink (ListBase *listbase, void *vlink) ATTR_NONNULL(1)
bool blender::blender::BLI_remlink_safe (ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void * blender::blender::BLI_pophead (ListBase *listbase) ATTR_NONNULL(1)
void * blender::blender::BLI_poptail (ListBase *listbase) ATTR_NONNULL(1)
void blender::blender::BLI_addhead (ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void blender::blender::BLI_insertlinkbefore (ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
void blender::blender::BLI_insertlinkafter (ListBase *listbase, void *vprevlink, void *vnewlink) ATTR_NONNULL(1)
void blender::blender::BLI_insertlinkreplace (ListBase *listbase, void *vreplacelink, void *vnewlink) ATTR_NONNULL(1
void void blender::blender::BLI_listbase_sort (ListBase *listbase, int(*cmp)(const void *, const void *)) ATTR_NONNULL(1
void void void blender::blender::BLI_listbase_sort_r (ListBase *listbase, int(*cmp)(void *, const void *, const void *), void *thunk) ATTR_NONNULL(1
void void void bool blender::blender::BLI_listbase_link_move (ListBase *listbase, void *vlink, int step) ATTR_NONNULL()
bool blender::blender::BLI_listbase_move_index (ListBase *listbase, int from, int to) ATTR_NONNULL()
void blender::blender::BLI_freelist (ListBase *listbase) ATTR_NONNULL(1)
int blender::blender::BLI_listbase_count_at_most (const ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool blender::blender::BLI_listbase_count_is_equal_to (const ListBase *listbase, const int count_cmp)
int blender::blender::BLI_listbase_count (const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void blender::blender::BLI_freelinkN (ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void blender::blender::BLI_listbase_swaplinks (ListBase *listbase, void *vlinka, void *vlinkb) ATTR_NONNULL(1
void void blender::blender::BLI_listbases_swaplinks (ListBase *listbasea, ListBase *listbaseb, void *vlinka, void *vlinkb) ATTR_NONNULL(2
void void void blender::blender::BLI_movelisttolist (ListBase *dst, ListBase *src) ATTR_NONNULL(1
void void void void blender::blender::BLI_movelisttolist_reverse (ListBase *dst, ListBase *src) ATTR_NONNULL(1
void void void void void blender::blender::BLI_listbase_split_after (ListBase *original_listbase, ListBase *split_listbase, void *vlink) ATTR_NONNULL(1
void void void void void void blender::blender::BLI_duplicatelist (ListBase *dst, const ListBase *src) ATTR_NONNULL(1
void void void void void void void blender::blender::BLI_listbase_reverse (ListBase *lb) ATTR_NONNULL(1)
void blender::blender::BLI_listbase_rotate_first (ListBase *lb, void *vlink) ATTR_NONNULL(1
void void blender::blender::BLI_listbase_rotate_last (ListBase *lb, void *vlink) ATTR_NONNULL(1
void void BLI_INLINE bool blender::blender::BLI_listbase_is_single (const ListBase *lb)
BLI_INLINE bool blender::blender::BLI_listbase_is_empty (const ListBase *lb)
BLI_INLINE void blender::blender::BLI_listbase_clear (ListBase *lb)
bool blender::blender::BLI_listbase_validate (ListBase *lb)
BLI_INLINE bool blender::blender::BLI_listbase_equal (const ListBase *a, const ListBase *b)
LinkData * blender::blender::BLI_genericNodeN (void *data)
BLI_INLINE bool blender::blender::operator== (const ListBase &a, const ListBase &b)
BLI_INLINE bool blender::blender::operator!= (const ListBase &a, const ListBase &b)
template<typename T, typename Fn>
T * blender::blender::BLI_listbase_find (const ListBaseT< T > &listbase, Fn &&predicate)
void blender::blender::BLI_threadapi_init ()
void blender::blender::BLI_threadapi_exit ()
void blender::blender::BLI_threadpool_init (ListBaseT< ThreadSlot > *threadbase, void *(*do_thread)(void *), int tot)
int blender::blender::BLI_available_threads (ListBaseT< ThreadSlot > *threadbase)
int blender::blender::BLI_threadpool_available_thread_index (ListBaseT< ThreadSlot > *threadbase)
void blender::blender::BLI_threadpool_insert (ListBaseT< ThreadSlot > *threadbase, void *callerdata)
void blender::blender::BLI_threadpool_remove (ListBaseT< ThreadSlot > *threadbase, void *callerdata)
void blender::blender::BLI_threadpool_remove_index (ListBaseT< ThreadSlot > *threadbase, int index)
void blender::blender::BLI_threadpool_clear (ListBaseT< ThreadSlot > *threadbase)
void blender::blender::BLI_threadpool_end (ListBaseT< ThreadSlot > *threadbase)
int blender::blender::BLI_thread_is_main ()
int blender::blender::BLI_system_thread_count ()
void blender::blender::BLI_system_num_threads_override_set (int num)
int blender::blender::BLI_system_num_threads_override_get ()
void blender::blender::BLI_thread_lock (int type)
void blender::blender::BLI_thread_unlock (int type)
void blender::blender::BLI_mutex_init (ThreadMutex *mutex)
void blender::blender::BLI_mutex_end (ThreadMutex *mutex)
ThreadMutex * blender::blender::BLI_mutex_alloc ()
void blender::blender::BLI_mutex_free (ThreadMutex *mutex)
void blender::blender::BLI_mutex_lock (ThreadMutex *mutex)
bool blender::blender::BLI_mutex_trylock (ThreadMutex *mutex)
void blender::blender::BLI_mutex_unlock (ThreadMutex *mutex)
void blender::blender::BLI_spin_init (SpinLock *spin)
void blender::blender::BLI_spin_lock (SpinLock *spin)
void blender::blender::BLI_spin_unlock (SpinLock *spin)
void blender::blender::BLI_spin_end (SpinLock *spin)
void blender::blender::BLI_rw_mutex_init (ThreadRWMutex *mutex)
void blender::blender::BLI_rw_mutex_end (ThreadRWMutex *mutex)
ThreadRWMutex * blender::blender::BLI_rw_mutex_alloc ()
void blender::blender::BLI_rw_mutex_free (ThreadRWMutex *mutex)
void blender::blender::BLI_rw_mutex_lock (ThreadRWMutex *mutex, int mode)
void blender::blender::BLI_rw_mutex_unlock (ThreadRWMutex *mutex)
TicketMutex * blender::blender::BLI_ticket_mutex_alloc ()
void blender::blender::BLI_ticket_mutex_free (TicketMutex *ticket)
void blender::blender::BLI_ticket_mutex_lock (TicketMutex *ticket)
bool blender::blender::BLI_ticket_mutex_lock_check_recursive (TicketMutex *ticket)
void blender::blender::BLI_ticket_mutex_unlock (TicketMutex *ticket)
void blender::blender::BLI_condition_init (ThreadCondition *cond)
void blender::blender::BLI_condition_wait (ThreadCondition *cond, ThreadMutex *mutex)
void blender::blender::BLI_condition_wait_global_mutex (ThreadCondition *cond, int type)
void blender::blender::BLI_condition_notify_one (ThreadCondition *cond)
void blender::blender::BLI_condition_notify_all (ThreadCondition *cond)
void blender::blender::BLI_condition_end (ThreadCondition *cond)
ThreadQueue * blender::blender::BLI_thread_queue_init ()
void blender::blender::BLI_thread_queue_free (ThreadQueue *queue)
uint64_t blender::blender::BLI_thread_queue_push (ThreadQueue *queue, void *work, ThreadQueueWorkPriority priority)
bool blender::blender::BLI_thread_queue_cancel_work (ThreadQueue *queue, uint64_t work_id)
void * blender::blender::BLI_thread_queue_pop (ThreadQueue *queue)
void * blender::blender::BLI_thread_queue_pop_timeout (ThreadQueue *queue, int ms)
int blender::blender::BLI_thread_queue_len (ThreadQueue *queue)
bool blender::blender::BLI_thread_queue_is_empty (ThreadQueue *queue)
void blender::blender::BLI_thread_queue_wait_finish (ThreadQueue *queue)
void blender::blender::BLI_thread_queue_nowait (ThreadQueue *queue)
Untyped Allocation API.

Defines the 'C-style' part of the API, where memory management is fully untyped (i.e. done with void pointers and explicit size values).

This API should usually not be used anymore in C++ code, unless some form of raw memory management is necessary (e.g. for allocation of various ID types based on their #IDTypeInfo::struct_size data).

void blender::MEM_delete_void (void *vmemh)
void * blender::MEM_dupalloc_void (const void *vmemh) ATTR_WARN_UNUSED_RESULT
void * blender::MEM_new_zeroed (size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void * blender::MEM_new_array_zeroed (size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void blender::ATTR_NONNULL (3)
void * blender::MEM_new_uninitialized (size_t len, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2)
void * blender::MEM_new_array_uninitialized (size_t len, size_t size, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1
void * blender::MEM_new_uninitialized_aligned (size_t len, size_t alignment, const char *str) ATTR_WARN_UNUSED_RESULT ATTR_ALLOC_SIZE(1) ATTR_NONNULL(3)
void * blender::ATTR_NONNULL (4)
Various Helpers.

These functions allow to control the behavior of the guarded allocator, and to retrieve (debug) information about allocated memory.

void blender::MEM_init_memleak_detection (void)
void blender::MEM_enable_fail_on_memleak (void)
void blender::MEM_use_lockfree_allocator (void)
void blender::MEM_use_guarded_allocator (void)
Icon Preview
static void blender::icon_copy_rect (const ImBuf *ibuf, uint w, uint h, uint *rect)
static void blender::set_alpha (char *cp, int sizex, int sizey, char alpha)
static void blender::icon_preview_startjob (void *customdata, bool *stop, bool *do_update)
static void blender::common_preview_startjob (void *customdata, wmJobWorkerStatus *worker_status)
static void blender::other_id_types_preview_render (const PreviewImage *prv_img, IconPreview *ip, const eIconSizes icon_size, const ePreviewRenderMethod pr_method, wmJobWorkerStatus *worker_status)
static void blender::icon_preview_startjob_all_sizes (void *customdata, wmJobWorkerStatus *worker_status)
static void blender::icon_preview_endjob (void *customdata)
static void blender::icon_preview_free (void *customdata)
bool blender::ED_preview_use_image_size (const PreviewImage *preview, eIconSizes size)
bool blender::ED_preview_id_render_is_supported (const ID *id, const char **r_disabled_hint=nullptr)
void blender::ED_preview_icon_render (const bContext *C, Scene *scene, PreviewImage *prv_img, ID *id, enum eIconSizes icon_size)
void blender::ED_preview_icon_job (const bContext *C, PreviewImage *prv_img, ID *id, enum eIconSizes icon_size, bool delay)
void blender::ED_preview_shader_job (const bContext *C, const void *owner, ID *id, ID *parent, MTex *slot, int sizex, int sizey, ePreviewRenderMethod method)
void blender::ED_preview_kill_jobs (wmWindowManager *wm, Main *bmain)
void blender::ED_preview_kill_jobs_for_undo (wmWindowManager *wm, Main *bmain)
void blender::ED_preview_kill_jobs_for_id (wmWindowManager *wm, const ID *id)
void blender::ED_preview_online_download_requested (StringRef preview_full_filepath)
void blender::ED_preview_online_download_finished (wmWindowManager *wm, StringRef preview_full_filepath)
void blender::ED_preview_restart_work (const bContext *C)
Object Preview
static bool blender::object_preview_is_type_supported (const Object *ob)
static Object * blender::object_preview_camera_create (Main *preview_main, Scene *scene, ViewLayer *view_layer, Object *preview_object)
static Scene * blender::object_preview_scene_create (const ObjectPreviewData *preview_data, Depsgraph **r_depsgraph)
static void blender::object_preview_render (const PreviewImage *prv_img, IconPreview *preview, const eIconSizes icon_size)
Action Preview
static PoseBackup * blender::action_preview_render_prepare (IconPreview *preview)
static void blender::action_preview_render_cleanup (IconPreview *preview, PoseBackup *pose_backup)
static bool blender::action_preview_render (const PreviewImage *prv_img, IconPreview *preview, const eIconSizes icon_size)
Scene Preview
static bool blender::scene_preview_is_supported (const Scene *scene)
static void blender::scene_preview_render (const PreviewImage *prv_img, IconPreview *preview, const eIconSizes icon_size, ReportList *reports)
New Shader Preview System
static void blender::shader_preview_update (void *spv, RenderResult *)
static bool blender::shader_preview_break (void *spv)
static void blender::shader_preview_updatejob (void *)
static void blender::shader_preview_texture (ShaderPreview *sp, Tex *tex, Scene *sce, Render *re)
static void blender::shader_preview_render (ShaderPreview *sp, ID *id, int split, int first)
static void blender::shader_preview_startjob (void *customdata, bool *stop, bool *do_update)
static void blender::preview_id_copy_free (ID *id)
static void blender::shader_preview_free (void *customdata)

Variables

Local Structs
static bool blender::preview_kill_jobs_for_undo = false

Preview for Buttons

static Main * blender::G_pr_main_grease_pencil = nullptr
static Main * blender::load_main_from_memory (const void *blend, int blend_size)
void blender::ED_preview_ensure_dbase (bool with_gpencil)
bool blender::ED_check_engine_supports_preview (const Scene *scene)
static bool blender::preview_method_is_render (const ePreviewRenderMethod pr_method)
void blender::ED_preview_free_dbase ()
static Scene * blender::preview_get_scene (Main *pr_main)
const char * blender::ED_preview_collection_name (ePreviewType pr_type)
static bool blender::render_engine_supports_ray_visibility (const Scene *sce)
static void blender::switch_preview_collection_visibility (ViewLayer *view_layer, const ePreviewType pr_type)
static const char * blender::preview_floor_material_name (const Scene *scene, const ePreviewRenderMethod pr_method)
static void blender::switch_preview_floor_material (Main *pr_main, Mesh *mesh, const Scene *scene, const ePreviewRenderMethod pr_method)
static void blender::switch_preview_floor_visibility (Main *pr_main, const Scene *scene, ViewLayer *view_layer, const ePreviewRenderMethod pr_method)
void blender::ED_preview_set_visibility (Main *pr_main, Scene *scene, ViewLayer *view_layer, ePreviewType pr_type, ePreviewRenderMethod pr_method)
static World * blender::preview_get_localized_world (ShaderPreview *sp, World *world)
World * blender::ED_preview_prepare_world_simple (Main *bmain)
static World * blender::preview_get_world_simple (ShaderPreview *sp)
void blender::ED_preview_world_simple_set_rgb (World *world, const float color[4])
static ID * blender::duplicate_ids (ID *id, const bool allow_failure)
static const char * blender::preview_world_name (const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static World * blender::preview_get_world (Main *pr_main, const Scene *sce, const ID_Type id_type, const ePreviewRenderMethod pr_method)
static void blender::preview_sync_exposure (World *dst, const World *src)
World * blender::ED_preview_prepare_world (Main *pr_main, const Scene *scene, const World *world, ID_Type id_type, ePreviewRenderMethod pr_method)
static Scene * blender::preview_prepare_scene (Main *bmain, Scene *scene, ID *id, int id_type, ShaderPreview *sp)
static bool blender::ed_preview_draw_rect (Scene *scene, const void *owner, int split, int first, const rcti *rect, rcti *newrect)
void blender::ED_preview_draw (const bContext *C, void *idp, void *parentp, void *slotp, uiPreview *ui_preview, rcti *rect)
void blender::ED_previews_tag_dirty_by_id (const Main &bmain, const ID &id)

Macro Definition Documentation

◆ __MEM_GUARDEDALLOC_H__

#define __MEM_GUARDEDALLOC_H__

◆ _MSC_STDINT_H_

#define _MSC_STDINT_H_

◆ _W64

#define _W64

◆ ATTR_ALIGN

#define ATTR_ALIGN ( x)
Value:
__attribute__((aligned(x)))
struct AtomicSpinLock __attribute__((aligned(32))) AtomicSpinLock

◆ ATTR_ALLOC_SIZE

#define ATTR_ALLOC_SIZE ( ...)

◆ ATTR_FALLTHROUGH

#define ATTR_FALLTHROUGH   ((void)0)

◆ ATTR_MALLOC

#define ATTR_MALLOC

◆ ATTR_NONNULL

#define ATTR_NONNULL ( ...)

◆ ATTR_NORETURN

#define ATTR_NORETURN

◆ ATTR_PRINTF_FORMAT

#define ATTR_PRINTF_FORMAT ( format_param,
dots_param )

◆ ATTR_RETURNS_NONNULL

#define ATTR_RETURNS_NONNULL

◆ ATTR_SENTINEL

#define ATTR_SENTINEL ( arg_pos)

◆ ATTR_WARN_UNUSED_RESULT

#define ATTR_WARN_UNUSED_RESULT

◆ BLENDER_MAX_THREADS

#define BLENDER_MAX_THREADS   1024

◆ BLI_ALIGN_STRUCT

#define BLI_ALIGN_STRUCT

◆ BLI_INLINE

#define BLI_INLINE   static inline __attribute__((always_inline)) __attribute__((__unused__))

◆ BLI_INLINE_METHOD

#define BLI_INLINE_METHOD   inline __attribute__((always_inline)) __attribute__((__unused__))

◆ BLI_MUTEX_INITIALIZER

#define BLI_MUTEX_INITIALIZER   PTHREAD_MUTEX_INITIALIZER

◆ BLI_NOINLINE

#define BLI_NOINLINE

◆ BLI_RWLOCK_INITIALIZER

#define BLI_RWLOCK_INITIALIZER   PTHREAD_RWLOCK_INITIALIZER

◆ BLI_thread_local_create

#define BLI_thread_local_create ( name)

◆ BLI_thread_local_delete

#define BLI_thread_local_delete ( name)

◆ BLI_thread_local_get

#define BLI_thread_local_get ( name)
Value:
name

◆ BLI_thread_local_set

#define BLI_thread_local_set ( name,
value )
Value:
name = value

◆ INT16_C

#define INT16_C ( val)
Value:
val##i16

◆ INT16_MAX

#define INT16_MAX   _I16_MAX

◆ INT16_MIN

#define INT16_MIN   ((int16_t)_I16_MIN)

◆ INT32_C

#define INT32_C ( val)
Value:
val##i32

◆ INT32_MAX

#define INT32_MAX   _I32_MAX

◆ INT32_MIN

#define INT32_MIN   ((int32_t)_I32_MIN)

◆ INT64_C

#define INT64_C ( val)
Value:
val##i64

◆ INT64_MAX

#define INT64_MAX   _I64_MAX

◆ INT64_MIN

#define INT64_MIN   ((int64_t)_I64_MIN)

◆ INT8_C

#define INT8_C ( val)
Value:
val##i8

◆ INT8_MAX

#define INT8_MAX   _I8_MAX

◆ INT8_MIN

#define INT8_MIN   ((int8_t)_I8_MIN)

◆ INT_FAST16_MAX

#define INT_FAST16_MAX   INT16_MAX

◆ INT_FAST16_MIN

#define INT_FAST16_MIN   INT16_MIN

◆ INT_FAST32_MAX

#define INT_FAST32_MAX   INT32_MAX

◆ INT_FAST32_MIN

#define INT_FAST32_MIN   INT32_MIN

◆ INT_FAST64_MAX

#define INT_FAST64_MAX   INT64_MAX

◆ INT_FAST64_MIN

#define INT_FAST64_MIN   INT64_MIN

◆ INT_FAST8_MAX

#define INT_FAST8_MAX   INT8_MAX

◆ INT_FAST8_MIN

#define INT_FAST8_MIN   INT8_MIN

◆ INT_LEAST16_MAX

#define INT_LEAST16_MAX   INT16_MAX

◆ INT_LEAST16_MIN

#define INT_LEAST16_MIN   INT16_MIN

◆ INT_LEAST32_MAX

#define INT_LEAST32_MAX   INT32_MAX

◆ INT_LEAST32_MIN

#define INT_LEAST32_MIN   INT32_MIN

◆ INT_LEAST64_MAX

#define INT_LEAST64_MAX   INT64_MAX

◆ INT_LEAST64_MIN

#define INT_LEAST64_MIN   INT64_MIN

◆ INT_LEAST8_MAX

#define INT_LEAST8_MAX   INT8_MAX

◆ INT_LEAST8_MIN

#define INT_LEAST8_MIN   INT8_MIN

◆ INTMAX_C

#define INTMAX_C   INT64_C

◆ INTMAX_MAX

#define INTMAX_MAX   INT64_MAX

◆ INTMAX_MIN

#define INTMAX_MIN   INT64_MIN

◆ INTPTR_MAX

#define INTPTR_MAX   INT32_MAX

◆ INTPTR_MIN

#define INTPTR_MIN   INT32_MIN

◆ LISTBASE_CIRCULAR_BACKWARD_BEGIN

#define LISTBASE_CIRCULAR_BACKWARD_BEGIN ( type,
lb,
lb_iter,
lb_init )
Value:
if ((lb)->last_ && (lb_init || (lb_init = (type)(lb)->last_))) { \
lb_iter = lb_init; \
do {

◆ LISTBASE_CIRCULAR_BACKWARD_END

#define LISTBASE_CIRCULAR_BACKWARD_END ( type,
lb,
lb_iter,
lb_init )
Value:
} \
while ((lb_iter = (lb_iter)->prev ? (lb_iter)->prev : (type)(lb)->last_), (lb_iter != lb_init)) \
; \
} \
((void)0)

◆ LISTBASE_CIRCULAR_FORWARD_BEGIN

#define LISTBASE_CIRCULAR_FORWARD_BEGIN ( type,
lb,
lb_iter,
lb_init )
Value:
if ((lb)->first_ && (lb_init || (lb_init = (type)(lb)->first_))) { \
lb_iter = (type)(lb_init); \
do {

◆ LISTBASE_CIRCULAR_FORWARD_END

#define LISTBASE_CIRCULAR_FORWARD_END ( type,
lb,
lb_iter,
lb_init )
Value:
} \
while ((lb_iter = (lb_iter)->next ? (type)(lb_iter)->next : (type)(lb)->first_), \
(lb_iter != lb_init)) \
; \
} \
((void)0)

◆ MEM_realloc_uninitialized

#define MEM_realloc_uninitialized ( vmemh,
len )
Value:
void *(*) MEM_realloc_uninitialized_id(void *vmemh, size_t len, const char *str)
Definition mallocn.cc:31
ccl_device_inline dual1 len(const ccl_private dual< T > &a)
Definition math_dual.h:263

◆ MEM_realloc_zeroed

#define MEM_realloc_zeroed ( vmemh,
len )
Value:
MEM_realloc_zeroed_id(vmemh, len, __func__)
void *(*) MEM_realloc_zeroed_id(void *vmemh, size_t len, const char *str)
Definition mallocn.cc:34

◆ MEM_SIZE_OPTIMAL

#define MEM_SIZE_OPTIMAL ( size)
Value:
#define MEM_SIZE_OVERHEAD

◆ MEM_SIZE_OVERHEAD

#define MEM_SIZE_OVERHEAD   sizeof(size_t)

◆ PTRDIFF_MAX

#define PTRDIFF_MAX   _I32_MAX

◆ PTRDIFF_MIN

#define PTRDIFF_MIN   _I32_MIN

◆ SIG_ATOMIC_MAX

#define SIG_ATOMIC_MAX   INT_MAX

◆ SIG_ATOMIC_MIN

#define SIG_ATOMIC_MIN   INT_MIN

◆ SIZE_MAX

#define SIZE_MAX   _UI32_MAX

◆ THREAD_LOCK_READ

#define THREAD_LOCK_READ   1

◆ THREAD_LOCK_WRITE

#define THREAD_LOCK_WRITE   2

◆ ThreadLocal

#define ThreadLocal ( type)
Value:
__thread type

◆ UINT16_C

#define UINT16_C ( val)
Value:
val##ui16

◆ UINT16_MAX

#define UINT16_MAX   _UI16_MAX

◆ UINT32_C

#define UINT32_C ( val)
Value:
val##ui32

◆ UINT32_MAX

#define UINT32_MAX   _UI32_MAX

◆ UINT64_C

#define UINT64_C ( val)
Value:
val##ui64

◆ UINT64_MAX

#define UINT64_MAX   _UI64_MAX

◆ UINT8_C

#define UINT8_C ( val)
Value:
val##ui8

◆ UINT8_MAX

#define UINT8_MAX   _UI8_MAX

◆ UINT_FAST16_MAX

#define UINT_FAST16_MAX   UINT16_MAX

◆ UINT_FAST32_MAX

#define UINT_FAST32_MAX   UINT32_MAX

◆ UINT_FAST64_MAX

#define UINT_FAST64_MAX   UINT64_MAX

◆ UINT_FAST8_MAX

#define UINT_FAST8_MAX   UINT8_MAX

◆ UINT_LEAST16_MAX

#define UINT_LEAST16_MAX   UINT16_MAX

◆ UINT_LEAST32_MAX

#define UINT_LEAST32_MAX   UINT32_MAX

◆ UINT_LEAST64_MAX

#define UINT_LEAST64_MAX   UINT64_MAX

◆ UINT_LEAST8_MAX

#define UINT_LEAST8_MAX   UINT8_MAX

◆ UINTMAX_C

#define UINTMAX_C   UINT64_C

◆ UINTMAX_MAX

#define UINTMAX_MAX   UINT64_MAX

◆ UINTPTR_MAX

#define UINTPTR_MAX   UINT32_MAX

◆ WCHAR_MAX

#define WCHAR_MAX   _UI16_MAX

◆ WCHAR_MIN

#define WCHAR_MIN   0

◆ WINT_MAX

#define WINT_MAX   _UI16_MAX

◆ WINT_MIN

#define WINT_MIN   0