Inochi2D / inochi-creator

Inochi2D Rigging Application
BSD 2-Clause "Simplified" License
795 stars 44 forks source link

[Feature Request] Merge some Meshes in a MeshGroup Upon Export #375

Open mechPenSketch opened 1 month ago

mechPenSketch commented 1 month ago

Validations

Description

I separate lines and fills into different layers so that the future, if I want to update either, the other would not be affected in the process.

Each of the layers are added as a Mesh. I then created a MeshGroup and added them in as its children.

When I export my puppet, the two layers take up separate spaces on the atlas screen. If there is a way to lay the line layer onto the fill layer, that would save space.

Suggested solution

For every Mesh in a MeshGroup, if the mesh does not have any vertices, they will merge in the atlas by default.

Alternative solution

I have few other ideas on this:

  1. Add an option to merge 2 Meshes into one (see below).
  2. Add a slow importing option, where you can select which group layers and/or regular layers from .psd or .kra should be added as a single Mesh node.
    • This can be reserved for another request.
  3. Let a Mesh take more than one texture as Albedo.
  4. Create a seperate .kra/.psd file where the lines and fills are merged.

Additional Context

mechPenSketch commented 1 month ago

I think Solution 2 is the best, so I'll be elaborating on that:

mechPenSketch commented 1 month ago

To help me find igButton(...), I've decided to open Visual Studios. I haven't used it for a long time, so I brought it up to date, even accounting for CMake and DLang. However, there are syntax errors in the code, so vs can't go to where igButton(...) is defined.

To start, I want to look at lines 22 and 24 in source/app.d:

import inochi2d; // Error: can only import from a module, not from package inochi2d.inochi2d
....
import il18n; // Error: can only import from a module, not from package il18n.il18n

The root problem is that there are no files whose modules is inochi2d or il18n. No inochi2d.d or il18n.d in the folder containing app.d, nor inochi2d.d or il18n.d folders containing package.d.

I've opened up the project by local folder. Is there any steps I've missed out?


I've switch to vs code. Apparantly, it's undocumented, but binding to C.


I've cross-referred with creator.viewport.vertex's void incViewportVertexConfirmBar(). Looks like igButton(...) generates a button in the process while checking whether it's pressed.