Blender Object 的 name 字段不是 string

之前在获取 object 的 name 之后直接当作 string,对他调用 string 的函数,结果导致了 blender 崩溃,完全不知道哪错了

后面发现 object 的 name 字段似乎不是 string,需要先转到 string

感觉 blender 这点不好,调用了错误的函数之后就直接崩溃了......

python 复制代码
import bpy 

for obj in bpy.data.collections['FluidMesh'].all_objects:
    mesh_name = str(obj.name) # object.name is not string 
    mesh_name = mesh_name.replace("frame_", "")
    i = int(mesh_name)
    
    ...

Blender 版本 4.0.2

相关推荐
njsgcs1 小时前
No module named ‘io_scene_psk_psa‘解决办法,用4.3版本的
blender
Nan_Shu_61412 小时前
学习: Blender 粒子篇
学习·blender
Nan_Shu_61412 小时前
学习: Blender 场景灯光篇
学习·blender
SHeqSpMeS1 天前
WPF联合Halcon模板外形匹配技术探索
blender
CG_MAGIC1 天前
法线贴图常见问题:修复与烘焙适配全方案
3d·blender·贴图·zbrush·建模教程·渲云渲染
njsgcs2 天前
poll() Missing ‘window‘ in context File解决办法 blender插件开发
blender
AI视觉网奇4 天前
blender 视角调整技巧
blender
AI视觉网奇4 天前
blender 导入fbx 黑色骨骼
学习·算法·ue5·blender
IqfQZrhA5 天前
基于cruise的燃料电池功率跟随仿真,按照丰田氢能源车型搭建,在wltc工况下跟随效果好,最...
blender
Nan_Shu_6146 天前
学习: Blender 基础篇
学习·blender