blender4.2 插件安装 auto-rig 报错'bpy.app' object has no attribute 'version_char' 解决方案

 

找到安装的插件位置的version.py 文件

我的在  "C:\Users\zyz\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons\auto_rig_pro-master\src\lib\version.py"

可以参考一下

 

修改代码第8行的代码,

#_char = bpy.app.version_char
_char = getattr(bpy.app, 'version_char', '')

下面是修改后的样子

 

import bpy
import addon_utils                  

class ARP_blender_version:
    _string = bpy.app.version_string
    blender_v = bpy.app.version
    _float = 0.0
     #_char = bpy.app.version_char
    _char = getattr(bpy.app, 'version_char', '')
    
    def __init__(self):
        str = ''.join([i for i in self._string if i in '0123456789'])#int(_string.replace('.', ''))#blender_v[0]*100+blender_v[1]+blender_v[2]*0.01
        self._float = float(str)
        if len(str) > 3:# hu! some version are defined as '3.00', some as '2.93.9'
            self._float = float(str)/10

 保存点击按钮激活插件就不报错了

 

posted on 2024-10-25 12:00  zyz913614263  阅读(115)  评论(0编辑  收藏  举报

导航