Blender V4.3
material.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include <pxr/imaging/hd/enums.h>
8#include <pxr/usd/sdf/assetPath.h>
9#include <pxr/usd/sdf/path.h>
10
11#include "DNA_material_types.h"
12
13#include "BLI_map.hh"
14
15#include "id.hh"
16
17namespace blender::io::hydra {
18
19class MaterialData : public IdData {
20 public:
21 bool double_sided = true;
22
23 private:
24 pxr::VtValue material_network_map_;
25
26 public:
27 MaterialData(HydraSceneDelegate *scene_delegate,
28 const Material *material,
29 pxr::SdfPath const &prim_id);
30
31 void init() override;
32 void insert() override;
33 void remove() override;
34 void update() override;
35
36 pxr::VtValue get_data(pxr::TfToken const &key) const override;
37 pxr::VtValue get_material_resource() const;
38 pxr::HdCullStyle cull_style() const;
39};
40
42
43} // namespace blender::io::hydra
pxr::SdfPath prim_id
Definition id.hh:36
MaterialData(HydraSceneDelegate *scene_delegate, const Material *material, pxr::SdfPath const &prim_id)
pxr::VtValue get_data(pxr::TfToken const &key) const override