Skip to content

Commit 7228dce

Browse files
authored
Merge pull request #24 from frenchdog/dev
BIFROST-9549 - Public update for Bifrost 2.9.0.0 release
2 parents 0e5968b + 8831dfa commit 7228dce

File tree

74 files changed

+9055
-934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+9055
-934
lines changed

CHANGELOG.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,29 @@
1-
## [1.2.1] - 2023-11-15
1+
## [1.2.2] - 2024-03-27 (Bifrost 2.9)
2+
3+
### Build
4+
5+
- BIFROST-9332 - Update to Bifrost 2.9 SDK
6+
- BIFROST-8981 - Update to USD 0.23.11
7+
- BIFROST-9147 - Make C++17 default
8+
9+
### Feature
10+
11+
- BIFROST-9354 - USD File Format Option
12+
13+
Add parameter to set a the USD layer format to ASCII or binary. Useful to save in human readable format and still keep the .usd extension.
14+
15+
- BIFROST-9334 - Add _get_edit_layer_ operator
16+
17+
This node returns the stage's EditTarget layer.
18+
19+
20+
### Bugfix
21+
22+
- BIFROST 9428 - Fix scalar attribute creation regression when _using add_to_stage_ compound
23+
- BIFROST-9334 - Fix save_usd_stage compound errors when current edit target is not the root layer
24+
- Update the _save_usd_stage_ compound. It is now setting the target layer to the root layer before saving and then restore the current target (using the new get_edit_layer operator).
25+
26+
## [1.2.1] - 2023-11-15 (Bifrost 2.8)
227

328
### Build
429

@@ -79,7 +104,7 @@
79104
- add README.md in test folder
80105

81106

82-
## [1.2.0] - 2023-05-12
107+
## [1.2.0] - 2023-05-12 (Bifrost 2.7)
83108

84109
### Build
85110

@@ -114,7 +139,7 @@
114139
- removed call to changeDir() that has side effect and is not required anymore for unit tests.
115140

116141

117-
## [1.1.0] - 2023-03-29
142+
## [1.1.0] - 2023-03-29 (Bifrost 2.7)
118143

119144
### Build
120145

@@ -135,6 +160,6 @@
135160

136161
### Bugfix
137162

138-
## [1.0.0] - 2022-12-12
163+
## [1.0.0] - 2022-12-12 (Bifrost 2.6)
139164

140165
- Initial release

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ endif()
3232

3333
set(IS_BIFUSD_STANDALONE ON CACHE BOOL "Indicate if this is a standalone build of Bifrost USD")
3434

35+
# C++ 17 not extensions - by default
36+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
37+
set(CMAKE_CXX_STANDARD 17)
38+
set(CMAKE_CXX_EXTENSIONS OFF)
39+
3540
include(cmake/version.info)
3641

