diff options
author | Julian Eisel <julian@blender.org> | 2020-03-06 18:56:42 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-03-06 19:19:23 +0300 |
commit | b2ee1770d4c31078518f4ec9edd5196a41345162 (patch) | |
tree | 6b7f6ff9057322245fc3b3407bece3f1c0cb3eb5 /source/blender/python | |
parent | b825a95ec311a169d33fe21e28418f11a516c82f (diff) |
Cleanup: Rename ARegion variables from ar to region
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 10 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_callback.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index b0e0dd27c7d..f09440a1ceb 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -211,7 +211,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, struct Scene *scene; struct ViewLayer *view_layer; View3D *v3d; - ARegion *ar; + ARegion *region; struct RV3DMatrixStore *rv3d_mats; BPY_GPU_OFFSCREEN_CHECK_OBJ(self); @@ -234,7 +234,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, (!(scene = PyC_RNA_AsPointer(py_scene, "Scene")) || !(view_layer = PyC_RNA_AsPointer(py_view_layer, "ViewLayer")) || !(v3d = PyC_RNA_AsPointer(py_view3d, "SpaceView3D")) || - !(ar = PyC_RNA_AsPointer(py_region, "Region")))) { + !(region = PyC_RNA_AsPointer(py_region, "Region")))) { return NULL; } @@ -242,7 +242,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, depsgraph = BKE_scene_get_depsgraph(G_MAIN, scene, view_layer, true); - rv3d_mats = ED_view3d_mats_rv3d_backup(ar->regiondata); + rv3d_mats = ED_view3d_mats_rv3d_backup(region->regiondata); GPU_offscreen_bind(self->ofs, true); @@ -250,7 +250,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, scene, v3d->shading.type, v3d, - ar, + region, GPU_offscreen_width(self->ofs), GPU_offscreen_height(self->ofs), (float(*)[4])py_mat_view->matrix, @@ -264,7 +264,7 @@ static PyObject *bpygpu_offscreen_draw_view3d(BPyGPUOffScreen *self, GPU_offscreen_unbind(self->ofs, true); - ED_view3d_mats_rv3d_restore(ar->regiondata, rv3d_mats); + ED_view3d_mats_rv3d_restore(region->regiondata, rv3d_mats); MEM_freeN(rv3d_mats); Py_RETURN_NONE; diff --git a/source/blender/python/intern/bpy_rna_callback.c b/source/blender/python/intern/bpy_rna_callback.c index e44fda1e892..b321a482b1d 100644 --- a/source/blender/python/intern/bpy_rna_callback.c +++ b/source/blender/python/intern/bpy_rna_callback.c @@ -58,7 +58,7 @@ static const EnumPropertyItem region_draw_mode_items[] = { {0, NULL, 0, NULL, NULL}, }; -static void cb_region_draw(const bContext *C, ARegion *UNUSED(ar), void *customdata) +static void cb_region_draw(const bContext *C, ARegion *UNUSED(region), void *customdata) { PyObject *cb_func, *cb_args, *result; PyGILState_STATE gilstate; |