Blender Git Loki
Git Commits -> Revision 086d70e
Revision 086d70e by Germano Cavalcante (master) February 22, 2021, 11:35 (GMT) |
GPU Python: Use 'PyC_ParseStringEnum' to parse items Currently the GPU module for python has different ways to handle enums. - Organizing items in `PyC_StringEnumItems` arrays and parsing them with `PyC_ParseStringEnum`. - Using dedicated functions for each type of enum (`bpygpu_ParsePrimType`, `pygpu_ParseVertCompType` and `pygpu_ParseVertFetchMode`). Although apparently more efficient (especially `pygpu_ParseVertCompType` which transforms strings into integers for simple comparison), these dedicated functions duplicate functionality, increase the complexity of the code and consequently make it less readable. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D10456 |
Commit Details:
Full Hash: 086d70e910a09185e220169342367a0c95ade0fc
Parent Commit: 78c3caf
Lines Changed: +76, -198
7 Modified Paths:
/source/blender/python/gpu/gpu_py.c (+16, -1) (Diff)
/source/blender/python/gpu/gpu_py.h (+1, -0) (Diff)
/source/blender/python/gpu/gpu_py_api.c (+0, -45) (Diff)
/source/blender/python/gpu/gpu_py_api.h (+0, -2) (Diff)
/source/blender/python/gpu/gpu_py_batch.c (+20, -24) (Diff)
/source/blender/python/gpu/gpu_py_element.c (+10, -11) (Diff)
/source/blender/python/gpu/gpu_py_vertex_format.c (+29, -115) (Diff)
/source/blender/python/gpu/gpu_py.h (+1, -0) (Diff)
/source/blender/python/gpu/gpu_py_api.c (+0, -45) (Diff)
/source/blender/python/gpu/gpu_py_api.h (+0, -2) (Diff)
/source/blender/python/gpu/gpu_py_batch.c (+20, -24) (Diff)
/source/blender/python/gpu/gpu_py_element.c (+10, -11) (Diff)
/source/blender/python/gpu/gpu_py_vertex_format.c (+29, -115) (Diff)