Пример #1
0
def init():
    """Initialize storage for saving connections.
    Called if starting Blender or if all connections should be deleted
    """

    # create proper collection if needed
    if _COLLECTION_NAME not in bpy.data.collections:
        bpy.data.collections.new(_COLLECTION_NAME)

    # just make sure that data block won't get deleted after several savings of blend file
    bpy.data.collections[_COLLECTION_NAME].use_fake_user = True

    # check if connections data block already exists then don't initilaze it
    if not _core.exists(bpy.data.collections[_COLLECTION_NAME]):
        _core.init(bpy.data.collections[_COLLECTION_NAME])
Пример #2
0
def init():
    """Initialize storage for saving connections.
    Called if starting Blender or if all connections should be deleted
    """

    # create proper group if needed
    if not _GROUP_NAME in bpy.data.groups:
        bpy.data.groups.new(_GROUP_NAME)

    # just make sure that data block won't get deleted after several savings of blend file
    bpy.data.groups[_GROUP_NAME].use_fake_user = True

    # check if connections data block already exists then don't initilaze it
    if not _core.exists(bpy.data.groups[_GROUP_NAME]):
        _core.init(bpy.data.groups[_GROUP_NAME])