GraphiteEditor / Graphite

2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow.
https://graphite.rs
Apache License 2.0
7.76k stars 408 forks source link

Folder issues in example artwork #1721

Closed Tiger3018 closed 3 months ago

Tiger3018 commented 6 months ago

In https://github.com/GraphiteEditor/Graphite/pull/1719#issuecomment-2029068825, two weird behavior appeared in Just a Potted Cactus and Valley of Spires:

Other two example artwork, newly (master branch) saved document didn't affected.

Keavon commented 6 months ago

This is just an issue with those two demo artwork files. For context, whenever we break the file format, we have to manually go through all the demo artwork files and edit the JSON to upgrade the format.

You'll need to format it to be readable, in VS Code do Ctrl+Shift+P > "Format Document With" > JSON Language Features. Then make your edits. Then when it's all fixed, open the formatted file in Graphite and re-save it from Graphite to get the condensed formatting back so it's all on one line again.

Tiger3018 commented 5 months ago

For first issue (the select status of copied empty folder(s) will gone when pasting/moving and its parent changes): Can't reproduce.

For every document and every layer/folder pasting, two status:

  1. When the destination folder is not expanded, after expanding the destination, the select status is still there visible.
  2. When the destination folder is expanded, the select status is just there.

So the status 1 might be confusing and misleading the user, but not a bug. Shall we expanding the destination folder automatically?

Tiger3018 commented 5 months ago

For second issue (when grouping layers, it will split items to two folders): Not all layer affected in the mentioned demo artwork. Only folders with its input[0](children) as a artboard_layer, rather than the desired ordinary_layer are affected.

It means undefined behaviors occur and no error-catching here:

  1. Folders' input[0] as a artboard_layer. These problematic folders will become an empty layer once no ordinary_layer in it.
  2. When 1 appears and doing "group into folder" or doing "resorting", all siblings are placed into a problematic folder again.

_(Update) Is there any ways to create Folders' input[0] as a artboardlayer?

I didn't figure out.

However, the demo artwork's not-desired artboard_layer are all Transform, and by accessing the corresponding folder in both the top-right node graph and the layers widget window, you can find the properties not found in other folder.

Maybe a legacy feature?

IMG_20240405_002914_271