Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/CMakeLists.txt4
-rw-r--r--source/blender/editors/space_image/image_buttons.c1
-rw-r--r--source/blender/editors/space_image/image_ops.c6
3 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt
index 7c2d7ffb47b..0d4408faf49 100644
--- a/source/blender/editors/space_image/CMakeLists.txt
+++ b/source/blender/editors/space_image/CMakeLists.txt
@@ -23,13 +23,13 @@ set(INC
../include
../../blenfont
../../blenkernel
- ../../blenloader
../../blenlib
+ ../../blenloader
../../imbuf
../../makesdna
../../makesrna
- ../../windowmanager
../../render/extern/include
+ ../../windowmanager
../../../../intern/guardedalloc
)
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 25d4c023d47..ab008296092 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -806,6 +806,7 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
col= uiLayoutColumn(split, 1);
uiItemR(col, &imaptr, "generated_width", 0, "X", ICON_NONE);
uiItemR(col, &imaptr, "generated_height", 0, "Y", ICON_NONE);
+ uiItemR(col, &imaptr, "use_generated_float", 0, NULL, ICON_NONE);
uiItemR(split, &imaptr, "generated_type", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
}
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 304a01db59b..34d62f35aa5 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -502,7 +502,7 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
Scene *scene;
Object *obedit;
Image *ima;
- float size, min[2], max[2], d[2];
+ float size, min[2], max[2], d[2], aspx, aspy;
int width, height;
/* retrieve state */
@@ -513,6 +513,10 @@ static int view_selected_exec(bContext *C, wmOperator *UNUSED(op))
ima= ED_space_image(sima);
ED_space_image_size(sima, &width, &height);
+ ED_image_aspect(ima, &aspx, &aspy);
+
+ width= width*aspx;
+ height= height*aspy;
/* get bounds */
if(!ED_uvedit_minmax(scene, ima, obedit, min, max))