Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PART IV: Clean up include directives and order under lib/mayaUsd #391

Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/mayaUsd/base/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//

#include "pxr/base/arch/export.h"
#include <pxr/base/arch/export.h>

#if defined _WIN32 || defined __CYGWIN__

Expand Down
4 changes: 1 addition & 3 deletions lib/mayaUsd/base/debugCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@
//
#include "debugCodes.h"

#include "pxr/base/tf/registryManager.h"
#include <pxr/base/tf/registryManager.h>

PXR_NAMESPACE_OPEN_SCOPE


TF_REGISTRY_FUNCTION(TfDebug)
{
TF_DEBUG_ENVIRONMENT_SYMBOL(PXRUSDMAYA_REGISTRY,
Expand All @@ -33,4 +32,3 @@ TF_REGISTRY_FUNCTION(TfDebug)
}

PXR_NAMESPACE_CLOSE_SCOPE

6 changes: 2 additions & 4 deletions lib/mayaUsd/base/debugCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@
#ifndef PXRUSDMAYA_DEBUGCODES_H
#define PXRUSDMAYA_DEBUGCODES_H

#include "pxr/pxr.h"
#include "pxr/base/tf/debug.h"
#include <pxr/pxr.h>
#include <pxr/base/tf/debug.h>

PXR_NAMESPACE_OPEN_SCOPE


TF_DEBUG_CODES(
PXRUSDMAYA_REGISTRY,
PXRUSDMAYA_DIAGNOSTICS,
PXRUSDMAYA_TRANSLATORS,
USDMAYA_PROXYSHAPEBASE
);


PXR_NAMESPACE_CLOSE_SCOPE

#endif
15 changes: 5 additions & 10 deletions lib/mayaUsd/fileio/chaser/chaser.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@
#ifndef PXRUSDMAYA_CHASER_H
#define PXRUSDMAYA_CHASER_H

/// \file usdMaya/chaser.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to leave these Doxygen tags if we can. You can truncate it to just this:

/// \file

Same goes for all of the files below.

#include <pxr/pxr.h>
#include <pxr/base/tf/declarePtrs.h>
#include <pxr/base/tf/refPtr.h>
#include <pxr/usd/usd/timeCode.h>

#include "../../base/api.h"

#include "pxr/pxr.h"

#include "pxr/base/tf/declarePtrs.h"
#include "pxr/base/tf/refPtr.h"

#include "pxr/usd/usd/timeCode.h"
#include <mayaUsd/base/api.h>

PXR_NAMESPACE_OPEN_SCOPE


TF_DECLARE_REF_PTRS(UsdMayaChaser);

/// \brief base class for plugin chasers which are plugins that run after the
Expand Down
9 changes: 4 additions & 5 deletions lib/mayaUsd/fileio/chaser/chaserRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@
//
#include "chaserRegistry.h"

#include "../../base/debugCodes.h"
#include "../registryHelper.h"
#include <map>

#include "pxr/base/tf/instantiateSingleton.h"
#include <pxr/base/tf/instantiateSingleton.h>

#include <map>
#include <mayaUsd/base/debugCodes.h>
#include <mayaUsd/fileio/registryHelper.h>

PXR_NAMESPACE_OPEN_SCOPE


UsdMayaChaserRegistry::FactoryContext::FactoryContext(
const UsdStagePtr& stage,
const DagToUsdMap& dagToUsdMap,
Expand Down
25 changes: 10 additions & 15 deletions lib/mayaUsd/fileio/chaser/chaserRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,21 @@
#ifndef PXRUSDMAYA_CHASER_REGISTRY_H
#define PXRUSDMAYA_CHASER_REGISTRY_H

/// \file usdMaya/chaserRegistry.h

#include "../../base/api.h"
#include "chaser.h"
#include "../jobs/jobArgs.h"
#include "../../utils/util.h"

#include "pxr/pxr.h"

#include "pxr/base/tf/declarePtrs.h"
#include "pxr/base/tf/registryManager.h"
#include "pxr/base/tf/singleton.h"
#include <functional>

#include "pxr/usd/usd/stage.h"
#include <pxr/pxr.h>
#include <pxr/base/tf/declarePtrs.h>
#include <pxr/base/tf/registryManager.h>
#include <pxr/base/tf/singleton.h>
#include <pxr/usd/usd/stage.h>

#include <functional>
#include <mayaUsd/base/api.h>
#include <mayaUsd/fileio/chaser/chaser.h>
#include <mayaUsd/fileio/jobs/jobArgs.h>
#include <mayaUsd/utils/util.h>

PXR_NAMESPACE_OPEN_SCOPE


TF_DECLARE_WEAK_PTRS(UsdMayaChaserRegistry);

/// \class UsdMayaChaserRegistry
Expand Down
4 changes: 2 additions & 2 deletions lib/mayaUsd/fileio/fallbackPrimReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
//
#include "fallbackPrimReader.h"

#include "translators/translatorUtil.h"
#include <pxr/usd/usdGeom/imageable.h>

#include "pxr/usd/usdGeom/imageable.h"
#include <mayaUsd/fileio/translators/translatorUtil.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
6 changes: 2 additions & 4 deletions lib/mayaUsd/fileio/fallbackPrimReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
#ifndef PXRUSDMAYA_FALLBACK_PRIM_READER_H
#define PXRUSDMAYA_FALLBACK_PRIM_READER_H

/// \file usdMaya/fallbackPrimReader.h

#include "primReader.h"
#include "primReaderRegistry.h"
#include <mayaUsd/fileio/primReader.h>
#include <mayaUsd/fileio/primReaderRegistry.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
16 changes: 7 additions & 9 deletions lib/mayaUsd/fileio/functorPrimReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@
#ifndef PXRUSDMAYA_FUNCTORPRIMREADER_H
#define PXRUSDMAYA_FUNCTORPRIMREADER_H

/// \file usdMaya/functorPrimReader.h

#include "../base/api.h"
#include "primReader.h"
#include "primReaderArgs.h"
#include "primReaderContext.h"
#include "primReaderRegistry.h"
#include <functional>

#include "pxr/pxr.h"
#include <pxr/pxr.h>

#include <functional>
#include <mayaUsd/base/api.h>
#include <mayaUsd/fileio/primReader.h>
#include <mayaUsd/fileio/primReaderArgs.h>
#include <mayaUsd/fileio/primReaderContext.h>
#include <mayaUsd/fileio/primReaderRegistry.h>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down
24 changes: 11 additions & 13 deletions lib/mayaUsd/fileio/functorPrimWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include "pxr/pxr.h"
#include "functorPrimWriter.h"

#include "primWriter.h"
#include "primWriterArgs.h"
#include "primWriterContext.h"
#include "primWriterRegistry.h"
#include "transformWriter.h"
#include "writeJobContext.h"

#include "pxr/usd/sdf/path.h"
#include "pxr/usd/usd/stage.h"
#include "pxr/usd/usd/timeCode.h"
#include <functional>

#include <maya/MFnDependencyNode.h>

#include <functional>
#include <pxr/pxr.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/timeCode.h>

#include <mayaUsd/fileio/primWriter.h>
#include <mayaUsd/fileio/primWriterArgs.h>
#include <mayaUsd/fileio/primWriterContext.h>
#include <mayaUsd/fileio/primWriterRegistry.h>
#include <mayaUsd/fileio/transformWriter.h>
#include <mayaUsd/fileio/writeJobContext.h>

PXR_NAMESPACE_OPEN_SCOPE


UsdMaya_FunctorPrimWriter::UsdMaya_FunctorPrimWriter(
const MFnDependencyNode& depNodeFn,
const SdfPath& usdPath,
Expand Down
21 changes: 8 additions & 13 deletions lib/mayaUsd/fileio/functorPrimWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,21 @@
#ifndef PXRUSDMAYA_FUNCTOR_PRIM_WRITER_H
#define PXRUSDMAYA_FUNCTOR_PRIM_WRITER_H

/// \file usdMaya/functorPrimWriter.h

#include "pxr/pxr.h"
#include "transformWriter.h"

#include "primWriter.h"
#include "primWriterRegistry.h"
#include "writeJobContext.h"

#include "pxr/usd/sdf/path.h"
#include "pxr/usd/usd/timeCode.h"
#include <functional>

#include <maya/MFnDependencyNode.h>

#include <functional>
#include <pxr/pxr.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/usd/timeCode.h>

#include <mayaUsd/fileio/primWriter.h>
#include <mayaUsd/fileio/primWriterRegistry.h>
#include <mayaUsd/fileio/transformWriter.h>
#include <mayaUsd/fileio/writeJobContext.h>

PXR_NAMESPACE_OPEN_SCOPE


/// \class UsdMaya_FunctorPrimWriter
/// \brief This class is scaffolding to hold bare prim writer functions and
/// adapt them to the UsdMayaPrimWriter or UsdMayaTransformWriter interface
Expand Down
2 changes: 1 addition & 1 deletion lib/mayaUsd/fileio/importData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

//
#include "importData.h"

#include <type_traits>
Expand Down
6 changes: 3 additions & 3 deletions lib/mayaUsd/fileio/importData.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@

#pragma once

#include "../base/api.h"
#include <map>
#include <string>

#include <pxr/usd/usd/stage.h>
#include <pxr/usd/usd/prim.h>
#include <pxr/usd/sdf/types.h>

#include <map>
#include <string>
#include <mayaUsd/base/api.h>

PXR_NAMESPACE_USING_DIRECTIVE

Expand Down
21 changes: 9 additions & 12 deletions lib/mayaUsd/fileio/instancedNodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,26 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
#include "pxr/pxr.h"
#include "instancedNodeWriter.h"

#include "primWriter.h"
#include "../utils/util.h"
#include "writeJobContext.h"

#include "pxr/usd/sdf/path.h"
#include "pxr/usd/usd/references.h"
#include "pxr/usd/usd/timeCode.h"
#include <string>
#include <vector>

#include <maya/MDagPath.h>
#include <maya/MDagPathArray.h>

#include <maya/MFnDependencyNode.h>

#include <string>
#include <vector>
#include <pxr/pxr.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/usd/references.h>
#include <pxr/usd/usd/timeCode.h>

#include <mayaUsd/fileio/primWriter.h>
#include <mayaUsd/fileio/writeJobContext.h>
#include <mayaUsd/utils/util.h>

PXR_NAMESPACE_OPEN_SCOPE


/// Assuming that \p instance1 and \p instance2 are instances of one another,
/// replaces the prefix \p instance1 in \p dagPath with \p instance2.
static
Expand Down
19 changes: 7 additions & 12 deletions lib/mayaUsd/fileio/instancedNodeWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,20 @@
#ifndef PXRUSDMAYA_INSTANCED_NODE_WRITER_H
#define PXRUSDMAYA_INSTANCED_NODE_WRITER_H

/// \file usdMaya/instancedNodeWriter.h

#include "pxr/pxr.h"
#include "primWriter.h"

#include "../utils/util.h"
#include "writeJobContext.h"

#include "pxr/usd/sdf/path.h"
#include "pxr/usd/usd/timeCode.h"
#include <vector>

#include <maya/MFnDependencyNode.h>

#include <vector>
#include <pxr/pxr.h>
#include <pxr/usd/sdf/path.h>
#include <pxr/usd/usd/timeCode.h>

#include <mayaUsd/fileio/primWriter.h>
#include <mayaUsd/fileio/writeJobContext.h>
#include <mayaUsd/utils/util.h>

PXR_NAMESPACE_OPEN_SCOPE


/// This is a "helper" prim writer used internally by UsdMayaWriteJobContext to
/// author nodes that are directly instanced in Maya.
class UsdMaya_InstancedNodeWriter : public UsdMayaPrimWriter
Expand Down
Loading