Old (.7) Layout editing

Forum for support and development discussion regarding the python based unified editor tool for CEGUI, known as CEED.

Moderators: CEGUI MVP, CEGUI Team

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Old (.7) Layout editing

Postby harkathmaker » Sat Jun 16, 2012 05:32

Hi all,

I just started using the latest snapshot and it looks very exciting! New Christmas toy for a coder :rofl:

Unfortunately, after I made a pretty new layout with CEED, I couldn't get it to load in CEGUI 0.7.5. It looks like the layout is exporting in the 1.0 format.

Is it possible to export a backwards-compatible layout? I'm making an application to be released soon and prefer to work with a stable CEGUI version.

I have set my project preferences to 0.7 Target version, and the data files are samples/datafiles0_7.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Old (.7) Layout editing

Postby CrazyEddie » Sat Jun 16, 2012 06:30

Hi,

It's definitely possible for CEED to create 0.7.x compatible layouts, although there are currently still a couple of things that do not get converted 100% (this mostly involves differences in some values that get set on properties) - so knowing the cause of the issue you're having is very important, not only so that you can work around that if necessary, but also so that future releases of CEED can be further polished.

When the layout does not load in CEGUI 0.7.5 what happens precisely? Meaning, does the app throws an exception, does the layout load but not show correctly or do laser beams shoot from the monitor? :D If you could post the CEGUI.log from the failed load in your app and perhaps even the layout itself - if you are able to do that - then I think it should be easier to narrow down what the issue is.

Thanks,

CE.

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Sat Jun 16, 2012 09:47

That's it! The laser beam thing!

Haha, here's the exceptions it's throwing.

Code: Select all

16/06/2012 02:44:32 (Error)   CEGUI::UnknownObjectException in file c:\cegui-0.7.5\cegui\src\ceguiwindowfactorymanager.cpp(180) : WindowFactoryManager::getFactory - A WindowFactory object, an alias, or mapping for '' Window objects is not registered with the system.
16/06/2012 02:44:32 (Error)   CEGUI::InvalidRequestException in file c:\cegui-0.7.5\cegui\src\ceguiguilayout_xmlhandler.cpp(233) : GUILayout_xmlHandler::startElement - layout loading has been aborted since no WindowFactory is available for '' objects.
16/06/2012 02:44:32 (Error)   WindowManager::loadWindowLayout - loading of layout from file 'ItemManager.layout' failed.

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Sun Jun 17, 2012 06:33

With some testing I found that it's not liking the type attribute in the layout file. When I change it from <Window type="..."> to <window Type="..."> it doesn't throw the exception.

Of course it doesn't solve the loading problem, since the entire layout file is in version 1.0 (it just hits more exceptions).

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Old (.7) Layout editing

Postby CrazyEddie » Sun Jun 17, 2012 07:31

HI,

Hmmm, that case change for attributes is definitely taken care of by the compatibility layer in CEED. I'm not sure what else could be happening right now if the project is set to target 0.7. In CEED, when you look at the code view tab in the layout editor, how are the attributes cased?

Hopefully Kulik will be able to recognise the issue and offer some more useful advice.

CE.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Old (.7) Layout editing

Postby Kulik » Sun Jun 17, 2012 17:22

Set target to CEGUI 0.7, then create a file. It created 1.0 layout that will forever be recognised and saved as 1.0 layout.

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Mon Jun 18, 2012 04:06

So there is no way to save in the old format? I guess I should just use the old layout editor until the next CEGUI is released?

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Old (.7) Layout editing

Postby Kulik » Mon Jun 18, 2012 07:38

Yes, there is a way to save to old layout format. What do you think am I and CE describing in the 2 posts :lol:

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Mon Jun 18, 2012 17:50

Kulik wrote:Yes, there is a way to save to old layout format. What do you think am I and CE describing in the 2 posts :lol:


Ohh sorry, I misread it and thought that setting target to 0.7 still created 1.0 layouts forever :lol:

CrazyEddie wrote:In CEED, when you look at the code view tab in the layout editor, how are the attributes cased?


I have the target set to 0.7 and created a new layout, and the code tab looks the same as the saved output, i.e. it's formatted in 1.0 style.
The same thing happens when I open the StockDatafiles0_7.project and make a new layout.

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Old (.7) Layout editing

Postby Kulik » Mon Jun 18, 2012 20:01

Just tested and this definitely doesn't happen to me.

This is what comes out:

Code: Select all

<GUILayout>
    <Window Name="DefaultWindow" Type="DefaultWindow">
        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
    </Window>
</GUILayout>


Don't check the code tab, it will always display 1.0 format! It's at the time of saving that it gets converted to 0.7 compatible.

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Mon Jun 18, 2012 21:20

Started fresh from a new project and it saved successfully in the old format. I must have made my original project settings incorrectly, even though I kept checking that it was set to 0.7...

Since my layout file was saved in 1.0 mode, I guess I'll just go back to the old layout editor to remake it for 0.7 :(

User avatar
Kulik
CEGUI Team
Posts: 1382
Joined: Mon Jul 26, 2010 18:47
Location: Czech Republic
Contact:

Re: Old (.7) Layout editing

Postby Kulik » Tue Jun 19, 2012 00:11

Or you can just use ceed-migrate and migrate them automatically. It uses the same code as CEED internally uses for this. Should do most of the grunt work.

harkathmaker
Just popping in
Just popping in
Posts: 7
Joined: Sat Aug 28, 2010 03:50

Re: Old (.7) Layout editing

Postby harkathmaker » Tue Jun 19, 2012 19:15

Dang... should have looked at the forums before manually remaking it. Ah well.

Does the migrate tool go backwards as well as forwards?

I tried putting in --targetType 0.7 but it didn't seem to like that syntax.


Return to “Official Unified CEGUI Editor Tool (CEED)”

Who is online

Users browsing this forum: No registered users and 7 guests