Blender Git Loki

Git Commits -> Revision 5db8da8

Revision 5db8da8 by Tamito Kajiyama (master)
April 17, 2014, 05:37 (GMT)
Freestyle: Fix for VC++ warnings about 'hypot' macro redefinitions (Part 1).

The issue was caused by including both Python.h and BLI_math.h. Since the macro
definition in Python.h was unconditional, it was necessary to include it first and then
BLI_math.h.

Addressing the issue turned out to affect many Freestyle source files. There were several
other coding flaws that complicated the situation:

1. intern/system/FreestyleConfig.h was abused just to include BLI_math.h which was in
fact unnecessary in FreestyleConfig.h. While addressing this, inclusion of both math.h
and BLI_math.h had to be duly dealt with to avoid a compiler error about round().

2. #include <Python.h> was not properly put in the extern "C" { ... } construct.

3. intern/view_map/Interface0D.h and intern/python/Director.h, both of which included
Python.h, were included from within Freestyle header files that were almost or completely
independent of Python. These non-Python header files were used everywhere in the
Freestyle code base, causing many cases of the reported macro redefinitions.

4. The Director.h file was also declaring 'using namespace Freestyle', which was causing
another scope issue in several Freestyle header files.

This commit is intended to address the first problem above. Subsequent commits will deal
with the other three.

Commit Details:

Full Hash: 5db8da81055be7fb89b4d824ce17e61ffeb46060
Parent Commit: ba61992
Lines Changed: +11, -10

9 Modified Paths:

/source/blender/freestyle/intern/application/AppView.h (+2, -0) (Diff)
/source/blender/freestyle/intern/geometry/matrix_util.cpp (+2, -2) (Diff)
/source/blender/freestyle/intern/scene_graph/NodeTransform.cpp (+1, -1) (Diff)
/source/blender/freestyle/intern/system/FreestyleConfig.h (+0, -2) (Diff)
/source/blender/freestyle/intern/view_map/FEdgeXDetector.cpp (+0, -1) (Diff)
/source/blender/freestyle/intern/view_map/FEdgeXDetector.h (+2, -0) (Diff)
/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp (+1, -1) (Diff)
/source/blender/freestyle/intern/winged_edge/Curvature.cpp (+1, -2) (Diff)
/source/blender/freestyle/intern/winged_edge/WEdge.h (+2, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021