Page 1 of 4

Yaose 2.1, Ogre script editor (Yaose 3 preview on page 3)

Posted: Sun Dec 28, 2008 1:50 pm
by Ruud v A
I used to edit my .material files with notepad. Then I began to wonder, isn't there a tool that supports syntax highlighting for .material files? I searched but I didn't find something good. Only WYSIWYG editors and the Google summer of code project. That supports syntax highlighting for material files, but I couldn't find a download location. So I wrote my own. I now present you:

Yaose 2.1
Yet Another Ogre Script Editor
(but it might actually be the only one...)

Image
More screenshots, more screenshots, more screenshots, more screenshots, more screenshots, more screenshots, more screenshots, more screenshots.

Download here (direct link)
Windows only, .NET Framework 3.5 required.
Or visit Yaose at my site.

I intentionally wanted Yaose to be able to open all Ogre script files, and I still plan on implementing that. Currently, it can only edit material and compositor files, because the syntax of other files is different (material and compositor start with material or compositor and then the name, other files start directly with the name). I want to request all Ogre developers to change this.
[20/01/09]: Changed, Yaose can now edit all Ogre script files.

Features
  • Syntax highlighting
  • Code suggestions
  • Argument hints
  • Easy inserting colours with colour dialog
  • Intellisense for inheriting and variables
  • Scanning import files if the file is saved
  • Regex find/replace
  • Undo support
  • Automatic brackets creation
  • Automatic and smart indention

You just have to try to realise how powerful Yaose is :).

Yaose is not very fast. This means that it becomes slow when working with large files like Example.material.

I probably made some typos while converting the manual to a format that Yaose can understand. There are probably other bugs to. If you find one, please report it. Suggestions are also welcome!

Have fun and let me know what you think.
~Ruud.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 2:00 pm
by nullsquared
Oh, nice :D. Looks a lot more useful than notepad :mrgreen:. Anyways, I'm personally sticking with Code::Blocks, the nightly builds have syntax highlighting for Ogre scripts :D (and this way I keep a single environment between C++, Lua for the scripting, and Ogre material scripts). I bet this would be very useful for others, though - does MSVC have Ogre script highlight? I'm assuming not :)

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 2:15 pm
by Ruud v A
I didn't know C::B supports Ogre script highlighting. But Yaose has more features than just syntax highlighting. Visual Studio does not support syntax highlighting of Ogre script files by default, but you can write custom languages pluging (for example, there is a plugin that lets you edit Python scripts with Visual Studio). This looked very complicated however, even more complicated than writing my own syntax highlighter.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 2:34 pm
by nullsquared
Ruud v A wrote:I didn't know C::B supports Ogre script highlighting.
Apparently only the night builds do :|
But Yaose has more features than just syntax highlighting.
Yeah, the code-completion looks top-notch, C::B only does that when it feels like it, or on Wednesdays :lol:.
Visual Studio does not support syntax highlighting of Ogre script files by default, but you can write custom languages pluging (for example, there is a plugin that lets you edit Python scripts with Visual Studio). This looked very complicated however, even more complicated than writing my own syntax highlighter.
Agreed. Once again, looks like a useful tool :)

EDIT: What about .program? Those start with vertex_program and fragment_program.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 2:46 pm
by spookyboo
This is definately useful. I'm writing my material files with either notepad or Visual Studio and neither is useful.
Can I add other types of scripts also (i.e. particle universe scripts)?

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 3:17 pm
by _tommo_
Downloaded!

I think that it's very useful for who uses VC++ like me...
Ogre Scripts have a really verbose and complex sintax/keywords, so I do something wrong 99% of the times...
the autocompletion should fix this enough :D

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 4:40 pm
by spookyboo
Cool, I created a pu.xml file and it just works.
One request: I have to name it pu.xml so that it is associated with the *.pu extension. I would like to have a possibility to relate (multiple) files with different extensions to one .xml file, with an arbritrairy name for the xml file (for instance by setting this in the xml file). For example:

Code: Select all

<extensions>
   <extension = "pu" />
   <extension = "pua" />
</extensions>

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 4:43 pm
by xavier
Notepad++ does syntax highlighting too...

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 5:11 pm
by Ruud v A
nullsquared wrote: EDIT: What about .program? Those start with vertex_program and fragment_program.
They are just .material files, and supported as .material. I didn't add support for file extensions yet because the current structure doesn't allow that.
spookyboo wrote:This is definately useful. I'm writing my material files with either notepad or Visual Studio and neither is useful.
Can I add other types of scripts also (i.e. particle universe scripts)?
All types are loaded in xml files in the install directory (as you have discoverd). I don't know whether the particle universe syntax is the same as other scripts, but if it is you can make your own xml file. File extensions are set on install, but I can include more scripts in the next version that you can associate on install.
Setting file extensions in the xml file is a good idea though, I'm going to add that.

