windrobin / papervision3d

Automatically exported from code.google.com/p/papervision3d
0 stars 0 forks source link

replaceMaterialByName doesn't work so well if the same material is used mulltiple places in the DO. #141

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

For my cube I set some of the faces to the same material.  When I wanted 
to change the material for one of these faces (but not the others) I 
noticed a lot of strange behavior. For example, I wanted to change 
the "front" face and noticed the "bottom" dissapearing from the materials 
dictionary. In my case "bottom" and "front" were using the same material.  

I believe the problem is in how items are removed from the dctionary.  In 
the replaceMaterialByName method there is the following line of code.

existingMaterial = this.materials.removeMaterial(existingMaterial);

The existing material is correctly identified but when it returns 
the "bottom" material is removed because it used the same material.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
I updated to version 813 adn saw the same problem.

Please provide any additional information below.

Original issue reported on code.google.com by deana...@yahoo.com on 1 Dec 2008 at 10:57

GoogleCodeExporter commented 9 years ago
I've created a method for dealing with this, and have talked to Tim about
implementing and committing to the repo.  I'll follow up with him and we'll get 
it
committed.

Original comment by neori...@gmail.com on 29 Dec 2008 at 4:48

GoogleCodeExporter commented 9 years ago

Original comment by neori...@gmail.com on 29 Dec 2008 at 4:52