Please or Register to create posts and topics.

Export of Set and Exlude specific Node

Hello, me again!

I noticed that when exporting a task on maya, prism omit any 'Set' that have been defined in the export, some of these set are usefull later in the pipeline, like for exemple definition of list used for script or character picker UI during animation.

Another feature that could be usefull is the ability to define a list of node that must be not exported, To use an exemple : during rigging, I use NgSkinTool, which is a powerfull skinning tool for maya, it a node that must only exist during rigging and is not needed once exported, the node by itself can generate hundred of MB of data, thus making scene slower to load and clutter memory. being able to define on the ExportTask some node to ignore, either by type or by name, this would lets us with more control over what is being exported !

 

Thanks again!

Concering the export of set, I believe it may be a bug of the exporter, after digging around the script for a little bit, I noticed this:

the bug happen if 'import reference' is checked

you correctly select the set at line 463:

cmds.select(origin.l_taskName.text(), noExpand=True)

then at line 524 you make a copy of the selection and selected it again on 542

prevSel = cmds.ls(selection=True, long=True)


cmds.select(prevSel)

the select on line 542 is missing the 'noExpand=True' which make maya ignore the Sets inside the export set.

Regarding deleting the ngSkinTools node etc I'm pretty sure you can use the "hooks" scripts. Insert some code that delete a certain file type in the scene before export.  I would guess it is the hook called "preExport".

this is indeed an option, I think having it as an actual feature with it own 'list' could be more convenient, ngSkinTool was just an exemple, there is no much information on prism about how to modify the UI using the hook, and I'm affraid I don't have enough time these day to read the full code.

Regarding the sets:

I don't see any reason why the noExpand flag is not set there, so I agree that's a bug. Thanks for finding the solution and posting it here.

 

The hooks are a good option to clean the scene or manipulating objects before the export and you could definitely do that with a hook. Of course it would be more convenient to have an UI for this. The UI should already exist when the export state gets created, which is before the preExport hook gets executed. So if you want to add options with UI you would need to create a Prism plugin instead of using the hooks.

Maybe I could add this as an example plugin how to add more export options with a plugin, since I think many people would like to add more options to the states, but don't know how to do it.