Join our discord community

Please or Register to create posts and topics.

MAYA: Simple Reference Option

PreviousPage 2 of 3Next

remember that prism must manage these reference, prism already do create, update and remove, but it also need additional data to keep track of what it did before, otherwise, why use prism in the first place ?

I'm not sure I understand for asset management in Maya why it is important to add that extra data? This is what the vanilla reference system is built for - it keeps track of everything, so that when you update your reference it will add deformers, animation etc back on to your nodes - we don't need prism for this imo. The only additional feature needed is to check if there is a newer version of the assets available, and I think prism do that by checking the folder structure and file names.

I use prism for the same reason I used open pipeline before - having a nice interface to keep track of assets and making the publish and import steps easy to handle for the whole team.

Hey, sorry for my late reply to this topic, but I needed to find some time to understand and test the problem, since this is a bigger topic.

You are absolutely right Magnus, a file size increase from 60kb to 6mb is not acceptable. SciMunk noticed correctly that Prism writes data in the Maya fileinfo. These data are the settings of all states in the state manager. Usually this is not much data, but it also saves the names of all connected nodes to the fileinfo. In very early versions of Prism the settings were saved in an extra file next to the scenefile, but that caused many situations were all states got lost, because of artist mistakes or synchronization mistakes. Personally I prefer it to save the data in the scenefile, but if you prefer it otherwise I can add it to the feature list to have this as an optional setting.

You have a good point that for references it isn't necessary to store all nodes in the Prism state, the toplevel reference node would be enough. For normal imports however there is no better way to keep track of all imported objects. There is a UUID in Maya, which should identify objects independently from their name, but in some situations there can be multiple objects with the same UUID in the scene, so I don't want to rely on that. The main reason for Prism to keep track of all imported objects is that they can be deleted or replaced by other objects at a later point in time.

To your second post Magnus, Prism already used the replace/remove reference options from Maya, but there were some bugs still.

Today I worked on these points and I think these problems are solved now. When you import references, Prism will now store the main reference node only, which avoids the filesize increase and the performance drop. Additionally I added a setting on the import state "Keep track of imported objects". If you turn it off, Prism will not store any object names for that state in selection sets or in the fileinfo (selection sets, which were imported from the other file can still exist). This setting can be used for references and normal imports. The bugs which you had when updating imports are fixed now and you can also define the namespace for the import.

I haven't created new executables yet, since that needs some extra time and effort. I commited these changes to the GitHub repository in the development branch. https://github.com/RichardFrangenberg/Prism

