-
Notifications
You must be signed in to change notification settings - Fork 4
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
HYDRA-307: Add the FootPrint node as an Hydra example #75
Conversation
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.
Great work David! Some changes and questions sprinkled in.
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/CMakeLists.txt
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/CMakeLists.txt
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/CMakeLists.txt
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/CMakeLists.txt
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
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.
Looks pretty good, but I'd still like to explore the use of the compute() method to do scene index work.
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/footPrintNode/mhFootPrintNode.cpp
Outdated
Show resolved
Hide resolved
lib/mayaHydra/flowViewportAPIExamples/flowViewportAPIMayaLocator/flowViewportAPIMayaLocator.cpp
Show resolved
Hide resolved
@@ -102,7 +102,7 @@ def test_AddingPrimitives(self): | |||
self.setHdStormRenderer() | |||
self.assertSnapshotClose("add_VP2AndThenBackToStorm.png", self.IMAGE_DIFF_FAIL_THRESHOLD, self.IMAGE_DIFF_FAIL_PERCENT) | |||
|
|||
#Finish by a File New command | |||
#Finish by a File New command to check that it's not crashing when cleaning up everything |
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.
Sorry, should have caught this earlier, since you're calling file new after each test, you should factor this out into a tearDown() method:
https://docs.python.org/3/library/unittest.html#unittest.TestCase.tearDown
@@ -38,6 +38,11 @@ class TestFlowViewportAPI(mtohUtils.MtohTestCase): #Subclassing mtohUtils.MtohTe | |||
IMAGE_DIFF_FAIL_THRESHOLD = 0.1 | |||
IMAGE_DIFF_FAIL_PERCENT = 2 | |||
|
|||
@classmethod |
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.
This is not equivalent to what you had before: previously, you did a file new at the end of each test method. As I suggested in
https://github.com/Autodesk/maya-hydra/pull/75/files/e3184227bf913bbbb1f48fb2e75ad2b8b5944239..eff7ba8689bcfe5db288d514517fba122b1e90a5#r1499561088
the proper equivalent is tearDown():
https://docs.python.org/3/library/unittest.html#unittest.TestCase.tearDown
If you're O.K. with tearDownClass() then that's fine too.
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.
You're right, I want to use tearDown.
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.
Looks really good, don't forget to change tearDownClass() to tearDown() in testFlowViewportAPI.py!
Yes this is being made in another PR : #85 |
O.K., change is not in that pull request yet, but if that's where you want to make it sounds good. |
No description provided.