-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Katana plugin v0.7.6: crashes when expanding Usd PointInstances #239
Comments
I found the issue.
You care for a PR or is it ok for you guys handling it? |
Thanks, Blazej! Agreed that's the fix, and I think we can handle it here.
Sorry for the regression.
…On 07/14/2017 10:37 AM, Blazej Floch wrote:
I found the issue.
We do not have Scale Attributes in our point instances.
This will fix it:
|--- a/third_party/katana/plugin/pxrUsdInShipped/pointInstancerUtils.cpp +++
b/third_party/katana/plugin/pxrUsdInShipped/pointInstancerUtils.cpp @@
-83,8 +83,8 @@
PxrUsdInShipped_PointInstancerUtils::ComputeInstanceTransformsAtTime( if
(positions.size() != numInstances) { break; } - scalesAttr.Get(&scales,
sampleTimes[a]); - orientationsAttr.Get(&orientations, sampleTimes[a]); +
bool hasScales = scalesAttr.Get(&scales, sampleTimes[a]); + bool
hasOrientations = orientationsAttr.Get(&orientations, sampleTimes[a]); if
(scales.size() > 0 and scales.size() != numInstances) { break; } @@ -95,8
+95,14 @@
PxrUsdInShipped_PointInstancerUtils::ComputeInstanceTransformsAtTime( for
(auto i = decltype(numInstances){0}; i < numInstances; ++i) { GfTransform
transform; transform.SetTranslation(positions[i]); -
transform.SetScale(scales[i]); -
transform.SetRotation(GfRotation(orientations[i])); + if(hasScales) + { +
transform.SetScale(scales[i]); + } + if(hasOrientations) + { +
transform.SetRotation(GfRotation(orientations[i])); + }
curr.push_back(transform.GetMatrix()); } |
You care for a PR or is it ok for you guys handling it?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#239 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF7qaCo98FVwhcwZJIM8JTpF3bQjtdQaks5sN6dSgaJpZM4OXoSq>.
|
Filed as internal issue #148741. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description of Issue
When a point instancing usd file is loaded in Katana and expanded to the instancer
katana crashes with:
Looks related to the changes at: 5740c6b
Same file works with 0.7.5.
Steps to Reproduce
System Information (OS, Hardware)
Linux, CentOS 7.3
Package Versions
Katana 2.6v1
Usd 0.7.6
Build Flags
Pretty much default.
The text was updated successfully, but these errors were encountered: