Blender V5.3
blender::bke::PreviewImageRuntime Struct Reference

#include <BKE_preview_image.hh>

Public Member Functions

 PreviewImageRuntime ()
 PreviewImageRuntime (const PreviewImageRuntime &other)
 ~PreviewImageRuntime ()

Public Attributes

int icon_id = 0
int16_t tag [NUM_ICON_SIZES] = {}
int user_count = 0
std::array< gpu::Texture *, NUM_ICON_SIZES > gputexture = {}
std::unique_ptr< PreviewDeferredLoadingData > deferred_loading_data

Detailed Description

Definition at line 35 of file BKE_preview_image.hh.

Constructor & Destructor Documentation

◆ PreviewImageRuntime() [1/2]

blender::bke::PreviewImageRuntime::PreviewImageRuntime ( )
default

◆ PreviewImageRuntime() [2/2]

blender::bke::PreviewImageRuntime::PreviewImageRuntime ( const PreviewImageRuntime & other)

Definition at line 61 of file preview_image.cc.

References deferred_loading_data, and PreviewImageRuntime().

◆ ~PreviewImageRuntime()

blender::bke::PreviewImageRuntime::~PreviewImageRuntime ( )
default

Member Data Documentation

◆ deferred_loading_data

◆ gputexture

std::array<gpu::Texture *, NUM_ICON_SIZES> blender::bke::PreviewImageRuntime::gputexture = {}

◆ icon_id

int blender::bke::PreviewImageRuntime::icon_id = 0

◆ tag

◆ user_count

int blender::bke::PreviewImageRuntime::user_count = 0

This is only needed/used in rare cases (asset previews). Multiple libraries may contain the same asset, so they will request the same preview. In that case, the user count can be used to avoid freeing too early.

Definition at line 45 of file BKE_preview_image.hh.

Referenced by blender::BKE_previewimg_cached_thumbnail_read().


The documentation for this struct was generated from the following files: