question

Andrew Wilkins avatar image
Andrew Wilkins asked ·

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

mtoastandin
3 comments
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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!

0 Likes 0 · ·

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?


0 Likes 0 · ·
Andrew Wilkins avatar image Andrew Wilkins Stephen Blair ♦♦ ·

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.

0 Likes 0 · ·
Stephen Blair avatar image
Stephen Blair answered ·

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) )


1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

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

0 Likes 0 · ·
Jonathan Kh avatar image
Jonathan Kh answered ·

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 :)

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.