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

FrameSelected does not correctly frame on selected point instances. #3410

Closed
jufrantz opened this issue Oct 23, 2023 · 2 comments
Closed

FrameSelected does not correctly frame on selected point instances. #3410

jufrantz opened this issue Oct 23, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@jufrantz
Copy link
Contributor

Describe the bug

Using F hotkey in a modelEditor to frame on a point instance selection, the view is not tightly fitted to the point instance bounds. The camera center of interest is adjusted to the instance position, but the view seems to be filled with the whole instancer bounding box.

Steps to reproduce

  1. Create a mayaUsd proxyShape with an usd point instancer.
import maya.cmds
import mayaUsd.ufe
import mayaUsd_createStageWithNewLayer

maya.cmds.loadPlugin("mayaUsdPlugin", quiet=True)

proxyShape = mayaUsd_createStageWithNewLayer.createStageWithNewLayer()
shapeStage = mayaUsd.ufe.getStage(proxyShape)

shapeStage.GetRootLayer().ImportFromString('''#sdf 1
(
    defaultPrim="PI"
)
def PointInstancer "PI"
{
    point3f[] positions = [(0, 0, 0), (100, 0, 100), (100, 0, -100), (-100, 0, -100), (-100, 0, 100)]
    int[] protoIndices = [0, 0, 1, 1, 1]
    rel prototypes = [</PI/Protos/Sphere>, </PI/Protos/Cube>]

    def Scope "Protos"
    {
        def Sphere "Sphere" {}
        def Cube "Cube" {}
    }
}
''')
  1. Select a point instance and try to frame it by using viewFit command or `F`` key.
maya.cmds.select(f"{proxyShape},{shapeStage.GetDefaultPrim().GetPath()}/4")
maya.cmds.viewFit("persp")
  1. Notice that the view is not correcty fitted to the selected point.

Specs (if applicable):

  • CentOS 7.8
  • Maya 2023.3
  • maya-usd 0.25
  • USD 22.11
@jufrantz jufrantz added the bug Something isn't working label Oct 23, 2023
@jufrantz jufrantz changed the title FrameSelected does not correctly frame on selected points instances. FrameSelected does not correctly frame on selected point instances. Oct 23, 2023
@swillisart
Copy link

I believe this is a duplicate of : #3377

@jufrantz
Copy link
Contributor Author

Thank you @swillisart for pointing it out, definitely duplicate of #3377.
I'm closing this one.

@jufrantz jufrantz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 25, 2023
@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
Projects
Status: Done
Status: Done
Development

No branches or pull requests

3 participants