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

custom compile of v0.6.0 : Layer Editor Window does not open or the Create Stage From File Menu Item #1005

Closed
cfmoore007 opened this issue Dec 15, 2020 · 21 comments
Assignees
Labels
bug Something isn't working

Comments

@cfmoore007
Copy link

Describe the bug
Compiling v0.6.0 or dev@c411bab9 is having menu items issue for me.

In particular, the Create->Universal Scene Description->Create Stage From File option results in an error : // Error: file: F:/APPLICATIONS/Autodesk/Maya2021/scripts/others/getPluginResource.mel line 66: Plug-in resource lookup failed, resource ("mayaUsdPlugin","kCreate") is not registered

Secondly, the Layer Editor does not open, but does not complain about anything ( i.e : no errors or warnings ). I tested this by using the 'Create Stage From New Layer' option. I verified that the layerEditor is under the lib/usd/ui/ directory.

Finally, I tried the download of v0.6.0 using the installer. This version works fine. The issue seems limited to my custom build. The last working build I tried was dev@37ea8e0.

Steps to reproduce
Steps to reproduce the behavior:
( Create Stage From File )

  1. Create->Universal Scene Description->Create Stage From File
  2. see Plug-in resource lookup error

( Missing Layer Editor )

  1. Create->Universal Scene Description->Create Stage From New Layer
  2. Right-click on stage and select the Layer Editor
  3. Witness no Layer Editor nor warning/error displayed

Expected behavior
The menu items work. They did prior to this build

Attachments
If applicable, add screenshots, sample files, etc to help explain your problem.

Specs (if applicable):

  • OS & version [Windows 10]
  • Compiler & version [VS2017]
  • Maya version [e.g. Maya PR 121]
  • Maya USD commit SHA [dev at c411bab ]
  • Pixar USD commit SHA [v20.11]

Additional context
N/A

@cfmoore007 cfmoore007 added the bug Something isn't working label Dec 15, 2020
@fowlertADSK
Copy link
Contributor

@cfmoore007 I just synced back to the dev branch and was kicking off a build against the latest Maya PR, so I'll try to see if I can reproduce the problem. We did add some string resource handling in a recent change. The plug-in isn't localized at the moment (English only) but it's now set up to be able to at some point in the future.

@fowlertADSK
Copy link
Contributor

@cfmoore007 I downloaded the latest Maya beta + devkit and built the exact same SHA as you and can't reproduce a problem. I'm guessing you haven't changed anything about how you build the plug-in have you?

And what's your .mod file look like, any difference between what you're using for your build vs. the installed one?

@cfmoore007
Copy link
Author

Nothing seems out of the ordinary here :


F:\Repos\maya-usd>git status
HEAD detached at v0.6.0
nothing to commit, working tree clean

F:\Repos\maya-usd>python build.py --build-location F:\APPLICATIONS\MayaUSD\v0.6.0\build --install-location F:\APPLICATIONS\MayaUSD\v0.6.0 --maya-location F:\APPLICATIONS\Autodesk\Maya2021 --pxrusd-location %USD_INSTALL_ROOT% --devkit-location F:\APPLICATIONS\Autodesk\Maya2021\devkit F:\Repos\maya-usd

Building with settings:
  Source directory          F:\Repos\maya-usd
  Workspace directory       F:\Repos\maya-usd
  Build directory           F:\APPLICATIONS\MayaUSD\v0.6.0\build
  Install directory         F:\APPLICATIONS\MayaUSD\v0.6.0
  Variant                   RelWithDebInfo
  Python Debug              Off
  CMake generator           Default
  Build Log                 F:\APPLICATIONS\MayaUSD\v0.6.0\build\build_log.txt
  Stages arguments          ['clean', 'configure', 'build', 'install']

Success MayaUSD build and install !!!!
Elapsed time: 00:06:35


build_log.txt

Mod File :


  • USD 0.20.11 F:\APPLICATIONS\USD\v20.11
    icons:
    plug-ins:
    presets:
    scripts:
    resources:
    PYTHONPATH+:=lib/python
    PATH+:=bin
    PATH+:=lib
    USD_LOCATION:=
    MAYA_USD_VERSION=0.20.11

  • MayaUSD_LIB 0.6.0 F:/APPLICATIONS/MayaUSD/v0.6.0
    icons: lib/icons
    plug-ins:
    presets:
    scripts:
    resources:
    PATH+:=lib
    PYTHONPATH+:=lib/python
    PXR_PLUGINPATH_NAME+:=lib/usd
    MAYAUSD_VERSION=0.6.0
    VP2_RENDER_DELEGATE_PROXY=1
    PATH+:=lib/gtest

  • MayaUSD 0.6.0 F:/APPLICATIONS/MayaUSD/v0.6.0/plugin/adsk
    plug-ins: plugin

  • MTOH 0.6.0 F:/APPLICATIONS/MayaUSD/v0.6.0/lib
    icons:
    plug-ins: maya
    presets:
    scripts:
    resources:


@maxxca
Copy link

maxxca commented Dec 16, 2020

Getting same error message on 2019.3.

Calling "Stage From File" Option box results in an errors:

// Error: file: C:/Program Files/Autodesk/Maya2019/scripts/others/getPluginResource.mel line 66: Plug-in resource lookup failed, resource ("mayaUsdPlugin","kCancel") is not registered

and

// Error: file: C:/tmp/usd/maya-2019-0.6.0-msvc2017/plugin/adsk/scripts/mayaUsd_createStageFromFile.mel line 135: Object's name 'createStageFromExistingOptions' is not unique. //

