Metadata-Version: 2.1
Name: cozyblanket
Version: 2.0.1
Summary: CozyBlanket's remote network control API implementation.
Project-URL: Homepage, https://sparseal.com/cozyblanket/network
Author-email: Joan Fons Sanchez <joan@sparseal.com>, Pablo Dobarro Peña <pablo@sparseal.com>
License: Copyright (c) 2022 Sparseal SL
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# CozyBlanket Network Features 

CozyBlanket remote network features allow controlling CozyBlanket from desktop DCCs, servers and pipeline tools for integration with existing software. This package provides a python implementation of the API.

**Make sure you have Network Features enabled in CozyBlanket. Network Features are only available as part of Retopology Pack.**

The `CozyBlanketConnection` class can be used to connect to a running instance of CozyBlanket. You can find all the available commands in the class definition, but here is a quick example of what can be done:

```
from cozyblanket import CozyBlanketConnection

# Connect to a running instance
CB = CozyBlanketConnection() # This can take an optional device_id argument if you want to connect to a specific device
CB.connect()

...

# Close the current document and clear the current scene, otherwise the current document will be overwirtten
CB.document_close()
CB.scene_clear()

...

# Push a new retopology target from an OBJ file
CB.target_push_obj("target.obj", "named_target")
CB.target_load("named_target")

...

# Save the currently open retopology mesh to an OBJ file
CB.editmesh_pull_obj("editmesh.obj")

...

# Add a remote action button to the device's UI
CB.remote_actions_add("Example Button", lambda: print("The user pressed the button!"))

# remote_actions_process() needs to be called periodically from your client app
while True:
    CB.remote_actions_process()

...

# Close any running connections
CB.diconnect()
```