Skip to content

Commit 8e832e7

Browse files
scpetersadlarkin
andauthored
Use USD component visibility macro (#849)
Each component has its own Export.hh header file and its own visibility macros, so use the proper visibility macros in the USD component. Signed-off-by: Steve Peters <scpeters@openrobotics.org> * usd full path to Export.hh instead of relative Signed-off-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com> Co-authored-by: Ashton Larkin <42042756+adlarkin@users.noreply.github.com>
1 parent 53b9d8e commit 8e832e7

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

usd/include/sdf/usd/sdf_parser/Light.hh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#pragma pop_macro ("__DEPRECATED")
3131

3232
#include "sdf/config.hh"
33-
#include "sdf/system_util.hh"
33+
#include "sdf/usd/Export.hh"
3434
#include "sdf/Light.hh"
3535

3636
namespace sdf
@@ -48,8 +48,10 @@ namespace sdf
4848
/// be a valid USD path.
4949
/// \return Errors, which is a vector of Error objects. Each Error includes
5050
/// an error code and message. An empty vector indicates no error.
51-
sdf::Errors SDFORMAT_VISIBLE ParseSdfLight(const sdf::Light &_light,
52-
pxr::UsdStageRefPtr &_stage, const std::string &_path);
51+
sdf::Errors IGNITION_SDFORMAT_USD_VISIBLE ParseSdfLight(
52+
const sdf::Light &_light,
53+
pxr::UsdStageRefPtr &_stage,
54+
const std::string &_path);
5355
}
5456
}
5557
}

usd/include/sdf/usd/sdf_parser/Utils.hh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
#pragma pop_macro ("__DEPRECATED")
3636

3737
#include "sdf/SemanticPose.hh"
38-
#include "sdf/config.hh"
3938
#include "sdf/system_util.hh"
39+
#include "sdf/usd/Export.hh"
4040

4141
namespace sdf
4242
{
@@ -52,7 +52,8 @@ namespace sdf
5252
/// \return _obj's pose w.r.t. its parent. If there was an error computing
5353
/// this pose, the pose's position will be NaNs.
5454
template <typename T>
55-
inline ignition::math::Pose3d SDFORMAT_VISIBLE PoseWrtParent(const T &_obj)
55+
inline ignition::math::Pose3d IGNITION_SDFORMAT_USD_VISIBLE
56+
PoseWrtParent(const T &_obj)
5657
{
5758
ignition::math::Pose3d pose(ignition::math::Vector3d::NaN,
5859
ignition::math::Quaterniond::Identity);
@@ -70,8 +71,10 @@ namespace sdf
7071
/// \param[in] _stage The stage that contains the USD prim at path _usdPath.
7172
/// \param[in] _usdPath The path to the USD prim that should have its
7273
/// pose modified to match _pose.
73-
inline void SDFORMAT_VISIBLE SetPose(const ignition::math::Pose3d &_pose,
74-
pxr::UsdStageRefPtr &_stage, const pxr::SdfPath &_usdPath)
74+
inline void IGNITION_SDFORMAT_USD_VISIBLE SetPose(
75+
const ignition::math::Pose3d &_pose,
76+
pxr::UsdStageRefPtr &_stage,
77+
const pxr::SdfPath &_usdPath)
7578
{
7679
pxr::UsdGeomXformCommonAPI geomXformAPI(_stage->GetPrimAtPath(_usdPath));
7780

usd/include/sdf/usd/sdf_parser/World.hh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#pragma pop_macro ("__DEPRECATED")
3131

3232
#include "sdf/config.hh"
33-
#include "sdf/system_util.hh"
33+
#include "sdf/usd/Export.hh"
3434
#include "sdf/World.hh"
3535

3636
namespace sdf
@@ -48,8 +48,10 @@ namespace sdf
4848
/// a valid USD path.
4949
/// \return Errors, which is a vector of Error objects. Each Error includes
5050
/// an error code and message. An empty vector indicates no error.
51-
sdf::Errors SDFORMAT_VISIBLE ParseSdfWorld(const sdf::World &_world,
52-
pxr::UsdStageRefPtr &_stage, const std::string &_path);
51+
sdf::Errors IGNITION_SDFORMAT_USD_VISIBLE ParseSdfWorld(
52+
const sdf::World &_world,
53+
pxr::UsdStageRefPtr &_stage,
54+
const std::string &_path);
5355
}
5456
}
5557
}

0 commit comments

Comments
 (0)