Maya Connector publishing/referencing questions

Discussions related to all NIM connectors.
Post Reply
mplec
Posts: 3
Joined: June 6th, 2017, 1:23 am

Maya Connector publishing/referencing questions

Post by mplec »

Hi - I've been testing out the Maya connector today. Generally I like the way the referencing and master/publish concepts work and I think it will work for us. But I ran into a few technical problems, any feedback would be welcome. We're on Maya 2017 and running a linux NIM server.

Maya Save As - "selected" option saving all geo in scene, not just selected
- I have an existing scene with two geo groups ("cavs" logo and "warriors" logo) loaded.
- I select the "cavs" geo group in the Maya outliner and Save As "logos_MODEL_cavs" with "selected" ticked.
- New Scene..., Reference logos_MODEL_cavs version just published, and I get both cavs and warriors geo groups.

I tried this a few times just to be sure I really had it selected, really published to what I thought I did, etc and got the same results every time.
The only way I got around it was to delete the other geo when I did the Save As.

Maya Save As - breaks undo history?
- I have cavs and warriors geo. Delete one. Save As.
- Now Undo won't undo back to the delete before the Save As.

Maya Load Files - published file won't load
- Loaded v3 of saved logos_MODEL_cavs.
- Publish (this is the first publish of this asset).
- New Scene. Reference. Pick logos_MODEL_cavs asset.
- No versions listed in versions list.
- Clicking "Reference" button gives error "Sorry, no file specified. Please select a version to reference."
- Tried toggling filter from Published to Work to get versions to list. It shows versions for Work, but switching back to Published lists no versions.
- If I use "Open" instead of "Reference" the published version is listed and Open button works as expected.
- After seeing that, try Reference again but same results -- Published version is not listed.
- Opened and Published latest version of another model (logos_MODEL_warriors) but same thing happened.

User avatar
andrew
Site Admin
Posts: 287
Joined: June 24th, 2014, 8:10 am

Re: Maya Connector publishing/referencing questions

Post by andrew »

Hi,

Maya Save As - "Selected":
We aren't able to recreate the issue choosing the selected options or using Export Selected exports all items. Could there be something in Maya that is linking the two sets of geo?

If you run the following commands in a Maya Python Script Editor do you get the same result:

import maya.cmds as mc
mc.file( 'C:/path/to/export.mb', exportSelected=True, type='mayaBinary' )


Maya Save As breaks undo history... we are able to recreate this but have not tracked down the culprit yet. Oddly enough "
version up" does not break history and it shares the same code. We'll keep you posted on this one.


Maya Load Files - We had another client report a similar issue but we are unable to reproduce here. Can you confirm that the versionless file was created at publish. This file would exist in the Asset Root/Task Folder. In your example it would be called "logos_MODEL_cavs.mb"

Thanks,
Andrew

User avatar
andrew
Site Admin
Posts: 287
Joined: June 24th, 2014, 8:10 am

Re: Maya Connector publishing/referencing questions

Post by andrew »

Hi,

We found out something interesting about the Maya SaveAs breaking undo history. It's not actually breaking but somehow adding about 20 steps in the history. If you undo 21 times you should be able to get back to your last command before the save. We're looking into why Maya is adding undo's for the save process and if there's a way to have NIM bypass the history stack all together.

Thanks,
Andrew

User avatar
andrew
Site Admin
Posts: 287
Joined: June 24th, 2014, 8:10 am

Re: Maya Connector publishing/referencing questions

Post by andrew »

Ok, we nailed down the issue and were able to silence the undo queue. Now you will only have 1 undo as opposed to 20 when saving, exporting, versioning, or publishing.

The fix will be available in the next connector update.

Thanks,
Andrew

mplec
Posts: 3
Joined: June 6th, 2017, 1:23 am

Re: Maya Connector publishing/referencing questions

Post by mplec »

Thanks for the quick response. I've updated to 2.6.75.

I did some quick (simpler) tests with my old friends cube and sphere and couldn't repro the Save As selected issue so I'll dig on the original file a bit more and if I can repro and it's not something linked in the scene I'll follow up with more details.

The loading published files turned out to be a bit tricky. I saw this in the logs:

[Tue Jun 20 18:59:45.157771 2017] [:error] [pid 5986] [client 10.50.1.31:63040] nimAPI: publishSymlink exec: cd /nextvr/NextVR_Projects/170601_NextVR_Default_Job/assets/logos; ln -sf "../../../../170601_NextVR_Default_Job/assets/logos/MODEL/logos_MODEL_cavs/scenes/logos_MODEL_cavs_v07_PUB.mb" "./MODEL/logos_MODEL_cavs.mb"
ln: failed to create symbolic link './MODEL/logos_MODEL_cavs.mb': Read-only file system
[Tue Jun 20 18:59:45.163396 2017] [:error] [pid 5986] [client 10.50.1.31:63040] nimAPI: publishSymlink result:
ln: failed to create symbolic link './MODEL/logos_MODEL_warriors.mb': Read-only file system

I confirmed by just trying to make a symlink on the shared disk from the VM console logged in as nim -- no dice.

Say what!? How is it creating everything else then... normal files seem to work fine.

It turns out there's a setting needed on the VirtualBox VM to allow creating symlinks on the shared filesystem. (Maybe I missed this in the install?) The short answer is, stop the VM, then from a shell on the host system run:

Code: Select all

VBoxManage setextradata "NIM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1
Where SHARE_NAME is the name in the name column of the Virtual Box / Settings / Shared Folders list. (More details in the discussion at https://github.com/mitchellh/vagrant/issues/713.)

After restarting the VM, I can now create symlinks from the shell and lo and behold, my publishes now create the versionless file.

Thanks for the quick fixes on the connectors. It's all working as expected now. Productive day!

User avatar
andrew
Site Admin
Posts: 287
Joined: June 24th, 2014, 8:10 am

Re: Maya Connector publishing/referencing questions

Post by andrew »

That's great to hear it's all working now!

I've never heard of the issue with needing to use

Code: Select all

VBoxManage setextradata "NIM" VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1
to be able to make symlinks. We've tested multiple host OS's running VirtualBox and it's always worked at install. Thanks for sharing this and I'll dig into the docs to see if this is something we can have preset or at least include in the documentation.

Thanks,
Andrew

User avatar
andrew
Site Admin
Posts: 287
Joined: June 24th, 2014, 8:10 am

Re: Maya Connector publishing/referencing questions

Post by andrew »

Hi,

What OS are you running VirtualBox on, and what version of VirtualBox are you using?

-Andrew

mplec
Posts: 3
Joined: June 6th, 2017, 1:23 am

Re: Maya Connector publishing/referencing questions

Post by mplec »

The host is macOS 10.12.15 (Sierra).
VirtualBox is 5.1.22 r115126.
And the NIM server is the linux VM.

Here's the VirtualBox docs page about the symlinks setting requirement: http://www.virtualbox.org/manual/ch04.h ... redfolders

Post Reply