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~
VMOD Editor
-
- Posts: 625
- Joined: Mon Nov 15, 2021 9:23 pm
Re: VMOD Editor
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
Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
Re: VMOD Editor
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.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.
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.
-
- Posts: 625
- Joined: Mon Nov 15, 2021 9:23 pm
Re: VMOD Editor
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
Reid
Cyberwerks Heavy Industries -- viewforum.php?f=76
Re: VMOD Editor
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~
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~
Re: VMOD Editor
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.
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.
Re: VMOD Editor
I tend to use a mix of placing objects in the interface or place them dynamically..
I copied part of the code that places for instance a knob and changed that into a function that I can pass dimensions, name, location and other necessary parameters to.
In that way I built a library for all common objects that I need to place and put them in a module if I need them..
Then in the Initialize section I could run a for next loop to go through all of those object that are then placed in arrays so I could do stuff like Knobs.GetValue().
I design the backgrounds using Adobe Illustrator while in VMD I would create a mockup first using ellipses and rectangles in proper sizes..
It is not ideal and especially trying to create an interface with multiple ‘tabs’ is a pain…
You can obviously add objects as a child to a rectangle and once you SetVisible(false) for that object hides them in the live interface but you cannot hide them in the editor so that really messes up stuff.
In that case you are almost forced to place most objects programatically.
Downside to dynamic stuff is you need to keep a close eye on the order in which you place the objects and be aware of z-depth…
Anyway I’ve built a whole number of modules this way and you get used to the routine… In the end you deal with the shortcomings as in any program or language..
I copied part of the code that places for instance a knob and changed that into a function that I can pass dimensions, name, location and other necessary parameters to.
In that way I built a library for all common objects that I need to place and put them in a module if I need them..
Then in the Initialize section I could run a for next loop to go through all of those object that are then placed in arrays so I could do stuff like Knobs.GetValue().
I design the backgrounds using Adobe Illustrator while in VMD I would create a mockup first using ellipses and rectangles in proper sizes..
It is not ideal and especially trying to create an interface with multiple ‘tabs’ is a pain…
You can obviously add objects as a child to a rectangle and once you SetVisible(false) for that object hides them in the live interface but you cannot hide them in the editor so that really messes up stuff.
In that case you are almost forced to place most objects programatically.
Downside to dynamic stuff is you need to keep a close eye on the order in which you place the objects and be aware of z-depth…
Anyway I’ve built a whole number of modules this way and you get used to the routine… In the end you deal with the shortcomings as in any program or language..
Request for Music
Re: VMOD Editor
you need to tell VMD that you're using an external editor. it will then create .java files next to the .vmod files which you can edit. vmd syncs on changes if you save an edited .java file (works 90% of the time... sometimes you need to save in vmd and the external editor back and forth).
I only use VMD for compiling, publishing and debugging. i do all actual coding and file management in an external editor.
To enable external editors go to EDIT -> PREFERENCES -> CODE EDITOR and enable syncing of .java (and .jar) files.
It is worth mentioning that you can only edit the parts within the commented sections. if you edit anything outside of those markers vmd will override your edits.
I only use VMD for compiling, publishing and debugging. i do all actual coding and file management in an external editor.
To enable external editors go to EDIT -> PREFERENCES -> CODE EDITOR and enable syncing of .java (and .jar) files.
It is worth mentioning that you can only edit the parts within the commented sections. if you edit anything outside of those markers vmd will override your edits.