Edit: I took a look at the .pu scripts, and the syntax is good. Pu files can be implemented with Yaose. Is there a documentation like the Ogre manual for Particle Universe? Or would you like to create the xml file yourself (the syntax should be clear when you look at the other two files)?
_tommo_ wrote:Ogre Scripts have a really verbose and complex sintax/keywords, so I do something wrong 99% of the times...
the autocompletion should fix this enough :D
Yeah I had that problem too :) I had to look in the manual all the time. That's one of the reasons I wrote Yaose.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 6:17 pm
by nikki
Does it work on Linux too? I can stick with Vim though. :roll:

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 6:24 pm
by Ruud v A
Unfortunately not. It is based on the .NET framework, so it can't be ported to Linux or OS X.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 7:50 pm
by nikki
Ruud v A wrote:Unfortunately not. It is based on the .NET framework, so it can't be ported to Linux or OS X.
That's ok, I can stick with Vim. ;)

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 7:55 pm
by spookyboo
A few comments (again):
- If i use CTRL-SPACE, it enters a space in my text.
- A CTRL-SPACE at the end of a file freezes the application for a while.
- If the search box is opened (after CTRL-F) it doesn't close if I press ESC.
- After using CTRL-SPACE and selected an item, I'm used to press RETURN to select an item and not TAB.
- Can it be opened full windowed?
- CTRL-SPACE doesn't seem to work when I'm more that 2 levels deep (maybe I'm doing something wrong). For example

Code: Select all

system
{
    ...
    technique
    {
       emitter
       {
           ---- 3rd level does not work ----
       }
    }
P.S. I'm working on the xml file already. I wanted to do this for Notepad++ but I might as well do it for Yaose :D

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 8:28 pm
by Ruud v A
spookyboo wrote:A few comments (again):
- If i use CTRL-SPACE, it enters a space in my text.
- A CTRL-SPACE at the end of a file freezes the application for a while.
Ctrl+space is not a special keyboard shortcut. What should it do? In fact, I'm using ctrl+space as a shortcut for my Plus Messenger.
Edit: you seem to think that ctrl+space brings up the suggestions window?
spookyboo wrote: - If the search box is opened (after CTRL-F) it doesn't close if I press ESC.
I discovered that too. After further investigation, the about box has the same problem. Esc doesn't close dialogs by default. I will change this. For now alt+F4 works.
spookyboo wrote: - After using CTRL-SPACE and selected an item, I'm used to press RETURN to select an item and not TAB.
I hesitated a long time about this, and I first used return. The problem was that sometimes when I pressed return, it inserted a value while I needed a newline. Tab also has this problem but you need tab less often. I might add an option to change this, and choose the key you prefer.
spookyboo wrote: - Can it be opened full windowed?
Right-click the shortcut you use to open Yaose, click propperties. There is an option to change the window state on open. Or do you mean save the window state when the application exits?
spookyboo wrote: P.S. I'm working on the xml file already. I wanted to do this for Notepad++ but I might as well do it for Yaose :D
Great!

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 8:58 pm
by Penguin
I'd love to see this in Visual Studio. Any chance? Or should I start work on doing it myself?

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 9:19 pm
by Ruud v A
No chance. Integrating this in Visual Studio would require a completely different approach. If you want to make a plugin yourself you need the Visual Studio SDK. Like I said this is complicated. What's wrong with Yaose? It doesn't require to load long times so you can use it as external editor.

@Spookyboo: esc bug solved. New version is online.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 9:26 pm
by Penguin
I usually like to keep everything in one editor, but Yaose might be an exception. It looks really useful.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 9:35 pm
by madmarx
Bravo!
To be able to SEE and select the colors directly in a photoshop-like panel is really a big plus!
I like very much the screenshot with the color selection panel.

I will certainly use it,
Well done!

Pierre

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 9:38 pm
by spookyboo
How do I define the construction where I have an emitter of a certain type and each emitter has base attributes and gets additional attributes based on that type? In my current xml I get either the arguments of the 'emitter' parent or the arguments of the 'Billboard' parent, but not both.

Code: Select all

emitter Billboard
{
   emitter_attr_1
   emitter_attr_2
   Billboard_attr_1
}

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 9:51 pm
by Ruud v A
I don't really understand you.
You mean that "billboard" isn't the name of the emitter but an argument? In that case this isn't possible. You can define a list of possible emitter by declaring emitter both as keyword and argument (but it will, for now, show up double in the suggestions list). If you want to declare different emitters that all have the same base values, you still need to define them for each emitter (just copy them). If you want both you need to define them both. In thas case Yaose will suggest more values than possible in the current context.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 10:07 pm
by nullsquared
Ok, now with the colour selection and Really Smart code completion is looks tons better than Code::Block's material highlighting. Great job!

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 10:10 pm
by nikki
It looks really good now. I'm on my laptop with Windows, so I'll give it a shot.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 11:30 pm
by Rasengan
Nice work, very usefull. I'll use it.

Re: Yaose, Ogre script editor [bèta]

Posted: Sun Dec 28, 2008 11:38 pm
by spacegaier
I can only second the posters before: Well done!

However, a small note (or rather big one): At least on my PC I can't use the intellisense with the ENTER key, meaning that I can select one possible option with the up and down key, but when I hit ENTER the cursors jumps into the next line witout adding any content. If I proceed a double click on one option, content is added. Is that how it should behave or just a bug or problem on my PC? If that done willingly, could you please add the ENTER key action, please?

Apart from this, a very helpfull tool.

Re: Yaose, Ogre script editor [bèta]

Posted: Mon Dec 29, 2008 12:28 am
by calsmurf2904
It's a fellow dutchman! (I'm dutch too lol)
Anyway....looks great...I might even use it (I hate it when I need to search all those definitions up)
Your intellisense feature sounds great =)