Blender Git Loki
Git Commits -> Revision 731d08d
Revision 731d08d by Tamito Kajiyama (master) February 14, 2013, 23:48 (GMT) |
Freestyle Python API improvements - part 3. Major API updates were made to address code review comments. This revision mostly focuses on Python wrappers of C++ 0D and 1D elements (i.e., Interface0D and Interface1D, as well as their subclasses). * Most getter/setter methods were reimplemented as attributes using PyGetSetDef. Vector attributes are now implemented based on mathutils callbacks. Boolean attributes now only accept boolean values. * The __getitem__ method was removed and the Sequence protocol was used instead. * The naming of methods and attributes was fixed to follow the naming conventions of the Blender Python API (i.e., lower case + underscores for methods and attributes, and CamelCase for classes). Some naming inconsistency within the Freestyle Python API was also addressed. * The Freestyle API had a number of method names including prefix/suffix "A" and "B", and their meanings were inconsistent (i.e., referring to different things depending on the classes). The names with these two letters were replaced with more straightforward names. Also some attribute names were changed so as to indicate the type of the value (e.g., FEdge.next_fedge instead of FEdge.next_edge) in line with other names explicitly indicating what the value is (e.g., SVertex.viewvertex). * In addition, some code clean-up was done in both C++ and Python. Notes: In summary, the following irregular naming changes were made through this revision (those resulting from regular changes of naming conventions are not listed): - CurvePoint: {A,B} --> {first,second}_svertex - FEdge: vertex{A,B} --> {first,second}_svertex - FEdge: {next,previous}Edge --> {next,previous}_fedge - FEdgeSharp: normal{A,B} --> normal_{right,left} - FEdgeSharp: {a,b}FaceMark --> face_mark_{right,left} - FEdgeSharp: {a,b}Material --> material_{right,left} - FEdgeSharp: {a,b}MaterialIndex --> material_index_{right,left} - FrsCurve: empty --> is_empty - FrsCurve: nSegments --> segments_size - TVertex: mate() --> get_mate() - ViewEdge: fedge{A,B} --> {first,last}_fedge - ViewEdge: setaShape, aShape --> occlude - ViewEdge: {A,B} --> {first,last}_viewvertex - ViewMap: getScene3dBBox --> scene_bbox |
Commit Details:
Full Hash: 731d08d4974ce695e7d1446b934d0656a4d82942
SVN Revision: 54566
Parent Commit: 9e3bf44
Lines Changed: +2854, -3256
27 Modified Paths:
/release/scripts/freestyle/style_modules/ChainingIterators.py (+182, -182) (Diff)
/release/scripts/freestyle/style_modules/Functions0D.py (+15, -19) (Diff)
/release/scripts/freestyle/style_modules/parameter_editor.py (+59, -63) (Diff)
/release/scripts/freestyle/style_modules/PredicatesB1D.py (+5, -12) (Diff)
/release/scripts/freestyle/style_modules/PredicatesU0D.py (+9, -24) (Diff)
/release/scripts/freestyle/style_modules/PredicatesU1D.py (+45, -68) (Diff)
/release/scripts/freestyle/style_modules/shaders.py (+269, -305) (Diff)
/source/blender/freestyle/intern/python/BPy_Id.cpp (+53, -67) (Diff)
/source/blender/freestyle/intern/python/BPy_Interface0D.cpp (+118, -186) (Diff)
/source/blender/freestyle/intern/python/BPy_Interface1D.cpp (+161, -177) (Diff)
/source/blender/freestyle/intern/python/BPy_SShape.cpp (+129, -166) (Diff)
/source/blender/freestyle/intern/python/BPy_ViewMap.cpp (+62, -72) (Diff)
/source/blender/freestyle/intern/python/BPy_ViewShape.cpp (+154, -193) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp (+75, -107) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp (+284, -174) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h (+4, -0) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp (+70, -66) (Diff)
/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp (+36, -46) (Diff)
/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp (+99, -126) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp (+189, -251) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp (+57, -55) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp (+206, -266) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp (+184, -302) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp (+250, -218) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h (+4, -0) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp (+131, -111) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h (+4, -0) (Diff)
/release/scripts/freestyle/style_modules/Functions0D.py (+15, -19) (Diff)
/release/scripts/freestyle/style_modules/parameter_editor.py (+59, -63) (Diff)
/release/scripts/freestyle/style_modules/PredicatesB1D.py (+5, -12) (Diff)
/release/scripts/freestyle/style_modules/PredicatesU0D.py (+9, -24) (Diff)
/release/scripts/freestyle/style_modules/PredicatesU1D.py (+45, -68) (Diff)
/release/scripts/freestyle/style_modules/shaders.py (+269, -305) (Diff)
/source/blender/freestyle/intern/python/BPy_Id.cpp (+53, -67) (Diff)
/source/blender/freestyle/intern/python/BPy_Interface0D.cpp (+118, -186) (Diff)
/source/blender/freestyle/intern/python/BPy_Interface1D.cpp (+161, -177) (Diff)
/source/blender/freestyle/intern/python/BPy_SShape.cpp (+129, -166) (Diff)
/source/blender/freestyle/intern/python/BPy_ViewMap.cpp (+62, -72) (Diff)
/source/blender/freestyle/intern/python/BPy_ViewShape.cpp (+154, -193) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_CurvePoint.cpp (+75, -107) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.cpp (+284, -174) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_SVertex.h (+4, -0) (Diff)
/source/blender/freestyle/intern/python/Interface0D/BPy_ViewVertex.cpp (+70, -66) (Diff)
/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_NonTVertex.cpp (+36, -46) (Diff)
/source/blender/freestyle/intern/python/Interface0D/ViewVertex/BPy_TVertex.cpp (+99, -126) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_FEdge.cpp (+189, -251) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_FrsCurve.cpp (+57, -55) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_Stroke.cpp (+206, -266) (Diff)
/source/blender/freestyle/intern/python/Interface1D/BPy_ViewEdge.cpp (+184, -302) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.cpp (+250, -218) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSharp.h (+4, -0) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.cpp (+131, -111) (Diff)
/source/blender/freestyle/intern/python/Interface1D/FEdge/BPy_FEdgeSmooth.h (+4, -0) (Diff)