Skip to content
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

Pixar Mesh write translator/utilities refactoring #420

Merged
merged 47 commits into from
Jul 1, 2020
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
0a2e072
Refactored _GetDagPath, _GetDagPathMap and moved them under UsdMayaUt…
Apr 10, 2020
f87dae6
Rename meshUtil to meshReadUtils.
Apr 10, 2020
4fe993e
- Initial commit to introduce TranslatorMeshWrite class ( this class …
Apr 10, 2020
b67e5e2
- Remove meshWriter_Subdiv and start using UsdMayaMeshUtil::assignSub…
Apr 10, 2020
8b94425
Created utility functions for writing Maya mesh data to USD:
Apr 10, 2020
a0ee49c
Create utility functions for writing out UVSets as Vec2f Primvars.
Apr 10, 2020
4160201
Removed meshWriter_Skin and created a new utility namespace (UsdMayaJ…
Apr 10, 2020
5c8f3a6
Removed meshWriter_Primvars and created a new utility for writing col…
Apr 10, 2020
331aee4
Start using UsdMayaWriteUtil::SetAttribute utilities in all writers:
Apr 10, 2020
9750303
Created utility functions for writing Maya mesh data to USD:
Apr 10, 2020
9c0ade6
Address feedback: use getDagPath() in UsdMayaWriteJobContext::CreateP…
May 25, 2020
1e492f2
Address feedbacks.
May 27, 2020
80f2240
Address feedback ( Matt ).
May 27, 2020
2b1e304
Address feedback ( Rob ).
May 27, 2020
9f2d55a
Address feedback: remove unnecessary try/catch.
May 27, 2020
45f0f51
Address feedback: rename wrapMeshUtil to wrapMeshWriteUtils
May 27, 2020
8e3a0ac
address feedback.
May 27, 2020
b7a202b
address feedback: make sure to handle both DAG nodes or DG nodes.
May 27, 2020
a02159c
Address feedback:
May 27, 2020
4ca16c0
Address feedback: use VtVec3fArray, VtIntArray, VtFloatArray instead …
May 27, 2020
ab0a321
Address feedback: return early if the status is false.
May 27, 2020
b5ec789
Merge pull request #421 from Autodesk/sabrih/MAYA-101460/pxr_mesh_wri…
HamedSabri-adsk May 28, 2020
25a5c20
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part3' into sabrih/MA…
May 28, 2020
812adf6
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part1' into sabrih/MA…
HamedSabri-adsk May 28, 2020
9b138b3
Merge pull request #423 from Autodesk/sabrih/MAYA-101460/pxr_mesh_wri…
HamedSabri-adsk May 28, 2020
9cb5880
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part5' into sabrih/MA…
May 28, 2020
d5426d3
Address feedbacks:
May 28, 2020
047a097
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part6' into sabrih/MA…
May 28, 2020
c1682b3
post merge fixes.
May 28, 2020
2d15079
address feedback:
May 29, 2020
2ea47fd
Merge pull request #426 from Autodesk/sabrih/MAYA-101460/pxr_mesh_wri…
HamedSabri-adsk May 29, 2020
35c0c0f
Address feedback: add parameter names in a function prototype
May 29, 2020
12ad434
address feedback: replace Default with Unauthored
May 29, 2020
5a64848
Address feedback: use VtVec3fArray, VtIntArray, VtFloatArray instead …
May 29, 2020
f7f193b
address feedback: fix the comments pointing at the old function names.
May 29, 2020
a7ccad1
address feedback: remove changes that were accidentally pulled into t…
May 29, 2020
6a4686e
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part8' into sabrih/MA…
May 29, 2020
5ecb68c
Fix post merge!
May 29, 2020
062ac5a
Add feedback: refactor SetAttribute termplate functions.
Jun 1, 2020
21850e1
Merge branch 'sabrih/MAYA-101460/pxr_mesh_write_part9' into sabrih/MA…
Jun 1, 2020
39c824f
Merge branch 'dev' into sabrih/MAYA-101460/pxr_mesh_write_part1
Jun 1, 2020
d891b7e
Address feedback: swap the last 2 arguments passed to SetAttribute te…
Jun 1, 2020
a520d00
Fix python binding.
Jun 5, 2020
53dd501
Merge branch 'dev' into sabrih/MAYA-101460/pxr_mesh_write_part1
Jun 10, 2020
5803a46
comment out the logics in wrapMeshWriteUtils. This code is not used a…
Jun 11, 2020
be3c545
Revert "comment out the logics in wrapMeshWriteUtils. This code is no…
Jun 11, 2020
7a1f16a
Merge branch 'dev' into sabrih/MAYA-101460/pxr_mesh_write_part1
Jun 30, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/mayaUsd/python/wrapMeshWriteUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ class DummyScopeClass{};

} // anonymous namespace


void wrapMeshWriteUtils()
{
// TODO: HS, June 11, 2020 This logics is not accurate. Revisit this later.
// There are no test cases around is not being consumed in any tests.
/*
scope s = class_<DummyScopeClass>("MeshWriteUtils", no_init)

.def("GetMeshNormals", &_GetMeshNormals)
.staticmethod("GetMeshNormals")

;
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HamedSabri-adsk: Can you please revert this change? True that the Python bindings for this are not used anywhere in maya-usd, but we have internal code that does this (using the old name):

from pxr.UsdMaya import MeshUtil
(normalsArray, interpolation) = MeshUtil.GetMeshNormals(...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @mattyjams Sure will do. But before that I want to understand a few things:

1-
I can see in the original code that GetMeshNormals is not a static function and yet it in the python binding is declared as staticmethod. I am not an expert in Boost python binding but curious how this works?

PixarAnimationStudios/OpenUSD@be80acc

2- MeshUtil has now renamed MeshWriteUtils. I had to fix it in this commit:

a520d00

Does this mean that we should revert these name changes as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For #1, we're binding MeshWriteUtils.GetMeshNormals() in Python to the _GetMeshNormals() function declared just above in wrapMeshWriteUtils.cpp, which is indeed declared static, and returns a boost tuple type:

_GetMeshNormals(const std::string& meshDagPath)

For #2, we do want the name changes so that files/classes/etc. are all in alignment, so that part should not be reverted. We can absorb the name change no problem, we just need a function with the new name to exist so that we can switch to it. :P

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattyjams Gotcha... see be3c545

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks!

}