Pencil: Bug duplicating frames

Created on 6 Jan 2016  路  17Comments  路  Source: pencil2d/pencil

This is a tricky one.

1, Draw an object (bitmap layer)

  1. use the select tool and mark a part of the object
  2. use the move tool to move that part of the object a bit to the side
  3. click outside the object on a blank space of the drawing area
    so that the dotted frame around the object disappear. (Noting selected)
  4. click duplicate frame, and nothing is duplicated ( point 4 is maybe the cause of this?)

Tested in build from today (6:th of January 2016,Windows 10 32-bit)

Bug

All 17 comments

Nice one @ManuAros ! :) Cheers!

I ran into this. If you duplicate the frame you can immediately use the move command which might come in handy. If you hit the escape key, the frame goes away you can draw and hit the F6 key and duplication is ok. If's not a bug.... It's a feature ;) Just thinking out loud seems like there would be instances where want to duplicate a frame and move it slightly and other instances where you want to continue drawing on duplicated frame. It would be nice to be able to reduce the keystrokes for the user.

Just thinking about this some more.. Is there a use case where the selection box should be visible when use any of the drawing tools?

I agree that when you duplicate a frame and you already have a selection box around your frame/object it makes it easier to for example doing the animation if your have a object that moves around, so no bad in this. My problem was only that I noticed that you could end up duplicating "nothing" so that must be something going on there.

I personally don't see what use the selection box is if your next tool is pen/pencil etc. maybe just to mask out the region you edit. But for me that is not useful not for drawing tools only transformation tools.

@ManuAros I propose this behavior.
When you press the F6 key what ever drawing tool was selected on the previous screen should be the one active on the next screen.
For example if you have the move tool selected, you be able to move, rotate, or scale the image in the next frame
(There is another bug that needs to be fixed before this, the move tool should only be enabled once only when a selection is visible, and disabled when there is no selection.)
If you are using the pencil tool F6 should have the pencil tool(or which ever drawing tool was selected) in the new frame.

@JonasThomas
That sounds reasonable, I agree.

There was a bug within the select tool where you could have an empty area selected (size == 0). Duplicating a frame would duplicate the empty erea, and result in duplicating nothing at all.

I fixed this bug in this pull request https://github.com/pencil2d/pencil/pull/447

@feeef I pulled https://github.com/pencil2d/pencil/pull/447 to my laptop to give it a test against the conditions mentioned in Issue 412 (this issue)

I tested steps 1-5 and everything seemed to work although I do have one observation that should be a new issue.

@ManuAros says that he clicked outside the box to make the frame dissappear.
When the F6 is pressed the entire frame is copied to the new frame which now the fixed behavior. Once this is change is pushed to the master I think ManuAros should confirm

My observation is that when the new frame appears there is a selection box already selected. (In my opinion if nothing was selected in the old frame nothing would be selected in the new frame.

Here my rational:
If I was drawing grass growing, I would want to keep pressing F6 and add some more grass in each new frame.

If I wanted to draw a ball flying through the air, I would want to have the selection box selected press F6 and have the ball duplicated and selected so I could move it a bit and then press the F6 so I can move it some more. (This doesn't happen)
(Assuming this request hasn't been made, I was planning I record a video for each of these issues.

@JonasThomas Yes, I will confirm. I'll try to repeat what I tried to do and se how it goes as soon as I can build myself the bugfixed version. Thanks again devs for looking into this.

@JonasThomas Can this be closed?

I don't know if we should call it a bug or not but it's still possible to duplicate a empty frame if you do it like steps 1-5. It won't happen every time though. I guess it happens when you have a selection and you click once outside the selection (just toget rid of what's selected). Question is should duplicate frame even take the selection into account at all ? Because it's purpose is to duplicate the frame no matter what is selected or do you think otherwise?

I can't replicate the issue anymore, the content of the frame is being duplicated everytime. except when you have something selected, then the selection will only get duplicated.

Question is should duplicate frame even take the selection into account at all ? Because it's purpose is to duplicate the frame no matter what is selected or do you think otherwise?

it shouldn't no, a new action would be better in that case.

@CandyFace I actually think it's expected behaviour in many programs. Because duplicate is sort of a modifier. So if you select one frame, you will duplicate 1 frame. But If you select 20 frames, you should be allowed to duplicate 20 frames. Or else you'd had to go 1 by 1 to duplicate those 20 frames.

Imagine you wanted to repeat 400 frames for artistic purposes....No way i'm going to duplicate those one by one.

@Jose-Moreno I was referring to a selection done on the canvas (I think that's what @ManuAros is talking about too) It sounds like you mean a selection of multiple frames in the timeline, which I agree should be possible.
duplicate

I think the expected behaviour here should be a 100% identical clone of the frame, even when something is selected.

if I wanted to copy or duplicate a selection, I would have looked in the edit tab or something.

if you still think that it should be possible, then fair enough.

@CandyFace Hmm, I see, it seems I misread his original intention with the comment; I have yet to file the feature request of allowing multiple frames duplication :stuck_out_tongue_closed_eyes:

Regarding this bug, although it feels natural, I agree with you that duplicating the frame while having an element selected should still duplicate the whole frame, because that's its function. If we want to "duplicate" the selection content we have copy & paste operations for that. It comes down to preference I think, although I can't find any particular example where it would be more useful than a copy & paste operation. The only benefit is that it's only one operation, as opposed to the two-step involved with copy-paste.

I'm on this

Fixed in 7 Dec 2017 nightly build.

Was this page helpful?
0 / 5 - 0 ratings