diff options
author | Germano Cavalcantemano-wii <germano.costa@ig.com.br> | 2020-12-11 07:18:24 +0300 |
---|---|---|
committer | Germano Cavalcantemano-wii <germano.costa@ig.com.br> | 2021-01-11 01:01:53 +0300 |
commit | 9db3d1951da15254efbbcf028176facb78118ec1 (patch) | |
tree | 2cdc94f9143d3df00f2541263cb25369dff2679f /source/blender/python/generic | |
parent | 1d3b92bdeabc4a556372603c548155fad1e87be0 (diff) |
Fix typo; Documentation; Expose layer for framebuffer attachament; Add framebuffer viewport setter; Remove framebuffer restore; Expose framebuffer push/pop stack API; Remove blend modes; Remove depth_range_set; Implement GPU_face_culling, GPU_front_facing, GPU_point_size, GPU_line_width, GPU_viewport, GPU_color_mask and GPU_depth_mask
Diffstat (limited to 'source/blender/python/generic')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 10 | ||||
-rw-r--r-- | source/blender/python/generic/py_capi_utils.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index d944cb435d0..24793a08ba9 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -282,6 +282,16 @@ int PyC_ParseStringEnum(PyObject *o, void *p) return 0; } +const char *PyC_StringEnum_find_id(struct PyC_StringEnum *e, const int value) +{ + for (int i = 0; e->items[i].id; i++) { + if (e->items[i].value == value) { + return e->items[i].id; + } + } + return NULL; +} + /* silly function, we dont use arg. just check its compatible with __deepcopy__ */ int PyC_CheckArgs_DeepCopy(PyObject *args) { diff --git a/source/blender/python/generic/py_capi_utils.h b/source/blender/python/generic/py_capi_utils.h index f0875b82c3c..6f41f9229c8 100644 --- a/source/blender/python/generic/py_capi_utils.h +++ b/source/blender/python/generic/py_capi_utils.h @@ -142,6 +142,7 @@ struct PyC_StringEnum { }; int PyC_ParseStringEnum(PyObject *o, void *p); +const char *PyC_StringEnum_find_id(struct PyC_StringEnum *e, const int value); int PyC_CheckArgs_DeepCopy(PyObject *args); |