[Bf-codereview] Freestyle r54826 branch review (issue 7416049)

tamito.kajiyama at gmail.com tamito.kajiyama at gmail.com
Wed Mar 13 08:07:14 CET 2013


Many thanks for the review comments and suggestions.

> So I'd propose freestyle have its own customdata layers for
edges/faces.
> This could be an int layer which simply uses flags, or a struct which
has
> arbitrary data for freestyle.

This proposal is much appreciated, and I made an attempt to implement
edge/face marks based on Mesh CustomData in the branch revision 55228.
Now Mesh, BMesh and DerivedMesh (CDDM) have CustomData layers of
type CD_FREESTYLE_EDGE/FACE for keeping Freestyle edge/face attributes.

Instead of having only a boolean variable for edge/face marks, the new
CustomData layers store a struct (FreestyleEdge and FreestyleFace) in
view
of future additions of new edge/face attributes as you suggested.

Most references of old extra flags were removed from the code base.  The
only exceptions are those in source/blender/blenloader/intern/readfile.c
and
source/blender/makesrna/intern/rna_mesh.c.  The former file has
additional
backward compatibility code for converting old flag-based edge/marks to
the CustomData-based implementation, to allow branch users to migrate
existing .blend files to the new system.  All references of the extra
flags can
be removed when the trunk merger is done (as indicated by code comments
in the form "TO BE REMOVED").

Any further review comments and suggestions are duly acknowledged.

https://codereview.appspot.com/7416049/


More information about the Bf-codereview mailing list