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

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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.
Last edited by Ruud v A on Sun Aug 22, 2010 2:23 pm, edited 11 times in total.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 9

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

Post 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 :)
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 9

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

Post 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.
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 150
Contact:

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

Post 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)?
User avatar
_tommo_
Gnoll
Posts: 677
Joined: Tue Sep 19, 2006 6:09 pm
x 5
Contact:

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

Post 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
OverMindGames Blog
IndieVault.it: Il nuovo portale italiano su Game Dev & Indie Games
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 150
Contact:

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

Post 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>
User avatar
xavier
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 9481
Joined: Fri Feb 18, 2005 2:03 am
Location: Dublin, CA, US
x 22

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

Post by xavier »

Notepad++ does syntax highlighting too...
Do you need help? What have you tried?

Image

Angels can fly because they take themselves lightly.
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

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

Post by nikki »

Does it work on Linux too? I can stick with Vim though. :roll:
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post by Ruud v A »

Unfortunately not. It is based on the .NET framework, so it can't be ported to Linux or OS X.
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

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

Post 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. ;)
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 150
Contact:

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

Post 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
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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!
Penguin
Halfling
Posts: 83
Joined: Fri Feb 15, 2008 6:39 pm

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

Post by Penguin »

I'd love to see this in Visual Studio. Any chance? Or should I start work on doing it myself?
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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.
Last edited by Ruud v A on Sun Dec 28, 2008 9:27 pm, edited 1 time in total.
Penguin
Halfling
Posts: 83
Joined: Fri Feb 15, 2008 6:39 pm

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

Post by Penguin »

I usually like to keep everything in one editor, but Yaose might be an exception. It looks really useful.
User avatar
madmarx
OGRE Expert User
OGRE Expert User
Posts: 1671
Joined: Mon Jan 21, 2008 10:26 pm
x 50

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

Post 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
Tutorials + Ogre searchable API + more for Ogre1.7 : http://sourceforge.net/projects/so3dtools/
Corresponding thread : http://www.ogre3d.org/forums/viewtopic. ... 93&start=0
User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 150
Contact:

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

Post 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
}
User avatar
Ruud v A
Gremlin
Posts: 150
Joined: Mon Jan 28, 2008 6:44 pm
Location: The Netherlands
x 5
Contact:

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

Post 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.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 9

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

Post 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!
User avatar
nikki
Old One
Posts: 2730
Joined: Sat Sep 17, 2005 10:08 am
Location: San Francisco
x 13
Contact:

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

Post by nikki »

It looks really good now. I'm on my laptop with Windows, so I'll give it a shot.
User avatar
Rasengan
Halfling
Posts: 46
Joined: Sun Jul 13, 2008 12:21 pm
Location: Brussels

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

Post by Rasengan »

Nice work, very usefull. I'll use it.
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4302
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 131
Contact:

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

Post 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.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
calsmurf2904
Orc
Posts: 401
Joined: Tue Sep 16, 2008 9:39 pm
Location: Netherlands

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

Post 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 =)
Visit my blog at http://calsmurf2904.wordpress.com !
Got a Google Wave account? Add me as contact! (projectxgame <at> gmail <dot> com)
Image
Post Reply