View Full Version : "Convert File Paths to UNC" checkbox?
06-19-2008, 11:57 PM
Can you toggle the "Convert File Paths to UNC" checkbox through maxscript?
06-20-2008, 12:07 AM
Here you go:
pathConfig.resolveUNC = true/false
06-20-2008, 12:14 AM
Hahaha that reallllly freaks max out. Nothing gets updated in the interface and it still thinks it's in MappedDrive land... but if I right click on a map and hit explore it sends me to the right place... so I think this works. ;)
Thanks a million.
EDIT: Hmmm... doesn't work with XRefs. Is there a way to convert everything in a scene to UNC?
I was looking at the atsops and it has a "convertselectedtoUNC()" function but I can't figure out how to "select all" to make it happen.
EDIT EDIT: Also doesn't change the output path : (
06-20-2008, 01:16 AM
Just tried this and this did not work. Any ideas why?
fileArray = #()
ATSOps.GetFiles &fileArray --collect all scene files and paths
deleteItem fileArray 1 --remove the actual scene file path
for f in fileArray do
I threw in a print (atsops.numfilesselected()) and it said "0, 0, 1" where 1 was the only file it changed.
So for some reason it won't select anything except for my output path... am I missing something?
06-20-2008, 02:46 PM
A few things I noticed:
1) Local drive(s) paths will not be resolved to UNC paths
2) Use:ATSOps.SelectFiles &fileArray
ATSOps.ResolveSelectionToUNC()instead of this loop:for f in fileArray do
)My tests showed the non-loop version was about 2.5-3 times faster.
06-20-2008, 06:02 PM
Just who I was hoping would show up. :D
I tried the loop free version but it only selected the last file. My loop unfortunately also only selected the last frame. And it let me run some debugging to discover it's not selecting anything except for my output file.
The resolveUNC is working fine it's just not selecting the files to resolve them.
06-20-2008, 06:12 PM
You may want to run a ATSOps.Refresh() after you do the changing to UNC.
06-21-2008, 07:06 AM
I tried that as well. The problem though is the selecting part. Not the resolving to UNC part.
If I select them all manually in the window and execute the resolveselectedUNC it works great. And when I debug with a filesselected function it only says "1" which makes sense since it's only changing one, the last one.
06-21-2008, 07:07 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.