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:
authorAntony Riakiotakis <kalast@gmail.com>2012-07-31 18:01:28 +0400
committerAntony Riakiotakis <kalast@gmail.com>2012-07-31 18:01:28 +0400
commit966d54d07df02c72b6c94e0e6e7c07c10d20389a (patch)
tree0133de4c4681eaa6d6d6a5a38852779b9f39fcde /source/blender/editors/screen
parentff8441dcd7a248df9e3562971f9d25fd4c22a973 (diff)
parente7e7972cd6b9bc22b4378b19db0b796ffd56fbb8 (diff)
merge with trunk 49411
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/glutil.c4
-rw-r--r--source/blender/editors/screen/screen_ops.c45
2 files changed, 34 insertions, 15 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index 0f1ffb856e7..5296c8615ab 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -624,8 +624,8 @@ void glaDrawPixelsSafe(float x, float y, int img_w, int img_h, int row_w, int fo
* covers the entire screen).
*/
glGetFloatv(GL_SCISSOR_BOX, scissor);
- draw_w = MIN2(img_w - off_x, ceil((scissor[2] - rast_x) / xzoom));
- draw_h = MIN2(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom));
+ draw_w = mini(img_w - off_x, ceil((scissor[2] - rast_x) / xzoom));
+ draw_h = mini(img_h - off_y, ceil((scissor[3] - rast_y) / yzoom));
if (draw_w > 0 && draw_h > 0) {
int old_row_length = glaGetOneInteger(GL_UNPACK_ROW_LENGTH);
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index e9b2873b2cc..6217c5940f5 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -65,15 +65,16 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_util.h"
+#include "ED_armature.h"
+#include "ED_clip.h"
#include "ED_image.h"
-#include "ED_screen.h"
+#include "ED_keyframes_draw.h"
#include "ED_object.h"
-#include "ED_armature.h"
+#include "ED_screen.h"
#include "ED_screen_types.h"
-#include "ED_keyframes_draw.h"
+#include "ED_sequencer.h"
+#include "ED_util.h"
#include "ED_view3d.h"
-#include "ED_clip.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -458,9 +459,29 @@ int ED_operator_editmball(bContext *C)
int ED_operator_mask(bContext *C)
{
- SpaceClip *sc = CTX_wm_space_clip(C);
+ ScrArea *sa = CTX_wm_area(C);
+ if (sa && sa->spacedata.first) {
+ switch (sa->spacetype) {
+ case SPACE_CLIP:
+ {
+ SpaceClip *sc = sa->spacedata.first;
+ return ED_space_clip_check_show_maskedit(sc);
+ }
+ case SPACE_SEQ:
+ {
+ SpaceSeq *sseq = sa->spacedata.first;
+ Scene *scene = CTX_data_scene(C);
+ return ED_space_sequencer_check_show_maskedit(sseq, scene);
+ }
+ case SPACE_IMAGE:
+ {
+ SpaceImage *sima = sa->spacedata.first;
+ return ED_space_image_check_show_maskedit(sima);
+ }
+ }
+ }
- return ED_space_clip_check_show_maskedit(sc);
+ return FALSE;
}
/* *************************** action zone operator ************************** */
@@ -2172,12 +2193,10 @@ static int keyframe_jump_exec(bContext *C, wmOperator *op)
ob_to_keylist(&ads, ob, &keys, NULL);
{
- SpaceClip *sc = CTX_wm_space_clip(C);
- if (sc) {
- if ((sc->mode == SC_MODE_MASKEDIT) && sc->mask) {
- MaskLayer *masklay = BKE_mask_layer_active(sc->mask);
- mask_to_keylist(&ads, masklay, &keys);
- }
+ Mask *mask = CTX_data_edit_mask(C);
+ if (mask) {
+ MaskLayer *masklay = BKE_mask_layer_active(mask);
+ mask_to_keylist(&ads, masklay, &keys);
}
}