-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[usdMaya] Adding a maya particle writer. #208
[usdMaya] Adding a maya particle writer. #208
Conversation
Uh-oh... I forgot that the velocity in maya is per second, and it's most likely per frame in USD. I'm going to check that and update the pull request with scaling down the velocity if necessary. |
ca8a0c5
to
f29d9e1
Compare
Added velocity scaling. |
The documentation is going to be changed for pointBased, and the requirement for the velocity is going to be per second, so I removed the velocity scaling from the writer. |
f29d9e1
to
7ef2fc4
Compare
Filed as internal issue #147136. |
7ef2fc4
to
b98b6b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing along notes from our sets team.
We were also wondering if it'd be possible to include some tests. Thanks!
@@ -0,0 +1,362 @@ | |||
// | |||
// Copyright 2016 Pixar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update the year in the copyright notice here to 2017?
constexpr auto _cached = "cached"; | ||
constexpr auto _Cache = "Cache"; | ||
const auto attrNameSize = attrName.size(); | ||
if (attrNameSize > 5 && attrName.substr(attrNameSize - 6) == _Cache) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be:
return TfStringEndsWith(attrName, _Cache) || TfStringStartsWith(attrName, _cached);
(need to include "pxr/base/tf/stringUtils.h")
} | ||
|
||
const auto particleNode = getDagPath().node(); | ||
MFnParticleSystem PS(particleNode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nitpick: for consistency with coding conventions, could we change the variable names PS
and DPS
? I think i would've gone with particleSys
and deformedParticleSys
but that is quite a lot to type..
@@ -0,0 +1,68 @@ | |||
// | |||
// Copyright 2016 Pixar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like above, please update year to 2017 here
b98b6b2
to
9fc5380
Compare
Signed-off-by: Pal Mezei <palm@lumapictures.com>
9fc5380
to
e731851
Compare
@sunyab updated the PR and added a simple test. I also updated the copyright notices to 2018. :) |
[usdMaya] Adding a maya particle writer.
I finally got around to merging this change, thanks so much for your patience. There were a few fixups I had to make to resolve conflicts and to get this change trued up with the current state of the world. Most notably, the particle writing code was using a VtArray when writing the ids attribute, which broke on Windows and MacOS. The documentation on the ids attribute does say to use VtArray, but this is a bug in our code generation we need to fix. I've changed this to use VtArray<int64_t>, which lines up with the Int64Array attribute type. The unit test you added (thank you for that!) passes with this change. Please let me know if there's any issues with these changes. Thanks again! |
…74] Add the support for input/output qualifiers (PixarAnimationStudios#208) ### Description of Change(s) Add the support for input/output qualifiers. Currently only "flat" qualifier is supported. ### Fixes Issue(s) OGSMOD-2574: Input/output layout doesn't support qualifiers For example, you can not add "flat", "smooth" or "noperspective" to an input. (cherry picked from commit 6bcb00af841f3abfc8353c32338e54c44a71a2f0) Co-authored-by: Pierre Wang <Pierre.Wang@autodesk.com>
Description of Change(s)
Adding a prim writer for Maya Particles and NParticles. The logic for exporting user attributes (which ones to ignore mostly) is taken from partio4Maya.
Note, the exporter fails on Maya 2016 ext2 if you are writing out a cached NParticle. However, the same code works with Maya 2016 and Maya 2017. There seems to be a critical bug in 2016 ext2 that zeroes out all the position values, but all the other attributes work just fine. The same problem was seen with Maya To Arnold, PartIO Export, and even the built-in Maya Instancer.
Fixes Issue(s)
No reported issue.