Jump to content

VEX emacs mode


cytrox

Recommended Posts

Hi,

I've done a (quick and dirty) VEX mode for emacs,

with syntax highlighting and the ability to compile directly out of emacs (including the ability to jump directly to source code lines where errors occured).

As I said, it's a quick hack (originally based on the renderman shader mode by Steve May, but most parts had to be rewritten) and I'm by no means an elisp expert, but it works, so if anybody is interested, here it is :)

Cheers

Jens

P.S. If anybody is also interested in a renderman shader mode with the same features, let me know and I will post it too.

vfl_mode.zip

Link to comment
Share on other sites

I have jed set as $EDITOR. same keybindings as emacs (well, at least the basic ones). I like jed for editing small stuff, like config files etc., where emacs would be overkill.

As for a hscript mode, why not :)

And here an update of the vex mode:

Changes include the ability to set the vcc command line from within emacs (via M-x vfl-set-vcc-cmd),

the ability to render directly to an otl (via C-c C) in the moment hardcoded to "vcc -l filename.otl filename.vfl",

and the ability to render a test image directly out of emacs:

you have to have a running houdini instance, open a port via "openport 5000" in the textport (port number hardcoded for now), setup a scene and a output mantra driver, install the otl containing the shader and apply it to some geometry, and then you can render directly out of emacs with C-c C-r, change the shader sourcecode, compile and rerender, all without leaving emacs.

The way it works is quite crude, and I would be happy about suggestions for improvement..

For now, emacs just calls "hcommand 5000 \"mwrite $HIP/$HIPNAME; opcd /out; render mantra1\""

The mwrite part was the best I could come up with to make houdini update the otl which changed on disk, by simply saving teh current hip file, as there is no "reload otl definition" hscript command I am aware of..

I think I will make most hardcoded parts (port number, rop name etc.) user-configurable in the future, and I'm very interested in any suggestions for making the whole workflow better and more streamlined.

What is your general workflow when writing vex shaders and ops?

Cheers

Jens

vfl_mode.zip

Link to comment
Share on other sites

i'm a nedit man.

nedit nedit nedit.

ps. anakinz78 made a nedit vex language syntax highight thing. wanna share?

Hey Jason,

Nedit's C++ syntax highlighting will work for VEX too. Go to Preferences -> Default Settings -> Language Modes...

In the dialog, select C++ & add .vfl into the File extensions parameter. Personally, I also add .cmd & .ds into the list. B)

Cheers!

steven

Link to comment
Share on other sites

  • 1 month later...
I think filthy.... er.... geriatric.... er... horribl.... er....

I think vi would win.

<_<

Marc

Sheesh!

Who *cares* what kind

V I M

of editor one uses!!?!?? You know; there are very few

V I M

things that really bother me in life, but I gotta tell ya, these

V I M

silly, adolescent wars about which stinking

V I M

editor is better..... I mean COME ON, PEOPLE!!!

V I M

Just use whatever suits the job at hand, and get ON

V I M

WITH YOUR LIVES, FERCHRISSAKES!...

V I M

:ph34r:

"geriatric" is pretty good, though, I gotta admit :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...