Blender V5.3
param.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
7/* Parameter value lists from OpenImageIO are used to store custom properties
8 * on various data, which can then later be used in shaders. */
9
10#include <OpenImageIO/paramlist.h>
11#include <OpenImageIO/typedesc.h>
12#include <OpenImageIO/ustring.h>
13
15
17
18using OIIO::ParamValue;
19
20using OIIO::TypeColor;
21using OIIO::TypeDesc;
22using OIIO::TypeFloat;
23using OIIO::TypeFloat2;
24using OIIO::TypeFloat4;
25using OIIO::TypeInt;
26using OIIO::TypeMatrix;
27using OIIO::TypeNormal;
28using OIIO::TypePoint;
29using OIIO::TypeString;
30using OIIO::TypeUnknown;
31using OIIO::TypeVector;
32
33static constexpr TypeDesc TypeRGBA(TypeDesc::FLOAT, TypeDesc::VEC4, TypeDesc::COLOR);
34/* Consider quaternion an array of scalars to differentiate the type from TypeFloat4 and TypeRGBA.
35 */
36static constexpr TypeDesc TypeQuaternion(TypeDesc::FLOAT,
37 TypeDesc::SCALAR,
38 TypeDesc::NOSEMANTICS,
39 4);
40static_assert(TypeQuaternion != TypeFloat4);
41static_assert(TypeQuaternion != TypeRGBA);
42static constexpr TypeDesc TypePackedSphericalHarmonicsRest(
43 TypeDesc::INT8,
44 TypeDesc::VEC3,
45 TypeDesc::NOSEMANTICS,
47
48using OIIO::ustring;
49using OIIO::ustringhash;
50
#define CCL_NAMESPACE_END
static constexpr TypeDesc TypeQuaternion(TypeDesc::FLOAT, TypeDesc::SCALAR, TypeDesc::NOSEMANTICS, 4)
static constexpr TypeDesc TypePackedSphericalHarmonicsRest(TypeDesc::INT8, TypeDesc::VEC3, TypeDesc::NOSEMANTICS, PackedSphericalHarmonicsRest::MAX_COEFFICIENTS)
static constexpr TypeDesc TypeRGBA(TypeDesc::FLOAT, TypeDesc::VEC4, TypeDesc::COLOR)
ccl_static_constexpr int MAX_COEFFICIENTS