Skip to content

Commit dbeb0bf

Browse files
authored
Merge pull request #28 from frenchdog/feature/BIFROST-10390/update_for_bifrost2_12_release
BIFROST-10929 Update for Bifrost 2.12.0.0
2 parents 93fd906 + 806ec18 commit dbeb0bf

38 files changed

+4456
-388
lines changed

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
## [1.3.1] - 2024-10-29 (Bifrost 2.12)
2+
3+
### Build
4+
- BIFROST-10711 - Prevent older boost from using deprecated templates
5+
- BIFROST-10578 - Fix sanitizer errors
6+
7+
### Feature
8+
- BIFROST-10691 - Set target layer using layer or display name instead of index
9+
10+
- Add layer input to add_to_stage and add_to_stage_in_variant nodes
11+
- Add layer_display_name input to set_edit_layer node
12+
- Add USD::Layer::get_layer_display_name Operator
13+
14+
### Bugfix
15+
- BIFROST-10745 - Fix Bifrost Browser scene "create_point_instancer_from_usd_file_example.ma".
16+
17+
Since the _scene_info_ node does not prepend a '/' anymore for the scene directory,
18+
a '/' separator has been added to build the path of the referenced USD file.
19+
20+
- BIFROST-11053 - Fix error message when opening Data Browser for the first time
21+
122
## [1.3.0] - 2024-07-29 (Bifrost 2.11)
223

324
### Build

CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,15 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
5454

5555
message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
5656

57+
# Boost headers are indirectly included by USD and Boost is still using
58+
# std::unary_function which was deprecated in C++11 and removed in C++17.
59+
# Defining BOOST_NO_CXX98_FUNCTION_BASE prevents Boost from using deprecated
60+
# templates. This seems to be fixed in Boost >= 1.81, so we may be able to
61+
# remove that when the version of boost shipped with USD is updated.
62+
# _HAS_AUTO_PTR_ETC is also needed for older boost versions.
63+
add_definitions(-DBOOST_NO_CXX98_FUNCTION_BASE=1)
64+
add_definitions(-D_HAS_AUTO_PTR_ETC=0)
65+
5766
#==============================================================================
5867
# Define common build variables
5968
#==============================================================================
@@ -152,6 +161,7 @@ include(${BIFUSD_TOOLS_DIR}/gtest.cmake)
152161
#==============================================================================
153162

154163
find_package(Bifrost REQUIRED SDK)
164+
find_package(OpenGL REQUIRED)
155165
find_package(USD REQUIRED)
156166

157167
#==============================================================================

bifrost_hydra/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ endif()
2222
find_package(Bifrost REQUIRED SDK)
2323

2424
add_subdirectory(src)
25-
add_subdirectory(test)
25+
26+
if (NOT BIFUSD_ENABLE_ADDRESS_SANITIZER)
27+
# Skip tests when using adress sanitizer as when building Bifrost USD standalone, it errors with:
28+
# "AddressSanitizer:DEADLYSIGNAL 1: AddressSanitizer: nested bug in the same thread, aborting."
29+
add_subdirectory(test)
30+
endif()

bifrost_hydra/src/BifrostHdGraph/BifrostGraphGenerativeProceduralPlugin.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//-
2-
// Copyright 2023 Autodesk, Inc.
2+
// Copyright 2024 Autodesk, Inc.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -18,6 +18,8 @@
1818

1919
#include "BifrostGraphGenerativeProcedural.h"
2020

21+
#include <bifusd/config/CfgWarningMacros.h>
22+
2123
#include <pxr/imaging/hdGp/generativeProceduralPluginRegistry.h>
2224

