Reload all links from script

Is there any way to reload all links in one step? I have 9 links that I have to reload periodically. Currently I have to reload each one by one. Is there any way to script all 9 to reload, so I can run it and leave my PC for everything to reload?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
dmhokie's picture

Issue with materials

Ok, I'm realizing it isn't working exactly as I hoped. It reloads all of the links fine, but my materials get all jumbled up. After my fbx links are loading in, I have converted all of my materials to Standard materials. When I manually reload my links, I have to change the settings to what you see in the attached screenshot. Can those settings be controlled through a script like you sent?

AttachmentSize
2019-03-21_8-51-53.png 12.41 KB
miauu's picture

.

Try this

local flm = FileLinkMgr	
	if flm.numLinks != 0 do
	(
		for i = 1 to flm.numLinks do
		(
			flm.Reload i showUI:false translateMaterials:false
		)
	)
)
miauu's picture

.

What are those links?

dmhokie's picture

Oh sorry, they are FBX links.

Oh sorry, they are FBX links.

miauu's picture

.

Try this:

(
	local flm = FileLinkMgr	
	if flm.numLinks != 0 do
	(
		for i = 1 to flm.numLinks do
		(
			flm.Reload i showUI:false translateMaterials:true
		)
	)
)
dmhokie's picture

That works perfect. Thank you

That works perfect. Thank you so much!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.