You can download a .zip file for that branch (you don't even need a github account). Then you can open the Prism settings and in the "Miscellaneous" tab you can use the update button and select the downloaded .zip file to update your Prism version.

Thanks again for your detailed explanations and the recorded videos. They help a lot to understand and reproduce the problem. I don't use Maya every day, so most of the time I test new Prism features on small test scenes and I don't notice performance problems, which you would get with bigger scenes. There are still many ways to optimize Prism so let me know when you encounter other performance problems, which I don't notice. Would be nice to hear if the update solves your problem or if you have even more ideas to improve the reference workflow.

Hi Richard,

Thanks for the thorough reply and the update to Prism, really appreciate it! Also thumbs up for setting namespace on import (which we really should be calling "Create reference" as "import" is a different command in Maya, where the data is baked in the scene)

I was wondering if there is an easy way to clean up the maya scenes, so that there are no additional prism data?

Also, it would be really really great to make it easy to swap the reference node in any given import state. Additionally it would be helpful to be able to make an empty import state and link it with an already existing reference node - basically what I talk about at the end of the video in the first post. I've spent so much time cleaning up scenes for my team members, days even. Some easy tools and features like this would be quite the time saver!

Another thing I've been confused by is the reference path in the import state. I've tried to change this, but nothing really happen... It's not replacing the reference. Maybe since we are now using the reference nodes, this would simply show the reference path from the reference node in a locked string attribute (in lack of better words) - so if you wan't to override the reference path manually you can only do it from the reference editor, which makes is less prone to be out of sync with the state manager, since that is the string the reference node is showing.

So this might be a stupid question, just out of curiosity, is there any time when using the "import" function in Maya where you need to keep track of the nodes? I mean wouldn't you just use "references" instead? I could see a purpose in the days where referencing didn't work with alembic, but nowadays if you use the import feature, I guess it is to bake it in the scene and don't expect it to be a "dynamic" asset...?

 

In the dialog where you can set the namespace you can also set to import the objects, so it doesn't really matter if we call it reference dialog or import dialog, but of course you are right that this are two different things.

When you delete a state in the StateManager, the info of that state gets deleted from the scene, too. So if you have deleted all states in the StateManager, then only infos for the global start and end frame and the comment are saved in the fileinfo.

To delete all Prism data in the scene you can execute this in the Maya python console:

import maya.cmds as cmds
cmds.fileInfo(remove='PrismStates')
cmds.fileInfo(remove='PrismImports')

The Project Browser and other Prism tools don't save anything in the scene. The selection sets created by Prism you have to delete manually or they get deleted, when you delete the States.

I completely forgot to mention that feature to connect a new reference node to a import state in my last post. I attached an image how the import state looks now in the latest dev version. There is a button, which lets you connect a selected ref node to the import state. An option to create an empty import state doesn't exist yet, but that's a quick thing. I could let Prism create an empty import state when you press CTRL while clicking on the create import button.

If I get you correctly you changed the path in the import state and expect that it updates immediately? Changing the path has no immediate effect. You have to press the import button again or use the browse button to define and import a new file and then the existing reference will be relinked to the new file. Make sure that you use the GitHub Prism version, since in v1.1.1 it can happen that the old reference gets deleted and a new one created instead of relinking the existing ref node (like in your video).

I think there are quite a few situations, where you want to delete or replace imported objects, but of course it depends on your workflow. For example if you import objects from ZBrush. As far as I know ZBrush still doesn't support alembic, so you would need to import obj files and replace them if there are any updated version of that model. Another situation could be that you use temporary models from the internet to block out your scenes, which can be in all different formats. Later when the final assets are ready you want to remove the temporary assets from the scene. But I agree for alembics and Maya scenes it's usually better to reference them if you plan to update them later.

Uploaded files:
  • You need to login to have access to uploads.

oh wow, that's awesome! Thanks a million! Sorry I didn't get to check the new version, I've been stuck in bed with a bad flu the last few days. I guess it's that season 🙂

CTRL click to make empty state sounds like a good solution.

Ah, I was expecting the "import" button to import my reference (bake it to the scene - like in the command "import objects from reference"). It's slightly confusing with mixing the terms import and reference 🙂 Does it do the same as the import button in the import section top left? (which maybe could be named "add state"?) Maybe the three dots button should be renamed to replace - and the import under the path should be named "update" or "refresh" if it is just updating the string. Hmmm.. and maybe the refresh button could be at the end of the string (maybe with just a refresh logo instead of text), and the replace could be the big button below which is now import?  I'm super confused 😀 sorry!

Right, I see what you mean with the zbrush and blocking geo, and this is of course tied to workflow and preferences. Is the "keep track of imported objects" checkbox off by default? I would argue that this feature is only useful in very specific situations where you need to scatter the imported objects around in the outliner (if you are doing that, why not make a model reference file and scatter that one instead). Especially for new users who are used to standard Maya workflow this could be quite confusing. Lastly, if you turn it off, does it delete all prism data automatically?

Again, really appreciate the updates, super helpful. Thanks a ton!

Oh, I hope you get well soon.

That explains the confusion. The import button is more like a "get some data from the file in the text field" button, which can be an import or an reference. But it doesn't import existing references in any situations. The import button in the top left creates a new import state. The import button in the state settings on the right takes the current path in the text field and behaves the same as if you open the Task Selection dialog and double click a version.

I don't know if "replace" is the right word for the "..." button. You could import one asset and use this button to import other assets, but you select, that you want to keep the previous objects. So you could import many assets with one export state and you don't replace the previous one.

The import button doesn't refresh or change the string. It takes the string and lets you import or reference that file. If I name it "update", everyone would think that it imports the latest version. And it's the same as with the "..." button, you can use the import button to import multiple copies of the same asset.

The keep track of imported objects in on by default, because once you turn it off, you can't turn it on again. I mean you could, but it wouldn't be connected to any objects then. I think it's better to have it enabled by default and turning it off when it's not needed, but if other people also want to turn it off by default then I could change that anytime. If you really need it to be off by default, I could send you a Prism plugin, which modifies the default setting for that in your Prism installation.

Whenever you change a setting in the StateManager, the Prism data in the scene gets updates immediately. If you turn off the tracking of imported objects, the settings of the import state get updated in the fileinfo and it doesn't contain all the object names anymore and the selection set gets deleted. So yes all the Prism data of the imported objects gets deleted immediately, but some data for the settings of the state are still saved in the fileinfo.

Thanks for the explanation! Much clearer now. Tested a bit more at work today and and got the string to update by clicking the big import button 🙂

Would it be possible to add a "master" settings for the "keep track"-function in the main prism settings? It would just be one less thing for the team members to remember. These things stack up - atm I have a 12 page pipeline document with things to remember for the team - not all prism related of course). So let's say I set set up a project and know for sure it won't be used, I can set an override in the settings so it will be off by default when making an import state (or greyed out even, since it's not possible to turn it on again).

 

That's actually a pretty good idea. I planned to have a plugin directory in the project folder, to add project specific Prism plugins and I think I can add setting overrides together with that. I'll let you know when this is done.

You can turn the track objects setting back on, then it has no objects connected, but if you use the import button again, then the newly imported objects get tracked again. So there could be situations where you want it to turn back on even if that happens very rarely.

Ah I see, didn't think about that.

Any estimate when the new version with this function will be out with an installer?

PreviousPage 2 of 3Next