[Bf-committers] Shape Action added in BGE

Benoit Bolsee benoit.bolsee at online.be
Wed Jun 18 19:11:48 CEST 2008


>>There was a bit of conflict with the big update in the BGE after the
>>merge from the Apricot branch. The conflicts were simple to resolved
but
>>I noticed something odd: BL_SkinDeformer::Apply() doesn't set the
vertex
>>normals anymore although they are computed in
BL_SkinDeformer::Update().
>>Shouldn't we have also this in BL_SkinDeformer::Apply() so be
>>consistent:
>>
>>#ifdef __NLA_DEFNORMALS
>>	
>>tv->SetNormal(m_transnors[((*mvarray[i])[index])]); 
>>#endif
>
>Yes, they should perhaps be updated, but it doesn't work correct this
way
>for flat faces, which is why I moved >it out of Apply. How to get to
the 
>flat normal from Apply is not clear to me. Also, I committed a
temporary 
>fix vfor an issue in the last commit to Apricot, which is related to
this. 
>Apply was only being done for the first >material bucket.
>
>I don't really understand actually why there are separate Update and 
>Apply functions .. why not do everything in Update? Do you know of any 
>reason why it would need to do Apply in the drawing code? Otherwise I
might 
>just merge the code from Apply into Update.

There is actually a good reason to keep them separated now that shape
keys support is added: the shape action will update the mesh followed
eventually by the armature action. The new mesh is applied only at the
end of these two updates. If you merge Apply and Update, the mesh will
be applied twice on each frame.

Benoit.



More information about the Bf-committers mailing list