Skip to content

Adapt to blender5.0#118

Open
mayloglog wants to merge 34 commits into
johnzero7:masterfrom
mayloglog:master
Open

Adapt to blender5.0#118
mayloglog wants to merge 34 commits into
johnzero7:masterfrom
mayloglog:master

Conversation

@mayloglog
Copy link
Copy Markdown

No description provided.

mayloglog and others added 30 commits February 25, 2025 12:47
By removing functions that are not supported by blender 4.4, the plugin can be adapted to blender 4.4.
**Performance Optimization:** Upgraded the method for importing UV and vertex color data to use **`foreach_set` for batch assignment**, resulting in a significant performance boost for large models.
 **性能优化:** 升级了 UV 和顶点颜色的数据导入方式,改用 **`foreach_set` 批量赋值**,显著提升了导入大型模型的性能。
Changed default material transparency mode from Blended to Dithered (Hashed).
We have switched the default export format to ASCII and disabled the binary XPS option due to persistent compatibility bugs. ASCII is highly reliable and should work seamlessly for everyone. I am still working on my technical skills and haven't found a permanent fix for the binary issue yet—if anyone in the community can help, I would greatly appreciate a code submission on GitHub. Thanks for sticking with me!
Fix the issue of incorrect actions in exported pose files caused by axial matching problems.
OBJ export function refactored to use Blender's official C++ OBJ exporter, significantly improving compatibility and stability
Support for exporting XPS format bone data (.arl files)
Support for adding bw and vc lines in OBJ files to store vertex bone weight information and vertex colors
Completely resolved the RuntimeError caused by illegal operations on armature.data.collections in EDIT mode, which previously caused significant slowdowns in import speed.
## 问题分析
在 import_xnalara_model.py 中,当启用 joinMeshRips 选项时,顶点会根据坐标和法线进行合并。但代码存在一个关键错误:

1. 顶点合并过程 : processVertices 函数生成了 vertexDict (原始索引→合并后索引的映射)和 mergedVertexList (合并后的顶点列表)
2. 网格创建 :使用 mergedVertexList 创建 Blender 网格,所以 Blender 中的顶点索引是合并后的索引
3. 权重分配 : makeVertexGroups 函数被调用时传入的是 原始 顶点列表 meshInfo.vertices ,导致权重被分配到错误的顶点上
## 修复方案
修改了两个函数:

1. setupMaterialAndRigging :添加了 mergedVertexList 参数,并传递给 makeVertexGroups
2. importMesh :调用 setupMaterialAndRigging 时传入 mergedVertexList
这样权重就会正确地分配到合并后的顶点上,修复了权重结果不正确的问题。

修复涉及的文件:

- import_xnalara_model.py:591 - 修改函数签名
- import_xnalara_model.py:625 - 更新函数调用
修复权重合并问题
mayloglog and others added 4 commits May 11, 2026 11:08
* AI修复权重错误问题

## 问题分析
在 import_xnalara_model.py 中,当启用 joinMeshRips 选项时,顶点会根据坐标和法线进行合并。但代码存在一个关键错误:

1. 顶点合并过程 : processVertices 函数生成了 vertexDict (原始索引→合并后索引的映射)和 mergedVertexList (合并后的顶点列表)
2. 网格创建 :使用 mergedVertexList 创建 Blender 网格,所以 Blender 中的顶点索引是合并后的索引
3. 权重分配 : makeVertexGroups 函数被调用时传入的是 原始 顶点列表 meshInfo.vertices ,导致权重被分配到错误的顶点上
## 修复方案
修改了两个函数:

1. setupMaterialAndRigging :添加了 mergedVertexList 参数,并传递给 makeVertexGroups
2. importMesh :调用 setupMaterialAndRigging 时传入 mergedVertexList
这样权重就会正确地分配到合并后的顶点上,修复了权重结果不正确的问题。

修复涉及的文件:

- import_xnalara_model.py:591 - 修改函数签名
- import_xnalara_model.py:625 - 更新函数调用

* 修复闭合问题
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