Skip to content

An example of Unity Cloud Asset Manager integration with Blender, to demonstrate how to use the Unity Cloud Python SDK.

License

Notifications You must be signed in to change notification settings

Unity-Technologies/unity-cloud-asset-manager-for-blender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Asset Manager for Blender

Use the Asset Manager for Blender (AM4B) add-on to integrate the Unity Cloud Asset Manager service within your Blender workflows. The source code of the AM4B add-on is publicly exposed in this repository, providing inspiration and a foundation for you to create your own custom Asset Manager integration flows for Blender or any other software. That is, you can copy code blocks for your projects. However, you can't make open source contributions to the Unity AM4B repository on GitHub.

Note: This repository does not accept pull requests, review requests, or any other GitHub-hosted issue management requests.

Find and connect support services on the Help & Support page.

Table of contents

Prerequisites

Note: To manage assets, you need the Asset Manager Admin role at the organization level or the Asset Manager Contributor add-on role at the project level. Asset Manager Contributors can manage assets only for the specific projects to which they have access.

Before you start

Before you install and use the AM4B add-on, make sure you have the following:

  • Blender installed on your machine (guaranteed support from versions 3.x to 4.1.x)

  • The required permissions. Read more about verifying permissions.

    Note: Asset Manager roles define the permissions that you have for a single Asset Manager project. Depending on your work, permissions might vary across projects.

Supported platforms

The AM4B add-on is compatible with the following platforms:

  • Windows x64
  • Mac x64/Arm64

Licenses

The Unity Cloud Asset Manager for Blender repository is provided under the GPL v2 license.

How do I...?

Build the AM4B add-on

Run the pack-addon.py script to create a ZIP file that you can install in Blender as a plugin.

cd .\Scripts
python pack-addon.py [-o OUTPUT]
Option Description
-o OUTPUT, --output OUTPUT Specify a folder where you want to save the add-on archive. By default, if no output folder is specified, the script creates a Dist folder at the root of the repository.

Install the AM4B add-on

To install the AM4B add-on, follow these steps:

  1. Open Blender.
  2. Go to Edit > Preferences.
  3. Go to the Add-ons section.
  4. Select Install.

installing the add-on

  1. Select the UCAM4Blender.zip file that you built.
  2. Select Install Add-on.
  3. To enable the add-on, select Import Export: Upload FX to Unity Cloud Asset Manager. The Unity Cloud tab appears in your 3D view.

enabling the add-on

Sign in to Unity Cloud Asset Manager

Follow these steps if it is the first time you run the AM4B add-on or you have previously signed out. Read more about signing out from the AM4B add-on. Otherwise, the AM4B add-on automatically signs in using the previous session.

  1. From your 3D view, go to Unity Cloud > Login.

login-to-am

Note: You are redirected to the Unity sign-in page. Complete the sign-in process, until it takes you to the following page:

login complete

  1. Go back to Blender.

Upload the 3D view as a new asset to Unity Cloud Asset Manager

  1. Sign in to Asset Manager. Read more about signing in to Unity Cloud Asset Manager.
  2. From your 3D view, go to Unity Cloud > Upload FBX to Asset Manager.

opening the add-on

  1. Fill the fields of the Upload FBX to Asset Manager dialog as follows:

    popup

    1. Select a target organization and a project. If you don't have one, create a new project.
    2. Select <Create new asset> in the Asset dropdown list.
    3. Enter the new asset name, description, collection, and tags. As part of the upload process, the system assigns this information to the asset.

      Note: To add multiple tags, separate them with spaces.

    4. Select Embed textures to upload textures along with the .fbx file. When you select Embed textures, the path mode changes to COPY. By default, path mode is set to AUTO.
    5. Select OK.

      Note: When the upload is complete, you are redirected to the Asset Manager dashboard, where you can additionally edit and publish assets.

Upload the 3D view to an existing asset in Unity Cloud Asset Manager

  1. Sign in to Asset Manager. Read more about signing in to Unity Cloud Asset Manager.
  2. From your 3D view, go to Unity Cloud > Upload FBX to Asset Manager.

opening the add-on

  1. Fill the fields of the Upload FBX to Asset Manager dialog as follows:

    popup

    1. Select a target organization and a project. If you don't have one, create a new project.

    2. Select the asset that you want to update in the Asset dropdown list. The add-on fetches the asset name, asset versions, description, and tags of the selected asset.

      Note: During upload, the system removes any existing files in the asset.

    3. Select the version you want to update. A new version is created from it.

    4. Change the asset name, description, collection, and tags, if needed. As part of the upload process, the system assigns this information to the asset.

      Note: To add multiple tags, separate them with spaces.

      Note: When you select a collection, it adds the asset only to that collection. It has no impact on any previously linked collection.

    5. Select Embed textures to export FBX with textures. This sets the path mode to COPY. By default, it is set to AUTO.

    6. Select OK.

      Note: When the upload is complete, you are redirected to the Asset Manager dashboard, where you can additionally edit and publish assets.

Sign out from the AM4B add-on

  1. From your 3D view, go to Unity Cloud > Logout.

    Note This option is available only when you are signed in.

logout-from-am

Note: When the sign-out process completes, you are redirected to the following page:

logout complete

  1. Go back to Blender.

Troubleshooting

CERTIFICATE_VERIFY_FAILED when building the AM4B add-on on MacOS

To build the AM4B add-on, you must download the Unity Cloud Python SDK dependency. Python 3.x comes with its own bundled OpenSSL and doesn't rely on MacOS's OpenSSL. It doesn't have access to MacOS's root certificates either.

To solve this issue, use either of the following two methods:

  • Run the install command that is shipped with Python 3.x.

    cd /Applications/Python\ 3.x/
    ./Install\ Certificates.command
    
  • Install the certifi package.

    pip install certifi
    

Problem when installing the AM4B add-on

Error: No module named 'unity_cloud'

During the AM4B add-on installation, an automatic process tries to install the Unity Cloud Python SDK in Blender's integrated Python environment. Depending on the setup, this step might be blocked by the system, which results in the following exception: Error: No module named 'unity_cloud'.

To solve this issue, allow automatic installation of the Unity Cloud Python SDK into Blender's integrated Python environment when running Blender with admin privileges.

Note Allowing this step is necessary only once at install time. Blender can run without elevated privileges in any subsequent session.

Conflicts after add-on replacement

When you replace one version of the add-on with another, close Blender in between. Blender tends to keep outdated code in memory even after you uninstall an add-on, which might lead to conflicts with the new version.

Failed to upload asset - cannot render, no camera

When you upload an asset, the system may throw this error:

  • Error message: Failed to upload asset to Unity Cloud Asset Manager
  • Additional details: RuntimeError: Error: Cannot render, no camera The system throws this error because the AM4B add-on uses the camera to render a preview before uploading the asset. If you don't have any camera on your scene, add one.

Security limitations

When you build the AM4B add-on, if you want to skip the integrity protection step during the download of the Unity Cloud Python SDK, use the -dw option.

See also

Tell us what you think

Thank you for exploring our project! Please help us improve and deliver greater value by providing your feedback about your experience with the AM4B add-on in our Help & Support page. We appreciate your input!

About

An example of Unity Cloud Asset Manager integration with Blender, to demonstrate how to use the Unity Cloud Python SDK.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages