Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
774 stars 201 forks source link

Having trouble building for Maya2019 #2120

Closed PolyHound closed 2 years ago

PolyHound commented 2 years ago

Describe the issue In the begining I got Unicode Errors, so i put in --redirect-outstream-file=false flag to avoid those problems... ( "cp949" Errors... ) after putting --redirect-outstream flag in i didn't get any unicode Errors I found and checked solutions for ascii errors, but not this one.

However what i'm getting now is

C:\myUsdBuild\include\pxr/imaging/hd/renderIndex.h : error C2220: warning treated as error - no 'object' file generated (compiling source file C:\mygit\maya-usd\plugin\adsk\plugin\plugin.cpp) [C:\mayaUSD\build\RelWithDebInfo\plugin\adsk\p lugin\mayaUsdPlugin.vcxproj] C:\myUsdBuild\include\pxr/imaging/hd/renderIndex.h : warning C4819: The file contains a character that cannot be repres ented in the current code page (949). Save the file in Unicode format to prevent data loss (compiling source file C:\my git\maya-usd\plugin\adsk\plugin\plugin.cpp) [C:\mayaUSD\build\RelWithDebInfo\plugin\adsk\plugin\mayaUsdPlugin.vcxproj]

cmake --build . --config RelWithDebInfo --target install -- /M:32

same goes with ninja setup

cmake --build . --config RelWithDebInfo --target install -- j32

I've build pxr usd with "--build-args boost,"--with-date_time --with-thread --with-system --with-filesystem"" flags in and build in 64 / 84 / Developer vsStudio prompt shells and got all same errors.. Please give me some solutions about it...

Build log logs.txt

Specs:

Additional context Add any other context about the problem here.

PolyHound commented 2 years ago

forgot to write python version Trying to compile in python 2.7.15 with conda -- same goes with pxr usd build

Just a little question with python. I tried to compile with Python 2.7.15 because Maya2019 works in 2.7. But is it find to build pxrUSD and this plugin with Python 3.7.7 for Maya2019?

PolyHound commented 2 years ago

I kind of figured it out by changing ""\myUsdBuild\include\pxr/imaging/hd/renderIndex.h"" file encoding into utf-8 and build well.

But when I load in to maya..

Freeze in creating usd stage from file

error: file: c:/program files/autodesk/maya2019/scripts/others/pluginwin.mel line 317: initializeplugin function failed (al_usdmayatestplugin) //

Attributes in USD not showing and lots of errors...

Is this about pxrUSD version i build? == 21.05 or Python version?? which ver should I try build for maya2019...

seando-adsk commented 2 years ago

Are part of our preflight system we are building MayaUsd using Maya 2019 and USD v21.05, so it should work for you.

I haven't seen a problem with renderIndex.h, but there was a problem with an invalid char in strategyBase.h that was fixed here. Perhaps renderIndex.h has a the same invalid char.

You will need to use python 2.7 to build both USD and MayaUsd since as you know Maya 2019 is using python 2.7.

After you fixed the renderIndex.h problem were you able to build mayaUsd successfully? If yes, are you able to load that plugin in Maya 2019? Are you setting MAYA_MODULE_PATH=C:\mayaUSD\install\RelWithDebInfo (your install folder where the mayaUsd.mod file is located)?

Sean

PolyHound commented 2 years ago

Yes the build went successful and I added MAYA_MODULE_PATH=C:\mayaUSD\install\RelWithDebInfo I didn,t put in directly in system i added the variable using python and turn on maya by subprocess

I've build /20.11/21.05/21.08 in latest dev branch in python 2.7 and none of them worked...

I.ve tried setting qt location manually == this time plugin just dont load... ( Unable to dynamically load maya plugin )

Is it ok with building in the latest dev branch for maya 2019 ? If its yes what should I try out now...

PolyHound commented 2 years ago

As I said up I've build /20.11/21.05/21.08 in latest dev branch in python 2.7 and none of them working...

Using vs2017 tested on cmake and ninja both same result All build went successful and I added MAYA_MODULE_PATH=\install\RelWithDebInfo [ mayaUSD Path ] and I see the Plugin in maya plugin manager but I get lots of errors

I checked same issue with "Stage Import Option" and the solution was setting QT manaully and i tried this with qt5.6.1 and 5.12.10 and if I build with manual QT location build was successful but maya now doesnt load any USDPlugins... ( initializePlugin function failed )

I have tried everything i can think about so please help I have no idea why its not working...

seando-adsk commented 2 years ago

@PolyHound Can you try running the tests to make sure they are passing. Just add the flag --stages=test to your build.py command.

If they are passing then your build output is good so we need to figure out why it won't load. Are you able to load the mayaUsdPlugin in Maya or do you get the initializePlugin error? If you cannot load this plugin then one thing to check is to make sure you don't have any conflicting USD version in your environment. Start Maya and run getenv PATH and getenv PYTHONPATH and post the output here.

Sean

PolyHound commented 2 years ago

I ran a test for 21.05 and 21.08 and this is the result

==== 21.08 ==== The following tests did not run: 7 - _Interactive_Maya (Disabled)

The following tests FAILED: 6 - testMayaUsdInteractiveLayerEditorCommands (Failed) 32 - testProxyShapeDrawColors (Failed) 34 - testProxyShapeDrawPurpose (Failed) 36 - testProxyShapeDrawUsdChangeProcessing (Failed) 38 - testProxyShapeLiveSurface (Failed) 40 - testPxrUsdMayaGL (Failed) 43 - testProxyShapeSelectionPerformance (Failed) 44 - testVP2RenderDelegateDisplayColors (Failed) 45 - testVP2RenderDelegateGeomSubset (Failed) 46 - testVP2RenderDelegatePointInstanceOrientation (Failed) 47 - testVP2RenderDelegateTextureLoading (Failed) 48 - testMtohBasicRender (Failed) 49 - testMtohCommand (Failed) 50 - testMtohDagChanges (Failed) 51 - testMtohVisibility (Failed) 148 - testUsdImportChaser (Failed) 149 - testUsdMayaListShadingModesCommand (Failed) 150 - testUsdExportSchemaApi (Failed)