3742
# Enable no language yet.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ You must provide the following variables to the cmake command:
2525
* BIFUSD_OSX_MIN_OS : (optional) Can be set to choose the minimum macOS deployement target. If not set, macOS 11.0 will be used.
2626
* BIFUSD_OSX_BINARY_ARCH : (optional) Can be set to choose the target architecture to build on macOS. Acceptable values are `x64` (Intel CPU), `arm64` (Apple M1 CPU), `ub2` (Universal Binary 2 - both x64 and arm64) and empty (default) (host system's processor).
2727

28+
__C++17 is the minimal required version going forward.__
29+
2830
__Python 3 version is assumed.__
2931

3032
__If your build uses MAYA_RUNTIME_LOCATION, you will need to use the same USD version than MayaUSD plugin.__

bifrost_hydra/src/BifrostHdEngine/CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
set(hd_Engine_headers
2020
Container.h
2121
Engine.h
22+
Export.h
2223
JobTranslationData.h
2324
Parameters.h
2425
Requirement.h
2526
Runtime.h
2627
ValueTranslationData.h
28+
Workspace.h
2729
)
2830

2931
bifusd_install_headers(
@@ -54,17 +56,18 @@ set(src_files
5456
Requirement.cpp
5557
Runtime.cpp
5658
ValueTranslationData.cpp
59+
Workspace.cpp
5760
)
5861

5962
bifusd_set_extra_rpaths(extra_rpaths)
6063

6164
bifusd_create_shared_lib(
62-
BifrostHdEngine "BIFROST_HD_ENGINE_BUILD_DLL" # TODO: add export file
65+
BifrostHdEngine "BIFROST_HD_ENGINE_BUILD_DLL" # TODO: add export file
6366
PUBLIC_INSTALL
64-
PUBLIC_DEFINITIONS $<${BIFUSD_IS_MSC}: BOOST_LIB_TOOLSET="vc141">
67+
PUBLIC_DEFINITIONS $<${BIFUSD_IS_MSC}: BOOST_LIB_TOOLSET="vc142">
6568
PRIVATE_DEFINITIONS $<${BIFUSD_IS_DEBUG}: TBB_USE_DEBUG BOOST_DEBUG_PYTHON BOOST_LINKING_PYTHON>
6669

67-
PRIVATE_OPTIONS $<${BIFUSD_IS_MSC}:/wd4251 /wd4273>
70+
PRIVATE_OPTIONS $<${BIFUSD_IS_MSC}:/wd4251 /wd4273 /wd4003>
6871
$<${BIFUSD_IS_GCC}: -Wno-deprecated -Wno-unused-macros>
6972
$<${BIFUSD_IS_CLANG}: -Wno-deprecated -Wno-unused-macros>
7073

bifrost_hydra/src/BifrostHdEngine/Container.cpp

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,33 @@
1616

1717
#include <BifrostHydra/Engine/Container.h>
1818

19+
#include <BifrostHydra/Engine/JobTranslationData.h>
20+
#include <BifrostHydra/Engine/Requirement.h>
21+
#include <BifrostHydra/Engine/Runtime.h>
22+
23+
#include <BifrostGraph/Executor/PreviewUtility.h>
24+
1925
#include <iostream>
2026

2127
namespace BifrostHd {
2228

23-
Container::Container() : BifrostBoardContainer(&Runtime::Get()), m_job(this) {}
29+
Container::Container(Runtime& runtime) : BifrostGraph::Executor::GraphContainerPreview(&runtime), m_job(this) {}
2430

2531
Container::~Container() = default;
2632

27-
/* static */
28-
Runtime& Container::GetRuntime() { return Runtime::Get(); }
29-
30-
BifrostBoardJob::Requirement* Container::createEvaluationRequirement(
31-
const Amino::String& name,
32-
Amino::PortDescription::PortDirection direction,
33-
const Amino::Type& type,
34-
BifrostGraph::Executor::TypeTranslation::PortClass portClass) const {
35-
Amino::Value defaultVal;
33+
BifrostGraph::Executor::JobPreview::Requirement*
34+
Container::createEvaluationRequirement(
35+
const Amino::String& name,
36+
BifrostGraph::Executor::PortDirection direction,
37+
const Amino::Type& type,
38+
BifrostGraph::Executor::PortClass portClass) const {
39+
Amino::Any defaultVal;
3640
Amino::PortDescription portDesc;
3741
if (getGraph().getPorts().findByName(name, portDesc)) {
38-
defaultVal = portDesc.value();
42+
BifrostGraph::Executor::Utility::convertValueToAny(
43+
getRuntime()->getAmLibrary(),
44+
portDesc.value(),
45+
defaultVal);
3946
}
4047

4148
return new Requirement(name, direction, type, portClass, defaultVal);
@@ -47,8 +54,8 @@ bool Container::initialize() {
4754
// Job Ports are global state ports, such as for time information.
4855
// For now TypeTranslation::portAdded() does nothing, so the
4956
// pointer can be nullptr.
50-
auto status =
51-
m_job.update(nullptr, BifrostBoardJob::CompileSwitch::kCompile);
57+
auto status = m_job.update(
58+
nullptr, BifrostGraph::Executor::JobPreview::CompileSwitch::kCompile);
5259

5360
// See BIFROST-3651.
5461
if (status == Amino::SetGraphStatus::Value::kFailure) {
@@ -99,13 +106,16 @@ bool Container::initialize() {
99106
}
100107

101108
bool Container::updateJob() {
102-
return m_job.update(nullptr, BifrostBoardJob::CompileSwitch::kCompile) !=
103-
BifrostBoardJob::EvaluationStatus::kFailure;
109+
return m_job.update(
110+
nullptr,
111+
BifrostGraph::Executor::JobPreview::CompileSwitch::kCompile) !=
112+
BifrostGraph::Executor::JobPreview::EvaluationStatus::kFailure;
104113
}
105114

106115
Amino::Job::State Container::executeJob(JobTranslationData& translationData) {
107-
return m_job.execute(&translationData,
108-
BifrostBoardJob::ExecuteFlags::kDefault);
116+
return m_job.execute(
117+
&translationData,
118+
BifrostGraph::Executor::JobPreview::ExecuteFlags::kDefault);
109119
}
110120

111121
} // namespace BifrostHd

bifrost_hydra/src/BifrostHdEngine/Container.h

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,26 @@
1717
#ifndef BIFROST_USD_ENGINE_CONTAINER_H_
1818
#define BIFROST_USD_ENGINE_CONTAINER_H_
1919

20-
#include <BifrostHydra/Engine/JobTranslationData.h>
21-
#include <BifrostHydra/Engine/Requirement.h>
22-
#include <BifrostHydra/Engine/Runtime.h>
20+
#include <BifrostHydra/Engine/Export.h>
2321

24-
#include <BifrostGraph/Executor/BifrostBoardJob.h>
22+
#include <BifrostGraph/Executor/GraphContainerPreview.h>
23+
#include <BifrostGraph/Executor/JobPreview.h>
2524

2625
namespace BifrostHd {
26+
class Runtime;
27+
class JobTranslationData;
2728

28-
class Container final : public BifrostBoardContainer {
29+
class BIFROST_HD_ENGINE_SHARED_DECL Container final : public BifrostGraph::Executor::GraphContainerPreview {
2930
public:
30-
explicit Container();
31+
explicit Container(Runtime& runtime);
3132
~Container() override;
3233

33-
static Runtime& GetRuntime();
34-
35-
BifrostBoardJob::Requirement* createEvaluationRequirement(
36-
const Amino::String& name,
37-
Amino::PortDescription::PortDirection direction,
38-
const Amino::Type& type,
39-
BifrostGraph::Executor::TypeTranslation::PortClass portClass)
40-
const override;
34+
BifrostGraph::Executor::JobPreview::Requirement*
35+
createEvaluationRequirement(
36+
const Amino::String& name,
37+
BifrostGraph::Executor::PortDirection direction,
38+
const Amino::Type& type,
39+
BifrostGraph::Executor::PortClass portClass) const override;
4140

4241
bool initialize();
4342

@@ -57,7 +56,7 @@ class Container final : public BifrostBoardContainer {
5756
/// \}
5857

5958
private:
60-
BifrostBoardJob m_job;
59+
BifrostGraph::Executor::JobPreview m_job;
6160
};
6261

6362
} // namespace BifrostHd

bifrost_hydra/src/BifrostHdEngine/Engine.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
#include <BifrostHydra/Engine/Engine.h>
1818

1919
#include <BifrostHydra/Engine/Container.h>
20+
#include <BifrostHydra/Engine/Runtime.h>
21+
#include <BifrostHydra/Engine/Workspace.h>
22+
2023
#include <BifrostHydra/Engine/JobTranslationData.h>
2124
#include <BifrostHydra/Engine/Parameters.h>
2225

@@ -36,15 +39,14 @@ class Engine::Impl {
3639
if (m_container.graphExecutionCounter() == 0) {
3740
if (!m_container.loadGraph(
3841
qualifiedName,
39-
BifrostBoardContainer::GraphMode::kLoadAsReference)) {
42+
BifrostGraph::Executor::GraphContainerPreview::GraphMode::kLoadAsReference)) {
4043
return Amino::Job::State::kErrors;
4144
}
4245
if (!m_container.updateJob()) {
4346
return Amino::Job::State::kErrors;
4447
}
4548
}
4649

47-
4850
const double currentTime = frame / m_fps;
4951
const double frameLength = 1.0 / m_fps;
5052

@@ -68,7 +70,7 @@ class Engine::Impl {
6870
private:
6971
double m_fps{24.0};
7072
Parameters m_parameters;
71-
BifrostHd::Container m_container;
73+
BifrostHd::Container m_container{BifrostHd::Runtime::getInstance()};
7274
};
7375

7476
Engine::Engine() : m_impl(std::make_unique<Impl>()) {}

bifrost_hydra/src/BifrostHdEngine/Engine.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,17 @@
1717
#ifndef BIFROST_HD_ENGINE_H
1818
#define BIFROST_HD_ENGINE_H
1919

20-
#include <AminoJob.h>
20+
#include <BifrostHydra/Engine/Export.h>
21+
22+
#include <Amino/AminoJob.h>
2123
#include <Bifrost/Object/Object.h>
2224

2325
#include <pxr/imaging/hd/sceneIndex.h>
2426

2527
#include <memory>
2628

2729
namespace BifrostHd {
30+
class Workspace;
2831

2932
/// \class Engine
3033
///
@@ -35,7 +38,7 @@ namespace BifrostHd {
3538
using Output =
3639
std::pair<std::string, Amino::Array<Amino::Ptr<Bifrost::Object>>>;
3740

38-
class Engine {
41+
class BIFROST_HD_ENGINE_SHARED_DECL Engine {
3942
public:
4043
Engine();
4144

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//-
2+
// Copyright 2023 Autodesk, Inc.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//+
16+
17+
#ifndef BIFROST_HD_ENGINE_EXPORT
18+
#define BIFROST_HD_ENGINE_EXPORT
19+
20+
#if defined(_WIN32) || defined(__CYGWIN__)
21+
#if defined(BIFROST_HD_ENGINE_BUILD_DLL)
22+
#define BIFROST_HD_ENGINE_SHARED_DECL __declspec(dllexport)
23+
#else
24+
#define BIFROST_HD_ENGINE_SHARED_DECL __declspec(dllimport)
25+
#endif
26+
27+
#elif defined(__GNUC__)
28+
#if defined(BIFROST_HD_ENGINE_BUILD_DLL)
29+
#define BIFROST_HD_ENGINE_SHARED_DECL __attribute__((visibility("default")))
30+
#else
31+
#define BIFROST_HD_ENGINE_SHARED_DECL
32+
#endif
33+
34+
#endif
35+
36+
#endif // BIFROST_HD_ENGINE_EXPORT

bifrost_hydra/src/BifrostHdEngine/JobTranslationData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class JobTranslationData::Impl {
3939
JobTranslationData::JobTranslationData(Parameters& params,
4040
bool logVerbose,
4141
Time const& time)
42-
: BifrostBoardJob::JobTranslationData(),
42+
: BifrostGraph::Executor::JobPreview::JobTranslationData(),
4343
m_impl(std::make_unique<Impl>(logVerbose, time, params)) {}
4444

4545
JobTranslationData::~JobTranslationData() = default;

0 commit comments

Comments
 (0)