Modifying Furniture Textures from plugin fails to refresh automatically

This topic has been viewed 5564 times and has 2 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
Michely
Posts: 5
Joined: Wed Oct 30, 2013 4:35 pm

Modifying Furniture Textures from plugin fails to refresh automatically

Post by Michely »

Hi, I have a plugin that modifies the model materials using "setModelMaterials" but it does not automatically refresh the furniture items in both the 2D and 3D panes. Once I click and move a modified furniture piece then the changes become visible in both view panes.

What is required to update and refresh a furniture piece after using "setModelMaterials" to make the changes visible?

Any suggestions? Thank you....
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Modifying Furniture Textures from plugin fails to refresh automatically

Post by Puybaret »

Strange, both PlanComponent and HomeComponent3D instances listen to this kind of change.
Are you sure the materials changed? No stack trace of an exception?
Emmanuel Puybaret, Sweet Home 3D creator
Michely
Posts: 5
Joined: Wed Oct 30, 2013 4:35 pm

Re: Modifying Furniture Textures from plugin fails to refresh automatically

Post by Michely »

Hi, Thanks for the quick reply. The moment I move a furniture piece that had its materials changed via the plugin it will redraw using the new materials.
What would be the best way to force a complete redraw/refresh of a piece of furniture? (firePropertyChange?)
Thanks, Roland
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests