Aodaruma / coa_tools2

a Blender addon for cutout animation
GNU General Public License v3.0
35 stars 6 forks source link

Improving UV Mapping for auto-generated meshes in coa_tools #15

Closed Aodaruma closed 1 year ago

Aodaruma commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, when editing a mesh with coa_tools and completing the editing process, the add-on automatically performs UV mapping for the generated mesh. However, this process uses bpy.ops.uv.project_from_view, which restricts the created mesh to be within the bounds of the original frame. Consequently, it becomes impossible to create meshes larger than the original frame and apply UV mapping properly.

To enhance the flexibility of the mesh creation workflow, I propose introducing a mechanism that allows UV mapping for meshes regardless of their position. This involves removing the constraint imposed by bpy.ops.uv.project_from_view and instead calculating the UV positions based on the vertex positions.

Describe the solution you'd like To implement this feature, the following changes can be made in edit_mesh.py:

  1. Modify the code to calculate UV positions based on vertex positions rather than using bpy.ops.uv.project_from_view.

  2. Disable limit_cursor_by_bounds to enable placing vertices outside the bounds of the original frame, allowing more freedom in mesh creation.

Aodaruma commented 1 year ago

add features at #16