Cycles material preview: fix for generated/packed/movie files

Issue was caused by cycles trying to find builtin images in a main
database and in case of preview render images are not in database,
they're just referenced by shader node tree.

Now builtin images in cycles have got void* pointer to store data
needed to load builtin images.

In case ob blender session, this pointer will store pointer from
PointerRNA for image datablock and used later to construct Image
class based on this pointer.

This also saves database lookup for final render which is nice :)

Reviewed by Brecht.
This commit is contained in:
Sergey Sharybin
2013-01-30 13:42:12 +00:00
parent 54223ed05b
commit 452a52575c
7 changed files with 61 additions and 64 deletions

View File

@@ -70,7 +70,7 @@ public:
int slot;
int is_float;
string filename;
bool is_builtin;
void *builtin_data;
ustring color_space;
ustring projection;
float projection_blend;
@@ -90,7 +90,7 @@ public:
int slot;
int is_float;
string filename;
bool is_builtin;
void *builtin_data;
ustring color_space;
ustring projection;
bool animated;