Fix #104707: FBX edge creases fail to be imported/exported #104709

Merged
Bastien Montagne merged 1 commits from Mysteryem/blender-addons:fbx_update_edge_crease_pr2 into main 2023-06-21 15:46:51 +02:00
Member

The MeshEdge.crease API has been removed in 4.0, replaced with the
"crease_edge" attribute and the Python defined
Mesh.edge_creases/edge_creases_ensure()/edge_creases_remove().

This patch replaces use of the old MeshEdge.crease API with accessing
the "crease_edge" attribute with the Python defined property and
function.

The intention of this patch is not to perform any functional changes
compared to when the older MeshEdge.crease API was used, so while it may
be possible to skip exporting creases when there aren't any, this has
been left as a "todo" comment for now.

The MeshEdge.crease API has been removed in 4.0, replaced with the "crease_edge" attribute and the Python defined Mesh.edge_creases/edge_creases_ensure()/edge_creases_remove(). This patch replaces use of the old MeshEdge.crease API with accessing the "crease_edge" attribute with the Python defined property and function. The intention of this patch is not to perform any functional changes compared to when the older MeshEdge.crease API was used, so while it may be possible to skip exporting creases when there aren't any, this has been left as a "todo" comment for now.
Thomas Barlow added 1 commit 2023-06-20 19:11:18 +02:00
eb2a18f2a0 Fix #104707: FBX edge creases fail to be imported/exported
The MeshEdge.crease API has been removed in 4.0, replaced with the
"crease_edge" attribute and the Python defined
Mesh.edge_creases/edge_creases_ensure()/edge_creases_remove().

This patch replaces use of the old MeshEdge.crease API with accessing
the "crease_edge" attribute with the Python defined property and
function.

The intention of this patch is not to perform any functional changes
compared to when the older MeshEdge.crease API was used, so while it may
be possible to skip exporting creases when there aren't any, this has
been left as a "todo" comment for now.
Author
Member

This patch is deliberately separate from the other patches that update property access to use the newer attribute equivalents because those are (currently) only performance and future-proofing changes, whereas this is a fix for broken behaviour due to an API change.

After this patch, edge creases access could be updated again at a later date to use some of the common code that would be introduced by #104645.

This patch is deliberately separate from the other patches that update property access to use the newer attribute equivalents because those are (currently) only performance and future-proofing changes, whereas this is a fix for broken behaviour due to an API change. After this patch, edge creases access could be updated again at a later date to use some of the common code that would be introduced by https://projects.blender.org/blender/blender-addons/pulls/104645.
Thomas Barlow requested review from Bastien Montagne 2023-06-20 19:26:58 +02:00
Bastien Montagne approved these changes 2023-06-21 15:46:36 +02:00
Bastien Montagne merged commit fde8af8659 into main 2023-06-21 15:46:51 +02:00
Bastien Montagne deleted branch fbx_update_edge_crease_pr2 2023-06-21 15:46:53 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#104709
No description provided.