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

[MAYA-121681] / [MAYA-126141] Cannot add new [Def1] #2052

Closed
suekieza opened this issue Feb 1, 2022 · 9 comments
Closed

[MAYA-121681] / [MAYA-126141] Cannot add new [Def1] #2052

suekieza opened this issue Feb 1, 2022 · 9 comments
Labels
bug Something isn't working reproduced Issue has been reproduced

Comments

@suekieza
Copy link

suekieza commented Feb 1, 2022

Describe the bug

Error: RuntimeError: file C:\appnet\applications\maya\2022-x64\Maya2022\Python27\Lib\site-packages\maya\app\ufe\outlinerSupport.py line 27: Cannot add new [Def1] under [prop]. It is defined on another layer. Please set [seq010_sh010_manifest.usda],[seq010_manifest.usda] as the target layer to proceed.

Why cant I create a new def under the "scope prop"(see image)? I would expect it to add overs to my chosen layer like:

over "shot"
{
over "prop"
{
def "def1"
{}
}
}

I don't want to add this def on the "seq010_manifest.usda" layer. I can add to any layer I want using overs in houdini and in USD externally, so why lock this in maya?

scopeprop

Specs (if applicable):

  • OS & version [e.g. Windows 10]
  • Maya version [e.g. Maya 2022.2]
@suekieza suekieza added the bug Something isn't working label Feb 1, 2022
@womanyoyoyo-adsk womanyoyoyo-adsk added the reproduced Issue has been reproduced label Feb 8, 2022
@womanyoyoyo-adsk
Copy link
Collaborator

Hi @suekieza. I am able to reproduce and have logged this issue as MAYA-121681.

@womanyoyoyo-adsk womanyoyoyo-adsk changed the title Cannot add new [Def1] [MAYA-121681] Cannot add new [Def1] Feb 9, 2022
@womanyoyoyo-adsk womanyoyoyo-adsk removed their assignment Feb 9, 2022
@suekieza
Copy link
Author

cool cool

@msercheli
Copy link

@suekieza , we (at the studio I am working for) are experiencing the exact same issue.
Since we don't want to create our own set of UsdStage manipulation tools (using USD natively), we would like/need this bug to be resolved as soon as possible.
I was about to create a ticket. I am glad you did first.

@womanyoyoyo-adsk
Copy link
Collaborator

womanyoyoyo-adsk commented May 4, 2022

Hi all, we just scheduled this on our side.

@santosg87
Copy link
Collaborator

@suekieza this should be now fixe don MayaUSD 0.19.0. are you able to test and confirm on your side? :)

@msercheli
Copy link

msercheli commented Sep 26, 2022

I built tag v0.19.0 and I am getting the same error.
Just to be sure we are talking about the same use-case here, here are the steps I am making to see the error:

  • Create a USD file on disk with the following contents:
#usda 1.0
(
    endTimeCode = 1
    framesPerSecond = 24
    metersPerUnit = 1
    startTimeCode = 1
    timeCodesPerSecond = 24
    upAxis = "Y"
    defaultPrim = "top_prim"
)

def Xform "top_prim"
{
    def Xform "first_child"
    {
    }
}
  • Open this USD layer into Maya and set the session layer as the active target
  • Select the first_child prim in the Maya outliner, right-click and run Add New Prim > Def

Error:

# Error: Cannot add new [Def2] under  [first_child]. It is defined on another layer. Please set [new_def_test.usda] as the target layer to proceed.
# # Traceback (most recent call last):
# #   File "/mnt/rez/softwares/binaries/maya/2023.0/maya2023/lib/python3.9/site-packages/maya/app/ufe/outlinerSupport.py", line 26, in doOp
# #     cmd = contextOps.doOpCmd(itemPath)
# # RuntimeError: Cannot add new [Def2] under  [first_child]. It is defined on another layer. Please set [new_def_test.usda] as the target layer to proceed.

Maya allows the creation of the new "def" only if the active target is the layer that the parent prim is defined.
What I am expecting is that, using the session layer, I could define a new prim, and Maya would create the parent hierarchy using "over" prims.

@santosg87 , could you give us a step-by-step to reproduce your fix? Just to be sure we are in the same page.
Thanks.

@santosg87
Copy link
Collaborator

ah! I think I see the issue better now.

on our testing, we found that opinions on ancestors couldn't be added previously. That was the fix that we included.

after re-reading this issue quite a few times, this is about sister layers, not a hierarchy issue.

our workflow that now works is:

  • Create Stage with New Layer
  • Add a sublayer to 'anonymousLayer1' creating 'anonymousLayer2'.
  • Set editTarget to 'anonymousLayer2'.
  • Create on xfrom under the proxyShape node.
  • Set editTarget to 'anonymousLayer1'.
  • Select xform1. Add a new prim - Cone.
  • BEFORE: Error: Cannot add new [Cone1] under [Xform1]. It is defined on another layer. Please set [anonymousLayer2] as the target layer to proceed.
  • AFTER FIX: An over is created for the xform and then a cone should be defined.

I logged a new issue for the adjacent layers internally for investigating. internal ticket ID [MAYA-126141]

@santosg87 santosg87 changed the title [MAYA-121681] Cannot add new [Def1] [MAYA-121681] / [MAYA-126141] Cannot add new [Def1] Nov 7, 2022
@santosg87
Copy link
Collaborator

@suekieza @msercheli this issue should be fixed with #2720. I have tested internally and creating a prim is possible in any layer.

are you able to build with that commit and test on your side? otherwise, this should be available on future releases of mayausd :)

@msercheli
Copy link

Hi @santosg87 ,

Thanks for the fix. I see the removal of the code that was preventing it.
I don't think I will have time to build, but I am sure it's fixed. I will wait until tag 0.21.0.

Once again, thanks.

@neilh-adsk neilh-adsk moved this to Done in maya-usd Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working reproduced Issue has been reproduced
Projects
Archived in project
Development

No branches or pull requests

4 participants