Blender V5.3
usd_colorspace_utils.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2026 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_color.hh"
8#include "BLI_span.hh"
9
10#include <pxr/base/gf/vec3f.h>
11#include <pxr/base/tf/token.h>
12#include <pxr/usd/usd/attribute.h>
13#include <pxr/usd/usd/prim.h>
14#include <pxr/usd/usdShade/shader.h>
15
16namespace blender {
17struct Image;
18}
19
20namespace blender::io::usd {
21
24
26void colorspace_apply_to_prim(const pxr::UsdPrim &prim);
27
29void colorspace_attr_to_scene_linear(const pxr::UsdAttribute &attr, pxr::GfVec3f &color);
30void colorspace_attr_to_scene_linear(const pxr::UsdAttribute &attr, ColorGeometry4f &color);
31
33void colorspace_attr_to_scene_linear(const pxr::UsdAttribute &attr,
34 MutableSpan<ColorGeometry4f> colors);
35
37void colorspace_from_image_texture(const Image *image, pxr::UsdShadeShader &shader);
38
40void colorspace_to_image_texture(const pxr::UsdShadeShader &usd_shader,
41 const pxr::UsdShadeInput &file_input,
42 bool is_data,
43 Image *image);
44
45} // namespace blender::io::usd
void colorspace_from_image_texture(const Image *image, pxr::UsdShadeShader &shader)
void colorspace_attr_to_scene_linear(const pxr::UsdAttribute &attr, pxr::GfVec3f &color)
void colorspace_to_image_texture(const pxr::UsdShadeShader &usd_shader, const pxr::UsdShadeInput &file_input, const bool is_data, Image *image)
void colorspace_apply_to_prim(const pxr::UsdPrim &prim)
pxr::TfToken colorspace_scene_linear_interop_id()
BMesh Iterators.
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f