When using an empty render result (after re-opening the file, i.e.)
some tools (like masking) could have used wrong image resolution
because of not being aware of special cases supported by the image
space to display the render result.
This should fix selecting mask points when mask is opened op top
if an empty render result.
*width = ibuf->x;
*height = ibuf->y;
}
*width = ibuf->x;
*height = ibuf->y;
}
+ else if (image->type == IMA_TYPE_R_RESULT && iuser != NULL && iuser->scene != NULL) {
+ Scene *scene = iuser->scene;
+ *width = (scene->r.xsch * scene->r.size) / 100;
+ *height = (scene->r.ysch * scene->r.size) / 100;
+ if ((scene->r.mode & R_BORDER) && (scene->r.mode & R_CROP)) {
+ *width *= BLI_rctf_size_x(&scene->r.border);
+ *height *= BLI_rctf_size_y(&scene->r.border);
+ }
+ }
else {
*width = IMG_SIZE_FALLBACK;
*height = IMG_SIZE_FALLBACK;
else {
*width = IMG_SIZE_FALLBACK;
*height = IMG_SIZE_FALLBACK;