Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a24eff04bd | |||
| 4d3cc85ece |
+3
-2
@@ -402,11 +402,12 @@ if(OPENUSD_HAS_CYCLES)
|
||||
DESTINATION bin/usd
|
||||
OPTIONAL
|
||||
)
|
||||
# Cycles runtime deps (embree4, epoxy, imath, openvdb, OIDN, sycl, etc.)
|
||||
# Cycles runtime deps (embree4, epoxy, imath, openvdb, OIDN, sycl, etc.).
|
||||
# No OPTIONAL: install(DIRECTORY) disallows it with FILES_MATCHING, and the
|
||||
# dir always exists here since it is produced by the CyclesBuild step.
|
||||
install(DIRECTORY "${CYCLES_INSTALL_DIR}/"
|
||||
DESTINATION bin
|
||||
FILES_MATCHING PATTERN "*.dll"
|
||||
OPTIONAL
|
||||
)
|
||||
# tbb12.dll (used by openvdb/embree4) lives in the precompiled lib tree, not install output
|
||||
install(FILES "${CYCLES_TBB12_DLL}"
|
||||
|
||||
@@ -645,11 +645,21 @@ bool TransformManipulator::HandleInput(const pxr::GfMatrix4d& vp,
|
||||
? deltaM * m_dragRotateInitialRotMat
|
||||
: m_dragRotateInitialRotMat * deltaM;
|
||||
|
||||
// usdtweak: GfRotation::DecomposeRotation(resultingRotation,
|
||||
// pxAxis, pyAxis, pzAxis, 1.0, &tw, &fb, &lr, &sw, true)
|
||||
const pxr::GfVec3d pxA=m_dragRotateInitialRotMat.GetRow3(0);
|
||||
const pxr::GfVec3d pyA=m_dragRotateInitialRotMat.GetRow3(1);
|
||||
const pxr::GfVec3d pzA=m_dragRotateInitialRotMat.GetRow3(2);
|
||||
// Decompose `result` (the new total local rotation matrix) back
|
||||
// into XformCommonAPI Euler angles.
|
||||
//
|
||||
// SetRotate() interprets the written angles as rotations about the
|
||||
// CANONICAL x/y/z axes, so the decompose axes MUST be canonical.
|
||||
// The previous port used the rows of initRot here -- i.e. the prim's
|
||||
// already-rotated frame -- which equals the canonical axes only when
|
||||
// the prim is at zero rotation. That mismatch is exactly why the
|
||||
// authored result desynced from the manipulator once the prim already
|
||||
// carried a rotation: the angles were measured in the rotated frame
|
||||
// but written as if they were canonical-frame angles.
|
||||
//
|
||||
// (Decomposition assumes RotationOrderXYZ -- the XformCommonAPI
|
||||
// default; non-XYZ orders are mapped tw->X, fb->Y, lr->Z as before.)
|
||||
static const pxr::GfVec3d kCanonX(1,0,0), kCanonY(0,1,0), kCanonZ(0,0,1);
|
||||
|
||||
double tw=pxr::GfDegreesToRadians(double(m_dragStartRotate[0]));
|
||||
double fb=pxr::GfDegreesToRadians(double(m_dragStartRotate[1]));
|
||||
@@ -657,7 +667,7 @@ bool TransformManipulator::HandleInput(const pxr::GfMatrix4d& vp,
|
||||
double sw=0;
|
||||
|
||||
pxr::GfRotation::DecomposeRotation(
|
||||
result,pxA,pyA,pzA,1.0,&tw,&fb,&lr,&sw,/*useHint=*/true);
|
||||
result,kCanonX,kCanonY,kCanonZ,1.0,&tw,&fb,&lr,&sw,/*useHint=*/true);
|
||||
|
||||
pxr::GfVec3f newRot(float(pxr::GfRadiansToDegrees(tw)),
|
||||
float(pxr::GfRadiansToDegrees(fb)),
|
||||
|
||||
Reference in New Issue
Block a user