Blender
V3.3
source
blender
io
usd
intern
usd_writer_volume.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
2
#pragma once
3
4
#include <optional>
5
6
#include "
BLI_math_vec_types.hh
"
7
#include "
usd_writer_abstract.h
"
8
9
struct
Volume
;
10
11
namespace
blender::io::usd
{
12
13
/* Writer for writing OpenVDB assets to UsdVolVolume. Volume data is stored in separate .vdb files
14
* which are referenced in USD file. */
15
class
USDVolumeWriter
:
public
USDAbstractWriter
{
16
public
:
17
USDVolumeWriter
(
const
USDExporterContext
&ctx);
18
19
protected
:
20
virtual
bool
check_is_animated
(
const
HierarchyContext
&
context
)
const override
;
21
virtual
void
do_write
(
HierarchyContext
&
context
)
override
;
22
23
private
:
24
/* Try to ensure that external .vdb file is available for USD to be referenced. Blender can
25
* either reference external OpenVDB data or generate such data internally. Latter option will
26
* mean that `resolve_vdb_file` method will try to export volume data to a new .vdb file. If
27
* successful, this method returns absolute file path to the resolved .vdb file, if not, returns
28
* `std::nullopt`. */
29
std::optional<std::string> resolve_vdb_file(
const
Volume
*volume)
const
;
30
31
std::optional<std::string> construct_vdb_file_path(
const
Volume
*volume)
const
;
32
std::optional<std::string> construct_vdb_relative_file_path(
33
const
std::string &vdb_file_path)
const
;
34
};
35
36
}
// namespace blender::io::usd
BLI_math_vec_types.hh
blender::io::usd::USDAbstractWriter
Definition:
usd_writer_abstract.h:26
blender::io::usd::USDVolumeWriter
Definition:
usd_writer_volume.h:15
blender::io::usd::USDVolumeWriter::check_is_animated
virtual bool check_is_animated(const HierarchyContext &context) const override
Definition:
usd_writer_volume.cc:29
blender::io::usd::USDVolumeWriter::do_write
virtual void do_write(HierarchyContext &context) override
Definition:
usd_writer_volume.cc:35
blender::io::usd::USDVolumeWriter::USDVolumeWriter
USDVolumeWriter(const USDExporterContext &ctx)
Definition:
usd_writer_volume.cc:25
blender::compositor::context
cl_context context
Definition:
COM_WorkScheduler.cc:73
blender::io::usd
Definition:
usd_capi_export.cc:35
Volume
Definition:
DNA_volume_types.h:52
blender::io::HierarchyContext
Definition:
IO_abstract_hierarchy_iterator.h:44
blender::io::usd::USDExporterContext
Definition:
usd_exporter_context.h:17
usd_writer_abstract.h
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1