Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Standin "Use file sequence" reload

8 REPLIES 8
Reply
Message 1 of 9
Andrew_Wilkins1
896 Views, 8 Replies

Standin "Use file sequence" reload

Hello,

We've got the issue that we've currently classified as a Arnold bug, but would like to see if anyone has a solve.

On "Scene Assembly" we have standin nodes being created and pathed to a "FurGroom" ass file sequence.

The standins will be mis-aligned and not follow the character asset until the user manually selects each "Standin Shape node" with the attribute editor open on the "Shape".
Then the standin will snap to the correct location in the viewport and align / follow correctly.

Is there a way to do a "Reload / Refresh" on a standin?
Re-pathing, closing and opening Maya and enabling/disabling "Use File Sequence" doesn't solve the issue.

Any ideas would be helpful.

Thank you!

Andrew Wilkins

MtoA: 3.3.0 - Core: 5.4.0.0
Maya: 2018.2

Tags (2)
Labels (2)
8 REPLIES 8
Message 2 of 9

Similar issue here,

When using python to create multiple aiStandIns and setting their "filePath"/"dso" and "useFrameExtension" attributes, the standIns will not always update.

From what I understand, the code updating the standIns (in scripts/mota) is fired from the Attribute Editor itself, so it would make sense that the standins would need to be selected in order to be updated.

But I didn't find the code chunk that actually refreshes the standIns. Any suggestions on how to script the refresh ? I'll share the code there's a solution.

Thanks!

Message 3 of 9

So you're using the Maya Scene Assembly, and the assembly definition .ma/.mb files contain the standins? So the standins already exist with the right filenames in the assembly definition, but it's only when the assembly is shown in Maya that you have the problem?




// Stephen Blair
// Arnold Renderer Support
Message 4 of 9

Hey Stephen!

No, I was just using "scene assembly" as terminology. ie the automated "shot building" process where assets are imported into a shot context.

Our code simply imports the character asset which contains standin nodes and paths the standin to the "fur groom" ass file caches, for example. "Using file sequence"

After the standins are pathed correctly, they will remain in the wrong placement and not read the ass file frames, until the user manually selects each of those standin shape nodes in the viewport with the Maya attribute editor open.

Message 5 of 9

How about evaluating the expression that is on the frameNumber attribute?

import maya.cmds as cmds
s = cmds.createNode('aiStandIn')
cmds.setAttr( '{}.dso'.format( s ),  "C:/standins/xsi_logo/xsi_logo.0091.ass", type="string" )
cmds.setAttr( '{}.useFrameExtension'.format( s ),  1 )
cmds.expression( x='{}.frameNumber=frame'.format(s) )




// Stephen Blair
// Arnold Renderer Support
Message 6 of 9

Thanks for the suggestion, we'll give this a go and feedback!

Message 7 of 9

Thanks ! Looks like the expression was the problem on my side.

If I'm not mistaken, enabling "useFrameNumber" will create the expression on "frameNumber" only if the node has been loaded in the Attribute Editor (AE).

So if we use a script (or AE is hidden), we need to explicitly create the expressions.

This code fixed my scene :

for s in cmds.ls(type="aiStandIn", l=True):
    ufe = cmds.getAttr("{}.useFrameExtension".format(s))
    noConn = cmds.listConnections("{}.frameNumber".format(s)) is None 
    if (ufe and noConn):
        cmds.expression(s="{}.frameNumber = frame ".format(s))

Thanks again 🙂

Message 8 of 9

i have the same problem

from mtoa.core import createStandIn
node = createStandIn("P:/aaa/aaa.0001.ass")
cmds.setAttr("aiStandInShape.useFrameExtension",1)

 

I have to open the attribute editor for Maya to read the file sequence.

Message 9 of 9

it creates an expression, you can see it in node editor, i connect that manually

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report