LumaPictures / maya-to-hydra-alproxy

This repo is no longer updated. Please see https://github.com/Autodesk/maya-usd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Selection doesn't work unless scene drawn in VP2 renderer first

pmolodo opened this issue · comments

ie, if you do:

# test ufe / AL / mtoh / arnold-render-delegate
import maya.cmds as cmds
import pymel.core as pm
import maya.mel as mel

def safeLoadPlugin(plugin):
    if not cmds.pluginInfo(plugin, q=1, loaded=1):
        cmds.loadPlugin(plugin)
safeLoadPlugin('AL_USDMayaPlugin')
cmds.file(new=1, f=1)
cmds.AL_usdmaya_ProxyShapeImport(file='/path/to/Kitchen_set/Kitchen_set.usd')
persp = pm.PyNode('persp')
persp.translate.set((30, -600, 600))
persp.rotate.set((45, 0, 0))
#cmds.refresh(f=1)

import maya.cmds as cmds; cmds.loadPlugin("mtoh")
activePanel = cmds.playblast(ae=1)
mel.eval('setRendererAndOverrideInModelPanel $gViewport2 mtohRenderOverride_HdStreamRendererPlugin {};'.format(activePanel))
cmds.refresh(f=1)

...then try to click-select a usd object in the viewport, nothing happens. However, if you uncomment the first "cmds.refresh", then things work.

This has the same cause as #6 - since I've explained the issue a bit more there, closing this and leaving that ticket