PDA

View Full Version : Larger headings in your comments


davestewart
11-13-2008, 02:06 PM
Hi All,

I've been away from the max scene for a while in web development land, and have been bashing out code non-stop for what seems like forever!

Anyway, about a year ago I developed a tool to help me out when coding very long Flash scripts, as the editor in Flash is about as good as the one in MXS, ie no Outline View or code navigator or such like, so navigating scripts is not as easy as it could be.

Basically it allows you to place large ASCII Art style comments in your scripts, which can make it a bit easier to deliniate major sections, for example:



// some other code

// set a few variables maybe

// ------------------------------------------------------------------------------------------------------------------------
//
// ██ ██ ██ ██ ██ ██ ██████ ██ ████ ████
// ██ ██ ██ ██ ██ ██ ██
// ██ █████ ██ █████ ██ █████ ██ ██ ████ █████ ██ █████ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ██ ██ ██ █████ █████
// ██ ██ ██ ██ ██ ██ █████ ██ ██ ██ █████ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
// ██ ██ ██ ██ ████ ██ █████ ██ ██ ████ █████ ██████ ████ █████ ██ ██
//
// ------------------------------------------------------------------------------------------------------------------------
// Initialize Stuff

// rest of code goes here

// more functions

// etc


I've been using it in Flash for a while now and it's such a time saver, but have finally got round to updating the interface so it caters for max (and other languages) as well.

You will need to add a couple of lines to your user preferences file to coerce the SciTE editor into using a character set that can render "full-block" characters, or you can use alternative characters like # or @.

Use or download it from here:

http://www.keyframesandcode.com/code/development/comment-headings/

Hopefully some of you will find this useful.

Cheers,
Dave

EricDLegare
11-13-2008, 04:24 PM
Thanks a lot ! This will be much usefull :P

davestewart
11-13-2008, 04:35 PM
I've just updated it so that the application will now start with the first input and output preset, so max users, you will need to edit the preset.xml file so that the MaxScript options are are at the top.

davestewart
11-15-2008, 12:47 PM
I thought I'd briefly show the comparison between a comment-headered file and a normal file, and how it's easier to skim through the one with comment headings:




A file with comment headings (http://www.keyframesandcode.com/resources/flash/applications/Comment%20Headings/example1.as.txt).
A file with normal text-based headings (http://www.keyframesandcode.com/resources/flash/applications/Comment%20Headings/example2.as.txt).

LoneRobot
11-16-2008, 07:58 AM
nice work dave!

feilang
11-18-2008, 07:23 AM
It's cool, thanks , dave!

Blue
11-18-2008, 10:49 PM
Thank you for this, very interesting Dave.

davestewart
11-19-2008, 03:34 PM
OK - final update to the app: I've now added a selection of 12 custom fonts, of varying sizes and styles, full punctuation and European character set for most of them.

http://www.keyframesandcode.com/code/development/comment-headings/

I can't really see it needing anything else, so I think that's it for now.

Enjoy!

Kramsurfer
11-19-2008, 10:32 PM
The one thing I love about MXS editor is the Ctrl+Right Click menu... get's you right to the function/class/<whatever> there is in a long script... I wish other editors had this...

Of course your app here proves once and for all.. bigger IS better...

CGTalk Moderation
11-19-2008, 10:32 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.