@spinell-adsk
Copy link
Contributor

In the file mayaUSDRegisterStrings.mel, can you try to add

register("kCreate", "Create");
register("kCancel", "Cancel");

in the procedure mayaUSDRegisterStrings()

@cfmoore007
Copy link
Author

@spinell-adsk - thanks! That worked for the stage creation menu item. Now the layer editor just will not launch.

@spinell-adsk
Copy link
Contributor

I'm not sure what is going wrong with your's custom build.
Both kCreate & kCancel are registered on c++ side and maya should be able to find them from mel.

@dgovil
Copy link
Collaborator

dgovil commented Dec 16, 2020

We're seeing the same issue here.
Maya.app/Contents/scripts/others/getPluginResource.mel line 66: Plug-in resource lookup failed, resource ("mayaUsdPlugin","kCreate") is not registered

Will try the fix mentioned above, but just thought I'd add us as a +1

@dgovil
Copy link
Collaborator

dgovil commented Dec 17, 2020

With the workaround mentioned above, it's possible to create the USD stage now.
However, like @cfmoore007 mentioned, the layer editor doesn't launch. There are no errors, but running mayaUsdLayerEditorWindow just doesn't do anything.

@kxl-adsk
Copy link

kxl-adsk commented Dec 17, 2020

@dgovil @maxxca Did you build maya-usd with Qt? I just noticed that we haven't really documented it, but we have qt-location flag that is required for ui (both import tree view and layer editor)

@dgovil
Copy link
Collaborator

dgovil commented Dec 17, 2020

It doesn't look like we build with that.
We build with CMake directly due to better integration with our rez-env. It looks like it ads -DQT_LOCATION=qtlocation to the CMake args. I'll try passing that in and seeing how things fare.

A few questions:

  1. Should this point to the Maya bundled Qt?
  2. If that makes the most sense, would it be worthwhile to have it default to point there since it should have enough info based on the Maya Location and devkit location args?
  3. I assume, this would still require the edits to mayaUSDRegisterStrings.mel since those look to be unrelated to the Qt library?

I'll try a build tomorrow with these and see how things go.

@seando-adsk
Copy link
Collaborator

Unfortunately the Qt bundled in the devkit is not fully setup to use from cmake. It is missing some files. For now you must download your own copy of Qt to use. Ideally one that matches the Qt in the Maya version you are building for. For that info please see build.md. For the latest Maya PRs the version is either 5.15.1 or 5.15.2.

If you use build.py then look at the flag:
--qt-location QT_LOCATION
Directory where Qt is installed.

As you've seen all this does is set the cmake variable QT_LOCATION. If you are using the Maya PR, then you should also set the cmake variable QT_VERSION. If everything goes well and it correctly finds Qt, you will see the message "Building with Qt features enabled." in your build log.

@dgovil
Copy link
Collaborator

dgovil commented Dec 17, 2020

Thanks, @seando-adsk .
Would you be able to elaborate on why/what parts of the bundled Qt in the devkit are deficient?

It would help us understand better to know whether it's just a build time dependency, or if it's something we need to also distribute to our internal users. Which in turn would possibly require different approval processes internally.

@seando-adsk
Copy link
Collaborator

If you try and use the cmake find_package(Qt), the biggest problem is that the Qt cmake have references to the debug Qt libs which are not part of the devkit. Another one is that on Windows the Qt .dll files are not in the devkit which are also referenced by the the Qt cmake files. I'll bring it up internally to see what can be done.

@cfmoore007
Copy link
Author

Thanks. I can confirm after using the QT Installer ( choosing QT 5.12.10 ), and adding the --qt-location option worked.

I can also confirm, that I no longer need to edit the mayaUSDRegisterStrings.mel file with kCreate/kCancel as reporter in the earlier work-around.

F:\Repos\maya-usd>python build.py --build-location F:\APPLICATIONS\MayaUSD\v0.6.0\build --install-location F:\APPLICATIONS\MayaUSD\v0.6.0 --maya-location F:\APPLICATIONS\Autodesk\Maya2021 --pxrusd-location %USD_INSTALL_ROOT% --devkit-location F:\APPLICATIONS\Autodesk\Maya2021\devkit --qt-location F:\APPLICATIONS\Qt\5.12.10\msvc2017_64 F:\Repos\maya-usd

@seando-adsk
Copy link
Collaborator

That is good to know. Thanks. Are you able to open and use the Layer Editor now?

I think that we should probably not register or include the layer editor commands when Qt is not found because without Qt the layer editor itself won't be compiled. I'll bring that up internally.

@cfmoore007
Copy link
Author

Yes. Layer Editor also works.

@seando-adsk
Copy link
Collaborator

With pull-request #1037 being merged this issue should not happen anymore. If the Layer Editor (LE) is not compiled (i.e. not Qt is found) we no longer register the command to open the LE and we no longer add any menu items to open the LE.

@kxl-adsk
Copy link

@cfmoore007 Please validate and close this issue.

@cfmoore007
Copy link
Author

Confirmed, this was fixed with installing QT ( via the downloadable installer ). I chose version 5.12.10 and set the --qt-location variable to point to the installed location.

With those steps, the layer editor now works as intended.

Closing issue.

Thanks!

@ansuter
Copy link

ansuter commented Apr 13, 2021

While building v0.8 without Qt (no other changes that I'm aware of), I still receive the kCreate error.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants