这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@davidlamhauge
Copy link
Contributor

This function will make it possible to import images based on the images filenames. This is mainly a feature that is usefull for traditional animators like myself.
Filenames must follow this format: 'prefix' + 'four digits' + 'suffix'.
If you have a layer with the character 'Joe', you could have the following files: 'Joe0001.png', 'Joe0013.png', 'Joe0015.png', 'Joe0017.png' and 'Joe0019.png'. If you import these drawings with the new function 'importImageSequenceNumbered()', you wil get a new layer named 'Joe' (the prefix), and the drawings will be placed at frames 1, 13, 15, 17 and 19.
I like it. I hope you like it too.

@Jose-Moreno
Copy link
Member

@davidlamhauge Excellent! I was missing a proposal like this. I think it will really help traditional animators to get the timing straight from their drawings.

For a future consideration it would be great if this could become integrated with the proposal to handle x-sheet data, that way you wouldn't need to keep track of the drawings themselves while cross referencing with the physical x-sheet but for a bigger production you can have your x-sheet data entered on a spreadsheet for each scene and then allow it to be imported along with the referenced image path so Pencil2D would automatically get them for you in the correct placement (this would be particularly useful for longer sequences and separation of different scenes for digitizing bulk work).

I see this function as groundwork for that, so thank you for taking the time! 🙂

@davidlamhauge
Copy link
Contributor Author

@Jose-Moreno Thanks!
I too see it as a very useful feature, that can be expanded in the way you propose.

  1. You could import all drawings from a spredsheet (csv) into a new scene in Pencil2D, so you had your layers and their drawn/scanned drawings in the right place in the timeline.
  2. You could import one or more layers into an existing scene. This kind of reuse is widely used in the business, and with the possibility to copy, move etc. it would be easy to adjust the imported layer,so it matched the rest of the scene.

@davidlamhauge
Copy link
Contributor Author

I split the function in two, so the actual import is separated from the finding filename.
The new function ('addLayerByFilename(strFilePath)') can now be called from other functions, if necessary.

@davidlamhauge
Copy link
Contributor Author

davidlamhauge commented Oct 17, 2018

While I'm waiting for a decision on how this should be implemented, I've enhanced it a little.
Now you can have any number of digits in the filename. Now it is not only 'Joe0001.png', 'Joe0013.png', 'Joe0015.png', 'Joe0017.png' and 'Joe0019.png', that are valid, but also Joe000001.png', 'Joe000013.png', 'Joe000015.png', 'Joe000017.png' and 'Joe000019.png' or J01.png', 'J13.png', 'J15.png', 'J17.png' and 'J19.png'.
The new rule is that the prefix must be at least one character, the number of digits must be consistent, and the suffixes must be the same.

@Jose-Moreno
Copy link
Member

@davidlamhauge David I have been thinking for a few days. Recently I had to recover the work of another user, and I did this by importing all of their images on each layer but it was painful to select non-sequenced drawings and find their corresponding frame to import them there. I feel this function can help address that problem so users can start recovering work on their own as well.

My question is: Would it be possible to have a way to customize the import rules to be able to quickly import Pencil2D internal naming which is currently saved as PNG files that represent bitmap drawings with layer name as the layer index followed by a separator and then followed by the frame position eg. 004.00001.png -> this would be an internal png that holds the drawing data from the fourth layer in the first frame.

What do you think?

@chchwy chchwy added this to the 0.6.3 milestone Dec 4, 2018
@chchwy chchwy merged commit 82a6c87 into pencil2d:master Dec 4, 2018
@chchwy
Copy link
Member

chchwy commented Dec 4, 2018

Merged. Thanks @davidlamhauge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants