Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_preview.c
| Context not available. | |||||
| #include "PIL_time.h" | #include "PIL_time.h" | ||||
| #include "RE_pipeline.h" | #include "RE_pipeline.h" | ||||
| #include "RE_engine.h" | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| Context not available. | |||||
| #endif | #endif | ||||
| } | } | ||||
| static bool check_engine_supports_textures(Scene *scene) | |||||
| { | |||||
| RenderEngineType *type = RE_engines_find(scene->r.engine); | |||||
| return type->flag & RE_USE_TEXTURE_PREVIEW; | |||||
| } | |||||
| void ED_preview_free_dbase(void) | void ED_preview_free_dbase(void) | ||||
| { | { | ||||
| if (G_pr_main) | if (G_pr_main) | ||||
| Context not available. | |||||
| sce->r.cfra = scene->r.cfra; | sce->r.cfra = scene->r.cfra; | ||||
| if (id_type == ID_TE && !check_engine_supports_textures(scene)) { | if (id_type == ID_TE) { | ||||
| /* Force blender internal for texture icons and nodes render, | /* Force blender internal for texture icons and nodes render, | ||||
| * seems commonly used render engines does not support | * seems commonly used render engines does not support | ||||
| * such kind of rendering. | * such kind of rendering. | ||||
| Context not available. | |||||
| if (sp->pr_rect) | if (sp->pr_rect) | ||||
| RE_ResultGet32(re, sp->pr_rect); | RE_ResultGet32(re, sp->pr_rect); | ||||
| } | } | ||||
| else { | |||||
| /* validate owner */ | |||||
| //if (ri->rect == NULL) | |||||
| // ri->rect= MEM_mallocN(sizeof(int) * ri->pr_rectx*ri->pr_recty, "BIF_previewrender"); | |||||
| //RE_ResultGet32(re, ri->rect); | |||||
| } | |||||
| /* unassign the pointers, reset vars */ | /* unassign the pointers, reset vars */ | ||||
| preview_prepare_scene(sp->scene, NULL, GS(id->name), sp); | preview_prepare_scene(sp->scene, NULL, GS(id->name), sp); | ||||
| Context not available. | |||||