Cleanup: USD, inline namespace declarations
Replace nested `namespace blender { namespace io { namespace usd {`
with `namespace blender::io::usd {`.
No functional changes.
This commit is contained in:
@@ -46,9 +46,7 @@
|
||||
#include "WM_api.h"
|
||||
#include "WM_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
struct ExportJobData {
|
||||
Main *bmain;
|
||||
@@ -185,9 +183,7 @@ static void export_endjob(void *customdata)
|
||||
WM_set_locked_interface(data->wm, false);
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
bool USD_export(bContext *C,
|
||||
const char *filepath,
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
struct Depsgraph;
|
||||
struct Object;
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
class USDHierarchyIterator;
|
||||
|
||||
@@ -40,6 +38,4 @@ struct USDExporterContext {
|
||||
const USDExportParams &export_params;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -42,9 +42,7 @@
|
||||
#include "DNA_layer_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDHierarchyIterator::USDHierarchyIterator(Depsgraph *depsgraph,
|
||||
pxr::UsdStageRefPtr stage,
|
||||
@@ -149,6 +147,4 @@ AbstractHierarchyWriter *USDHierarchyIterator::create_particle_writer(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -31,9 +31,7 @@ struct Depsgraph;
|
||||
struct ID;
|
||||
struct Object;
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
using blender::io::AbstractHierarchyIterator;
|
||||
using blender::io::AbstractHierarchyWriter;
|
||||
@@ -71,6 +69,4 @@ class USDHierarchyIterator : public AbstractHierarchyIterator {
|
||||
USDExporterContext create_usd_export_context(const HierarchyContext *context);
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -34,9 +34,7 @@ static const pxr::TfToken roughness("roughness", pxr::TfToken::Immortal);
|
||||
static const pxr::TfToken surface("surface", pxr::TfToken::Immortal);
|
||||
} // namespace usdtokens
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDAbstractWriter::USDAbstractWriter(const USDExporterContext &usd_export_context)
|
||||
: usd_export_context_(usd_export_context),
|
||||
@@ -155,6 +153,4 @@ bool USDAbstractWriter::mark_as_instance(const HierarchyContext &context, const
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -35,9 +35,7 @@
|
||||
struct Material;
|
||||
struct Object;
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
using blender::io::AbstractHierarchyWriter;
|
||||
using blender::io::HierarchyContext;
|
||||
@@ -82,6 +80,4 @@ class USDAbstractWriter : public AbstractHierarchyWriter {
|
||||
virtual bool mark_as_instance(const HierarchyContext &context, const pxr::UsdPrim &prim);
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
#include "DNA_camera_types.h"
|
||||
#include "DNA_scene_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDCameraWriter::USDCameraWriter(const USDExporterContext &ctx) : USDAbstractWriter(ctx)
|
||||
{
|
||||
@@ -108,6 +106,4 @@ void USDCameraWriter::do_write(HierarchyContext &context)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "usd_writer_abstract.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
/* Writer for writing camera data to UsdGeomCamera. */
|
||||
class USDCameraWriter : public USDAbstractWriter {
|
||||
@@ -34,6 +32,4 @@ class USDCameraWriter : public USDAbstractWriter {
|
||||
virtual void do_write(HierarchyContext &context) override;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -26,9 +26,7 @@
|
||||
|
||||
#include "DNA_particle_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDHairWriter::USDHairWriter(const USDExporterContext &ctx) : USDAbstractWriter(ctx)
|
||||
{
|
||||
@@ -87,6 +85,4 @@ bool USDHairWriter::check_is_animated(const HierarchyContext &UNUSED(context)) c
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "usd_writer_abstract.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
/* Writer for writing hair particle data as USD curves. */
|
||||
class USDHairWriter : public USDAbstractWriter {
|
||||
@@ -34,6 +32,4 @@ class USDHairWriter : public USDAbstractWriter {
|
||||
virtual bool check_is_animated(const HierarchyContext &context) const override;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -30,9 +30,7 @@
|
||||
#include "DNA_light_types.h"
|
||||
#include "DNA_object_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDLightWriter::USDLightWriter(const USDExporterContext &ctx) : USDAbstractWriter(ctx)
|
||||
{
|
||||
@@ -109,6 +107,4 @@ void USDLightWriter::do_write(HierarchyContext &context)
|
||||
usd_light.CreateSpecularAttr().Set(light->spec_fac, timecode);
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "usd_writer_abstract.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
class USDLightWriter : public USDAbstractWriter {
|
||||
public:
|
||||
@@ -33,6 +31,4 @@ class USDLightWriter : public USDAbstractWriter {
|
||||
virtual void do_write(HierarchyContext &context) override;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -44,9 +44,7 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDGenericMeshWriter::USDGenericMeshWriter(const USDExporterContext &ctx) : USDAbstractWriter(ctx)
|
||||
{
|
||||
@@ -462,6 +460,4 @@ Mesh *USDMeshWriter::get_export_mesh(Object *object_eval, bool & /*r_needsfree*/
|
||||
return BKE_object_get_evaluated_mesh(object_eval);
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
|
||||
#include <pxr/usd/usdGeom/mesh.h>
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
struct USDMeshData;
|
||||
|
||||
@@ -62,6 +60,4 @@ class USDMeshWriter : public USDGenericMeshWriter {
|
||||
virtual Mesh *get_export_mesh(Object *object_eval, bool &r_needsfree) override;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#include "DNA_mesh_types.h"
|
||||
#include "DNA_meta_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDMetaballWriter::USDMetaballWriter(const USDExporterContext &ctx) : USDGenericMeshWriter(ctx)
|
||||
{
|
||||
@@ -78,6 +76,4 @@ bool USDMetaballWriter::is_basis_ball(Scene *scene, Object *ob) const
|
||||
return ob == basis_ob;
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -20,9 +20,7 @@
|
||||
|
||||
#include "usd_writer_mesh.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
class USDMetaballWriter : public USDGenericMeshWriter {
|
||||
public:
|
||||
@@ -38,6 +36,4 @@ class USDMetaballWriter : public USDGenericMeshWriter {
|
||||
bool is_basis_ball(Scene *scene, Object *ob) const;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -28,9 +28,7 @@
|
||||
|
||||
#include "DNA_layer_types.h"
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
USDTransformWriter::USDTransformWriter(const USDExporterContext &ctx) : USDAbstractWriter(ctx)
|
||||
{
|
||||
@@ -64,6 +62,4 @@ bool USDTransformWriter::check_is_animated(const HierarchyContext &context) cons
|
||||
return BKE_object_moves_in_time(context.object, context.animation_check_include_parent);
|
||||
}
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
@@ -22,9 +22,7 @@
|
||||
|
||||
#include <pxr/usd/usdGeom/xform.h>
|
||||
|
||||
namespace blender {
|
||||
namespace io {
|
||||
namespace usd {
|
||||
namespace blender::io::usd {
|
||||
|
||||
class USDTransformWriter : public USDAbstractWriter {
|
||||
private:
|
||||
@@ -38,6 +36,4 @@ class USDTransformWriter : public USDAbstractWriter {
|
||||
bool check_is_animated(const HierarchyContext &context) const override;
|
||||
};
|
||||
|
||||
} // namespace usd
|
||||
} // namespace io
|
||||
} // namespace blender
|
||||
} // namespace blender::io::usd
|
||||
|
||||
Reference in New Issue
Block a user