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

Update mayaUsd_add_test macro calls in AL plugin to add support for additional schema paths #409

Merged
merged 6 commits into from
Apr 8, 2020

Conversation

murphyeoin
Copy link
Contributor

@murphyeoin murphyeoin commented Apr 7, 2020

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.

@@ -82,6 +82,7 @@ target_link_libraries(${TARGET_NAME}
usdUtils
vt
${MAYA_LIBRARIES}
OpenMayaFX
Copy link
Contributor Author

@murphyeoin murphyeoin Apr 7, 2020

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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

@kxl-adsk kxl-adsk added the unit test Related to unit tests (both python or c++) label Apr 7, 2020
Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a 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

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.

@murphyeoin
Copy link
Contributor Author

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

@murphyeoin
Copy link
Contributor Author

@HamedSabri-adsk - that helped me find the problem (at our end) - thanks for your help... I've removed that line

Copy link
Contributor

@HamedSabri-adsk HamedSabri-adsk left a 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.

@kxl-adsk kxl-adsk merged commit 1d77003 into Autodesk:dev Apr 8, 2020
ppt-adsk pushed a commit that referenced this pull request May 30, 2023
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
unit test Related to unit tests (both python or c++)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants