-
Notifications
You must be signed in to change notification settings - Fork 202
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
Update mayaUsd_add_test macro calls in AL plugin to add support for additional schema paths #409
Conversation
lib/usd/translators/CMakeLists.txt
Outdated
@@ -82,6 +82,7 @@ target_link_libraries(${TARGET_NAME} | |||
usdUtils | |||
vt | |||
${MAYA_LIBRARIES} | |||
OpenMayaFX |
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 know @robthebloke has added this before and it's been rejected (I can't find that PR at the moment) but it's definitely needed as a dependency at least in maya-2019, when running our tests using AL's test/build infrastructure
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.
For what it's worth, we definitely needed this when usdMaya was in the USD repo (v19.11):
https://github.com/PixarAnimationStudios/USD/blob/4b1162957b2ad219e1635c81de8343be490e41fc/third_party/maya/plugin/pxrUsdTranslators/CMakeLists.txt#L24
This was because the translator for Maya stroke
nodes used an OpenMayaFX header:
https://github.com/PixarAnimationStudios/USD/blob/4b1162957b2ad219e1635c81de8343be490e41fc/third_party/maya/plugin/pxrUsdTranslators/strokeWriter.cpp#L44
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.
Thanks @mattyjams ... The link error we're seeing is related to MFnParticleSystem in particleWriter.cpp
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.
@murphyeoin Thank you. All the changes look good to me here. However, the way you added OpenMayaFX breaks Windows understandably.
Error on Windows:
LINK Pass 1: command "C:\PROGRA~2\MIB055~1\2017\PROFES~1\VC\Tools\MSVC\1416~1.270\bin\Hostx64\x64\link.exe /nologo @CMakeFiles\mayaUsd_Translators.rsp /out:lib\usd\translators\mayaUsd_Translators.dll /implib:lib\usd\translators\mayaUsd_Translators.lib /pdb:lib\usd\translators\mayaUsd_Translators.pdb /dll /version:0.0 /machine:x64 /debug /INCREMENTAL /MANIFEST /MANIFESTFILE:lib\usd\translators\CMakeFiles\mayaUsd_Translators.dir/intermediate.manifest lib\usd\translators\CMakeFiles\mayaUsd_Translators.dir/manifest.res" failed (exit code 1104) with the following output:
LINK : fatal error LNK1104: cannot open file 'OpenMayaFX.lib'
Before I go further, I want to mention that I don't really like using ${MAYA_LIBRARIES} . I rather like to add necessary libraries by the namespace::import target.
e.g
Maya::OpenMaya
Maya::Foundation
Maya::OpenMayaUI
Maya::OpenMayaFX
etc...
However, unfortunately we don't have such a feature in our FindMaya.cmake yet. :(
Now, when ${MAYA_LIBRARIES} is called all the libraries listed in MAYA_LIB variable are searched ( find_library) and if found they will be added to the MAYA_LIBRARIES list
maya-usd/cmake/modules/FindMaya.cmake
Line 199 in d61d8ae
foreach(MAYA_LIB |
If you print out ${MAYA_LIBRARIES}, it should give you the full absolute path to where maya libraries are
e.g on Windows
C:/Program Files/Autodesk/Maya2021/lib/OpenMaya.libC:/Program Files/Autodesk/Maya2021/lib/OpenMayaAnim.libC:/Program Files/Autodesk/Maya2021/lib/OpenMayaFX.libC:/Program Files/Autodesk/Maya2021/lib/OpenMayaRender.libC:/Program Files/Autodesk/Maya2021/lib/OpenMayaUI.libC:/Program Files/Autodesk/Maya2021/lib/Image.libC:/Program Files/Autodesk/Maya2021/lib/Foundation.libC:/Program Files/Autodesk/Maya2021/lib/tbb.libC:/Program Files/Autodesk/Maya2021/lib/cg.libC:/Program Files/Autodesk/Maya2021/lib/cgGL.lib
I don't have access to my Linux at the moment but can you please print out ${MAYA_LIBRARIES}
and tell me what you have got there.
Hi @HamedSabri-adsk I didn't know that adding a lib that way breaks windows - good to know. I will follow up on the ${MAYA_LIBRARIES} and let you know asap |
@HamedSabri-adsk - that helped me find the problem (at our end) - thanks for your help... I've removed that line |
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.
Lgtm! all tests pass on both Windows and MacOs.
Thanks.
…buffer (#409) HYDRA-339 - fix the calculation of pickmatrix and use a smaller pick buffer Changes: Fix the error in calculation of pick matrix What pick matrix does is applies a scale and translation to the projection matrix so that a small part of the scene around the pick point gets projected into the whole viewport. Most of the scene will get clipped away. What doesn't get clipped is a candidate for 'picking'. The calculation of pick matrix can be deducted by: 1). map the given viewport sub region around pick point into clip space (assuming that the given viewport covers -1…1) 2). compute a matrix which scales and translates this clip space sub region to cover the whole area of -1…1 in X and Y Use the size of pick region instead of full viewport to render id buffers for picking to improve perf 1).Marquee/single click selection would get improvement as the pick region is usually much smaller than full viewport. 2).Point snapping selection wouldn't get improvement as the pick region is same as full viewport, need to think about other approaches. Impacts: Selection &Highlighting under mayaHydra
Small change to allow AL to continue to have our own separate schemas package whose PXR_PLUGINPATH_NAME can be passed to the test macro at runtime... this would be added by our top-level CMake file.
These are the only changes needed to get our rez-based tests running - so thanks a lot to @HamedSabri-adsk for all his work getting the python test infrastructure working so smoothly compared to what was there before.