Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Imported image position modified by canvas view center #1177

Closed
Jose-Moreno opened this issue Feb 12, 2019 · 4 comments
Closed

Imported image position modified by canvas view center #1177

Jose-Moreno opened this issue Feb 12, 2019 · 4 comments
Assignees
Labels
Camera Enhancement UX Related to the way users interact with the program
Milestone

Comments

@Jose-Moreno
Copy link
Member

Issue Summary

The problem here is that when importing any image, these images are not positioned relative to the canvas absolute center, but relative to the view center, so if you pan outside the camera viewfinder the image will be placed exactly in the center of the view on canvas, but outside the initial camera view state, which for all intents and purposes represents the actual canvas that will be seen (unless there is camera motion).

I'd like to propose that the images are placed based on a selected camera layer viewspace (remember we can have more than 1 camera) to import these drawings.

This option should require enhancing the image import dialogs to allow the canvas placement of any given image be relative to any selected camera layer, provided we have more than one. This also to maintain conceptual consistency and flexibility in the same way image and movie export dialogs are currently based on the camera finder (with camera selector and all).

This is not really a critical bug, but more like something that can throw people off if it's not understood. The current workaround is simply to reset the view every time you want to import a still image or image sequence.

Expected Results

When having only one camera, the image should be appropriately placed in the middle of and relative to the active camera view. If the camera is hidden, then place the image in the absolute center of the canvas.

If there is more than one camera, allow the user to select which camera should be used to base the image location. In a sense the camera becomes a parent of the image only for import purposes.

Steps to reproduce

  1. Create a new pencil2d file
  2. Import any image on the default state for comparison. For my tests I used TIFF image files.
  3. Pan the view away from the current image
  4. Import another image, can be the same as used before. Note the difference in placement as the previous one.

System Information

  • Pencil2D Version:

Version: 0.6.2
commit: fe450b7
date: 2019-02-05_13:58:04
Development build
Operating System: Windows 7 SP 1 (6.1)
CPU Architecture: x86_64

@Jose-Moreno Jose-Moreno added Enhancement UX Related to the way users interact with the program Camera import-export labels Feb 12, 2019
@davidlamhauge
Copy link
Contributor

@Jose-Moreno I think it is confusing if you can "...allow the user to select which camera should be used to base the image location."
The images should at all times be imported to the absolute center of the canvas.
We should on the other hand give the user the possibility to move selected drawings to another position, whether or not they are imported or drawn in Pencil2D.

@Jose-Moreno
Copy link
Member Author

@davidlamhauge I understand what you mean, and I agree that the import should be done relative to the camera, but bear in mind that you can have multiple cameras in a single pencil2d document. So that particular suggestion was for the possibility that the active camera (or one that the user actively choose) will import the image relative to the center, and the active camera may not necessarily be the one pointing to the canvas center.

I don't see it as something difficult to understand. In the movie exporter you have a list of cameras to choose from to export the video. In that sense the importer could have the same camera list as the exporter.

The code to make the import be centered wouldn't change because of that.

@davidlamhauge
Copy link
Contributor

I have often been irritated when imported images are placed in the current view, because I forgot to reset view before importing.
I'll take a look at this, and assign it to myself.

@davidlamhauge davidlamhauge self-assigned this Oct 4, 2019
MrStevns pushed a commit that referenced this issue Nov 9, 2019
MrStevns pushed a commit that referenced this issue Dec 9, 2019
#1177 Added possibilities for import positions
@Jose-Moreno
Copy link
Member Author

I'm closing this as the solution provided by #1297 fits the bill and helps to choose the position for imported images and image sequences nicely.

I'll open a new issue for clipboard content however which should either default to the camera relative position or administer a similar widget as that of the image imports.

@Jose-Moreno Jose-Moreno added this to the 0.6.5 milestone Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Camera Enhancement UX Related to the way users interact with the program
Projects
None yet
Development

No branches or pull requests

2 participants