[Bf-codereview] BGE: Material replacement for texface options (issue4289041)

dfelinto at gmail.com dfelinto at gmail.com
Thu Jul 28 00:07:23 CEST 2011


http://codereview.appspot.com/4289041/diff/50001/source/blender/blenkernel/intern/material.c
File source/blender/blenkernel/intern/material.c (right):

http://codereview.appspot.com/4289041/diff/50001/source/blender/blenkernel/intern/material.c#newcode1716
source/blender/blenkernel/intern/material.c:1716: //			if(me->mat[a] ==
ma) material_pop_id(&me->id, a);
uncommented the code (now that material_pop_id is working again).
replying to original problems:
1. we should NOT have a break if there is a match, because a mesh can
indeed have the same material in more than one mat. slot.

2. that might screw up with material number for mface ... although imo
it should be addressed inside material_pop_id if it's not.

*. what I'm wondering now is if once the material is popped out it
doesn't mess up with the for loop itself. It probably does. I'll run
some tests and look at the code more carefully.

On 2011/07/27 15:18:39, dfelinto wrote:
> It does break things, that's why it's commented out.
> But also because I couldn't decide on whether or not we want to remove
the
> original material (which is no longer being used) from the mesh so I
left it
> aside.
> Any thoughts? (it's more a user POV question)

> On 2011/07/26 21:07:50, benoit.bolsee wrote:
> > Two problem:
> > 1. You must break after material_pop_id (a material can only be
present once
> > afaik)
> > 2. Doesn't this screw up the material number for the mface?


http://codereview.appspot.com/4289041/


More information about the Bf-codereview mailing list