Skip to content

Provide access to UV indices data as used by many FBX files - #9

Open
techvd wants to merge 1 commit into
popomore:mainfrom
techvd:main
Open

Provide access to UV indices data as used by many FBX files#9
techvd wants to merge 1 commit into
popomore:mainfrom
techvd:main

Conversation

@techvd

@techvd techvd commented May 18, 2026

Copy link
Copy Markdown

UV data can be indexed in some FBX files.
This patch exposes the underlying vertex_uv.indices data via uv_indices property.

Tested the fix using local FBX files (the Digital Emilly FBX is a good example of using indexed UV format).

Summary by CodeRabbit

  • New Features
    • Added uv_indices property to the Mesh class, enabling retrieval of per-vertex UV index data as a NumPy uint32 array view when available.

Review Change Stack

This patch exposes the underlying vertex_uv.indices data via uv_indices property.
@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 5d522bd0-c14f-4359-9592-4d88654e29e6

📥 Commits

Reviewing files that changed from the base of the PR and between fb5c7fa and 8bd5105.

📒 Files selected for processing (3)
  • ufbx/_ufbx.pyx
  • ufbx/src/ufbx_wrapper.c
  • ufbx/src/ufbx_wrapper.h

📝 Walkthrough

Walkthrough

This PR introduces UV index access for meshes in the ufbx-python library. A new C wrapper function retrieves UV index data from mesh structures, and a corresponding Python property exposes this as a NumPy array, following the same validation pattern as other mesh accessors.

Changes

UV Indices Mesh Accessor

Layer / File(s) Summary
C wrapper function
ufbx/src/ufbx_wrapper.h, ufbx/src/ufbx_wrapper.c
New ufbx_wrapper_mesh_get_uv_indices function declared and implemented with null/feature validation and count output.
Python property binding
ufbx/_ufbx.pyx
Cython extern declaration and Mesh.uv_indices property that returns UV indices as a uint32 NumPy array view or None, guarded by scene-closed check.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A mesh now shows its UV secrets bright,
Indices arranged in arrays tight,
From C to Python, data flows with care,
NumPy wraps the texture coordinates there!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: exposing UV indices data from FBX files through a new property/API, which is the primary objective of this pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant