Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/render/render_preview.c
| Show First 20 Lines • Show All 1,602 Lines • ▼ Show 20 Lines | if (ip->id_copy) { | ||||
| preview_id_copy_free(ip->id_copy); | preview_id_copy_free(ip->id_copy); | ||||
| } | } | ||||
| BLI_freelistN(&ip->sizes); | BLI_freelistN(&ip->sizes); | ||||
| MEM_freeN(ip); | MEM_freeN(ip); | ||||
| } | } | ||||
| void ED_preview_icon_render( | void ED_preview_icon_render( | ||||
| Main *bmain, Depsgraph *depsgraph, Scene *scene, ID *id, uint *rect, int sizex, int sizey) | const bContext *C, Scene *scene, ID *id, uint *rect, int sizex, int sizey) | ||||
| { | { | ||||
| IconPreview ip = {NULL}; | IconPreview ip = {NULL}; | ||||
| short stop = false, update = false; | short stop = false, update = false; | ||||
| float progress = 0.0f; | float progress = 0.0f; | ||||
| ED_preview_ensure_dbase(); | ED_preview_ensure_dbase(); | ||||
| ip.bmain = bmain; | ip.bmain = CTX_data_main(C); | ||||
| ip.scene = scene; | ip.scene = scene; | ||||
| ip.depsgraph = depsgraph; | ip.depsgraph = CTX_data_ensure_evaluated_depsgraph(C); | ||||
| ip.owner = BKE_previewimg_id_ensure(id); | ip.owner = BKE_previewimg_id_ensure(id); | ||||
| ip.id = id; | ip.id = id; | ||||
| /* Control isn't given back to the caller until the preview is done. So we don't need to copy | /* Control isn't given back to the caller until the preview is done. So we don't need to copy | ||||
| * the ID to avoid thread races. */ | * the ID to avoid thread races. */ | ||||
| ip.id_copy = duplicate_ids(id, true); | ip.id_copy = duplicate_ids(id, true); | ||||
| icon_preview_add_size(&ip, rect, sizex, sizey); | icon_preview_add_size(&ip, rect, sizex, sizey); | ||||
| ▲ Show 20 Lines • Show All 159 Lines • Show Last 20 Lines | |||||