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

Open
Jose-Moreno opened this Issue Feb 12, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Jose-Moreno
Copy link
Member

Jose-Moreno commented Feb 12, 2019

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

@davidlamhauge

This comment has been minimized.

Copy link
Contributor

davidlamhauge commented Mar 21, 2019

@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

This comment has been minimized.

Copy link
Member Author

Jose-Moreno commented Mar 21, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.