From 8fad2cea45c23ead8f38745f410d57f7f51a15cc Mon Sep 17 00:00:00 2001 From: lilike-adsk <134404162+lilike-adsk@users.noreply.github.com> Date: Wed, 21 Feb 2024 08:30:50 -0500 Subject: [PATCH] add test for template and reference (#76) --- .../mayaUsd/render/mayaToHydra/CMakeLists.txt | 1 + .../TemplateAndReferenceTest/default.png | Bin 0 -> 2920 bytes .../referenceMode.png | Bin 0 -> 2819 bytes .../referenceModeSelection.png | Bin 0 -> 3002 bytes .../TemplateAndReferenceTest/templateMode.png | Bin 0 -> 2819 bytes .../templateModeSelection.png | Bin 0 -> 2819 bytes .../mayaToHydra/testTemplateAndReference.py | 77 +++++ .../testTemplateAndReference.ma | 274 ++++++++++++++++++ 8 files changed, 352 insertions(+) create mode 100644 test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/default.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/referenceMode.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/referenceModeSelection.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/templateMode.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/templateModeSelection.png create mode 100644 test/lib/mayaUsd/render/mayaToHydra/testTemplateAndReference.py create mode 100644 test/testSamples/testTemplateAndReference/testTemplateAndReference.ma diff --git a/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt b/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt index fa2b6dedb2..ae7fdf4007 100644 --- a/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt +++ b/test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt @@ -21,6 +21,7 @@ set(INTERACTIVE_TEST_SCRIPT_FILES testUSDLights.py testArnoldLights.py testLookThrough.py + testTemplateAndReference.py testStandardSurface.py testFlowViewportAPI.py testStageVariants.py diff --git a/test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/default.png b/test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/default.png new file mode 100644 index 0000000000000000000000000000000000000000..9154bd2b667d6517c40fadcd85124a2a1cd5b995 GIT binary patch literal 2920 zcmeHJdpy&7AOF!hF1c)uQe=~yb81$~H8eb8vqL<}z1$vWMlnxOgfS;|q!=f+DI(X9 zsq;jxLz#}XO|jgK*l6yyxoqgH^M8Ll|2?ng)gPbB>+}8R^Lc+i-|zc<=bz4KWkpRz z005LR4tD1NKqljh$$uxU5UHkbr9lPjg$X`;7A{Qz`7aIta%LL5r9mMAg^K*U@WlzM$c$ivwE!!73F!q}hq{!6mACqZ7te;f)N)U|JyeWRwZ@8Q2Xe1EyZ%r3q9)0n4i z#(upVd2sTln!Hztq}Tmh#*3!qRccnY2j^!p5gI04IT`-jg_mLj0|OO-g#P+^4S>kG zPXxdaFrX_dYhz~vq{zzy5E&UAT^+y<1R|zDrd%g;oTM zBYi@lFn7k9AU1w+d7zfNy3wAr%dt6n$q#?!WFS4y&&w+$?m&^d8Gh8OC31#Y2P$zI zsV7*UFn~NMC&8?p84QN9s{`a3^%<~$=LB(yDHi5?fJ351pRWsYu{Ci=@KvSc@l(-@qvTuzf0g{hBwqZev9oA+q#cHO2)p32#TEvdnS56CJmJe!n{DAZruz&k?Pm`UkK5Gvt|F|gZ3QxZWBI|z?@s4hD-u%iMmmi3 zbV>TE`K*OZaUX3VRuk8Mw5bH8%_VMDcC(|^rSsHl-F5yRY_TAapJutTNQyQ_ped(V z|Lqr7%PgYEpC_Yy2%vMS_6L4&6YwIrJ07ALI(5$Md`+VNw&j49&aC2Lu*K7dN$xy` zD=PApKeZ1}?%AER#G!sRq!eCmYk04O7A^53&UhY3>J2SHDTv;o1g-Xa?~0H7^1eUb zMX+S+DV@tSG>GH2(4-mNyM;cZs}oh=>lHOzh>XiYYj@`vyEoV5_mSe;-qJbvxa~<# zL)qfKD&<)7yz%(ci`ymFBit$O0?cG3v>CR~7YDMfV6a#QX`1%;G+k?OSpkx+0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lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/templateModeSelection.png b/test/lib/mayaUsd/render/mayaToHydra/TemplateAndReferenceTest/templateModeSelection.png new file mode 100644 index 0000000000000000000000000000000000000000..b3e09bc76ffb15d652c2565b89da2e73590b392a GIT binary patch literal 2819 zcmeHJYgEz)6#wg}$f>F2BP%s^RxTadrWBrOMF{1yvWJGsYV*-d3m>U~G%+bMTMyG= zkdbL9S}i3711)oBC1m0w6p&e95RfII7&7boKJ3%Z+3CZ*zkBZea?d@#bAP{6F;U?* zR<2e60N9|A@SOl)aqeS)7tVKxyr3uZVEf}f)K8I-zVjsj{+IxuLdo7g4~sJq2<)fE z$0YV`6##(M2^4(u?&H-O3Fk=M^Hn`Zsi^MkQv zfof6h?}-+GzmJ85ho=Vs2Z4xWB4B542Y6aqhQY%CG8hcle;)o{kMKvcpkTomcc%CK z`?+Q|+hF|BOnCc3%cF&~VG#`=<#{5%My7c^+L$FeC{g-)>g|>d4-bbxp-^=WalWkM2}qX#XAXyx(qa4Nc^q`^E;~Rx1Z!xm@!c>o?)F3gY0m z%tU5%GzkaPZRjM=uGENY8%W}NY%iAhPSA{L-8&D*i)k0*&peZnC|##W*7EYgLUVo0 zRCq+ogWSW<={l*YopyLU)L_b;KGJc7&KkmpC@MP7FF$eXxSyLw=TyuHn(A3qvpYs5 zo4CBZ1Y&7{nVd8B2J2M$?VPktt{Z(_@W)kbvGT^z^dhr-Ru>#S!?RSLMrAv(f)ttq zWlpDp0_LXb=!8`I2q83I>Yf%yX9-1&j-hZy1)Ddbiz*id)(Fm5eSzsq{|ndtbAe)d z^r103`;My6R9{P9bHW}BesHr4Pi0IL2T1(B>j>I2n@CMYu2*!oHl);z1&yf4rK)935aztkMRHXZa#V6#yW zyWf;I0xzIEVXj>a-k~_AT|YRr_GT+Zb-D8OYuv2{rp$4Gz9bOOEBUG5?%-(bfqras zGU~|*$eB5E{i~HdD4)SPteYv5yuj=Bmy~X%%`6kWBf|k-a9)nOyJ2|91T%TV)|U}) zrJB5rOo~UVLCi(s>q0MZ(WKiyJoOPNbCX&mai&5=*r)B{!xVqTZcbI6s?J{aOpu-_ zH0fX~uEbW(pJoqw$m z-i%wbv=utVxu!rkYLJbDsi7oRKJ$JZ4B{8EzRfQ;F^x9f7nnU`AOU zI``6Sq!Y1Q!dwtk;RGY*M)0qy2hU_N%%aS*Bg26oIgf`cr1X=u?p5SPIAoYh6s%p< zP?hl1=V5W|V(?a`WM@W`XGi4^9Iu*L+6Ld!$*xC2`?SkJ`weZm4=>p-0)ugfB>C?2 zyvQ*eHhfE^ofXt=jf3UCc;Jn1KFqu`6;$gB`1vo>xsb^>@&{D?hlxH$f*$ws&r7hO zCNu{vOleEZl7hk9z4Fw)iI!i<=lG={lALALvzxa=4e@5%Zaua)!ler45P01XFbs== z4hHyQ4kf+TYH9jS{1p9IXED{FmCS0pDbBNWW5PE{_qoRD$?;5CMJ%YO!y}jq#(Sy3D_Z2y19`Ihc+RA1prNcTny#fwUAwxIZAqAcM?AO7{%E7_ zAQt;>SoXD}hf5U^!W}<({ri5zDk72p&7P9$70WaDJ@ZViX0cc>wX``|v=Y^uA=(;} zOe6BwL4CL1g8zfi@z-Uo-iCOQ&b6)!dOy^h#6vf$yH3;JCY189>PKZOl9KM@W=i|_ z1>Zx0NErNfWIXgt$fpf1kl@g/OCIO-configs/Maya2022-default/config.ocio"; + setAttr ".vtn" -type "string" "ACES 1.0 SDR-video (sRGB)"; + setAttr ".vn" -type "string" "ACES 1.0 SDR-video"; + setAttr ".dn" -type "string" "sRGB"; + setAttr ".wsn" -type "string" "ACEScg"; + setAttr ".otn" -type "string" "ACES 1.0 SDR-video (sRGB)"; + setAttr ".potn" -type "string" "ACES 1.0 SDR-video (sRGB)"; +select -ne :hardwareRenderGlobals; + setAttr ".ctrs" 256; + setAttr ".btrs" 512; +connectAttr "layer_cubic.di" "pCube1.do"; +connectAttr "polyCube1.out" "pCubeShape1.i"; +connectAttr "layer_sphere.di" "pSphere1.do"; +connectAttr "polySphere1.out" "pSphereShape1.i"; +relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message"; +relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message"; +connectAttr "layerManager.dli[0]" "defaultLayer.id"; +connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid"; +connectAttr "layerManager.dli[1]" "layer_sphere.id"; +connectAttr "layerManager.dli[2]" "layer_cubic.id"; +connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na; +connectAttr "pCubeShape1.iog" ":initialShadingGroup.dsm" -na; +connectAttr "pSphereShape1.iog" ":initialShadingGroup.dsm" -na; +// End of testTemplateAndReference.ma