Notifications
Clear all
[Closed] Refreshing Xref Materials via Maxscript
Mar 09, 2016 8:10 pm
Is there a simple way of just forcing a refresh of all Xref Objects in a scene? Based on my limited experience in working with Xref Objects through maxscript, I thought that
objXRefMgr.UpdateAllRecords()
should do it but it is returning false and not refreshing the xrefs.
A bit of context…
We have an internal script we’re using to help manage Xref Materials in the scene and integrate them with our post production workflow by displaying to the user information that isn’t readily available (Vray Effect IDs for example). I’m basically looking for a way to Update/Refresh all of the xref objects/xref materials from within the GUI itself – without having to use the Update Button in the File>Reference>Xref Objects dialog.
Thanks.
1 Reply
Mar 09, 2016 8:10 pm
Solved:
fn RefreshXrefMaterials =
(
xr = objXRefMgr
for i = 1 to xr.recordCount do
(
XRO = xr.GetRecord i
XRO.Update()
)
)
pretty simple actually.