Blender  V2.93
usd_hierarchy_iterator.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2019 Blender Foundation.
17  * All rights reserved.
18  */
19 #pragma once
20 
22 #include "usd.h"
23 #include "usd_exporter_context.h"
24 
25 #include <string>
26 
27 #include <pxr/usd/usd/common.h>
28 #include <pxr/usd/usd/timeCode.h>
29 
30 struct Depsgraph;
31 struct Object;
32 
33 namespace blender::io::usd {
34 
38 
40  private:
41  const pxr::UsdStageRefPtr stage_;
42  pxr::UsdTimeCode export_time_;
43  const USDExportParams &params_;
44 
45  public:
47  pxr::UsdStageRefPtr stage,
48  const USDExportParams &params);
49 
50  void set_export_frame(float frame_nr);
51  const pxr::UsdTimeCode &get_export_time_code() const;
52 
53  virtual std::string make_valid_name(const std::string &name) const override;
54 
55  protected:
56  virtual bool mark_as_weak_export(const Object *object) const override;
57 
59  const HierarchyContext *context) override;
63  const HierarchyContext *context) override;
64 
65  virtual void release_writer(AbstractHierarchyWriter *writer) override;
66 
67  private:
68  USDExporterContext create_usd_export_context(const HierarchyContext *context);
69 };
70 
71 } // namespace blender::io::usd
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:51
virtual bool mark_as_weak_export(const Object *object) const override
virtual AbstractHierarchyWriter * create_data_writer(const HierarchyContext *context) override
USDHierarchyIterator(Depsgraph *depsgraph, pxr::UsdStageRefPtr stage, const USDExportParams &params)
virtual void release_writer(AbstractHierarchyWriter *writer) override
virtual AbstractHierarchyWriter * create_particle_writer(const HierarchyContext *context) override
const pxr::UsdTimeCode & get_export_time_code() const
virtual AbstractHierarchyWriter * create_hair_writer(const HierarchyContext *context) override
virtual std::string make_valid_name(const std::string &name) const override
virtual AbstractHierarchyWriter * create_transform_writer(const HierarchyContext *context) override
EvaluationStage stage
Definition: deg_eval.cc:96
const Depsgraph * depsgraph
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
struct SELECTID_Context context
Definition: select_engine.c:47