Skip to content

NiGeometry: HasUVs/HasTangents setters honor value argument#26

Merged
ousnius merged 1 commit intoousnius:mainfrom
MANOLOV02:fix/nigeometry-has-setters
Apr 25, 2026
Merged

NiGeometry: HasUVs/HasTangents setters honor value argument#26
ousnius merged 1 commit intoousnius:mainfrom
MANOLOV02:fix/nigeometry-has-setters

Conversation

@MANOLOV02
Copy link
Copy Markdown
Contributor

Both setters are hardcoded to = true, ignoring the caller's argument. destShape.HasUVs = false and destShape.HasTangents = false were silent no-ops.

This breaks CloneShape's ModelSpace path, which does destShape.HasTangents = false (mirroring C++ NifFile.cpp:1349 bsOptShape->SetTangents(false)) — the assignment never propagated to GeometryData.

C++ reference: nifly/Geometry.cpp:288-292 and :316-320NiShape::SetUVs / NiShape::SetTangents pass enable straight through to geomData->SetUVs(enable) / geomData->SetTangents(enable).

HasNormals and HasVertexColors were already correct; only HasUVs and HasTangents had the typo.

Maps to issue #15 items E12 and E13.

Both setters were hardcoded to `= true`, ignoring the caller's
argument. `destShape.HasUVs = false` and `destShape.HasTangents = false`
were silent no-ops, which broke CloneShape's ModelSpace path: it does
`destShape.HasTangents = false` (mirroring C++ NifFile.cpp:1349
`bsOptShape->SetTangents(false)`) but the assignment never propagated
to GeometryData.

C++ reference: NiShape::SetUVs / NiShape::SetTangents in
Geometry.cpp:288-292 and 316-320 pass `enable` straight through to
`geomData->SetUVs(enable)` / `geomData->SetTangents(enable)`.

HasNormals and HasVertexColors were already correct; only HasUVs and
HasTangents had this typo.
@ousnius ousnius merged commit 3465ba2 into ousnius:main Apr 25, 2026
1 check passed
@MANOLOV02 MANOLOV02 deleted the fix/nigeometry-has-setters branch April 25, 2026 23:42
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.

2 participants