You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Changing a costume's type (SVG <-> bitmap) while editing it does not work as expected. The original costume is not changed. When changing from bitmap to SVG the newly created costume is appended at the end of the list of costumes of the sprite. When changing from SVG to bitmap the newly created costume will only be selected as the active one (the sprite will "wear" it), but the new costume is not added to the available costumes of the sprite.
What could to be done to fix that:
When a costume's type changes while editing, a new costume (Costume or SVG_Costume) is already created. But the old costume should also be removed from the sprite's costumes.
The newly created costume should be added with the old name at the position in the costumes' array of the old costume.
The text was updated successfully, but these errors were encountered:
I have a fix in my fork of Snap. But I guess my work needs a review/some feedback for further refinement before you would accept a pull request. Who can do that?
Let me give you an idea what I have been doing:
One of the problems was the asymmetric handling of bitmap and vector costumes. The vector costume was created by the bitmap editor when changing to vector type. But at this place the context of the editing (new sprite or new costume or edit existing costume) is not known. The existing callbacks only worked for some use cases (actually only for creating a new costume).
So I decided to create all editor callbacks in the gui events, where the context is known. When the costume type is changed inside an editor, the callbacks are just forwarded to the new editor. To allow this, it was also necessary to generate the costume after editing (from the data sent to the callback by the editor).
Changing a costume's type (SVG <-> bitmap) while editing it does not work as expected. The original costume is not changed. When changing from bitmap to SVG the newly created costume is appended at the end of the list of costumes of the sprite. When changing from SVG to bitmap the newly created costume will only be selected as the active one (the sprite will "wear" it), but the new costume is not added to the available costumes of the sprite.
What could to be done to fix that:
The text was updated successfully, but these errors were encountered: