Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Imported image position modified by canvas view center #1177
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.
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
@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."
@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.