// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page studio-content-library.html
    \previouspage creator-open-documents-view.html
    \nextpage studio-texture-editor.html

    \ingroup studio-views

    \title Content Library

    \brief Select material, texture, and environment bundles with assets to
    use in your application.

    \note The \uicontrol {Content Library} view is included in the
    \l{https://www.qt.io/pricing}{Qt Design Studio Enterprise license}.

    The \uicontrol{Content Library} view contains material, texture, effect, and
    environment bundles with assets that you can use in your project. When you
    have added an asset from \uicontrol {Content Library}, you can use it in
    your project.

    You can also add assets to the \uicontrol {Content Library} > \uicontrol {User Assets}.

    Assets added to \uicontrol {User Assets} are always available in \uicontrol {Content Library}
    regardless of what project you are working on.

    \image content-library.webp

    \section1 Adding a Material to Your Project

    You can use materials on 3D models.

    To add a material from the \uicontrol {Content Library} view to your
    project, download the material and then do one of the following:

    \list
      \li Select the \inlineimage icons/plus.png
      next to the material in the \uicontrol {Content Library} view.
      \li Right-click the material in the \uicontrol {Content Library} view and
      select \uicontrol{Add an instance to the project}.
    \endlist

    You can also add a material to a 3D model straight from the \uicontrol {Content Library} view.
    This also adds the material to the project.

    To add a material to a 3D model, do one of the following:

    \list
      \li Drag the material from the \uicontrol {Content Library} view to a 3D
      model in the \uicontrol 3D or \uicontrol Navigator view.
      \li With a 3D model selected, right-click the material in the
      \uicontrol {Content Library} view and  select \uicontrol{Apply to selected}.
    \endlist

    \section1 Adding a Texture or Environment to Your Project

    To add a texture or environment to your project, right-click the image
    in the \uicontrol {Content Library} view and select one of the options:
    \list
      \li \uicontrol {Add image}. This adds the image as an asset to your project. You can
      access the image from the \uicontrol Assets view.
      \li \uicontrol {Add texture}. This adds the image as a texture to your project. You can
      access the texture from the \uicontrol Textures section in the \uicontrol{Material Browser}
      view.
      \li \uicontrol {Add light probe}. This adds the image as a light probe for your scene, using
      the image to illuminate the scene and as a skybox. When you set an image as light probe, the
      following properties are set for \uicontrol {Scene Environment}:
        \list
          \li \uicontrol Background Mode is set to skybox.
          \li \uicontrol {Light Probe} > \uicontrol Image is set to the selected texture.
        \endlist
    \endlist

    \section1 Adding an Effect to Your Project

    To add an effect to your project, do one of the following:

    \list
      \li Right-click the effect in \uicontrol {Content Library} and select
      \uicontrol {Add an Instance}.
      \li From \uicontrol {Content Library}, drag the effect to the \uicontrol 3D or
      \uicontrol Navigator view.
    \endlist

    \section1 User Assets

    \image user-assets.webp

    Add assets to \uicontrol {User Assets} to access them in any project.

    You can add 3D objects (such as 3D models, cameras, and lights), materials, and images to
    \uicontrol {User Assets}.

    \section2 Adding an Asset to User Assets

    Add assets to \uicontrol{User Assets} in the following ways:

    \list
      \li In the \uicontrol {Assets} view, right-click an asset and select
      \uicontrol {Add to Content Library}.
      \li In the \uicontrol {3D} view, right-click an asset and select
      \uicontrol {Add to Content Library}.
      \li In the \uicontrol {Navigator} view, right-click an asset and select
      \uicontrol {Add to Content Library}.
      \li In the \uicontrol {Material Browser} view, right-click a material and select
      \uicontrol {Add to Content Library}.
    \endlist

    \section2 Using Assets from User Assets

    \section3 Adding a Material

    Add a material to your project in the following ways:

    \list
      \li Right-click the material and select \uicontrol {Add an instance to project}. This
      adds the material to the \uicontrol {Material Browser} view.
      \li Drag a material to a 3D model in the \uicontrol 3D or \uicontrol Navigator view.
    \endlist

    \section3 Adding a 3D component

    Add a 3D component to your project in the following ways:

    \list
      \li Drag the 3D component to the \uicontrol 3D or \uicontrol Navigator view.
      \li Right-click the 3D component and select \uicontrol {Add an instance to project}.
    \endlist

    \section3 Adding a Texture

    Add a texture to your project in the following ways:

    \list
      \li Right-click a texture and select \uicontrol {Add image}, \uicontrol{Add texture}, or
      \uicontrol {Add light probe}.
      \li Drag a texture to a 3D model in the \uicontrol 3D, \uicontrol {2D}, or
      \uicontrol {Navigator} view to add it as a texture to that 3D model.
      \li Drag a texture to the \uicontrol Assets view.
    \endlist
*/
