ScriptSpot home

Forum topic · General Scripting

Reload all links from script

By dmhokie · 2019-03-11

Description

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 (8)
dmhokie

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?

Attachments
Reply to dmhokie
miauu

.

Try this


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

*

Sorry for bringing this back up, but I am trying to get this working like I need it to again. It does reload all of the links, but when I try to use the translateMaterials:false, it still seems to reload the links with keep 3ds max scene parameters and assigments on reload checked. I need the links to reload with those check boxes off. Is that possible, and do I need to tweak that script for it to work?

Reply to dmhokie
miauu

.

Are you using the same 3ds Max version? If not, then maybe there is a bug in the version that you use. If Yes - then I don't know what may be the reason for the problem(installed update maybe).

miauu

.

What are those links?

Reply to dmhokie
miauu

.

Try this:


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