==== 21.05 ==== The following tests did not run: 7 - _Interactive_Maya (Disabled)

The following tests FAILED: 6 - testMayaUsdInteractiveLayerEditorCommands (Failed) 47 - testVP2RenderDelegateTextureLoading (SEGFAULT) 148 - testUsdImportChaser (Failed) 149 - testUsdMayaListShadingModesCommand (Failed)

and this is the PATH and PYTHONPATH in maya envPath.txt

all the plugins Loads in, but AL_USDMayaPlugin and AL_USDMayaTestPlugin doesnt load in same time == if one of them is loaded the other one gets an error ( initializePlugin function failed )

and the errors i mentioned up here ==> https://github.com/Autodesk/maya-usd/issues/2120#issuecomment-1047452970 is not fixed...

I'll load up fullLogs from the test if you need see them too

seando-adsk commented 2 years ago

The AL plugin and AL test plugin cannot be loaded at the same time. You should not need to load the Test plugin, it is for running the unit tests.

If you want to build with Qt, then for Maya 2019 you need to use Qt 5.6.1. If it works you should see the message, "Building with Qt features enabled" in your build log.

If you load just the mayaUsdPlugin does it work? If not, can you disable the autoloading of the three plugins and then manually load the mayaUsdPlugin and attach the output from the Script Editor.

PolyHound commented 2 years ago

Good to know it was not a problem for testPlugins

I've disabled all autoLoad and loaded just mayaUsdPlugin ( plugin in adsk/plugin ) and got this error on load

// Error: file: C:/USD/mayaUSD_21.05/install/RelWithDebInfo/plugin/adsk/scripts/mayaUsdMenu.mel line 433: Invalid flag '-optionVarChanged' //

I think the error comes up when i hover to "Select"(next to "Create") tab

testing with "Kitchen_set" from pxr Doc maya crash on import or select in kitchen instanced set usd example -- (stage import) ( not crashing on usd which is not the instanced file) I'm not sure this is a problem since i dont have much knowledge about usd in this point... just let you know....

and

still not going away....

I cant find usd layer editor windows and any attributes doesnt appear on attribute editor ( like varients or Xforms...) mayaUsdLayerEditorWindow command doesnt work too // Error: AttributeError: file line 1: 'module' object has no attribute 'mayaUsdLayerEditorWindow' //

cmds.mayaUsdLayerEditorWindow() is what i typed in

will these errors go away if i build with QT 5.6.1?? I've tried this building with QT and plugins wont load to maya but i'm not sure that was build with 21.05ver so i wonder if its worth a try with building with QT

seando-adsk commented 2 years ago

What exact version of Maya 2019 are you using? We support 2019 Update 3. The flag optionVarChanged was added in 2019.2. It could be that script error is throwing off the proper registration of the plugin. Can you try with 2019.3 or at least edit the file C:/USD/mayaUSD_21.05/install/RelWithDebInfo/plugin/adsk/scripts/mayaUsdMenu.mel and comment out the lines with the optionVarChanged.

You will need to build with Qt if you want to use the Hierarchy View (available from the USD Import Options dialog) or the Layer Editor. You don't need Qt if you just want to use USD import.

Your last sentence is correct. Maya 2019 (and Maya 2020) both only have Ufe v1 so there is no Attribute Editor support.

Sean

PolyHound commented 2 years ago

I'm was working with maya 2019.3.1 the whole time so I guess I should go and comment out that line

and I'll try build with qt again

PolyHound commented 2 years ago

Yes!!! Finally I think its working Thank you!! Layer Editor opens and stage import option show up. Before closing, this is my first time building somthing and Beginner for USD, so I have few questions.

Really appreciate for all your Supports!!!! Thank you

seando-adsk commented 2 years ago

That is good news.

Sean

PolyHound commented 2 years ago

Ok, got it! Thank you once again.

PolyHound commented 2 years ago

This questions is not about building but got some question playing around with my build plugin

Is usdPlugin maya2019 only supports import/export and simple transform edits?

I cant find how to change varients or change usdTree from outliner or making new "def" or "xform" objects and reference objects. I found varient could be change in import Hierarchy View but cant be changed after it is imported.

if it is not editable in maya, I wonder if it can be done by python commands...? Does having only Ufe v1 so no Attribute Editor support means I can't edit usdFileDatas( varients/reference... ) and just can be used for visualize and export propose?

seando-adsk commented 2 years ago

Yes you are correct, the support in Maya 2019 is limited. All the context menu functionality that we added to prims in the Outliner (to add new prims, change variants, etc) needs Ufe v2 which is only in Maya 2022 (or later). Same reason there is no Attribute Editor support - it needs Ufe v2.

The only way to do what you want in Maya 2019 would be by using the Pixar Usd python API and limited python wrappers MayaUsd supports for Ufe v1 to directly manipulate the prims.

Sean

PolyHound commented 2 years ago

Ok, I should better look into python API or move in to maya2022! Thanks for the reply!

santosd commented 2 years ago

Hi @PolyHound, thank you for logging this issue. Since @seando-adsk was able to answer the original question, I am going to go ahead and close this issue out. However, if you have any further questions regarding workflows, feel free to log a discussion or if you come across a bug or issue feel free to log another issue

Thanks again and glad to have you as a user.