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

Instanced prims breaking selection #25

Open
JasonGilholme opened this issue Sep 12, 2017 · 3 comments
Open

Instanced prims breaking selection #25

JasonGilholme opened this issue Sep 12, 2017 · 3 comments
Assignees

Comments

@JasonGilholme
Copy link

JasonGilholme commented Sep 12, 2017

Hi,

I'm getting some incorrect results when using the plug with the following arrangement of usd files. I've modelled this structure on information from Sebastian on the usd-interest google group so it should be sound.

I've included the contents of some usd files that I'm using to test with. When I load the shot_layout.usda file, it will always select RockA_01 no matter which one I select. If I set instanceable to false in the component.usda file it works as expected.

Thanks
Jason

// shot_layout.usda -- instancing 2 rocks in a shot layout

#usda 1.0
(
    defaultPrim = "world"
)
def Xform "World" {
    def Xform "RockA_01" (
        add references = @./component.usda@
    )
    {
        double3 xformOp:translate = (5, 5, 5)
        uniform token[] xformOpOrder = ["xformOp:translate"]
    }

    def Xform "RockA_02" (
        add references = @./component.usda@
    )
    {
        double3 xformOp:translate = (-5, -5, -5)
        uniform token[] xformOpOrder = ["xformOp:translate"]
    }
}
// component.usda  --  The interface file for the rock component
#usda 1.0
(
    defaultPrim = "RockA"
)

def Xform "RockA" (
    assetInfo = {
        asset identifier = ""
        string name = ""
    }

    kind = "component"
    instanceable = true

    payload = @./payload.usda@

    variants = {
        string LevelOfDetail = "proxy"
    }
    add variantSets = ["LevelOfDetail"]
)
{
    variantSet "LevelOfDetail" = {
        "high" {}
        "medium" {}
        "low" {}
        "proxy" {}
        "bbox" {}
    }
}
// payload.usda -- mesh data that makes up the rock
#usda 1.0
(
    defaultPrim = "RockA"
)

over "RockA" (
    variants = {
        string LevelOfDetail = "proxy"
    }
    add variantSets = ["LevelOfDetail"]
)
{
    variantSet "LevelOfDetail" = {

        "high" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "medium" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere"Mesh02" () {}
            }
        }

        "low" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "proxy" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }

        "bbox" {
            def Xform "geom"
            {
                def Sphere "Mesh01" () {}
                def Sphere "Mesh02" () {}
            }
        }
    }
}
@murphyeoin
Copy link
Contributor

Hi Jason, this is a known issue which I thought we had documented somewhere - but maybe not. We will definitely look into this in the next few days, and try and work out what's involved in fixing. Will update as soon as we can.
Thanks!

@JasonGilholme
Copy link
Author

Thanks Eoin. It's looking great so far.

Apologies if you've already documented this and I've missed it.

@robthebloke
Copy link
Contributor

Hi Jason, I've found the cause of the bug, and have a fix in internal review. It should be on the public branch in a day or two.

seando-adsk pushed a commit to autodesk-forks/AL_USDMaya that referenced this issue Nov 19, 2018
)

* MAYA-95322 update bounding box of AL_MayaUSD proxy shape

* MAYA-95322 code review feedback
seando-adsk pushed a commit to autodesk-forks/AL_USDMaya that referenced this issue Nov 27, 2018
1. glext.h is not in the devkit anymore, switching files

2. Adding chrono for windows only

3. Adding python libraries to fix link issue

4. MAYA-xxxx Integrating UFE into AL_USDMaya plugin
- Integration of the UFE libraries include cmake lookup and cmake on/off
  variables to enable and disable compilation with UFE
- Integration of a runtime variable to switch on/off UFE selection with
  the plugin
- Integrate UFE selection and disabling creation of proxy nodes for usd
   prim selections

5. Updating runtime id, separator of USD, and adding an added header in the want ufe build ompile

6. Missing header file

7. Merging 0.28.5 into dev-adsk (AnimalLogic#9)

8. Windows build fixes: (AnimalLogic#10)
* Remove treat warnings as errors (/WX)
* Multiline (with \) the C++ options

9. Show the UFE selection in the viewport (AnimalLogic#11)

* Show the UFE selection in the viewport

* When drawing the override, if the env var MAYA_WANT_UFE_SELECTION is
  set get the UFE selection and for the USD items draw them in wireframe
  with the Maya selection color.

* Code review: adding code comments

* Fix spelling mistake

10. Changing PATHS to HINTS in cmake file

11. Windows build fixes (AnimalLogic#13)

* MAYA-93327 - Integrate USD in Maya

* Install the Windows .pdb files.

* Add UFE build define when cmake flag is set.

* Fix relative library path for plugInfo.json files.

* Build schemas/plugInfo.json in binary folder (not source).
  So git status is not dirtied.

* Use UFE_VERSION (instead of hard-coded value) which is set above this
  repo when building.

* When building with UFE, we must have the UFE version defined.

* Code review comments - build ufe major/minor vars in the parent rather
  than child (FindUFE.cmake). This way they are accessible to others.

12. MAYA-93327 - Integrate USD in Maya (AnimalLogic#14)

* RPATH has been deprecated in favor or RUNPATH which is same except
  that it is searched after LD_LIBRARY_PATH. This gives users the ability
  to override the shared libraries.

13. Use local UFE and versioning fix.

14. Convert FindUFE.cmake to LF line endings.

15. Improved USD selection highlighting.

16. MAYA-88299 - Versioning for UFE and API (AnimalLogic#16)

* UFE lib/dll/so/dylib with major only version (no minor).

17. Merging master (0.29.1) into dev-adsk (AnimalLogic#17)

18. MAYA-94776 - Update USD plugin to latest AL branch (AnimalLogic#18)

* Adding missing pdb file for new plugin file.

19. MAYA-94776 - Update 'dev-adsk' to latest 'develop' to get VP2 Selection code (AnimalLogic#19)

20. MAYA-95136 consistent behavior with legacy VP1 selection (AnimalLogic#20)

21. MAYA-94667 deselect USD objs by clicking void area (AnimalLogic#21)

* MAYA-94667 deselect USD objs by clicking void area

* MAYA-94667 code review suggestions

* MAYA-94667 code review suggestion

22. MAYA-95136 selection under complex transform nodes (AnimalLogic#22)

23. MAYA-95391 revert regression change (AnimalLogic#23)

24. MAYA-95391 RMB click shouldn't trigger selection (AnimalLogic#24)

Port the VP1 implementation in ProxyShapeUI::select().

25. MAYA-95322 update bounding box of AL_MayaUSD proxy shape (AnimalLogic#25)

* MAYA-95322 update bounding box of AL_MayaUSD proxy shape

* MAYA-95322 code review feedback

26. Temporary restore alwaysDirty ProxyDrawOrride

(cherry picked from commit 6060036)

MAYA-95165 : Crash when duplicating USD objects

   The regression was introduced by the commit https://git.autodesk.com/autodesk-forks/AL_USDMaya/commit/321be29175a43aa270bb9d50387ac335c0d483d0
   To avoid that problem we cherry-picked the correction from the last
   updates in the develop branch.

27. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11

Merge branch 'develop' into donnels/merging_in_develop_0.29.4

28. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11

* Fixing merge (of develop branch into dev-adsk) error.

29. MAYA-95627 - Update to latest AL develop branch v0.29.4 + USD v18.11 (AnimalLogic#28)

* Some minor fixes related to merging discovered when trying to merge
  our 'dev-adsk' branch into 'develop'.

30. Comment from initial pull request to AL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants