Jump to content

Script - 3Ds Max convert path to UNC


adios
 Share

Recommended Posts

Hi,

I Have a great script that convert maps and objects path to UNC path, for NET rendering.

(G: --> \\NDH-FS01\Users, in my case).

I need it to convert WEB file (Photometric IES file) path also.

I tried to change the code but with no success.

:confused:

did someone know how to script that feature.

 

-- converting path to UNC
pathConfig.convertPathToUnc "\\NDH-FS01\Users"

-- maps path
for m in (getClassInstances bitmapTexture) do
m.fileName = pathConfig.convertPathToUnc m.fileName

-- set Render Output path
rendOutputFilename = "\\NDH-FS01\Users"

-- set Render Elements path
re = maxOps.GetCurRenderElementMgr()
for n = 0 to (re.NumRenderElements() - 1) do
(
el = re.GetRenderElement n
fl = re.GetRenderElementFileName n

el.bitmap.fileName = pathConfig.convertPathToUnc fl
--or...
re.SetRenderElementFilename n (pathConfig.convertPathToUnc fl)
)


-- XRef Objects path
for obj in objects where IsKindOf obj XRefObject do
(
obj.proxyFileName = pathConfig.convertPathToUnc obj.proxyFileName
obj.fileName = pathConfig.convertPathToUnc obj.fileName
updateXRef obj
)

 

Thanks in advance.

:D

Edited by adios
Link to comment
Share on other sites

Hi,

Nothing is wrong with it, :-)

I work with small team and we use distributed rendering.

It's much easier to use the pre-render script option.

The script is already doing a great job except this part.

It is very convenient to use script when you work with team.

Thanks..

Does anybody have an idea?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...