Ejemplo n.º 1
0
def update_collections_parameters():
    changed = False
    for collection in share_data.blender_collections.values():
        info = share_data.collections_info.get(collection.name_full)
        if info:
            layer_collection = share_data.blender_layer_collections.get(
                collection.name_full)
            temporary_hidden = False
            if layer_collection:
                temporary_hidden = layer_collection.hide_viewport
            if (info.temporary_hide_viewport != temporary_hidden
                    or info.hide_viewport != collection.hide_viewport
                    or info.instance_offset != collection.instance_offset):
                collection_api.send_collection(share_data.client, collection)
                changed = True
    return changed
Ejemplo n.º 2
0
def add_collections():
    changed = False
    for item in share_data.collections_added:
        collection_api.send_collection(share_data.client, get_collection(item))
        changed = True
    return changed