Page MenuHome

Fan Yang (rav66)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 14 2015, 8:42 AM (383 w, 1 h)

Recent Activity

May 6 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

Paste updated. I've tested border-zoom in and out in image view which looks good. Still haven't deal with the key confict mentioned in the description.
https://developer.blender.org/P355

May 6 2016, 4:11 AM · Good First Issue
Fan Yang (rav66) edited P355 T48124.
May 6 2016, 4:09 AM

May 5 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

I've taken a look into zoom out from 'view2d' which uses 'RNA_int_get(op->ptr, "gesture_mode")' to get the gesture. In view2d it returns 'GESTURE_MODAL_IN' with LMB border select and 'GESTURE_MODAL_OUT' with MMB, but in my 'image_view_zoom_border_exec', it returns 'GESTURE_MODAL_SELECT' with LMB border select and 'GESTURE_MODAL_DESELECT' with MMB border select.
Another question is, '&ar->v2d' holds a 'cur' value which's said to be the current viewable region in the wiki, but it seems to be very different in image space and view2d, so what's the cur's unit and how is the region's coordinate defined?

May 5 2016, 9:30 AM · Good First Issue

May 4 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

Paste updated. I've tested border-zoom in image view which looks good. I haven't deal with the key confict mentioned in the description.

May 4 2016, 10:42 AM · Good First Issue
Fan Yang (rav66) edited P355 T48124.
May 4 2016, 10:37 AM
Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

Sorry for the inconvenience. Here's the diff.
https://developer.blender.org/P355

May 4 2016, 7:45 AM · Good First Issue
Fan Yang (rav66) edited P355 T48124.
May 4 2016, 7:42 AM
Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

I added two functions in 'image_ops.c', also the keymap and header. It could triger the border select cross, but whichever key(LMB, RMB, ESC) I pressed, there was no effect.
Here's the two function I added.

static int image_view_zoom_border_exec(bContext *C, wmOperator *op)
{	
	SpaceImage *sima;
	ARegion *ar;
May 4 2016, 5:14 AM · Good First Issue

Apr 29 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

The question here is I can't find any border zoom implementation in other spaces except in 'view2d' and 'view3d', so I wonder that how these spaces have this function while some spaces like 'text space' doesn't. Maybe I need to get more familiar with the code base in case that I miss something.
By the way, if anyone can get this done, I'm happy to learn.

Apr 29 2016, 4:36 AM · Good First Issue

Apr 28 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

@Campbell Barton (campbellbarton). I'm trying to figure out the implementation by checking the event handle process. What I have in mind is that the image editor should use the "view2d" to handle "zoom to border" event. I try to look into how other editors(e.g. sequencer) implement this feature. I think that the "ED" function and "main region" functions handle this. I know the keymap can be added by adding "ED_KEYMAP_VIEW2D" to the flag, which can handle the shortcut input. But the zoom function needs other implementation which I lost track of. Could you give me some advice on this, like which files or functions I can refer to?

Apr 28 2016, 3:11 AM · Good First Issue

Apr 27 2016

Fan Yang (rav66) added a comment to T48124: Add Box Zoom to UV/Image Editor.

Hello. I'm trying to fix the conflict by simply comment out the "pinned" shortcut as below. But "zoom to border" still dosen't work. What am I missing here?

Apr 27 2016, 4:46 AM · Good First Issue