2325
PXR_NAMESPACE_USING_DIRECTIVE
@@ -32,7 +34,11 @@ HdGpGenerativeProcedural* BifrostGraphGenerativeProceduralPlugin::Construct(
3234

3335
///////////////////////////////////////////////////////////////////////////////
3436

37+
BIFUSD_WARNING_PUSH
38+
// Silence USD warning that we cast from 'void (*)(TfType *)' to 'void (*)()'
39+
BIFUSD_WARNING_DISABLE_CLANG_160(-Wcast-function-type-strict)
3540
TF_REGISTRY_FUNCTION(TfType) {
41+
BIFUSD_WARNING_POP
3642
HdGpGenerativeProceduralPluginRegistry::Define<
3743
BifrostGraphGenerativeProceduralPlugin,
3844
HdGpGenerativeProceduralPlugin>();

bifrost_hydra/test/CMakeLists.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,16 @@ set(usd_env_config
8080
USD_TEST_OUTPUT_DIR=${CMAKE_CURRENT_BINARY_DIR}
8181
)
8282

83+
if (BIFUSD_ENABLE_ADDRESS_SANITIZER)
84+
set(asan_options ASAN_OPTIONS=detect_container_overflow=0)
85+
endif()
86+
8387
foreach(test_file ${test_files})
8488
configure_bifusd_unittest(
8589
${test_file} "bifrost_hydra"
8690
LINK_LIBS ${libs} ${pxr_libs}
8791
SHARED_LIB_DIRS ${BIFUSD_EXTRA_BUILD_AND_TEST_PATHS} ${Maya_SHARED_LIB_DIRS}
88-
ENV_VARS ${bifrost_env_config} ${usd_env_config}
89-
ASAN_OPTIONS ${ASAN_OPTIONS}
92+
ENV_VARS ${bifrost_env_config} ${usd_env_config} ${asan_options}
9093
OPTIONS $<${BIFUSD_IS_MSC}:/wd4251 /wd4273>
9194
)
9295
get_unittest_target(unittest_target "bifrost_hydra" ${test_file})

cmake/bifusd/compiler_Clang.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-
22
#*****************************************************************************
3-
# Copyright 2023 Autodesk, Inc.
3+
# Copyright 2024 Autodesk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -188,3 +188,7 @@ set(CMAKE_CXX_FLAGS_DEBUG_INIT "${cxx_flags_debug}")
188188

189189
# compiler flags
190190
set(cxx_flags -fPIC)
191+
192+
if (BIFUSD_ENABLE_ADDRESS_SANITIZER)
193+
list(APPEND cxx_flags -fsanitize=address)
194+
endif()

cmake/bifusd/gtest.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-
22
#*****************************************************************************
3-
# Copyright 2022 Autodesk, Inc.
3+
# Copyright 2024 Autodesk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -28,6 +28,7 @@ if(NOT BIFUSD_GTEST_LOCATION)
2828
googletest
2929
GIT_REPOSITORY https://github.com/google/googletest.git
3030
GIT_TAG release-1.12.1
31+
GIT_CONFIG core.longpaths=true
3132
)
3233

3334
# Populate

cmake/bifusd/src/config/CfgWarningMacros.h

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//-
2-
// Copyright 2022 Autodesk, Inc.
2+
// Copyright 2024 Autodesk, Inc.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
@@ -108,6 +108,12 @@
108108
#define BIFUSD_WARNING_DISABLE_CLANG_80(a)
109109
#endif
110110

111+
#if BIFUSD_IS_CLANG && (__clang_major__ >= 16)
112+
#define BIFUSD_WARNING_DISABLE_CLANG_160(a) BIFUSD_WARNING_DISABLE(a)
113+
#else
114+
#define BIFUSD_WARNING_DISABLE_CLANG_160(a)
115+
#endif
116+
111117
#if BIFUSD_IS_GCC
112118
#define BIFUSD_WARNING_DISABLE_GCC(a) BIFUSD_WARNING_DISABLE(a)
113119
#else

cmake/bifusd/utils.cmake

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#-
22
#*****************************************************************************
3-
# Copyright 2023 Autodesk, Inc.
3+
# Copyright 2024 Autodesk, Inc.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ endif()
2121
set(bifusd_utils_included true)
2222

2323
option(BIFUSD_USE_DEBUGGER "Launch unit tests using the platform-specific debugger." OFF)
24+
option(BIFUSD_ENABLE_ADDRESS_SANITIZER "Enable AddressSanitizer compiler instrumentations." OFF)
2425

2526
# Export the given list of variables from the local scope to the parent scope.
2627
#

cmake/version.info

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set(BIFROST_USD_PACK_MAJOR_VERSION 1)
22
set(BIFROST_USD_PACK_MINOR_VERSION 3)
3-
set(BIFROST_USD_PACK_PATCH_LEVEL 0)
3+
set(BIFROST_USD_PACK_PATCH_LEVEL 1)

examples/maya_plugin/python/bifrost_usd/component_creator/ui/component_creator_help.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Creates a Bifrost Graph with a _create_usd_component_ compound. The graph result
1111
- (optional) A _Look_ VariantSet to select different look variants from the default prim.
1212
- The _extentsHint_ attributes to display the component as a bounding box added on the default prim.
1313
- The _assetInfo_ metadata
14-
- A _Bifrost::usd_component_ dictionnary (in customLayerData) storing information like the host scene who generated the component.
14+
- A _Bifrost::usd_component_ dictionary (in customLayerData) storing information like the host scene who generated the component.
1515

1616
```
1717

src/BifrostUsd/Attribute.cpp

+1-21
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
#include <Amino/Cpp/ClassDefine.h>
2121

22-
/// \todo BIFROST-6874 remove PXR_NS::Work_EnsureDetachedTaskProgress();
23-
#include <pxr/base/work/detachedTask.h>
2422

2523
namespace BifrostUsd {
2624
Attribute::Attribute(PXR_NS::UsdAttribute attribute, Amino::Ptr<Prim> prim)
@@ -29,24 +27,6 @@ Attribute::Attribute(PXR_NS::UsdAttribute attribute, Amino::Ptr<Prim> prim)
2927
}
3028
Attribute::~Attribute() = default;
3129

32-
//------------------------------------------------------------------------------
33-
//
34-
namespace {
35-
Amino::Ptr<BifrostUsd::Attribute> createDefaultAttribute() {
36-
// Destructor of USD instances are lauching threads. This result in
37-
// a deadlock on windows when unloading the library (which destroys the
38-
// default constructed object held in static variables).
39-
/// \todo BIFROST-6874 remove PXR_NS::Work_EnsureDetachedTaskProgress();
40-
PXR_NS::Work_EnsureDetachedTaskProgress();
41-
auto stage = Amino::newClassPtr<BifrostUsd::Stage>();
42-
auto pxr_prim = stage->get().GetPseudoRoot();
43-
auto prim = Amino::newClassPtr<BifrostUsd::Prim>(pxr_prim, stage);
44-
auto pxr_attr = pxr_prim.CreateAttribute(PXR_NS::TfToken(""),
45-
PXR_NS::SdfValueTypeName());
46-
return Amino::newClassPtr<BifrostUsd::Attribute>(pxr_attr, prim);
47-
}
48-
} // namespace
4930
} // namespace BifrostUsd
5031

51-
AMINO_DEFINE_DEFAULT_CLASS(BifrostUsd::Attribute,
52-
BifrostUsd::createDefaultAttribute());
32+
AMINO_DEFINE_DEFAULT_CLASS(BifrostUsd::Attribute);

src/BifrostUsd/Layer.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@
2020

2121
#include <Amino/Cpp/ClassDefine.h>
2222

23-
/// \todo BIFROST-6874 remove PXR_NS::Work_EnsureDetachedTaskProgress();
24-
#include <pxr/base/work/detachedTask.h>
25-
2623
// Note: To silence warnings coming from USD library
2724
#include <bifusd/config/CfgWarningMacros.h>
2825
BIFUSD_WARNING_PUSH
@@ -483,11 +480,6 @@ Amino::String Layer::getPathWithValidUsdFileFormat(const Amino::String& path) {
483480
//
484481
namespace {
485482
Amino::Ptr<BifrostUsd::Layer> createDefaultLayer() {
486-
// Destructor of USD instances are lauching threads. This result in
487-
// a deadlock on windows when unloading the library (which destroys the
488-
// default constructed object held in static variables).
489-
/// \todo BIFROST-6874 remove PXR_NS::Work_EnsureDetachedTaskProgress();
490-
PXR_NS::Work_EnsureDetachedTaskProgress();
491483
return Amino::newClassPtr<BifrostUsd::Layer>(BifrostUsd::Layer::Invalid{});
492484
}
493485
} // namespace

0 commit comments

Comments
 (0)