diff options
author | Germano Cavalcante <mano-wii> | 2021-02-22 14:26:45 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2021-02-22 14:35:52 +0300 |
commit | 086d70e910a09185e220169342367a0c95ade0fc (patch) | |
tree | afbb7111ce365bcd61fd6cd307e34c01accb6b19 /release/scripts/addons | |
parent | 78c3caf3c1b87f449837b11c903ddeaf00afe7b9 (diff) |
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
Diffstat (limited to 'release/scripts/addons')
m--------- | release/scripts/addons | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/release/scripts/addons b/release/scripts/addons -Subproject dfeb905d62ae6d759d8da930f291e73505e6ca6 +Subproject f01d08b7c5f7873e0ce8a77b84788e2f6b1ad71 |