-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #567 from marktucker/dev_usdvol_combined
Combined UsdVol schema and Hydra changes (Internal change: 1890691)
- Loading branch information
Showing
56 changed files
with
5,131 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Copyright 2018 Pixar | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "Apache License") | ||
// with the following modification; you may not use this file except in | ||
// compliance with the Apache License and the following modification to it: | ||
// Section 6. Trademarks. is deleted and replaced with: | ||
// | ||
// 6. Trademarks. This License does not grant permission to use the trade | ||
// names, trademarks, service marks, or product names of the Licensor | ||
// and its affiliates, except as required to comply with Section 4(c) of | ||
// the License and to reproduce the content of the NOTICE file. | ||
// | ||
// You may obtain a copy of the Apache License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the Apache License with the above modification is | ||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the Apache License for the specific | ||
// language governing permissions and limitations under the Apache License. | ||
// | ||
#include "pxr/imaging/hd/field.h" | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
HdField::HdField(SdfPath const &id) | ||
: HdBprim(id) | ||
{ | ||
} | ||
|
||
HdField::~HdField() | ||
{ | ||
} | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// | ||
// Copyright 2018 Pixar | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "Apache License") | ||
// with the following modification; you may not use this file except in | ||
// compliance with the Apache License and the following modification to it: | ||
// Section 6. Trademarks. is deleted and replaced with: | ||
// | ||
// 6. Trademarks. This License does not grant permission to use the trade | ||
// names, trademarks, service marks, or product names of the Licensor | ||
// and its affiliates, except as required to comply with Section 4(c) of | ||
// the License and to reproduce the content of the NOTICE file. | ||
// | ||
// You may obtain a copy of the Apache License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the Apache License with the above modification is | ||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the Apache License for the specific | ||
// language governing permissions and limitations under the Apache License. | ||
// | ||
#ifndef HD_FIELD_H | ||
#define HD_FIELD_H | ||
|
||
#include "pxr/pxr.h" | ||
#include "pxr/imaging/hd/api.h" | ||
#include "pxr/imaging/hd/version.h" | ||
#include "pxr/imaging/hd/bprim.h" | ||
|
||
#include <boost/shared_ptr.hpp> | ||
|
||
#include <vector> | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
class HdSceneDelegate; | ||
typedef boost::shared_ptr<class HdField> HdFieldSharedPtr; | ||
typedef std::vector<class HdField const *> HdFieldPtrConstVector; | ||
|
||
/// \class HdField | ||
/// | ||
/// Hydra schema for a USD field primitive. Acts like a texture, combined | ||
/// with other fields to make up a renderable volume. | ||
/// | ||
class HdField : public HdBprim { | ||
public: | ||
HD_API | ||
HdField(SdfPath const & id); | ||
HD_API | ||
virtual ~HdField(); | ||
|
||
// Change tracking for HdField | ||
enum DirtyBits : HdDirtyBits { | ||
Clean = 0, | ||
DirtyTransform = 1 << 0, | ||
DirtyParams = 1 << 1, | ||
AllDirty = (DirtyTransform | ||
|DirtyParams) | ||
}; | ||
}; | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE | ||
|
||
#endif // HD_FIELD_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// Copyright 2018 Pixar | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "Apache License") | ||
// with the following modification; you may not use this file except in | ||
// compliance with the Apache License and the following modification to it: | ||
// Section 6. Trademarks. is deleted and replaced with: | ||
// | ||
// 6. Trademarks. This License does not grant permission to use the trade | ||
// names, trademarks, service marks, or product names of the Licensor | ||
// and its affiliates, except as required to comply with Section 4(c) of | ||
// the License and to reproduce the content of the NOTICE file. | ||
// | ||
// You may obtain a copy of the Apache License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the Apache License with the above modification is | ||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the Apache License for the specific | ||
// language governing permissions and limitations under the Apache License. | ||
// | ||
#include "pxr/imaging/hd/volume.h" | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
HdVolume::HdVolume(SdfPath const& id, SdfPath const& instancerId) | ||
: HdRprim(id, instancerId) | ||
{ | ||
} | ||
|
||
HdVolume::~HdVolume() | ||
{ | ||
} | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// | ||
// Copyright 2018 Pixar | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "Apache License") | ||
// with the following modification; you may not use this file except in | ||
// compliance with the Apache License and the following modification to it: | ||
// Section 6. Trademarks. is deleted and replaced with: | ||
// | ||
// 6. Trademarks. This License does not grant permission to use the trade | ||
// names, trademarks, service marks, or product names of the Licensor | ||
// and its affiliates, except as required to comply with Section 4(c) of | ||
// the License and to reproduce the content of the NOTICE file. | ||
// | ||
// You may obtain a copy of the Apache License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the Apache License with the above modification is | ||
// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the Apache License for the specific | ||
// language governing permissions and limitations under the Apache License. | ||
// | ||
#ifndef HD_VOLUME_H | ||
#define HD_VOLUME_H | ||
|
||
#include "pxr/pxr.h" | ||
#include "pxr/imaging/hd/api.h" | ||
#include "pxr/imaging/hd/version.h" | ||
#include "pxr/imaging/hd/rprim.h" | ||
|
||
#include <boost/shared_ptr.hpp> | ||
|
||
#include <vector> | ||
|
||
PXR_NAMESPACE_OPEN_SCOPE | ||
|
||
class HdSceneDelegate; | ||
typedef boost::shared_ptr<class HdVolume> HdVolumeSharedPtr; | ||
typedef std::vector<class HdVolume const *> HdVolumePtrConstVector; | ||
|
||
/// \class HdVolume | ||
/// | ||
/// Hd schema for a renderable volume primitive. | ||
/// | ||
class HdVolume : public HdRprim { | ||
public: | ||
HD_API | ||
HdVolume(SdfPath const& id, SdfPath const& instancerId = SdfPath()); | ||
|
||
HD_API | ||
virtual ~HdVolume(); | ||
}; | ||
|
||
PXR_NAMESPACE_CLOSE_SCOPE | ||
|
||
#endif // HD_VOLUME_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ set(DIRS | |
pcp | ||
usd | ||
usdGeom | ||
usdVol | ||
usdLux | ||
usdShade | ||
usdHydra | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
set(PXR_PREFIX pxr/usd) | ||
set(PXR_PACKAGE usdVol) | ||
|
||
pxr_library(usdVol | ||
|
||
LIBRARIES | ||
tf | ||
usd | ||
usdGeom | ||
|
||
PUBLIC_CLASSES | ||
volume | ||
fieldBase | ||
fieldAsset | ||
field3DAsset | ||
openVDBAsset | ||
tokens | ||
|
||
PUBLIC_HEADERS | ||
api.h | ||
|
||
PYTHON_CPPFILES | ||
moduleDeps.cpp | ||
|
||
PYMODULE_CPPFILES | ||
module.cpp | ||
wrapVolume.cpp | ||
wrapFieldBase.cpp | ||
wrapFieldAsset.cpp | ||
wrapField3DAsset.cpp | ||
wrapOpenVDBAsset.cpp | ||
wrapTokens.cpp | ||
|
||
PYMODULE_FILES | ||
__init__.py | ||
|
||
RESOURCE_FILES | ||
generatedSchema.usda | ||
plugInfo.json | ||
schema.usda:usdVol/schema.usda | ||
) | ||
|
||
pxr_test_scripts( | ||
testenv/testUsdVolVolume.py | ||
) | ||
|
||
pxr_register_test(testUsdVolVolume | ||
PYTHON | ||
COMMAND "${CMAKE_INSTALL_PREFIX}/tests/testUsdVolVolume" | ||
EXPECTED_RETURN_CODE 0 | ||
) | ||
|
||
|
Oops, something went wrong.