__init__.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:ToolPlus 作者: mkbreuer 项目源码 文件源码
def update_panel_position_custom(self, context):
    try:
        bpy.utils.unregister_class(VIEW3D_TP_Custom_Panel_UI)        
        bpy.utils.unregister_class(VIEW3D_TP_Custom_Panel_TOOLS)

    except:
        pass

    try:
        bpy.utils.unregister_class(VIEW3D_TP_Custom_Panel_UI)
    except:
        pass

    if context.user_preferences.addons[__name__].preferences.tab_location_custom == 'tools':

        VIEW3D_TP_Custom_Panel_TOOLS.bl_category = context.user_preferences.addons[__name__].preferences.tools_category_custom

        bpy.utils.register_class(VIEW3D_TP_Custom_Panel_TOOLS)

    if context.user_preferences.addons[__name__].preferences.tab_location_custom == 'ui':
        bpy.utils.register_class(VIEW3D_TP_Custom_Panel_UI)

    if context.user_preferences.addons[__name__].preferences.tab_location_custom == 'off':
        pass



# AddonPreferences #####################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号