Ejemplo n.º 1
0
def execBrowser(url):
    # always try to run server before starting browers
    # fixes several issues with closed Blender
    AppManagerConn.start(getRoot(), 'BLENDER', True)

    try:
        webbrowser.open(url)
    except BaseException:
        print("Failed to open URL: " + url)
Ejemplo n.º 2
0
def compressLZMA(path, settings):

    if settings['sneak_peek']:
        return

    if not settings['lzma_enabled']:
        return

    AppManagerConn.compressLZMA(path)
Ejemplo n.º 3
0
def register():
    from . import custom_props, custom_ui

    bpy.utils.register_class(V3D_OT_ExportGLTF)
    bpy.utils.register_class(V3D_OT_ExportGLB)

    custom_props.register()
    custom_ui.register()

    bpy.types.TOPBAR_MT_file_export.append(menu_func_export_v3d_gltf)
    bpy.types.TOPBAR_MT_file_export.append(menu_func_export_v3d_glb)

    AppManagerConn.start(getRoot(), 'BLENDER', True)
Ejemplo n.º 4
0
def register():
    from . import custom_props, custom_ui

    bpy.utils.register_class(V3D_OT_export_gltf)
    bpy.utils.register_class(V3D_OT_export_glb)

    custom_props.register()
    custom_ui.register()

    bpy.types.TOPBAR_MT_file_export.append(menuExportGLTF)
    bpy.types.TOPBAR_MT_file_export.append(menuExportGLB)

    if AppManagerConn.isAvailable(getRoot()):
        AppManagerConn.start(getRoot(), 'BLENDER', True)
    else:
        printLog('WARNING', 'Verge3D App Manager is not available!')
Ejemplo n.º 5
0
def register():

    bpy.types.TOPBAR_MT_help.append(v3d_menu_help)

    bpy.utils.register_class(V3D_PT_RenderSettings)
    bpy.utils.register_class(V3D_PT_RenderLayerSettings)
    bpy.utils.register_class(V3D_PT_WorldSettings)
    bpy.utils.register_class(V3D_PT_ObjectSettings)
    bpy.utils.register_class(V3D_PT_CameraSettings)
    bpy.utils.register_class(V3D_PT_LightSettings)
    bpy.utils.register_class(V3D_PT_MaterialSettings)
    bpy.utils.register_class(V3D_PT_CurveSettings)
    bpy.utils.register_class(V3D_PT_TextureSettings)
    bpy.utils.register_class(V3D_PT_MeshSettings)
    bpy.utils.register_class(V3D_PT_NodeSettings)

    bpy.utils.register_class(V3D_OT_OrbitCameraUpdateView)
    bpy.utils.register_class(V3D_OT_ReexportAll)

    bpy.utils.register_class(COLLECTION_UL_export)

    if AppManagerConn.isAvailable(getRoot()):
        bpy.utils.register_class(V3D_OT_AppManager)
        bpy.utils.register_class(V3D_OT_SneakPeek)
        bpy.types.VIEW3D_HT_header.append(v3d_sneak_peek)
        bpy.types.VIEW3D_HT_header.append(v3d_app_manager)
Ejemplo n.º 6
0
def unregister():

    if AppManagerConn.isAvailable(getRoot()):
        bpy.types.VIEW3D_HT_header.remove(btnAppManager)
        bpy.types.VIEW3D_HT_header.remove(btnSneakPeek)
        bpy.utils.unregister_class(V3D_OT_sneak_peek)
        bpy.utils.unregister_class(V3D_OT_app_manager)

    bpy.utils.unregister_class(V3D_PT_NodeSettings)
    bpy.utils.unregister_class(V3D_PT_TextureSettings)
    bpy.utils.unregister_class(V3D_PT_MaterialSettings)
    bpy.utils.unregister_class(V3D_PT_LightSettings)
    bpy.utils.unregister_class(V3D_PT_CurveSettings)
    bpy.utils.unregister_class(V3D_PT_CameraSettings)
    bpy.utils.unregister_class(V3D_PT_ObjectSettings)
    bpy.utils.unregister_class(V3D_PT_WorldSettings)
    bpy.utils.unregister_class(V3D_PT_RenderLayerSettings)
    bpy.utils.unregister_class(V3D_PT_RenderSettings)
    bpy.utils.unregister_class(V3D_PT_MeshSettings)

    bpy.utils.unregister_class(V3D_OT_reexport_all)
    bpy.utils.unregister_class(V3D_OT_orbit_camera_target_from_cursor)
    bpy.utils.unregister_class(V3D_OT_orbit_camera_update_view)

    bpy.utils.unregister_class(COLLECTION_UL_export)
Ejemplo n.º 7
0
def unregister():

    if AppManagerConn.isAvailable(getRoot()):
        bpy.types.VIEW3D_HT_header.remove(btnAppManager)
        bpy.types.VIEW3D_HT_header.remove(btnSneakPeek)
        bpy.utils.unregister_class(V3D_OT_sneak_peek)
        bpy.utils.unregister_class(V3D_OT_app_manager)

    bpy.utils.unregister_class(V3D_PT_NodeSettings)
    bpy.utils.unregister_class(V3D_PT_TextureSettings)
    bpy.utils.unregister_class(V3D_PT_ClippingPlaneSettings)
    bpy.utils.unregister_class(V3D_PT_MaterialSettings)
    bpy.utils.unregister_class(V3D_PT_LightSettings)
    bpy.utils.unregister_class(V3D_PT_CurveSettings)
    bpy.utils.unregister_class(V3D_PT_CameraSettings)
    bpy.utils.unregister_class(V3D_PT_ObjectSettings)
    bpy.utils.unregister_class(V3D_PT_WorldSettings)
    bpy.utils.unregister_class(V3D_PT_RenderLayerSettings)
    bpy.utils.unregister_class(V3D_PT_RenderSettings)
    bpy.utils.unregister_class(V3D_PT_MeshSettings)
    bpy.utils.unregister_class(V3D_PT_LightProbeSettings)

    bpy.utils.unregister_class(V3D_OT_reexport_all)
    bpy.utils.unregister_class(V3D_OT_orbit_camera_target_from_cursor)
    bpy.utils.unregister_class(V3D_OT_orbit_camera_update_view)

    bpy.utils.unregister_class(COLLECTION_UL_export)

    if pluginUtils.debug:
        bpy.types.TOPBAR_MT_render.remove(menuReexportAll)

    bpy.types.TOPBAR_MT_help.remove(menuUserManual)
    bpy.types.VIEW3D_MT_add.remove(menuVerge3dAdd)

    bpy.utils.unregister_class(V3D_OT_add_clipping_plane)
    bpy.utils.unregister_class(VIEW3D_MT_verge3d_add)