Vexus opens the wrong file at startup?

Vexus related Support Questions
Post Reply
Jmon
Posts: 5
Joined: Sat Jan 28, 2023 2:03 am

Vexus opens the wrong file at startup?

Post by Jmon »

Hello,

I would like to understand how does Vexus chooses which file to open at startup.

So far with my tests, I think it's opening the first .vx file that is listed in the folder of the current opened .max file. See the example files I have attached to this post:

1) - I open "vexusTestScene_v001_003.max" in 3dsmax.
2) - I open vexus editor using the menu
3) - Vexus opens "vexusTestScene_v001_002.vx", eventhough I previously used "vexusTestScene_v001_004.vx"

I think it would make more sense for Vexus to remember which file has been opened with that Max file. It's confusing here to find what render setup was used for which file.

Thanks
Attachments
File listing example
File listing example
Capture.PNG (10.17 KiB) Viewed 1196 times
hide2
Posts: 16
Joined: Mon Mar 18, 2019 12:01 am

Re: Vexus opens the wrong file at startup?

Post by hide2 »

Hello,

We have an API to open arbitrary VX files, so all we need to do is to create our own script to save the path to the VX file to be opened in the scene, and a script to launch it.

The script to save the file is
Create an ini file or an empty object, write information to it, etc., and record the path to the VX file to be opened with that file.

The script to launch that file would
Just read the recorded vx file path and start it.
Jmon
Posts: 5
Joined: Sat Jan 28, 2023 2:03 am

Re: Vexus opens the wrong file at startup?

Post by Jmon »

Thanks, yes at the moment I am doing a startup callback:


------------------------------------------------------------------------------------
-- Declare the function that will be called on scene opened
fn Vexus_PostOpen_Start = (
if vexus != undefined do (
local dir = maxFilePath
local vxFileName = getFilenameFile maxFileName + ".vx"
local vxFile = pathConfig.appendPath dir vxFileName
if doesFileExist vxFile == true do (
pushPrompt ("Opening Vexus file: " + vxFileName)
if vexus.status() == 1 do vexus.start()
Vexus.Edit()
Vexus.load vxFile
)
)
)
-- Add the CallBack
callbacks.addScript #filePostOpen "Vexus_PostOpen_Start()" id:#VEXUS_POSTOPEN_START
------------------------------------------------------------------------------------


Put this file in C:\Program Files\Autodesk\3ds Max 2023\scripts\Startup, and Vexus will try to open a file with the same name as the 3dsmax file.
That's usually what I prefer, to have 1 file / 3dsmax file.


Little remark here... Why is BBCode not enabled on this forum?
hide2
Posts: 16
Joined: Mon Mar 18, 2019 12:01 am

Re: Vexus opens the wrong file at startup?

Post by hide2 »

Maybe this forum is practically inactive.
It has been a long time since boomer answered your question.
Jmon
Posts: 5
Joined: Sat Jan 28, 2023 2:03 am

Re: Vexus opens the wrong file at startup?

Post by Jmon »

hide2 wrote:
> Maybe this forum is practically inactive.
> It has been a long time since boomer answered your question.
Yes I see that :? , thanks for your help!
boomer
Site Admin
Posts: 283
Joined: Fri Aug 11, 2006 9:03 pm

Re: Vexus opens the wrong file at startup?

Post by boomer »

Hey folks,

Sorry for the delay, we've been hammering away on a bunch of new projects. To answer your question, the way that the Vexus plugin should work is that it stores the name of the last .vx file that was executed for that file. If you are not experiencing that, we can take a look and see if we can investigate further.

Thanks!
Post Reply