-
Notifications
You must be signed in to change notification settings - Fork 202
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
Tremblp/maya 112824/pull push 01 to dev #1789
Changes from 10 commits
201d513
4e83794
63a5725
0e45628
5e78625
f115535
fa92815
02b7079
ffec2dc
acd10e4
2eb60f2
c3c8d8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,9 +12,6 @@ target_sources(${PROJECT_NAME} | |
primReaderArgs.cpp | ||
primReaderContext.cpp | ||
primReaderRegistry.cpp | ||
primUpdater.cpp | ||
primUpdaterContext.cpp | ||
primUpdaterRegistry.cpp | ||
primWriter.cpp | ||
primWriterArgs.cpp | ||
primWriterContext.cpp | ||
|
@@ -28,6 +25,19 @@ target_sources(${PROJECT_NAME} | |
writeJobContext.cpp | ||
) | ||
|
||
# Edit as Maya requires UFE path mapping. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, edit as Maya is conditional on UFE v3, because it requires UFE path mapping for proper Outliner support. However, it would theoretically be possible to back-port the UFE path mapping interface to UFE v2, as it is a purely additive interface change to UFE. This will be for future consideration. |
||
if(CMAKE_UFE_V3_FEATURES_AVAILABLE) | ||
target_sources(${PROJECT_NAME} | ||
PRIVATE | ||
fallbackPrimUpdater.cpp | ||
primUpdater.cpp | ||
primUpdaterArgs.cpp | ||
primUpdaterContext.cpp | ||
primUpdaterRegistry.cpp | ||
primUpdaterManager.cpp | ||
) | ||
endif() | ||
|
||
set(HEADERS | ||
fallbackPrimReader.h | ||
functorPrimReader.h | ||
|
@@ -38,9 +48,6 @@ set(HEADERS | |
primReaderArgs.h | ||
primReaderContext.h | ||
primReaderRegistry.h | ||
primUpdater.h | ||
primUpdaterContext.h | ||
primUpdaterRegistry.h | ||
primWriter.h | ||
primWriterArgs.h | ||
primWriterContext.h | ||
|
@@ -54,6 +61,17 @@ set(HEADERS | |
writeJobContext.h | ||
) | ||
|
||
if(CMAKE_UFE_V3_FEATURES_AVAILABLE) | ||
list(APPEND HEADERS | ||
fallbackPrimUpdater.h | ||
primUpdater.h | ||
primUpdaterArgs.h | ||
primUpdaterContext.h | ||
primUpdaterRegistry.h | ||
primUpdaterManager.h | ||
) | ||
endif() | ||
|
||
# ----------------------------------------------------------------------------- | ||
# promoted headers | ||
# ----------------------------------------------------------------------------- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// Copyright 2021 Autodesk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// 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 "fallbackPrimUpdater.h" | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
FallbackPrimUpdater::FallbackPrimUpdater(const MFnDependencyNode& depNodeFn, const Ufe::Path& path) | ||
: UsdMayaPrimUpdater(depNodeFn, path) | ||
{ | ||
} | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// Copyright 2021 Autodesk | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// 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. | ||
// | ||
#ifndef PXRUSDMAYA_FALLBACK_PRIMUPDATER_H | ||
#define PXRUSDMAYA_FALLBACK_PRIMUPDATER_H | ||
|
||
#include <mayaUsd/base/api.h> | ||
#include <mayaUsd/fileio/primUpdater.h> | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
class FallbackPrimUpdater : public UsdMayaPrimUpdater | ||
{ | ||
public: | ||
MAYAUSD_CORE_PUBLIC | ||
FallbackPrimUpdater(const MFnDependencyNode& depNodeFn, const Ufe::Path& path); | ||
|
||
// clang errors if you use "= default" here, due to const SdfPath member | ||
// see: http://open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#253 | ||
// ...which it seems clang only implements if using newer version + cpp std | ||
FallbackPrimUpdater() { } | ||
|
||
virtual ~FallbackPrimUpdater() = default; | ||
|
||
private: | ||
}; | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -589,6 +589,11 @@ const MDagPath& UsdMaya_ReadJob::GetMayaRootDagPath() const { return mMayaRootDa | |
|
||
double UsdMaya_ReadJob::timeSampleMultiplier() const { return mTimeSampleMultiplier; } | ||
|
||
const UsdMayaPrimReaderContext::ObjectRegistry& UsdMaya_ReadJob::GetNewNodeRegistry() const | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provide access to the import new Maya node registry, so that the edit as Maya code can be run on them. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it be available in python? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds potentially useful, but I could not find a Python wrapper wrapper for a UsdMaya_ReadJob. |
||
{ | ||
return mNewNodeRegistry; | ||
} | ||
|
||
double UsdMaya_ReadJob::_setTimeSampleMultiplierFrom(const double layerFPS) | ||
{ | ||
double sceneFPS = UsdMayaUtil::GetSceneMTimeUnitAsDouble(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,6 +78,14 @@ UsdMaya_WriteJob::UsdMaya_WriteJob(const UsdMayaJobExportArgs& iArgs) | |
|
||
UsdMaya_WriteJob::~UsdMaya_WriteJob() { } | ||
|
||
SdfPath UsdMaya_WriteJob::MapDagPathToSdfPath(const MDagPath& dagPath) const | ||
{ | ||
SdfPath usdPrimPath; | ||
TfMapLookup(mDagPathToUsdPathMap, dagPath, &usdPrimPath); | ||
|
||
return usdPrimPath; | ||
} | ||
|
||
/// Generates a name for a temporary usdc file in \p dir. | ||
/// Unless you are very, very unlucky, the stage name is unique because it's | ||
/// generated from a UUID. | ||
|
@@ -819,4 +827,9 @@ bool UsdMaya_WriteJob::_CheckNameClashes(const SdfPath& path, const MDagPath& da | |
return true; | ||
} | ||
|
||
const UsdMayaUtil::MDagPathMap<SdfPath>& UsdMaya_WriteJob::GetDagPathToUsdPathMap() const | ||
{ | ||
return mDagPathToUsdPathMap; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Provide access to the export Dag path to USD path map, so the merge to USD code can access it. |
||
} | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed duplicate name to Dag path utility and its uses.