Forum breadcrumbs - You are here:ForumPrism: GeneralXgen handling
Please or Register to create posts and topics.

Xgen handling

Hello,

I was doing some experiment with Prism to load my xgen file into the shot, but I'm running into some problem

  1. When I try to export the xgen collection + the mesh it assigned on, prism keep exporting the reference rig even when it not listed as export object : 
    when I import the job, I get the reference : 
  2. second problem, importing the xgen collection this way make the Xgen UI do not process the collection, I know this is not really related to Prism as even importing xgen using a regular import / reference don't work, but could maybe prism have a built in way to handle it ?

Hello,

I wanted to find a way to force maya to aknowledge the importing of xgen using file reference or by simply import a scene, turn out it quit simple :

when a maya scene containing xgen fur is saved, it generate a 'nameofthescene_xgennaming.xgen', this file is read by maya whenever you load a scene with xgen.

what the stateManager of prism should propose is the ability to copy that "xxx.xgen" file (which is present alongside the exported/published .ma) into the location of the current scene, then import the scene file, and then call the mel command "xgmAfterOpenCB({"6"});" which will force xgen to refresh.

I tested this process and it work, with some little inconvenience : maya automatically generate a new '.xgen' based on the name of the current scene, which create duplicated version of this file, so some manual cleanup is required.

Thanks for testing this out. I think I can add that to the next version.

Regarding the reference rig:

When you export objects with Prism, Prism uses basically the same option as File->Export Selected in Maya. Could you try to select the objects in the outliner, which you added in the StateManager list and then use the File->Export Selected function in Maya. Does the reference rig get exported as well? And if so, would any of the export settings change that behaviour? Then I could change the export settings, which Prism uses.

I just did some test, it seem that 'preserve reference' must be turned off, otherwise it just exporte any reference in the scene even if not selected.

 

thanks for adding xgen support! tell me if you need any help with setting it up !

Yes the "preserve references" is turned on during exports with Prism. I think there are a few situations where you want it to be enabled, so I would have to add this option to the StateManager UI. But for now I attached the script where "preserve references" is turned off (line 571), just in case someone needs it at the moment.

The file has to be replaced in this location:

C:\Prism\Plugins\Apps\Maya\Scripts\Prism_Maya_Functions.py

For the XGen support I'll let you know if I have any problems.

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

Hi, just wanted to check if the .xgen file copy is gonna make it to the next version ?

that'd be super cool!

Unfortunately not, sorry. I wanted to get the new version out today, but this the next feature I'll have a look at. With the improved auto-update feature of Prism 1.1.2 you don't have to wait until the next official update. I'll let you know when it's ready.

I just added the preserve references option to the export state. If you have Prism 1.1.2 installed you can use the update button from the miscellaneous tab in the Prism Settings to get this new option. However, from the documentation and my tests it seems like this option only affects if the references get exported as references or as imported objects. But this option doesn't affect if the objects get exported or not. When the exported object has constraints to other objects in the scene, the constrained objects seem to be exported as well regardless of the preserve references function. Please let me know if the new preverse references option in the export state helps you (otherwise I will hide the option from the UI).

Can you confirm that there is still a problem with importing xgen scenes? I just tried it with Maya 2018.2 and Prism 1.1.2 and it seems to work fine. I can import the plane with groom on it and modify the groom settings in the new scene.