Toggle xRef Scenes / xRef Objects
Hello all,
So of course i'm aware that you can just get to the xRef Scenes / xRef Objects by going through File -> Reference.
But i like to toggle the xRef Scenese / xRef Objects by using a script. I have my own "summary script" in which i like to include them.
So i'm looking for the function to toggle these two, unfortunately i couldn't find these online. Hopefully you can help me :)
Thank you.
Comments
.
Adding xRef Objects to the scene:
Loading xRefScene
Tools and Scripts for Autodesk 3dsMax
Haha. Is this all necessary
Haha. Is this all necessary just to open the xRef Scenes window/dialog?
Same for the xRef Objects? I think there is some miscommunication :)
.
Just to open the dialogs use this:
Tools and Scripts for Autodesk 3dsMax
Thank you. That is indeed
Thank you. That is indeed what i was looking for. Although for some reason this doesn’t work though a FileIn function which i’m using.
Do you have any idea how this might work then?
.
Can you show the code that you use along with teh fileIn function?
Tools and Scripts for Autodesk 3dsMax
Sure. This is the file that i
Sure. This is the file that i use to call the function.
rollout rollout4 "xRef"
(
button xrefScenes "xRef Scenes" tooltip:"Show all xRefs Scenes" width:90 across:3
button xrefObjects "xRef Objects" tooltip:"Show all xRef Objects" width:90
button copyXref "Copy xRef" tooltip:"Copy the selected xRef" width:90
button toggleXref "Toggle xRef" tooltip:"Toggle xRef" width:90 across:3
on xrefScenes pressed do (
fileIn ("W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\xRef Scenes\xRef Scene.ms")
)
on xrefObjects pressed do (
fileIn ("W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\xRef Objects\xRef Objects.ms")
)
on copyXref pressed do (
fileIn ("W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\Copy xRef\Copy xRef.mcr")
)
on toggleXref pressed do (
fileIn ("W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\Toggle xRef\Toggle xRef.ms")
)
)
.
Ok. But what is in the xRef Scene.ms for example?
Tools and Scripts for Autodesk 3dsMax
*
The only thing that is in there is what you wrote me:
max file xref scene
This works well if i just execute the function, just not in combination with the FileIn function.
.
Strange. Here is what I did:
1- open MaxScript Editor and paste this in a new file
2- save the file as xRefOpenFileIn.ms
3- create new file with this code:
and save it as mcrXrefOpenDialog.mcr file
4- drag and drop the mcrXrefOpenDialog.mcr onto 3ds max viewports and assign a hot key to it(Ctrl+T).
Every time when I press the Ctrl+T the XREf Scene dialog appears.
Tools and Scripts for Autodesk 3dsMax
*
Oke it works now.
It seems that the problem was indeed the path.
DOES WORK:
fileIn @"W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\xRef Scenes\xRef Scenes.ms"
DOESN'T WORK:
fileIn ("W:\Algemeen\Werknemers\Remy\3Ds Max\Scripts\xRef Scenes\xRef Scenes.ms")
Thank you for your help :)