Jump to content
Sign in to follow this  
cytrox

VEX emacs mode

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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites
Does anyone use emacs with the Alt-e key?

I do. :)

Partly because I like emacs more than vi and partly because it annoys the hell out of ken. :P

jim.

Share this post


Link to post
Share on other sites

i'm a nedit man.

nedit nedit nedit.

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

Share this post


Link to post
Share on other sites

ok, try VISUAL instead of EDITOR. Might eliminate that extra shell window.

Share this post


Link to post
Share on other sites
You know, i'm curious. I'd love to see a poll on here on the different editors. :P

I think filthy.... er.... geriatric.... er... horribl.... er....

I think vi would win.

<_<

Marc

P.S. hohoho... :D

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Yep, and Anakin all the extra keywords and functions to it.. it's pretty complete.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

I'm myself a Nedit guy, got the rib, sl, mel highlighting trade for vex.

Also Jason, have you found a way to keep multiple files open in one window?

Cheers

Andre

Share this post


Link to post
Share on other sites
I'm myself a Nedit guy...

Yeah; I just downloaded Nedit to check it out... looks pretty good (looks a lot like gvim :P)

.... I was kidding, by the way... :rolleyes:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×