www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Changing name of template « View previous topic :: View next topic » 
Author Message
helmers
PostPosted: Sun Dec 07, 2008 6:16 pm    Post subject: Changing name of template Reply with quote



Joined: 21 Sep 2008
Posts: 4

May be that I simply do not find the right button to do this, but it would be very helpful if it is possible to chenge the name of an object template.

It seems that currently the name is taken from the mesh inside the .dae file. The problem starts when you want to include the information which file to load during game start. In the exported .txt file is only the name of the template, not the name of the file from which it was loaded. Most often this will differ.

So I it would be nice to be able to make the template name editable so that I can change it to the filename or something that I can use to load the object later on in my engine.

So keep up your good work!
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Dec 08, 2008 7:46 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1327

Hi, you can change the name of the instances (objects you place on the map) but not of the templates. The reason for this is that Grome cannot save your geometry templates, the plugins are only for reading. There was no point to develop saving capabilities for all the reading plugins since Grome is not a generic geometry editor. This is a rare case when you want to modify the template.

Another reason is that, in practice, a file may contain multiple templates in it (a collada file can contain multiple objects, materials, images etc).

In case you know your collada files contain only one object, you must make sure the name of the object is the same as the name of the file before exporting it from the modeling application that is producing the file. In case your files are already exported you can simply edit the collada files (they are simple text XML files) by looking for <geometry id="..." and replacing ... with your file name. Also make sure you replace all the other references to that name inside the dae file (especially in <instance_geometry url="#..."> statements).

A better solution, I think, would be for us to modify the text exporter to contain the name of the file (and eventually the path) too. In this way you don't have to manually modify all the templates. We will have this modification made in 1.3 (to appear at the beginning of next year). We cannot include in 1.2 since the current SDK doesn't allow access to the node storage (to get the file name and path).

Regards,
Adrian L.
Quad Software
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group