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 (17)
Comment policy
.
Adding xRef Objects to the scene:
Loading xRefScene
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:
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?
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?
*
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.
*
I’ll try it out when i’m at work again in a few days. Besides the fact that you make a macroscript of it, put the function between brackets and that you make a button out of it. It seems all the same. The function is loaded from a file over a network drive but i wouldn’t see why that would be a problem here.
*
Also, i’m noticing that you use an @ in your FileIn function while i am not. Might that make a difference?
.
There si two ways to use path to folder/files with maxscript:
Since, copyed path from the Windows explorer not contains "\\" it is easyer to put @ in front of the path and not add \ where it is needed.
*
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 :)
.
I am glad to help.
Happy New Year!!! :)
I’m sorry that is my fault. I explained it a bit confusing because i wrote Toggle. What I like to just open the xRef Scenes / xRef Objects through maxscript.
Thanks miauu
.
For xRef scene:
I’m sorry that is my fault. I explained it a bit confusing because i wrote Toggle. What I like to just open the xRef Scenes / xRef Objects through maxscript.
Thanks miauu