VMOD Editor

Post Reply
mythereal
Posts: 3
Joined: Sat Apr 13, 2024 7:12 pm

VMOD Editor

Post by mythereal »

Hi all, I've searched this forum and Google, but no luck on finding a direct VMOD editor since, insanely, the auto-generated code cannot be edited. I found that the java code is in human-readable form in the VMOD, but that's a red herring; the actual code is above. Notepad++ doesn't handle the NUL value in the Windows clipboard, so find/replace doesn't work as expected.

Does anyone have another editor which will do find/replace on the VMOD code?

TIA,
Robert~
UrbanCyborg
Posts: 599
Joined: Mon Nov 15, 2021 9:23 pm

Re: VMOD Editor

Post by UrbanCyborg »

Don't think I'd be messing directly with the .vmod files. I strongly suspect that any changes you make there will just get changed back again when VMD loads the file. Changes to the .java files certainly work that way; you can change things in the user sections, but changes to the other sections just get changed back. And at worst, you might get the file into an indeterminate state and crash VMD. Just my 0.2 Confederate cents.

Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
mythereal
Posts: 3
Joined: Sat Apr 13, 2024 7:12 pm

Re: VMOD Editor

Post by mythereal »

UrbanCyborg wrote: Sat Apr 13, 2024 8:46 pmI strongly suspect that any changes you make there will just get changed back again when VMD loads the file.
Hi Reid, and thank you. I know that VMD takes all of its information from the .vmod file - and nothing from the generated .java file - and that the java "source code" as shown in the .vmod file takes its information from earlier in the .vmod file. VMD won't overwrite what you do in the code above that source code, but will overwrite that source code from the earlier code.

A few simple edits seem to be fine, but there are a lot of dangers here as you've alluded. That's why I am looking for an editor which can safely modify the files. I'd rather deal with code than with onerous, time-consuming changes using the "designer" GUI for each and every control. What should take minutes, or even seconds, in an editor can take several minutes to several hours in the GUI. :(

The other option, I suppose, is to scrap using the VMD altogether after the initial design is implemented, and edit all of the code in the .java file using another Java IDE. Alas, that's for a more experienced VM designer, unfortunately.

Wish CA would just take off the Java training wheels from VMD.
UrbanCyborg
Posts: 599
Joined: Mon Nov 15, 2021 9:23 pm

Re: VMOD Editor

Post by UrbanCyborg »

There are several designers who create their module interfaces from scratch, initializing the controls in the Initialize() notification. Admittedly, it's a lot of work. The way I do that when I need to is to copy the designer-created code for some controls and modify the things that need it, like locations. I don't think you're going to find an editor that understands the .vmod format except for VMD's editor. I'm curious as to which parts of the file you want to edit. Just the copy of the Java source in the file?

Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
mythereal
Posts: 3
Joined: Sat Apr 13, 2024 7:12 pm

Re: VMOD Editor

Post by mythereal »

Thanks for the info on how others are handling it. I may build some Java templates and just do it the same way.

I want to edit the properties of many objects at the same time. For instance, if I have 30 knobs, all starting at 0.0, with 99 steps between it and 1.0, using the same skin and size, then arrange 25 of them in a grid, then it's much easier to do it programmatically than it is to do it through the GUI.

I doubt I'm going to be able to find an editor, but it never hurts to ask :)

Thanks again!
Robert~
ColinP
Posts: 953
Joined: Mon Aug 03, 2020 7:46 pm

Re: VMOD Editor

Post by ColinP »

It's not entirely clear-cut that programmatic UI creation is faster than doing it using VMD's design pane.

It is possible to be very adept using the graphical approach, albeit after considerable practice. You can quickly do accurate duplications and alignments and critically you can change object properties en masse (for instance you can select a group of controls and change the width of all the controls in one go).

There are pros and cons to each approach. The big downside of doing things programmatically is arriving at a balanced and aesthetically pleasing layout. I tend to mock things up in the design pane even if I intend to create everything using code.
Post Reply

Return to “Module Designer”