confused save scene

This topic has been viewed 6164 times and has 3 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
akuma
Posts: 8
Joined: Fri Jan 24, 2014 7:13 am
Country: La Havana, Cuba

save scene

Post by akuma »

Hi how I can call from a plugin to the methods to save the scene in .sh3d format. [:-/]
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: save scene

Post by Puybaret »

What about the save method in HomeController class?
Emmanuel Puybaret, Sweet Home 3D creator
akuma
Posts: 8
Joined: Fri Jan 24, 2014 7:13 am
Country: La Havana, Cuba

Re: save scene

Post by akuma »

yes, of course, sorry, but I formulated the question wrongly. I really want to know is how i can add extra information to the .sh3d
file. if I don´t make this from a plugin what way I need to follow.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: save scene

Post by Puybaret »

With a plug-in, the only way I can see could be using the setVisualProperty method in Home class. Be sure that all the objects you store there implements java.io.Serializable interface.
Without a plug-in, you will have more freedom but it will be more complicated, since you will have to create a derived version of Sweet Home 3D, by subclassing SweetHome3D class, to override its getHomeRecorder method and return a different HomeRecorder instance. If you go that way, you can also override createHome to return a Home subclass instance of your choice.
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest