Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2020-09-04 21:59:13 +0300
committerSebastian Parborg <darkdefende@gmail.com>2020-09-04 22:04:16 +0300
commit2115232a16d81d28dbdb8042ed8e9316858514c6 (patch)
tree1aeb7354a85b21b43a3ede7bf2980c172d4eec82 /source
parente43d482cc93c64d55b1f58178db68551077e6560 (diff)
Cleanup: Clang-Tidy readability-inconsistent-declaration-parameter-name fix
No functional changes
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_DerivedMesh.h8
-rw-r--r--source/blender/blenkernel/BKE_armature.h6
-rw-r--r--source/blender/blenkernel/BKE_blender.h6
-rw-r--r--source/blender/blenkernel/BKE_bpath.h11
-rw-r--r--source/blender/blenkernel/BKE_brush.h6
-rw-r--r--source/blender/blenkernel/BKE_bvhutils.h4
-rw-r--r--source/blender/blenkernel/BKE_camera.h2
-rw-r--r--source/blender/blenkernel/BKE_cdderivedmesh.h2
-rw-r--r--source/blender/blenkernel/BKE_collision.h2
-rw-r--r--source/blender/blenkernel/BKE_constraint.h2
-rw-r--r--source/blender/blenkernel/BKE_context.h4
-rw-r--r--source/blender/blenkernel/BKE_curveprofile.h4
-rw-r--r--source/blender/blenkernel/BKE_deform.h2
-rw-r--r--source/blender/blenkernel/BKE_dynamicpaint.h2
-rw-r--r--source/blender/blenkernel/BKE_gpencil_geom.h2
-rw-r--r--source/blender/blenkernel/BKE_image.h8
-rw-r--r--source/blender/blenkernel/BKE_kelvinlet.h10
-rw-r--r--source/blender/blenkernel/BKE_key.h4
-rw-r--r--source/blender/blenkernel/BKE_lattice.h8
-rw-r--r--source/blender/blenkernel/BKE_lib_id.h2
-rw-r--r--source/blender/blenkernel/BKE_main.h2
-rw-r--r--source/blender/blenkernel/BKE_main_idmap.h10
-rw-r--r--source/blender/blenkernel/BKE_mask.h2
-rw-r--r--source/blender/blenkernel/BKE_mesh.h8
-rw-r--r--source/blender/blenkernel/BKE_mesh_mapping.h16
-rw-r--r--source/blender/blenkernel/BKE_modifier.h2
-rw-r--r--source/blender/blenkernel/BKE_movieclip.h4
-rw-r--r--source/blender/blenkernel/BKE_multires.h2
-rw-r--r--source/blender/blenkernel/BKE_nla.h2
-rw-r--r--source/blender/blenkernel/BKE_node.h6
-rw-r--r--source/blender/blenkernel/BKE_object.h4
-rw-r--r--source/blender/blenkernel/BKE_packedFile.h2
-rw-r--r--source/blender/blenkernel/BKE_particle.h4
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h8
-rw-r--r--source/blender/blenkernel/BKE_scene.h7
-rw-r--r--source/blender/blenkernel/BKE_sequencer.h8
-rw-r--r--source/blender/blenkernel/BKE_shader_fx.h2
-rw-r--r--source/blender/blenkernel/BKE_softbody.h2
-rw-r--r--source/blender/blenkernel/BKE_studiolight.h2
-rw-r--r--source/blender/blenkernel/BKE_subdiv_eval.h2
-rw-r--r--source/blender/blenkernel/BKE_text.h6
-rw-r--r--source/blender/blenkernel/BKE_tracking.h4
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.c24
-rw-r--r--source/blender/blenkernel/intern/CCGSubSurf.h15
-rw-r--r--source/blender/blenkernel/intern/camera.c18
-rw-r--r--source/blender/blenkernel/intern/curve.c14
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/blenkernel/intern/deform.c6
-rw-r--r--source/blender/blenkernel/intern/fluid.c2
-rw-r--r--source/blender/blenkernel/intern/idprop.c8
-rw-r--r--source/blender/blenkernel/intern/image.c4
-rw-r--r--source/blender/blenkernel/intern/lattice.c4
-rw-r--r--source/blender/blenkernel/intern/lattice_deform.c4
-rw-r--r--source/blender/blenkernel/intern/mball.c14
-rw-r--r--source/blender/blenkernel/intern/object.c28
-rw-r--r--source/blender/blenkernel/intern/screen.c6
-rw-r--r--source/blender/blenkernel/intern/sequencer.c4
-rw-r--r--source/blender/blenlib/BLI_array_utils.h2
-rw-r--r--source/blender/blenlib/BLI_boxpack_2d.h5
-rw-r--r--source/blender/blenlib/BLI_dot_export.hh2
-rw-r--r--source/blender/blenlib/BLI_dynstr.h2
-rw-r--r--source/blender/blenlib/BLI_edgehash.h17
-rw-r--r--source/blender/blenlib/BLI_fileops.h10
-rw-r--r--source/blender/blenlib/BLI_ghash.h8
-rw-r--r--source/blender/blenlib/BLI_gsqueue.h10
-rw-r--r--source/blender/blenlib/BLI_kdopbvh.h2
-rw-r--r--source/blender/blenlib/BLI_listbase.h3
-rw-r--r--source/blender/blenlib/BLI_math_color.h4
-rw-r--r--source/blender/blenlib/BLI_math_geom.h49
-rw-r--r--source/blender/blenlib/BLI_math_interp.h2
-rw-r--r--source/blender/blenlib/BLI_math_matrix.h80
-rw-r--r--source/blender/blenlib/BLI_math_rotation.h6
-rw-r--r--source/blender/blenlib/BLI_math_statistics.h2
-rw-r--r--source/blender/blenlib/BLI_math_vector.h8
-rw-r--r--source/blender/blenlib/BLI_memblock.h4
-rw-r--r--source/blender/blenlib/BLI_mesh_boolean.hh4
-rw-r--r--source/blender/blenlib/BLI_path_util.h7
-rw-r--r--source/blender/blenlib/BLI_rect.h4
-rw-r--r--source/blender/blenlib/BLI_string.h5
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h4
-rw-r--r--source/blender/blenlib/BLI_task.h2
-rw-r--r--source/blender/blenlib/BLI_timecode.h6
-rw-r--r--source/blender/blenlib/intern/BLI_heap.c8
-rw-r--r--source/blender/blenlib/intern/array_utils.c6
-rw-r--r--source/blender/blenlib/intern/gsqueue.c14
-rw-r--r--source/blender/blenlib/intern/hash_mm3.c8
-rw-r--r--source/blender/blenlib/intern/jitter_2d.c46
-rw-r--r--source/blender/blenlib/intern/math_geom.c54
-rw-r--r--source/blender/blenlib/intern/math_matrix.c918
-rw-r--r--source/blender/blenlib/intern/math_rotation.c256
-rw-r--r--source/blender/blenlib/intern/math_vector.c102
-rw-r--r--source/blender/blenlib/intern/memory_utils.c14
-rw-r--r--source/blender/blenlib/intern/smallhash.c6
-rw-r--r--source/blender/blenlib/intern/storage.c14
-rw-r--r--source/blender/blenlib/tests/BLI_edgehash_test.cc6
-rw-r--r--source/blender/blenlib/tests/BLI_string_test.cc8
-rw-r--r--source/blender/blenloader/BLO_read_write.h2
-rw-r--r--source/blender/blenloader/BLO_readfile.h6
-rw-r--r--source/blender/blenloader/intern/readfile.h2
-rw-r--r--source/blender/blenloader/intern/undofile.c6
-rw-r--r--source/blender/bmesh/intern/bmesh_construct.c34
-rw-r--r--source/blender/bmesh/intern/bmesh_core.c12
-rw-r--r--source/blender/bmesh/intern/bmesh_core.h10
-rw-r--r--source/blender/bmesh/intern/bmesh_edgeloop.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.h4
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh.h8
-rw-r--r--source/blender/bmesh/intern/bmesh_mods.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_polygon.h14
-rw-r--r--source/blender/bmesh/intern/bmesh_query.c12
-rw-r--r--source/blender/bmesh/intern/bmesh_query.h4
-rw-r--r--source/blender/bmesh/tools/bmesh_path_region.h6
-rw-r--r--source/blender/bmesh/tools/bmesh_path_region_uv.h6
-rw-r--r--source/blender/bmesh/tools/bmesh_triangulate.h2
-rw-r--r--source/blender/compositor/intern/COM_ExecutionGroup.h10
-rw-r--r--source/blender/compositor/intern/COM_Node.cpp4
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.cpp10
-rw-r--r--source/blender/compositor/intern/COM_NodeGraph.h2
-rw-r--r--source/blender/compositor/nodes/COM_ImageNode.h2
-rw-r--r--source/blender/compositor/nodes/COM_KeyingNode.h2
-rw-r--r--source/blender/compositor/operations/COM_BlurBaseOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_ReadBufferOperation.h2
-rw-r--r--source/blender/compositor/operations/COM_WrapOperation.h2
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_debug.h4
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc8
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.h2
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc4
-rw-r--r--source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc4
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.h2
-rw-r--r--source/blender/draw/engines/eevee/eevee_private.h8
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_engine.h2
-rw-r--r--source/blender/draw/intern/DRW_render.h49
-rw-r--r--source/blender/draw/intern/draw_manager_data.c8
-rw-r--r--source/blender/editors/animation/keyframes_edit.c20
-rw-r--r--source/blender/editors/armature/armature_intern.h4
-rw-r--r--source/blender/editors/armature/armature_naming.c4
-rw-r--r--source/blender/editors/armature/meshlaplacian.c16
-rw-r--r--source/blender/editors/armature/meshlaplacian.h2
-rw-r--r--source/blender/editors/include/ED_armature.h2
-rw-r--r--source/blender/editors/include/ED_fileselect.h2
-rw-r--r--source/blender/editors/include/ED_keyframes_draw.h8
-rw-r--r--source/blender/editors/include/ED_keyframing.h9
-rw-r--r--source/blender/editors/include/ED_mesh.h4
-rw-r--r--source/blender/editors/include/ED_object.h2
-rw-r--r--source/blender/editors/include/ED_paint.h8
-rw-r--r--source/blender/editors/include/ED_space_api.h4
-rw-r--r--source/blender/editors/include/ED_time_scrub_ui.h2
-rw-r--r--source/blender/editors/include/ED_transform.h4
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/include/UI_interface.h49
-rw-r--r--source/blender/editors/interface/interface_intern.h10
-rw-r--r--source/blender/editors/interface/interface_region_popover.c8
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c2
-rw-r--r--source/blender/editors/object/object_constraint.c36
-rw-r--r--source/blender/editors/screen/screen_intern.h2
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h10
-rw-r--r--source/blender/editors/space_file/filelist.h2
-rw-r--r--source/blender/editors/space_file/fsmenu.c6
-rw-r--r--source/blender/editors/space_file/fsmenu.h4
-rw-r--r--source/blender/editors/space_graph/graph_intern.h2
-rw-r--r--source/blender/editors/space_info/info_draw.c4
-rw-r--r--source/blender/editors/space_node/node_edit.c16
-rw-r--r--source/blender/editors/space_node/node_templates.c16
-rw-r--r--source/blender/editors/space_outliner/outliner_intern.h2
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c8
-rw-r--r--source/blender/editors/space_outliner/outliner_utils.c12
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c4
-rw-r--r--source/blender/editors/space_sequencer/sequencer_scopes.c12
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
-rw-r--r--source/blender/editors/undo/ed_undo.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h2
-rw-r--r--source/blender/freestyle/intern/application/Controller.cpp4
-rw-r--r--source/blender/freestyle/intern/geometry/GeomUtils.h2
-rw-r--r--source/blender/freestyle/intern/geometry/Grid.h2
-rw-r--r--source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp8
-rw-r--r--source/blender/freestyle/intern/stroke/Canvas.h2
-rw-r--r--source/blender/freestyle/intern/stroke/Curve.h8
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.h2
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRenderer.cpp6
-rw-r--r--source/blender/freestyle/intern/stroke/StrokeRep.cpp6
-rw-r--r--source/blender/freestyle/intern/system/RandGen.h2
-rw-r--r--source/blender/freestyle/intern/view_map/FEdgeXDetector.h12
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.cpp3
-rw-r--r--source/blender/freestyle/intern/view_map/SteerableViewMap.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMap.h2
-rw-r--r--source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp2
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.h2
-rw-r--r--source/blender/gpu/GPU_batch.h4
-rw-r--r--source/blender/gpu/GPU_buffers.h4
-rw-r--r--source/blender/gpu/GPU_element.h6
-rw-r--r--source/blender/gpu/GPU_framebuffer.h2
-rw-r--r--source/blender/gpu/GPU_immediate_util.h8
-rw-r--r--source/blender/gpu/GPU_material.h2
-rw-r--r--source/blender/gpu/GPU_shader.h16
-rw-r--r--source/blender/gpu/GPU_state.h2
-rw-r--r--source/blender/gpu/GPU_texture.h22
-rw-r--r--source/blender/gpu/GPU_uniform_buffer.h2
-rw-r--r--source/blender/gpu/GPU_viewport.h2
-rw-r--r--source/blender/gpu/intern/gpu_shader.cc4
-rw-r--r--source/blender/imbuf/IMB_colormanagement.h4
-rw-r--r--source/blender/imbuf/IMB_imbuf.h18
-rw-r--r--source/blender/imbuf/IMB_thumbs.h2
-rw-r--r--source/blender/imbuf/intern/IMB_filetype.h32
-rw-r--r--source/blender/imbuf/intern/IMB_indexer.h4
-rw-r--r--source/blender/imbuf/intern/bmp.c4
-rw-r--r--source/blender/imbuf/intern/cineon/cineon_dpx.c8
-rw-r--r--source/blender/imbuf/intern/cineon/logImageCore.c26
-rw-r--r--source/blender/imbuf/intern/imageprocess.c4
-rw-r--r--source/blender/imbuf/intern/iris.c6
-rw-r--r--source/blender/imbuf/intern/jpeg.c4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp2
-rw-r--r--source/blender/imbuf/intern/png.c19
-rw-r--r--source/blender/imbuf/intern/radiance_hdr.c4
-rw-r--r--source/blender/imbuf/intern/targa.c4
-rw-r--r--source/blender/imbuf/intern/tiff.c10
-rw-r--r--source/blender/imbuf/intern/writeimage.c6
-rw-r--r--source/blender/io/alembic/ABC_alembic.h8
-rw-r--r--source/blender/io/alembic/intern/abc_axis_conversion.h2
-rw-r--r--source/blender/io/collada/AnimationExporter.h10
-rw-r--r--source/blender/io/collada/ArmatureImporter.cpp26
-rw-r--r--source/blender/io/collada/BCAnimationSampler.h6
-rw-r--r--source/blender/io/collada/BCMath.cpp4
-rw-r--r--source/blender/io/collada/BCMath.h2
-rw-r--r--source/blender/io/collada/CameraExporter.h2
-rw-r--r--source/blender/io/collada/DocumentExporter.cpp5
-rw-r--r--source/blender/io/collada/EffectExporter.h4
-rw-r--r--source/blender/io/collada/GeometryExporter.h2
-rw-r--r--source/blender/io/collada/ImageExporter.h2
-rw-r--r--source/blender/io/collada/MeshImporter.cpp12
-rw-r--r--source/blender/io/collada/MeshImporter.h2
-rw-r--r--source/blender/io/collada/collada_utils.h8
-rw-r--r--source/blender/makesdna/intern/dna_utils.h6
-rw-r--r--source/blender/modifiers/intern/MOD_util.h2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.h2
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c16
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c20
-rw-r--r--source/blender/python/BPY_extern_python.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types.h2
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.c4
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_meshdata.h12
-rw-r--r--source/blender/python/gpu/gpu_py_vertex_buffer.h2
-rw-r--r--source/blender/python/intern/bpy_rna_callback.h4
-rw-r--r--source/blender/python/mathutils/mathutils.h4
-rw-r--r--source/blender/python/mathutils/mathutils_Vector.c2
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h8
-rw-r--r--source/blender/render/intern/include/render_result.h2
-rw-r--r--source/blender/render/intern/include/zbuf.h2
-rw-r--r--source/blender/render/intern/source/initrender.c4
-rw-r--r--source/blender/render/intern/source/pipeline.c4
-rw-r--r--source/blender/render/intern/source/render_result.c78
-rw-r--r--source/blender/simulation/intern/implicit.h2
-rw-r--r--source/blender/windowmanager/WM_api.h22
-rw-r--r--source/blender/windowmanager/WM_toolsystem.h2
-rw-r--r--source/blender/windowmanager/gizmo/WM_gizmo_api.h18
-rw-r--r--source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c6
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c6
-rw-r--r--source/blender/windowmanager/intern/wm_toolsystem.c4
-rw-r--r--source/blender/windowmanager/message_bus/wm_message_bus.h4
265 files changed, 1657 insertions, 1622 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index 9752185bc40..42ce7e06c26 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -257,7 +257,7 @@ void DM_init(DerivedMesh *dm,
DerivedMeshType type,
int numVerts,
int numEdges,
- int numFaces,
+ int numTessFaces,
int numLoops,
int numPolys);
@@ -275,7 +275,7 @@ void DM_from_template(DerivedMesh *dm,
DerivedMeshType type,
int numVerts,
int numEdges,
- int numFaces,
+ int numTessFaces,
int numLoops,
int numPolys);
@@ -353,7 +353,7 @@ struct Mesh *editbmesh_get_eval_cage(struct Depsgraph *depsgraph,
const struct CustomData_MeshMasks *dataMask);
struct Mesh *editbmesh_get_eval_cage_from_orig(struct Depsgraph *depsgraph,
struct Scene *scene,
- struct Object *object,
+ struct Object *obedit,
const struct CustomData_MeshMasks *dataMask);
struct Mesh *editbmesh_get_eval_cage_and_final(struct Depsgraph *depsgraph,
struct Scene *scene,
@@ -375,7 +375,7 @@ void makeDerivedMesh(struct Depsgraph *depsgraph,
void DM_calc_loop_tangents(DerivedMesh *dm,
bool calc_active_tangent,
const char (*tangent_names)[MAX_NAME],
- int tangent_names_count);
+ int tangent_names_len);
/* debug only */
#ifndef NDEBUG
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h
index 6d48397b1af..7c5d0011465 100644
--- a/source/blender/blenkernel/BKE_armature.h
+++ b/source/blender/blenkernel/BKE_armature.h
@@ -95,7 +95,7 @@ bool BKE_armature_bone_flag_test_recursive(const struct Bone *bone, int flag);
void BKE_armature_refresh_layer_used(struct Depsgraph *depsgraph, struct bArmature *arm);
float distfactor_to_bone(
- const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
+ const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist);
void BKE_armature_where_is(struct bArmature *arm);
void BKE_armature_where_is_bone(struct Bone *bone,
@@ -153,8 +153,8 @@ void BKE_armature_mat_pose_to_bone_ex(struct Depsgraph *depsgraph,
void BKE_pchan_mat3_to_rot(struct bPoseChannel *pchan, const float mat[3][3], bool use_compat);
void BKE_pchan_rot_to_mat3(const struct bPoseChannel *pchan, float r_mat[3][3]);
-void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_comat);
-void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_mat[4][4]);
+void BKE_pchan_apply_mat4(struct bPoseChannel *pchan, const float mat[4][4], bool use_compat);
+void BKE_pchan_to_mat4(const struct bPoseChannel *pchan, float r_chanmat[4][4]);
void BKE_pchan_calc_mat(struct bPoseChannel *pchan);
/* Simple helper, computes the offset bone matrix. */
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index abc0ce1f092..813472715fa 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -34,12 +34,12 @@ void BKE_blender_free(void);
void BKE_blender_globals_init(void);
void BKE_blender_globals_clear(void);
-void BKE_blender_userdef_data_swap(struct UserDef *userdef_dst, struct UserDef *userdef_src);
+void BKE_blender_userdef_data_swap(struct UserDef *userdef_a, struct UserDef *userdef_b);
void BKE_blender_userdef_data_set(struct UserDef *userdef);
void BKE_blender_userdef_data_set_and_free(struct UserDef *userdef);
-void BKE_blender_userdef_app_template_data_swap(struct UserDef *userdef_dst,
- struct UserDef *userdef_src);
+void BKE_blender_userdef_app_template_data_swap(struct UserDef *userdef_a,
+ struct UserDef *userdef_b);
void BKE_blender_userdef_app_template_data_set(struct UserDef *userdef);
void BKE_blender_userdef_app_template_data_set_and_free(struct UserDef *userdef);
diff --git a/source/blender/blenkernel/BKE_bpath.h b/source/blender/blenkernel/BKE_bpath.h
index 787dc4d1147..3ec5409ca7f 100644
--- a/source/blender/blenkernel/BKE_bpath.h
+++ b/source/blender/blenkernel/BKE_bpath.h
@@ -35,17 +35,20 @@ struct ReportList;
* path has changed, and in that case, should write the result to pathOut. */
typedef bool (*BPathVisitor)(void *userdata, char *path_dst, const char *path_src);
/* Executes 'visit' for each path associated with 'id'. */
-void BKE_bpath_traverse_id(
- struct Main *bmain, struct ID *id, BPathVisitor visit_cb, const int flag, void *userdata);
+void BKE_bpath_traverse_id(struct Main *bmain,
+ struct ID *id,
+ BPathVisitor visit_cb,
+ const int flag,
+ void *bpath_user_data);
void BKE_bpath_traverse_id_list(struct Main *bmain,
struct ListBase *lb,
BPathVisitor visit_cb,
const int flag,
- void *userdata);
+ void *bpath_user_data);
void BKE_bpath_traverse_main(struct Main *bmain,
BPathVisitor visit_cb,
const int flag,
- void *userdata);
+ void *bpath_user_data);
bool BKE_bpath_relocate_visitor(void *oldbasepath, char *path_dst, const char *path_src);
/* Functions for temp backup/restore of paths, path count must NOT change */
diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h
index af299c917eb..b14d24e205a 100644
--- a/source/blender/blenkernel/BKE_brush.h
+++ b/source/blender/blenkernel/BKE_brush.h
@@ -113,10 +113,12 @@ const float *BKE_brush_secondary_color_get(const struct Scene *scene, const stru
void BKE_brush_color_set(struct Scene *scene, struct Brush *brush, const float color[3]);
int BKE_brush_size_get(const struct Scene *scene, const struct Brush *brush);
-void BKE_brush_size_set(struct Scene *scene, struct Brush *brush, int value);
+void BKE_brush_size_set(struct Scene *scene, struct Brush *brush, int size);
float BKE_brush_unprojected_radius_get(const struct Scene *scene, const struct Brush *brush);
-void BKE_brush_unprojected_radius_set(struct Scene *scene, struct Brush *brush, float value);
+void BKE_brush_unprojected_radius_set(struct Scene *scene,
+ struct Brush *brush,
+ float unprojected_radius);
float BKE_brush_alpha_get(const struct Scene *scene, const struct Brush *brush);
void BKE_brush_alpha_set(struct Scene *scene, struct Brush *brush, float alpha);
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h
index e973bee9e20..84a17136361 100644
--- a/source/blender/blenkernel/BKE_bvhutils.h
+++ b/source/blender/blenkernel/BKE_bvhutils.h
@@ -130,7 +130,7 @@ BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data,
BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data,
const struct MVert *vert,
- const int numVerts,
+ const int verts_num,
const bool vert_allocated,
const BLI_bitmap *mask,
int verts_num_active,
@@ -177,7 +177,7 @@ BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data,
const int numFaces,
const bool face_allocated,
const BLI_bitmap *mask,
- int numFaces_active,
+ int faces_num_active,
float epsilon,
int tree_type,
int axis,
diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h
index 533d5ae13cd..2ea03f30d88 100644
--- a/source/blender/blenkernel/BKE_camera.h
+++ b/source/blender/blenkernel/BKE_camera.h
@@ -90,7 +90,7 @@ typedef struct CameraParams {
#define CAMERA_PARAM_ZOOM_INIT_PERSP 2.0f
void BKE_camera_params_init(CameraParams *params);
-void BKE_camera_params_from_object(CameraParams *params, const struct Object *camera);
+void BKE_camera_params_from_object(CameraParams *params, const struct Object *cam_ob);
void BKE_camera_params_from_view3d(CameraParams *params,
struct Depsgraph *depsgraph,
const struct View3D *v3d,
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h
index e997678001f..7695193d619 100644
--- a/source/blender/blenkernel/BKE_cdderivedmesh.h
+++ b/source/blender/blenkernel/BKE_cdderivedmesh.h
@@ -43,7 +43,7 @@ struct DerivedMesh *CDDM_from_mesh(struct Mesh *mesh);
/* Copies the given DerivedMesh with verts, faces & edges stored as
* custom element data. */
-struct DerivedMesh *CDDM_copy(struct DerivedMesh *dm);
+struct DerivedMesh *CDDM_copy(struct DerivedMesh *source);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h
index 579adb61057..965bb7b737e 100644
--- a/source/blender/blenkernel/BKE_collision.h
+++ b/source/blender/blenkernel/BKE_collision.h
@@ -165,7 +165,7 @@ typedef struct ColliderCache {
struct CollisionModifierData *collmd;
} ColliderCache;
-struct ListBase *BKE_collider_cache_create(struct Depsgraph *scene,
+struct ListBase *BKE_collider_cache_create(struct Depsgraph *depsgraph,
struct Object *self,
struct Collection *collection);
void BKE_collider_cache_free(struct ListBase **colliders);
diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h
index 94349f4db22..ecb891760b7 100644
--- a/source/blender/blenkernel/BKE_constraint.h
+++ b/source/blender/blenkernel/BKE_constraint.h
@@ -205,7 +205,7 @@ void BKE_constraint_mat_convertspace(struct Object *ob,
void BKE_constraint_target_matrix_get(struct Depsgraph *depsgraph,
struct Scene *scene,
struct bConstraint *con,
- int n,
+ int index,
short ownertype,
void *ownerdata,
float mat[4][4],
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index eb26f1c3969..ef6c36a9730 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -215,7 +215,7 @@ void CTX_data_pointer_set(bContextDataResult *result, struct ID *id, StructRNA *
void CTX_data_id_list_add(bContextDataResult *result, struct ID *id);
void CTX_data_list_add(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
-void CTX_data_dir_set(bContextDataResult *result, const char **member);
+void CTX_data_dir_set(bContextDataResult *result, const char **dir);
void CTX_data_type_set(struct bContextDataResult *result, short type);
short CTX_data_type_get(struct bContextDataResult *result);
@@ -262,7 +262,7 @@ enum eContextObjectMode CTX_data_mode_enum_ex(const struct Object *obedit,
enum eContextObjectMode CTX_data_mode_enum(const bContext *C);
void CTX_data_main_set(bContext *C, struct Main *bmain);
-void CTX_data_scene_set(bContext *C, struct Scene *bmain);
+void CTX_data_scene_set(bContext *C, struct Scene *scene);
int CTX_data_selected_editable_objects(const bContext *C, ListBase *list);
int CTX_data_selected_editable_bases(const bContext *C, ListBase *list);
diff --git a/source/blender/blenkernel/BKE_curveprofile.h b/source/blender/blenkernel/BKE_curveprofile.h
index 08d3da7123c..4c785566f9c 100644
--- a/source/blender/blenkernel/BKE_curveprofile.h
+++ b/source/blender/blenkernel/BKE_curveprofile.h
@@ -69,7 +69,7 @@ void BKE_curveprofile_reverse(struct CurveProfile *profile);
void BKE_curveprofile_reset(struct CurveProfile *profile);
void BKE_curveprofile_create_samples(struct CurveProfile *profile,
- int segments_len,
+ int n_segments,
bool sample_straight_edges,
struct CurveProfilePoint *r_samples);
@@ -87,7 +87,7 @@ void BKE_curveprofile_update(struct CurveProfile *profile, const int update_flag
float BKE_curveprofile_total_length(const struct CurveProfile *profile);
void BKE_curveprofile_create_samples_even_spacing(struct CurveProfile *profile,
- int segments_len,
+ int n_segments,
struct CurveProfilePoint *r_samples);
/* Length portion is the fraction of the total path length where we want the location */
diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h
index a9f81676a7a..e007204fcd7 100644
--- a/source/blender/blenkernel/BKE_deform.h
+++ b/source/blender/blenkernel/BKE_deform.h
@@ -39,7 +39,7 @@ struct BlendWriter;
struct BlendDataReader;
struct bDeformGroup *BKE_object_defgroup_new(struct Object *ob, const char *name);
-void BKE_defgroup_copy_list(struct ListBase *lb1, const struct ListBase *lb2);
+void BKE_defgroup_copy_list(struct ListBase *outbase, const struct ListBase *inbase);
struct bDeformGroup *BKE_defgroup_duplicate(const struct bDeformGroup *ingroup);
struct bDeformGroup *BKE_object_defgroup_find_name(const struct Object *ob, const char *name);
int *BKE_object_defgroup_flip_map(const struct Object *ob,
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h
index 99b58b2f40a..31f48be2c27 100644
--- a/source/blender/blenkernel/BKE_dynamicpaint.h
+++ b/source/blender/blenkernel/BKE_dynamicpaint.h
@@ -72,7 +72,7 @@ struct Mesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd,
void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd);
void dynamicPaint_Modifier_free_runtime(struct DynamicPaintRuntime *runtime);
void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd,
- struct DynamicPaintModifierData *tsmd,
+ struct DynamicPaintModifierData *tpmd,
int flag);
bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene);
diff --git a/source/blender/blenkernel/BKE_gpencil_geom.h b/source/blender/blenkernel/BKE_gpencil_geom.h
index 0abd87d3d4e..3baa650c8f0 100644
--- a/source/blender/blenkernel/BKE_gpencil_geom.h
+++ b/source/blender/blenkernel/BKE_gpencil_geom.h
@@ -51,7 +51,7 @@ void BKE_gpencil_stroke_boundingbox_calc(struct bGPDstroke *gps);
/* stroke geometry utilities */
void BKE_gpencil_stroke_normal(const struct bGPDstroke *gps, float r_normal[3]);
-void BKE_gpencil_stroke_simplify_adaptive(struct bGPDstroke *gps, float factor);
+void BKE_gpencil_stroke_simplify_adaptive(struct bGPDstroke *gps, float epsilon);
void BKE_gpencil_stroke_simplify_fixed(struct bGPDstroke *gps);
void BKE_gpencil_stroke_subdivide(struct bGPDstroke *gps, int level, int type);
bool BKE_gpencil_stroke_trim(struct bGPDstroke *gps);
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index a04f6438170..725f19b1ce2 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -98,7 +98,7 @@ int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, const struct ImageForm
int BKE_imbuf_write_as(struct ImBuf *ibuf,
const char *name,
struct ImageFormatData *imf,
- const bool is_copy);
+ const bool save_copy);
void BKE_image_path_from_imformat(char *string,
const char *base,
const char *relbase,
@@ -238,7 +238,7 @@ void BKE_image_editors_update_frame(const struct Main *bmain, int cfra);
/* dependency graph update for image user users */
bool BKE_image_user_id_has_animation(struct ID *id);
-void BKE_image_user_id_eval_animation(struct Depsgraph *depsgrah, struct ID *id);
+void BKE_image_user_id_eval_animation(struct Depsgraph *depsgraph, struct ID *id);
/* sets index offset for multilayer files */
struct RenderPass *BKE_image_multilayer_index(struct RenderResult *rr, struct ImageUser *iuser);
@@ -272,7 +272,7 @@ void BKE_image_free_all_textures(struct Main *bmain);
void BKE_image_free_anim_ibufs(struct Image *ima, int except_frame);
/* does all images with type MOVIE or SEQUENCE */
-void BKE_image_all_free_anim_ibufs(struct Main *bmain, int except_frame);
+void BKE_image_all_free_anim_ibufs(struct Main *bmain, int cfra);
void BKE_image_free_all_gputextures(struct Main *bmain);
void BKE_image_free_anim_gputextures(struct Main *bmain);
@@ -392,7 +392,7 @@ void BKE_image_free_unused_gpu_textures(void);
struct RenderSlot *BKE_image_add_renderslot(struct Image *ima, const char *name);
bool BKE_image_remove_renderslot(struct Image *ima, struct ImageUser *iuser, int slot);
-struct RenderSlot *BKE_image_get_renderslot(struct Image *ima, int slot);
+struct RenderSlot *BKE_image_get_renderslot(struct Image *ima, int index);
bool BKE_image_clear_renderslot(struct Image *ima, struct ImageUser *iuser, int slot);
#ifdef __cplusplus
diff --git a/source/blender/blenkernel/BKE_kelvinlet.h b/source/blender/blenkernel/BKE_kelvinlet.h
index b3966d3ca4a..f3833ea381a 100644
--- a/source/blender/blenkernel/BKE_kelvinlet.h
+++ b/source/blender/blenkernel/BKE_kelvinlet.h
@@ -51,27 +51,27 @@ void BKE_kelvinlet_init_params(
/* Regularized Kelvinlets */
/* All these functions output the displacement that should be applied to each element. */
/* The initial coordinates of that element should not be modified during the transformation */
-void BKE_kelvinlet_grab(float r_elem_disp[3],
+void BKE_kelvinlet_grab(float radius_elem_disp[3],
const KelvinletParams *params,
const float elem_orig_co[3],
const float brush_location[3],
const float brush_delta[3]);
-void BKE_kelvinlet_grab_biscale(float r_elem_disp[3],
+void BKE_kelvinlet_grab_biscale(float radius_elem_disp[3],
const KelvinletParams *params,
const float elem_orig_co[3],
const float brush_location[3],
const float brush_delta[3]);
-void BKE_kelvinlet_grab_triscale(float r_elem_disp[3],
+void BKE_kelvinlet_grab_triscale(float radius_elem_disp[3],
const KelvinletParams *params,
const float elem_orig_co[3],
const float brush_location[3],
const float brush_delta[3]);
-void BKE_kelvinlet_scale(float r_elem_disp[3],
+void BKE_kelvinlet_scale(float radius_elem_disp[3],
const KelvinletParams *params,
const float elem_orig_co[3],
const float brush_location[3],
const float surface_normal[3]);
-void BKE_kelvinlet_twist(float r_elem_disp[3],
+void BKE_kelvinlet_twist(float radius_elem_disp[3],
const KelvinletParams *params,
const float elem_orig_co[3],
const float brush_location[3],
diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h
index e67df194431..347f16d3e0d 100644
--- a/source/blender/blenkernel/BKE_key.h
+++ b/source/blender/blenkernel/BKE_key.h
@@ -36,7 +36,7 @@ struct Object;
extern "C" {
#endif
-void BKE_key_free(struct Key *sc);
+void BKE_key_free(struct Key *key);
void BKE_key_free_nolib(struct Key *key);
struct Key *BKE_key_add(struct Main *bmain, struct ID *id);
struct Key *BKE_key_copy(struct Main *bmain, const struct Key *key);
@@ -124,7 +124,7 @@ void BKE_keyblock_data_get(const struct Key *key, float (*arr)[3]);
void BKE_keyblock_data_set_with_mat4(struct Key *key,
const int shape_index,
- const float (*vertices)[3],
+ const float (*coords)[3],
const float mat[4][4]);
void BKE_keyblock_curve_data_set_with_mat4(struct Key *key,
const struct ListBase *nurb,
diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h
index 03c57d4caac..ee7744ece15 100644
--- a/source/blender/blenkernel/BKE_lattice.h
+++ b/source/blender/blenkernel/BKE_lattice.h
@@ -58,7 +58,7 @@ void BKE_lattice_modifiers_calc(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob);
-struct MDeformVert *BKE_lattice_deform_verts_get(const struct Object *lattice);
+struct MDeformVert *BKE_lattice_deform_verts_get(const struct Object *oblatt);
struct BPoint *BKE_lattice_active_point_get(struct Lattice *lt);
struct BoundBox *BKE_lattice_boundbox_get(struct Object *ob);
@@ -115,7 +115,7 @@ void BKE_lattice_deform_coords(const struct Object *ob_lattice,
const int vert_coords_len,
const short flag,
const char *defgrp_name,
- float influence);
+ float fac);
void BKE_lattice_deform_coords_with_mesh(const struct Object *ob_lattice,
const struct Object *ob_target,
@@ -123,7 +123,7 @@ void BKE_lattice_deform_coords_with_mesh(const struct Object *ob_lattice,
const int vert_coords_len,
const short flag,
const char *defgrp_name,
- const float influence,
+ const float fac,
const struct Mesh *me_target);
void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
@@ -132,7 +132,7 @@ void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
const int vert_coords_len,
const short flag,
const char *defgrp_name,
- const float influence,
+ const float fac,
struct BMEditMesh *em_target);
/** \} */
diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h
index 7768e903ac3..62b4b295410 100644
--- a/source/blender/blenkernel/BKE_lib_id.h
+++ b/source/blender/blenkernel/BKE_lib_id.h
@@ -264,7 +264,7 @@ void BKE_main_id_repair_duplicate_names_listbase(struct ListBase *lb);
#define MAX_ID_FULL_NAME (64 + 64 + 3 + 1) /* 64 is MAX_ID_NAME - 2 */
#define MAX_ID_FULL_NAME_UI (MAX_ID_FULL_NAME + 3) /* Adds 'keycode' two letters at beginning. */
-void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const struct ID *id, char separator_str);
+void BKE_id_full_name_get(char name[MAX_ID_FULL_NAME], const struct ID *id, char separator_char);
void BKE_id_full_name_ui_prefix_get(char name[MAX_ID_FULL_NAME_UI],
const struct ID *id,
const bool add_lib_hint,
diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h
index 2187ab6b9f5..0ccd246aaf4 100644
--- a/source/blender/blenkernel/BKE_main.h
+++ b/source/blender/blenkernel/BKE_main.h
@@ -225,7 +225,7 @@ void BKE_main_thumbnail_create(struct Main *bmain);
const char *BKE_main_blendfile_path(const struct Main *bmain) ATTR_NONNULL();
const char *BKE_main_blendfile_path_from_global(void);
-struct ListBase *which_libbase(struct Main *mainlib, short type);
+struct ListBase *which_libbase(struct Main *bmain, short type);
#define MAX_LIBARRAY 41
int set_listbasepointers(struct Main *main, struct ListBase *lb[MAX_LIBARRAY]);
diff --git a/source/blender/blenkernel/BKE_main_idmap.h b/source/blender/blenkernel/BKE_main_idmap.h
index b89714cefa4..bffb12a5136 100644
--- a/source/blender/blenkernel/BKE_main_idmap.h
+++ b/source/blender/blenkernel/BKE_main_idmap.h
@@ -49,19 +49,19 @@ struct IDNameLib_Map *BKE_main_idmap_create(struct Main *bmain,
struct Main *old_bmain,
const int idmap_types) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
-void BKE_main_idmap_destroy(struct IDNameLib_Map *id_typemap) ATTR_NONNULL();
-struct Main *BKE_main_idmap_main_get(struct IDNameLib_Map *id_typemap) ATTR_WARN_UNUSED_RESULT
+void BKE_main_idmap_destroy(struct IDNameLib_Map *id_map) ATTR_NONNULL();
+struct Main *BKE_main_idmap_main_get(struct IDNameLib_Map *id_map) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-struct ID *BKE_main_idmap_lookup_name(struct IDNameLib_Map *id_typemap,
+struct ID *BKE_main_idmap_lookup_name(struct IDNameLib_Map *id_map,
short id_type,
const char *name,
const struct Library *lib) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 3);
-struct ID *BKE_main_idmap_lookup_id(struct IDNameLib_Map *id_typemap,
+struct ID *BKE_main_idmap_lookup_id(struct IDNameLib_Map *id_map,
const struct ID *id) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2);
-struct ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_typemap,
+struct ID *BKE_main_idmap_lookup_uuid(struct IDNameLib_Map *id_map,
const uint session_uuid) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1);
diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index ab731c5e42f..5da8332cc53 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -80,7 +80,7 @@ void BKE_mask_layer_rename(struct Mask *mask,
char *oldname,
char *newname);
-struct MaskLayer *BKE_mask_layer_copy(const struct MaskLayer *layer);
+struct MaskLayer *BKE_mask_layer_copy(const struct MaskLayer *masklay);
void BKE_mask_layer_copy_list(struct ListBase *masklayers_new, const struct ListBase *masklayers);
/* splines */
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 045563f8e52..6e8c67dde5f 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -119,7 +119,7 @@ struct Mesh *BKE_mesh_new_nomain_from_template_ex(const struct Mesh *me_src,
int polys_len,
struct CustomData_MeshMasks mask);
-void BKE_mesh_eval_delete(struct Mesh *me_eval);
+void BKE_mesh_eval_delete(struct Mesh *mesh_eval);
/* Performs copy for use during evaluation,
* optional referencing original arrays to reduce memory. */
@@ -256,7 +256,7 @@ void BKE_mesh_vert_coords_apply_with_mat4(struct Mesh *mesh,
const float (*vert_coords)[3],
const float mat[4][4]);
void BKE_mesh_vert_coords_apply(struct Mesh *mesh, const float (*vert_coords)[3]);
-void BKE_mesh_vert_normals_apply(struct Mesh *mesh, const short (*vertNormals)[3]);
+void BKE_mesh_vert_normals_apply(struct Mesh *mesh, const short (*vert_normals)[3]);
/* *** mesh_evaluate.c *** */
@@ -504,7 +504,7 @@ void BKE_mesh_loops_to_mface_corners(struct CustomData *fdata,
int findex,
const int polyindex,
const int mf_len,
- const int numTex,
+ const int numUV,
const int numCol,
const bool hasPCol,
const bool hasOrigSpace,
@@ -669,7 +669,7 @@ void BKE_mesh_calc_edges_tessface(struct Mesh *mesh);
/* In DerivedMesh.c */
void BKE_mesh_wrapper_deferred_finalize(struct Mesh *me_eval,
- const CustomData_MeshMasks *final_datamask);
+ const CustomData_MeshMasks *cd_mask_finalize);
/* **** Depsgraph evaluation **** */
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h
index cbd992bbbec..327c13c7ce4 100644
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@ -107,17 +107,17 @@ void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
void BKE_mesh_vert_poly_map_create(MeshElemMap **r_map,
int **r_mem,
- const struct MPoly *mface,
+ const struct MPoly *mpoly,
const struct MLoop *mloop,
int totvert,
- int totface,
+ int totpoly,
int totloop);
void BKE_mesh_vert_loop_map_create(MeshElemMap **r_map,
int **r_mem,
- const struct MPoly *mface,
+ const struct MPoly *mpoly,
const struct MLoop *mloop,
int totvert,
- int totface,
+ int totpoly,
int totloop);
void BKE_mesh_vert_looptri_map_create(MeshElemMap **r_map,
int **r_mem,
@@ -149,7 +149,7 @@ void BKE_mesh_edge_poly_map_create(MeshElemMap **r_map,
const int totloop);
void BKE_mesh_origindex_map_create(MeshElemMap **r_map,
int **r_mem,
- const int totorig,
+ const int totsource,
const int *final_origindex,
const int totfinal);
void BKE_mesh_origindex_map_create_looptri(MeshElemMap **r_map,
@@ -188,14 +188,14 @@ typedef struct MeshIslandStore {
void BKE_mesh_loop_islands_init(MeshIslandStore *island_store,
const short item_type,
- const int item_num,
+ const int items_num,
const short island_type,
const short innercut_type);
void BKE_mesh_loop_islands_clear(MeshIslandStore *island_store);
void BKE_mesh_loop_islands_free(MeshIslandStore *island_store);
-void BKE_mesh_loop_islands_add(MeshIslandStore *islands,
+void BKE_mesh_loop_islands_add(MeshIslandStore *island_store,
const int item_num,
- const int *item_indices,
+ const int *items_indices,
const int num_island_items,
int *island_item_indices,
const int num_innercut_items,
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 98dc411239e..02b9b547314 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -423,7 +423,7 @@ void BKE_modifier_session_uuid_generate(struct ModifierData *md);
bool BKE_modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
void BKE_modifier_copydata_generic(const struct ModifierData *md,
- struct ModifierData *target,
+ struct ModifierData *md_dst,
const int flag);
void BKE_modifier_copydata(struct ModifierData *md, struct ModifierData *target);
void BKE_modifier_copydata_ex(struct ModifierData *md,
diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h
index 958fbef1f97..5321f827143 100644
--- a/source/blender/blenkernel/BKE_movieclip.h
+++ b/source/blender/blenkernel/BKE_movieclip.h
@@ -39,9 +39,9 @@ struct MovieClip *BKE_movieclip_copy(struct Main *bmain, const struct MovieClip
struct MovieClip *BKE_movieclip_file_add(struct Main *bmain, const char *name);
struct MovieClip *BKE_movieclip_file_add_exists_ex(struct Main *bmain,
- const char *name,
+ const char *filepath,
bool *r_exists);
-struct MovieClip *BKE_movieclip_file_add_exists(struct Main *bmain, const char *name);
+struct MovieClip *BKE_movieclip_file_add_exists(struct Main *bmain, const char *filepath);
void BKE_movieclip_reload(struct Main *bmain, struct MovieClip *clip);
void BKE_movieclip_clear_cache(struct MovieClip *clip);
void BKE_movieclip_clear_proxy_cache(struct MovieClip *clip);
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h
index db2dc7ec87f..fbdfc5b76a7 100644
--- a/source/blender/blenkernel/BKE_multires.h
+++ b/source/blender/blenkernel/BKE_multires.h
@@ -151,7 +151,7 @@ void multiresModifier_ensure_external_read(struct Mesh *mesh,
void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v);
int mdisp_rot_face_to_crn(struct MVert *mvert,
struct MPoly *mpoly,
- struct MLoop *mloops,
+ struct MLoop *mloop,
const struct MLoopTri *lt,
const int face_side,
const float u,
diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h
index 4cded6b9d6a..690dd790e03 100644
--- a/source/blender/blenkernel/BKE_nla.h
+++ b/source/blender/blenkernel/BKE_nla.h
@@ -65,7 +65,7 @@ struct NlaStrip *BKE_nlastrip_new(struct bAction *act);
struct NlaStrip *BKE_nlastack_add_strip(struct AnimData *adt, struct bAction *act);
struct NlaStrip *BKE_nla_add_soundstrip(struct Main *bmain,
struct Scene *scene,
- struct Speaker *spk);
+ struct Speaker *speaker);
void BKE_nla_strip_foreach_id(struct NlaStrip *strip, struct LibraryForeachIDData *data);
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 91e3b85aaca..3829000a045 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -434,7 +434,7 @@ bool ntreeHasType(const struct bNodeTree *ntree, int type);
bool ntreeHasTree(const struct bNodeTree *ntree, const struct bNodeTree *lookup);
void ntreeUpdateTree(struct Main *main, struct bNodeTree *ntree);
void ntreeUpdateAllNew(struct Main *main);
-void ntreeUpdateAllUsers(struct Main *main, struct ID *id);
+void ntreeUpdateAllUsers(struct Main *main, struct ID *ngroup);
void ntreeGetDependencyList(struct bNodeTree *ntree, struct bNode ***deplist, int *totnodes);
@@ -1221,7 +1221,7 @@ void ntreeCompositExecTree(struct Scene *scene,
const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings,
const char *view_name);
-void ntreeCompositTagRender(struct Scene *sce);
+void ntreeCompositTagRender(struct Scene *scene);
void ntreeCompositUpdateRLayers(struct bNodeTree *ntree);
void ntreeCompositRegisterPass(struct bNodeTree *ntree,
struct Scene *scene,
@@ -1302,7 +1302,7 @@ struct bNodeTreeExec *ntreeTexBeginExecTree(struct bNodeTree *ntree);
void ntreeTexEndExecTree(struct bNodeTreeExec *exec);
int ntreeTexExecTree(struct bNodeTree *ntree,
struct TexResult *target,
- float coord[3],
+ float co[3],
float dxt[3],
float dyt[3],
int osatex,
diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h
index 9f006ea21ef..ca548e21a85 100644
--- a/source/blender/blenkernel/BKE_object.h
+++ b/source/blender/blenkernel/BKE_object.h
@@ -84,7 +84,7 @@ void BKE_object_free_shaderfx(struct Object *ob, const int flag);
void BKE_object_make_proxy(struct Main *bmain,
struct Object *ob,
struct Object *target,
- struct Object *gob);
+ struct Object *cob);
void BKE_object_copy_proxy_drivers(struct Object *ob, struct Object *target);
bool BKE_object_exists_check(struct Main *bmain, const struct Object *obtest);
@@ -142,7 +142,7 @@ struct Object *BKE_object_duplicate(struct Main *bmain,
uint dupflag,
const uint duplicate_options);
-void BKE_object_obdata_size_init(struct Object *ob, const float scale);
+void BKE_object_obdata_size_init(struct Object *ob, const float size);
void BKE_object_scale_to_mat3(struct Object *ob, float r_mat[3][3]);
void BKE_object_rot_to_mat3(const struct Object *ob, float r_mat[3][3], bool use_drot);
diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h
index 1e8721045cd..9890399f8a2 100644
--- a/source/blender/blenkernel/BKE_packedFile.h
+++ b/source/blender/blenkernel/BKE_packedFile.h
@@ -59,7 +59,7 @@ enum ePF_FileStatus {
struct PackedFile *BKE_packedfile_duplicate(const struct PackedFile *pf_src);
struct PackedFile *BKE_packedfile_new(struct ReportList *reports,
const char *filename,
- const char *relabase);
+ const char *basepath);
struct PackedFile *BKE_packedfile_new_from_memory(void *mem, int memlen);
void BKE_packedfile_pack_all(struct Main *bmain, struct ReportList *reports, bool verbose);
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index 7d317538f44..7b60bd9ff7d 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -347,7 +347,7 @@ void copy_particle_key(struct ParticleKey *to, struct ParticleKey *from, int tim
void psys_emitter_customdata_mask(struct ParticleSystem *psys,
struct CustomData_MeshMasks *r_cddata_masks);
void psys_particle_on_emitter(struct ParticleSystemModifierData *psmd,
- int distr,
+ int from,
int index,
int index_dmcache,
float fuv[4],
@@ -395,7 +395,7 @@ int do_guides(struct Depsgraph *depsgraph,
struct ParticleSettings *part,
struct ListBase *effectors,
ParticleKey *state,
- int pa_num,
+ int index,
float time);
void precalc_guides(struct ParticleSimulationData *sim, struct ListBase *effectors);
float psys_get_timestep(struct ParticleSimulationData *sim);
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 9826dfaa4a5..c3d107105a9 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -114,7 +114,7 @@ void BKE_pbvh_build_mesh(PBVH *pbvh,
const struct MLoopTri *looptri,
int looptri_num);
void BKE_pbvh_build_grids(PBVH *pbvh,
- struct CCGElem **grid_elems,
+ struct CCGElem **grids,
int totgrid,
struct CCGKey *key,
void **gridfaces,
@@ -275,7 +275,7 @@ void BKE_pbvh_node_get_grids(PBVH *pbvh,
int *totgrid,
int *maxgrid,
int *gridsize,
- struct CCGElem ***grid_elems);
+ struct CCGElem ***r_griddata);
void BKE_pbvh_node_num_verts(PBVH *pbvh, PBVHNode *node, int *r_uniquevert, int *r_totvert);
void BKE_pbvh_node_get_verts(PBVH *pbvh,
PBVHNode *node,
@@ -307,7 +307,7 @@ void BKE_pbvh_update_normals(PBVH *pbvh, struct SubdivCCG *subdiv_ccg);
void BKE_pbvh_redraw_BB(PBVH *pbvh, float bb_min[3], float bb_max[3]);
void BKE_pbvh_get_grid_updates(PBVH *pbvh, bool clear, void ***r_gridfaces, int *r_totface);
void BKE_pbvh_grids_update(PBVH *pbvh,
- struct CCGElem **grid_elems,
+ struct CCGElem **grids,
void **gridfaces,
struct DMFlagMat *flagmats,
unsigned int **grid_hidden);
@@ -458,7 +458,7 @@ void pbvh_vertex_iter_init(PBVH *pbvh, PBVHNode *node, PBVHVertexIter *vi, int m
void BKE_pbvh_node_get_proxies(PBVHNode *node, PBVHProxyNode **proxies, int *proxy_count);
void BKE_pbvh_node_free_proxies(PBVHNode *node);
PBVHProxyNode *BKE_pbvh_node_add_proxy(PBVH *pbvh, PBVHNode *node);
-void BKE_pbvh_gather_proxies(PBVH *pbvh, PBVHNode ***nodes, int *totnode);
+void BKE_pbvh_gather_proxies(PBVH *pbvh, PBVHNode ***r_array, int *r_tot);
void BKE_pbvh_node_get_bm_orco_data(PBVHNode *node,
int (**r_orco_tris)[3],
int *r_orco_tris_num,
diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h
index 05966ec3989..20190817a8e 100644
--- a/source/blender/blenkernel/BKE_scene.h
+++ b/source/blender/blenkernel/BKE_scene.h
@@ -132,8 +132,9 @@ float BKE_scene_frame_to_ctime(const struct Scene *scene, const float frame);
void BKE_scene_frame_set(struct Scene *scene, double cfra);
struct TransformOrientationSlot *BKE_scene_orientation_slot_get_from_flag(struct Scene *scene,
- int slot_index);
-struct TransformOrientationSlot *BKE_scene_orientation_slot_get(struct Scene *scene, int flag);
+ int flag);
+struct TransformOrientationSlot *BKE_scene_orientation_slot_get(struct Scene *scene,
+ int slot_index);
void BKE_scene_orientation_slot_set_index(struct TransformOrientationSlot *orient_slot,
int orientation);
int BKE_scene_orientation_slot_get_index(const struct TransformOrientationSlot *orient_slot);
@@ -156,7 +157,7 @@ struct SceneRenderView *BKE_scene_add_render_view(struct Scene *sce, const char
bool BKE_scene_remove_render_view(struct Scene *scene, struct SceneRenderView *srv);
/* render profile */
-int get_render_subsurf_level(const struct RenderData *r, int level, bool for_render);
+int get_render_subsurf_level(const struct RenderData *r, int lvl, bool for_render);
int get_render_child_particle_number(const struct RenderData *r, int num, bool for_render);
bool BKE_scene_use_shading_nodes_custom(struct Scene *scene);
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h
index fd881175872..04be46f0ccf 100644
--- a/source/blender/blenkernel/BKE_sequencer.h
+++ b/source/blender/blenkernel/BKE_sequencer.h
@@ -263,10 +263,10 @@ struct Mask *BKE_sequencer_mask_get(struct Scene *scene);
/* apply functions recursively */
int BKE_sequencer_base_recursive_apply(struct ListBase *seqbase,
- int (*apply_func)(struct Sequence *seq, void *),
+ int (*apply_fn)(struct Sequence *seq, void *),
void *arg);
int BKE_sequencer_recursive_apply(struct Sequence *seq,
- int (*apply_func)(struct Sequence *, void *),
+ int (*apply_fn)(struct Sequence *, void *),
void *arg);
/* maintenance functions, mostly for RNA */
@@ -319,7 +319,7 @@ bool BKE_sequencer_proxy_rebuild_context(struct Main *bmain,
void BKE_sequencer_proxy_rebuild(struct SeqIndexBuildContext *context,
short *stop,
short *do_update,
- float *num_frames_prefetched);
+ float *progress);
void BKE_sequencer_proxy_rebuild_finish(struct SeqIndexBuildContext *context, bool stop);
void BKE_sequencer_proxy_set(struct Sequence *seq, bool value);
@@ -340,7 +340,7 @@ void BKE_sequencer_cache_put(const SeqRenderData *context,
struct Sequence *seq,
float cfra,
int type,
- struct ImBuf *nval,
+ struct ImBuf *i,
float cost,
bool skip_disk_cache);
bool BKE_sequencer_cache_put_if_possible(const SeqRenderData *context,
diff --git a/source/blender/blenkernel/BKE_shader_fx.h b/source/blender/blenkernel/BKE_shader_fx.h
index 1eb52b389d1..805b974b673 100644
--- a/source/blender/blenkernel/BKE_shader_fx.h
+++ b/source/blender/blenkernel/BKE_shader_fx.h
@@ -167,7 +167,7 @@ typedef struct ShaderFxTypeInfo {
/* Initialize global data (type info and some common global storages). */
void BKE_shaderfx_init(void);
-void BKE_shaderfxType_panel_id(ShaderFxType type, char *panel_id);
+void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname);
const ShaderFxTypeInfo *BKE_shaderfx_get_info(ShaderFxType type);
struct ShaderFxData *BKE_shaderfx_new(int type);
void BKE_shaderfx_free_ex(struct ShaderFxData *fx, const int flag);
diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h
index 28d299679ed..b0923be8434 100644
--- a/source/blender/blenkernel/BKE_softbody.h
+++ b/source/blender/blenkernel/BKE_softbody.h
@@ -59,7 +59,7 @@ extern void sbFreeSimulation(struct SoftBody *sb);
extern void sbObjectStep(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *ob,
- float framnr,
+ float cfra,
float (*vertexCos)[3],
int numVerts);
diff --git a/source/blender/blenkernel/BKE_studiolight.h b/source/blender/blenkernel/BKE_studiolight.h
index 32c571e5f91..614523be123 100644
--- a/source/blender/blenkernel/BKE_studiolight.h
+++ b/source/blender/blenkernel/BKE_studiolight.h
@@ -153,7 +153,7 @@ void BKE_studiolight_preview(uint *icon_buffer, StudioLight *sl, int icon_id_typ
struct ListBase *BKE_studiolight_listbase(void);
void BKE_studiolight_ensure_flag(StudioLight *sl, int flag);
void BKE_studiolight_refresh(void);
-StudioLight *BKE_studiolight_load(const char *path, int orientation);
+StudioLight *BKE_studiolight_load(const char *path, int type);
StudioLight *BKE_studiolight_create(const char *path,
const SolidLight light[4],
const float light_ambient[3]);
diff --git a/source/blender/blenkernel/BKE_subdiv_eval.h b/source/blender/blenkernel/BKE_subdiv_eval.h
index 204e802da6e..0b61e62c89c 100644
--- a/source/blender/blenkernel/BKE_subdiv_eval.h
+++ b/source/blender/blenkernel/BKE_subdiv_eval.h
@@ -82,7 +82,7 @@ void BKE_subdiv_eval_face_varying(struct Subdiv *subdiv,
const int ptex_face_index,
const float u,
const float v,
- float r_varying[2]);
+ float r_face_varying[2]);
/* NOTE: Expects derivatives to be correct.
*
diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h
index 289ad351429..9d5308de280 100644
--- a/source/blender/blenkernel/BKE_text.h
+++ b/source/blender/blenkernel/BKE_text.h
@@ -89,8 +89,8 @@ int txt_setcurr_tab_spaces(struct Text *text, int space);
bool txt_cursor_is_line_start(struct Text *text);
bool txt_cursor_is_line_end(struct Text *text);
-int txt_calc_tab_left(struct TextLine *line, int ch);
-int txt_calc_tab_right(struct TextLine *line, int ch);
+int txt_calc_tab_left(struct TextLine *tl, int ch);
+int txt_calc_tab_right(struct TextLine *tl, int ch);
/* utility functions, could be moved somewhere more generic but are python/text related */
int text_check_bracket(const char ch);
@@ -111,7 +111,7 @@ enum {
};
/* Fast non-validating buffer conversion for undo. */
-char *txt_to_buf_for_undo(struct Text *text, int *r_buf_strlen);
+char *txt_to_buf_for_undo(struct Text *text, int *r_buf_len);
void txt_from_buf_for_undo(struct Text *text, const char *buf, int buf_len);
#ifdef __cplusplus
diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h
index 2d763132923..39cb82b25c3 100644
--- a/source/blender/blenkernel/BKE_tracking.h
+++ b/source/blender/blenkernel/BKE_tracking.h
@@ -292,7 +292,7 @@ void BKE_tracking_max_distortion_delta_across_bound(struct MovieTracking *tracki
/* **** Image sampling **** */
struct ImBuf *BKE_tracking_sample_pattern(int frame_width,
int frame_height,
- struct ImBuf *struct_ibuf,
+ struct ImBuf *search_ib,
struct MovieTrackingTrack *track,
struct MovieTrackingMarker *marker,
bool from_anchor,
@@ -376,7 +376,7 @@ void BKE_tracking_reconstruction_scale(struct MovieTracking *tracking, float sca
/* **** Feature detection **** */
void BKE_tracking_detect_fast(struct MovieTracking *tracking,
struct ListBase *tracksbase,
- struct ImBuf *imbuf,
+ struct ImBuf *ibuf,
int framenr,
int margin,
int min_trackness,
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index c572b1dacf0..e3543290b65 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -1478,30 +1478,30 @@ void ccgVertIterator_next(CCGVertIterator *vi)
ccg_ehashIterator_next((EHashIterator *)vi);
}
-CCGEdge *ccgEdgeIterator_getCurrent(CCGEdgeIterator *vi)
+CCGEdge *ccgEdgeIterator_getCurrent(CCGEdgeIterator *ei)
{
- return (CCGEdge *)ccg_ehashIterator_getCurrent((EHashIterator *)vi);
+ return (CCGEdge *)ccg_ehashIterator_getCurrent((EHashIterator *)ei);
}
-int ccgEdgeIterator_isStopped(CCGEdgeIterator *vi)
+int ccgEdgeIterator_isStopped(CCGEdgeIterator *ei)
{
- return ccg_ehashIterator_isStopped((EHashIterator *)vi);
+ return ccg_ehashIterator_isStopped((EHashIterator *)ei);
}
-void ccgEdgeIterator_next(CCGEdgeIterator *vi)
+void ccgEdgeIterator_next(CCGEdgeIterator *ei)
{
- ccg_ehashIterator_next((EHashIterator *)vi);
+ ccg_ehashIterator_next((EHashIterator *)ei);
}
-CCGFace *ccgFaceIterator_getCurrent(CCGFaceIterator *vi)
+CCGFace *ccgFaceIterator_getCurrent(CCGFaceIterator *fi)
{
- return (CCGFace *)ccg_ehashIterator_getCurrent((EHashIterator *)vi);
+ return (CCGFace *)ccg_ehashIterator_getCurrent((EHashIterator *)fi);
}
-int ccgFaceIterator_isStopped(CCGFaceIterator *vi)
+int ccgFaceIterator_isStopped(CCGFaceIterator *fi)
{
- return ccg_ehashIterator_isStopped((EHashIterator *)vi);
+ return ccg_ehashIterator_isStopped((EHashIterator *)fi);
}
-void ccgFaceIterator_next(CCGFaceIterator *vi)
+void ccgFaceIterator_next(CCGFaceIterator *fi)
{
- ccg_ehashIterator_next((EHashIterator *)vi);
+ ccg_ehashIterator_next((EHashIterator *)fi);
}
/*** Extern API final vert/edge/face interface ***/
diff --git a/source/blender/blenkernel/intern/CCGSubSurf.h b/source/blender/blenkernel/intern/CCGSubSurf.h
index e1805a9c512..a9e0d6882c1 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.h
+++ b/source/blender/blenkernel/intern/CCGSubSurf.h
@@ -72,7 +72,7 @@ typedef enum {
/***/
CCGSubSurf *ccgSubSurf_new(CCGMeshIFC *ifc,
- int subdivisionLevels,
+ int subdivLevels,
CCGAllocatorIFC *allocatorIFC,
CCGAllocatorHDL allocator);
void ccgSubSurf_free(CCGSubSurf *ss);
@@ -100,11 +100,14 @@ CCGError ccgSubSurf_syncFaceDel(CCGSubSurf *ss, CCGFaceHDL fHDL);
CCGError ccgSubSurf_processSync(CCGSubSurf *ss);
-CCGError ccgSubSurf_updateFromFaces(CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces);
-CCGError ccgSubSurf_updateToFaces(CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces);
-CCGError ccgSubSurf_updateNormals(CCGSubSurf *ss, CCGFace **faces, int numFaces);
-CCGError ccgSubSurf_updateLevels(CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces);
-CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **faces, int numFaces);
+CCGError ccgSubSurf_updateFromFaces(CCGSubSurf *ss,
+ int lvl,
+ CCGFace **effectedF,
+ int numEffectedF);
+CCGError ccgSubSurf_updateToFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF);
+CCGError ccgSubSurf_updateNormals(CCGSubSurf *ss, CCGFace **effectedF, int numEffectedF);
+CCGError ccgSubSurf_updateLevels(CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF);
+CCGError ccgSubSurf_stitchFaces(CCGSubSurf *ss, int lvl, CCGFace **effectedF, int numEffectedF);
CCGError ccgSubSurf_setSubdivisionLevels(CCGSubSurf *ss, int subdivisionLevels);
diff --git a/source/blender/blenkernel/intern/camera.c b/source/blender/blenkernel/intern/camera.c
index 0c0ad7a57ab..45d44a6829e 100644
--- a/source/blender/blenkernel/intern/camera.c
+++ b/source/blender/blenkernel/intern/camera.c
@@ -221,15 +221,15 @@ void BKE_camera_params_init(CameraParams *params)
params->clip_end = 100.0f;
}
-void BKE_camera_params_from_object(CameraParams *params, const Object *ob)
+void BKE_camera_params_from_object(CameraParams *params, const Object *cam_ob)
{
- if (!ob) {
+ if (!cam_ob) {
return;
}
- if (ob->type == OB_CAMERA) {
+ if (cam_ob->type == OB_CAMERA) {
/* camera object */
- Camera *cam = ob->data;
+ Camera *cam = cam_ob->data;
if (cam->type == CAM_ORTHO) {
params->is_ortho = true;
@@ -247,9 +247,9 @@ void BKE_camera_params_from_object(CameraParams *params, const Object *ob)
params->clip_start = cam->clip_start;
params->clip_end = cam->clip_end;
}
- else if (ob->type == OB_LAMP) {
+ else if (cam_ob->type == OB_LAMP) {
/* light object */
- Light *la = ob->data;
+ Light *la = cam_ob->data;
params->lens = 16.0f / tanf(la->spotsize * 0.5f);
if (params->lens == 0.0f) {
params->lens = 35.0f;
@@ -305,13 +305,13 @@ void BKE_camera_params_from_view3d(CameraParams *params,
}
void BKE_camera_params_compute_viewplane(
- CameraParams *params, int winx, int winy, float xasp, float yasp)
+ CameraParams *params, int winx, int winy, float aspx, float aspy)
{
rctf viewplane;
float pixsize, viewfac, sensor_size, dx, dy;
int sensor_fit;
- params->ycor = yasp / xasp;
+ params->ycor = aspy / aspx;
if (params->is_ortho) {
/* orthographic camera */
@@ -325,7 +325,7 @@ void BKE_camera_params_compute_viewplane(
}
/* determine sensor fit */
- sensor_fit = BKE_camera_sensor_fit(params->sensor_fit, xasp * winx, yasp * winy);
+ sensor_fit = BKE_camera_sensor_fit(params->sensor_fit, aspx * winx, aspy * winy);
if (sensor_fit == CAMERA_SENSOR_FIT_HOR) {
viewfac = winx;
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 4ac6399c4e4..7fe8834c2ec 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -3848,15 +3848,15 @@ static bool is_free_auto_point(BezTriple *bezt)
return BEZT_IS_AUTOH(bezt) && bezt->f5 == HD_AUTOTYPE_NORMAL;
}
-void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cycle)
+void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cyclic)
{
/* ignore cyclic extrapolation if end points are locked */
- cycle = cycle && is_free_auto_point(&bezt[0]) && is_free_auto_point(&bezt[total - 1]);
+ cyclic = cyclic && is_free_auto_point(&bezt[0]) && is_free_auto_point(&bezt[total - 1]);
/* if cyclic, try to find a sequence break point */
int search_base = 0;
- if (cycle) {
+ if (cyclic) {
for (int i = 1; i < total - 1; i++) {
if (!is_free_auto_point(&bezt[i])) {
search_base = i;
@@ -3866,7 +3866,7 @@ void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cycle)
/* all points of the curve are freely changeable auto handles - solve as full cycle */
if (search_base == 0) {
- bezier_handle_calc_smooth_fcurve(bezt, total, 0, total, cycle);
+ bezier_handle_calc_smooth_fcurve(bezt, total, 0, total, cyclic);
return;
}
}
@@ -3877,13 +3877,13 @@ void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cycle)
for (int i = 1, j = start + 1; i < total; i++, j++) {
/* in cyclic mode: jump from last to first point when necessary */
- if (j == total - 1 && cycle) {
+ if (j == total - 1 && cyclic) {
j = 0;
}
/* non auto handle closes the list (we come here at least for the last handle, see above) */
if (!is_free_auto_point(&bezt[j])) {
- bezier_handle_calc_smooth_fcurve(bezt, total, start, count + 1, cycle);
+ bezier_handle_calc_smooth_fcurve(bezt, total, start, count + 1, cyclic);
start = j;
count = 1;
}
@@ -3893,7 +3893,7 @@ void BKE_nurb_handle_smooth_fcurve(BezTriple *bezt, int total, bool cycle)
}
if (count > 1) {
- bezier_handle_calc_smooth_fcurve(bezt, total, start, count, cycle);
+ bezier_handle_calc_smooth_fcurve(bezt, total, start, count, cyclic);
}
}
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 909a4d42f0a..5a5fb7a36df 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -4271,7 +4271,7 @@ void CustomData_to_bmesh_block(const CustomData *source,
void CustomData_from_bmesh_block(const CustomData *source,
CustomData *dest,
void *src_block,
- int dst_index)
+ int dest_index)
{
int dest_i, src_i;
@@ -4297,7 +4297,7 @@ void CustomData_from_bmesh_block(const CustomData *source,
int offset = source->layers[src_i].offset;
const void *src_data = POINTER_OFFSET(src_block, offset);
void *dst_data = POINTER_OFFSET(dest->layers[dest_i].data,
- (size_t)dst_index * typeInfo->size);
+ (size_t)dest_index * typeInfo->size);
if (typeInfo->copy) {
typeInfo->copy(src_data, dst_data, 1);
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c
index 00fd30da4cd..74a8a4268fc 100644
--- a/source/blender/blenkernel/intern/deform.c
+++ b/source/blender/blenkernel/intern/deform.c
@@ -944,7 +944,7 @@ float BKE_defvert_lock_relative_weight(float weight,
/** \name Defvert Array functions
* \{ */
-void BKE_defvert_array_copy(MDeformVert *dst, const MDeformVert *src, int copycount)
+void BKE_defvert_array_copy(MDeformVert *dst, const MDeformVert *src, int totvert)
{
/* Assumes dst is already set up */
int i;
@@ -953,9 +953,9 @@ void BKE_defvert_array_copy(MDeformVert *dst, const MDeformVert *src, int copyco
return;
}
- memcpy(dst, src, copycount * sizeof(MDeformVert));
+ memcpy(dst, src, totvert * sizeof(MDeformVert));
- for (i = 0; i < copycount; i++) {
+ for (i = 0; i < totvert; i++) {
if (src[i].dw) {
dst[i].dw = MEM_mallocN(sizeof(MDeformWeight) * src[i].totweight, "copy_deformWeight");
memcpy(dst[i].dw, src[i].dw, sizeof(MDeformWeight) * src[i].totweight);
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index ee7d85ba3fb..04f3b4f64d6 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -555,7 +555,7 @@ static void manta_smoke_calc_transparency(FluidDomainSettings *fds, ViewLayer *v
static float calc_voxel_transp(
float *result, const float *input, int res[3], int *pixel, float *t_ray, float correct);
static void update_distances(int index,
- float *fesh_distances,
+ float *distance_map,
BVHTreeFromMesh *tree_data,
const float ray_start[3],
float surface_thickness,
diff --git a/source/blender/blenkernel/intern/idprop.c b/source/blender/blenkernel/intern/idprop.c
index 661d27f4765..7195ebda5ff 100644
--- a/source/blender/blenkernel/intern/idprop.c
+++ b/source/blender/blenkernel/intern/idprop.c
@@ -538,19 +538,19 @@ void IDP_SyncGroupValues(IDProperty *dest, const IDProperty *src)
}
}
-void IDP_SyncGroupTypes(IDProperty *dst, const IDProperty *src, const bool do_arraylen)
+void IDP_SyncGroupTypes(IDProperty *dest, const IDProperty *src, const bool do_arraylen)
{
IDProperty *prop_dst, *prop_dst_next;
const IDProperty *prop_src;
- for (prop_dst = dst->data.group.first; prop_dst; prop_dst = prop_dst_next) {
+ for (prop_dst = dest->data.group.first; prop_dst; prop_dst = prop_dst_next) {
prop_dst_next = prop_dst->next;
if ((prop_src = IDP_GetPropertyFromGroup((IDProperty *)src, prop_dst->name))) {
/* check of we should replace? */
if ((prop_dst->type != prop_src->type || prop_dst->subtype != prop_src->subtype) ||
(do_arraylen && ELEM(prop_dst->type, IDP_ARRAY, IDP_IDPARRAY) &&
(prop_src->len != prop_dst->len))) {
- BLI_insertlinkreplace(&dst->data.group, prop_dst, IDP_CopyProperty(prop_src));
+ BLI_insertlinkreplace(&dest->data.group, prop_dst, IDP_CopyProperty(prop_src));
IDP_FreeProperty(prop_dst);
}
else if (prop_dst->type == IDP_GROUP) {
@@ -558,7 +558,7 @@ void IDP_SyncGroupTypes(IDProperty *dst, const IDProperty *src, const bool do_ar
}
}
else {
- IDP_FreeFromGroup(dst, prop_dst);
+ IDP_FreeFromGroup(dest, prop_dst);
}
}
}
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index aeb2634b4da..be3795a02b1 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2970,9 +2970,9 @@ void BKE_image_path_from_imtype(char *string,
const char imtype,
const bool use_ext,
const bool use_frames,
- const char *view)
+ const char *suffix)
{
- do_makepicstring(string, base, relbase, frame, imtype, NULL, use_ext, use_frames, view);
+ do_makepicstring(string, base, relbase, frame, imtype, NULL, use_ext, use_frames, suffix);
}
struct anim *openanim_noload(const char *name,
diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c
index 7304dd91eea..5201faef9cd 100644
--- a/source/blender/blenkernel/intern/lattice.c
+++ b/source/blender/blenkernel/intern/lattice.c
@@ -524,12 +524,12 @@ float (*BKE_lattice_vert_coords_alloc(const Lattice *lt, int *r_vert_len))[3]
}
void BKE_lattice_vert_coords_apply_with_mat4(struct Lattice *lt,
- const float (*vertexCos)[3],
+ const float (*vert_coords)[3],
const float mat[4][4])
{
int i, numVerts = lt->pntsu * lt->pntsv * lt->pntsw;
for (i = 0; i < numVerts; i++) {
- mul_v3_m4v3(lt->def[i].vec, mat, vertexCos[i]);
+ mul_v3_m4v3(lt->def[i].vec, mat, vert_coords[i]);
}
}
diff --git a/source/blender/blenkernel/intern/lattice_deform.c b/source/blender/blenkernel/intern/lattice_deform.c
index 33f7d9851db..919093f3630 100644
--- a/source/blender/blenkernel/intern/lattice_deform.c
+++ b/source/blender/blenkernel/intern/lattice_deform.c
@@ -453,7 +453,7 @@ void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
const int vert_coords_len,
const short flag,
const char *defgrp_name,
- const float influence,
+ const float fac,
struct BMEditMesh *em_target)
{
lattice_deform_coords_impl(ob_lattice,
@@ -462,7 +462,7 @@ void BKE_lattice_deform_coords_with_editmesh(const struct Object *ob_lattice,
vert_coords_len,
flag,
defgrp_name,
- influence,
+ fac,
NULL,
em_target);
}
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index de477ee03b1..fe6f1bd4a97 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -433,21 +433,21 @@ void BKE_mball_properties_copy(Scene *scene, Object *active_object)
}
}
-/** \brief This function finds basic MetaBall.
+/** \brief This function finds the basis MetaBall.
*
- * Basic meta-ball doesn't include any number at the end of
+ * Basis meta-ball doesn't include any number at the end of
* its name. All meta-balls with same base of name can be
* blended. meta-balls with different basic name can't be blended.
*
* \warning #BKE_mball_is_basis() can fail on returned object, see function docs for details.
*/
-Object *BKE_mball_basis_find(Scene *scene, Object *basis)
+Object *BKE_mball_basis_find(Scene *scene, Object *object)
{
- Object *bob = basis;
+ Object *bob = object;
int basisnr, obnr;
char basisname[MAX_ID_NAME], obname[MAX_ID_NAME];
- BLI_split_name_num(basisname, &basisnr, basis->id.name + 2, '.');
+ BLI_split_name_num(basisname, &basisnr, object->id.name + 2, '.');
LISTBASE_FOREACH (ViewLayer *, view_layer, &scene->view_layers) {
LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) {
@@ -460,7 +460,7 @@ Object *BKE_mball_basis_find(Scene *scene, Object *basis)
* that it has to have same base of its name. */
if (STREQ(obname, basisname)) {
if (obnr < basisnr) {
- basis = ob;
+ object = ob;
basisnr = obnr;
}
}
@@ -469,7 +469,7 @@ Object *BKE_mball_basis_find(Scene *scene, Object *basis)
}
}
- return basis;
+ return object;
}
bool BKE_mball_minmax_ex(
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 871861c3167..1fcc10f13a9 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3107,7 +3107,7 @@ void BKE_object_dimensions_set(Object *ob, const float value[3], int axis_mask)
BKE_object_dimensions_set_ex(ob, value, axis_mask, NULL, NULL);
}
-void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool use_hidden)
+void BKE_object_minmax(Object *ob, float r_min[3], float r_max[3], const bool use_hidden)
{
BoundBox bb;
float vec[3];
@@ -3118,19 +3118,19 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
case OB_FONT:
case OB_SURF: {
bb = *BKE_curve_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
case OB_MESH: {
bb = *BKE_mesh_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
case OB_GPENCIL: {
bb = *BKE_gpencil_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
@@ -3143,7 +3143,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
for (v = 0; v < lt->pntsv; v++) {
for (u = 0; u < lt->pntsu; u++, bp++) {
mul_v3_m4v3(vec, ob->obmat, bp->vec);
- minmax_v3v3_v3(min_r, max_r, vec);
+ minmax_v3v3_v3(r_min, r_max, vec);
}
}
}
@@ -3151,7 +3151,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
break;
}
case OB_ARMATURE: {
- changed = BKE_pose_minmax(ob, min_r, max_r, use_hidden, false);
+ changed = BKE_pose_minmax(ob, r_min, r_max, use_hidden, false);
break;
}
case OB_MBALL: {
@@ -3159,27 +3159,27 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
changed = BKE_mball_minmax_ex(ob->data, ob_min, ob_max, ob->obmat, 0);
if (changed) {
- minmax_v3v3_v3(min_r, max_r, ob_min);
- minmax_v3v3_v3(min_r, max_r, ob_max);
+ minmax_v3v3_v3(r_min, r_max, ob_min);
+ minmax_v3v3_v3(r_min, r_max, ob_max);
}
break;
}
case OB_HAIR: {
bb = *BKE_hair_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
case OB_POINTCLOUD: {
bb = *BKE_pointcloud_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
case OB_VOLUME: {
bb = *BKE_volume_boundbox_get(ob);
- BKE_boundbox_minmax(&bb, ob->obmat, min_r, max_r);
+ BKE_boundbox_minmax(&bb, ob->obmat, r_min, r_max);
changed = true;
break;
}
@@ -3193,15 +3193,15 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
mul_v3_fl(size, ob->empty_drawsize);
}
- minmax_v3v3_v3(min_r, max_r, ob->obmat[3]);
+ minmax_v3v3_v3(r_min, r_max, ob->obmat[3]);
copy_v3_v3(vec, ob->obmat[3]);
add_v3_v3(vec, size);
- minmax_v3v3_v3(min_r, max_r, vec);
+ minmax_v3v3_v3(r_min, r_max, vec);
copy_v3_v3(vec, ob->obmat[3]);
sub_v3_v3(vec, size);
- minmax_v3v3_v3(min_r, max_r, vec);
+ minmax_v3v3_v3(r_min, r_max, vec);
}
}
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 998e94ff11d..1a35340d7fc 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -593,14 +593,14 @@ static void area_region_panels_free_recursive(Panel *panel)
MEM_freeN(panel);
}
-void BKE_area_region_panels_free(ListBase *lb)
+void BKE_area_region_panels_free(ListBase *panels)
{
- LISTBASE_FOREACH_MUTABLE (Panel *, panel, lb) {
+ LISTBASE_FOREACH_MUTABLE (Panel *, panel, panels) {
/* Free custom data just for parent panels to avoid a double free. */
MEM_SAFE_FREE(panel->runtime.custom_data_ptr);
area_region_panels_free_recursive(panel);
}
- BLI_listbase_clear(lb);
+ BLI_listbase_clear(panels);
}
/* not region itself */
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 7897d2bb66e..92c5af127fc 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -4146,13 +4146,13 @@ ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int cha
ImBuf *BKE_sequencer_give_ibuf_seqbase(const SeqRenderData *context,
float cfra,
- int chanshown,
+ int chan_shown,
ListBase *seqbasep)
{
SeqRenderState state;
sequencer_state_init(&state);
- return seq_render_strip_stack(context, &state, seqbasep, cfra, chanshown);
+ return seq_render_strip_stack(context, &state, seqbasep, cfra, chan_shown);
}
ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, float cfra, Sequence *seq)
diff --git a/source/blender/blenlib/BLI_array_utils.h b/source/blender/blenlib/BLI_array_utils.h
index b8d63e7cdc1..bd37d22023b 100644
--- a/source/blender/blenlib/BLI_array_utils.h
+++ b/source/blender/blenlib/BLI_array_utils.h
@@ -37,7 +37,7 @@ void _bli_array_wrap(void *arr, unsigned int arr_len, size_t arr_stride, int dir
void _bli_array_permute(void *arr,
const unsigned int arr_len,
const size_t arr_stride,
- const unsigned int *index,
+ const unsigned int *order,
void *arr_temp);
#define BLI_array_permute(arr, arr_len, order) \
_bli_array_permute(arr, arr_len, sizeof(*(arr)), order, NULL)
diff --git a/source/blender/blenlib/BLI_boxpack_2d.h b/source/blender/blenlib/BLI_boxpack_2d.h
index c36cbc03928..7e347d0b0d7 100644
--- a/source/blender/blenlib/BLI_boxpack_2d.h
+++ b/source/blender/blenlib/BLI_boxpack_2d.h
@@ -44,10 +44,7 @@ typedef struct BoxPack {
int index;
} BoxPack;
-void BLI_box_pack_2d(BoxPack *boxarray,
- const unsigned int len,
- float *tot_width,
- float *tot_height);
+void BLI_box_pack_2d(BoxPack *boxarray, const unsigned int len, float *r_tot_x, float *r_tot_y);
typedef struct FixedSizeBoxPack {
struct FixedSizeBoxPack *next, *prev;
diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh
index a026a85dd62..0de8b3b8747 100644
--- a/source/blender/blenlib/BLI_dot_export.hh
+++ b/source/blender/blenlib/BLI_dot_export.hh
@@ -115,7 +115,7 @@ class Cluster {
return "cluster_" + std::to_string((uintptr_t)this);
}
- void set_parent_cluster(Cluster *cluster);
+ void set_parent_cluster(Cluster *new_parent);
void set_parent_cluster(Cluster &cluster)
{
this->set_parent_cluster(&cluster);
diff --git a/source/blender/blenlib/BLI_dynstr.h b/source/blender/blenlib/BLI_dynstr.h
index 075786c4424..4733812746d 100644
--- a/source/blender/blenlib/BLI_dynstr.h
+++ b/source/blender/blenlib/BLI_dynstr.h
@@ -55,7 +55,7 @@ void BLI_dynstr_vappendf(DynStr *__restrict ds, const char *__restrict format, v
int BLI_dynstr_get_len(DynStr *ds) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
char *BLI_dynstr_get_cstring(DynStr *ds) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-void BLI_dynstr_get_cstring_ex(DynStr *__restrict ds, char *__restrict str) ATTR_NONNULL();
+void BLI_dynstr_get_cstring_ex(DynStr *__restrict ds, char *__restrict rets) ATTR_NONNULL();
void BLI_dynstr_clear(DynStr *ds) ATTR_NONNULL();
void BLI_dynstr_free(DynStr *ds) ATTR_NONNULL();
diff --git a/source/blender/blenlib/BLI_edgehash.h b/source/blender/blenlib/BLI_edgehash.h
index 44dc3cf096b..a53a1b252eb 100644
--- a/source/blender/blenlib/BLI_edgehash.h
+++ b/source/blender/blenlib/BLI_edgehash.h
@@ -53,7 +53,7 @@ enum {
EdgeHash *BLI_edgehash_new_ex(const char *info, const unsigned int nentries_reserve);
EdgeHash *BLI_edgehash_new(const char *info) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
-void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP valfreefp);
+void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value);
void BLI_edgehash_print(EdgeHash *eh);
void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
bool BLI_edgehash_reinsert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val);
@@ -61,21 +61,22 @@ void *BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_W
void *BLI_edgehash_lookup_default(EdgeHash *eh,
unsigned int v0,
unsigned int v1,
- void *val_default) ATTR_WARN_UNUSED_RESULT;
+ void *default_value) ATTR_WARN_UNUSED_RESULT;
void **BLI_edgehash_lookup_p(EdgeHash *eh,
unsigned int v0,
unsigned int v1) ATTR_WARN_UNUSED_RESULT;
bool BLI_edgehash_ensure_p(EdgeHash *eh, unsigned int v0, unsigned int v1, void ***r_val)
ATTR_WARN_UNUSED_RESULT;
-bool BLI_edgehash_remove(EdgeHash *eh, unsigned int v0, unsigned int v1, EdgeHashFreeFP valfreefp);
+bool BLI_edgehash_remove(EdgeHash *eh,
+ unsigned int v0,
+ unsigned int v1,
+ EdgeHashFreeFP free_value);
void *BLI_edgehash_popkey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
bool BLI_edgehash_haskey(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT;
int BLI_edgehash_len(EdgeHash *eh) ATTR_WARN_UNUSED_RESULT;
-void BLI_edgehash_clear_ex(EdgeHash *eh,
- EdgeHashFreeFP valfreefp,
- const unsigned int nentries_reserve);
-void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP valfreefp);
+void BLI_edgehash_clear_ex(EdgeHash *eh, EdgeHashFreeFP free_value, const uint UNUSED(reserve));
+void BLI_edgehash_clear(EdgeHash *eh, EdgeHashFreeFP free_value);
EdgeHashIterator *BLI_edgehashIterator_new(EdgeHash *eh) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT;
void BLI_edgehashIterator_init(EdgeHashIterator *ehi, EdgeHash *eh);
@@ -134,7 +135,7 @@ bool BLI_edgeset_haskey(EdgeSet *es, unsigned int v0, unsigned int v1) ATTR_WARN
void BLI_edgeset_free(EdgeSet *es);
/* rely on inline api for now */
-EdgeSetIterator *BLI_edgesetIterator_new(EdgeSet *gs);
+EdgeSetIterator *BLI_edgesetIterator_new(EdgeSet *es);
void BLI_edgesetIterator_free(EdgeSetIterator *esi);
BLI_INLINE void BLI_edgesetIterator_getKey(EdgeSetIterator *esi,
diff --git a/source/blender/blenlib/BLI_fileops.h b/source/blender/blenlib/BLI_fileops.h
index e61e20ee5e9..922039e8862 100644
--- a/source/blender/blenlib/BLI_fileops.h
+++ b/source/blender/blenlib/BLI_fileops.h
@@ -47,10 +47,10 @@ extern "C" {
/* Common */
int BLI_exists(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-int BLI_copy(const char *path, const char *to) ATTR_NONNULL();
+int BLI_copy(const char *file, const char *to) ATTR_NONNULL();
int BLI_rename(const char *from, const char *to) ATTR_NONNULL();
-int BLI_delete(const char *path, bool dir, bool recursive) ATTR_NONNULL();
-int BLI_delete_soft(const char *path, const char **error_message) ATTR_NONNULL();
+int BLI_delete(const char *file, bool dir, bool recursive) ATTR_NONNULL();
+int BLI_delete_soft(const char *file, const char **error_message) ATTR_NONNULL();
#if 0 /* Unused */
int BLI_move(const char *path, const char *to) ATTR_NONNULL();
int BLI_create_symlink(const char *path, const char *to) ATTR_NONNULL();
@@ -108,7 +108,7 @@ bool BLI_is_dir(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL();
double BLI_dir_free_space(const char *dir) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-char *BLI_current_working_dir(char *dir, const size_t maxlen) ATTR_WARN_UNUSED_RESULT
+char *BLI_current_working_dir(char *dir, const size_t maxncpy) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
eFileAttributes BLI_file_attributes(const char *path);
@@ -161,7 +161,7 @@ size_t BLI_gzip_mem_to_file_at_pos(void *buf,
size_t BLI_ungzip_file_to_mem_at_pos(void *buf, size_t len, FILE *file, size_t gz_stream_offset)
ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
size_t BLI_file_descriptor_size(int file) ATTR_WARN_UNUSED_RESULT;
-size_t BLI_file_size(const char *file) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+size_t BLI_file_size(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
/* compare if one was last modified before the other */
bool BLI_file_older(const char *file1, const char *file2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
diff --git a/source/blender/blenlib/BLI_ghash.h b/source/blender/blenlib/BLI_ghash.h
index cd84dd4f327..e38848e2967 100644
--- a/source/blender/blenlib/BLI_ghash.h
+++ b/source/blender/blenlib/BLI_ghash.h
@@ -204,7 +204,7 @@ unsigned int BLI_gset_len(GSet *gs) ATTR_WARN_UNUSED_RESULT;
void BLI_gset_flag_set(GSet *gs, unsigned int flag);
void BLI_gset_flag_clear(GSet *gs, unsigned int flag);
void BLI_gset_free(GSet *gs, GSetKeyFreeFP keyfreefp);
-void BLI_gset_insert(GSet *gh, void *key);
+void BLI_gset_insert(GSet *gs, void *key);
bool BLI_gset_add(GSet *gs, void *key);
bool BLI_gset_ensure_p_ex(GSet *gs, const void *key, void ***r_key);
bool BLI_gset_reinsert(GSet *gh, void *key, GSetKeyFreeFP keyfreefp);
@@ -217,7 +217,7 @@ void BLI_gset_clear_ex(GSet *gs, GSetKeyFreeFP keyfreefp, const unsigned int nen
void BLI_gset_clear(GSet *gs, GSetKeyFreeFP keyfreefp);
/* When set's are used for key & value. */
-void *BLI_gset_lookup(GSet *gh, const void *key) ATTR_WARN_UNUSED_RESULT;
+void *BLI_gset_lookup(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT;
void *BLI_gset_pop_key(GSet *gs, const void *key) ATTR_WARN_UNUSED_RESULT;
/** \} */
@@ -342,8 +342,8 @@ bool BLI_ghashutil_ptrcmp(const void *a, const void *b);
unsigned int BLI_ghashutil_strhash_n(const char *key, size_t n);
#define BLI_ghashutil_strhash(key) \
(CHECK_TYPE_ANY(key, char *, const char *, const char *const), BLI_ghashutil_strhash_p(key))
-unsigned int BLI_ghashutil_strhash_p(const void *key);
-unsigned int BLI_ghashutil_strhash_p_murmur(const void *key);
+unsigned int BLI_ghashutil_strhash_p(const void *ptr);
+unsigned int BLI_ghashutil_strhash_p_murmur(const void *ptr);
bool BLI_ghashutil_strcmp(const void *a, const void *b);
#define BLI_ghashutil_inthash(key) \
diff --git a/source/blender/blenlib/BLI_gsqueue.h b/source/blender/blenlib/BLI_gsqueue.h
index 077d1646d1d..9cc61bc8059 100644
--- a/source/blender/blenlib/BLI_gsqueue.h
+++ b/source/blender/blenlib/BLI_gsqueue.h
@@ -32,11 +32,11 @@ extern "C" {
typedef struct _GSQueue GSQueue;
GSQueue *BLI_gsqueue_new(const size_t elem_size);
-bool BLI_gsqueue_is_empty(const GSQueue *gq);
-size_t BLI_gsqueue_len(const GSQueue *gq);
-void BLI_gsqueue_pop(GSQueue *gq, void *r_item);
-void BLI_gsqueue_push(GSQueue *gq, const void *item);
-void BLI_gsqueue_free(GSQueue *gq);
+bool BLI_gsqueue_is_empty(const GSQueue *queue);
+size_t BLI_gsqueue_len(const GSQueue *queue);
+void BLI_gsqueue_pop(GSQueue *queue, void *r_item);
+void BLI_gsqueue_push(GSQueue *queue, const void *item);
+void BLI_gsqueue_free(GSQueue *queue);
#ifdef __cplusplus
}
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index 5e317c89625..c34b71a60f9 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -246,7 +246,7 @@ int BLI_bvhtree_find_nearest_projected(BVHTree *tree,
float winsize[2],
float mval[2],
float clip_planes[6][4],
- int clip_num,
+ int clip_plane_len,
BVHTreeNearest *nearest,
BVHTree_NearestProjectedCallback callback,
void *userdata);
diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index aff80a2bd86..345d9d93d03 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -85,7 +85,8 @@ void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnew
ATTR_NONNULL(1);
void BLI_insertlinkafter(struct ListBase *listbase, void *vprevlink, void *vnewlink)
ATTR_NONNULL(1);
-void BLI_insertlinkreplace(ListBase *listbase, void *v_l_src, void *v_l_dst) ATTR_NONNULL(1, 2, 3);
+void BLI_insertlinkreplace(ListBase *listbase, void *vreplacelink, void *vnewlink)
+ ATTR_NONNULL(1, 2, 3);
void BLI_listbase_sort(struct ListBase *listbase, int (*cmp)(const void *, const void *))
ATTR_NONNULL(1, 2);
void BLI_listbase_sort_r(ListBase *listbase,
diff --git a/source/blender/blenlib/BLI_math_color.h b/source/blender/blenlib/BLI_math_color.h
index 7b48b62b6e7..9e613270538 100644
--- a/source/blender/blenlib/BLI_math_color.h
+++ b/source/blender/blenlib/BLI_math_color.h
@@ -45,8 +45,8 @@ extern "C" {
void hsv_to_rgb(float h, float s, float v, float *r_r, float *r_g, float *r_b);
void hsv_to_rgb_v(const float hsv[3], float r_rgb[3]);
-void hsl_to_rgb(float h, float c, float l, float *r_r, float *r_g, float *r_b);
-void hsl_to_rgb_v(const float hcl[3], float r_rgb[3]);
+void hsl_to_rgb(float h, float s, float l, float *r_r, float *r_g, float *r_b);
+void hsl_to_rgb_v(const float hsl[3], float r_rgb[3]);
void hex_to_rgb(const char *hexcol, float *r_r, float *r_g, float *r_b);
void yuv_to_rgb(float y, float u, float v, float *r_r, float *r_g, float *r_b, int colorspace);
void ycc_to_rgb(float y, float cb, float cr, float *r_r, float *r_g, float *r_b, int colorspace);
diff --git a/source/blender/blenlib/BLI_math_geom.h b/source/blender/blenlib/BLI_math_geom.h
index 213f5a029b0..a9a55b10a9e 100644
--- a/source/blender/blenlib/BLI_math_geom.h
+++ b/source/blender/blenlib/BLI_math_geom.h
@@ -40,22 +40,25 @@ extern "C" {
/********************************** Polygons *********************************/
-float normal_tri_v3(float r[3], const float a[3], const float b[3], const float c[3]);
+float normal_tri_v3(float n[3], const float v1[3], const float v2[3], const float v3[3]);
float normal_quad_v3(
- float r[3], const float a[3], const float b[3], const float c[3], const float d[3]);
-float normal_poly_v3(float r[3], const float verts[][3], unsigned int nr);
+ float n[3], const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
+float normal_poly_v3(float n[3], const float verts[][3], unsigned int nr);
-MINLINE float area_tri_v2(const float a[2], const float b[2], const float c[2]);
-MINLINE float area_squared_tri_v2(const float a[2], const float b[2], const float c[2]);
+MINLINE float area_tri_v2(const float v1[2], const float v2[2], const float v3[2]);
+MINLINE float area_squared_tri_v2(const float v1[2], const float v2[2], const float v3[2]);
MINLINE float area_tri_signed_v2(const float v1[2], const float v2[2], const float v3[2]);
-float area_tri_v3(const float a[3], const float b[3], const float c[3]);
-float area_squared_tri_v3(const float a[3], const float b[3], const float c[3]);
+float area_tri_v3(const float v1[3], const float v2[3], const float v3[3]);
+float area_squared_tri_v3(const float v1[3], const float v2[3], const float v3[3]);
float area_tri_signed_v3(const float v1[3],
const float v2[3],
const float v3[3],
const float normal[3]);
-float area_quad_v3(const float a[3], const float b[3], const float c[3], const float d[3]);
-float area_squared_quad_v3(const float a[3], const float b[3], const float c[3], const float d[3]);
+float area_quad_v3(const float v1[3], const float v2[3], const float v3[3], const float v4[3]);
+float area_squared_quad_v3(const float v1[3],
+ const float v2[3],
+ const float v3[3],
+ const float v4[3]);
float area_poly_v3(const float verts[][3], unsigned int nr);
float area_poly_v2(const float verts[][2], unsigned int nr);
float area_squared_poly_v3(const float verts[][3], unsigned int nr);
@@ -212,9 +215,9 @@ void closest_to_plane_v3(float r_close[3], const float plane[4], const float pt[
void closest_to_plane3_normalized_v3(float r_close[3], const float plane[3], const float pt[3]);
void closest_to_plane3_v3(float r_close[3], const float plane[3], const float pt[3]);
-/* Set 'r' to the point in triangle (t1, t2, t3) closest to point 'p' */
+/* Set 'r' to the point in triangle (v1, v2, v3) closest to point 'p' */
void closest_on_tri_to_point_v3(
- float r[3], const float p[3], const float t1[3], const float t2[3], const float t3[3]);
+ float r[3], const float p[3], const float v1[3], const float v2[3], const float v3[3]);
float ray_point_factor_v3_ex(const float p[3],
const float ray_origin[3],
@@ -256,7 +259,7 @@ void limit_dist_v3(float v1[3], float v2[3], const float dist);
#define ISECT_LINE_LINE_EXACT 1
#define ISECT_LINE_LINE_CROSS 2
-int isect_seg_seg_v2(const float a1[2], const float a2[2], const float b1[2], const float b2[2]);
+int isect_seg_seg_v2(const float v1[2], const float v2[2], const float v3[2], const float v4[2]);
void isect_seg_seg_v3(const float a0[3],
const float a1[3],
const float b0[3],
@@ -264,7 +267,7 @@ void isect_seg_seg_v3(const float a0[3],
float r_a[3],
float r_b[3]);
-int isect_seg_seg_v2_int(const int a1[2], const int a2[2], const int b1[2], const int b2[2]);
+int isect_seg_seg_v2_int(const int v1[2], const int v2[2], const int v3[2], const int v4[2]);
int isect_seg_seg_v2_point_ex(const float v0[2],
const float v1[2],
const float v2[2],
@@ -474,7 +477,7 @@ bool isect_point_poly_v2_int(const int pt[2],
const bool use_holes);
int isect_point_quad_v2(
- const float p[2], const float a[2], const float b[2], const float c[2], const float d[2]);
+ const float p[2], const float v1[2], const float v2[2], const float v3[2], const float v4[2]);
int isect_point_tri_v2(const float pt[2], const float v1[2], const float v2[2], const float v3[2]);
bool isect_point_tri_v2_cw(const float pt[2],
@@ -551,13 +554,13 @@ bool point_in_slice_seg(float p[3], float l1[3], float l2[3]);
/****************************** Interpolation ********************************/
void interp_weights_tri_v3(
- float w[3], const float a[3], const float b[3], const float c[3], const float p[3]);
+ float w[3], const float v1[3], const float v2[3], const float v3[3], const float co[3]);
void interp_weights_quad_v3(float w[4],
- const float a[3],
- const float b[3],
- const float c[3],
- const float d[3],
- const float p[3]);
+ const float v1[3],
+ const float v2[3],
+ const float v3[3],
+ const float v4[3],
+ const float co[3]);
void interp_weights_poly_v3(float w[], float v[][3], const int n, const float co[3]);
void interp_weights_poly_v2(float w[], float v[][2], const int n, const float co[2]);
@@ -569,7 +572,7 @@ void interp_cubic_v3(float x[3],
const float v2[3],
const float t);
-int interp_sparse_array(float *array, const int list_size, const float invalid);
+int interp_sparse_array(float *array, const int list_size, const float skipval);
void transform_point_by_tri_v3(float pt_tar[3],
float const pt_src[3],
@@ -664,8 +667,8 @@ void planes_from_projmat(const float mat[4][4],
float right[4],
float top[4],
float bottom[4],
- float front[4],
- float back[4]);
+ float near[4],
+ float far[4]);
void projmat_dimensions(const float projmat[4][4],
float *r_left,
diff --git a/source/blender/blenlib/BLI_math_interp.h b/source/blender/blenlib/BLI_math_interp.h
index 3e9839b4d3a..cc025b469e3 100644
--- a/source/blender/blenlib/BLI_math_interp.h
+++ b/source/blender/blenlib/BLI_math_interp.h
@@ -88,7 +88,7 @@ void BLI_ewa_filter(const int width,
const float du[2],
const float dv[2],
ewa_filter_read_pixel_cb read_pixel_cb,
- void *customdata,
+ void *userdata,
float result[4]);
#ifdef __cplusplus
diff --git a/source/blender/blenlib/BLI_math_matrix.h b/source/blender/blenlib/BLI_math_matrix.h
index 09f2d5a7cdc..9f6c56d698a 100644
--- a/source/blender/blenlib/BLI_math_matrix.h
+++ b/source/blender/blenlib/BLI_math_matrix.h
@@ -34,33 +34,33 @@ extern "C" {
/********************************* Init **************************************/
-void zero_m2(float R[2][2]);
-void zero_m3(float R[3][3]);
-void zero_m4(float R[4][4]);
+void zero_m2(float m[2][2]);
+void zero_m3(float m[3][3]);
+void zero_m4(float m[4][4]);
-void unit_m2(float R[2][2]);
-void unit_m3(float R[3][3]);
-void unit_m4(float R[4][4]);
+void unit_m2(float m[2][2]);
+void unit_m3(float m[3][3]);
+void unit_m4(float m[4][4]);
void unit_m4_db(double m[4][4]);
-void copy_m2_m2(float R[2][2], const float A[2][2]);
-void copy_m3_m3(float R[3][3], const float A[3][3]);
-void copy_m4_m4(float R[4][4], const float A[4][4]);
-void copy_m3_m4(float R[3][3], const float A[4][4]);
-void copy_m4_m3(float R[4][4], const float A[3][3]);
-void copy_m3_m2(float R[3][3], const float A[2][2]);
-void copy_m4_m2(float R[4][4], const float A[2][2]);
+void copy_m2_m2(float m1[2][2], const float m2[2][2]);
+void copy_m3_m3(float m1[3][3], const float m2[3][3]);
+void copy_m4_m4(float m1[4][4], const float m2[4][4]);
+void copy_m3_m4(float m1[3][3], const float m2[4][4]);
+void copy_m4_m3(float m1[4][4], const float m2[3][3]);
+void copy_m3_m2(float m1[3][3], const float m2[2][2]);
+void copy_m4_m2(float m1[4][4], const float m2[2][2]);
void copy_m4_m4_db(double m1[4][4], const double m2[4][4]);
/* double->float */
-void copy_m3_m3d(float R[3][3], const double A[3][3]);
+void copy_m3_m3d(float m1[3][3], const double m2[3][3]);
/* float->double */
-void copy_m4d_m4(double R[4][4], const float A[4][4]);
+void copy_m4d_m4(double m1[4][4], const float m2[4][4]);
-void swap_m3m3(float A[3][3], float B[3][3]);
-void swap_m4m4(float A[4][4], float B[4][4]);
+void swap_m3m3(float m1[3][3], float m2[3][3]);
+void swap_m4m4(float m1[4][4], float m2[4][4]);
/* Build index shuffle matrix */
void shuffle_m4(float R[4][4], const int index[4]);
@@ -240,25 +240,25 @@ void mul_m3_v3_db(const double M[3][3], double r[3]);
/****************************** Linear Algebra *******************************/
void transpose_m3(float R[3][3]);
-void transpose_m3_m3(float R[3][3], const float A[3][3]);
-void transpose_m3_m4(float R[3][3], const float A[4][4]);
+void transpose_m3_m3(float R[3][3], const float M[3][3]);
+void transpose_m3_m4(float R[3][3], const float M[4][4]);
void transpose_m4(float R[4][4]);
-void transpose_m4_m4(float R[4][4], const float A[4][4]);
+void transpose_m4_m4(float R[4][4], const float M[4][4]);
-int compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit);
+bool compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit);
void normalize_m2_ex(float R[2][2], float r_scale[2]) ATTR_NONNULL();
void normalize_m2(float R[2][2]) ATTR_NONNULL();
-void normalize_m2_m2_ex(float R[2][2], const float A[2][2], float r_scale[2]) ATTR_NONNULL();
-void normalize_m2_m2(float R[2][2], const float A[2][2]) ATTR_NONNULL();
+void normalize_m2_m2_ex(float R[2][2], const float M[2][2], float r_scale[2]) ATTR_NONNULL();
+void normalize_m2_m2(float R[2][2], const float M[2][2]) ATTR_NONNULL();
void normalize_m3_ex(float R[3][3], float r_scale[3]) ATTR_NONNULL();
void normalize_m3(float R[3][3]) ATTR_NONNULL();
-void normalize_m3_m3_ex(float R[3][3], const float A[3][3], float r_scale[3]) ATTR_NONNULL();
-void normalize_m3_m3(float R[3][3], const float A[3][3]) ATTR_NONNULL();
+void normalize_m3_m3_ex(float R[3][3], const float M[3][3], float r_scale[3]) ATTR_NONNULL();
+void normalize_m3_m3(float R[3][3], const float M[3][3]) ATTR_NONNULL();
void normalize_m4_ex(float R[4][4], float r_scale[3]) ATTR_NONNULL();
void normalize_m4(float R[4][4]) ATTR_NONNULL();
-void normalize_m4_m4_ex(float R[4][4], const float A[4][4], float r_scale[3]) ATTR_NONNULL();
-void normalize_m4_m4(float R[4][4], const float A[4][4]) ATTR_NONNULL();
+void normalize_m4_m4_ex(float R[4][4], const float M[4][4], float r_scale[3]) ATTR_NONNULL();
+void normalize_m4_m4(float R[4][4], const float M[4][4]) ATTR_NONNULL();
void orthogonalize_m3(float R[3][3], int axis);
void orthogonalize_m4(float R[4][4], int axis);
@@ -278,16 +278,16 @@ bool is_uniform_scaled_m4(const float m[4][4]);
* Nowadays 'adjoint' usually refers to the conjugate transpose,
* which for real-valued matrices is simply the transpose.
*/
-void adjoint_m2_m2(float R[2][2], const float A[2][2]);
-void adjoint_m3_m3(float R[3][3], const float A[3][3]);
-void adjoint_m4_m4(float R[4][4], const float A[4][4]);
+void adjoint_m2_m2(float R[2][2], const float M[2][2]);
+void adjoint_m3_m3(float R[3][3], const float M[3][3]);
+void adjoint_m4_m4(float R[4][4], const float M[4][4]);
float determinant_m2(float a, float b, float c, float d);
float determinant_m3(
- float a, float b, float c, float d, float e, float f, float g, float h, float i);
+ float a1, float a2, float a3, float b1, float b2, float b3, float c1, float c2, float c3);
float determinant_m3_array(const float m[3][3]);
float determinant_m4_mat3_array(const float m[4][4]);
-float determinant_m4(const float A[4][4]);
+float determinant_m4(const float m[4][4]);
#define PSEUDOINVERSE_EPSILON 1e-8f
@@ -317,10 +317,10 @@ float mat4_to_xy_scale(const float M[4][4]);
void size_to_mat3(float R[3][3], const float size[3]);
void size_to_mat4(float R[4][4], const float size[3]);
-void mat3_to_size(float r[3], const float M[3][3]);
-void mat4_to_size(float r[3], const float M[4][4]);
+void mat3_to_size(float size[3], const float M[3][3]);
+void mat4_to_size(float size[3], const float M[4][4]);
-void mat4_to_size_fix_shear(float r[3], const float M[4][4]);
+void mat4_to_size_fix_shear(float size[3], const float M[4][4]);
void translate_m4(float mat[4][4], float tx, float ty, float tz);
void rotate_m4(float mat[4][4], const char axis, const float angle);
@@ -354,8 +354,14 @@ void loc_axisangle_size_to_mat4(float R[4][4],
const float angle,
const float size[3]);
-void blend_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3], const float t);
-void blend_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4], const float t);
+void blend_m3_m3m3(float out[3][3],
+ const float dst[3][3],
+ const float src[3][3],
+ const float srcweight);
+void blend_m4_m4m4(float out[4][4],
+ const float dst[4][4],
+ const float src[4][4],
+ const float srcweight);
void interp_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3], const float t);
void interp_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4], const float t);
diff --git a/source/blender/blenlib/BLI_math_rotation.h b/source/blender/blenlib/BLI_math_rotation.h
index 61708528e24..15d4dc21f8d 100644
--- a/source/blender/blenlib/BLI_math_rotation.h
+++ b/source/blender/blenlib/BLI_math_rotation.h
@@ -64,7 +64,7 @@ void conjugate_qt(float q[4]);
void conjugate_qt_qt(float q1[4], const float q2[4]);
float dot_qtqt(const float a[4], const float b[4]);
float normalize_qt(float q[4]);
-float normalize_qt_qt(float q1[4], const float q2[4]);
+float normalize_qt_qt(float r[4], const float q[4]);
/* comparison */
bool is_zero_qt(const float q[4]);
@@ -221,10 +221,10 @@ void rotate_eulO(float eul[3], const short order, char axis, float angle);
void copy_dq_dq(DualQuat *r, const DualQuat *dq);
void normalize_dq(DualQuat *dq, float totw);
-void add_weighted_dq_dq(DualQuat *r, const DualQuat *dq, float weight);
+void add_weighted_dq_dq(DualQuat *dq_sum, const DualQuat *dq, float weight);
void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq);
-void mat4_to_dquat(DualQuat *r, const float base[4][4], const float M[4][4]);
+void mat4_to_dquat(DualQuat *dq, const float basemat[4][4], const float mat[4][4]);
void dquat_to_mat4(float R[4][4], const DualQuat *dq);
void quat_apply_track(float quat[4], short axis, short upflag);
diff --git a/source/blender/blenlib/BLI_math_statistics.h b/source/blender/blenlib/BLI_math_statistics.h
index aebc445002b..ad6cb1a3c1e 100644
--- a/source/blender/blenlib/BLI_math_statistics.h
+++ b/source/blender/blenlib/BLI_math_statistics.h
@@ -39,7 +39,7 @@ extern "C" {
void BLI_covariance_m_vn_ex(const int n,
const float *cos_vn,
- const int nbr_cos_v3,
+ const int nbr_cos_vn,
const float *center,
const bool use_sample_correction,
float *r_covmat);
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index 1425e7da1bc..af39135f3d3 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -427,7 +427,7 @@ void ortho_v3_v3(float out[3], const float v[3]);
void ortho_v2_v2(float out[2], const float v[2]);
void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3]);
void rotate_v2_v2fl(float r[2], const float p[2], const float angle);
-void rotate_v3_v3v3fl(float v[3], const float p[3], const float axis[3], const float angle);
+void rotate_v3_v3v3fl(float r[3], const float p[3], const float axis[3], const float angle);
void rotate_normalized_v3_v3v3fl(float out[3],
const float p[3],
const float axis[3],
@@ -435,9 +435,9 @@ void rotate_normalized_v3_v3v3fl(float out[3],
/*********************************** Other ***********************************/
-void print_v2(const char *str, const float a[2]);
-void print_v3(const char *str, const float a[3]);
-void print_v4(const char *str, const float a[4]);
+void print_v2(const char *str, const float v[2]);
+void print_v3(const char *str, const float v[3]);
+void print_v4(const char *str, const float v[4]);
void print_vn(const char *str, const float v[], const int n);
#define print_v2_id(v) print_v2(STRINGIFY(v), v)
diff --git a/source/blender/blenlib/BLI_memblock.h b/source/blender/blenlib/BLI_memblock.h
index cb6b31d54e0..a9a3928394d 100644
--- a/source/blender/blenlib/BLI_memblock.h
+++ b/source/blender/blenlib/BLI_memblock.h
@@ -38,7 +38,7 @@ typedef void (*MemblockValFreeFP)(void *val);
BLI_memblock *BLI_memblock_create_ex(uint elem_size, uint chunk_size) ATTR_WARN_UNUSED_RESULT;
void *BLI_memblock_alloc(BLI_memblock *mblk) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1);
-void BLI_memblock_clear(BLI_memblock *mblk, MemblockValFreeFP valfreefp) ATTR_NONNULL(1);
+void BLI_memblock_clear(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1);
void BLI_memblock_destroy(BLI_memblock *mblk, MemblockValFreeFP free_callback) ATTR_NONNULL(1);
#define BLI_memblock_create(elem_size) BLI_memblock_create_ex(elem_size, BLI_MEM_BLOCK_CHUNK_SIZE)
@@ -53,7 +53,7 @@ typedef struct BLI_memblock_iter {
int elem_ofs;
} BLI_memblock_iter;
-void BLI_memblock_iternew(BLI_memblock *pool, BLI_memblock_iter *iter) ATTR_NONNULL();
+void BLI_memblock_iternew(BLI_memblock *mblk, BLI_memblock_iter *iter) ATTR_NONNULL();
void *BLI_memblock_iterstep(BLI_memblock_iter *iter) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
void *BLI_memblock_elem_get(BLI_memblock *mblk, int chunk, int elem) ATTR_WARN_UNUSED_RESULT
diff --git a/source/blender/blenlib/BLI_mesh_boolean.hh b/source/blender/blenlib/BLI_mesh_boolean.hh
index cb6fc203dc7..94b2694893b 100644
--- a/source/blender/blenlib/BLI_mesh_boolean.hh
+++ b/source/blender/blenlib/BLI_mesh_boolean.hh
@@ -59,7 +59,7 @@ IMesh boolean_mesh(IMesh &imesh,
int nshapes,
std::function<int(int)> shape_fn,
bool use_self,
- IMesh *pm_triangulated,
+ IMesh *imesh_triangulated,
IMeshArena *arena);
/**
@@ -67,7 +67,7 @@ IMesh boolean_mesh(IMesh &imesh,
* It is exposed mainly for unit testing, at the moment: boolean_mesh() uses
* it to do most of its work.
*/
-IMesh boolean_trimesh(IMesh &trimesh,
+IMesh boolean_trimesh(IMesh &tm_in,
BoolOpType op,
int nshapes,
std::function<int(int)> shape_fn,
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 05c256ccf1c..2a56d11276a 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -43,7 +43,7 @@ const char *BLI_path_extension(const char *filepath) ATTR_NONNULL();
void BLI_path_append(char *__restrict dst, const size_t maxlen, const char *__restrict file)
ATTR_NONNULL();
-void BLI_join_dirfile(char *__restrict string,
+void BLI_join_dirfile(char *__restrict dst,
const size_t maxlen,
const char *__restrict dir,
const char *__restrict file) ATTR_NONNULL();
@@ -77,7 +77,10 @@ bool BLI_path_extension_glob_validate(char *ext_fnmatch) ATTR_NONNULL();
bool BLI_path_extension_replace(char *path, size_t maxlen, const char *ext) ATTR_NONNULL();
bool BLI_path_extension_ensure(char *path, size_t maxlen, const char *ext) ATTR_NONNULL();
bool BLI_path_filename_ensure(char *filepath, size_t maxlen, const char *filename) ATTR_NONNULL();
-int BLI_path_sequence_decode(const char *string, char *head, char *start, unsigned short *numlen);
+int BLI_path_sequence_decode(const char *string,
+ char *head,
+ char *tail,
+ unsigned short *r_num_len);
void BLI_path_sequence_encode(
char *string, const char *head, const char *tail, unsigned short numlen, int pic);
diff --git a/source/blender/blenlib/BLI_rect.h b/source/blender/blenlib/BLI_rect.h
index ae3eb9d2144..1d15a10ebc0 100644
--- a/source/blender/blenlib/BLI_rect.h
+++ b/source/blender/blenlib/BLI_rect.h
@@ -105,8 +105,8 @@ bool BLI_rcti_isect_circle(const struct rcti *rect, const float xy[2], const flo
bool BLI_rctf_isect_circle(const struct rctf *rect, const float xy[2], const float radius);
bool BLI_rcti_inside_rcti(const rcti *rct_a, const rcti *rct_b);
bool BLI_rctf_inside_rctf(const rctf *rct_a, const rctf *rct_b);
-void BLI_rcti_union(struct rcti *rcti1, const struct rcti *rcti2);
-void BLI_rctf_union(struct rctf *rctf1, const struct rctf *rctf2);
+void BLI_rcti_union(struct rcti *rct1, const struct rcti *rct2);
+void BLI_rctf_union(struct rctf *rct1, const struct rctf *rct2);
void BLI_rcti_rctf_copy(struct rcti *dst, const struct rctf *src);
void BLI_rctf_rcti_copy(struct rctf *dst, const struct rcti *src);
void BLI_rcti_rctf_copy_floor(struct rcti *dst, const struct rctf *src);
diff --git a/source/blender/blenlib/BLI_string.h b/source/blender/blenlib/BLI_string.h
index 4968b4ee159..6434464a012 100644
--- a/source/blender/blenlib/BLI_string.h
+++ b/source/blender/blenlib/BLI_string.h
@@ -73,7 +73,7 @@ size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict
size_t BLI_snprintf_rlen(char *__restrict dst, size_t maxncpy, const char *__restrict format, ...)
ATTR_NONNULL(1, 3) ATTR_PRINTF_FORMAT(3, 4);
-size_t BLI_vsnprintf(char *__restrict dst,
+size_t BLI_vsnprintf(char *__restrict buffer,
size_t maxncpy,
const char *__restrict format,
va_list arg) ATTR_PRINTF_FORMAT(3, 0);
@@ -90,7 +90,8 @@ size_t BLI_strescape(char *__restrict dst, const char *__restrict src, const siz
size_t BLI_str_format_int_grouped(char dst[16], int num) ATTR_NONNULL();
size_t BLI_str_format_uint64_grouped(char dst[16], uint64_t num) ATTR_NONNULL();
-void BLI_str_format_byte_unit(char dst[15], long long int size, const bool base_10) ATTR_NONNULL();
+void BLI_str_format_byte_unit(char dst[15], long long int bytes, const bool base_10)
+ ATTR_NONNULL();
int BLI_strcaseeq(const char *a, const char *b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
char *BLI_strcasestr(const char *s, const char *find) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index 3620a3ccc55..b633bbfa435 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -67,10 +67,10 @@ size_t BLI_strnlen_utf8_ex(const char *strc, const size_t maxlen, size_t *r_len_
size_t BLI_strnlen_utf8(const char *strc, const size_t maxlen) ATTR_NONNULL();
size_t BLI_strncpy_wchar_as_utf8(char *__restrict dst,
const wchar_t *__restrict src,
- const size_t maxcpy) ATTR_NONNULL();
+ const size_t maxncpy) ATTR_NONNULL();
size_t BLI_strncpy_wchar_from_utf8(wchar_t *__restrict dst,
const char *__restrict src,
- const size_t maxcpy) ATTR_NONNULL();
+ const size_t maxncpy) ATTR_NONNULL();
/* count columns that character/string occupies, based on wcwidth.c */
int BLI_wcwidth(char32_t ucs);
diff --git a/source/blender/blenlib/BLI_task.h b/source/blender/blenlib/BLI_task.h
index eee304a9b72..838993583a2 100644
--- a/source/blender/blenlib/BLI_task.h
+++ b/source/blender/blenlib/BLI_task.h
@@ -308,7 +308,7 @@ void BLI_task_graph_work_and_wait(struct TaskGraph *task_graph);
void BLI_task_graph_free(struct TaskGraph *task_graph);
struct TaskNode *BLI_task_graph_node_create(struct TaskGraph *task_graph,
TaskGraphNodeRunFunction run,
- void *task_data,
+ void *user_data,
TaskGraphNodeFreeFunction free_func);
bool BLI_task_graph_node_push_work(struct TaskNode *task_node);
void BLI_task_graph_edge_create(struct TaskNode *from_node, struct TaskNode *to_node);
diff --git a/source/blender/blenlib/BLI_timecode.h b/source/blender/blenlib/BLI_timecode.h
index 1dff50efa23..12f4f93f700 100644
--- a/source/blender/blenlib/BLI_timecode.h
+++ b/source/blender/blenlib/BLI_timecode.h
@@ -30,18 +30,18 @@ extern "C" {
#endif
size_t BLI_timecode_string_from_time(char *str,
- const size_t len,
+ const size_t maxncpy,
const int brevity_level,
const float time_seconds,
const double scene_fps,
const short timecode_style) ATTR_NONNULL();
size_t BLI_timecode_string_from_time_simple(char *str,
- const size_t maxlen,
+ const size_t maxncpy,
const double time_seconds) ATTR_NONNULL();
size_t BLI_timecode_string_from_time_seconds(char *str,
- const size_t len,
+ const size_t maxncpy,
const int brevity_level,
const float time_seconds) ATTR_NONNULL();
diff --git a/source/blender/blenlib/intern/BLI_heap.c b/source/blender/blenlib/intern/BLI_heap.c
index f8d78213980..c39d8a05d08 100644
--- a/source/blender/blenlib/intern/BLI_heap.c
+++ b/source/blender/blenlib/intern/BLI_heap.c
@@ -393,14 +393,14 @@ void BLI_heap_node_value_update_ptr(Heap *heap, HeapNode *node, float value, voi
}
}
-float BLI_heap_node_value(const HeapNode *node)
+float BLI_heap_node_value(const HeapNode *heap)
{
- return node->value;
+ return heap->value;
}
-void *BLI_heap_node_ptr(const HeapNode *node)
+void *BLI_heap_node_ptr(const HeapNode *heap)
{
- return node->ptr;
+ return heap->ptr;
}
static bool heap_is_minheap(const Heap *heap, uint root)
diff --git a/source/blender/blenlib/intern/array_utils.c b/source/blender/blenlib/intern/array_utils.c
index e9ef5e2a927..2da2bbbc2a5 100644
--- a/source/blender/blenlib/intern/array_utils.c
+++ b/source/blender/blenlib/intern/array_utils.c
@@ -88,7 +88,7 @@ void _bli_array_wrap(void *arr_v, unsigned int arr_len, size_t arr_stride, int d
*
* Access via #BLI_array_wrap
*/
-void _bli_array_permute(void *arr_v,
+void _bli_array_permute(void *arr,
const unsigned int arr_len,
const size_t arr_stride,
const unsigned int *order,
@@ -106,11 +106,11 @@ void _bli_array_permute(void *arr_v,
arr_orig = arr_temp;
}
- memcpy(arr_orig, arr_v, len);
+ memcpy(arr_orig, arr, len);
for (i = 0; i < arr_len; i++) {
BLI_assert(order[i] < arr_len);
- memcpy(POINTER_OFFSET(arr_v, arr_stride_uint * i),
+ memcpy(POINTER_OFFSET(arr, arr_stride_uint * i),
POINTER_OFFSET(arr_orig, arr_stride_uint * order[i]),
arr_stride);
}
diff --git a/source/blender/blenlib/intern/gsqueue.c b/source/blender/blenlib/intern/gsqueue.c
index 36040536cac..118d19418d4 100644
--- a/source/blender/blenlib/intern/gsqueue.c
+++ b/source/blender/blenlib/intern/gsqueue.c
@@ -114,12 +114,12 @@ void BLI_gsqueue_free(GSQueue *queue)
/**
* Copies the source value onto the end of the queue
*
- * \note This copies #GSQueue.elem_size bytes from \a src,
+ * \note This copies #GSQueue.elem_size bytes from \a item,
* (the pointer itself is not stored).
*
- * \param src: source data to be copied to the queue.
+ * \param item: source data to be copied to the queue.
*/
-void BLI_gsqueue_push(GSQueue *queue, const void *src)
+void BLI_gsqueue_push(GSQueue *queue, const void *item)
{
queue->chunk_last_index++;
queue->totelem++;
@@ -150,20 +150,20 @@ void BLI_gsqueue_push(GSQueue *queue, const void *src)
BLI_assert(queue->chunk_last_index < queue->chunk_elem_max);
/* Return last of queue */
- memcpy(queue_get_last_elem(queue), src, queue->elem_size);
+ memcpy(queue_get_last_elem(queue), item, queue->elem_size);
}
/**
* Retrieves and removes the first element from the queue.
- * The value is copies to \a dst, which must be at least \a elem_size bytes.
+ * The value is copies to \a r_item, which must be at least \a elem_size bytes.
*
* Does not reduce amount of allocated memory.
*/
-void BLI_gsqueue_pop(GSQueue *queue, void *dst)
+void BLI_gsqueue_pop(GSQueue *queue, void *r_item)
{
BLI_assert(BLI_gsqueue_is_empty(queue) == false);
- memcpy(dst, queue_get_first_elem(queue), queue->elem_size);
+ memcpy(r_item, queue_get_first_elem(queue), queue->elem_size);
queue->chunk_first_index++;
queue->totelem--;
diff --git a/source/blender/blenlib/intern/hash_mm3.c b/source/blender/blenlib/intern/hash_mm3.c
index e557789a5fd..4a175f67f30 100644
--- a/source/blender/blenlib/intern/hash_mm3.c
+++ b/source/blender/blenlib/intern/hash_mm3.c
@@ -83,9 +83,9 @@ BLI_INLINE uint64_t fmix64(uint64_t k)
return k;
}
-uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
+uint32_t BLI_hash_mm3(const unsigned char *data, size_t len, uint32_t seed)
{
- const uint8_t *data = (const uint8_t *)in;
+ const uint8_t *in_data = (const uint8_t *)data;
const int nblocks = len / 4;
uint32_t h1 = seed;
@@ -95,7 +95,7 @@ uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
/* body */
- const uint32_t *blocks = (const uint32_t *)(data + nblocks * 4);
+ const uint32_t *blocks = (const uint32_t *)(in_data + nblocks * 4);
for (int i = -nblocks; i; i++) {
uint32_t k1 = getblock32(blocks, i);
@@ -111,7 +111,7 @@ uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
/* tail */
- const uint8_t *tail = (const uint8_t *)(data + nblocks * 4);
+ const uint8_t *tail = (const uint8_t *)(in_data + nblocks * 4);
uint32_t k1 = 0;
diff --git a/source/blender/blenlib/intern/jitter_2d.c b/source/blender/blenlib/intern/jitter_2d.c
index a5b13caf985..c92aeddb27d 100644
--- a/source/blender/blenlib/intern/jitter_2d.c
+++ b/source/blender/blenlib/intern/jitter_2d.c
@@ -31,7 +31,7 @@
#include "BLI_strict_flags.h"
-void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float rad1)
+void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float radius1)
{
int i, j, k;
float vecx, vecy, dvecx, dvecy, x, y, len;
@@ -45,30 +45,30 @@ void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float rad1)
vecx = jit1[j][0] - x - 1.0f;
vecy = jit1[j][1] - y - 1.0f;
for (k = 3; k > 0; k--) {
- if (fabsf(vecx) < rad1 && fabsf(vecy) < rad1) {
+ if (fabsf(vecx) < radius1 && fabsf(vecy) < radius1) {
len = sqrtf(vecx * vecx + vecy * vecy);
- if (len > 0 && len < rad1) {
- len = len / rad1;
+ if (len > 0 && len < radius1) {
+ len = len / radius1;
dvecx += vecx / len;
dvecy += vecy / len;
}
}
vecx += 1.0f;
- if (fabsf(vecx) < rad1 && fabsf(vecy) < rad1) {
+ if (fabsf(vecx) < radius1 && fabsf(vecy) < radius1) {
len = sqrtf(vecx * vecx + vecy * vecy);
- if (len > 0 && len < rad1) {
- len = len / rad1;
+ if (len > 0 && len < radius1) {
+ len = len / radius1;
dvecx += vecx / len;
dvecy += vecy / len;
}
}
vecx += 1.0f;
- if (fabsf(vecx) < rad1 && fabsf(vecy) < rad1) {
+ if (fabsf(vecx) < radius1 && fabsf(vecy) < radius1) {
len = sqrtf(vecx * vecx + vecy * vecy);
- if (len > 0 && len < rad1) {
- len = len / rad1;
+ if (len > 0 && len < radius1) {
+ len = len / radius1;
dvecx += vecx / len;
dvecy += vecy / len;
}
@@ -89,7 +89,7 @@ void BLI_jitterate1(float (*jit1)[2], float (*jit2)[2], int num, float rad1)
memcpy(jit1, jit2, 2 * (unsigned int)num * sizeof(float));
}
-void BLI_jitterate2(float (*jit1)[2], float (*jit2)[2], int num, float rad2)
+void BLI_jitterate2(float (*jit1)[2], float (*jit2)[2], int num, float radius2)
{
int i, j;
float vecx, vecy, dvecx, dvecy, x, y;
@@ -103,28 +103,28 @@ void BLI_jitterate2(float (*jit1)[2], float (*jit2)[2], int num, float rad2)
vecx = jit1[j][0] - x - 1.0f;
vecy = jit1[j][1] - y - 1.0f;
- if (fabsf(vecx) < rad2) {
- dvecx += vecx * rad2;
+ if (fabsf(vecx) < radius2) {
+ dvecx += vecx * radius2;
}
vecx += 1.0f;
- if (fabsf(vecx) < rad2) {
- dvecx += vecx * rad2;
+ if (fabsf(vecx) < radius2) {
+ dvecx += vecx * radius2;
}
vecx += 1.0f;
- if (fabsf(vecx) < rad2) {
- dvecx += vecx * rad2;
+ if (fabsf(vecx) < radius2) {
+ dvecx += vecx * radius2;
}
- if (fabsf(vecy) < rad2) {
- dvecy += vecy * rad2;
+ if (fabsf(vecy) < radius2) {
+ dvecy += vecy * radius2;
}
vecy += 1.0f;
- if (fabsf(vecy) < rad2) {
- dvecy += vecy * rad2;
+ if (fabsf(vecy) < radius2) {
+ dvecy += vecy * radius2;
}
vecy += 1.0f;
- if (fabsf(vecy) < rad2) {
- dvecy += vecy * rad2;
+ if (fabsf(vecy) < radius2) {
+ dvecy += vecy * radius2;
}
}
}
diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c
index 1afcf83bf73..9cf1341b16a 100644
--- a/source/blender/blenlib/intern/math_geom.c
+++ b/source/blender/blenlib/intern/math_geom.c
@@ -802,14 +802,14 @@ float dist_squared_ray_to_aabb_v3(const struct DistRayAABB_Precalc *data,
float dist_squared_ray_to_aabb_v3_simple(const float ray_origin[3],
const float ray_direction[3],
- const float bbmin[3],
- const float bbmax[3],
+ const float bb_min[3],
+ const float bb_max[3],
float r_point[3],
float *r_depth)
{
struct DistRayAABB_Precalc data;
dist_squared_ray_to_aabb_v3_precalc(&data, ray_origin, ray_direction);
- return dist_squared_ray_to_aabb_v3(&data, bbmin, bbmax, r_point, r_depth);
+ return dist_squared_ray_to_aabb_v3(&data, bb_min, bb_max, r_point, r_depth);
}
/** \} */
@@ -1022,31 +1022,31 @@ float dist_squared_to_projected_aabb_simple(const float projmat[4][4],
*
* Set 'r' to the point in triangle (a, b, c) closest to point 'p' */
void closest_on_tri_to_point_v3(
- float r[3], const float p[3], const float a[3], const float b[3], const float c[3])
+ float r[3], const float p[3], const float v1[3], const float v2[3], const float v3[3])
{
float ab[3], ac[3], ap[3], d1, d2;
float bp[3], d3, d4, vc, cp[3], d5, d6, vb, va;
float denom, v, w;
/* Check if P in vertex region outside A */
- sub_v3_v3v3(ab, b, a);
- sub_v3_v3v3(ac, c, a);
- sub_v3_v3v3(ap, p, a);
+ sub_v3_v3v3(ab, v2, v1);
+ sub_v3_v3v3(ac, v3, v1);
+ sub_v3_v3v3(ap, p, v1);
d1 = dot_v3v3(ab, ap);
d2 = dot_v3v3(ac, ap);
if (d1 <= 0.0f && d2 <= 0.0f) {
/* barycentric coordinates (1,0,0) */
- copy_v3_v3(r, a);
+ copy_v3_v3(r, v1);
return;
}
/* Check if P in vertex region outside B */
- sub_v3_v3v3(bp, p, b);
+ sub_v3_v3v3(bp, p, v2);
d3 = dot_v3v3(ab, bp);
d4 = dot_v3v3(ac, bp);
if (d3 >= 0.0f && d4 <= d3) {
/* barycentric coordinates (0,1,0) */
- copy_v3_v3(r, b);
+ copy_v3_v3(r, v2);
return;
}
/* Check if P in edge region of AB, if so return projection of P onto AB */
@@ -1054,16 +1054,16 @@ void closest_on_tri_to_point_v3(
if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f) {
v = d1 / (d1 - d3);
/* barycentric coordinates (1-v,v,0) */
- madd_v3_v3v3fl(r, a, ab, v);
+ madd_v3_v3v3fl(r, v1, ab, v);
return;
}
/* Check if P in vertex region outside C */
- sub_v3_v3v3(cp, p, c);
+ sub_v3_v3v3(cp, p, v3);
d5 = dot_v3v3(ab, cp);
d6 = dot_v3v3(ac, cp);
if (d6 >= 0.0f && d5 <= d6) {
/* barycentric coordinates (0,0,1) */
- copy_v3_v3(r, c);
+ copy_v3_v3(r, v3);
return;
}
/* Check if P in edge region of AC, if so return projection of P onto AC */
@@ -1071,7 +1071,7 @@ void closest_on_tri_to_point_v3(
if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f) {
w = d2 / (d2 - d6);
/* barycentric coordinates (1-w,0,w) */
- madd_v3_v3v3fl(r, a, ac, w);
+ madd_v3_v3v3fl(r, v1, ac, w);
return;
}
/* Check if P in edge region of BC, if so return projection of P onto BC */
@@ -1079,9 +1079,9 @@ void closest_on_tri_to_point_v3(
if (va <= 0.0f && (d4 - d3) >= 0.0f && (d5 - d6) >= 0.0f) {
w = (d4 - d3) / ((d4 - d3) + (d5 - d6));
/* barycentric coordinates (0,1-w,w) */
- sub_v3_v3v3(r, c, b);
+ sub_v3_v3v3(r, v3, v2);
mul_v3_fl(r, w);
- add_v3_v3(r, b);
+ add_v3_v3(r, v2);
return;
}
@@ -1094,7 +1094,7 @@ void closest_on_tri_to_point_v3(
/* ac * w */
mul_v3_fl(ac, w);
/* a + ab * v */
- madd_v3_v3v3fl(r, a, ab, v);
+ madd_v3_v3v3fl(r, v1, ab, v);
/* a + ab * v + ac * w */
add_v3_v3(r, ac);
}
@@ -4972,28 +4972,28 @@ void projmat_from_subregion(const float projmat[4][4],
}
}
-static void i_multmatrix(const float icand[4][4], float Vm[4][4])
+static void i_multmatrix(const float icand[4][4], float mat[4][4])
{
int row, col;
float temp[4][4];
for (row = 0; row < 4; row++) {
for (col = 0; col < 4; col++) {
- temp[row][col] = (icand[row][0] * Vm[0][col] + icand[row][1] * Vm[1][col] +
- icand[row][2] * Vm[2][col] + icand[row][3] * Vm[3][col]);
+ temp[row][col] = (icand[row][0] * mat[0][col] + icand[row][1] * mat[1][col] +
+ icand[row][2] * mat[2][col] + icand[row][3] * mat[3][col]);
}
}
- copy_m4_m4(Vm, temp);
+ copy_m4_m4(mat, temp);
}
-void polarview_m4(float Vm[4][4], float dist, float azimuth, float incidence, float twist)
+void polarview_m4(float mat[4][4], float dist, float azimuth, float incidence, float twist)
{
- unit_m4(Vm);
+ unit_m4(mat);
- translate_m4(Vm, 0.0, 0.0, -dist);
- rotate_m4(Vm, 'Z', -twist);
- rotate_m4(Vm, 'X', -incidence);
- rotate_m4(Vm, 'Z', -azimuth);
+ translate_m4(mat, 0.0, 0.0, -dist);
+ rotate_m4(mat, 'Z', -twist);
+ rotate_m4(mat, 'X', -incidence);
+ rotate_m4(mat, 'Z', -azimuth);
}
void lookat_m4(
diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c
index f523bd07c09..08c7d3b1e91 100644
--- a/source/blender/blenlib/intern/math_matrix.c
+++ b/source/blender/blenlib/intern/math_matrix.c
@@ -204,20 +204,20 @@ void copy_m4d_m4(double m1[4][4], const float m2[4][4])
m1[3][3] = m2[3][3];
}
-void copy_m3_m3d(float R[3][3], const double A[3][3])
+void copy_m3_m3d(float m1[3][3], const double m2[3][3])
{
/* Keep it stupid simple for better data flow in CPU. */
- R[0][0] = (float)A[0][0];
- R[0][1] = (float)A[0][1];
- R[0][2] = (float)A[0][2];
+ m1[0][0] = (float)m2[0][0];
+ m1[0][1] = (float)m2[0][1];
+ m1[0][2] = (float)m2[0][2];
- R[1][0] = (float)A[1][0];
- R[1][1] = (float)A[1][1];
- R[1][2] = (float)A[1][2];
+ m1[1][0] = (float)m2[1][0];
+ m1[1][1] = (float)m2[1][1];
+ m1[1][2] = (float)m2[1][2];
- R[2][0] = (float)A[2][0];
- R[2][1] = (float)A[2][1];
- R[2][2] = (float)A[2][2];
+ m1[2][0] = (float)m2[2][0];
+ m1[2][1] = (float)m2[2][1];
+ m1[2][2] = (float)m2[2][2];
}
void swap_m3m3(float m1[3][3], float m2[3][3])
@@ -435,105 +435,105 @@ void mul_m3_m3m3_uniq(float R[3][3], const float A[3][3], const float B[3][3])
R[2][2] = B[2][0] * A[0][2] + B[2][1] * A[1][2] + B[2][2] * A[2][2];
}
-void mul_m4_m4m3(float m1[4][4], const float m3_[4][4], const float m2_[3][3])
+void mul_m4_m4m3(float R[4][4], const float A[4][4], const float B[3][3])
{
- float m2[3][3], m3[4][4];
+ float B_[3][3], A_[4][4];
- /* copy so it works when m1 is the same pointer as m2 or m3 */
+ /* copy so it works when R is the same pointer as A or B */
/* TODO: avoid copying when matrices are different */
- copy_m3_m3(m2, m2_);
- copy_m4_m4(m3, m3_);
+ copy_m4_m4(A_, A);
+ copy_m3_m3(B_, B);
- m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0];
- m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1];
- m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2];
- m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0];
- m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1];
- m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2];
- m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0];
- m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1];
- m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2];
+ R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
+ R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
+ R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
+ R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
+ R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
+ R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
+ R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
+ R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
+ R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
}
-/* m1 = m2 * m3, ignore the elements on the 4th row/column of m2 */
-void mul_m3_m3m4(float m1[3][3], const float m3_[3][3], const float m2_[4][4])
+/* R = A * B, ignore the elements on the 4th row/column of A */
+void mul_m3_m3m4(float R[3][3], const float A[3][3], const float B[4][4])
{
- float m2[4][4], m3[3][3];
+ float B_[4][4], A_[3][3];
- /* copy so it works when m1 is the same pointer as m2 or m3 */
+ /* copy so it works when R is the same pointer as A or B */
/* TODO: avoid copying when matrices are different */
- copy_m4_m4(m2, m2_);
- copy_m3_m3(m3, m3_);
+ copy_m3_m3(A_, A);
+ copy_m4_m4(B_, B);
- /* m1[i][j] = m2[i][k] * m3[k][j] */
- m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0];
- m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1];
- m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2];
+ /* R[i][j] = B_[i][k] * A_[k][j] */
+ R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
+ R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
+ R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
- m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0];
- m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1];
- m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2];
+ R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
+ R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
+ R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
- m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0];
- m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1];
- m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2];
+ R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
+ R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
+ R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
}
-/* m1 = m2 * m3, ignore the elements on the 4th row/column of m3 */
-void mul_m3_m4m3(float m1[3][3], const float m3_[4][4], const float m2_[3][3])
+/* R = A * B, ignore the elements on the 4th row/column of B */
+void mul_m3_m4m3(float R[3][3], const float A[4][4], const float B[3][3])
{
- float m2[3][3], m3[4][4];
+ float B_[3][3], A_[4][4];
- /* copy so it works when m1 is the same pointer as m2 or m3 */
+ /* copy so it works when R is the same pointer as A or B */
/* TODO: avoid copying when matrices are different */
- copy_m3_m3(m2, m2_);
- copy_m4_m4(m3, m3_);
+ copy_m4_m4(A_, A);
+ copy_m3_m3(B_, B);
- /* m1[i][j] = m2[i][k] * m3[k][j] */
- m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0];
- m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1];
- m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2];
+ /* R[i][j] = B[i][k] * A[k][j] */
+ R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
+ R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
+ R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
- m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0];
- m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1];
- m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2];
+ R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
+ R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
+ R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
- m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0];
- m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1];
- m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2];
+ R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
+ R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
+ R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
}
-void mul_m4_m3m4(float m1[4][4], const float m3_[3][3], const float m2_[4][4])
+void mul_m4_m3m4(float R[4][4], const float A[3][3], const float B[4][4])
{
- float m2[4][4], m3[3][3];
+ float B_[4][4], A_[3][3];
- /* copy so it works when m1 is the same pointer as m2 or m3 */
+ /* copy so it works when R is the same pointer as A or B */
/* TODO: avoid copying when matrices are different */
- copy_m4_m4(m2, m2_);
- copy_m3_m3(m3, m3_);
+ copy_m3_m3(A_, A);
+ copy_m4_m4(B_, B);
- m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0];
- m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1];
- m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2];
- m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0];
- m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1];
- m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2];
- m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0];
- m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1];
- m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2];
+ R[0][0] = B_[0][0] * A_[0][0] + B_[0][1] * A_[1][0] + B_[0][2] * A_[2][0];
+ R[0][1] = B_[0][0] * A_[0][1] + B_[0][1] * A_[1][1] + B_[0][2] * A_[2][1];
+ R[0][2] = B_[0][0] * A_[0][2] + B_[0][1] * A_[1][2] + B_[0][2] * A_[2][2];
+ R[1][0] = B_[1][0] * A_[0][0] + B_[1][1] * A_[1][0] + B_[1][2] * A_[2][0];
+ R[1][1] = B_[1][0] * A_[0][1] + B_[1][1] * A_[1][1] + B_[1][2] * A_[2][1];
+ R[1][2] = B_[1][0] * A_[0][2] + B_[1][1] * A_[1][2] + B_[1][2] * A_[2][2];
+ R[2][0] = B_[2][0] * A_[0][0] + B_[2][1] * A_[1][0] + B_[2][2] * A_[2][0];
+ R[2][1] = B_[2][0] * A_[0][1] + B_[2][1] * A_[1][1] + B_[2][2] * A_[2][1];
+ R[2][2] = B_[2][0] * A_[0][2] + B_[2][1] * A_[1][2] + B_[2][2] * A_[2][2];
}
-void mul_m3_m4m4(float m1[3][3], const float m3[4][4], const float m2[4][4])
+void mul_m3_m4m4(float R[3][3], const float A[4][4], const float B[4][4])
{
- m1[0][0] = m2[0][0] * m3[0][0] + m2[0][1] * m3[1][0] + m2[0][2] * m3[2][0];
- m1[0][1] = m2[0][0] * m3[0][1] + m2[0][1] * m3[1][1] + m2[0][2] * m3[2][1];
- m1[0][2] = m2[0][0] * m3[0][2] + m2[0][1] * m3[1][2] + m2[0][2] * m3[2][2];
- m1[1][0] = m2[1][0] * m3[0][0] + m2[1][1] * m3[1][0] + m2[1][2] * m3[2][0];
- m1[1][1] = m2[1][0] * m3[0][1] + m2[1][1] * m3[1][1] + m2[1][2] * m3[2][1];
- m1[1][2] = m2[1][0] * m3[0][2] + m2[1][1] * m3[1][2] + m2[1][2] * m3[2][2];
- m1[2][0] = m2[2][0] * m3[0][0] + m2[2][1] * m3[1][0] + m2[2][2] * m3[2][0];
- m1[2][1] = m2[2][0] * m3[0][1] + m2[2][1] * m3[1][1] + m2[2][2] * m3[2][1];
- m1[2][2] = m2[2][0] * m3[0][2] + m2[2][1] * m3[1][2] + m2[2][2] * m3[2][2];
+ R[0][0] = B[0][0] * A[0][0] + B[0][1] * A[1][0] + B[0][2] * A[2][0];
+ R[0][1] = B[0][0] * A[0][1] + B[0][1] * A[1][1] + B[0][2] * A[2][1];
+ R[0][2] = B[0][0] * A[0][2] + B[0][1] * A[1][2] + B[0][2] * A[2][2];
+ R[1][0] = B[1][0] * A[0][0] + B[1][1] * A[1][0] + B[1][2] * A[2][0];
+ R[1][1] = B[1][0] * A[0][1] + B[1][1] * A[1][1] + B[1][2] * A[2][1];
+ R[1][2] = B[1][0] * A[0][2] + B[1][1] * A[1][2] + B[1][2] * A[2][2];
+ R[2][0] = B[2][0] * A[0][0] + B[2][1] * A[1][0] + B[2][2] * A[2][0];
+ R[2][1] = B[2][0] * A[0][1] + B[2][1] * A[1][1] + B[2][2] * A[2][1];
+ R[2][2] = B[2][0] * A[0][2] + B[2][1] * A[1][2] + B[2][2] * A[2][2];
}
/** \name Macro helpers for: mul_m3_series
@@ -726,14 +726,14 @@ void mul_m3_v2(const float m[3][3], float r[2])
mul_v2_m3v2(r, m, r);
}
-void mul_m4_v3(const float mat[4][4], float vec[3])
+void mul_m4_v3(const float M[4][4], float r[3])
{
- const float x = vec[0];
- const float y = vec[1];
+ const float x = r[0];
+ const float y = r[1];
- vec[0] = x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2] + mat[3][0];
- vec[1] = x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2] + mat[3][1];
- vec[2] = x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2] + mat[3][2];
+ r[0] = x * M[0][0] + y * M[1][0] + M[2][0] * r[2] + M[3][0];
+ r[1] = x * M[0][1] + y * M[1][1] + M[2][1] * r[2] + M[3][1];
+ r[2] = x * M[0][2] + y * M[1][2] + M[2][2] * r[2] + M[3][2];
}
void mul_v3_m4v3(float r[3], const float mat[4][4], const float vec[3])
@@ -788,14 +788,14 @@ void mul_m2_v2(const float mat[2][2], float vec[2])
}
/** Same as #mul_m4_v3() but doesn't apply translation component. */
-void mul_mat3_m4_v3(const float mat[4][4], float vec[3])
+void mul_mat3_m4_v3(const float M[4][4], float r[3])
{
- const float x = vec[0];
- const float y = vec[1];
+ const float x = r[0];
+ const float y = r[1];
- vec[0] = x * mat[0][0] + y * mat[1][0] + mat[2][0] * vec[2];
- vec[1] = x * mat[0][1] + y * mat[1][1] + mat[2][1] * vec[2];
- vec[2] = x * mat[0][2] + y * mat[1][2] + mat[2][2] * vec[2];
+ r[0] = x * M[0][0] + y * M[1][0] + M[2][0] * r[2];
+ r[1] = x * M[0][1] + y * M[1][1] + M[2][1] * r[2];
+ r[2] = x * M[0][2] + y * M[1][2] + M[2][2] * r[2];
}
void mul_v3_mat3_m4v3(float r[3], const float mat[4][4], const float vec[3])
@@ -934,164 +934,164 @@ void mul_m3_v3_db(const double M[3][3], double r[3])
mul_v3_m3v3_db(r, M, (const double[3]){UNPACK3(r)});
}
-void mul_transposed_m3_v3(const float mat[3][3], float vec[3])
+void mul_transposed_m3_v3(const float M[3][3], float r[3])
{
- const float x = vec[0];
- const float y = vec[1];
+ const float x = r[0];
+ const float y = r[1];
- vec[0] = x * mat[0][0] + y * mat[0][1] + mat[0][2] * vec[2];
- vec[1] = x * mat[1][0] + y * mat[1][1] + mat[1][2] * vec[2];
- vec[2] = x * mat[2][0] + y * mat[2][1] + mat[2][2] * vec[2];
+ r[0] = x * M[0][0] + y * M[0][1] + M[0][2] * r[2];
+ r[1] = x * M[1][0] + y * M[1][1] + M[1][2] * r[2];
+ r[2] = x * M[2][0] + y * M[2][1] + M[2][2] * r[2];
}
-void mul_transposed_mat3_m4_v3(const float mat[4][4], float vec[3])
+void mul_transposed_mat3_m4_v3(const float M[4][4], float r[3])
{
- const float x = vec[0];
- const float y = vec[1];
+ const float x = r[0];
+ const float y = r[1];
- vec[0] = x * mat[0][0] + y * mat[0][1] + mat[0][2] * vec[2];
- vec[1] = x * mat[1][0] + y * mat[1][1] + mat[1][2] * vec[2];
- vec[2] = x * mat[2][0] + y * mat[2][1] + mat[2][2] * vec[2];
+ r[0] = x * M[0][0] + y * M[0][1] + M[0][2] * r[2];
+ r[1] = x * M[1][0] + y * M[1][1] + M[1][2] * r[2];
+ r[2] = x * M[2][0] + y * M[2][1] + M[2][2] * r[2];
}
-void mul_m3_fl(float m[3][3], float f)
+void mul_m3_fl(float R[3][3], float f)
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m[i][j] *= f;
+ R[i][j] *= f;
}
}
}
-void mul_m4_fl(float m[4][4], float f)
+void mul_m4_fl(float R[4][4], float f)
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- m[i][j] *= f;
+ R[i][j] *= f;
}
}
}
-void mul_mat3_m4_fl(float m[4][4], float f)
+void mul_mat3_m4_fl(float R[4][4], float f)
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m[i][j] *= f;
+ R[i][j] *= f;
}
}
}
-void negate_m3(float m[3][3])
+void negate_m3(float R[3][3])
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m[i][j] *= -1.0f;
+ R[i][j] *= -1.0f;
}
}
}
-void negate_mat3_m4(float m[4][4])
+void negate_mat3_m4(float R[4][4])
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m[i][j] *= -1.0f;
+ R[i][j] *= -1.0f;
}
}
}
-void negate_m4(float m[4][4])
+void negate_m4(float R[4][4])
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- m[i][j] *= -1.0f;
+ R[i][j] *= -1.0f;
}
}
}
-void mul_m3_v3_double(const float mat[3][3], double vec[3])
+void mul_m3_v3_double(const float M[3][3], double r[3])
{
- const double x = vec[0];
- const double y = vec[1];
+ const double x = r[0];
+ const double y = r[1];
- vec[0] = x * (double)mat[0][0] + y * (double)mat[1][0] + (double)mat[2][0] * vec[2];
- vec[1] = x * (double)mat[0][1] + y * (double)mat[1][1] + (double)mat[2][1] * vec[2];
- vec[2] = x * (double)mat[0][2] + y * (double)mat[1][2] + (double)mat[2][2] * vec[2];
+ r[0] = x * (double)M[0][0] + y * (double)M[1][0] + (double)M[2][0] * r[2];
+ r[1] = x * (double)M[0][1] + y * (double)M[1][1] + (double)M[2][1] * r[2];
+ r[2] = x * (double)M[0][2] + y * (double)M[1][2] + (double)M[2][2] * r[2];
}
-void add_m3_m3m3(float m1[3][3], const float m2[3][3], const float m3[3][3])
+void add_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m1[i][j] = m2[i][j] + m3[i][j];
+ R[i][j] = A[i][j] + B[i][j];
}
}
}
-void add_m4_m4m4(float m1[4][4], const float m2[4][4], const float m3[4][4])
+void add_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- m1[i][j] = m2[i][j] + m3[i][j];
+ R[i][j] = A[i][j] + B[i][j];
}
}
}
-void madd_m3_m3m3fl(float m1[3][3], const float m2[3][3], const float m3[3][3], const float f)
+void madd_m3_m3m3fl(float R[3][3], const float A[3][3], const float B[3][3], const float f)
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m1[i][j] = m2[i][j] + m3[i][j] * f;
+ R[i][j] = A[i][j] + B[i][j] * f;
}
}
}
-void madd_m4_m4m4fl(float m1[4][4], const float m2[4][4], const float m3[4][4], const float f)
+void madd_m4_m4m4fl(float R[4][4], const float A[4][4], const float B[4][4], const float f)
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- m1[i][j] = m2[i][j] + m3[i][j] * f;
+ R[i][j] = A[i][j] + B[i][j] * f;
}
}
}
-void sub_m3_m3m3(float m1[3][3], const float m2[3][3], const float m3[3][3])
+void sub_m3_m3m3(float R[3][3], const float A[3][3], const float B[3][3])
{
int i, j;
for (i = 0; i < 3; i++) {
for (j = 0; j < 3; j++) {
- m1[i][j] = m2[i][j] - m3[i][j];
+ R[i][j] = A[i][j] - B[i][j];
}
}
}
-void sub_m4_m4m4(float m1[4][4], const float m2[4][4], const float m3[4][4])
+void sub_m4_m4m4(float R[4][4], const float A[4][4], const float B[4][4])
{
int i, j;
for (i = 0; i < 4; i++) {
for (j = 0; j < 4; j++) {
- m1[i][j] = m2[i][j] - m3[i][j];
+ R[i][j] = A[i][j] - B[i][j];
}
}
}
@@ -1306,113 +1306,112 @@ void mul_m4_m4m4_aligned_scale(float R[4][4], const float A[4][4], const float B
/****************************** Linear Algebra *******************************/
-void transpose_m3(float mat[3][3])
+void transpose_m3(float R[3][3])
{
float t;
- t = mat[0][1];
- mat[0][1] = mat[1][0];
- mat[1][0] = t;
- t = mat[0][2];
- mat[0][2] = mat[2][0];
- mat[2][0] = t;
- t = mat[1][2];
- mat[1][2] = mat[2][1];
- mat[2][1] = t;
+ t = R[0][1];
+ R[0][1] = R[1][0];
+ R[1][0] = t;
+ t = R[0][2];
+ R[0][2] = R[2][0];
+ R[2][0] = t;
+ t = R[1][2];
+ R[1][2] = R[2][1];
+ R[2][1] = t;
}
-void transpose_m3_m3(float rmat[3][3], const float mat[3][3])
+void transpose_m3_m3(float R[3][3], const float M[3][3])
{
- BLI_assert(rmat != mat);
+ BLI_assert(R != M);
- rmat[0][0] = mat[0][0];
- rmat[0][1] = mat[1][0];
- rmat[0][2] = mat[2][0];
- rmat[1][0] = mat[0][1];
- rmat[1][1] = mat[1][1];
- rmat[1][2] = mat[2][1];
- rmat[2][0] = mat[0][2];
- rmat[2][1] = mat[1][2];
- rmat[2][2] = mat[2][2];
+ R[0][0] = M[0][0];
+ R[0][1] = M[1][0];
+ R[0][2] = M[2][0];
+ R[1][0] = M[0][1];
+ R[1][1] = M[1][1];
+ R[1][2] = M[2][1];
+ R[2][0] = M[0][2];
+ R[2][1] = M[1][2];
+ R[2][2] = M[2][2];
}
/* seems obscure but in-fact a common operation */
-void transpose_m3_m4(float rmat[3][3], const float mat[4][4])
+void transpose_m3_m4(float R[3][3], const float M[4][4])
{
- BLI_assert(&rmat[0][0] != &mat[0][0]);
+ BLI_assert(&R[0][0] != &M[0][0]);
- rmat[0][0] = mat[0][0];
- rmat[0][1] = mat[1][0];
- rmat[0][2] = mat[2][0];
- rmat[1][0] = mat[0][1];
- rmat[1][1] = mat[1][1];
- rmat[1][2] = mat[2][1];
- rmat[2][0] = mat[0][2];
- rmat[2][1] = mat[1][2];
- rmat[2][2] = mat[2][2];
+ R[0][0] = M[0][0];
+ R[0][1] = M[1][0];
+ R[0][2] = M[2][0];
+ R[1][0] = M[0][1];
+ R[1][1] = M[1][1];
+ R[1][2] = M[2][1];
+ R[2][0] = M[0][2];
+ R[2][1] = M[1][2];
+ R[2][2] = M[2][2];
}
-void transpose_m4(float mat[4][4])
+void transpose_m4(float R[4][4])
{
float t;
- t = mat[0][1];
- mat[0][1] = mat[1][0];
- mat[1][0] = t;
- t = mat[0][2];
- mat[0][2] = mat[2][0];
- mat[2][0] = t;
- t = mat[0][3];
- mat[0][3] = mat[3][0];
- mat[3][0] = t;
-
- t = mat[1][2];
- mat[1][2] = mat[2][1];
- mat[2][1] = t;
- t = mat[1][3];
- mat[1][3] = mat[3][1];
- mat[3][1] = t;
-
- t = mat[2][3];
- mat[2][3] = mat[3][2];
- mat[3][2] = t;
-}
-
-void transpose_m4_m4(float rmat[4][4], const float mat[4][4])
-{
- BLI_assert(rmat != mat);
-
- rmat[0][0] = mat[0][0];
- rmat[0][1] = mat[1][0];
- rmat[0][2] = mat[2][0];
- rmat[0][3] = mat[3][0];
- rmat[1][0] = mat[0][1];
- rmat[1][1] = mat[1][1];
- rmat[1][2] = mat[2][1];
- rmat[1][3] = mat[3][1];
- rmat[2][0] = mat[0][2];
- rmat[2][1] = mat[1][2];
- rmat[2][2] = mat[2][2];
- rmat[2][3] = mat[3][2];
- rmat[3][0] = mat[0][3];
- rmat[3][1] = mat[1][3];
- rmat[3][2] = mat[2][3];
- rmat[3][3] = mat[3][3];
-}
-
-/* TODO: return bool */
-int compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit)
+ t = R[0][1];
+ R[0][1] = R[1][0];
+ R[1][0] = t;
+ t = R[0][2];
+ R[0][2] = R[2][0];
+ R[2][0] = t;
+ t = R[0][3];
+ R[0][3] = R[3][0];
+ R[3][0] = t;
+
+ t = R[1][2];
+ R[1][2] = R[2][1];
+ R[2][1] = t;
+ t = R[1][3];
+ R[1][3] = R[3][1];
+ R[3][1] = t;
+
+ t = R[2][3];
+ R[2][3] = R[3][2];
+ R[3][2] = t;
+}
+
+void transpose_m4_m4(float R[4][4], const float M[4][4])
+{
+ BLI_assert(R != M);
+
+ R[0][0] = M[0][0];
+ R[0][1] = M[1][0];
+ R[0][2] = M[2][0];
+ R[0][3] = M[3][0];
+ R[1][0] = M[0][1];
+ R[1][1] = M[1][1];
+ R[1][2] = M[2][1];
+ R[1][3] = M[3][1];
+ R[2][0] = M[0][2];
+ R[2][1] = M[1][2];
+ R[2][2] = M[2][2];
+ R[2][3] = M[3][2];
+ R[3][0] = M[0][3];
+ R[3][1] = M[1][3];
+ R[3][2] = M[2][3];
+ R[3][3] = M[3][3];
+}
+
+bool compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit)
{
if (compare_v4v4(mat1[0], mat2[0], limit)) {
if (compare_v4v4(mat1[1], mat2[1], limit)) {
if (compare_v4v4(mat1[2], mat2[2], limit)) {
if (compare_v4v4(mat1[3], mat2[3], limit)) {
- return 1;
+ return true;
}
}
}
}
- return 0;
+ return false;
}
/**
@@ -1420,88 +1419,88 @@ int compare_m4m4(const float mat1[4][4], const float mat2[4][4], float limit)
*
* \param axis: Axis to build the orthonormal basis around.
*/
-void orthogonalize_m3(float mat[3][3], int axis)
+void orthogonalize_m3(float R[3][3], int axis)
{
float size[3];
- mat3_to_size(size, mat);
- normalize_v3(mat[axis]);
+ mat3_to_size(size, R);
+ normalize_v3(R[axis]);
switch (axis) {
case 0:
- if (dot_v3v3(mat[0], mat[1]) < 1) {
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ if (dot_v3v3(R[0], R[1]) < 1) {
+ cross_v3_v3v3(R[2], R[0], R[1]);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
- else if (dot_v3v3(mat[0], mat[2]) < 1) {
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
- normalize_v3(mat[1]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ else if (dot_v3v3(R[0], R[2]) < 1) {
+ cross_v3_v3v3(R[1], R[2], R[0]);
+ normalize_v3(R[1]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
else {
float vec[3];
- vec[0] = mat[0][1];
- vec[1] = mat[0][2];
- vec[2] = mat[0][0];
+ vec[0] = R[0][1];
+ vec[1] = R[0][2];
+ vec[2] = R[0][0];
- cross_v3_v3v3(mat[2], mat[0], vec);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ cross_v3_v3v3(R[2], R[0], vec);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
break;
case 1:
- if (dot_v3v3(mat[1], mat[0]) < 1) {
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
+ if (dot_v3v3(R[1], R[0]) < 1) {
+ cross_v3_v3v3(R[2], R[0], R[1]);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[0], R[1], R[2]);
}
- else if (dot_v3v3(mat[0], mat[2]) < 1) {
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ else if (dot_v3v3(R[0], R[2]) < 1) {
+ cross_v3_v3v3(R[0], R[1], R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
else {
float vec[3];
- vec[0] = mat[1][1];
- vec[1] = mat[1][2];
- vec[2] = mat[1][0];
+ vec[0] = R[1][1];
+ vec[1] = R[1][2];
+ vec[2] = R[1][0];
- cross_v3_v3v3(mat[0], mat[1], vec);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ cross_v3_v3v3(R[0], R[1], vec);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
break;
case 2:
- if (dot_v3v3(mat[2], mat[0]) < 1) {
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
- normalize_v3(mat[1]);
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
+ if (dot_v3v3(R[2], R[0]) < 1) {
+ cross_v3_v3v3(R[1], R[2], R[0]);
+ normalize_v3(R[1]);
+ cross_v3_v3v3(R[0], R[1], R[2]);
}
- else if (dot_v3v3(mat[2], mat[1]) < 1) {
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ else if (dot_v3v3(R[2], R[1]) < 1) {
+ cross_v3_v3v3(R[0], R[1], R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
else {
float vec[3];
- vec[0] = mat[2][1];
- vec[1] = mat[2][2];
- vec[2] = mat[2][0];
+ vec[0] = R[2][1];
+ vec[1] = R[2][2];
+ vec[2] = R[2][0];
- cross_v3_v3v3(mat[0], vec, mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ cross_v3_v3v3(R[0], vec, R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
break;
default:
BLI_assert(0);
break;
}
- mul_v3_fl(mat[0], size[0]);
- mul_v3_fl(mat[1], size[1]);
- mul_v3_fl(mat[2], size[2]);
+ mul_v3_fl(R[0], size[0]);
+ mul_v3_fl(R[1], size[1]);
+ mul_v3_fl(R[2], size[2]);
}
/**
@@ -1509,88 +1508,88 @@ void orthogonalize_m3(float mat[3][3], int axis)
*
* \param axis: Axis to build the orthonormal basis around.
*/
-void orthogonalize_m4(float mat[4][4], int axis)
+void orthogonalize_m4(float R[4][4], int axis)
{
float size[3];
- mat4_to_size(size, mat);
- normalize_v3(mat[axis]);
+ mat4_to_size(size, R);
+ normalize_v3(R[axis]);
switch (axis) {
case 0:
- if (dot_v3v3(mat[0], mat[1]) < 1) {
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ if (dot_v3v3(R[0], R[1]) < 1) {
+ cross_v3_v3v3(R[2], R[0], R[1]);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
- else if (dot_v3v3(mat[0], mat[2]) < 1) {
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
- normalize_v3(mat[1]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ else if (dot_v3v3(R[0], R[2]) < 1) {
+ cross_v3_v3v3(R[1], R[2], R[0]);
+ normalize_v3(R[1]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
else {
float vec[3];
- vec[0] = mat[0][1];
- vec[1] = mat[0][2];
- vec[2] = mat[0][0];
+ vec[0] = R[0][1];
+ vec[1] = R[0][2];
+ vec[2] = R[0][0];
- cross_v3_v3v3(mat[2], mat[0], vec);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ cross_v3_v3v3(R[2], R[0], vec);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
break;
case 1:
- if (dot_v3v3(mat[1], mat[0]) < 1) {
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
- normalize_v3(mat[2]);
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
+ if (dot_v3v3(R[1], R[0]) < 1) {
+ cross_v3_v3v3(R[2], R[0], R[1]);
+ normalize_v3(R[2]);
+ cross_v3_v3v3(R[0], R[1], R[2]);
}
- else if (dot_v3v3(mat[0], mat[2]) < 1) {
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ else if (dot_v3v3(R[0], R[2]) < 1) {
+ cross_v3_v3v3(R[0], R[1], R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
else {
float vec[3];
- vec[0] = mat[1][1];
- vec[1] = mat[1][2];
- vec[2] = mat[1][0];
+ vec[0] = R[1][1];
+ vec[1] = R[1][2];
+ vec[2] = R[1][0];
- cross_v3_v3v3(mat[0], mat[1], vec);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[2], mat[0], mat[1]);
+ cross_v3_v3v3(R[0], R[1], vec);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[2], R[0], R[1]);
}
break;
case 2:
- if (dot_v3v3(mat[2], mat[0]) < 1) {
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
- normalize_v3(mat[1]);
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
+ if (dot_v3v3(R[2], R[0]) < 1) {
+ cross_v3_v3v3(R[1], R[2], R[0]);
+ normalize_v3(R[1]);
+ cross_v3_v3v3(R[0], R[1], R[2]);
}
- else if (dot_v3v3(mat[2], mat[1]) < 1) {
- cross_v3_v3v3(mat[0], mat[1], mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ else if (dot_v3v3(R[2], R[1]) < 1) {
+ cross_v3_v3v3(R[0], R[1], R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
else {
float vec[3];
- vec[0] = mat[2][1];
- vec[1] = mat[2][2];
- vec[2] = mat[2][0];
+ vec[0] = R[2][1];
+ vec[1] = R[2][2];
+ vec[2] = R[2][0];
- cross_v3_v3v3(mat[0], vec, mat[2]);
- normalize_v3(mat[0]);
- cross_v3_v3v3(mat[1], mat[2], mat[0]);
+ cross_v3_v3v3(R[0], vec, R[2]);
+ normalize_v3(R[0]);
+ cross_v3_v3v3(R[1], R[2], R[0]);
}
break;
default:
BLI_assert(0);
break;
}
- mul_v3_fl(mat[0], size[0]);
- mul_v3_fl(mat[1], size[1]);
- mul_v3_fl(mat[2], size[2]);
+ mul_v3_fl(R[0], size[0]);
+ mul_v3_fl(R[1], size[1]);
+ mul_v3_fl(R[2], size[2]);
}
/** Make an orthonormal basis around v1 in a way that is stable and symmetric. */
@@ -1793,84 +1792,84 @@ bool is_uniform_scaled_m4(const float m[4][4])
return is_uniform_scaled_m3(t);
}
-void normalize_m2_ex(float mat[2][2], float r_scale[2])
+void normalize_m2_ex(float R[2][2], float r_scale[2])
{
int i;
for (i = 0; i < 2; i++) {
- r_scale[i] = normalize_v2(mat[i]);
+ r_scale[i] = normalize_v2(R[i]);
}
}
-void normalize_m2(float mat[2][2])
+void normalize_m2(float R[2][2])
{
int i;
for (i = 0; i < 2; i++) {
- normalize_v2(mat[i]);
+ normalize_v2(R[i]);
}
}
-void normalize_m2_m2_ex(float rmat[2][2], const float mat[2][2], float r_scale[2])
+void normalize_m2_m2_ex(float R[2][2], const float M[2][2], float r_scale[2])
{
int i;
for (i = 0; i < 2; i++) {
- r_scale[i] = normalize_v2_v2(rmat[i], mat[i]);
+ r_scale[i] = normalize_v2_v2(R[i], M[i]);
}
}
-void normalize_m2_m2(float rmat[2][2], const float mat[2][2])
+void normalize_m2_m2(float R[2][2], const float M[2][2])
{
int i;
for (i = 0; i < 2; i++) {
- normalize_v2_v2(rmat[i], mat[i]);
+ normalize_v2_v2(R[i], M[i]);
}
}
-void normalize_m3_ex(float mat[3][3], float r_scale[3])
+void normalize_m3_ex(float R[3][3], float r_scale[3])
{
int i;
for (i = 0; i < 3; i++) {
- r_scale[i] = normalize_v3(mat[i]);
+ r_scale[i] = normalize_v3(R[i]);
}
}
-void normalize_m3(float mat[3][3])
+void normalize_m3(float R[3][3])
{
int i;
for (i = 0; i < 3; i++) {
- normalize_v3(mat[i]);
+ normalize_v3(R[i]);
}
}
-void normalize_m3_m3_ex(float rmat[3][3], const float mat[3][3], float r_scale[3])
+void normalize_m3_m3_ex(float R[3][3], const float M[3][3], float r_scale[3])
{
int i;
for (i = 0; i < 3; i++) {
- r_scale[i] = normalize_v3_v3(rmat[i], mat[i]);
+ r_scale[i] = normalize_v3_v3(R[i], M[i]);
}
}
-void normalize_m3_m3(float rmat[3][3], const float mat[3][3])
+void normalize_m3_m3(float R[3][3], const float M[3][3])
{
int i;
for (i = 0; i < 3; i++) {
- normalize_v3_v3(rmat[i], mat[i]);
+ normalize_v3_v3(R[i], M[i]);
}
}
-void normalize_m4_ex(float mat[4][4], float r_scale[3])
+void normalize_m4_ex(float R[4][4], float r_scale[3])
{
int i;
for (i = 0; i < 3; i++) {
- r_scale[i] = normalize_v3(mat[i]);
+ r_scale[i] = normalize_v3(R[i]);
if (r_scale[i] != 0.0f) {
- mat[i][3] /= r_scale[i];
+ R[i][3] /= r_scale[i];
}
}
}
-void normalize_m4(float mat[4][4])
+void normalize_m4(float R[4][4])
{
int i;
for (i = 0; i < 3; i++) {
- float len = normalize_v3(mat[i]);
+ float len = normalize_v3(R[i]);
if (len != 0.0f) {
- mat[i][3] /= len;
+ R[i][3] /= len;
}
}
}
@@ -1894,75 +1893,75 @@ void normalize_m4_m4(float rmat[4][4], const float mat[4][4])
copy_v4_v4(rmat[3], mat[3]);
}
-void adjoint_m2_m2(float m1[2][2], const float m[2][2])
+void adjoint_m2_m2(float R[2][2], const float M[2][2])
{
- BLI_assert(m1 != m);
- m1[0][0] = m[1][1];
- m1[0][1] = -m[0][1];
- m1[1][0] = -m[1][0];
- m1[1][1] = m[0][0];
+ BLI_assert(R != M);
+ R[0][0] = M[1][1];
+ R[0][1] = -M[0][1];
+ R[1][0] = -M[1][0];
+ R[1][1] = M[0][0];
}
-void adjoint_m3_m3(float m1[3][3], const float m[3][3])
+void adjoint_m3_m3(float R[3][3], const float M[3][3])
{
- BLI_assert(m1 != m);
- m1[0][0] = m[1][1] * m[2][2] - m[1][2] * m[2][1];
- m1[0][1] = -m[0][1] * m[2][2] + m[0][2] * m[2][1];
- m1[0][2] = m[0][1] * m[1][2] - m[0][2] * m[1][1];
+ BLI_assert(R != M);
+ R[0][0] = M[1][1] * M[2][2] - M[1][2] * M[2][1];
+ R[0][1] = -M[0][1] * M[2][2] + M[0][2] * M[2][1];
+ R[0][2] = M[0][1] * M[1][2] - M[0][2] * M[1][1];
- m1[1][0] = -m[1][0] * m[2][2] + m[1][2] * m[2][0];
- m1[1][1] = m[0][0] * m[2][2] - m[0][2] * m[2][0];
- m1[1][2] = -m[0][0] * m[1][2] + m[0][2] * m[1][0];
+ R[1][0] = -M[1][0] * M[2][2] + M[1][2] * M[2][0];
+ R[1][1] = M[0][0] * M[2][2] - M[0][2] * M[2][0];
+ R[1][2] = -M[0][0] * M[1][2] + M[0][2] * M[1][0];
- m1[2][0] = m[1][0] * m[2][1] - m[1][1] * m[2][0];
- m1[2][1] = -m[0][0] * m[2][1] + m[0][1] * m[2][0];
- m1[2][2] = m[0][0] * m[1][1] - m[0][1] * m[1][0];
+ R[2][0] = M[1][0] * M[2][1] - M[1][1] * M[2][0];
+ R[2][1] = -M[0][0] * M[2][1] + M[0][1] * M[2][0];
+ R[2][2] = M[0][0] * M[1][1] - M[0][1] * M[1][0];
}
-void adjoint_m4_m4(float out[4][4], const float in[4][4]) /* out = ADJ(in) */
+void adjoint_m4_m4(float R[4][4], const float M[4][4]) /* out = ADJ(in) */
{
float a1, a2, a3, a4, b1, b2, b3, b4;
float c1, c2, c3, c4, d1, d2, d3, d4;
- a1 = in[0][0];
- b1 = in[0][1];
- c1 = in[0][2];
- d1 = in[0][3];
+ a1 = M[0][0];
+ b1 = M[0][1];
+ c1 = M[0][2];
+ d1 = M[0][3];
- a2 = in[1][0];
- b2 = in[1][1];
- c2 = in[1][2];
- d2 = in[1][3];
+ a2 = M[1][0];
+ b2 = M[1][1];
+ c2 = M[1][2];
+ d2 = M[1][3];
- a3 = in[2][0];
- b3 = in[2][1];
- c3 = in[2][2];
- d3 = in[2][3];
+ a3 = M[2][0];
+ b3 = M[2][1];
+ c3 = M[2][2];
+ d3 = M[2][3];
- a4 = in[3][0];
- b4 = in[3][1];
- c4 = in[3][2];
- d4 = in[3][3];
+ a4 = M[3][0];
+ b4 = M[3][1];
+ c4 = M[3][2];
+ d4 = M[3][3];
- out[0][0] = determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4);
- out[1][0] = -determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4);
- out[2][0] = determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4);
- out[3][0] = -determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4);
+ R[0][0] = determinant_m3(b2, b3, b4, c2, c3, c4, d2, d3, d4);
+ R[1][0] = -determinant_m3(a2, a3, a4, c2, c3, c4, d2, d3, d4);
+ R[2][0] = determinant_m3(a2, a3, a4, b2, b3, b4, d2, d3, d4);
+ R[3][0] = -determinant_m3(a2, a3, a4, b2, b3, b4, c2, c3, c4);
- out[0][1] = -determinant_m3(b1, b3, b4, c1, c3, c4, d1, d3, d4);
- out[1][1] = determinant_m3(a1, a3, a4, c1, c3, c4, d1, d3, d4);
- out[2][1] = -determinant_m3(a1, a3, a4, b1, b3, b4, d1, d3, d4);
- out[3][1] = determinant_m3(a1, a3, a4, b1, b3, b4, c1, c3, c4);
+ R[0][1] = -determinant_m3(b1, b3, b4, c1, c3, c4, d1, d3, d4);
+ R[1][1] = determinant_m3(a1, a3, a4, c1, c3, c4, d1, d3, d4);
+ R[2][1] = -determinant_m3(a1, a3, a4, b1, b3, b4, d1, d3, d4);
+ R[3][1] = determinant_m3(a1, a3, a4, b1, b3, b4, c1, c3, c4);
- out[0][2] = determinant_m3(b1, b2, b4, c1, c2, c4, d1, d2, d4);
- out[1][2] = -determinant_m3(a1, a2, a4, c1, c2, c4, d1, d2, d4);
- out[2][2] = determinant_m3(a1, a2, a4, b1, b2, b4, d1, d2, d4);
- out[3][2] = -determinant_m3(a1, a2, a4, b1, b2, b4, c1, c2, c4);
+ R[0][2] = determinant_m3(b1, b2, b4, c1, c2, c4, d1, d2, d4);
+ R[1][2] = -determinant_m3(a1, a2, a4, c1, c2, c4, d1, d2, d4);
+ R[2][2] = determinant_m3(a1, a2, a4, b1, b2, b4, d1, d2, d4);
+ R[3][2] = -determinant_m3(a1, a2, a4, b1, b2, b4, c1, c2, c4);
- out[0][3] = -determinant_m3(b1, b2, b3, c1, c2, c3, d1, d2, d3);
- out[1][3] = determinant_m3(a1, a2, a3, c1, c2, c3, d1, d2, d3);
- out[2][3] = -determinant_m3(a1, a2, a3, b1, b2, b3, d1, d2, d3);
- out[3][3] = determinant_m3(a1, a2, a3, b1, b2, b3, c1, c2, c3);
+ R[0][3] = -determinant_m3(b1, b2, b3, c1, c2, c3, d1, d2, d3);
+ R[1][3] = determinant_m3(a1, a2, a3, c1, c2, c3, d1, d2, d3);
+ R[2][3] = -determinant_m3(a1, a2, a3, b1, b2, b3, d1, d2, d3);
+ R[3][3] = determinant_m3(a1, a2, a3, b1, b2, b3, c1, c2, c3);
}
float determinant_m2(float a, float b, float c, float d)
@@ -2017,65 +2016,65 @@ float determinant_m4(const float m[4][4])
/****************************** Transformations ******************************/
-void size_to_mat3(float mat[3][3], const float size[3])
+void size_to_mat3(float R[3][3], const float size[3])
{
- mat[0][0] = size[0];
- mat[0][1] = 0.0f;
- mat[0][2] = 0.0f;
- mat[1][1] = size[1];
- mat[1][0] = 0.0f;
- mat[1][2] = 0.0f;
- mat[2][2] = size[2];
- mat[2][1] = 0.0f;
- mat[2][0] = 0.0f;
+ R[0][0] = size[0];
+ R[0][1] = 0.0f;
+ R[0][2] = 0.0f;
+ R[1][1] = size[1];
+ R[1][0] = 0.0f;
+ R[1][2] = 0.0f;
+ R[2][2] = size[2];
+ R[2][1] = 0.0f;
+ R[2][0] = 0.0f;
}
-void size_to_mat4(float mat[4][4], const float size[3])
+void size_to_mat4(float R[4][4], const float size[3])
{
- mat[0][0] = size[0];
- mat[0][1] = 0.0f;
- mat[0][2] = 0.0f;
- mat[0][3] = 0.0f;
- mat[1][0] = 0.0f;
- mat[1][1] = size[1];
- mat[1][2] = 0.0f;
- mat[1][3] = 0.0f;
- mat[2][0] = 0.0f;
- mat[2][1] = 0.0f;
- mat[2][2] = size[2];
- mat[2][3] = 0.0f;
- mat[3][0] = 0.0f;
- mat[3][1] = 0.0f;
- mat[3][2] = 0.0f;
- mat[3][3] = 1.0f;
+ R[0][0] = size[0];
+ R[0][1] = 0.0f;
+ R[0][2] = 0.0f;
+ R[0][3] = 0.0f;
+ R[1][0] = 0.0f;
+ R[1][1] = size[1];
+ R[1][2] = 0.0f;
+ R[1][3] = 0.0f;
+ R[2][0] = 0.0f;
+ R[2][1] = 0.0f;
+ R[2][2] = size[2];
+ R[2][3] = 0.0f;
+ R[3][0] = 0.0f;
+ R[3][1] = 0.0f;
+ R[3][2] = 0.0f;
+ R[3][3] = 1.0f;
}
-void mat3_to_size(float size[3], const float mat[3][3])
+void mat3_to_size(float size[3], const float M[3][3])
{
- size[0] = len_v3(mat[0]);
- size[1] = len_v3(mat[1]);
- size[2] = len_v3(mat[2]);
+ size[0] = len_v3(M[0]);
+ size[1] = len_v3(M[1]);
+ size[2] = len_v3(M[2]);
}
-void mat4_to_size(float size[3], const float mat[4][4])
+void mat4_to_size(float size[3], const float M[4][4])
{
- size[0] = len_v3(mat[0]);
- size[1] = len_v3(mat[1]);
- size[2] = len_v3(mat[2]);
+ size[0] = len_v3(M[0]);
+ size[1] = len_v3(M[1]);
+ size[2] = len_v3(M[2]);
}
/**
* Extract scale factors from the matrix, with correction to ensure
* exact volume in case of a sheared matrix.
*/
-void mat4_to_size_fix_shear(float size[3], const float mat[4][4])
+void mat4_to_size_fix_shear(float size[3], const float M[4][4])
{
- mat4_to_size(size, mat);
+ mat4_to_size(size, M);
float volume = size[0] * size[1] * size[2];
if (volume != 0.0f) {
- mul_v3_fl(size, cbrtf(fabsf(mat4_to_volume_scale(mat) / volume)));
+ mul_v3_fl(size, cbrtf(fabsf(mat4_to_volume_scale(M) / volume)));
}
}
@@ -2203,22 +2202,22 @@ void mat3_polar_decompose(const float mat3[3][3], float r_U[3][3], float r_P[3][
}
#endif
-void scale_m3_fl(float m[3][3], float scale)
+void scale_m3_fl(float R[3][3], float scale)
{
- m[0][0] = m[1][1] = m[2][2] = scale;
- m[0][1] = m[0][2] = 0.0;
- m[1][0] = m[1][2] = 0.0;
- m[2][0] = m[2][1] = 0.0;
+ R[0][0] = R[1][1] = R[2][2] = scale;
+ R[0][1] = R[0][2] = 0.0;
+ R[1][0] = R[1][2] = 0.0;
+ R[2][0] = R[2][1] = 0.0;
}
-void scale_m4_fl(float m[4][4], float scale)
+void scale_m4_fl(float R[4][4], float scale)
{
- m[0][0] = m[1][1] = m[2][2] = scale;
- m[3][3] = 1.0;
- m[0][1] = m[0][2] = m[0][3] = 0.0;
- m[1][0] = m[1][2] = m[1][3] = 0.0;
- m[2][0] = m[2][1] = m[2][3] = 0.0;
- m[3][0] = m[3][1] = m[3][2] = 0.0;
+ R[0][0] = R[1][1] = R[2][2] = scale;
+ R[3][3] = 1.0;
+ R[0][1] = R[0][2] = R[0][3] = 0.0;
+ R[1][0] = R[1][2] = R[1][3] = 0.0;
+ R[2][0] = R[2][1] = R[2][3] = 0.0;
+ R[3][0] = R[3][1] = R[3][2] = 0.0;
}
void translate_m4(float mat[4][4], float Tx, float Ty, float Tz)
@@ -2486,14 +2485,14 @@ bool equals_m4m4(const float mat1[4][4], const float mat2[4][4])
* Make a 4x4 matrix out of 3 transform components.
* Matrices are made in the order: `scale * rot * loc`
*/
-void loc_rot_size_to_mat4(float mat[4][4],
+void loc_rot_size_to_mat4(float R[4][4],
const float loc[3],
const float rot[3][3],
const float size[3])
{
- copy_m4_m3(mat, rot);
- rescale_m4(mat, size);
- copy_v3_v3(mat[3], loc);
+ copy_m4_m3(R, rot);
+ rescale_m4(R, size);
+ copy_v3_v3(R[3], loc);
}
/**
@@ -2502,7 +2501,7 @@ void loc_rot_size_to_mat4(float mat[4][4],
*
* TODO: need to have a version that allows for rotation order...
*/
-void loc_eul_size_to_mat4(float mat[4][4],
+void loc_eul_size_to_mat4(float R[4][4],
const float loc[3],
const float eul[3],
const float size[3])
@@ -2510,7 +2509,7 @@ void loc_eul_size_to_mat4(float mat[4][4],
float rmat[3][3], smat[3][3], tmat[3][3];
/* initialize new matrix */
- unit_m4(mat);
+ unit_m4(R);
/* make rotation + scaling part */
eul_to_mat3(rmat, eul);
@@ -2518,19 +2517,19 @@ void loc_eul_size_to_mat4(float mat[4][4],
mul_m3_m3m3(tmat, rmat, smat);
/* copy rot/scale part to output matrix*/
- copy_m4_m3(mat, tmat);
+ copy_m4_m3(R, tmat);
/* copy location to matrix */
- mat[3][0] = loc[0];
- mat[3][1] = loc[1];
- mat[3][2] = loc[2];
+ R[3][0] = loc[0];
+ R[3][1] = loc[1];
+ R[3][2] = loc[2];
}
/**
* Make a 4x4 matrix out of 3 transform components.
* Matrices are made in the order: `scale * rot * loc`
*/
-void loc_eulO_size_to_mat4(float mat[4][4],
+void loc_eulO_size_to_mat4(float R[4][4],
const float loc[3],
const float eul[3],
const float size[3],
@@ -2539,7 +2538,7 @@ void loc_eulO_size_to_mat4(float mat[4][4],
float rmat[3][3], smat[3][3], tmat[3][3];
/* initialize new matrix */
- unit_m4(mat);
+ unit_m4(R);
/* make rotation + scaling part */
eulO_to_mat3(rmat, eul, rotOrder);
@@ -2547,19 +2546,19 @@ void loc_eulO_size_to_mat4(float mat[4][4],
mul_m3_m3m3(tmat, rmat, smat);
/* copy rot/scale part to output matrix*/
- copy_m4_m3(mat, tmat);
+ copy_m4_m3(R, tmat);
/* copy location to matrix */
- mat[3][0] = loc[0];
- mat[3][1] = loc[1];
- mat[3][2] = loc[2];
+ R[3][0] = loc[0];
+ R[3][1] = loc[1];
+ R[3][2] = loc[2];
}
/**
* Make a 4x4 matrix out of 3 transform components.
* Matrices are made in the order: `scale * rot * loc`
*/
-void loc_quat_size_to_mat4(float mat[4][4],
+void loc_quat_size_to_mat4(float R[4][4],
const float loc[3],
const float quat[4],
const float size[3])
@@ -2567,7 +2566,7 @@ void loc_quat_size_to_mat4(float mat[4][4],
float rmat[3][3], smat[3][3], tmat[3][3];
/* initialize new matrix */
- unit_m4(mat);
+ unit_m4(R);
/* make rotation + scaling part */
quat_to_mat3(rmat, quat);
@@ -2575,23 +2574,20 @@ void loc_quat_size_to_mat4(float mat[4][4],
mul_m3_m3m3(tmat, rmat, smat);
/* copy rot/scale part to output matrix*/
- copy_m4_m3(mat, tmat);
+ copy_m4_m3(R, tmat);
/* copy location to matrix */
- mat[3][0] = loc[0];
- mat[3][1] = loc[1];
- mat[3][2] = loc[2];
+ R[3][0] = loc[0];
+ R[3][1] = loc[1];
+ R[3][2] = loc[2];
}
-void loc_axisangle_size_to_mat4(float mat[4][4],
- const float loc[3],
- const float axis[3],
- const float angle,
- const float size[3])
+void loc_axisangle_size_to_mat4(
+ float R[4][4], const float loc[3], const float axis[3], const float angle, const float size[3])
{
float q[4];
axis_angle_to_quat(q, axis, angle);
- loc_quat_size_to_mat4(mat, loc, q, size);
+ loc_quat_size_to_mat4(R, loc, q, size);
}
/*********************************** Other ***********************************/
diff --git a/source/blender/blenlib/intern/math_rotation.c b/source/blender/blenlib/intern/math_rotation.c
index d38c081ec2b..7c4ac934695 100644
--- a/source/blender/blenlib/intern/math_rotation.c
+++ b/source/blender/blenlib/intern/math_rotation.c
@@ -50,12 +50,12 @@ void unit_qt(float q[4])
q[1] = q[2] = q[3] = 0.0f;
}
-void copy_qt_qt(float q1[4], const float q2[4])
+void copy_qt_qt(float q[4], const float a[4])
{
- q1[0] = q2[0];
- q1[1] = q2[1];
- q1[2] = q2[2];
- q1[3] = q2[3];
+ q[0] = a[0];
+ q[1] = a[1];
+ q[2] = a[2];
+ q[3] = a[3];
}
bool is_zero_qt(const float q[4])
@@ -63,14 +63,14 @@ bool is_zero_qt(const float q[4])
return (q[0] == 0 && q[1] == 0 && q[2] == 0 && q[3] == 0);
}
-void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4])
+void mul_qt_qtqt(float q[4], const float a[4], const float b[4])
{
float t0, t1, t2;
- t0 = q1[0] * q2[0] - q1[1] * q2[1] - q1[2] * q2[2] - q1[3] * q2[3];
- t1 = q1[0] * q2[1] + q1[1] * q2[0] + q1[2] * q2[3] - q1[3] * q2[2];
- t2 = q1[0] * q2[2] + q1[2] * q2[0] + q1[3] * q2[1] - q1[1] * q2[3];
- q[3] = q1[0] * q2[3] + q1[3] * q2[0] + q1[1] * q2[2] - q1[2] * q2[1];
+ t0 = a[0] * b[0] - a[1] * b[1] - a[2] * b[2] - a[3] * b[3];
+ t1 = a[0] * b[1] + a[1] * b[0] + a[2] * b[3] - a[3] * b[2];
+ t2 = a[0] * b[2] + a[2] * b[0] + a[3] * b[1] - a[1] * b[3];
+ q[3] = a[0] * b[3] + a[3] * b[0] + a[1] * b[2] - a[2] * b[1];
q[0] = t0;
q[1] = t1;
q[2] = t2;
@@ -95,22 +95,22 @@ void mul_qt_qtqt(float q[4], const float q1[4], const float q2[4])
*
* \note Multiplying by 3x3 matrix is ~25% faster.
*/
-void mul_qt_v3(const float q[4], float v[3])
+void mul_qt_v3(const float q[4], float r[3])
{
float t0, t1, t2;
- t0 = -q[1] * v[0] - q[2] * v[1] - q[3] * v[2];
- t1 = q[0] * v[0] + q[2] * v[2] - q[3] * v[1];
- t2 = q[0] * v[1] + q[3] * v[0] - q[1] * v[2];
- v[2] = q[0] * v[2] + q[1] * v[1] - q[2] * v[0];
- v[0] = t1;
- v[1] = t2;
+ t0 = -q[1] * r[0] - q[2] * r[1] - q[3] * r[2];
+ t1 = q[0] * r[0] + q[2] * r[2] - q[3] * r[1];
+ t2 = q[0] * r[1] + q[3] * r[0] - q[1] * r[2];
+ r[2] = q[0] * r[2] + q[1] * r[1] - q[2] * r[0];
+ r[0] = t1;
+ r[1] = t2;
- t1 = t0 * -q[1] + v[0] * q[0] - v[1] * q[3] + v[2] * q[2];
- t2 = t0 * -q[2] + v[1] * q[0] - v[2] * q[1] + v[0] * q[3];
- v[2] = t0 * -q[3] + v[2] * q[0] - v[0] * q[2] + v[1] * q[1];
- v[0] = t1;
- v[1] = t2;
+ t1 = t0 * -q[1] + r[0] * q[0] - r[1] * q[3] + r[2] * q[2];
+ t2 = t0 * -q[2] + r[1] * q[0] - r[2] * q[1] + r[0] * q[3];
+ r[2] = t0 * -q[3] + r[2] * q[0] - r[0] * q[2] + r[1] * q[1];
+ r[0] = t1;
+ r[1] = t2;
}
void conjugate_qt_qt(float q1[4], const float q2[4])
@@ -128,9 +128,9 @@ void conjugate_qt(float q[4])
q[3] = -q[3];
}
-float dot_qtqt(const float q1[4], const float q2[4])
+float dot_qtqt(const float a[4], const float b[4])
{
- return q1[0] * q2[0] + q1[1] * q2[1] + q1[2] * q2[2] + q1[3] * q2[3];
+ return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];
}
void invert_qt(float q[4])
@@ -177,16 +177,16 @@ void mul_qt_fl(float q[4], const float f)
q[3] *= f;
}
-void sub_qt_qtqt(float q[4], const float q1[4], const float q2[4])
+void sub_qt_qtqt(float q[4], const float a[4], const float b[4])
{
- float nq2[4];
+ float n_b[4];
- nq2[0] = -q2[0];
- nq2[1] = q2[1];
- nq2[2] = q2[2];
- nq2[3] = q2[3];
+ n_b[0] = -b[0];
+ n_b[1] = b[1];
+ n_b[2] = b[2];
+ n_b[3] = b[3];
- mul_qt_qtqt(q, q1, nq2);
+ mul_qt_qtqt(q, a, n_b);
}
/* raise a unit quaternion to the specified power */
@@ -867,38 +867,38 @@ void interp_dot_slerp(const float t, const float cosom, float r_w[2])
}
}
-void interp_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], const float t)
+void interp_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
{
float quat[4], cosom, w[2];
- BLI_ASSERT_UNIT_QUAT(quat1);
- BLI_ASSERT_UNIT_QUAT(quat2);
+ BLI_ASSERT_UNIT_QUAT(a);
+ BLI_ASSERT_UNIT_QUAT(b);
- cosom = dot_qtqt(quat1, quat2);
+ cosom = dot_qtqt(a, b);
/* rotate around shortest angle */
if (cosom < 0.0f) {
cosom = -cosom;
- negate_v4_v4(quat, quat1);
+ negate_v4_v4(quat, a);
}
else {
- copy_qt_qt(quat, quat1);
+ copy_qt_qt(quat, a);
}
interp_dot_slerp(t, cosom, w);
- result[0] = w[0] * quat[0] + w[1] * quat2[0];
- result[1] = w[0] * quat[1] + w[1] * quat2[1];
- result[2] = w[0] * quat[2] + w[1] * quat2[2];
- result[3] = w[0] * quat[3] + w[1] * quat2[3];
+ q[0] = w[0] * quat[0] + w[1] * b[0];
+ q[1] = w[0] * quat[1] + w[1] * b[1];
+ q[2] = w[0] * quat[2] + w[1] * b[2];
+ q[3] = w[0] * quat[3] + w[1] * b[3];
}
-void add_qt_qtqt(float result[4], const float quat1[4], const float quat2[4], const float t)
+void add_qt_qtqt(float q[4], const float a[4], const float b[4], const float t)
{
- result[0] = quat1[0] + t * quat2[0];
- result[1] = quat1[1] + t * quat2[1];
- result[2] = quat1[2] + t * quat2[2];
- result[3] = quat1[3] + t * quat2[3];
+ q[0] = a[0] + t * b[0];
+ q[1] = a[1] + t * b[1];
+ q[2] = a[2] + t * b[2];
+ q[3] = a[3] + t * b[3];
}
/* same as tri_to_quat() but takes pre-computed normal from the triangle
@@ -958,12 +958,12 @@ void tri_to_quat_ex(
/**
* \return the length of the normal, use to test for degenerate triangles.
*/
-float tri_to_quat(float quat[4], const float v1[3], const float v2[3], const float v3[3])
+float tri_to_quat(float q[4], const float a[3], const float b[3], const float c[3])
{
float vec[3];
- const float len = normal_tri_v3(vec, v1, v2, v3);
+ const float len = normal_tri_v3(vec, a, b, c);
- tri_to_quat_ex(quat, v1, v2, v3, vec);
+ tri_to_quat_ex(q, a, b, c, vec);
return len;
}
@@ -974,25 +974,25 @@ void print_qt(const char *str, const float q[4])
/******************************** Axis Angle *********************************/
-void axis_angle_normalized_to_quat(float q[4], const float axis[3], const float angle)
+void axis_angle_normalized_to_quat(float r[4], const float axis[3], const float angle)
{
const float phi = 0.5f * angle;
const float si = sinf(phi);
const float co = cosf(phi);
BLI_ASSERT_UNIT_V3(axis);
- q[0] = co;
- mul_v3_v3fl(q + 1, axis, si);
+ r[0] = co;
+ mul_v3_v3fl(r + 1, axis, si);
}
-void axis_angle_to_quat(float q[4], const float axis[3], const float angle)
+void axis_angle_to_quat(float r[4], const float axis[3], const float angle)
{
float nor[3];
if (LIKELY(normalize_v3_v3(nor, axis) != 0.0f)) {
- axis_angle_normalized_to_quat(q, nor, angle);
+ axis_angle_normalized_to_quat(r, nor, angle);
}
else {
- unit_qt(q);
+ unit_qt(r);
}
}
@@ -1094,33 +1094,33 @@ void axis_angle_normalized_to_mat3_ex(float mat[3][3],
mat[2][2] = n_22 + angle_cos;
}
-void axis_angle_normalized_to_mat3(float mat[3][3], const float axis[3], const float angle)
+void axis_angle_normalized_to_mat3(float R[3][3], const float axis[3], const float angle)
{
- axis_angle_normalized_to_mat3_ex(mat, axis, sinf(angle), cosf(angle));
+ axis_angle_normalized_to_mat3_ex(R, axis, sinf(angle), cosf(angle));
}
/* axis angle to 3x3 matrix - safer version (normalization of axis performed) */
-void axis_angle_to_mat3(float mat[3][3], const float axis[3], const float angle)
+void axis_angle_to_mat3(float R[3][3], const float axis[3], const float angle)
{
float nor[3];
/* normalize the axis first (to remove unwanted scaling) */
if (normalize_v3_v3(nor, axis) == 0.0f) {
- unit_m3(mat);
+ unit_m3(R);
return;
}
- axis_angle_normalized_to_mat3(mat, nor, angle);
+ axis_angle_normalized_to_mat3(R, nor, angle);
}
/* axis angle to 4x4 matrix - safer version (normalization of axis performed) */
-void axis_angle_to_mat4(float mat[4][4], const float axis[3], const float angle)
+void axis_angle_to_mat4(float R[4][4], const float axis[3], const float angle)
{
float tmat[3][3];
axis_angle_to_mat3(tmat, axis, angle);
- unit_m4(mat);
- copy_m4_m3(mat, tmat);
+ unit_m4(R);
+ copy_m4_m3(R, tmat);
}
/* 3x3 matrix to axis angle */
@@ -1165,52 +1165,52 @@ void mat4_to_axis_angle(float axis[3], float *angle, const float mat[4][4])
quat_to_axis_angle(axis, angle, q);
}
-void axis_angle_to_mat4_single(float mat[4][4], const char axis, const float angle)
+void axis_angle_to_mat4_single(float R[4][4], const char axis, const float angle)
{
float mat3[3][3];
axis_angle_to_mat3_single(mat3, axis, angle);
- copy_m4_m3(mat, mat3);
+ copy_m4_m3(R, mat3);
}
/* rotation matrix from a single axis */
-void axis_angle_to_mat3_single(float mat[3][3], const char axis, const float angle)
+void axis_angle_to_mat3_single(float R[3][3], const char axis, const float angle)
{
const float angle_cos = cosf(angle);
const float angle_sin = sinf(angle);
switch (axis) {
case 'X': /* rotation around X */
- mat[0][0] = 1.0f;
- mat[0][1] = 0.0f;
- mat[0][2] = 0.0f;
- mat[1][0] = 0.0f;
- mat[1][1] = angle_cos;
- mat[1][2] = angle_sin;
- mat[2][0] = 0.0f;
- mat[2][1] = -angle_sin;
- mat[2][2] = angle_cos;
+ R[0][0] = 1.0f;
+ R[0][1] = 0.0f;
+ R[0][2] = 0.0f;
+ R[1][0] = 0.0f;
+ R[1][1] = angle_cos;
+ R[1][2] = angle_sin;
+ R[2][0] = 0.0f;
+ R[2][1] = -angle_sin;
+ R[2][2] = angle_cos;
break;
case 'Y': /* rotation around Y */
- mat[0][0] = angle_cos;
- mat[0][1] = 0.0f;
- mat[0][2] = -angle_sin;
- mat[1][0] = 0.0f;
- mat[1][1] = 1.0f;
- mat[1][2] = 0.0f;
- mat[2][0] = angle_sin;
- mat[2][1] = 0.0f;
- mat[2][2] = angle_cos;
+ R[0][0] = angle_cos;
+ R[0][1] = 0.0f;
+ R[0][2] = -angle_sin;
+ R[1][0] = 0.0f;
+ R[1][1] = 1.0f;
+ R[1][2] = 0.0f;
+ R[2][0] = angle_sin;
+ R[2][1] = 0.0f;
+ R[2][2] = angle_cos;
break;
case 'Z': /* rotation around Z */
- mat[0][0] = angle_cos;
- mat[0][1] = angle_sin;
- mat[0][2] = 0.0f;
- mat[1][0] = -angle_sin;
- mat[1][1] = angle_cos;
- mat[1][2] = 0.0f;
- mat[2][0] = 0.0f;
- mat[2][1] = 0.0f;
- mat[2][2] = 1.0f;
+ R[0][0] = angle_cos;
+ R[0][1] = angle_sin;
+ R[0][2] = 0.0f;
+ R[1][0] = -angle_sin;
+ R[1][1] = angle_cos;
+ R[1][2] = 0.0f;
+ R[2][0] = 0.0f;
+ R[2][1] = 0.0f;
+ R[2][2] = 1.0f;
break;
default:
BLI_assert(0);
@@ -1218,16 +1218,16 @@ void axis_angle_to_mat3_single(float mat[3][3], const char axis, const float ang
}
}
-void angle_to_mat2(float mat[2][2], const float angle)
+void angle_to_mat2(float R[2][2], const float angle)
{
const float angle_cos = cosf(angle);
const float angle_sin = sinf(angle);
/* 2D rotation matrix */
- mat[0][0] = angle_cos;
- mat[0][1] = angle_sin;
- mat[1][0] = -angle_sin;
- mat[1][1] = angle_cos;
+ R[0][0] = angle_cos;
+ R[0][1] = angle_sin;
+ R[1][0] = -angle_sin;
+ R[1][1] = angle_cos;
}
void axis_angle_to_quat_single(float q[4], const char axis, const float angle)
@@ -1989,7 +1989,7 @@ void mat4_to_dquat(DualQuat *dq, const float basemat[4][4], const float mat[4][4
dq->trans[3] = 0.5f * (t[0] * q[2] - t[1] * q[1] + t[2] * q[0]);
}
-void dquat_to_mat4(float mat[4][4], const DualQuat *dq)
+void dquat_to_mat4(float R[4][4], const DualQuat *dq)
{
float len, q0[4];
const float *t;
@@ -2005,40 +2005,40 @@ void dquat_to_mat4(float mat[4][4], const DualQuat *dq)
mul_qt_fl(q0, len);
/* rotation */
- quat_to_mat4(mat, q0);
+ quat_to_mat4(R, q0);
/* translation */
t = dq->trans;
- mat[3][0] = 2.0f * (-t[0] * q0[1] + t[1] * q0[0] - t[2] * q0[3] + t[3] * q0[2]) * len;
- mat[3][1] = 2.0f * (-t[0] * q0[2] + t[1] * q0[3] + t[2] * q0[0] - t[3] * q0[1]) * len;
- mat[3][2] = 2.0f * (-t[0] * q0[3] - t[1] * q0[2] + t[2] * q0[1] + t[3] * q0[0]) * len;
+ R[3][0] = 2.0f * (-t[0] * q0[1] + t[1] * q0[0] - t[2] * q0[3] + t[3] * q0[2]) * len;
+ R[3][1] = 2.0f * (-t[0] * q0[2] + t[1] * q0[3] + t[2] * q0[0] - t[3] * q0[1]) * len;
+ R[3][2] = 2.0f * (-t[0] * q0[3] - t[1] * q0[2] + t[2] * q0[1] + t[3] * q0[0]) * len;
/* scaling */
if (dq->scale_weight) {
- mul_m4_m4m4(mat, mat, dq->scale);
+ mul_m4_m4m4(R, R, dq->scale);
}
}
-void add_weighted_dq_dq(DualQuat *dqsum, const DualQuat *dq, float weight)
+void add_weighted_dq_dq(DualQuat *dq_sum, const DualQuat *dq, float weight)
{
bool flipped = false;
/* make sure we interpolate quats in the right direction */
- if (dot_qtqt(dq->quat, dqsum->quat) < 0) {
+ if (dot_qtqt(dq->quat, dq_sum->quat) < 0) {
flipped = true;
weight = -weight;
}
/* interpolate rotation and translation */
- dqsum->quat[0] += weight * dq->quat[0];
- dqsum->quat[1] += weight * dq->quat[1];
- dqsum->quat[2] += weight * dq->quat[2];
- dqsum->quat[3] += weight * dq->quat[3];
+ dq_sum->quat[0] += weight * dq->quat[0];
+ dq_sum->quat[1] += weight * dq->quat[1];
+ dq_sum->quat[2] += weight * dq->quat[2];
+ dq_sum->quat[3] += weight * dq->quat[3];
- dqsum->trans[0] += weight * dq->trans[0];
- dqsum->trans[1] += weight * dq->trans[1];
- dqsum->trans[2] += weight * dq->trans[2];
- dqsum->trans[3] += weight * dq->trans[3];
+ dq_sum->trans[0] += weight * dq->trans[0];
+ dq_sum->trans[1] += weight * dq->trans[1];
+ dq_sum->trans[2] += weight * dq->trans[2];
+ dq_sum->trans[3] += weight * dq->trans[3];
/* Interpolate scale - but only if there is scale present. If any dual
* quaternions without scale are added, they will be compensated for in
@@ -2053,8 +2053,8 @@ void add_weighted_dq_dq(DualQuat *dqsum, const DualQuat *dq, float weight)
copy_m4_m4(wmat, (float(*)[4])dq->scale);
mul_m4_fl(wmat, weight);
- add_m4_m4m4(dqsum->scale, dqsum->scale, wmat);
- dqsum->scale_weight += weight;
+ add_m4_m4m4(dq_sum->scale, dq_sum->scale, wmat);
+ dq_sum->scale_weight += weight;
}
}
@@ -2083,7 +2083,7 @@ void normalize_dq(DualQuat *dq, float totweight)
}
}
-void mul_v3m3_dq(float co[3], float mat[3][3], DualQuat *dq)
+void mul_v3m3_dq(float r[3], float R[3][3], DualQuat *dq)
{
float M[3][3], t[3], scalemat[3][3], len2;
float w = dq->quat[0], x = dq->quat[1], y = dq->quat[2], z = dq->quat[3];
@@ -2114,31 +2114,31 @@ void mul_v3m3_dq(float co[3], float mat[3][3], DualQuat *dq)
/* apply scaling */
if (dq->scale_weight) {
- mul_m4_v3(dq->scale, co);
+ mul_m4_v3(dq->scale, r);
}
/* apply rotation and translation */
- mul_m3_v3(M, co);
- co[0] = (co[0] + t[0]) * len2;
- co[1] = (co[1] + t[1]) * len2;
- co[2] = (co[2] + t[2]) * len2;
+ mul_m3_v3(M, r);
+ r[0] = (r[0] + t[0]) * len2;
+ r[1] = (r[1] + t[1]) * len2;
+ r[2] = (r[2] + t[2]) * len2;
/* Compute crazy-space correction matrix. */
- if (mat) {
+ if (R) {
if (dq->scale_weight) {
copy_m3_m4(scalemat, dq->scale);
- mul_m3_m3m3(mat, M, scalemat);
+ mul_m3_m3m3(R, M, scalemat);
}
else {
- copy_m3_m3(mat, M);
+ copy_m3_m3(R, M);
}
- mul_m3_fl(mat, len2);
+ mul_m3_fl(R, len2);
}
}
-void copy_dq_dq(DualQuat *dq1, const DualQuat *dq2)
+void copy_dq_dq(DualQuat *r, const DualQuat *dq)
{
- memcpy(dq1, dq2, sizeof(DualQuat));
+ memcpy(r, dq, sizeof(DualQuat));
}
/* axis matches eTrackToAxis_Modes */
diff --git a/source/blender/blenlib/intern/math_vector.c b/source/blender/blenlib/intern/math_vector.c
index dc6e213d0b5..4d7efa4b6f4 100644
--- a/source/blender/blenlib/intern/math_vector.c
+++ b/source/blender/blenlib/intern/math_vector.c
@@ -30,40 +30,40 @@
//******************************* Interpolation *******************************/
-void interp_v2_v2v2(float target[2], const float a[2], const float b[2], const float t)
+void interp_v2_v2v2(float r[2], const float a[2], const float b[2], const float t)
{
const float s = 1.0f - t;
- target[0] = s * a[0] + t * b[0];
- target[1] = s * a[1] + t * b[1];
+ r[0] = s * a[0] + t * b[0];
+ r[1] = s * a[1] + t * b[1];
}
/* weight 3 2D vectors,
* 'w' must be unit length but is not a vector, just 3 weights */
void interp_v2_v2v2v2(
- float p[2], const float v1[2], const float v2[2], const float v3[2], const float w[3])
+ float r[2], const float a[2], const float b[2], const float c[2], const float t[3])
{
- p[0] = v1[0] * w[0] + v2[0] * w[1] + v3[0] * w[2];
- p[1] = v1[1] * w[0] + v2[1] * w[1] + v3[1] * w[2];
+ r[0] = a[0] * t[0] + b[0] * t[1] + c[0] * t[2];
+ r[1] = a[1] * t[0] + b[1] * t[1] + c[1] * t[2];
}
-void interp_v3_v3v3(float target[3], const float a[3], const float b[3], const float t)
+void interp_v3_v3v3(float r[3], const float a[3], const float b[3], const float t)
{
const float s = 1.0f - t;
- target[0] = s * a[0] + t * b[0];
- target[1] = s * a[1] + t * b[1];
- target[2] = s * a[2] + t * b[2];
+ r[0] = s * a[0] + t * b[0];
+ r[1] = s * a[1] + t * b[1];
+ r[2] = s * a[2] + t * b[2];
}
-void interp_v4_v4v4(float target[4], const float a[4], const float b[4], const float t)
+void interp_v4_v4v4(float r[4], const float a[4], const float b[4], const float t)
{
const float s = 1.0f - t;
- target[0] = s * a[0] + t * b[0];
- target[1] = s * a[1] + t * b[1];
- target[2] = s * a[2] + t * b[2];
- target[3] = s * a[3] + t * b[3];
+ r[0] = s * a[0] + t * b[0];
+ r[1] = s * a[1] + t * b[1];
+ r[2] = s * a[2] + t * b[2];
+ r[3] = s * a[3] + t * b[3];
}
/**
@@ -267,17 +267,17 @@ void interp_v4_v4v4_char(char target[4], const char a[4], const char b[4], const
interp_v4_v4v4_uchar((uchar *)target, (const uchar *)a, (const uchar *)b, t);
}
-void mid_v3_v3v3(float v[3], const float v1[3], const float v2[3])
+void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
{
- v[0] = 0.5f * (v1[0] + v2[0]);
- v[1] = 0.5f * (v1[1] + v2[1]);
- v[2] = 0.5f * (v1[2] + v2[2]);
+ r[0] = 0.5f * (a[0] + b[0]);
+ r[1] = 0.5f * (a[1] + b[1]);
+ r[2] = 0.5f * (a[2] + b[2]);
}
-void mid_v2_v2v2(float v[2], const float v1[2], const float v2[2])
+void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
{
- v[0] = 0.5f * (v1[0] + v2[0]);
- v[1] = 0.5f * (v1[1] + v2[1]);
+ r[0] = 0.5f * (a[0] + b[0]);
+ r[1] = 0.5f * (a[1] + b[1]);
}
void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float v3[3])
@@ -408,12 +408,12 @@ bool is_finite_v4(const float v[4])
* note that when v1/v2/v3 represent 3 points along a straight line
* that the angle returned will be pi (180deg), rather then 0.0
*/
-float angle_v3v3v3(const float v1[3], const float v2[3], const float v3[3])
+float angle_v3v3v3(const float a[3], const float b[3], const float c[3])
{
float vec1[3], vec2[3];
- sub_v3_v3v3(vec1, v2, v1);
- sub_v3_v3v3(vec2, v2, v3);
+ sub_v3_v3v3(vec1, b, a);
+ sub_v3_v3v3(vec2, b, c);
normalize_v3(vec1);
normalize_v3(vec2);
@@ -434,25 +434,25 @@ float cos_v3v3v3(const float p1[3], const float p2[3], const float p3[3])
}
/* Return the shortest angle in radians between the 2 vectors */
-float angle_v3v3(const float v1[3], const float v2[3])
+float angle_v3v3(const float a[3], const float b[3])
{
float vec1[3], vec2[3];
- normalize_v3_v3(vec1, v1);
- normalize_v3_v3(vec2, v2);
+ normalize_v3_v3(vec1, a);
+ normalize_v3_v3(vec2, b);
return angle_normalized_v3v3(vec1, vec2);
}
-float angle_v2v2v2(const float v1[2], const float v2[2], const float v3[2])
+float angle_v2v2v2(const float a[2], const float b[2], const float c[2])
{
float vec1[2], vec2[2];
- vec1[0] = v2[0] - v1[0];
- vec1[1] = v2[1] - v1[1];
+ vec1[0] = b[0] - a[0];
+ vec1[1] = b[1] - a[1];
- vec2[0] = v2[0] - v3[0];
- vec2[1] = v2[1] - v3[1];
+ vec2[0] = b[0] - c[0];
+ vec2[1] = b[1] - c[1];
normalize_v2(vec1);
normalize_v2(vec2);
@@ -474,15 +474,15 @@ float cos_v2v2v2(const float p1[2], const float p2[2], const float p3[2])
}
/* Return the shortest angle in radians between the 2 vectors */
-float angle_v2v2(const float v1[2], const float v2[2])
+float angle_v2v2(const float a[2], const float b[2])
{
float vec1[2], vec2[2];
- vec1[0] = v1[0];
- vec1[1] = v1[1];
+ vec1[0] = a[0];
+ vec1[1] = a[1];
- vec2[0] = v2[0];
- vec2[1] = v2[1];
+ vec2[0] = b[0];
+ vec2[1] = b[1];
normalize_v2(vec1);
normalize_v2(vec2);
@@ -512,20 +512,20 @@ float angle_normalized_v3v3(const float v1[3], const float v2[3])
return (float)M_PI - 2.0f * saasin(len_v3v3(v1, v2_n) / 2.0f);
}
-float angle_normalized_v2v2(const float v1[2], const float v2[2])
+float angle_normalized_v2v2(const float a[2], const float b[2])
{
/* double check they are normalized */
- BLI_ASSERT_UNIT_V2(v1);
- BLI_ASSERT_UNIT_V2(v2);
+ BLI_ASSERT_UNIT_V2(a);
+ BLI_ASSERT_UNIT_V2(b);
/* this is the same as acos(dot_v3v3(v1, v2)), but more accurate */
- if (dot_v2v2(v1, v2) >= 0.0f) {
- return 2.0f * saasin(len_v2v2(v1, v2) / 2.0f);
+ if (dot_v2v2(a, b) >= 0.0f) {
+ return 2.0f * saasin(len_v2v2(a, b) / 2.0f);
}
float v2_n[2];
- negate_v2_v2(v2_n, v2);
- return (float)M_PI - 2.0f * saasin(len_v2v2(v1, v2_n) / 2.0f);
+ negate_v2_v2(v2_n, b);
+ return (float)M_PI - 2.0f * saasin(len_v2v2(a, v2_n) / 2.0f);
}
/**
@@ -766,16 +766,16 @@ void project_v3_plane(float out[3], const float plane_no[3], const float plane_c
sub_v3_v3(out, vector);
}
-/* Returns a vector bisecting the angle at v2 formed by v1, v2 and v3 */
-void bisect_v3_v3v3v3(float out[3], const float v1[3], const float v2[3], const float v3[3])
+/* Returns a vector bisecting the angle at b formed by a, b and c */
+void bisect_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3])
{
float d_12[3], d_23[3];
- sub_v3_v3v3(d_12, v2, v1);
- sub_v3_v3v3(d_23, v3, v2);
+ sub_v3_v3v3(d_12, b, a);
+ sub_v3_v3v3(d_23, c, b);
normalize_v3(d_12);
normalize_v3(d_23);
- add_v3_v3v3(out, d_12, d_23);
- normalize_v3(out);
+ add_v3_v3v3(r, d_12, d_23);
+ normalize_v3(r);
}
/**
diff --git a/source/blender/blenlib/intern/memory_utils.c b/source/blender/blenlib/intern/memory_utils.c
index 91e75861dde..d477c20a242 100644
--- a/source/blender/blenlib/intern/memory_utils.c
+++ b/source/blender/blenlib/intern/memory_utils.c
@@ -31,16 +31,16 @@
#include "BLI_strict_flags.h"
/**
- * Check if memory is zero'd, as with memset(s, 0, nbytes)
+ * Check if memory is zero'd, as with memset(arr, 0, arr_size)
*/
-bool BLI_memory_is_zero(const void *s, const size_t nbytes)
+bool BLI_memory_is_zero(const void *arr, const size_t arr_size)
{
- const char *s_byte = s;
- const char *s_end = (const char *)s + nbytes;
+ const char *arr_byte = arr;
+ const char *arr_end = (const char *)arr + arr_size;
- while ((s_byte != s_end) && (*s_byte == 0)) {
- s_byte++;
+ while ((arr_byte != arr_end) && (*arr_byte == 0)) {
+ arr_byte++;
}
- return (s_byte == s_end);
+ return (arr_byte == arr_end);
}
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index ab2b0fd2928..4a2915ef24e 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -222,12 +222,12 @@ void BLI_smallhash_release(SmallHash *sh)
}
}
-void BLI_smallhash_insert(SmallHash *sh, uintptr_t key, void *val)
+void BLI_smallhash_insert(SmallHash *sh, uintptr_t key, void *item)
{
SmallHashEntry *e;
BLI_assert(key != SMHASH_KEY_UNUSED);
- BLI_assert(smallhash_val_is_used(val));
+ BLI_assert(smallhash_val_is_used(item));
BLI_assert(BLI_smallhash_haskey(sh, key) == false);
if (UNLIKELY(smallhash_test_expand_buckets(++sh->nentries, sh->nbuckets))) {
@@ -236,7 +236,7 @@ void BLI_smallhash_insert(SmallHash *sh, uintptr_t key, void *val)
e = smallhash_lookup_first_free(sh, key);
e->key = key;
- e->val = val;
+ e->val = item;
}
/**
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index db062ff50fd..a841068bfdb 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -341,11 +341,11 @@ bool BLI_file_alias_target(
* Returns the st_mode from stat-ing the specified path name, or 0 if stat fails
* (most likely doesn't exist or no access).
*/
-int BLI_exists(const char *name)
+int BLI_exists(const char *path)
{
#if defined(WIN32)
BLI_stat_t st;
- wchar_t *tmp_16 = alloc_utf16_from_8(name, 1);
+ wchar_t *tmp_16 = alloc_utf16_from_8(path, 1);
int len, res;
len = wcslen(tmp_16);
@@ -375,9 +375,9 @@ int BLI_exists(const char *name)
}
#else
struct stat st;
- BLI_assert(!BLI_path_is_rel(name));
- if (stat(name, &st)) {
- return 0;
+ BLI_assert(!BLI_path_is_rel(path));
+ if (stat(path, &st)) {
+ return (0);
}
#endif
return (st.st_mode);
@@ -582,9 +582,9 @@ void *BLI_file_read_text_as_mem_with_newline_as_nil(const char *filepath,
/**
* Reads the contents of a text file and returns the lines in a linked list.
*/
-LinkNode *BLI_file_read_as_lines(const char *name)
+LinkNode *BLI_file_read_as_lines(const char *filepath)
{
- FILE *fp = BLI_fopen(name, "r");
+ FILE *fp = BLI_fopen(filepath, "r");
LinkNodePair lines = {NULL, NULL};
char *buf;
size_t size;
diff --git a/source/blender/blenlib/tests/BLI_edgehash_test.cc b/source/blender/blenlib/tests/BLI_edgehash_test.cc
index 7106033df36..f9f0f99daa8 100644
--- a/source/blender/blenlib/tests/BLI_edgehash_test.cc
+++ b/source/blender/blenlib/tests/BLI_edgehash_test.cc
@@ -242,11 +242,11 @@ TEST(edgehash, IteratorFindsAllValues)
BLI_edgehash_insert(eh, 1, 4, VALUE_3);
EdgeHashIterator *ehi = BLI_edgehashIterator_new(eh);
- auto a = BLI_edgehashIterator_getValue(ehi);
+ auto *a = BLI_edgehashIterator_getValue(ehi);
BLI_edgehashIterator_step(ehi);
- auto b = BLI_edgehashIterator_getValue(ehi);
+ auto *b = BLI_edgehashIterator_getValue(ehi);
BLI_edgehashIterator_step(ehi);
- auto c = BLI_edgehashIterator_getValue(ehi);
+ auto *c = BLI_edgehashIterator_getValue(ehi);
BLI_edgehashIterator_step(ehi);
ASSERT_NE(a, b);
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index a5fd3e31c31..12f0fd5ac62 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -608,21 +608,21 @@ class StringCasecmpNatural : public testing::Test {
void testReturnsZeroForAll(const CompareWordsArray &items)
{
- for (auto &item : items) {
+ for (const auto &item : items) {
int res = BLI_strcasecmp_natural(item[0], item[1]);
EXPECT_EQ(res, 0);
}
}
void testReturnsLessThanZeroForAll(const CompareWordsArray &items)
{
- for (auto &item : items) {
+ for (const auto &item : items) {
int res = BLI_strcasecmp_natural(item[0], item[1]);
EXPECT_LT(res, 0);
}
}
void testReturnsMoreThanZeroForAll(const CompareWordsArray &items)
{
- for (auto &item : items) {
+ for (const auto &item : items) {
int res = BLI_strcasecmp_natural(item[0], item[1]);
EXPECT_GT(res, 0);
}
@@ -635,7 +635,7 @@ class StringCasecmpNatural : public testing::Test {
/* E.g. {{"a", "b"}, {"ab", "cd"}} becomes {{"b", "a"}, {"cd", "ab"}} */
ret_array.reserve(items.size());
- for (auto &item : items) {
+ for (const auto &item : items) {
ret_array.push_back({item[1], item[0]});
}
diff --git a/source/blender/blenloader/BLO_read_write.h b/source/blender/blenloader/BLO_read_write.h
index c2f3615725e..e05c1046b95 100644
--- a/source/blender/blenloader/BLO_read_write.h
+++ b/source/blender/blenloader/BLO_read_write.h
@@ -149,7 +149,7 @@ void BLO_write_uint32_array(BlendWriter *writer, int size, const uint32_t *data_
void BLO_write_float_array(BlendWriter *writer, int size, const float *data_ptr);
void BLO_write_float3_array(BlendWriter *writer, int size, const float *data_ptr);
void BLO_write_pointer_array(BlendWriter *writer, int size, const void *data_ptr);
-void BLO_write_string(BlendWriter *writer, const char *data_ptr);
+void BLO_write_string(BlendWriter *writer, const char *str);
/* Misc. */
bool BLO_write_is_undo(BlendWriter *writer);
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index 580c833d8dc..c9e837eb3b5 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -172,7 +172,7 @@ void blo_lib_link_restore(struct Main *oldmain,
struct Main *newmain,
struct wmWindowManager *curwm,
struct Scene *curscene,
- struct ViewLayer *cur_render_layer);
+ struct ViewLayer *cur_view_layer);
typedef void (*BLOExpandDoitCallback)(void *fdhandle, struct Main *mainvar, void *idv);
@@ -180,11 +180,11 @@ void BLO_main_expander(BLOExpandDoitCallback expand_doit_func);
void BLO_expand_main(void *fdhandle, struct Main *mainvar);
/* Update defaults in startup.blend & userprefs.blend, without having to save and embed it */
-void BLO_update_defaults_startup_blend(struct Main *mainvar, const char *app_template);
+void BLO_update_defaults_startup_blend(struct Main *bmain, const char *app_template);
void BLO_update_defaults_workspace(struct WorkSpace *workspace, const char *app_template);
/* Version patch user preferences. */
-void BLO_version_defaults_userpref_blend(struct Main *mainvar, struct UserDef *userdef);
+void BLO_version_defaults_userpref_blend(struct Main *bmain, struct UserDef *userdef);
/* Disable unwanted experimental feature settings on startup. */
void BLO_sanitize_experimental_features_userpref_blend(struct UserDef *userdef);
diff --git a/source/blender/blenloader/intern/readfile.h b/source/blender/blenloader/intern/readfile.h
index 34a670a8357..e63b0c1909b 100644
--- a/source/blender/blenloader/intern/readfile.h
+++ b/source/blender/blenloader/intern/readfile.h
@@ -142,7 +142,7 @@ void blo_split_main(ListBase *mainlist, struct Main *main);
BlendFileData *blo_read_file_internal(FileData *fd, const char *filepath);
FileData *blo_filedata_from_file(const char *filepath, struct ReportList *reports);
-FileData *blo_filedata_from_memory(const void *buffer, int buffersize, struct ReportList *reports);
+FileData *blo_filedata_from_memory(const void *mem, int memsize, struct ReportList *reports);
FileData *blo_filedata_from_memfile(struct MemFile *memfile,
const struct BlendFileReadParams *params,
struct ReportList *reports);
diff --git a/source/blender/blenloader/intern/undofile.c b/source/blender/blenloader/intern/undofile.c
index 62ffbcc874b..8ee539014f0 100644
--- a/source/blender/blenloader/intern/undofile.c
+++ b/source/blender/blenloader/intern/undofile.c
@@ -193,12 +193,12 @@ void BLO_memfile_chunk_add(MemFileWriteData *mem_data, const char *buf, uint siz
}
struct Main *BLO_memfile_main_get(struct MemFile *memfile,
- struct Main *oldmain,
+ struct Main *bmain,
struct Scene **r_scene)
{
struct Main *bmain_undo = NULL;
- BlendFileData *bfd = BLO_read_from_memfile(oldmain,
- BKE_main_blendfile_path(oldmain),
+ BlendFileData *bfd = BLO_read_from_memfile(bmain,
+ BKE_main_blendfile_path(bmain),
memfile,
&(const struct BlendFileReadParams){0},
NULL);
diff --git a/source/blender/bmesh/intern/bmesh_construct.c b/source/blender/bmesh/intern/bmesh_construct.c
index 0d79d60e5c1..81494b03558 100644
--- a/source/blender/bmesh/intern/bmesh_construct.c
+++ b/source/blender/bmesh/intern/bmesh_construct.c
@@ -725,45 +725,45 @@ BMesh *BM_mesh_copy(BMesh *bm_old)
}
/* ME -> BM */
-char BM_vert_flag_from_mflag(const char meflag)
+char BM_vert_flag_from_mflag(const char mflag)
{
- return (((meflag & SELECT) ? BM_ELEM_SELECT : 0) | ((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
+ return (((mflag & SELECT) ? BM_ELEM_SELECT : 0) | ((mflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
}
-char BM_edge_flag_from_mflag(const short meflag)
+char BM_edge_flag_from_mflag(const short mflag)
{
- return (((meflag & SELECT) ? BM_ELEM_SELECT : 0) | ((meflag & ME_SEAM) ? BM_ELEM_SEAM : 0) |
- ((meflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0) |
- ((meflag & ME_SHARP) == 0 ? BM_ELEM_SMOOTH : 0) | /* invert */
- ((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
+ return (((mflag & SELECT) ? BM_ELEM_SELECT : 0) | ((mflag & ME_SEAM) ? BM_ELEM_SEAM : 0) |
+ ((mflag & ME_EDGEDRAW) ? BM_ELEM_DRAW : 0) |
+ ((mflag & ME_SHARP) == 0 ? BM_ELEM_SMOOTH : 0) | /* invert */
+ ((mflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
}
-char BM_face_flag_from_mflag(const char meflag)
+char BM_face_flag_from_mflag(const char mflag)
{
- return (((meflag & ME_FACE_SEL) ? BM_ELEM_SELECT : 0) |
- ((meflag & ME_SMOOTH) ? BM_ELEM_SMOOTH : 0) | ((meflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
+ return (((mflag & ME_FACE_SEL) ? BM_ELEM_SELECT : 0) |
+ ((mflag & ME_SMOOTH) ? BM_ELEM_SMOOTH : 0) | ((mflag & ME_HIDE) ? BM_ELEM_HIDDEN : 0));
}
/* BM -> ME */
-char BM_vert_flag_to_mflag(BMVert *eve)
+char BM_vert_flag_to_mflag(BMVert *v)
{
- const char hflag = eve->head.hflag;
+ const char hflag = v->head.hflag;
return (((hflag & BM_ELEM_SELECT) ? SELECT : 0) | ((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0));
}
-short BM_edge_flag_to_mflag(BMEdge *eed)
+short BM_edge_flag_to_mflag(BMEdge *e)
{
- const char hflag = eed->head.hflag;
+ const char hflag = e->head.hflag;
return (((hflag & BM_ELEM_SELECT) ? SELECT : 0) | ((hflag & BM_ELEM_SEAM) ? ME_SEAM : 0) |
((hflag & BM_ELEM_DRAW) ? ME_EDGEDRAW : 0) |
((hflag & BM_ELEM_SMOOTH) == 0 ? ME_SHARP : 0) |
((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0) |
- ((BM_edge_is_wire(eed)) ? ME_LOOSEEDGE : 0) | /* not typical */
+ ((BM_edge_is_wire(e)) ? ME_LOOSEEDGE : 0) | /* not typical */
ME_EDGERENDER);
}
-char BM_face_flag_to_mflag(BMFace *efa)
+char BM_face_flag_to_mflag(BMFace *f)
{
- const char hflag = efa->head.hflag;
+ const char hflag = f->head.hflag;
return (((hflag & BM_ELEM_SELECT) ? ME_FACE_SEL : 0) |
((hflag & BM_ELEM_SMOOTH) ? ME_SMOOTH : 0) | ((hflag & BM_ELEM_HIDDEN) ? ME_HIDE : 0));
diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c
index 6c4f98e125f..32ca90f5c13 100644
--- a/source/blender/bmesh/intern/bmesh_core.c
+++ b/source/blender/bmesh/intern/bmesh_core.c
@@ -1804,7 +1804,7 @@ BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
const bool do_del,
- const bool check_edge_double,
+ const bool check_edge_exists,
const bool kill_degenerate_faces)
{
BMEdge *e_old;
@@ -1846,7 +1846,7 @@ BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
valence2 = bmesh_disk_count(v_target);
#endif
- if (check_edge_double) {
+ if (check_edge_exists) {
e_splice = BM_edge_exists(v_target, v_old);
}
@@ -1926,7 +1926,7 @@ BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
BM_CHECK_ELEMENT(l->f);
}
#endif
- if (check_edge_double) {
+ if (check_edge_exists) {
if (e_splice) {
/* removes e_splice */
BM_edge_splice(bm, e_old, e_splice);
@@ -1971,7 +1971,7 @@ BMVert *bmesh_kernel_join_vert_kill_edge(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
const bool do_del,
- const bool check_edge_double,
+ const bool check_edge_exists,
const bool kill_degenerate_faces)
{
BLI_SMALLSTACK_DECLARE(faces_degenerate, BMFace *);
@@ -2020,14 +2020,14 @@ BMVert *bmesh_kernel_join_vert_kill_edge(BMesh *bm,
while ((e = v_kill->e)) {
BMEdge *e_target;
- if (check_edge_double) {
+ if (check_edge_exists) {
e_target = BM_edge_exists(v_target, BM_edge_other_vert(e, v_kill));
}
bmesh_edge_vert_swap(e, v_target, v_kill);
BLI_assert(e->v1 != e->v2);
- if (check_edge_double) {
+ if (check_edge_exists) {
if (e_target) {
BM_edge_splice(bm, e_target, e);
}
diff --git a/source/blender/bmesh/intern/bmesh_core.h b/source/blender/bmesh/intern/bmesh_core.h
index 0e19437a527..df73984e6cf 100644
--- a/source/blender/bmesh/intern/bmesh_core.h
+++ b/source/blender/bmesh/intern/bmesh_core.h
@@ -46,7 +46,7 @@ BMFace *BM_face_create(BMesh *bm,
const BMFace *f_example,
const eBMCreateFlag create_flag);
BMFace *BM_face_create_verts(BMesh *bm,
- BMVert **verts,
+ BMVert **vert_arr,
const int len,
const BMFace *f_example,
const eBMCreateFlag create_flag,
@@ -100,8 +100,8 @@ void bmesh_kernel_edge_separate(BMesh *bm, BMEdge *e, BMLoop *l_sep, const bool
BMFace *bmesh_kernel_split_face_make_edge(BMesh *bm,
BMFace *f,
- BMLoop *l1,
- BMLoop *l2,
+ BMLoop *l_v1,
+ BMLoop *l_v2,
BMLoop **r_l,
#ifdef USE_BMESH_HOLES
ListBase *holes,
@@ -114,13 +114,13 @@ BMEdge *bmesh_kernel_join_edge_kill_vert(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
const bool do_del,
- const bool check_edge_splice,
+ const bool check_edge_exists,
const bool kill_degenerate_faces);
BMVert *bmesh_kernel_join_vert_kill_edge(BMesh *bm,
BMEdge *e_kill,
BMVert *v_kill,
const bool do_del,
- const bool check_edge_double,
+ const bool check_edge_exists,
const bool kill_degenerate_faces);
BMFace *bmesh_kernel_join_face_kill_edge(BMesh *bm, BMFace *f1, BMFace *f2, BMEdge *e);
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.h b/source/blender/bmesh/intern/bmesh_edgeloop.h
index 2e5c4d0193e..ac24389d455 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.h
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.h
@@ -29,7 +29,7 @@ struct ListBase;
/* multiple edgeloops (ListBase) */
int BM_mesh_edgeloops_find(BMesh *bm,
- struct ListBase *r_lb,
+ struct ListBase *r_eloops,
bool (*test_fn)(BMEdge *, void *user_data),
void *user_data);
bool BM_mesh_edgeloops_find_path(BMesh *bm,
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index 5b8fe1f492e..61df8cf0c25 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -733,9 +733,9 @@ void BM_elem_select_set(BMesh *bm, BMElem *ele, const bool select)
}
/* this replaces the active flag used in uv/face mode */
-void BM_mesh_active_face_set(BMesh *bm, BMFace *efa)
+void BM_mesh_active_face_set(BMesh *bm, BMFace *f)
{
- bm->act_face = efa;
+ bm->act_face = f;
}
BMFace *BM_mesh_active_face_get(BMesh *bm, const bool is_sloppy, const bool is_selected)
diff --git a/source/blender/bmesh/intern/bmesh_marking.h b/source/blender/bmesh/intern/bmesh_marking.h
index 958980bdc23..04a49e24757 100644
--- a/source/blender/bmesh/intern/bmesh_marking.h
+++ b/source/blender/bmesh/intern/bmesh_marking.h
@@ -28,7 +28,7 @@ typedef struct BMEditSelection {
/* geometry hiding code */
#define BM_elem_hide_set(bm, ele, hide) _bm_elem_hide_set(bm, &(ele)->head, hide)
-void _bm_elem_hide_set(BMesh *bm, BMHeader *ele, const bool hide);
+void _bm_elem_hide_set(BMesh *bm, BMHeader *head, const bool hide);
void BM_vert_hide_set(BMVert *v, const bool hide);
void BM_edge_hide_set(BMEdge *e, const bool hide);
void BM_face_hide_set(BMFace *f, const bool hide);
@@ -66,7 +66,7 @@ void BM_face_select_set(BMesh *bm, BMFace *f, const bool select);
/* lower level functions which don't do flushing */
void BM_edge_select_set_noflush(BMesh *bm, BMEdge *e, const bool select);
-void BM_face_select_set_noflush(BMesh *bm, BMFace *e, const bool select);
+void BM_face_select_set_noflush(BMesh *bm, BMFace *f, const bool select);
void BM_mesh_select_mode_clean_ex(BMesh *bm, const short selectmode);
void BM_mesh_select_mode_clean(BMesh *bm);
diff --git a/source/blender/bmesh/intern/bmesh_mesh.h b/source/blender/bmesh/intern/bmesh_mesh.h
index a6b8b629ddf..c1c2f17d7c1 100644
--- a/source/blender/bmesh/intern/bmesh_mesh.h
+++ b/source/blender/bmesh/intern/bmesh_mesh.h
@@ -48,7 +48,7 @@ void BM_verts_calc_normal_vcos(BMesh *bm,
void BM_loops_calc_normal_vcos(BMesh *bm,
const float (*vcos)[3],
const float (*vnos)[3],
- const float (*pnos)[3],
+ const float (*fnos)[3],
const bool use_split_normals,
const float split_angle,
float (*r_lnos)[3],
@@ -81,7 +81,7 @@ void bmesh_edit_begin(BMesh *bm, const BMOpTypeFlag type_flag);
void bmesh_edit_end(BMesh *bm, const BMOpTypeFlag type_flag);
void BM_mesh_elem_index_ensure_ex(BMesh *bm, const char htype, int elem_offset[4]);
-void BM_mesh_elem_index_ensure(BMesh *bm, const char hflag);
+void BM_mesh_elem_index_ensure(BMesh *bm, const char htype);
void BM_mesh_elem_index_validate(
BMesh *bm, const char *location, const char *func, const char *msg_a, const char *msg_b);
@@ -164,9 +164,9 @@ extern const BMAllocTemplate bm_mesh_chunksize_default;
VA_NARGS_CALL_OVERLOAD(_VA_BMALLOC_TEMPLATE_FROM_ME_, __VA_ARGS__)
/* Vertex coords access. */
-void BM_mesh_vert_coords_get(BMesh *bm, float (*orco)[3]);
+void BM_mesh_vert_coords_get(BMesh *bm, float (*vert_coords)[3]);
float (*BM_mesh_vert_coords_alloc(BMesh *bm, int *r_vert_len))[3];
-void BM_mesh_vert_coords_apply(BMesh *bm, const float (*orco)[3]);
+void BM_mesh_vert_coords_apply(BMesh *bm, const float (*vert_coords)[3]);
void BM_mesh_vert_coords_apply_with_mat4(BMesh *bm,
const float (*vert_coords)[3],
const float mat[4][4]);
diff --git a/source/blender/bmesh/intern/bmesh_mods.h b/source/blender/bmesh/intern/bmesh_mods.h
index 8099d1dd603..46186306fec 100644
--- a/source/blender/bmesh/intern/bmesh_mods.h
+++ b/source/blender/bmesh/intern/bmesh_mods.h
@@ -64,7 +64,7 @@ BMVert *BM_edge_collapse(BMesh *bm,
const bool do_del,
const bool kill_degenerate_faces);
-BMVert *BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float percent);
+BMVert *BM_edge_split(BMesh *bm, BMEdge *e, BMVert *v, BMEdge **r_e, float fac);
BMVert *BM_edge_split_n(BMesh *bm, BMEdge *e, int numcuts, BMVert **r_varr);
diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h
index a9282b8e5d0..706979abeba 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api.h
+++ b/source/blender/bmesh/intern/bmesh_operator_api.h
@@ -575,7 +575,7 @@ void BMO_slot_map_insert(BMOperator *op, BMOpSlot *slot, const void *element, co
void BMO_slot_map_to_flag(BMesh *bm,
BMOpSlot slot_args[BMO_OP_MAX_SLOTS],
const char *slot_name,
- const char hflag,
+ const char htype,
const short oflag);
void *BMO_slot_buffer_alloc(BMOperator *op,
diff --git a/source/blender/bmesh/intern/bmesh_polygon.h b/source/blender/bmesh/intern/bmesh_polygon.h
index d9413e303e3..8c2b9ee0bff 100644
--- a/source/blender/bmesh/intern/bmesh_polygon.h
+++ b/source/blender/bmesh/intern/bmesh_polygon.h
@@ -53,12 +53,12 @@ float BM_face_calc_perimeter(const BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNU
float BM_face_calc_perimeter_with_mat3(const BMFace *f,
const float mat3[3][3]) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL();
-void BM_face_calc_tangent_edge(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
-void BM_face_calc_tangent_edge_pair(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
-void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
-void BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
-void BM_face_calc_tangent_auto(const BMFace *f, float r_plane[3]) ATTR_NONNULL();
-void BM_face_calc_center_bounds(const BMFace *f, float center[3]) ATTR_NONNULL();
+void BM_face_calc_tangent_edge(const BMFace *f, float r_tangent[3]) ATTR_NONNULL();
+void BM_face_calc_tangent_edge_pair(const BMFace *f, float r_tangent[3]) ATTR_NONNULL();
+void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_tangent[3]) ATTR_NONNULL();
+void BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_tangent[3]) ATTR_NONNULL();
+void BM_face_calc_tangent_auto(const BMFace *f, float r_tangent[3]) ATTR_NONNULL();
+void BM_face_calc_center_bounds(const BMFace *f, float r_cent[3]) ATTR_NONNULL();
void BM_face_calc_center_bounds_vcos(const BMesh *bm,
const BMFace *f,
float r_center[3],
@@ -68,7 +68,7 @@ void BM_face_calc_center_median_vcos(const BMesh *bm,
const BMFace *f,
float r_center[3],
float const (*vertexCos)[3]) ATTR_NONNULL();
-void BM_face_calc_center_median_weighted(const BMFace *f, float center[3]) ATTR_NONNULL();
+void BM_face_calc_center_median_weighted(const BMFace *f, float r_cent[3]) ATTR_NONNULL();
void BM_face_calc_bounds_expand(const BMFace *f, float min[3], float max[3]);
diff --git a/source/blender/bmesh/intern/bmesh_query.c b/source/blender/bmesh/intern/bmesh_query.c
index 61a81e56a2e..e102c1fe41c 100644
--- a/source/blender/bmesh/intern/bmesh_query.c
+++ b/source/blender/bmesh/intern/bmesh_query.c
@@ -1187,16 +1187,16 @@ bool BM_vert_is_boundary(const BMVert *v)
* \note Could be sped up a bit by not using iterators and by tagging
* faces on either side, then count the tags rather then searching.
*/
-int BM_face_share_face_count(BMFace *f1, BMFace *f2)
+int BM_face_share_face_count(BMFace *f_a, BMFace *f_b)
{
BMIter iter1, iter2;
BMEdge *e;
BMFace *f;
int count = 0;
- BM_ITER_ELEM (e, &iter1, f1, BM_EDGES_OF_FACE) {
+ BM_ITER_ELEM (e, &iter1, f_a, BM_EDGES_OF_FACE) {
BM_ITER_ELEM (f, &iter2, e, BM_FACES_OF_EDGE) {
- if (f != f1 && f != f2 && BM_face_share_edge_check(f, f2)) {
+ if (f != f_a && f != f_b && BM_face_share_edge_check(f, f_b)) {
count++;
}
}
@@ -1208,15 +1208,15 @@ int BM_face_share_face_count(BMFace *f1, BMFace *f2)
/**
* same as #BM_face_share_face_count but returns a bool
*/
-bool BM_face_share_face_check(BMFace *f1, BMFace *f2)
+bool BM_face_share_face_check(BMFace *f_a, BMFace *f_b)
{
BMIter iter1, iter2;
BMEdge *e;
BMFace *f;
- BM_ITER_ELEM (e, &iter1, f1, BM_EDGES_OF_FACE) {
+ BM_ITER_ELEM (e, &iter1, f_a, BM_EDGES_OF_FACE) {
BM_ITER_ELEM (f, &iter2, e, BM_FACES_OF_EDGE) {
- if (f != f1 && f != f2 && BM_face_share_edge_check(f, f2)) {
+ if (f != f_a && f != f_b && BM_face_share_edge_check(f, f_b)) {
return true;
}
}
diff --git a/source/blender/bmesh/intern/bmesh_query.h b/source/blender/bmesh/intern/bmesh_query.h
index 1ff2558ce83..d2c71d8c71d 100644
--- a/source/blender/bmesh/intern/bmesh_query.h
+++ b/source/blender/bmesh/intern/bmesh_query.h
@@ -153,7 +153,7 @@ float BM_loop_calc_face_normal_safe_vcos(const BMLoop *l,
float const (*vertexCos)[3],
float r_normal[3]) ATTR_NONNULL();
-void BM_loop_calc_face_direction(const BMLoop *l, float r_normal[3]);
+void BM_loop_calc_face_direction(const BMLoop *l, float r_dir[3]);
void BM_loop_calc_face_tangent(const BMLoop *l, float r_tangent[3]);
float BM_edge_calc_face_angle_ex(const BMEdge *e, const float fallback) ATTR_WARN_UNUSED_RESULT
@@ -185,7 +185,7 @@ float BM_vert_calc_median_tagged_edge_length(const BMVert *v) ATTR_WARN_UNUSED_R
BMLoop *BM_face_find_shortest_loop(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
BMLoop *BM_face_find_longest_loop(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
-BMEdge *BM_edge_exists(BMVert *v1, BMVert *v2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
+BMEdge *BM_edge_exists(BMVert *v_a, BMVert *v_b) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
BMEdge *BM_edge_find_double(BMEdge *e) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
BMFace *BM_face_exists(BMVert **varr, int len) ATTR_NONNULL(1);
diff --git a/source/blender/bmesh/tools/bmesh_path_region.h b/source/blender/bmesh/tools/bmesh_path_region.h
index 99a5b4a0960..2badead33a0 100644
--- a/source/blender/bmesh/tools/bmesh_path_region.h
+++ b/source/blender/bmesh/tools/bmesh_path_region.h
@@ -23,20 +23,20 @@
struct LinkNode *BM_mesh_calc_path_region_vert(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- bool (*test_fn)(BMVert *, void *user_data),
+ bool (*filter_fn)(BMVert *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
struct LinkNode *BM_mesh_calc_path_region_edge(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- bool (*test_fn)(BMEdge *, void *user_data),
+ bool (*filter_fn)(BMEdge *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
struct LinkNode *BM_mesh_calc_path_region_face(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
- bool (*test_fn)(BMFace *, void *user_data),
+ bool (*filter_fn)(BMFace *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
diff --git a/source/blender/bmesh/tools/bmesh_path_region_uv.h b/source/blender/bmesh/tools/bmesh_path_region_uv.h
index 18fe977c9fa..5767c5384e5 100644
--- a/source/blender/bmesh/tools/bmesh_path_region_uv.h
+++ b/source/blender/bmesh/tools/bmesh_path_region_uv.h
@@ -24,7 +24,7 @@ struct LinkNode *BM_mesh_calc_path_uv_region_vert(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
const uint cd_loop_uv_offset,
- bool (*test_fn)(BMLoop *, void *user_data),
+ bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
@@ -32,7 +32,7 @@ struct LinkNode *BM_mesh_calc_path_uv_region_edge(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
const uint cd_loop_uv_offset,
- bool (*test_fn)(BMLoop *, void *user_data),
+ bool (*filter_fn)(BMLoop *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
@@ -40,6 +40,6 @@ struct LinkNode *BM_mesh_calc_path_uv_region_face(BMesh *bm,
BMElem *ele_src,
BMElem *ele_dst,
const uint cd_loop_uv_offset,
- bool (*test_fn)(BMFace *, void *user_data),
+ bool (*filter_fn)(BMFace *, void *user_data),
void *user_data) ATTR_WARN_UNUSED_RESULT
ATTR_NONNULL(1, 2, 3);
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.h b/source/blender/bmesh/tools/bmesh_triangulate.h
index 5353b315a38..f45f94f15d8 100644
--- a/source/blender/bmesh/tools/bmesh_triangulate.h
+++ b/source/blender/bmesh/tools/bmesh_triangulate.h
@@ -29,4 +29,4 @@ void BM_mesh_triangulate(BMesh *bm,
const bool tag_only,
BMOperator *op,
BMOpSlot *slot_facemap_out,
- BMOpSlot *slot_doubles_out);
+ BMOpSlot *slot_facemap_double_out);
diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.h b/source/blender/compositor/intern/COM_ExecutionGroup.h
index f0dca4e9b34..dd079415d09 100644
--- a/source/blender/compositor/intern/COM_ExecutionGroup.h
+++ b/source/blender/compositor/intern/COM_ExecutionGroup.h
@@ -227,12 +227,12 @@ class ExecutionGroup {
* \note Check if a certain area is available, when not available this are will be checked.
* \note This method is called from other ExecutionGroup's.
* \param graph:
- * \param rect:
+ * \param area:
* \return [true:false]
* true: package(s) are scheduled
* false: scheduling is deferred (depending workpackages are scheduled)
*/
- bool scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *rect);
+ bool scheduleAreaWhenPossible(ExecutionSystem *graph, rcti *area);
/**
* \brief add a chunk to the WorkScheduler.
@@ -336,7 +336,7 @@ class ExecutionGroup {
* \brief compose multiple chunks into a single chunk
* \return Memorybuffer *consolidated chunk
*/
- MemoryBuffer *constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *output);
+ MemoryBuffer *constructConsolidatedMemoryBuffer(MemoryProxy *memoryProxy, rcti *rect);
/**
* \brief initExecution is called just before the execution of the whole graph will be done.
@@ -395,9 +395,9 @@ class ExecutionGroup {
* After determining the order of the chunks the chunks will be scheduled
*
* \see ViewerOperation
- * \param system:
+ * \param graph:
*/
- void execute(ExecutionSystem *system);
+ void execute(ExecutionSystem *graph);
/**
* \brief this method determines the MemoryProxy's where this execution group depends on.
diff --git a/source/blender/compositor/intern/COM_Node.cpp b/source/blender/compositor/intern/COM_Node.cpp
index 31535c5851f..30ebd7e0d4b 100644
--- a/source/blender/compositor/intern/COM_Node.cpp
+++ b/source/blender/compositor/intern/COM_Node.cpp
@@ -130,12 +130,12 @@ bNodeSocket *Node::getEditorInputSocket(int editorNodeInputSocketIndex)
}
return NULL;
}
-bNodeSocket *Node::getEditorOutputSocket(int editorNodeInputSocketIndex)
+bNodeSocket *Node::getEditorOutputSocket(int editorNodeOutputSocketIndex)
{
bNodeSocket *bSock = (bNodeSocket *)this->getbNode()->outputs.first;
int index = 0;
while (bSock != NULL) {
- if (index == editorNodeInputSocketIndex) {
+ if (index == editorNodeOutputSocketIndex) {
return bSock;
}
index++;
diff --git a/source/blender/compositor/intern/COM_NodeGraph.cpp b/source/blender/compositor/intern/COM_NodeGraph.cpp
index cb27fa21b4d..01dd662ad11 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.cpp
+++ b/source/blender/compositor/intern/COM_NodeGraph.cpp
@@ -54,10 +54,9 @@ void NodeGraph::from_bNodeTree(const CompositorContext &context, bNodeTree *tree
add_bNodeTree(context, 0, tree, NODE_INSTANCE_KEY_BASE);
}
-bNodeSocket *NodeGraph::find_b_node_input(bNode *b_group_node, const char *identifier)
+bNodeSocket *NodeGraph::find_b_node_input(bNode *b_node, const char *identifier)
{
- for (bNodeSocket *b_sock = (bNodeSocket *)b_group_node->inputs.first; b_sock;
- b_sock = b_sock->next) {
+ for (bNodeSocket *b_sock = (bNodeSocket *)b_node->inputs.first; b_sock; b_sock = b_sock->next) {
if (STREQ(b_sock->identifier, identifier)) {
return b_sock;
}
@@ -65,10 +64,9 @@ bNodeSocket *NodeGraph::find_b_node_input(bNode *b_group_node, const char *ident
return NULL;
}
-bNodeSocket *NodeGraph::find_b_node_output(bNode *b_group_node, const char *identifier)
+bNodeSocket *NodeGraph::find_b_node_output(bNode *b_node, const char *identifier)
{
- for (bNodeSocket *b_sock = (bNodeSocket *)b_group_node->outputs.first; b_sock;
- b_sock = b_sock->next) {
+ for (bNodeSocket *b_sock = (bNodeSocket *)b_node->outputs.first; b_sock; b_sock = b_sock->next) {
if (STREQ(b_sock->identifier, identifier)) {
return b_sock;
}
diff --git a/source/blender/compositor/intern/COM_NodeGraph.h b/source/blender/compositor/intern/COM_NodeGraph.h
index 7cbd45bd0b5..7252d546fce 100644
--- a/source/blender/compositor/intern/COM_NodeGraph.h
+++ b/source/blender/compositor/intern/COM_NodeGraph.h
@@ -105,7 +105,7 @@ class NodeGraph {
NodeInputs find_inputs(const NodeRange &node_range, bNodeSocket *b_socket);
NodeOutput *find_output(const NodeRange &node_range, bNodeSocket *b_socket);
- void add_bNodeLink(const NodeRange &node_range, bNodeLink *bNodeLink);
+ void add_bNodeLink(const NodeRange &node_range, bNodeLink *b_nodelink);
/* **** Special proxy node type conversions **** */
/* These nodes are not represented in the node graph themselves,
diff --git a/source/blender/compositor/nodes/COM_ImageNode.h b/source/blender/compositor/nodes/COM_ImageNode.h
index 9481ef4f7b1..1a811fe855d 100644
--- a/source/blender/compositor/nodes/COM_ImageNode.h
+++ b/source/blender/compositor/nodes/COM_ImageNode.h
@@ -37,7 +37,7 @@ class ImageNode : public Node {
ImageUser *user,
int framenumber,
int outputsocketIndex,
- int passtype,
+ int passindex,
int view,
DataType datatype) const;
diff --git a/source/blender/compositor/nodes/COM_KeyingNode.h b/source/blender/compositor/nodes/COM_KeyingNode.h
index cfb1f2e6ddf..6920d2af09d 100644
--- a/source/blender/compositor/nodes/COM_KeyingNode.h
+++ b/source/blender/compositor/nodes/COM_KeyingNode.h
@@ -42,7 +42,7 @@ class KeyingNode : public Node {
int distance) const;
NodeOperationOutput *setupDespill(NodeConverter &converter,
NodeOperationOutput *despillInput,
- NodeInput *inputSrceen,
+ NodeInput *inputScreen,
float factor,
float colorBalance) const;
NodeOperationOutput *setupClip(NodeConverter &converter,
diff --git a/source/blender/compositor/operations/COM_BlurBaseOperation.h b/source/blender/compositor/operations/COM_BlurBaseOperation.h
index e4ac8b3c874..c452b2e4ea1 100644
--- a/source/blender/compositor/operations/COM_BlurBaseOperation.h
+++ b/source/blender/compositor/operations/COM_BlurBaseOperation.h
@@ -33,7 +33,7 @@ class BlurBaseOperation : public NodeOperation, public QualityStepHelper {
BlurBaseOperation(DataType data_type);
float *make_gausstab(float rad, int size);
#ifdef __SSE2__
- __m128 *convert_gausstab_sse(const float *gaustab, int size);
+ __m128 *convert_gausstab_sse(const float *gausstab, int size);
#endif
float *make_dist_fac_inverse(float rad, int size, int falloff);
diff --git a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
index 0c77e83daec..befbf9453a8 100644
--- a/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
+++ b/source/blender/compositor/operations/COM_DoubleEdgeMaskOperation.h
@@ -34,7 +34,7 @@ class DoubleEdgeMaskOperation : public NodeOperation {
public:
DoubleEdgeMaskOperation();
- void doDoubleEdgeMask(float *inner, float *outer, float *res);
+ void doDoubleEdgeMask(float *imask, float *omask, float *res);
/**
* the inner loop of this program
*/
diff --git a/source/blender/compositor/operations/COM_ReadBufferOperation.h b/source/blender/compositor/operations/COM_ReadBufferOperation.h
index e59cb5449d6..2ada33906ef 100644
--- a/source/blender/compositor/operations/COM_ReadBufferOperation.h
+++ b/source/blender/compositor/operations/COM_ReadBufferOperation.h
@@ -30,7 +30,7 @@ class ReadBufferOperation : public NodeOperation {
MemoryBuffer *m_buffer;
public:
- ReadBufferOperation(DataType datetype);
+ ReadBufferOperation(DataType datatype);
void setMemoryProxy(MemoryProxy *memoryProxy)
{
this->m_memoryProxy = memoryProxy;
diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h
index d1acfb10f25..a72b90e7e94 100644
--- a/source/blender/compositor/operations/COM_WrapOperation.h
+++ b/source/blender/compositor/operations/COM_WrapOperation.h
@@ -25,7 +25,7 @@ class WrapOperation : public ReadBufferOperation {
int m_wrappingType;
public:
- WrapOperation(DataType datetype);
+ WrapOperation(DataType datatype);
bool determineDependingAreaOfInterest(rcti *input,
ReadBufferOperation *readOperation,
rcti *output);
diff --git a/source/blender/depsgraph/DEG_depsgraph_debug.h b/source/blender/depsgraph/DEG_depsgraph_debug.h
index e261ff67a20..2aea10fd5b4 100644
--- a/source/blender/depsgraph/DEG_depsgraph_debug.h
+++ b/source/blender/depsgraph/DEG_depsgraph_debug.h
@@ -55,10 +55,10 @@ void DEG_stats_simple(const struct Depsgraph *graph,
/* ************************************************ */
/* Diagram-Based Graph Debugging */
-void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label);
+void DEG_debug_relations_graphviz(const struct Depsgraph *graph, FILE *fp, const char *label);
void DEG_debug_stats_gnuplot(const struct Depsgraph *graph,
- FILE *stream,
+ FILE *fp,
const char *label,
const char *output_filename);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 6776f4b7b83..c245c67d1cd 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -701,20 +701,20 @@ void DepsgraphNodeBuilder::build_object_flags(int base_index,
is_from_set));
}
-void DepsgraphNodeBuilder::build_object_proxy_from(Object *object, bool is_visible)
+void DepsgraphNodeBuilder::build_object_proxy_from(Object *object, bool is_object_visible)
{
if (object->proxy_from == nullptr) {
return;
}
- build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY, is_visible);
+ build_object(-1, object->proxy_from, DEG_ID_LINKED_INDIRECTLY, is_object_visible);
}
-void DepsgraphNodeBuilder::build_object_proxy_group(Object *object, bool is_visible)
+void DepsgraphNodeBuilder::build_object_proxy_group(Object *object, bool is_object_visible)
{
if (object->proxy_group == nullptr) {
return;
}
- build_object(-1, object->proxy_group, DEG_ID_LINKED_INDIRECTLY, is_visible);
+ build_object(-1, object->proxy_group, DEG_ID_LINKED_INDIRECTLY, is_object_visible);
}
void DepsgraphNodeBuilder::build_object_instance_collection(Object *object, bool is_object_visible)
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.h b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
index 04f2a3f911d..39768b9fdb6 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.h
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.h
@@ -195,7 +195,7 @@ class DepsgraphRelationBuilder : public DepsgraphBuilder {
void add_modifier_to_transform_relation(const DepsNodeHandle *handle, const char *description);
void add_customdata_mask(Object *object, const DEGCustomDataMeshMasks &customdata_masks);
- void add_special_eval_flag(ID *object, uint32_t flag);
+ void add_special_eval_flag(ID *id, uint32_t flag);
virtual void build_id(ID *id);
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index d0356f44022..04b25a36d6d 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
@@ -513,7 +513,7 @@ static void deg_debug_graphviz_graph_relations(DotExportContext &ctx, const Deps
} // namespace deg
} // namespace blender
-void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *f, const char *label)
+void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *fp, const char *label)
{
if (!graph) {
return;
@@ -539,5 +539,5 @@ void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *f, const char *l
deg::deg_debug_graphviz_legend(ctx);
std::string dot_string = digraph.to_dot_string();
- fprintf(f, "%s", dot_string.c_str());
+ fprintf(fp, "%s", dot_string.c_str());
}
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
index 16bdc2d6115..98a2d09c352 100644
--- a/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
+++ b/source/blender/depsgraph/intern/debug/deg_debug_stats_gnuplot.cc
@@ -153,7 +153,7 @@ void deg_debug_stats_gnuplot(const DebugContext &ctx)
} // namespace blender
void DEG_debug_stats_gnuplot(const Depsgraph *depsgraph,
- FILE *f,
+ FILE *fp,
const char *label,
const char *output_filename)
{
@@ -161,7 +161,7 @@ void DEG_debug_stats_gnuplot(const Depsgraph *depsgraph,
return;
}
deg::DebugContext ctx;
- ctx.file = f;
+ ctx.file = fp;
ctx.graph = (deg::Depsgraph *)depsgraph;
ctx.label = label;
ctx.output_filename = output_filename;
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.h b/source/blender/draw/engines/eevee/eevee_lightcache.h
index 834f0fc8a45..489c9ac22f4 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.h
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.h
@@ -40,7 +40,7 @@ struct wmJob *EEVEE_lightbake_job_create(struct wmWindowManager *wm,
int delay,
int frame);
void *EEVEE_lightbake_job_data_alloc(struct Main *bmain,
- struct ViewLayer *viewlayer,
+ struct ViewLayer *view_layer,
struct Scene *scene,
bool run_as_job,
int frame);
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index bf346708b34..4aaf6741a1c 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -973,7 +973,7 @@ typedef struct EEVEE_PrivateData {
/* eevee_data.c */
void EEVEE_motion_blur_data_init(EEVEE_MotionBlurData *mb);
void EEVEE_motion_blur_data_free(EEVEE_MotionBlurData *mb);
-void EEVEE_view_layer_data_free(void *sldata);
+void EEVEE_view_layer_data_free(void *storage);
EEVEE_ViewLayerData *EEVEE_view_layer_data_get(void);
EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure_ex(struct ViewLayer *view_layer);
EEVEE_ViewLayerData *EEVEE_view_layer_data_ensure(void);
@@ -1152,8 +1152,8 @@ void EEVEE_lightbake_filter_visibility(EEVEE_ViewLayerData *sldata,
float vis_blur,
int vis_size);
-void EEVEE_lightprobes_grid_data_from_object(Object *ob, EEVEE_LightGrid *prb_data, int *offset);
-void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *prb_data);
+void EEVEE_lightprobes_grid_data_from_object(Object *ob, EEVEE_LightGrid *egrid, int *offset);
+void EEVEE_lightprobes_cube_data_from_object(Object *ob, EEVEE_LightProbe *eprobe);
void EEVEE_lightprobes_planar_data_from_object(Object *ob,
EEVEE_PlanarReflection *eplanar,
EEVEE_LightProbeVisTest *vis_test);
@@ -1309,7 +1309,7 @@ void EEVEE_render_cache(void *vedata,
struct Depsgraph *depsgraph);
void EEVEE_render_draw(EEVEE_Data *vedata,
struct RenderEngine *engine,
- struct RenderLayer *render_layer,
+ struct RenderLayer *rl,
const struct rcti *rect);
void EEVEE_render_read_result(EEVEE_Data *vedata,
struct RenderEngine *engine,
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index 852945b25c3..7a516b3dd6b 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -393,7 +393,7 @@ void gpencil_material_resources_get(GPENCIL_MaterialPool *first_pool,
struct GPUUniformBuf **r_ubo_mat);
void gpencil_light_ambient_add(GPENCIL_LightPool *lightpool, const float color[3]);
-void gpencil_light_pool_populate(GPENCIL_LightPool *matpool, Object *ob);
+void gpencil_light_pool_populate(GPENCIL_LightPool *lightpool, Object *ob);
GPENCIL_LightPool *gpencil_light_pool_add(GPENCIL_PrivateData *pd);
GPENCIL_LightPool *gpencil_light_pool_create(GPENCIL_PrivateData *pd, Object *ob);
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index 697f4f77601..680636f9e87 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -206,19 +206,19 @@ typedef void (*GPUMaterialEvalCallbackFn)(struct GPUMaterial *mat,
#endif
struct GPUShader *DRW_shader_create_ex(
- const char *vert, const char *geom, const char *frag, const char *defines, const char *func);
+ const char *vert, const char *geom, const char *frag, const char *defines, const char *name);
struct GPUShader *DRW_shader_create_with_lib_ex(const char *vert,
const char *geom,
const char *frag,
const char *lib,
const char *defines,
- const char *func);
+ const char *name);
struct GPUShader *DRW_shader_create_with_shaderlib_ex(const char *vert,
const char *geom,
const char *frag,
const DRWShaderLibrary *lib,
const char *defines,
- const char *func);
+ const char *name);
struct GPUShader *DRW_shader_create_with_transform_feedback(const char *vert,
const char *geom,
const char *defines,
@@ -227,11 +227,11 @@ struct GPUShader *DRW_shader_create_with_transform_feedback(const char *vert,
const int varying_count);
struct GPUShader *DRW_shader_create_fullscreen_ex(const char *frag,
const char *defines,
- const char *func);
+ const char *name);
struct GPUShader *DRW_shader_create_fullscreen_with_shaderlib_ex(const char *frag,
const DRWShaderLibrary *lib,
const char *defines,
- const char *func);
+ const char *name);
#define DRW_shader_create(vert, geom, frag, defines) \
DRW_shader_create_ex(vert, geom, frag, defines, __func__)
#define DRW_shader_create_with_lib(vert, geom, frag, lib, defines) \
@@ -416,29 +416,30 @@ void DRW_shgroup_call_ex(DRWShadingGroup *shgroup,
void *user_data);
/* If ob is NULL, unit modelmatrix is assumed and culling is bypassed. */
-#define DRW_shgroup_call(shgrp, geom, ob) DRW_shgroup_call_ex(shgrp, ob, NULL, geom, false, NULL)
+#define DRW_shgroup_call(shgroup, geom, ob) \
+ DRW_shgroup_call_ex(shgroup, ob, NULL, geom, false, NULL)
/* Same as DRW_shgroup_call but override the obmat. Not culled. */
-#define DRW_shgroup_call_obmat(shgrp, geom, obmat) \
- DRW_shgroup_call_ex(shgrp, NULL, obmat, geom, false, NULL)
+#define DRW_shgroup_call_obmat(shgroup, geom, obmat) \
+ DRW_shgroup_call_ex(shgroup, NULL, obmat, geom, false, NULL)
/* TODO(fclem) remove this when we have DRWView */
/* user_data is used by DRWCallVisibilityFn defined in DRWView. */
-#define DRW_shgroup_call_with_callback(shgrp, geom, ob, user_data) \
- DRW_shgroup_call_ex(shgrp, ob, NULL, geom, false, user_data)
+#define DRW_shgroup_call_with_callback(shgroup, geom, ob, user_data) \
+ DRW_shgroup_call_ex(shgroup, ob, NULL, geom, false, user_data)
/* Same as DRW_shgroup_call but bypass culling even if ob is not NULL. */
-#define DRW_shgroup_call_no_cull(shgrp, geom, ob) \
- DRW_shgroup_call_ex(shgrp, ob, NULL, geom, true, NULL)
+#define DRW_shgroup_call_no_cull(shgroup, geom, ob) \
+ DRW_shgroup_call_ex(shgroup, ob, NULL, geom, true, NULL)
void DRW_shgroup_call_range(
DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, uint v_sta, uint v_ct);
void DRW_shgroup_call_instance_range(
- DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, uint v_sta, uint v_ct);
+ DRWShadingGroup *shgroup, Object *ob, struct GPUBatch *geom, uint i_sta, uint i_ct);
-void DRW_shgroup_call_procedural_points(DRWShadingGroup *sh, Object *ob, uint point_ct);
-void DRW_shgroup_call_procedural_lines(DRWShadingGroup *sh, Object *ob, uint line_ct);
-void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *sh, Object *ob, uint tri_ct);
+void DRW_shgroup_call_procedural_points(DRWShadingGroup *sh, Object *ob, uint point_count);
+void DRW_shgroup_call_procedural_lines(DRWShadingGroup *sh, Object *ob, uint line_count);
+void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *sh, Object *ob, uint tri_count);
/* Warning: Only use with Shaders that have IN_PLACE_INSTANCES defined. */
void DRW_shgroup_call_instances(DRWShadingGroup *shgroup,
Object *ob,
@@ -453,15 +454,15 @@ void DRW_shgroup_call_instances_with_attrs(DRWShadingGroup *shgroup,
void DRW_shgroup_call_sculpt(DRWShadingGroup *sh, Object *ob, bool wire, bool mask);
void DRW_shgroup_call_sculpt_with_materials(DRWShadingGroup **sh, int num_sh, Object *ob);
-DRWCallBuffer *DRW_shgroup_call_buffer(DRWShadingGroup *shading_group,
+DRWCallBuffer *DRW_shgroup_call_buffer(DRWShadingGroup *shgroup,
struct GPUVertFormat *format,
GPUPrimType prim_type);
-DRWCallBuffer *DRW_shgroup_call_buffer_instance(DRWShadingGroup *shading_group,
+DRWCallBuffer *DRW_shgroup_call_buffer_instance(DRWShadingGroup *shgroup,
struct GPUVertFormat *format,
struct GPUBatch *geom);
void DRW_buffer_add_entry_struct(DRWCallBuffer *callbuf, const void *data);
-void DRW_buffer_add_entry_array(DRWCallBuffer *buffer, const void *attr[], uint attr_len);
+void DRW_buffer_add_entry_array(DRWCallBuffer *callbuf, const void *attr[], uint attr_len);
#define DRW_buffer_add_entry(buffer, ...) \
do { \
@@ -558,9 +559,9 @@ void DRW_shgroup_uniform_mat3(DRWShadingGroup *shgroup, const char *name, const
void DRW_shgroup_uniform_mat4(DRWShadingGroup *shgroup, const char *name, const float (*value)[4]);
/* Store value instead of referencing it. */
void DRW_shgroup_uniform_int_copy(DRWShadingGroup *shgroup, const char *name, const int value);
-void DRW_shgroup_uniform_ivec2_copy(DRWShadingGroup *shgrp, const char *name, const int *value);
-void DRW_shgroup_uniform_ivec3_copy(DRWShadingGroup *shgrp, const char *name, const int *value);
-void DRW_shgroup_uniform_ivec4_copy(DRWShadingGroup *shgrp, const char *name, const int *value);
+void DRW_shgroup_uniform_ivec2_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
+void DRW_shgroup_uniform_ivec3_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
+void DRW_shgroup_uniform_ivec4_copy(DRWShadingGroup *shgroup, const char *name, const int *value);
void DRW_shgroup_uniform_bool_copy(DRWShadingGroup *shgroup, const char *name, const bool value);
void DRW_shgroup_uniform_float_copy(DRWShadingGroup *shgroup, const char *name, const float value);
void DRW_shgroup_uniform_vec2_copy(DRWShadingGroup *shgroup, const char *name, const float *value);
@@ -582,7 +583,7 @@ void DRW_pass_state_set(DRWPass *pass, DRWState state);
void DRW_pass_state_add(DRWPass *pass, DRWState state);
void DRW_pass_state_remove(DRWPass *pass, DRWState state);
void DRW_pass_foreach_shgroup(DRWPass *pass,
- void (*callback)(void *userData, DRWShadingGroup *shgrp),
+ void (*callback)(void *userData, DRWShadingGroup *shgroup),
void *userData);
void DRW_pass_sort_shgroup_z(DRWPass *pass);
void DRW_pass_sort_shgroup_reverse(DRWPass *pass);
@@ -684,7 +685,7 @@ void **DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type,
void (*callback)(void *storage));
/* DrawData */
-DrawData *DRW_drawdata_get(ID *ib, DrawEngineType *engine_type);
+DrawData *DRW_drawdata_get(ID *id, DrawEngineType *engine_type);
DrawData *DRW_drawdata_ensure(ID *id,
DrawEngineType *engine_type,
size_t size,
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c
index afea820b057..09448f8783b 100644
--- a/source/blender/draw/intern/draw_manager_data.c
+++ b/source/blender/draw/intern/draw_manager_data.c
@@ -799,10 +799,10 @@ static void drw_shgroup_call_procedural_add_ex(DRWShadingGroup *shgroup,
drw_command_draw_procedural(shgroup, geom, handle, vert_count);
}
-void DRW_shgroup_call_procedural_points(DRWShadingGroup *shgroup, Object *ob, uint point_len)
+void DRW_shgroup_call_procedural_points(DRWShadingGroup *shgroup, Object *ob, uint point_count)
{
struct GPUBatch *geom = drw_cache_procedural_points_get();
- drw_shgroup_call_procedural_add_ex(shgroup, geom, ob, point_len);
+ drw_shgroup_call_procedural_add_ex(shgroup, geom, ob, point_count);
}
void DRW_shgroup_call_procedural_lines(DRWShadingGroup *shgroup, Object *ob, uint line_count)
@@ -811,10 +811,10 @@ void DRW_shgroup_call_procedural_lines(DRWShadingGroup *shgroup, Object *ob, uin
drw_shgroup_call_procedural_add_ex(shgroup, geom, ob, line_count * 2);
}
-void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *shgroup, Object *ob, uint tria_count)
+void DRW_shgroup_call_procedural_triangles(DRWShadingGroup *shgroup, Object *ob, uint tri_count)
{
struct GPUBatch *geom = drw_cache_procedural_triangles_get();
- drw_shgroup_call_procedural_add_ex(shgroup, geom, ob, tria_count * 3);
+ drw_shgroup_call_procedural_add_ex(shgroup, geom, ob, tri_count * 3);
}
/* Should be removed */
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index f608038a95a..ef86b132a60 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -916,10 +916,10 @@ static short snap_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
return 0;
}
-KeyframeEditFunc ANIM_editkeyframes_snap(short type)
+KeyframeEditFunc ANIM_editkeyframes_snap(short mode)
{
/* eEditKeyframes_Snap */
- switch (type) {
+ switch (mode) {
case SNAP_KEYS_NEARFRAME: /* snap to nearest frame */
return snap_bezier_nearest;
case SNAP_KEYS_CURFRAME: /* snap to current frame */
@@ -1030,9 +1030,9 @@ static short mirror_bezier_value(KeyframeEditData *ked, BezTriple *bezt)
/* Note: for markers and 'value', the values to use must be supplied as the first float value */
// calchandles_fcurve
-KeyframeEditFunc ANIM_editkeyframes_mirror(short type)
+KeyframeEditFunc ANIM_editkeyframes_mirror(short mode)
{
- switch (type) {
+ switch (mode) {
case MIRROR_KEYS_CURFRAME: /* mirror over current frame */
return mirror_bezier_cframe;
case MIRROR_KEYS_YAXIS: /* mirror over frame 0 */
@@ -1184,9 +1184,9 @@ static short set_bezier_free(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
/* Set all selected Bezier Handles to a single type */
// calchandles_fcurve
-KeyframeEditFunc ANIM_editkeyframes_handles(short code)
+KeyframeEditFunc ANIM_editkeyframes_handles(short mode)
{
- switch (code) {
+ switch (mode) {
case HD_AUTO: /* auto */
return set_bezier_auto;
case HD_AUTO_ANIM: /* auto clamped */
@@ -1312,9 +1312,9 @@ static short set_bezt_sine(KeyframeEditData *UNUSED(ked), BezTriple *bezt)
/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
// ANIM_editkeyframes_ipocurve_ipotype() !
-KeyframeEditFunc ANIM_editkeyframes_ipo(short code)
+KeyframeEditFunc ANIM_editkeyframes_ipo(short mode)
{
- switch (code) {
+ switch (mode) {
/* interpolation */
case BEZT_IPO_CONST: /* constant */
return set_bezt_constant;
@@ -1391,9 +1391,9 @@ static short set_keytype_moving_hold(KeyframeEditData *UNUSED(ked), BezTriple *b
}
/* Set the interpolation type of the selected BezTriples in each F-Curve to the specified one */
-KeyframeEditFunc ANIM_editkeyframes_keytype(short code)
+KeyframeEditFunc ANIM_editkeyframes_keytype(short mode)
{
- switch (code) {
+ switch (mode) {
case BEZT_KEYTYPE_BREAKDOWN: /* breakdown */
return set_keytype_breakdown;
diff --git a/source/blender/editors/armature/armature_intern.h b/source/blender/editors/armature/armature_intern.h
index 9a04425a083..438bb8e447b 100644
--- a/source/blender/editors/armature/armature_intern.h
+++ b/source/blender/editors/armature/armature_intern.h
@@ -228,14 +228,14 @@ EditBone *make_boneList(struct ListBase *edbo, struct ListBase *bones, struct Bo
/* duplicate method */
void preEditBoneDuplicate(struct ListBase *editbones);
void postEditBoneDuplicate(struct ListBase *editbones, struct Object *ob);
-struct EditBone *duplicateEditBone(struct EditBone *curBone,
+struct EditBone *duplicateEditBone(struct EditBone *cur_bone,
const char *name,
struct ListBase *editbones,
struct Object *ob);
/* duplicate method (cross objects) */
/* editbones is the target list */
-struct EditBone *duplicateEditBoneObjects(struct EditBone *curBone,
+struct EditBone *duplicateEditBoneObjects(struct EditBone *cur_bone,
const char *name,
struct ListBase *editbones,
struct Object *src_ob,
diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c
index 544d86d4c47..60a1434ed42 100644
--- a/source/blender/editors/armature/armature_naming.c
+++ b/source/blender/editors/armature/armature_naming.c
@@ -81,13 +81,13 @@ static bool editbone_unique_check(void *arg, const char *name)
}
/* If bone is already in list, pass it as param to ignore it. */
-void ED_armature_ebone_unique_name(ListBase *edbo, char *name, EditBone *bone)
+void ED_armature_ebone_unique_name(ListBase *ebones, char *name, EditBone *bone)
{
struct {
ListBase *lb;
void *bone;
} data;
- data.lb = edbo;
+ data.lb = ebones;
data.bone = bone;
BLI_uniquename_cb(editbone_unique_check, &data, DATA_("Bone"), '.', name, sizeof(bone->name));
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index ceacd3333d5..1534ea3287f 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -651,13 +651,13 @@ static float heat_limit_weight(float weight)
void heat_bone_weighting(Object *ob,
Mesh *me,
float (*verts)[3],
- int numsource,
+ int numbones,
bDeformGroup **dgrouplist,
bDeformGroup **dgroupflip,
float (*root)[3],
float (*tip)[3],
const int *selected,
- const char **err_str)
+ const char **error_str)
{
LaplacianSystem *sys;
MLoopTri *mlooptri;
@@ -672,7 +672,7 @@ void heat_bone_weighting(Object *ob,
bool use_vert_sel = (me->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
bool use_face_sel = (me->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
- *err_str = NULL;
+ *error_str = NULL;
/* bone heat needs triangulated faces */
tottri = poly_to_tri_count(me->totpoly, me->totloop);
@@ -714,7 +714,7 @@ void heat_bone_weighting(Object *ob,
sys->heat.verts = verts;
sys->heat.root = root;
sys->heat.tip = tip;
- sys->heat.numsource = numsource;
+ sys->heat.numsource = numbones;
heat_ray_tree_create(sys);
heat_laplacian_create(sys);
@@ -729,13 +729,13 @@ void heat_bone_weighting(Object *ob,
}
/* compute weights per bone */
- for (j = 0; j < numsource; j++) {
+ for (j = 0; j < numbones; j++) {
if (!selected[j]) {
continue;
}
firstsegment = (j == 0 || dgrouplist[j - 1] != dgrouplist[j]);
- lastsegment = (j == numsource - 1 || dgrouplist[j] != dgrouplist[j + 1]);
+ lastsegment = (j == numbones - 1 || dgrouplist[j] != dgrouplist[j + 1]);
bbone = !(firstsegment && lastsegment);
/* clear weights */
@@ -805,8 +805,8 @@ void heat_bone_weighting(Object *ob,
}
}
}
- else if (*err_str == NULL) {
- *err_str = N_("Bone Heat Weighting: failed to find solution for one or more bones");
+ else if (*error_str == NULL) {
+ *error_str = N_("Bone Heat Weighting: failed to find solution for one or more bones");
break;
}
diff --git a/source/blender/editors/armature/meshlaplacian.h b/source/blender/editors/armature/meshlaplacian.h
index 0405e361b2f..7e7b64c7510 100644
--- a/source/blender/editors/armature/meshlaplacian.h
+++ b/source/blender/editors/armature/meshlaplacian.h
@@ -56,7 +56,7 @@ void heat_bone_weighting(struct Object *ob,
float (*root)[3],
float (*tip)[3],
const int *selected,
- const char **error);
+ const char **error_str);
#ifdef RIGID_DEFORM
/* As-Rigid-As-Possible Deformation */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 62f4c068de0..47633033b6c 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -148,7 +148,7 @@ EditBone *ED_armature_ebone_add_primitive(struct Object *obedit_arm,
/* armature_edit.c */
float ED_armature_ebone_roll_to_vector(const EditBone *bone,
- const float new_up_axis[3],
+ const float align_axis[3],
const bool axis_only);
void ED_armature_origin_set(
struct Main *bmain, struct Object *ob, const float cursor[3], int centermode, int around);
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h
index deda0861b60..47b8eb543f4 100644
--- a/source/blender/editors/include/ED_fileselect.h
+++ b/source/blender/editors/include/ED_fileselect.h
@@ -199,7 +199,7 @@ void ED_fsmenu_set_category(struct FSMenu *fsmenu,
int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category);
-struct FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int index);
+struct FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx);
char *ED_fsmenu_entry_get_path(struct FSMenuEntry *fsentry);
void ED_fsmenu_entry_set_path(struct FSMenuEntry *fsentry, const char *path);
diff --git a/source/blender/editors/include/ED_keyframes_draw.h b/source/blender/editors/include/ED_keyframes_draw.h
index adc1e09821e..1a2c2936efe 100644
--- a/source/blender/editors/include/ED_keyframes_draw.h
+++ b/source/blender/editors/include/ED_keyframes_draw.h
@@ -147,8 +147,8 @@ void draw_keyframe_shape(float x,
unsigned int size_id,
unsigned int color_id,
unsigned int outline_color_id,
- unsigned int linemask_id,
- short ipo_type,
+ unsigned int flags_id,
+ short handle_type,
short extreme_type);
/* ******************************* Methods ****************************** */
@@ -264,10 +264,10 @@ void mask_to_keylist(struct bDopeSheet *UNUSED(ads),
short compare_ak_cfraPtr(void *node, void *data);
/* Checks if ActKeyColumn has any block data */
-bool actkeyblock_is_valid(ActKeyColumn *ab);
+bool actkeyblock_is_valid(ActKeyColumn *ac);
/* Checks if ActKeyColumn can be used as a block (i.e. drawn/used to detect "holds") */
-int actkeyblock_get_valid_hold(ActKeyColumn *ab);
+int actkeyblock_get_valid_hold(ActKeyColumn *ac);
#ifdef __cplusplus
}
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index 7f833cd59bf..869be81ca43 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -105,8 +105,11 @@ int insert_bezt_fcurve(struct FCurve *fcu, const struct BezTriple *bezt, eInsert
* already exists. It will insert a keyframe using the current value being keyframed.
* Returns the index at which a keyframe was added (or -1 if failed)
*/
-int insert_vert_fcurve(
- struct FCurve *fcu, float x, float y, eBezTriple_KeyframeType keytype, eInsertKeyFlags flag);
+int insert_vert_fcurve(struct FCurve *fcu,
+ float x,
+ float y,
+ eBezTriple_KeyframeType keyframe_type,
+ eInsertKeyFlags flag);
/* -------- */
@@ -266,7 +269,7 @@ int ANIM_scene_get_keyingset_index(struct Scene *scene, struct KeyingSet *ks);
/* Get Keying Set to use for Auto-Keyframing some transforms */
struct KeyingSet *ANIM_get_keyingset_for_autokeying(const struct Scene *scene,
- const char *tranformKSName);
+ const char *transformKSName);
/* Dynamically populate an enum of Keying Sets */
const struct EnumPropertyItem *ANIM_keying_sets_enum_itemf(struct bContext *C,
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index 660e4de09d3..85e7a491feb 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -68,7 +68,7 @@ void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em,
const bool use_self,
const bool use_select,
const bool respecthide,
- const bool use_toplogy);
+ const bool use_topology);
void EDBM_verts_mirror_apply(struct BMEditMesh *em, const int sel_from, const int sel_to);
struct BMVert *EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v);
struct BMEdge *EDBM_verts_mirror_get_edge(struct BMEditMesh *em, struct BMEdge *e);
@@ -111,7 +111,7 @@ struct UvElementMap *BM_uv_element_map_create(struct BMesh *bm,
const bool uv_selected,
const bool use_winding,
const bool do_islands);
-void BM_uv_element_map_free(struct UvElementMap *vmap);
+void BM_uv_element_map_free(struct UvElementMap *element_map);
struct UvElement *BM_uv_element_get(struct UvElementMap *map,
struct BMFace *efa,
struct BMLoop *l);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index d69c1227ee0..bf9e30b756f 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -265,7 +265,7 @@ void ED_object_base_init_transform_on_add(struct Object *object,
const float loc[3],
const float rot[3]);
float ED_object_new_primitive_matrix(struct bContext *C,
- struct Object *editob,
+ struct Object *obedit,
const float loc[3],
const float rot[3],
float primmat[4][4]);
diff --git a/source/blender/editors/include/ED_paint.h b/source/blender/editors/include/ED_paint.h
index 3412d62317e..39c5e3521d6 100644
--- a/source/blender/editors/include/ED_paint.h
+++ b/source/blender/editors/include/ED_paint.h
@@ -65,16 +65,16 @@ void ED_image_undo_restore(struct UndoStep *us);
void ED_image_undosys_type(struct UndoType *ut);
-void *ED_image_paint_tile_find(struct ListBase *undo_tiles,
- struct Image *ima,
+void *ED_image_paint_tile_find(struct ListBase *paint_tiles,
+ struct Image *image,
struct ImBuf *ibuf,
struct ImageUser *iuser,
int x_tile,
int y_tile,
unsigned short **r_mask,
bool validate);
-void *ED_image_paint_tile_push(struct ListBase *undo_tiles,
- struct Image *ima,
+void *ED_image_paint_tile_push(struct ListBase *paint_tiles,
+ struct Image *image,
struct ImBuf *ibuf,
struct ImBuf **tmpibuf,
struct ImageUser *iuser,
diff --git a/source/blender/editors/include/ED_space_api.h b/source/blender/editors/include/ED_space_api.h
index f3e867e8360..47c2d4f790c 100644
--- a/source/blender/editors/include/ED_space_api.h
+++ b/source/blender/editors/include/ED_space_api.h
@@ -67,9 +67,9 @@ void ED_file_exit(void);
#define REGION_DRAW_PRE_VIEW 2
#define REGION_DRAW_BACKDROP 3
-void *ED_region_draw_cb_activate(struct ARegionType *,
+void *ED_region_draw_cb_activate(struct ARegionType *art,
void (*draw)(const struct bContext *, struct ARegion *, void *),
- void *custumdata,
+ void *customdata,
int type);
void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int);
void ED_region_draw_cb_exit(struct ARegionType *, void *);
diff --git a/source/blender/editors/include/ED_time_scrub_ui.h b/source/blender/editors/include/ED_time_scrub_ui.h
index 216e67dd820..6420aaf5ef0 100644
--- a/source/blender/editors/include/ED_time_scrub_ui.h
+++ b/source/blender/editors/include/ED_time_scrub_ui.h
@@ -34,7 +34,7 @@ struct wmEvent;
void ED_time_scrub_draw_current_frame(const struct ARegion *region,
const struct Scene *scene,
bool display_seconds,
- bool draw_vert_line);
+ bool draw_line);
void ED_time_scrub_draw(const struct ARegion *region,
const struct Scene *scene,
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 4c4672edffc..b53740a531f 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -119,7 +119,7 @@ struct TransformOrientation;
struct bContext;
void BIF_clearTransformOrientation(struct bContext *C);
-void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_removeTransformOrientation(struct bContext *C, struct TransformOrientation *target);
void BIF_removeTransformOrientationIndex(struct bContext *C, int index);
bool BIF_createTransformOrientation(struct bContext *C,
struct ReportList *reports,
@@ -127,7 +127,7 @@ bool BIF_createTransformOrientation(struct bContext *C,
const bool use_view,
const bool activate,
const bool overwrite);
-void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *ts);
+void BIF_selectTransformOrientation(struct bContext *C, struct TransformOrientation *target);
void ED_getTransformOrientationMatrix(const struct bContext *C,
float orientation_mat[3][3],
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index ddbea592238..d3eb6c00f57 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -677,7 +677,7 @@ void ED_view3d_lock_clear(struct View3D *v3d);
float ED_view3d_offset_distance(const float mat[4][4],
const float ofs[3],
- const float dist_fallback);
+ const float fallback_dist);
void ED_view3d_distance_set(struct RegionView3D *rv3d, const float dist);
bool ED_view3d_distance_set_from_location(struct RegionView3D *rv3d,
const float dist_co[3],
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index af282bde550..b23f8ae11c9 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -559,9 +559,9 @@ uiPopupMenu *UI_popup_menu_begin_ex(struct bContext *C,
const char *title,
const char *block_name,
int icon) ATTR_NONNULL();
-void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *head);
+void UI_popup_menu_end(struct bContext *C, struct uiPopupMenu *pup);
bool UI_popup_menu_end_or_cancel(struct bContext *C, struct uiPopupMenu *head);
-struct uiLayout *UI_popup_menu_layout(uiPopupMenu *head);
+struct uiLayout *UI_popup_menu_layout(uiPopupMenu *pup);
void UI_popup_menu_reports(struct bContext *C, struct ReportList *reports) ATTR_NONNULL();
int UI_popup_menu_invoke(struct bContext *C, const char *idname, struct ReportList *reports)
@@ -581,8 +581,8 @@ int UI_popover_panel_invoke(struct bContext *C,
uiPopover *UI_popover_begin(struct bContext *C, int menu_width, bool from_active_button)
ATTR_NONNULL(1);
-void UI_popover_end(struct bContext *C, struct uiPopover *head, struct wmKeyMap *keymap);
-struct uiLayout *UI_popover_layout(uiPopover *head);
+void UI_popover_end(struct bContext *C, struct uiPopover *pup, struct wmKeyMap *keymap);
+struct uiLayout *UI_popover_layout(uiPopover *pup);
void UI_popover_once_clear(uiPopover *pup);
/* interface_region_menu_pie.c */
@@ -720,7 +720,7 @@ void UI_but_drag_set_path(uiBut *but, const char *path, const bool use_free);
void UI_but_drag_set_name(uiBut *but, const char *name);
void UI_but_drag_set_value(uiBut *but);
void UI_but_drag_set_image(
- uiBut *but, const char *path, int icon, struct ImBuf *ima, float scale, const bool use_free);
+ uiBut *but, const char *path, int icon, struct ImBuf *imb, float scale, const bool use_free);
bool UI_but_active_drop_name(struct bContext *C);
bool UI_but_active_drop_color(struct bContext *C);
@@ -774,10 +774,10 @@ uiBut *uiDefBut(uiBlock *block,
int type,
int retval,
const char *str,
- int x1,
- int y1,
- short x2,
- short y2,
+ int x,
+ int y,
+ short width,
+ short height,
void *poin,
float min,
float max,
@@ -957,10 +957,10 @@ uiBut *uiDefIconBut(uiBlock *block,
int type,
int retval,
int icon,
- int x1,
- int y1,
- short x2,
- short y2,
+ int x,
+ int y,
+ short width,
+ short height,
void *poin,
float min,
float max,
@@ -1143,10 +1143,10 @@ uiBut *uiDefIconTextBut(uiBlock *block,
int retval,
int icon,
const char *str,
- int x1,
- int y1,
- short x2,
- short y2,
+ int x,
+ int y,
+ short width,
+ short height,
void *poin,
float min,
float max,
@@ -1452,7 +1452,7 @@ uiBut *uiDefIconMenuBut(uiBlock *block,
uiBut *uiDefBlockBut(uiBlock *block,
uiBlockCreateFunc func,
- void *func_arg1,
+ void *arg,
const char *str,
int x,
int y,
@@ -1879,7 +1879,7 @@ void uiLayoutSetContextFromBut(uiLayout *layout, uiBut *but);
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
void uiLayoutSetActive(uiLayout *layout, bool active);
void uiLayoutSetActiveDefault(uiLayout *layout, bool active_default);
-void uiLayoutSetActivateInit(uiLayout *layout, bool active);
+void uiLayoutSetActivateInit(uiLayout *layout, bool activate_init);
void uiLayoutSetEnabled(uiLayout *layout, bool enabled);
void uiLayoutSetRedAlert(uiLayout *layout, bool redalert);
void uiLayoutSetAlignment(uiLayout *layout, char alignment);
@@ -2057,7 +2057,10 @@ void uiTemplateColorPicker(uiLayout *layout,
bool lock,
bool lock_luminosity,
bool cubic);
-void uiTemplatePalette(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool color);
+void uiTemplatePalette(uiLayout *layout,
+ struct PointerRNA *ptr,
+ const char *propname,
+ bool colors);
void uiTemplateCryptoPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname);
void uiTemplateLayers(uiLayout *layout,
struct PointerRNA *ptr,
@@ -2241,7 +2244,7 @@ void uiItemFullO_ptr(uiLayout *layout,
int flag,
PointerRNA *r_opptr);
void uiItemFullO(uiLayout *layout,
- const char *idname,
+ const char *opname,
const char *name,
int icon,
struct IDProperty *properties,
@@ -2378,7 +2381,7 @@ void uiItemSpacer(uiLayout *layout);
void uiItemPopoverPanel_ptr(
uiLayout *layout, struct bContext *C, struct PanelType *pt, const char *name, int icon);
void uiItemPopoverPanel(
- uiLayout *layout, struct bContext *C, const char *panelname, const char *name, int icon);
+ uiLayout *layout, struct bContext *C, const char *panel_type, const char *name, int icon);
void uiItemPopoverPanelFromGroup(uiLayout *layout,
struct bContext *C,
int space_id,
@@ -2458,7 +2461,7 @@ void UI_context_active_but_prop_get_templateID(struct bContext *C,
struct ID *UI_context_active_but_get_tab_ID(struct bContext *C);
uiBut *UI_region_active_but_get(struct ARegion *region);
-uiBut *UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *isect);
+uiBut *UI_region_but_find_rect_over(const struct ARegion *region, const struct rcti *rect_px);
uiBlock *UI_region_block_find_mouse_over(const struct ARegion *region,
const int xy[2],
bool only_clip);
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index ec44d97c51b..2b9d684ad96 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -742,7 +742,7 @@ void ui_searchbox_free(struct bContext *C, struct ARegion *region);
void ui_but_search_refresh(uiButSearch *but);
/* interface_region_menu_popup.c */
-int ui_but_menu_step(uiBut *but, int step);
+int ui_but_menu_step(uiBut *but, int direction);
bool ui_but_menu_step_poll(const uiBut *but);
uiBut *ui_popup_menu_memory_get(struct uiBlock *block);
void ui_popup_menu_memory_set(uiBlock *block, struct uiBut *but);
@@ -762,14 +762,14 @@ uiPopupBlockHandle *ui_popup_block_create(struct bContext *C,
uiPopupBlockHandle *ui_popup_menu_create(struct bContext *C,
struct ARegion *butregion,
uiBut *but,
- uiMenuCreateFunc create_func,
+ uiMenuCreateFunc menu_func,
void *arg);
/* interface_region_popover.c */
uiPopupBlockHandle *ui_popover_panel_create(struct bContext *C,
struct ARegion *butregion,
uiBut *but,
- uiMenuCreateFunc create_func,
+ uiMenuCreateFunc menu_func,
void *arg);
/* interface_region_menu_pie.c */
@@ -878,7 +878,7 @@ extern uiBut *ui_but_find_select_in_enum(uiBut *but, int direction);
bool ui_but_is_editing(const uiBut *but);
float ui_block_calc_pie_segment(struct uiBlock *block, const float event_xy[2]);
-void ui_but_add_shortcut(uiBut *but, const char *key_str, const bool do_strip);
+void ui_but_add_shortcut(uiBut *but, const char *shortcut_str, const bool do_strip);
void ui_but_clipboard_free(void);
bool ui_but_rna_equals(const uiBut *a, const uiBut *b);
bool ui_but_rna_equals_ex(const uiBut *but,
@@ -886,7 +886,7 @@ bool ui_but_rna_equals_ex(const uiBut *but,
const PropertyRNA *prop,
int index);
uiBut *ui_but_find_old(uiBlock *block_old, const uiBut *but_new);
-uiBut *ui_but_find_new(uiBlock *block_old, const uiBut *but_new);
+uiBut *ui_but_find_new(uiBlock *block_new, const uiBut *but_old);
#ifdef WITH_INPUT_IME
void ui_but_ime_reposition(uiBut *but, int x, int y, bool complete);
diff --git a/source/blender/editors/interface/interface_region_popover.c b/source/blender/editors/interface/interface_region_popover.c
index 9ef68e9e187..80776c8d26e 100644
--- a/source/blender/editors/interface/interface_region_popover.c
+++ b/source/blender/editors/interface/interface_region_popover.c
@@ -340,13 +340,13 @@ int UI_popover_panel_invoke(bContext *C, const char *idname, bool keep_open, Rep
* \param from_active_button: Use the active button for positioning,
* use when the popover is activated from an operator instead of directly from the button.
*/
-uiPopover *UI_popover_begin(bContext *C, int ui_size_x, bool from_active_button)
+uiPopover *UI_popover_begin(bContext *C, int ui_menu_width, bool from_active_button)
{
uiPopover *pup = MEM_callocN(sizeof(uiPopover), "popover menu");
- if (ui_size_x == 0) {
- ui_size_x = U.widget_unit * UI_POPOVER_WIDTH_UNITS;
+ if (ui_menu_width == 0) {
+ ui_menu_width = U.widget_unit * UI_POPOVER_WIDTH_UNITS;
}
- pup->ui_size_x = ui_size_x;
+ pup->ui_size_x = ui_menu_width;
ARegion *butregion = NULL;
uiBut *but = NULL;
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 6facee77c1e..515fbab86bc 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -258,7 +258,7 @@ static void knife_input_ray_segment(KnifeTool_OpData *kcd,
const float mval[2],
const float ofs,
float r_origin[3],
- float r_dest[3]);
+ float r_origin_ofs[3]);
static bool knife_verts_edge_in_face(KnifeVert *v1, KnifeVert *v2, BMFace *f);
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index e98c7a18361..bdd5094a9ef 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -576,22 +576,22 @@ static int constraint_type_get(Object *owner, bPoseChannel *pchan)
/* checks validity of object pointers, and NULLs,
* if Bone doesn't exist it sets the CONSTRAINT_DISABLE flag.
*/
-static void test_constraints(Main *bmain, Object *owner, bPoseChannel *pchan)
+static void test_constraints(Main *bmain, Object *ob, bPoseChannel *pchan)
{
bConstraint *curcon;
ListBase *conlist = NULL;
int type;
- if (owner == NULL) {
+ if (ob == NULL) {
return;
}
- type = constraint_type_get(owner, pchan);
+ type = constraint_type_get(ob, pchan);
/* Get the constraint list for this object */
switch (type) {
case CONSTRAINT_OBTYPE_OBJECT:
- conlist = &owner->constraints;
+ conlist = &ob->constraints;
break;
case CONSTRAINT_OBTYPE_BONE:
conlist = &pchan->constraints;
@@ -601,46 +601,46 @@ static void test_constraints(Main *bmain, Object *owner, bPoseChannel *pchan)
/* Check all constraints - is constraint valid? */
if (conlist) {
for (curcon = conlist->first; curcon; curcon = curcon->next) {
- test_constraint(bmain, owner, pchan, curcon, type);
+ test_constraint(bmain, ob, pchan, curcon, type);
}
}
}
-void object_test_constraints(Main *bmain, Object *owner)
+void object_test_constraints(Main *bmain, Object *ob)
{
- if (owner->constraints.first) {
- test_constraints(bmain, owner, NULL);
+ if (ob->constraints.first) {
+ test_constraints(bmain, ob, NULL);
}
- if (owner->type == OB_ARMATURE && owner->pose) {
+ if (ob->type == OB_ARMATURE && ob->pose) {
bPoseChannel *pchan;
- for (pchan = owner->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (pchan->constraints.first) {
- test_constraints(bmain, owner, pchan);
+ test_constraints(bmain, ob, pchan);
}
}
}
}
-static void object_test_constraint(Main *bmain, Object *owner, bConstraint *con)
+static void object_test_constraint(Main *bmain, Object *ob, bConstraint *con)
{
- if (owner->type == OB_ARMATURE && owner->pose) {
- if (BLI_findindex(&owner->constraints, con) != -1) {
- test_constraint(bmain, owner, NULL, con, CONSTRAINT_OBTYPE_OBJECT);
+ if (ob->type == OB_ARMATURE && ob->pose) {
+ if (BLI_findindex(&ob->constraints, con) != -1) {
+ test_constraint(bmain, ob, NULL, con, CONSTRAINT_OBTYPE_OBJECT);
}
else {
bPoseChannel *pchan;
- for (pchan = owner->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
if (BLI_findindex(&pchan->constraints, con) != -1) {
- test_constraint(bmain, owner, pchan, con, CONSTRAINT_OBTYPE_BONE);
+ test_constraint(bmain, ob, pchan, con, CONSTRAINT_OBTYPE_BONE);
break;
}
}
}
}
else {
- test_constraint(bmain, owner, NULL, con, CONSTRAINT_OBTYPE_OBJECT);
+ test_constraint(bmain, ob, NULL, con, CONSTRAINT_OBTYPE_OBJECT);
}
}
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index a5b5e222ae9..a03e65d8a9d 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -41,7 +41,7 @@ struct bContextDataResult;
/* area.c */
void ED_area_data_copy(ScrArea *area_dst, ScrArea *area_src, const bool do_free);
-void ED_area_data_swap(ScrArea *sa1, ScrArea *sa2);
+void ED_area_data_swap(ScrArea *area_dst, ScrArea *area_src);
void region_toggle_hidden(struct bContext *C, ARegion *region, const bool do_fade);
/* screen_edit.c */
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 65f78a2d988..a1894e1b4c6 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -214,15 +214,15 @@ void paint_2d_gradient_fill(const struct bContext *C,
void *ps);
void *paint_proj_new_stroke(struct bContext *C, struct Object *ob, const float mouse[2], int mode);
void paint_proj_stroke(const struct bContext *C,
- void *ps,
- const float prevmval_i[2],
- const float mval_i[2],
+ void *ps_handle_p,
+ const float prev_pos[2],
+ const float pos[2],
const bool eraser,
float pressure,
float distance,
float size);
-void paint_proj_redraw(const struct bContext *C, void *pps, bool final);
-void paint_proj_stroke_done(void *ps);
+void paint_proj_redraw(const struct bContext *C, void *ps_handle_p, bool final);
+void paint_proj_stroke_done(void *ps_handle_p);
void paint_brush_color_get(struct Scene *scene,
struct Brush *br,
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 53937e7a743..051b811b001 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -51,7 +51,7 @@ void folderlist_free(struct ListBase *folderlist);
struct ListBase *folderlist_duplicate(ListBase *folderlist);
void folderlist_popdir(struct ListBase *folderlist, char *dir);
void folderlist_pushdir(struct ListBase *folderlist, const char *dir);
-const char *folderlist_peeklastdir(struct ListBase *folderdist);
+const char *folderlist_peeklastdir(struct ListBase *folderlist);
int folderlist_clear_next(struct SpaceFile *sfile);
void filelist_setsorting(struct FileList *filelist, const short sort, bool invert_sort);
diff --git a/source/blender/editors/space_file/fsmenu.c b/source/blender/editors/space_file/fsmenu.c
index b1c94c2668f..0b3c98a392e 100644
--- a/source/blender/editors/space_file/fsmenu.c
+++ b/source/blender/editors/space_file/fsmenu.c
@@ -241,13 +241,13 @@ int ED_fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category)
return count;
}
-FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int index)
+FSMenuEntry *ED_fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
{
FSMenuEntry *fsm_iter;
- for (fsm_iter = ED_fsmenu_get_category(fsmenu, category); fsm_iter && index;
+ for (fsm_iter = ED_fsmenu_get_category(fsmenu, category); fsm_iter && idx;
fsm_iter = fsm_iter->next) {
- index--;
+ idx--;
}
return fsm_iter;
diff --git a/source/blender/editors/space_file/fsmenu.h b/source/blender/editors/space_file/fsmenu.h
index c4af27a25aa..6296314d40a 100644
--- a/source/blender/editors/space_file/fsmenu.h
+++ b/source/blender/editors/space_file/fsmenu.h
@@ -48,10 +48,10 @@ void fsmenu_insert_entry(struct FSMenu *fsmenu,
void fsmenu_entry_refresh_valid(struct FSMenuEntry *fsentry);
/** Return whether the entry was created by the user and can be saved and deleted */
-short fsmenu_can_save(struct FSMenu *fsmenu, enum FSMenuCategory category, int index);
+short fsmenu_can_save(struct FSMenu *fsmenu, enum FSMenuCategory category, int idx);
/** Removes the fsmenu entry at the given \a index. */
-void fsmenu_remove_entry(struct FSMenu *fsmenu, enum FSMenuCategory category, int index);
+void fsmenu_remove_entry(struct FSMenu *fsmenu, enum FSMenuCategory category, int idx);
/** saves the 'bookmarks' to the specified file */
void fsmenu_write_file(struct FSMenu *fsmenu, const char *filename);
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index d00e911e3fc..c39ffdf42ed 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -83,7 +83,7 @@ void get_graph_keyframe_extents(struct bAnimContext *ac,
float *xmax,
float *ymin,
float *ymax,
- const bool do_selected,
+ const bool do_sel_only,
const bool include_handles);
void GRAPH_OT_previewrange_set(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index 595da97c75a..414bce29502 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -258,10 +258,10 @@ static int info_textview_main__internal(const SpaceInfo *sinfo,
void *info_text_pick(const SpaceInfo *sinfo,
const ARegion *region,
const ReportList *reports,
- int mval_y)
+ int mouse_y)
{
void *mval_pick_item = NULL;
- const int mval[2] = {0, mval_y};
+ const int mval[2] = {0, mouse_y};
info_textview_main__internal(sinfo, region, reports, false, mval, &mval_pick_item, NULL);
return (void *)mval_pick_item;
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index eae8bd05a93..206167869ed 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -556,35 +556,35 @@ void ED_node_composit_default(const bContext *C, struct Scene *sce)
/* assumes nothing being done in ntree yet, sets the default in/out node */
/* called from shading buttons or header */
-void ED_node_texture_default(const bContext *C, Tex *tx)
+void ED_node_texture_default(const bContext *C, Tex *tex)
{
bNode *in, *out;
bNodeSocket *fromsock, *tosock;
/* but lets check it anyway */
- if (tx->nodetree) {
+ if (tex->nodetree) {
if (G.debug & G_DEBUG) {
printf("error in texture initialize\n");
}
return;
}
- tx->nodetree = ntreeAddTree(NULL, "Texture Nodetree", ntreeType_Texture->idname);
+ tex->nodetree = ntreeAddTree(NULL, "Texture Nodetree", ntreeType_Texture->idname);
- out = nodeAddStaticNode(C, tx->nodetree, TEX_NODE_OUTPUT);
+ out = nodeAddStaticNode(C, tex->nodetree, TEX_NODE_OUTPUT);
out->locx = 300.0f;
out->locy = 300.0f;
- in = nodeAddStaticNode(C, tx->nodetree, TEX_NODE_CHECKER);
+ in = nodeAddStaticNode(C, tex->nodetree, TEX_NODE_CHECKER);
in->locx = 10.0f;
in->locy = 300.0f;
- nodeSetActive(tx->nodetree, in);
+ nodeSetActive(tex->nodetree, in);
fromsock = in->outputs.first;
tosock = out->inputs.first;
- nodeAddLink(tx->nodetree, in, fromsock, out, tosock);
+ nodeAddLink(tex->nodetree, in, fromsock, out, tosock);
- ntreeUpdateTree(CTX_data_main(C), tx->nodetree);
+ ntreeUpdateTree(CTX_data_main(C), tex->nodetree);
}
/* Here we set the active tree(s), even called for each redraw now, so keep it fast :) */
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c
index 654bb94cc78..c5be96470ec 100644
--- a/source/blender/editors/space_node/node_templates.c
+++ b/source/blender/editors/space_node/node_templates.c
@@ -664,7 +664,7 @@ static void ui_template_node_link_menu(bContext *C, uiLayout *layout, void *but_
}
void uiTemplateNodeLink(
- uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *sock)
+ uiLayout *layout, bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *input)
{
uiBlock *block = uiLayoutGetBlock(layout);
NodeLinkArg *arg;
@@ -674,17 +674,17 @@ void uiTemplateNodeLink(
arg = MEM_callocN(sizeof(NodeLinkArg), "NodeLinkArg");
arg->ntree = ntree;
arg->node = node;
- arg->sock = sock;
+ arg->sock = input;
PointerRNA node_ptr;
RNA_pointer_create((ID *)ntree, &RNA_Node, node, &node_ptr);
- node_socket_color_get(C, ntree, &node_ptr, sock, socket_col);
+ node_socket_color_get(C, ntree, &node_ptr, input, socket_col);
UI_block_layout_set_current(block, layout);
- if (sock->link || sock->type == SOCK_SHADER || (sock->flag & SOCK_HIDE_VALUE)) {
+ if (input->link || input->type == SOCK_SHADER || (input->flag & SOCK_HIDE_VALUE)) {
char name[UI_MAX_NAME_STR];
- ui_node_sock_name(ntree, sock, name);
+ ui_node_sock_name(ntree, input, name);
but = uiDefMenuBut(
block, ui_template_node_link_menu, NULL, name, 0, 0, UI_UNIT_X * 4, UI_UNIT_Y, "");
}
@@ -694,14 +694,14 @@ void uiTemplateNodeLink(
}
UI_but_type_set_menu_from_pulldown(but);
- UI_but_node_link_set(but, sock, socket_col);
+ UI_but_node_link_set(but, input, socket_col);
UI_but_drawflag_enable(but, UI_BUT_ICON_LEFT);
but->poin = (char *)but;
but->func_argN = arg;
- if (sock->link && sock->link->fromnode) {
- if (sock->link->fromnode->flag & NODE_ACTIVE_TEXTURE) {
+ if (input->link && input->link->fromnode) {
+ if (input->link->fromnode->flag & NODE_ACTIVE_TEXTURE) {
but->flag |= UI_BUT_NODE_ACTIVE;
}
}
diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h
index bd283777397..7e7fdf4bab2 100644
--- a/source/blender/editors/space_outliner/outliner_intern.h
+++ b/source/blender/editors/space_outliner/outliner_intern.h
@@ -495,7 +495,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *space_outliner,
TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner,
const TreeElement *parent_te,
float view_co_x,
- bool *multiple_objects);
+ bool *row_merged);
TreeElement *outliner_find_tse(struct SpaceOutliner *space_outliner, const TreeStoreElem *tse);
TreeElement *outliner_find_tree_element(ListBase *lb, const TreeStoreElem *store_elem);
TreeElement *outliner_find_parent_element(ListBase *lb,
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 2a13f9d6a66..01b6e636ded 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -981,7 +981,7 @@ static void singleuser_world_fn(bContext *C,
}
/**
- * \param select_recurse: Set to false for operations which are already
+ * \param recurse_selected: Set to false for operations which are already
* recursively operating on their children.
*/
void outliner_do_object_operation_ex(bContext *C,
@@ -991,7 +991,7 @@ void outliner_do_object_operation_ex(bContext *C,
ListBase *lb,
outliner_operation_fn operation_fn,
void *user_data,
- bool select_recurse)
+ bool recurse_selected)
{
TreeElement *te;
for (te = lb->first; te; te = te->next) {
@@ -1013,7 +1013,7 @@ void outliner_do_object_operation_ex(bContext *C,
}
}
if (TSELEM_OPEN(tselem, space_outliner)) {
- if ((select_handled == false) || select_recurse) {
+ if ((select_handled == false) || recurse_selected) {
outliner_do_object_operation_ex(C,
reports,
scene_act,
@@ -1021,7 +1021,7 @@ void outliner_do_object_operation_ex(bContext *C,
&te->subtree,
operation_fn,
NULL,
- select_recurse);
+ recurse_selected);
}
}
}
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c
index 25dc7bc271e..8ec1db9a928 100644
--- a/source/blender/editors/space_outliner/outliner_utils.c
+++ b/source/blender/editors/space_outliner/outliner_utils.c
@@ -113,7 +113,7 @@ TreeElement *outliner_find_item_at_y(const SpaceOutliner *space_outliner,
static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *parent_te,
float view_co_x,
- bool *r_merged)
+ bool *row_merged)
{
TreeElement *child_te = parent_te->subtree.first;
@@ -125,13 +125,13 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
return child_te;
}
if ((child_te->flag & TE_ICONROW_MERGED) && over_element) {
- if (r_merged) {
- *r_merged = true;
+ if (row_merged) {
+ *row_merged = true;
}
return child_te;
}
- TreeElement *te = outliner_find_item_at_x_in_row_recursive(child_te, view_co_x, r_merged);
+ TreeElement *te = outliner_find_item_at_x_in_row_recursive(child_te, view_co_x, row_merged);
if (te != child_te) {
return te;
}
@@ -152,11 +152,11 @@ static TreeElement *outliner_find_item_at_x_in_row_recursive(const TreeElement *
TreeElement *outliner_find_item_at_x_in_row(const SpaceOutliner *space_outliner,
const TreeElement *parent_te,
float view_co_x,
- bool *r_merged)
+ bool *row_merged)
{
/* if parent_te is opened, it doesn't show children in row */
if (!TSELEM_OPEN(TREESTORE(parent_te), space_outliner)) {
- return outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, r_merged);
+ return outliner_find_item_at_x_in_row_recursive(parent_te, view_co_x, row_merged);
}
return (TreeElement *)parent_te;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 298ed927b44..2f094661863 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1764,7 +1764,7 @@ void sequencer_draw_preview(const bContext *C,
ARegion *region,
SpaceSeq *sseq,
int cfra,
- int frame_ofs,
+ int offset,
bool draw_overlay,
bool draw_backdrop)
{
@@ -1785,7 +1785,7 @@ void sequencer_draw_preview(const bContext *C,
/* Get image. */
ibuf = sequencer_ibuf_get(
- bmain, region, depsgraph, scene, sseq, cfra, frame_ofs, names[sseq->multiview_eye]);
+ bmain, region, depsgraph, scene, sseq, cfra, offset, names[sseq->multiview_eye]);
/* Setup off-screen buffers. */
GPUViewport *viewport = WM_draw_region_get_viewport(region);
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index ba573032350..58a6f274310 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -398,17 +398,17 @@ static void draw_zebra_float(ImBuf *src, ImBuf *ibuf, float perc)
}
}
-ImBuf *make_zebra_view_from_ibuf(ImBuf *src, float perc)
+ImBuf *make_zebra_view_from_ibuf(ImBuf *ibuf, float perc)
{
- ImBuf *ibuf = IMB_allocImBuf(src->x, src->y, 32, IB_rect);
+ ImBuf *new_ibuf = IMB_allocImBuf(ibuf->x, ibuf->y, 32, IB_rect);
- if (src->rect_float) {
- draw_zebra_float(src, ibuf, perc);
+ if (ibuf->rect_float) {
+ draw_zebra_float(ibuf, new_ibuf, perc);
}
else {
- draw_zebra_byte(src, ibuf, perc);
+ draw_zebra_byte(ibuf, new_ibuf, perc);
}
- return ibuf;
+ return new_ibuf;
}
static void draw_histogram_marker(ImBuf *ibuf, int x)
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index abafad4c241..e3c0e436ac4 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -82,7 +82,7 @@ void wrap_offset(const struct SpaceText *st,
int *offc);
void wrap_offset_in_line(const struct SpaceText *st,
struct ARegion *region,
- struct TextLine *linep,
+ struct TextLine *linein,
int cursin,
int *offl,
int *offc);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 5912bea4919..ab08c9a804a 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -284,7 +284,7 @@ static void viewops_data_alloc(bContext *C, wmOperator *op)
}
void view3d_orbit_apply_dyn_ofs(float r_ofs[3],
- const float ofs_init[3],
+ const float ofs_old[3],
const float viewquat_old[4],
const float viewquat_new[4],
const float dyn_ofs[3])
@@ -295,7 +295,7 @@ void view3d_orbit_apply_dyn_ofs(float r_ofs[3],
invert_qt_normalized(q);
- sub_v3_v3v3(r_ofs, ofs_init, dyn_ofs);
+ sub_v3_v3v3(r_ofs, ofs_old, dyn_ofs);
mul_qt_v3(q, r_ofs);
add_v3_v3(r_ofs, dyn_ofs);
}
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index 556b5d51505..6ce76c478df 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -229,7 +229,7 @@ typedef struct FlyInfo {
#ifdef WITH_INPUT_NDOF
static void flyApply_ndof(bContext *C, FlyInfo *fly, bool is_confirm);
#endif /* WITH_INPUT_NDOF */
-static int flyApply(bContext *C, struct FlyInfo *fly, bool force_autokey);
+static int flyApply(bContext *C, struct FlyInfo *fly, bool is_confirm);
static void drawFlyPixel(const struct bContext *UNUSED(C), ARegion *UNUSED(region), void *arg)
{
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index c790a8659ee..e073cb43962 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -73,13 +73,13 @@ void ED_view3d_project_float_v2_m4(const ARegion *region,
* \note use #ED_view3d_ob_project_mat_get to get projecting mat
*/
void ED_view3d_project_float_v3_m4(const ARegion *region,
- const float vec[3],
+ const float co[3],
float r_co[3],
float mat[4][4])
{
float vec4[4];
- copy_v3_v3(vec4, vec);
+ copy_v3_v3(vec4, co);
vec4[3] = 1.0;
/* r_co[0] = IS_CLIPPED; */ /* always overwritten */
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index 2fb44c29d2e..ef389918eb4 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -308,7 +308,7 @@ typedef struct WalkInfo {
#ifdef WITH_INPUT_NDOF
static void walkApply_ndof(bContext *C, WalkInfo *walk, bool is_confirm);
#endif /* WITH_INPUT_NDOF */
-static int walkApply(bContext *C, struct WalkInfo *walk, bool force_autokey);
+static int walkApply(bContext *C, struct WalkInfo *walk, bool is_confirm);
static float getVelocityZeroTime(const float gravity, const float velocity);
static void drawWalkPixel(const struct bContext *UNUSED(C), ARegion *region, void *arg)
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index 50e0bb1f1c2..d0e08c2c460 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -641,7 +641,7 @@ void ED_undo_operator_repeat_cb(bContext *C, void *arg_op, void *UNUSED(arg_unus
ED_undo_operator_repeat(C, (wmOperator *)arg_op);
}
-void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_event))
+void ED_undo_operator_repeat_cb_evt(bContext *C, void *arg_op, int UNUSED(arg_unused))
{
ED_undo_operator_repeat(C, (wmOperator *)arg_op);
}
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index ee1eb4f63bf..de021adb4f0 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -60,7 +60,7 @@ void param_face_add(ParamHandle *handle,
void param_edge_set_seam(ParamHandle *handle, ParamKey *vkeys);
void param_construct_end(ParamHandle *handle, ParamBool fill, ParamBool impl);
-void param_delete(ParamHandle *chart);
+void param_delete(ParamHandle *handle);
/* Least Squares Conformal Maps:
* -----------------------------
diff --git a/source/blender/freestyle/intern/application/Controller.cpp b/source/blender/freestyle/intern/application/Controller.cpp
index dea09b7620f..4628c76ca7f 100644
--- a/source/blender/freestyle/intern/application/Controller.cpp
+++ b/source/blender/freestyle/intern/application/Controller.cpp
@@ -835,9 +835,9 @@ bool Controller::getFaceSmoothness() const
return _EnableFaceSmoothness;
}
-void Controller::setComputeRidgesAndValleysFlag(bool iBool)
+void Controller::setComputeRidgesAndValleysFlag(bool b)
{
- _ComputeRidges = iBool;
+ _ComputeRidges = b;
}
bool Controller::getComputeRidgesAndValleysFlag() const
diff --git a/source/blender/freestyle/intern/geometry/GeomUtils.h b/source/blender/freestyle/intern/geometry/GeomUtils.h
index 46cd307d9af..62d57f01264 100644
--- a/source/blender/freestyle/intern/geometry/GeomUtils.h
+++ b/source/blender/freestyle/intern/geometry/GeomUtils.h
@@ -247,7 +247,7 @@ void fromImageToRetina(const Vec3r &p, Vec3r &q, const int viewport[4]);
* The projection matrix expressed in line major order (OpenGL
* matrices are column major ordered)
*/
-void fromRetinaToCamera(const Vec3r &p, Vec3r &q, real z, const real projection_matrix[4][4]);
+void fromRetinaToCamera(const Vec3r &p, Vec3r &q, real focal, const real projection_matrix[4][4]);
/*! Projects from camera coordinates to world coordinates
* Returns the point's coordinates expressed in the world's
diff --git a/source/blender/freestyle/intern/geometry/Grid.h b/source/blender/freestyle/intern/geometry/Grid.h
index b66f04398af..d0d92b62516 100644
--- a/source/blender/freestyle/intern/geometry/Grid.h
+++ b/source/blender/freestyle/intern/geometry/Grid.h
@@ -287,7 +287,7 @@ class Grid {
* This method is quite coarse insofar as it adds all cells intersecting the polygon bounding
* box convex_poly The list of 3D points constituting a convex polygon
*/
- void insertOccluder(Polygon3r *convex_poly);
+ void insertOccluder(Polygon3r *occluder);
/*! Adds an occluder to the list of occluders */
void addOccluder(Polygon3r *occluder)
diff --git a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
index 96375407256..abe3871c395 100644
--- a/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
+++ b/source/blender/freestyle/intern/stroke/AdvancedStrokeShaders.cpp
@@ -89,10 +89,10 @@ int CalligraphicShader::shade(Stroke &ioStroke) const
static const unsigned NB_VALUE_NOISE = 512;
SpatialNoiseShader::SpatialNoiseShader(
- float ioamount, float ixScale, int nbOctave, bool smooth, bool pureRandom)
+ float iAmount, float ixScale, int nbOctave, bool smooth, bool pureRandom)
: StrokeShader()
{
- _amount = ioamount;
+ _amount = iAmount;
if (ixScale == 0) {
_xScale = 0;
}
@@ -161,7 +161,7 @@ int SpatialNoiseShader::shade(Stroke &ioStroke) const
//
/////////////////////////////////////////
-SmoothingShader::SmoothingShader(int ionbIteration,
+SmoothingShader::SmoothingShader(int iNbIteration,
real iFactorPoint,
real ifactorCurvature,
real iFactorCurvatureDifference,
@@ -171,7 +171,7 @@ SmoothingShader::SmoothingShader(int ionbIteration,
real iCarricatureFactor)
: StrokeShader()
{
- _nbIterations = ionbIteration;
+ _nbIterations = iNbIteration;
_factorCurvature = ifactorCurvature;
_factorCurvatureDifference = iFactorCurvatureDifference;
_anisoNormal = iAnisoNormal;
diff --git a/source/blender/freestyle/intern/stroke/Canvas.h b/source/blender/freestyle/intern/stroke/Canvas.h
index 2bbd9c2682f..91676946b5d 100644
--- a/source/blender/freestyle/intern/stroke/Canvas.h
+++ b/source/blender/freestyle/intern/stroke/Canvas.h
@@ -243,7 +243,7 @@ class Canvas {
void resetModified(bool iMod = false);
void causalStyleModules(std::vector<unsigned> &vec, unsigned index = 0);
- void setModified(unsigned index, bool b);
+ void setModified(unsigned index, bool iMod);
#ifdef WITH_CXX_GUARDEDALLOC
MEM_CXX_CLASS_ALLOC_FUNCS("Freestyle:Canvas")
diff --git a/source/blender/freestyle/intern/stroke/Curve.h b/source/blender/freestyle/intern/stroke/Curve.h
index 518f4ff345b..91470b57ca2 100644
--- a/source/blender/freestyle/intern/stroke/Curve.h
+++ b/source/blender/freestyle/intern/stroke/Curve.h
@@ -212,20 +212,20 @@ class CurvePoint : public Interface0D {
* The first SVertex
* \param iB:
* The second SVertex
- * \param t2d:
+ * \param t:
* A 2D interpolation parameter used to linearly interpolate \a iA and \a iB
*/
- CurvePoint(SVertex *iA, SVertex *iB, float t2d);
+ CurvePoint(SVertex *iA, SVertex *iB, float t);
/*! Builds a CurvePoint from two CurvePoint and an interpolation parameter.
* \param iA:
* The first CurvePoint
* \param iB:
* The second CurvePoint
- * \param t2d:
+ * \param t:
* The 2D interpolation parameter used to linearly interpolate \a iA and \a iB.
*/
- CurvePoint(CurvePoint *iA, CurvePoint *iB, float t2d);
+ CurvePoint(CurvePoint *iA, CurvePoint *iB, float t);
// CurvePoint(SVertex *iA, SVertex *iB, float t2d, float t3d);
diff --git a/source/blender/freestyle/intern/stroke/Stroke.h b/source/blender/freestyle/intern/stroke/Stroke.h
index 71753b25328..5772b80b093 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.h
+++ b/source/blender/freestyle/intern/stroke/Stroke.h
@@ -835,7 +835,7 @@ class Stroke : public Interface1D {
// embedding vertex iterator
const_vertex_iterator vertices_begin() const;
- vertex_iterator vertices_begin(float t = 0.0f);
+ vertex_iterator vertices_begin(float sampling = 0.0f);
const_vertex_iterator vertices_end() const;
vertex_iterator vertices_end();
diff --git a/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp b/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
index a29d015b4c9..5b2beb8f068 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRenderer.cpp
@@ -89,12 +89,12 @@ void TextureManager::load()
_hasLoadedTextures = true;
}
-unsigned TextureManager::getBrushTextureIndex(string name, Stroke::MediumType loadingMode)
+unsigned TextureManager::getBrushTextureIndex(string name, Stroke::MediumType iType)
{
- BrushTexture bt(name, loadingMode);
+ BrushTexture bt(name, iType);
brushesMap::iterator b = _brushesMap.find(bt);
if (b == _brushesMap.end()) {
- unsigned texId = loadBrush(name, loadingMode);
+ unsigned texId = loadBrush(name, iType);
_brushesMap[bt] = texId;
return texId;
// XXX!
diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index fe12727b0c0..0c004e0083e 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -52,8 +52,8 @@ StrokeVertexRep::StrokeVertexRep(const StrokeVertexRep &iBrother)
Strip::Strip(const vector<StrokeVertex *> &iStrokeVertices,
bool hasTex,
- bool beginTip,
- bool endTip,
+ bool tipBegin,
+ bool tipEnd,
float texStep)
{
createStrip(iStrokeVertices);
@@ -63,7 +63,7 @@ Strip::Strip(const vector<StrokeVertex *> &iStrokeVertices,
if (hasTex) {
// We compute both kinds of coordinates to use different kinds of textures
computeTexCoord(iStrokeVertices, texStep);
- computeTexCoordWithTips(iStrokeVertices, beginTip, endTip, texStep);
+ computeTexCoordWithTips(iStrokeVertices, tipBegin, tipEnd, texStep);
}
}
diff --git a/source/blender/freestyle/intern/system/RandGen.h b/source/blender/freestyle/intern/system/RandGen.h
index e514f4cfc9f..f54a0035b62 100644
--- a/source/blender/freestyle/intern/system/RandGen.h
+++ b/source/blender/freestyle/intern/system/RandGen.h
@@ -34,7 +34,7 @@ namespace Freestyle {
class RandGen {
public:
static real drand48();
- static void srand48(long value);
+ static void srand48(long seedval);
private:
static void next();
diff --git a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
index c4115ee00c4..2373451f47c 100644
--- a/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
+++ b/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
@@ -73,17 +73,17 @@ class FEdgeXDetector {
virtual void processShapes(WingedEdge &);
// GENERAL STUFF
- virtual void preProcessShape(WXShape *iShape);
+ virtual void preProcessShape(WXShape *iWShape);
virtual void preProcessFace(WXFace *iFace);
virtual void computeCurvatures(WXVertex *iVertex);
// SILHOUETTE
- virtual void processSilhouetteShape(WXShape *iShape);
+ virtual void processSilhouetteShape(WXShape *iWShape);
virtual void ProcessSilhouetteFace(WXFace *iFace);
virtual void ProcessSilhouetteEdge(WXEdge *iEdge);
// CREASE
- virtual void processCreaseShape(WXShape *iShape);
+ virtual void processCreaseShape(WXShape *iWShape);
virtual void ProcessCreaseEdge(WXEdge *iEdge);
/*! Sets the minimum angle for detecting crease edges
@@ -109,15 +109,15 @@ class FEdgeXDetector {
}
// BORDER
- virtual void processBorderShape(WXShape *iShape);
+ virtual void processBorderShape(WXShape *iWShape);
virtual void ProcessBorderEdge(WXEdge *iEdge);
// RIDGES AND VALLEYS
- virtual void processRidgesAndValleysShape(WXShape *iShape);
+ virtual void processRidgesAndValleysShape(WXShape *iWShape);
virtual void ProcessRidgeFace(WXFace *iFace);
// SUGGESTIVE CONTOURS
- virtual void processSuggestiveContourShape(WXShape *iShape);
+ virtual void processSuggestiveContourShape(WXShape *iWShape);
virtual void ProcessSuggestiveContourFace(WXFace *iFace);
virtual void postProcessSuggestiveContourShape(WXShape *iShape);
virtual void postProcessSuggestiveContourFace(WXFace *iFace);
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
index 7549ebcb258..7790dd64cf5 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.cpp
@@ -146,9 +146,8 @@ double *SteerableViewMap::AddFEdge(FEdge *iFEdge)
return res;
}
-unsigned SteerableViewMap::getSVMNumber(const Vec2f &orient)
+unsigned SteerableViewMap::getSVMNumber(Vec2f dir)
{
- Vec2f dir(orient);
// soc unsigned res = 0;
real norm = dir.norm();
if (norm < 1.0e-6) {
diff --git a/source/blender/freestyle/intern/view_map/SteerableViewMap.h b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
index 65633fd85d4..e03400dbbc0 100644
--- a/source/blender/freestyle/intern/view_map/SteerableViewMap.h
+++ b/source/blender/freestyle/intern/view_map/SteerableViewMap.h
@@ -78,7 +78,7 @@ class SteerableViewMap {
* \param dir:
* The direction
*/
- unsigned getSVMNumber(const Vec2f &dir);
+ unsigned getSVMNumber(Vec2f dir);
/*! Returns the number of the SVM to which a FEdge belongs most.
* \param id:
diff --git a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
index f6f54a2d87d..1fce4f4a965 100644
--- a/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
+++ b/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
@@ -264,7 +264,7 @@ class ViewEdgeXBuilder {
// SHARP //
/*! checks whether a WEdge has already been processed or not */
- bool stopSharpViewEdge(WXEdge *iFace);
+ bool stopSharpViewEdge(WXEdge *iEdge);
int retrieveFaceMarks(WXEdge *iEdge);
OWXEdge FindNextWEdge(const OWXEdge &iEdge);
OWXEdge FindPreviousWEdge(const OWXEdge &iEdge);
diff --git a/source/blender/freestyle/intern/view_map/ViewMap.h b/source/blender/freestyle/intern/view_map/ViewMap.h
index e5e49f17ca5..1c959c43481 100644
--- a/source/blender/freestyle/intern/view_map/ViewMap.h
+++ b/source/blender/freestyle/intern/view_map/ViewMap.h
@@ -153,7 +153,7 @@ class ViewMap {
return _VEdges.size();
}
- ViewShape *viewShape(unsigned index);
+ ViewShape *viewShape(unsigned id);
id_to_index_map &shapeIdToIndexMap()
{
diff --git a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
index 54de3321b80..a1f76c120fb 100644
--- a/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
+++ b/source/blender/freestyle/intern/view_map/ViewMapTesselator.cpp
@@ -33,7 +33,7 @@ NodeGroup *ViewMapTesselator::Tesselate(ViewMap *iViewMap)
return Tesselate(viewedges.begin(), viewedges.end());
}
-NodeGroup *ViewMapTesselator::Tesselate(WShape *UNUSED(shape))
+NodeGroup *ViewMapTesselator::Tesselate(WShape *UNUSED(iWShape))
{
return NULL;
}
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.h b/source/blender/freestyle/intern/winged_edge/Curvature.h
index 9ecc92df2ac..d73674d02cd 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.h
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.h
@@ -122,7 +122,7 @@ class Face_Curvature_Info {
#endif
};
-bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &n);
+bool gts_vertex_mean_curvature_normal(WVertex *v, Vec3r &Kh);
bool gts_vertex_gaussian_curvature(WVertex *v, real *Kg);
diff --git a/source/blender/gpu/GPU_batch.h b/source/blender/gpu/GPU_batch.h
index b45898f9c6a..e00aac85655 100644
--- a/source/blender/gpu/GPU_batch.h
+++ b/source/blender/gpu/GPU_batch.h
@@ -96,12 +96,12 @@ GPUBatch *GPU_batch_calloc(void);
GPUBatch *GPU_batch_create_ex(GPUPrimType prim,
GPUVertBuf *vert,
GPUIndexBuf *elem,
- eGPUBatchFlag own_flag);
+ eGPUBatchFlag owns_flag);
void GPU_batch_init_ex(GPUBatch *batch,
GPUPrimType prim,
GPUVertBuf *vert,
GPUIndexBuf *elem,
- eGPUBatchFlag own_flag);
+ eGPUBatchFlag owns_flag);
void GPU_batch_copy(GPUBatch *batch_dst, GPUBatch *batch_src);
#define GPU_batch_create(prim, verts, elem) GPU_batch_create_ex(prim, verts, elem, 0)
diff --git a/source/blender/gpu/GPU_buffers.h b/source/blender/gpu/GPU_buffers.h
index 23349728f25..25e9625a0b3 100644
--- a/source/blender/gpu/GPU_buffers.h
+++ b/source/blender/gpu/GPU_buffers.h
@@ -52,9 +52,9 @@ typedef struct GPU_PBVH_Buffers GPU_PBVH_Buffers;
GPU_PBVH_Buffers *GPU_pbvh_mesh_buffers_build(const struct MPoly *mpoly,
const struct MLoop *mloop,
const struct MLoopTri *looptri,
- const struct MVert *verts,
+ const struct MVert *mvert,
const int *face_indices,
- const int *sculpt_facemap,
+ const int *sculpt_face_sets,
const int face_indices_len,
const struct Mesh *mesh);
diff --git a/source/blender/gpu/GPU_element.h b/source/blender/gpu/GPU_element.h
index 5cf85b4ea0e..8872080003c 100644
--- a/source/blender/gpu/GPU_element.h
+++ b/source/blender/gpu/GPU_element.h
@@ -94,9 +94,9 @@ GPUIndexBuf *GPU_indexbuf_build(GPUIndexBufBuilder *);
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, GPUIndexBuf *);
/* Create a subrange of an existing indexbuffer. */
-GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *ibo, uint start, uint length);
-void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *r_ibo,
- GPUIndexBuf *ibo,
+GPUIndexBuf *GPU_indexbuf_create_subrange(GPUIndexBuf *elem_src, uint start, uint length);
+void GPU_indexbuf_create_subrange_in_place(GPUIndexBuf *elem,
+ GPUIndexBuf *elem_src,
uint start,
uint length);
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index 708ea291cd1..aca7156fa5b 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -217,7 +217,7 @@ GPUOffScreen *GPU_offscreen_create(
void GPU_offscreen_free(GPUOffScreen *ofs);
void GPU_offscreen_bind(GPUOffScreen *ofs, bool save);
void GPU_offscreen_unbind(GPUOffScreen *ofs, bool restore);
-void GPU_offscreen_read_pixels(GPUOffScreen *ofs, eGPUDataFormat type, void *pixels);
+void GPU_offscreen_read_pixels(GPUOffScreen *ofs, eGPUDataFormat format, void *pixels);
void GPU_offscreen_draw_to_screen(GPUOffScreen *ofs, int x, int y);
int GPU_offscreen_width(const GPUOffScreen *ofs);
int GPU_offscreen_height(const GPUOffScreen *ofs);
diff --git a/source/blender/gpu/GPU_immediate_util.h b/source/blender/gpu/GPU_immediate_util.h
index 7786bcd2d06..3ea809d59a7 100644
--- a/source/blender/gpu/GPU_immediate_util.h
+++ b/source/blender/gpu/GPU_immediate_util.h
@@ -44,9 +44,9 @@ void imm_draw_circle_wire_2d(uint shdr_pos, float x, float y, float radius, int
void imm_draw_circle_fill_2d(uint shdr_pos, float x, float y, float radius, int nsegments);
void imm_draw_circle_wire_aspect_2d(
- uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments);
+ uint shdr_pos, float x, float y, float rad_x, float rad_y, int nsegments);
void imm_draw_circle_fill_aspect_2d(
- uint shdr_pos, float x, float y, float radius_x, float radius_y, int nsegments);
+ uint shdr_pos, float x, float y, float rad_x, float rad_y, int nsegments);
/* use this version when GPUVertFormat has a vec3 position */
void imm_draw_circle_wire_3d(uint pos, float x, float y, float radius, int nsegments);
@@ -60,8 +60,8 @@ void imm_draw_circle_partial_wire_2d(
void imm_draw_disk_partial_fill_2d(uint pos,
float x,
float y,
- float radius_inner,
- float radius_outer,
+ float rad_inner,
+ float rad_outer,
int nsegments,
float start,
float sweep);
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index 12152a937d9..2f12625acac 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -152,7 +152,7 @@ GPUNodeLink *GPU_image_tiled(GPUMaterial *mat,
struct ImageUser *iuser,
eGPUSamplerState sampler_state);
GPUNodeLink *GPU_image_tiled_mapping(GPUMaterial *mat, struct Image *ima, struct ImageUser *iuser);
-GPUNodeLink *GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *layer);
+GPUNodeLink *GPU_color_band(GPUMaterial *mat, int size, float *pixels, float *row);
GPUNodeLink *GPU_volume_grid(GPUMaterial *mat,
const char *name,
eGPUVolumeDefaultValue default_value);
diff --git a/source/blender/gpu/GPU_shader.h b/source/blender/gpu/GPU_shader.h
index 33fef266c42..64695dfe3fb 100644
--- a/source/blender/gpu/GPU_shader.h
+++ b/source/blender/gpu/GPU_shader.h
@@ -41,26 +41,26 @@ typedef enum eGPUShaderTFBType {
GPU_SHADER_TFB_TRIANGLES = 3,
} eGPUShaderTFBType;
-GPUShader *GPU_shader_create(const char *vertexcode,
+GPUShader *GPU_shader_create(const char *vertcode,
const char *fragcode,
- const char *geocode,
+ const char *geomcode,
const char *libcode,
const char *defines,
- const char *shader_name);
-GPUShader *GPU_shader_create_from_python(const char *vertexcode,
+ const char *shname);
+GPUShader *GPU_shader_create_from_python(const char *vertcode,
const char *fragcode,
- const char *geocode,
+ const char *geomcode,
const char *libcode,
const char *defines);
-GPUShader *GPU_shader_create_ex(const char *vertexcode,
+GPUShader *GPU_shader_create_ex(const char *vertcode,
const char *fragcode,
- const char *geocode,
+ const char *geomcode,
const char *libcode,
const char *defines,
const eGPUShaderTFBType tf_type,
const char **tf_names,
const int tf_count,
- const char *shader_name);
+ const char *shname);
struct GPU_ShaderCreateFromArray_Params {
const char **vert, **geom, **frag, **defs;
diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h
index 253877bcca0..869e8c32861 100644
--- a/source/blender/gpu/GPU_state.h
+++ b/source/blender/gpu/GPU_state.h
@@ -130,7 +130,7 @@ void GPU_depth_mask(bool depth);
bool GPU_depth_mask_get(void);
void GPU_unpack_row_length_set(uint len);
void GPU_shadow_offset(bool enable);
-void GPU_clip_distances(int enabled_len);
+void GPU_clip_distances(int distances_enabled);
bool GPU_mipmap_enabled(void);
void GPU_state_set(eGPUWriteMask write_mask,
eGPUBlend blend,
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index e75ba867662..8cc5936fac9 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -202,32 +202,32 @@ GPUTexture *GPU_texture_cube_create(int w,
char err_out[256]);
GPUTexture *GPU_texture_create_1d(int w,
- eGPUTextureFormat data_type,
+ eGPUTextureFormat tex_format,
const float *pixels,
char err_out[256]);
GPUTexture *GPU_texture_create_1d_array(
- int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
+ int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_2d(
- int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
+ int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_2d_multisample(int w,
int h,
- eGPUTextureFormat data_type,
+ eGPUTextureFormat tex_format,
const float *pixels,
int samples,
char err_out[256]);
GPUTexture *GPU_texture_create_2d_array(
- int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
+ int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_3d(
- int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
+ int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_cube(int w,
- eGPUTextureFormat data_type,
+ eGPUTextureFormat tex_format,
const float *pixels,
char err_out[256]);
GPUTexture *GPU_texture_create_cube_array(
- int w, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
+ int w, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_from_vertbuf(struct GPUVertBuf *vert);
-GPUTexture *GPU_texture_create_buffer(eGPUTextureFormat data_type, const uint buffer);
+GPUTexture *GPU_texture_create_buffer(eGPUTextureFormat tex_format, const uint buffer);
GPUTexture *GPU_texture_create_compressed(
int w, int h, int miplen, eGPUTextureFormat format, const void *data);
@@ -260,7 +260,7 @@ void GPU_invalid_tex_free(void);
void GPU_texture_free(GPUTexture *tex);
void GPU_texture_ref(GPUTexture *tex);
-void GPU_texture_bind(GPUTexture *tex, int number);
+void GPU_texture_bind(GPUTexture *tex, int unit);
void GPU_texture_bind_ex(GPUTexture *tex, eGPUSamplerState state, int unit, const bool set_number);
void GPU_texture_unbind(GPUTexture *tex);
void GPU_texture_unbind_all(void);
@@ -298,7 +298,7 @@ int GPU_texture_opengl_bindcode(const GPUTexture *tex);
void GPU_texture_get_mipmap_size(GPUTexture *tex, int lvl, int *size);
-void GPU_sampler_icon_bind(int number);
+void GPU_sampler_icon_bind(int unit);
#ifdef __cplusplus
}
diff --git a/source/blender/gpu/GPU_uniform_buffer.h b/source/blender/gpu/GPU_uniform_buffer.h
index 4a00dda634d..605e2b14434 100644
--- a/source/blender/gpu/GPU_uniform_buffer.h
+++ b/source/blender/gpu/GPU_uniform_buffer.h
@@ -50,7 +50,7 @@ void GPU_uniformbuf_free(GPUUniformBuf *ubo);
void GPU_uniformbuf_update(GPUUniformBuf *ubo, const void *data);
-void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int number);
+void GPU_uniformbuf_bind(GPUUniformBuf *ubo, int slot);
void GPU_uniformbuf_unbind(GPUUniformBuf *ubo);
void GPU_uniformbuf_unbind_all(void);
diff --git a/source/blender/gpu/GPU_viewport.h b/source/blender/gpu/GPU_viewport.h
index c3e2f1788b4..7b0d8c274d3 100644
--- a/source/blender/gpu/GPU_viewport.h
+++ b/source/blender/gpu/GPU_viewport.h
@@ -129,7 +129,7 @@ ViewportMemoryPool *GPU_viewport_mempool_get(GPUViewport *viewport);
struct DRWInstanceDataList *GPU_viewport_instance_data_list_get(GPUViewport *viewport);
void *GPU_viewport_engine_data_create(GPUViewport *viewport, void *engine_type);
-void *GPU_viewport_engine_data_get(GPUViewport *viewport, void *engine_type);
+void *GPU_viewport_engine_data_get(GPUViewport *viewport, void *engine_handle);
void *GPU_viewport_framebuffer_list_get(GPUViewport *viewport);
void GPU_viewport_stereo_composite(GPUViewport *viewport, Stereo3dFormat *stereo_format);
void *GPU_viewport_texture_list_get(GPUViewport *viewport);
diff --git a/source/blender/gpu/intern/gpu_shader.cc b/source/blender/gpu/intern/gpu_shader.cc
index 360feb9a8c8..fd01160cff6 100644
--- a/source/blender/gpu/intern/gpu_shader.cc
+++ b/source/blender/gpu/intern/gpu_shader.cc
@@ -629,10 +629,10 @@ void GPU_shader_uniform_4f(GPUShader *sh, const char *name, float x, float y, fl
GPU_shader_uniform_4fv(sh, name, data);
}
-void GPU_shader_uniform_1f(GPUShader *sh, const char *name, float x)
+void GPU_shader_uniform_1f(GPUShader *sh, const char *name, float value)
{
const int loc = GPU_shader_get_uniform(sh, name);
- GPU_shader_uniform_float(sh, loc, x);
+ GPU_shader_uniform_float(sh, loc, value);
}
void GPU_shader_uniform_2fv(GPUShader *sh, const char *name, const float data[2])
diff --git a/source/blender/imbuf/IMB_colormanagement.h b/source/blender/imbuf/IMB_colormanagement.h
index 54f126684ae..f31839751b1 100644
--- a/source/blender/imbuf/IMB_colormanagement.h
+++ b/source/blender/imbuf/IMB_colormanagement.h
@@ -265,7 +265,7 @@ void IMB_colormanagement_colorspace_items_add(struct EnumPropertyItem **items, i
/* ** Tile-based buffer management ** */
void IMB_partial_display_buffer_update(struct ImBuf *ibuf,
const float *linear_buffer,
- const unsigned char *buffer_byte,
+ const unsigned char *byte_buffer,
int stride,
int offset_x,
int offset_y,
@@ -279,7 +279,7 @@ void IMB_partial_display_buffer_update(struct ImBuf *ibuf,
void IMB_partial_display_buffer_update_threaded(
struct ImBuf *ibuf,
const float *linear_buffer,
- const unsigned char *buffer_byte,
+ const unsigned char *byte_buffer,
int stride,
int offset_x,
int offset_y,
diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h
index 37046521dd8..8e243559a69 100644
--- a/source/blender/imbuf/IMB_imbuf.h
+++ b/source/blender/imbuf/IMB_imbuf.h
@@ -247,8 +247,8 @@ void IMB_rectclip(struct ImBuf *dbuf,
int *srcy,
int *width,
int *height);
-void IMB_rectcpy(struct ImBuf *drect,
- const struct ImBuf *srect,
+void IMB_rectcpy(struct ImBuf *dbuf,
+ const struct ImBuf *sbuf,
int destx,
int desty,
int srcx,
@@ -260,7 +260,7 @@ void IMB_rectblend(struct ImBuf *dbuf,
const struct ImBuf *sbuf,
unsigned short *dmask,
const unsigned short *curvemask,
- const unsigned short *mmask,
+ const unsigned short *texmask,
float mask_max,
int destx,
int desty,
@@ -277,7 +277,7 @@ void IMB_rectblend_threaded(struct ImBuf *dbuf,
const struct ImBuf *sbuf,
unsigned short *dmask,
const unsigned short *curvemask,
- const unsigned short *mmask,
+ const unsigned short *texmask,
float mask_max,
int destx,
int desty,
@@ -594,15 +594,15 @@ void bilinear_interpolation(
struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void bicubic_interpolation_color(
- struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+ struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v);
void nearest_interpolation_color(
- struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+ struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v);
void nearest_interpolation_color_wrap(
- struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+ struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v);
void bilinear_interpolation_color(
- struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+ struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v);
void bilinear_interpolation_color_wrap(
- struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
+ struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v);
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3]);
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, const float backcol[3]);
diff --git a/source/blender/imbuf/IMB_thumbs.h b/source/blender/imbuf/IMB_thumbs.h
index e8c244aaba7..a096301ed97 100644
--- a/source/blender/imbuf/IMB_thumbs.h
+++ b/source/blender/imbuf/IMB_thumbs.h
@@ -62,7 +62,7 @@ typedef enum ThumbSource {
struct ImBuf *IMB_thumb_create(const char *path,
ThumbSize size,
ThumbSource source,
- struct ImBuf *ibuf);
+ struct ImBuf *img);
/* read thumbnail for file and returns new imbuf for thumbnail */
struct ImBuf *IMB_thumb_read(const char *path, ThumbSize size);
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h
index 2b00b87d3d2..93a3a98c3d1 100644
--- a/source/blender/imbuf/intern/IMB_filetype.h
+++ b/source/blender/imbuf/intern/IMB_filetype.h
@@ -33,14 +33,14 @@ typedef struct ImFileType {
void (*exit)(void);
int (*is_a)(const unsigned char *buf);
- int (*is_a_filepath)(const char *name);
+ int (*is_a_filepath)(const char *filepath);
int (*ftype)(const struct ImFileType *type, const struct ImBuf *ibuf);
struct ImBuf *(*load)(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
- struct ImBuf *(*load_filepath)(const char *name, int flags, char colorspace[IM_MAX_SPACE]);
- int (*save)(struct ImBuf *ibuf, const char *name, int flags);
+ struct ImBuf *(*load_filepath)(const char *filepath, int flags, char colorspace[IM_MAX_SPACE]);
+ int (*save)(struct ImBuf *ibuf, const char *filepath, int flags);
void (*load_tile)(struct ImBuf *ibuf,
const unsigned char *mem,
size_t size,
@@ -68,12 +68,12 @@ void imb_tile_cache_tile_free(struct ImBuf *ibuf, int tx, int ty);
/* Type Specific Functions */
/* png */
-int imb_is_a_png(const unsigned char *buf);
+int imb_is_a_png(const unsigned char *mem);
struct ImBuf *imb_loadpng(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-int imb_savepng(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags);
/* targa */
int imb_is_a_targa(const unsigned char *buf);
@@ -81,7 +81,7 @@ struct ImBuf *imb_loadtarga(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags);
/* iris */
int imb_is_a_iris(const unsigned char *mem);
@@ -89,7 +89,7 @@ struct ImBuf *imb_loadiris(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags);
+int imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags);
/* jp2 */
int imb_is_a_jp2(const unsigned char *buf);
@@ -97,12 +97,14 @@ struct ImBuf *imb_load_jp2(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-struct ImBuf *imb_load_jp2_filepath(const char *name, int flags, char colorspace[IM_MAX_SPACE]);
-int imb_save_jp2(struct ImBuf *ibuf, const char *name, int flags);
+struct ImBuf *imb_load_jp2_filepath(const char *filepath,
+ int flags,
+ char colorspace[IM_MAX_SPACE]);
+int imb_save_jp2(struct ImBuf *ibuf, const char *filepath, int flags);
/* jpeg */
int imb_is_a_jpeg(const unsigned char *mem);
-int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags);
struct ImBuf *imb_load_jpeg(const unsigned char *buffer,
size_t size,
int flags,
@@ -114,11 +116,11 @@ struct ImBuf *imb_bmp_decode(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savebmp(struct ImBuf *ibuf, const char *filepath, int flags);
/* cineon */
int imb_is_cineon(const unsigned char *buf);
-int imb_save_cineon(struct ImBuf *buf, const char *name, int flags);
+int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags);
struct ImBuf *imb_load_cineon(const unsigned char *mem,
size_t size,
int flags,
@@ -126,7 +128,7 @@ struct ImBuf *imb_load_cineon(const unsigned char *mem,
/* dpx */
int imb_is_dpx(const unsigned char *buf);
-int imb_save_dpx(struct ImBuf *buf, const char *name, int flags);
+int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags);
struct ImBuf *imb_load_dpx(const unsigned char *mem,
size_t size,
int flags,
@@ -138,7 +140,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem,
size_t size,
int flags,
char colorspace[IM_MAX_SPACE]);
-int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags);
/* tiff */
void imb_inittiff(void);
@@ -149,4 +151,4 @@ struct ImBuf *imb_loadtiff(const unsigned char *mem,
char colorspace[IM_MAX_SPACE]);
void imb_loadtiletiff(
struct ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect);
-int imb_savetiff(struct ImBuf *ibuf, const char *name, int flags);
+int imb_savetiff(struct ImBuf *ibuf, const char *filepath, int flags);
diff --git a/source/blender/imbuf/intern/IMB_indexer.h b/source/blender/imbuf/intern/IMB_indexer.h
index 7cd11e137c2..07c47965262 100644
--- a/source/blender/imbuf/intern/IMB_indexer.h
+++ b/source/blender/imbuf/intern/IMB_indexer.h
@@ -94,8 +94,8 @@ void IMB_index_builder_proc_frame(anim_index_builder *fp,
void IMB_index_builder_finish(anim_index_builder *fp, int rollback);
struct anim_index *IMB_indexer_open(const char *name);
-unsigned long long IMB_indexer_get_seek_pos(struct anim_index *idx, int frameno_index);
-unsigned long long IMB_indexer_get_seek_pos_dts(struct anim_index *idx, int frameno_index);
+unsigned long long IMB_indexer_get_seek_pos(struct anim_index *idx, int frame_index);
+unsigned long long IMB_indexer_get_seek_pos_dts(struct anim_index *idx, int frame_index);
int IMB_indexer_get_frame_index(struct anim_index *idx, int frameno);
unsigned long long IMB_indexer_get_pts(struct anim_index *idx, int frame_index);
diff --git a/source/blender/imbuf/intern/bmp.c b/source/blender/imbuf/intern/bmp.c
index f517a3c15e8..0b185f3442a 100644
--- a/source/blender/imbuf/intern/bmp.c
+++ b/source/blender/imbuf/intern/bmp.c
@@ -296,7 +296,7 @@ static int putShortLSB(ushort us, FILE *ofile)
}
/* Found write info at http://users.ece.gatech.edu/~slabaugh/personal/c/bitmapUnix.c */
-int imb_savebmp(ImBuf *ibuf, const char *name, int UNUSED(flags))
+int imb_savebmp(ImBuf *ibuf, const char *filepath, int UNUSED(flags))
{
BMPINFOHEADER infoheader;
@@ -307,7 +307,7 @@ int imb_savebmp(ImBuf *ibuf, const char *name, int UNUSED(flags))
const size_t bytesize = (ibuf->x * bytes_per_pixel + pad_bytes_per_scanline) * ibuf->y;
const uchar *data = (const uchar *)ibuf->rect;
- FILE *ofile = BLI_fopen(name, "wb");
+ FILE *ofile = BLI_fopen(filepath, "wb");
if (ofile == NULL) {
return 0;
}
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c
index 50785d7a857..eeccadf56c1 100644
--- a/source/blender/imbuf/intern/cineon/cineon_dpx.c
+++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c
@@ -183,9 +183,9 @@ static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon
return rvalue;
}
-int imb_save_cineon(struct ImBuf *buf, const char *myfile, int flags)
+int imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags)
{
- return imb_save_dpx_cineon(buf, myfile, 1, flags);
+ return imb_save_dpx_cineon(buf, filepath, 1, flags);
}
int imb_is_cineon(const unsigned char *buf)
@@ -204,9 +204,9 @@ ImBuf *imb_load_cineon(const unsigned char *mem,
return NULL;
}
-int imb_save_dpx(struct ImBuf *buf, const char *myfile, int flags)
+int imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags)
{
- return imb_save_dpx_cineon(buf, myfile, 0, flags);
+ return imb_save_dpx_cineon(buf, filepath, 0, flags);
}
int imb_is_dpx(const unsigned char *buf)
diff --git a/source/blender/imbuf/intern/cineon/logImageCore.c b/source/blender/imbuf/intern/cineon/logImageCore.c
index 6a81abd96e3..74a0684c35c 100644
--- a/source/blender/imbuf/intern/cineon/logImageCore.c
+++ b/source/blender/imbuf/intern/cineon/logImageCore.c
@@ -46,18 +46,28 @@ static int logImageSetData8(LogImageFile *logImage, LogImageElement logElement,
static int logImageSetData10(LogImageFile *logImage, LogImageElement logElement, float *data);
static int logImageSetData12(LogImageFile *logImage, LogImageElement logElement, float *data);
static int logImageSetData16(LogImageFile *logImage, LogImageElement logElement, float *data);
-static int logImageElementGetData(LogImageFile *dpx, LogImageElement logElement, float *data);
-static int logImageElementGetData1(LogImageFile *dpx, LogImageElement logElement, float *data);
-static int logImageElementGetData8(LogImageFile *dpx, LogImageElement logElement, float *data);
-static int logImageElementGetData10(LogImageFile *dpx, LogImageElement logElement, float *data);
-static int logImageElementGetData10Packed(LogImageFile *dpx,
+static int logImageElementGetData(LogImageFile *logImage, LogImageElement logElement, float *data);
+static int logImageElementGetData1(LogImageFile *logImage,
+ LogImageElement logElement,
+ float *data);
+static int logImageElementGetData8(LogImageFile *logImage,
+ LogImageElement logElement,
+ float *data);
+static int logImageElementGetData10(LogImageFile *logImage,
+ LogImageElement logElement,
+ float *data);
+static int logImageElementGetData10Packed(LogImageFile *logImage,
LogImageElement logElement,
float *data);
-static int logImageElementGetData12(LogImageFile *dpx, LogImageElement logElement, float *data);
-static int logImageElementGetData12Packed(LogImageFile *dpx,
+static int logImageElementGetData12(LogImageFile *logImage,
+ LogImageElement logElement,
+ float *data);
+static int logImageElementGetData12Packed(LogImageFile *logImage,
LogImageElement logElement,
float *data);
-static int logImageElementGetData16(LogImageFile *dpx, LogImageElement logElement, float *data);
+static int logImageElementGetData16(LogImageFile *logImage,
+ LogImageElement logElement,
+ float *data);
static int convertLogElementToRGBA(float *src,
float *dst,
LogImageFile *logImage,
diff --git a/source/blender/imbuf/intern/imageprocess.c b/source/blender/imbuf/intern/imageprocess.c
index 8525991aa40..79382e3be76 100644
--- a/source/blender/imbuf/intern/imageprocess.c
+++ b/source/blender/imbuf/intern/imageprocess.c
@@ -322,7 +322,7 @@ void nearest_interpolation_color_wrap(
}
}
-void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, int yout)
+void nearest_interpolation(ImBuf *in, ImBuf *out, float u, float v, int xout, int yout)
{
unsigned char *outI = NULL;
float *outF = NULL;
@@ -334,7 +334,7 @@ void nearest_interpolation(ImBuf *in, ImBuf *out, float x, float y, int xout, in
/* gcc warns these could be uninitialized, but its ok. */
pixel_from_buffer(out, &outI, &outF, xout, yout);
- nearest_interpolation_color(in, outI, outF, x, y);
+ nearest_interpolation_color(in, outI, outF, u, v);
}
/*********************** Threaded image processing *************************/
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index 2d8f1510d7b..12c4c63849c 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -109,7 +109,7 @@ static void readheader(MFileOffset *inf, IMAGE *image);
static int writeheader(FILE *outf, IMAGE *image);
static ushort getshort(MFileOffset *inf);
-static uint getlong(MFileOffset *inf);
+static uint getlong(MFileOffset *mofs);
static void putshort(FILE *outf, ushort val);
static int putlong(FILE *outf, uint val);
static int writetab(FILE *outf, uint *tab, int len);
@@ -969,7 +969,7 @@ static int compressrow(uchar *lbuf, uchar *rlebuf, int z, int cnt)
return optr - (uchar *)rlebuf;
}
-int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags)
+int imb_saveiris(struct ImBuf *ibuf, const char *filepath, int flags)
{
short zsize;
int ret;
@@ -982,7 +982,7 @@ int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags)
IMB_convert_rgba_to_abgr(ibuf);
test_endian_zbuf(ibuf);
- ret = output_iris(ibuf->rect, ibuf->x, ibuf->y, zsize, name, ibuf->zbuf);
+ ret = output_iris(ibuf->rect, ibuf->x, ibuf->y, zsize, filepath, ibuf->zbuf);
/* restore! Quite clumsy, 2 times a switch... maybe better a malloc ? */
IMB_convert_rgba_to_abgr(ibuf);
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 3346f1c0964..525284bd867 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -642,9 +642,9 @@ static int save_stdjpeg(const char *name, struct ImBuf *ibuf)
return 1;
}
-int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags)
+int imb_savejpeg(struct ImBuf *ibuf, const char *filepath, int flags)
{
ibuf->flags = flags;
- return save_stdjpeg(name, ibuf);
+ return save_stdjpeg(filepath, ibuf);
}
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 67bb3677834..380ddaaefad 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -102,7 +102,7 @@ static bool exr_has_multiview(MultiPartInputFile &file);
static bool exr_has_multipart_file(MultiPartInputFile &file);
static bool exr_has_alpha(MultiPartInputFile &file);
static bool exr_has_zbuffer(MultiPartInputFile &file);
-static void exr_printf(const char *__restrict format, ...);
+static void exr_printf(const char *__restrict fmt, ...);
static void imb_exr_type_by_channels(ChannelList &channels,
StringVector &views,
bool *r_singlelayer,
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index 2eb1b216572..dbae641f707 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -119,7 +119,7 @@ BLI_INLINE unsigned short ftoshort(float val)
return unit_float_to_ushort_clamp(val);
}
-int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
+int imb_savepng(struct ImBuf *ibuf, const char *filepath, int flags)
{
png_structp png_ptr;
png_infop info_ptr;
@@ -155,25 +155,26 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
/* for prints */
if (flags & IB_mem) {
- name = "<memory>";
+ filepath = "<memory>";
}
bytesperpixel = (ibuf->planes + 7) >> 3;
if ((bytesperpixel > 4) || (bytesperpixel == 2)) {
- printf("imb_savepng: Unsupported bytes per pixel: %d for file: '%s'\n", bytesperpixel, name);
+ printf(
+ "imb_savepng: Unsupported bytes per pixel: %d for file: '%s'\n", bytesperpixel, filepath);
return 0;
}
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (png_ptr == NULL) {
- printf("imb_savepng: Cannot png_create_write_struct for file: '%s'\n", name);
+ printf("imb_savepng: Cannot png_create_write_struct for file: '%s'\n", filepath);
return 0;
}
info_ptr = png_create_info_struct(png_ptr);
if (info_ptr == NULL) {
png_destroy_write_struct(&png_ptr, (png_infopp)NULL);
- printf("imb_savepng: Cannot png_create_info_struct for file: '%s'\n", name);
+ printf("imb_savepng: Cannot png_create_info_struct for file: '%s'\n", filepath);
return 0;
}
@@ -192,13 +193,13 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
ibuf->x,
ibuf->y,
bytesperpixel,
- name);
+ filepath);
}
/* allocate memory for an array of row-pointers */
row_pointers = (png_bytepp)MEM_mallocN(ibuf->y * sizeof(png_bytep), "row_pointers");
if (row_pointers == NULL) {
- printf("imb_savepng: Cannot allocate row-pointers array for file '%s'\n", name);
+ printf("imb_savepng: Cannot allocate row-pointers array for file '%s'\n", filepath);
}
if ((pixels == NULL && pixels16 == NULL) || (row_pointers == NULL) ||
@@ -396,7 +397,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
png_set_write_fn(png_ptr, (png_voidp)ibuf, WriteData, Flush);
}
else {
- fp = BLI_fopen(name, "wb");
+ fp = BLI_fopen(filepath, "wb");
if (!fp) {
png_destroy_write_struct(&png_ptr, &info_ptr);
if (pixels) {
@@ -405,7 +406,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
if (pixels16) {
MEM_freeN(pixels16);
}
- printf("imb_savepng: Cannot open file for writing: '%s'\n", name);
+ printf("imb_savepng: Cannot open file for writing: '%s'\n", filepath);
return 0;
}
png_init_io(png_ptr, fp);
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c
index 6ed01c73f04..3dd26e1f7a2 100644
--- a/source/blender/imbuf/intern/radiance_hdr.c
+++ b/source/blender/imbuf/intern/radiance_hdr.c
@@ -409,9 +409,9 @@ static void writeHeader(FILE *file, int width, int height)
fputc(10, file);
}
-int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags)
+int imb_savehdr(struct ImBuf *ibuf, const char *filepath, int flags)
{
- FILE *file = BLI_fopen(name, "wb");
+ FILE *file = BLI_fopen(filepath, "wb");
float *fp = NULL;
size_t width = ibuf->x, height = ibuf->y;
unsigned char *cp = NULL;
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 9f33c7ea2b2..5f373e4bd3a 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -286,7 +286,7 @@ static bool dumptarga(struct ImBuf *ibuf, FILE *file)
return 1;
}
-int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags)
+int imb_savetarga(struct ImBuf *ibuf, const char *filepath, int flags)
{
char buf[20] = {0};
FILE *fildes;
@@ -321,7 +321,7 @@ int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags)
if (ibuf->planes == 32) {
buf[17] |= 0x08;
}
- fildes = BLI_fopen(name, "wb");
+ fildes = BLI_fopen(filepath, "wb");
if (!fildes) {
return 0;
}
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index c95476fa628..9b579c4780c 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -304,13 +304,13 @@ static TIFF *imb_tiff_client_open(ImbTIFFMemFile *memFile, const unsigned char *
* hence my manual comparison. - Jonathan Merritt (lancelet) 4th Sept 2005.
*/
#define IMB_TIFF_NCB 4 /* number of comparison bytes used */
-int imb_is_a_tiff(const unsigned char *mem)
+int imb_is_a_tiff(const unsigned char *buf)
{
const char big_endian[IMB_TIFF_NCB] = {0x4d, 0x4d, 0x00, 0x2a};
const char lil_endian[IMB_TIFF_NCB] = {0x49, 0x49, 0x2a, 0x00};
- return ((memcmp(big_endian, mem, IMB_TIFF_NCB) == 0) ||
- (memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0));
+ return ((memcmp(big_endian, buf, IMB_TIFF_NCB) == 0) ||
+ (memcmp(lil_endian, buf, IMB_TIFF_NCB) == 0));
}
static void scanline_contig_16bit(float *rectf,
@@ -742,7 +742,7 @@ void imb_loadtiletiff(
* \return: 1 if the function is successful, 0 on failure.
*/
-int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
+int imb_savetiff(ImBuf *ibuf, const char *filepath, int flags)
{
TIFF *image = NULL;
uint16 samplesperpixel, bitspersample;
@@ -799,7 +799,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
image = TIFFOpenW(wname, "w");
free(wname);
#else
- image = TIFFOpen(name, "w");
+ image = TIFFOpen(filepath, "w");
#endif
if (image == NULL) {
diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c
index 1d77233a7e2..e321470559a 100644
--- a/source/blender/imbuf/intern/writeimage.c
+++ b/source/blender/imbuf/intern/writeimage.c
@@ -41,13 +41,13 @@ static bool prepare_write_imbuf(const ImFileType *type, ImBuf *ibuf)
return IMB_prepare_write_ImBuf((type->flag & IM_FTYPE_FLOAT), ibuf);
}
-short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
+short IMB_saveiff(struct ImBuf *ibuf, const char *filepath, int flags)
{
const ImFileType *type;
errno = 0;
- BLI_assert(!BLI_path_is_rel(name));
+ BLI_assert(!BLI_path_is_rel(filepath));
if (ibuf == NULL) {
return false;
@@ -60,7 +60,7 @@ short IMB_saveiff(struct ImBuf *ibuf, const char *name, int flags)
prepare_write_imbuf(type, ibuf);
- result = type->save(ibuf, name, flags);
+ result = type->save(ibuf, filepath, flags);
return result;
}
diff --git a/source/blender/io/alembic/ABC_alembic.h b/source/blender/io/alembic/ABC_alembic.h
index 67f8aeb0a67..28e3d0dd1f5 100644
--- a/source/blender/io/alembic/ABC_alembic.h
+++ b/source/blender/io/alembic/ABC_alembic.h
@@ -106,13 +106,13 @@ void ABC_get_transform(struct CacheReader *reader,
float time,
float scale);
-/* Either modifies current_mesh in-place or constructs a new mesh. */
+/* Either modifies existing_mesh in-place or constructs a new mesh. */
struct Mesh *ABC_read_mesh(struct CacheReader *reader,
struct Object *ob,
- struct Mesh *current_mesh,
+ struct Mesh *existing_mesh,
const float time,
const char **err_str,
- int flags);
+ int read_flags);
bool ABC_mesh_topology_changed(struct CacheReader *reader,
struct Object *ob,
@@ -134,7 +134,7 @@ bool ABC_has_vec3_array_property_named(struct CacheReader *reader, const char *n
int ABC_read_velocity_cache(struct CacheReader *reader,
const char *velocity_name,
float time,
- float fps,
+ float velocity_scale,
int num_vertices,
float *r_vertex_velocities);
diff --git a/source/blender/io/alembic/intern/abc_axis_conversion.h b/source/blender/io/alembic/intern/abc_axis_conversion.h
index 645d9fc783b..797592d9eee 100644
--- a/source/blender/io/alembic/intern/abc_axis_conversion.h
+++ b/source/blender/io/alembic/intern/abc_axis_conversion.h
@@ -94,7 +94,7 @@ typedef enum {
} AbcMatrixMode;
void create_transform_matrix(Object *obj,
- float r_transform_mat[4][4],
+ float r_yup_mat[4][4],
AbcMatrixMode mode,
Object *proxy_from);
diff --git a/source/blender/io/collada/AnimationExporter.h b/source/blender/io/collada/AnimationExporter.h
index ded547949f9..2d38a541347 100644
--- a/source/blender/io/collada/AnimationExporter.h
+++ b/source/blender/io/collada/AnimationExporter.h
@@ -152,7 +152,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
void exportAnimation(Object *ob, BCAnimationSampler &sampler);
/* export animation as separate trans/rot/scale curves */
- void export_curve_animation_set(Object *ob, BCAnimationSampler &sampler, bool export_tm_curves);
+ void export_curve_animation_set(Object *ob, BCAnimationSampler &sampler, bool export_as_matrix);
/* export one single curve */
void export_curve_animation(Object *ob, BCAnimationCurve &curve);
@@ -164,7 +164,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
void export_bone_animations_recursive(Object *ob_arm, Bone *bone, BCAnimationSampler &sampler);
/* Export for one bone */
- void export_bone_animation(Object *ob, Bone *bone, BCFrames &frames, BCMatrixSampleMap &outmats);
+ void export_bone_animation(Object *ob, Bone *bone, BCFrames &frames, BCMatrixSampleMap &samples);
/* call to the low level collada exporter */
void export_collada_curve_animation(std::string id,
@@ -179,7 +179,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
std::string name,
std::string target,
BCFrames &frames,
- BCMatrixSampleMap &outmats,
+ BCMatrixSampleMap &samples,
BC_global_rotation_type global_rotation_type,
Matrix &parentinv);
@@ -193,7 +193,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
void close_animation_container(bool has_container);
/* Input and Output sources (single valued) */
- std::string collada_source_from_values(BC_animation_source_type tm_channel,
+ std::string collada_source_from_values(BC_animation_source_type source_type,
COLLADASW::InputSemantic::Semantics semantic,
std::vector<float> &values,
const std::string &anim_id,
@@ -239,7 +239,7 @@ class AnimationExporter : COLLADASW::LibraryAnimations {
bool *has_tangents);
std::string get_axis_name(std::string channel, int id);
- std::string get_collada_name(std::string channel_target) const;
+ std::string get_collada_name(std::string channel_type) const;
std::string get_collada_sid(const BCAnimationCurve &curve, const std::string axis_name);
/* ===================================== */
diff --git a/source/blender/io/collada/ArmatureImporter.cpp b/source/blender/io/collada/ArmatureImporter.cpp
index bd5bd913a18..dbb0ad328f5 100644
--- a/source/blender/io/collada/ArmatureImporter.cpp
+++ b/source/blender/io/collada/ArmatureImporter.cpp
@@ -292,7 +292,9 @@ void ArmatureImporter::fix_parent_connect(bArmature *armature, Bone *bone)
}
}
-void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone, int clip)
+void ArmatureImporter::connect_bone_chains(bArmature *armature,
+ Bone *parentbone,
+ int max_chain_length)
{
BoneExtensionMap &extended_bones = bone_extension_manager.getExtensionMap(armature);
BoneExtended *dominant_child = NULL;
@@ -308,7 +310,7 @@ void ArmatureImporter::connect_bone_chains(bArmature *armature, Bone *parentbone
BoneExtended *be = extended_bones[child->name];
if (be != NULL) {
int chain_len = be->get_chain_length();
- if (chain_len <= clip) {
+ if (chain_len <= max_chain_length) {
if (chain_len > maxlen) {
dominant_child = be;
maxlen = chain_len;
@@ -470,7 +472,7 @@ ArmatureJoints &ArmatureImporter::get_armature_joints(Object *ob_arm)
return armature_joints.back();
}
#endif
-void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *> &ob_arms)
+void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *> &arm_objs)
{
std::vector<COLLADAFW::Node *>::iterator ri;
std::vector<std::string> layer_labels;
@@ -523,9 +525,9 @@ void ArmatureImporter::create_armature_bones(Main *bmain, std::vector<Object *>
set_bone_transformation_type(node, ob_arm);
- int index = std::find(ob_arms.begin(), ob_arms.end(), ob_arm) - ob_arms.begin();
+ int index = std::find(arm_objs.begin(), arm_objs.end(), ob_arm) - arm_objs.begin();
if (index == 0) {
- ob_arms.push_back(ob_arm);
+ arm_objs.push_back(ob_arm);
}
DEG_id_tag_update(&ob_arm->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
@@ -787,7 +789,7 @@ void ArmatureImporter::add_root_joint(COLLADAFW::Node *node)
void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &objects_to_scale)
{
Main *bmain = CTX_data_main(C);
- std::vector<Object *> ob_arms;
+ std::vector<Object *> arm_objs;
std::map<COLLADAFW::UniqueId, SkinInfo>::iterator it;
/* TODO: Make this work for more than one armature in the import file. */
@@ -820,8 +822,8 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &object
objects_to_scale.push_back(ob_arm);
}
- if (std::find(ob_arms.begin(), ob_arms.end(), ob_arm) == ob_arms.end()) {
- ob_arms.push_back(ob_arm);
+ if (std::find(arm_objs.begin(), arm_objs.end(), ob_arm) == arm_objs.end()) {
+ arm_objs.push_back(ob_arm);
}
}
else {
@@ -843,11 +845,11 @@ void ArmatureImporter::make_armatures(bContext *C, std::vector<Object *> &object
}
/* for bones without skins */
- create_armature_bones(bmain, ob_arms);
+ create_armature_bones(bmain, arm_objs);
/* Fix bone relations */
std::vector<Object *>::iterator ob_arm_it;
- for (ob_arm_it = ob_arms.begin(); ob_arm_it != ob_arms.end(); ob_arm_it++) {
+ for (ob_arm_it = arm_objs.begin(); ob_arm_it != arm_objs.end(); ob_arm_it++) {
Object *ob_arm = *ob_arm_it;
bArmature *armature = (bArmature *)ob_arm->data;
@@ -1025,9 +1027,9 @@ Object *ArmatureImporter::get_armature_for_joint(COLLADAFW::Node *node)
return NULL;
}
-void ArmatureImporter::set_tags_map(TagsMap &tagsMap)
+void ArmatureImporter::set_tags_map(TagsMap &tags_map)
{
- this->uid_tags_map = tagsMap;
+ this->uid_tags_map = tags_map;
}
void ArmatureImporter::get_rna_path_for_joint(COLLADAFW::Node *node,
diff --git a/source/blender/io/collada/BCAnimationSampler.h b/source/blender/io/collada/BCAnimationSampler.h
index 9c6eaf0a140..34aec00374e 100644
--- a/source/blender/io/collada/BCAnimationSampler.h
+++ b/source/blender/io/collada/BCAnimationSampler.h
@@ -140,8 +140,8 @@ class BCSampleFrameContainer {
int get_frames(Object *ob, Bone *bone, BCFrames &frames) const;
int get_samples(Object *ob, BCFrameSampleMap &samples) const;
- int get_matrices(Object *ob, BCMatrixSampleMap &matrices) const;
- int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &bones) const;
+ int get_matrices(Object *ob, BCMatrixSampleMap &samples) const;
+ int get_matrices(Object *ob, Bone *bone, BCMatrixSampleMap &samples) const;
};
class BCAnimationSampler {
@@ -168,7 +168,7 @@ class BCAnimationSampler {
BCAnimation &animation, float *ref, float *val, std::string data_path, int length);
public:
- BCAnimationSampler(BCExportSettings &export_settings, BCObjectSet &animated_subset);
+ BCAnimationSampler(BCExportSettings &export_settings, BCObjectSet &object_set);
~BCAnimationSampler();
void add_object(Object *ob);
diff --git a/source/blender/io/collada/BCMath.cpp b/source/blender/io/collada/BCMath.cpp
index 9a42d1ba843..85d4c212141 100644
--- a/source/blender/io/collada/BCMath.cpp
+++ b/source/blender/io/collada/BCMath.cpp
@@ -143,10 +143,10 @@ void BCMatrix::set_transform(Matrix &mat)
quat_to_eul(this->rot, this->q);
}
-void BCMatrix::copy(Matrix &out, Matrix &in)
+void BCMatrix::copy(Matrix &r, Matrix &a)
{
/* destination comes first: */
- memcpy(out, in, sizeof(Matrix));
+ memcpy(r, a, sizeof(Matrix));
}
void BCMatrix::transpose(Matrix &mat)
diff --git a/source/blender/io/collada/BCMath.h b/source/blender/io/collada/BCMath.h
index 0b18b86a961..c57d5c6301f 100644
--- a/source/blender/io/collada/BCMath.h
+++ b/source/blender/io/collada/BCMath.h
@@ -92,7 +92,7 @@ class BCMatrix {
void apply_transform(Matrix &to,
const Matrix &transform,
const Matrix &from,
- const bool inverted = false);
+ const bool inverse = false);
void add_inverted_transform(Matrix &to, const Matrix &transform, const Matrix &from);
void add_transform(const Matrix &matrix, const bool inverted = false);
void add_transform(const BCMatrix &matrix, const bool inverted = false);
diff --git a/source/blender/io/collada/CameraExporter.h b/source/blender/io/collada/CameraExporter.h
index cc4f7aee165..6835aef8044 100644
--- a/source/blender/io/collada/CameraExporter.h
+++ b/source/blender/io/collada/CameraExporter.h
@@ -36,6 +36,6 @@ class CamerasExporter : COLLADASW::LibraryCameras {
void operator()(Object *ob, Scene *sce);
private:
- bool exportBlenderProfile(COLLADASW::Camera &cla, Camera *cam);
+ bool exportBlenderProfile(COLLADASW::Camera &cm, Camera *cam);
BCExportSettings &export_settings;
};
diff --git a/source/blender/io/collada/DocumentExporter.cpp b/source/blender/io/collada/DocumentExporter.cpp
index 314e4f8116f..6be441a9e27 100644
--- a/source/blender/io/collada/DocumentExporter.cpp
+++ b/source/blender/io/collada/DocumentExporter.cpp
@@ -144,9 +144,10 @@ char *bc_CustomData_get_active_layer_name(const CustomData *data, int type)
return data->layers[layer_index].name;
}
-DocumentExporter::DocumentExporter(BlenderContext &blender_context, ExportSettings *exportSettings)
+DocumentExporter::DocumentExporter(BlenderContext &blender_context,
+ ExportSettings *export_settings)
: blender_context(blender_context),
- export_settings(BCExportSettings(exportSettings, blender_context))
+ export_settings(BCExportSettings(export_settings, blender_context))
{
}
diff --git a/source/blender/io/collada/EffectExporter.h b/source/blender/io/collada/EffectExporter.h
index c844d93b040..ab875382b27 100644
--- a/source/blender/io/collada/EffectExporter.h
+++ b/source/blender/io/collada/EffectExporter.h
@@ -65,9 +65,9 @@ class EffectsExporter : COLLADASW::LibraryEffects {
void set_specular(COLLADASW::EffectProfile &ep, Material *ma);
void set_reflective(COLLADASW::EffectProfile &ep, Material *ma);
- void get_images(Material *ma, KeyImageMap &uid_image_map);
+ void get_images(Material *ma, KeyImageMap &material_image_map);
void create_image_samplers(COLLADASW::EffectProfile &ep,
- KeyImageMap &uid_image_map,
+ KeyImageMap &material_image_map,
std::string &active_uv);
void writeTextures(COLLADASW::EffectProfile &ep,
diff --git a/source/blender/io/collada/GeometryExporter.h b/source/blender/io/collada/GeometryExporter.h
index d91f3d1ec5a..51879f43272 100644
--- a/source/blender/io/collada/GeometryExporter.h
+++ b/source/blender/io/collada/GeometryExporter.h
@@ -96,7 +96,7 @@ class GeometryExporter : COLLADASW::LibraryGeometries {
void createNormalsSource(std::string geom_id, Mesh *me, std::vector<Normal> &nor);
void create_normals(std::vector<Normal> &nor,
- std::vector<BCPolygonNormalsIndices> &ind,
+ std::vector<BCPolygonNormalsIndices> &polygons_normals,
Mesh *me);
std::string getIdBySemantics(std::string geom_id,
diff --git a/source/blender/io/collada/ImageExporter.h b/source/blender/io/collada/ImageExporter.h
index e1fdcc12272..be10a0a2d58 100644
--- a/source/blender/io/collada/ImageExporter.h
+++ b/source/blender/io/collada/ImageExporter.h
@@ -44,5 +44,5 @@ class ImagesExporter : COLLADASW::LibraryImages {
private:
BCExportSettings &export_settings;
KeyImageMap &key_image_map;
- void export_UV_Image(Image *image, bool use_texture_copies);
+ void export_UV_Image(Image *image, bool use_copies);
};
diff --git a/source/blender/io/collada/MeshImporter.cpp b/source/blender/io/collada/MeshImporter.cpp
index a0d0507d472..3d9c4d3ad6f 100644
--- a/source/blender/io/collada/MeshImporter.cpp
+++ b/source/blender/io/collada/MeshImporter.cpp
@@ -228,16 +228,16 @@ bool MeshImporter::set_poly_indices(
return broken_loop;
}
-void MeshImporter::set_vcol(MLoopCol *mlc,
+void MeshImporter::set_vcol(MLoopCol *mloopcol,
VCOLDataWrapper &vob,
int loop_index,
COLLADAFW::IndexList &index_list,
int count)
{
int index;
- for (index = 0; index < count; index++, mlc++) {
+ for (index = 0; index < count; index++, mloopcol++) {
int v_index = index_list.getIndex(index + loop_index);
- vob.get_vcol(v_index, mlc);
+ vob.get_vcol(v_index, mloopcol);
}
}
@@ -891,10 +891,10 @@ Object *MeshImporter::get_object_by_geom_uid(const COLLADAFW::UniqueId &geom_uid
return NULL;
}
-Mesh *MeshImporter::get_mesh_by_geom_uid(const COLLADAFW::UniqueId &mesh_uid)
+Mesh *MeshImporter::get_mesh_by_geom_uid(const COLLADAFW::UniqueId &geom_uid)
{
- if (uid_mesh_map.find(mesh_uid) != uid_mesh_map.end()) {
- return uid_mesh_map[mesh_uid];
+ if (uid_mesh_map.find(geom_uid) != uid_mesh_map.end()) {
+ return uid_mesh_map[geom_uid];
}
return NULL;
}
diff --git a/source/blender/io/collada/MeshImporter.h b/source/blender/io/collada/MeshImporter.h
index a63cb0da987..6f4f62b7f0f 100644
--- a/source/blender/io/collada/MeshImporter.h
+++ b/source/blender/io/collada/MeshImporter.h
@@ -108,7 +108,7 @@ class MeshImporter : public MeshImporterBase {
void set_face_uv(MLoopUV *mloopuv,
UVDataWrapper &uvs,
- int loop_index,
+ int start_index,
COLLADAFW::IndexList &index_list,
int count);
diff --git a/source/blender/io/collada/collada_utils.h b/source/blender/io/collada/collada_utils.h
index 38050556b47..24ee1054e11 100644
--- a/source/blender/io/collada/collada_utils.h
+++ b/source/blender/io/collada/collada_utils.h
@@ -199,7 +199,7 @@ extern std::string bc_replace_string(std::string data,
extern std::string bc_url_encode(std::string data);
extern void bc_match_scale(Object *ob, UnitConverter &bc_unit, bool scale_to_scene);
extern void bc_match_scale(std::vector<Object *> *objects_done,
- UnitConverter &unit_converter,
+ UnitConverter &bc_unit,
bool scale_to_scene);
extern void bc_decompose(float mat[4][4], float *loc, float eul[3], float quat[4], float *size);
@@ -221,7 +221,7 @@ void bc_copy_m4_farray(float r[4][4], float *a);
void bc_copy_farray_m4(float *r, float a[4][4]);
void bc_copy_darray_m4d(double *r, double a[4][4]);
void bc_copy_m4d_v44(double (&r)[4][4], std::vector<std::vector<double>> &a);
-void bc_copy_v44_m4d(std::vector<std::vector<double>> &a, double (&r)[4][4]);
+void bc_copy_v44_m4d(std::vector<std::vector<double>> &r, double (&a)[4][4]);
void bc_sanitize_v3(double v[3], int precision);
void bc_sanitize_v3(float v[3], int precision);
@@ -237,7 +237,7 @@ extern bool bc_get_property_matrix(Bone *bone, std::string key, float mat[4][4])
extern void bc_enable_fcurves(bAction *act, char *bone_name);
extern bool bc_bone_matrix_local_get(Object *ob, Bone *bone, Matrix &mat, bool for_opensim);
extern bool bc_is_animated(BCMatrixSampleMap &values);
-extern bool bc_has_animations(Scene *sce, LinkNode *node);
+extern bool bc_has_animations(Scene *sce, LinkNode *export_set);
extern bool bc_has_animations(Object *ob);
extern void bc_add_global_transform(Matrix &to_mat,
@@ -384,7 +384,7 @@ double bc_get_alpha(Material *ma);
double bc_get_ior(Material *ma);
double bc_get_shininess(Material *ma);
-double bc_get_float_from_shader(bNode *shader, double &ior, std::string nodeid);
+double bc_get_float_from_shader(bNode *shader, double &val, std::string nodeid);
COLLADASW::ColorOrTexture bc_get_cot_from_shader(bNode *shader,
std::string nodeid,
Color &default_color,
diff --git a/source/blender/makesdna/intern/dna_utils.h b/source/blender/makesdna/intern/dna_utils.h
index 264310ef0fb..a5c9d2a79a0 100644
--- a/source/blender/makesdna/intern/dna_utils.h
+++ b/source/blender/makesdna/intern/dna_utils.h
@@ -38,9 +38,9 @@ char *DNA_elem_id_rename(struct MemArena *mem_arena,
const int elem_src_len,
const char *elem_dst,
const int elem_dst_len,
- const char *elem_full_src,
- const int elem_full_src_len,
- const uint elem_full_offset_start);
+ const char *elem_src_full,
+ const int elem_src_full_len,
+ const uint elem_src_full_offset_len);
/* When requesting version info, support both directions. */
enum eDNA_RenameDir {
diff --git a/source/blender/modifiers/intern/MOD_util.h b/source/blender/modifiers/intern/MOD_util.h
index 05a24b92242..a3db848874e 100644
--- a/source/blender/modifiers/intern/MOD_util.h
+++ b/source/blender/modifiers/intern/MOD_util.h
@@ -39,7 +39,7 @@ void MOD_get_texture_coords(struct MappingInfoModifierData *dmd,
float (*cos)[3],
float (*r_texco)[3]);
-void MOD_previous_vcos_store(struct ModifierData *md, const float (*vertexCos)[3]);
+void MOD_previous_vcos_store(struct ModifierData *md, const float (*vert_coords)[3]);
struct Mesh *MOD_deform_mesh_eval_get(struct Object *ob,
struct BMEditMesh *em,
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.h b/source/blender/modifiers/intern/MOD_weightvg_util.h
index c00acd27d38..796603289ca 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.h
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.h
@@ -55,7 +55,7 @@ struct uiLayout;
void weightvg_do_map(int num,
float *new_w,
- short mode,
+ short falloff_type,
const bool do_invert,
struct CurveMapping *cmap,
struct RNG *rng);
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index 00c279ab8f6..085b5c463b9 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -301,25 +301,23 @@ void ntreeCompositRegisterPass(bNodeTree *ntree,
/* called from render pipeline, to tag render input and output */
/* need to do all scenes, to prevent errors when you re-render 1 scene */
-void ntreeCompositTagRender(Scene *curscene)
+void ntreeCompositTagRender(Scene *scene)
{
- Scene *sce;
-
/* XXX Think using G_MAIN here is valid, since you want to update current file's scene nodes,
* not the ones in temp main generated for rendering?
* This is still rather weak though,
* ideally render struct would store own main AND original G_MAIN. */
- for (sce = G_MAIN->scenes.first; sce; sce = sce->id.next) {
- if (sce->nodetree) {
+ for (Scene *sce_iter = G_MAIN->scenes.first; sce_iter; sce_iter = sce_iter->id.next) {
+ if (sce_iter->nodetree) {
bNode *node;
- for (node = sce->nodetree->nodes.first; node; node = node->next) {
- if (node->id == (ID *)curscene || node->type == CMP_NODE_COMPOSITE) {
- nodeUpdate(sce->nodetree, node);
+ for (node = sce_iter->nodetree->nodes.first; node; node = node->next) {
+ if (node->id == (ID *)scene || node->type == CMP_NODE_COMPOSITE) {
+ nodeUpdate(sce_iter->nodetree, node);
}
else if (node->type == CMP_NODE_TEXTURE) /* uses scene sizex/sizey */ {
- nodeUpdate(sce->nodetree, node);
+ nodeUpdate(sce_iter->nodetree, node);
}
}
}
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index b3d595cc69b..d8818657e1c 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -275,8 +275,8 @@ void ntreeTexEndExecTree(bNodeTreeExec *exec)
}
}
-int ntreeTexExecTree(bNodeTree *nodes,
- TexResult *texres,
+int ntreeTexExecTree(bNodeTree *ntree,
+ TexResult *target,
float co[3],
float dxt[3],
float dyt[3],
@@ -289,16 +289,16 @@ int ntreeTexExecTree(bNodeTree *nodes,
MTex *mtex)
{
TexCallData data;
- float *nor = texres->nor;
+ float *nor = target->nor;
int retval = TEX_INT;
bNodeThreadStack *nts = NULL;
- bNodeTreeExec *exec = nodes->execdata;
+ bNodeTreeExec *exec = ntree->execdata;
data.co = co;
data.dxt = dxt;
data.dyt = dyt;
data.osatex = osatex;
- data.target = texres;
+ data.target = target;
data.do_preview = preview;
data.do_manage = true;
data.thread = thread;
@@ -309,26 +309,26 @@ int ntreeTexExecTree(bNodeTree *nodes,
/* ensure execdata is only initialized once */
if (!exec) {
BLI_thread_lock(LOCK_NODES);
- if (!nodes->execdata) {
- ntreeTexBeginExecTree(nodes);
+ if (!ntree->execdata) {
+ ntreeTexBeginExecTree(ntree);
}
BLI_thread_unlock(LOCK_NODES);
- exec = nodes->execdata;
+ exec = ntree->execdata;
}
nts = ntreeGetThreadStack(exec, thread);
ntreeExecThreadNodes(exec, nts, &data, thread);
ntreeReleaseThreadStack(nts);
- if (texres->nor) {
+ if (target->nor) {
retval |= TEX_NOR;
}
retval |= TEX_RGB;
/* confusing stuff; the texture output node sets this to NULL to indicate no normal socket was
* set however, the texture code checks this for other reasons
* (namely, a normal is required for material). */
- texres->nor = nor;
+ target->nor = nor;
return retval;
}
diff --git a/source/blender/python/BPY_extern_python.h b/source/blender/python/BPY_extern_python.h
index 348f6986863..70b5cd679b9 100644
--- a/source/blender/python/BPY_extern_python.h
+++ b/source/blender/python/BPY_extern_python.h
@@ -36,7 +36,7 @@ void BPY_python_start(int argc, const char **argv);
void BPY_python_end(void);
void BPY_python_reset(struct bContext *C);
void BPY_python_use_system_env(void);
-void BPY_python_backtrace(FILE *file);
+void BPY_python_backtrace(FILE *fp);
#ifdef __cplusplus
} /* extern "C" */
diff --git a/source/blender/python/bmesh/bmesh_py_types.h b/source/blender/python/bmesh/bmesh_py_types.h
index 7ac3c4bf3cc..ce894760eff 100644
--- a/source/blender/python/bmesh/bmesh_py_types.h
+++ b/source/blender/python/bmesh/bmesh_py_types.h
@@ -176,7 +176,7 @@ int bpy_bm_generic_valid_check(BPy_BMGeneric *self);
int bpy_bm_generic_valid_check_source(BMesh *bm_source,
const char *error_prefix,
void **args,
- uint args_n) ATTR_NONNULL(1, 2);
+ uint args_tot) ATTR_NONNULL(1, 2);
#define BPY_BM_CHECK_OBJ(obj) \
if (UNLIKELY(bpy_bm_generic_valid_check((BPy_BMGeneric *)obj) == -1)) { \
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.c b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
index f42348975c9..8214be3bd73 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.c
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.c
@@ -351,10 +351,10 @@ int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *mloopcol, PyObject *value)
return -1;
}
-PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data)
+PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *mloopcol)
{
PyObject *color_capsule;
- color_capsule = PyCapsule_New(data, NULL, NULL);
+ color_capsule = PyCapsule_New(mloopcol, NULL, NULL);
return Vector_CreatePyObject_cb(color_capsule, 4, mathutils_bmloopcol_cb_index, 0);
}
diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.h b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
index 58f31a9807e..b7699b387e5 100644
--- a/source/blender/python/bmesh/bmesh_py_types_meshdata.h
+++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.h
@@ -37,14 +37,14 @@ struct MLoopCol;
struct MLoopUV;
struct MVertSkin;
-int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *data, PyObject *value);
-PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *data);
+int BPy_BMLoopUV_AssignPyObject(struct MLoopUV *mloopuv, PyObject *value);
+PyObject *BPy_BMLoopUV_CreatePyObject(struct MLoopUV *mloopuv);
-int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *data, PyObject *value);
-PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *data);
+int BPy_BMVertSkin_AssignPyObject(struct MVertSkin *mvertskin, PyObject *value);
+PyObject *BPy_BMVertSkin_CreatePyObject(struct MVertSkin *mvertskin);
-int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *data, PyObject *value);
-PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *data);
+int BPy_BMLoopColor_AssignPyObject(struct MLoopCol *mloopcol, PyObject *value);
+PyObject *BPy_BMLoopColor_CreatePyObject(struct MLoopCol *mloopcol);
int BPy_BMDeformVert_AssignPyObject(struct MDeformVert *dvert, PyObject *value);
PyObject *BPy_BMDeformVert_CreatePyObject(struct MDeformVert *dvert);
diff --git a/source/blender/python/gpu/gpu_py_vertex_buffer.h b/source/blender/python/gpu/gpu_py_vertex_buffer.h
index 41791a35e6e..8adf2aa0792 100644
--- a/source/blender/python/gpu/gpu_py_vertex_buffer.h
+++ b/source/blender/python/gpu/gpu_py_vertex_buffer.h
@@ -32,4 +32,4 @@ typedef struct BPyGPUVertBuf {
struct GPUVertBuf *buf;
} BPyGPUVertBuf;
-PyObject *BPyGPUVertBuf_CreatePyObject(struct GPUVertBuf *vbo) ATTR_NONNULL(1);
+PyObject *BPyGPUVertBuf_CreatePyObject(struct GPUVertBuf *buf) ATTR_NONNULL(1);
diff --git a/source/blender/python/intern/bpy_rna_callback.h b/source/blender/python/intern/bpy_rna_callback.h
index ae42c4cb1a4..6c971ff9528 100644
--- a/source/blender/python/intern/bpy_rna_callback.h
+++ b/source/blender/python/intern/bpy_rna_callback.h
@@ -32,8 +32,8 @@ PyObject *pyrna_callback_add(BPy_StructRNA *self, PyObject *args);
PyObject *pyrna_callback_remove(BPy_StructRNA *self, PyObject *args);
#endif
-PyObject *pyrna_callback_classmethod_add(PyObject *cls, PyObject *args);
-PyObject *pyrna_callback_classmethod_remove(PyObject *cls, PyObject *args);
+PyObject *pyrna_callback_classmethod_add(PyObject *self, PyObject *args);
+PyObject *pyrna_callback_classmethod_remove(PyObject *self, PyObject *args);
#ifdef __cplusplus
}
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index d8d390cfad0..75aa08ee1df 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -90,7 +90,7 @@ void BaseMathObject_dealloc(BaseMathObject *self);
PyMODINIT_FUNC PyInit_mathutils(void);
-int EXPP_FloatsAreEqual(float A, float B, int floatSteps);
+int EXPP_FloatsAreEqual(float A, float B, int maxDiff);
int EXPP_VectorsAreEqual(const float *vecA, const float *vecB, int size, int floatSteps);
typedef struct Mathutils_Callback Mathutils_Callback;
@@ -188,7 +188,7 @@ Py_hash_t mathutils_array_hash(const float *float_array, size_t array_len);
#define MU_ARRAY_FLAGS (MU_ARRAY_ZERO | MU_ARRAY_SPILL)
-int column_vector_multiplication(float rvec[4], VectorObject *vec, MatrixObject *mat);
+int column_vector_multiplication(float r_vec[4], VectorObject *vec, MatrixObject *mat);
#ifndef MATH_STANDALONE
/* dynstr as python string utility functions */
diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c
index 9bc8c0dffed..f7b2840f0b4 100644
--- a/source/blender/python/mathutils/mathutils_Vector.c
+++ b/source/blender/python/mathutils/mathutils_Vector.c
@@ -48,7 +48,7 @@
static PyObject *Vector_copy(VectorObject *self);
static PyObject *Vector_deepcopy(VectorObject *self, PyObject *args);
static PyObject *Vector_to_tuple_ex(VectorObject *self, int ndigits);
-static int row_vector_multiplication(float rvec[MAX_DIMENSIONS],
+static int row_vector_multiplication(float r_vec[MAX_DIMENSIONS],
VectorObject *vec,
MatrixObject *mat);
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index c8cb537af39..089c7eb044b 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -251,8 +251,8 @@ void RE_ChangeModeFlag(struct Render *re, int flag, bool clear);
/* set up the viewplane/perspective matrix, three choices */
struct Object *RE_GetCamera(struct Render *re); /* return camera override if set */
-void RE_SetOverrideCamera(struct Render *re, struct Object *camera);
-void RE_SetCamera(struct Render *re, struct Object *camera);
+void RE_SetOverrideCamera(struct Render *re, struct Object *cam_ob);
+void RE_SetCamera(struct Render *re, struct Object *cam_ob);
void RE_SetWindow(struct Render *re, const rctf *viewplane, float clip_start, float clip_end);
void RE_SetOrtho(struct Render *re, const rctf *viewplane, float clip_start, float clip_end);
@@ -383,8 +383,8 @@ bool RE_allow_render_generic_object(struct Object *ob);
bool RE_HasCombinedLayer(RenderResult *res);
bool RE_HasFloatPixels(RenderResult *res);
bool RE_RenderResult_is_stereo(RenderResult *res);
-struct RenderView *RE_RenderViewGetById(struct RenderResult *res, const int view_id);
-struct RenderView *RE_RenderViewGetByName(struct RenderResult *res, const char *viewname);
+struct RenderView *RE_RenderViewGetById(struct RenderResult *rr, const int view_id);
+struct RenderView *RE_RenderViewGetByName(struct RenderResult *rr, const char *viewname);
RenderResult *RE_DuplicateRenderResult(RenderResult *rr);
diff --git a/source/blender/render/intern/include/render_result.h b/source/blender/render/intern/include/render_result.h
index 187685cd464..5c487223e94 100644
--- a/source/blender/render/intern/include/render_result.h
+++ b/source/blender/render/intern/include/render_result.h
@@ -92,7 +92,7 @@ struct RenderPass *render_layer_add_pass(struct RenderResult *rr,
int channels,
const char *name,
const char *viewname,
- const char *chanid);
+ const char *chan_id);
void render_result_exr_file_merge(struct RenderResult *rr,
struct RenderResult *rrpart,
diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h
index b898ff89ae4..41fa15c594f 100644
--- a/source/blender/render/intern/include/zbuf.h
+++ b/source/blender/render/intern/include/zbuf.h
@@ -36,7 +36,7 @@ typedef struct ZSpan {
void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty);
void zbuf_free_span(struct ZSpan *zspan);
-void zspan_scanconvert(struct ZSpan *zpan,
+void zspan_scanconvert(struct ZSpan *zspan,
void *handle,
float *v1,
float *v2,
diff --git a/source/blender/render/intern/source/initrender.c b/source/blender/render/intern/source/initrender.c
index d631dd1a2ff..d1632dfeacd 100644
--- a/source/blender/render/intern/source/initrender.c
+++ b/source/blender/render/intern/source/initrender.c
@@ -182,9 +182,9 @@ static void re_camera_params_get(Render *re, CameraParams *params)
re->viewplane = params->viewplane;
}
-void RE_SetOverrideCamera(Render *re, Object *camera)
+void RE_SetOverrideCamera(Render *re, Object *cam_ob)
{
- re->camera_override = camera;
+ re->camera_override = cam_ob;
}
static void re_camera_params_stereo3d(Render *re, CameraParams *params, Object *cam_ob)
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index 41d20fa994a..8c61fd5b971 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -265,9 +265,9 @@ static int render_imbuf_write_stamp_test(ReportList *reports,
return ok;
}
-void RE_FreeRenderResult(RenderResult *res)
+void RE_FreeRenderResult(RenderResult *rr)
{
- render_result_free(res);
+ render_result_free(rr);
}
float *RE_RenderLayerGetPass(volatile RenderLayer *rl, const char *name, const char *viewname)
diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c
index ef44c896a25..ef88584974a 100644
--- a/source/blender/render/intern/source/render_result.c
+++ b/source/blender/render/intern/source/render_result.c
@@ -58,11 +58,11 @@
/********************************** Free *************************************/
-static void render_result_views_free(RenderResult *res)
+static void render_result_views_free(RenderResult *rr)
{
- while (res->views.first) {
- RenderView *rv = res->views.first;
- BLI_remlink(&res->views, rv);
+ while (rr->views.first) {
+ RenderView *rv = rr->views.first;
+ BLI_remlink(&rr->views, rv);
if (rv->rect32) {
MEM_freeN(rv->rect32);
@@ -79,17 +79,17 @@ static void render_result_views_free(RenderResult *res)
MEM_freeN(rv);
}
- res->have_combined = false;
+ rr->have_combined = false;
}
-void render_result_free(RenderResult *res)
+void render_result_free(RenderResult *rr)
{
- if (res == NULL) {
+ if (rr == NULL) {
return;
}
- while (res->layers.first) {
- RenderLayer *rl = res->layers.first;
+ while (rr->layers.first) {
+ RenderLayer *rl = rr->layers.first;
while (rl->passes.first) {
RenderPass *rpass = rl->passes.first;
@@ -99,31 +99,31 @@ void render_result_free(RenderResult *res)
BLI_remlink(&rl->passes, rpass);
MEM_freeN(rpass);
}
- BLI_remlink(&res->layers, rl);
+ BLI_remlink(&rr->layers, rl);
MEM_freeN(rl);
}
- render_result_views_free(res);
+ render_result_views_free(rr);
- if (res->rect32) {
- MEM_freeN(res->rect32);
+ if (rr->rect32) {
+ MEM_freeN(rr->rect32);
}
- if (res->rectz) {
- MEM_freeN(res->rectz);
+ if (rr->rectz) {
+ MEM_freeN(rr->rectz);
}
- if (res->rectf) {
- MEM_freeN(res->rectf);
+ if (rr->rectf) {
+ MEM_freeN(rr->rectf);
}
- if (res->text) {
- MEM_freeN(res->text);
+ if (rr->text) {
+ MEM_freeN(rr->text);
}
- if (res->error) {
- MEM_freeN(res->error);
+ if (rr->error) {
+ MEM_freeN(rr->error);
}
- BKE_stamp_data_free(res->stamp_data);
+ BKE_stamp_data_free(rr->stamp_data);
- MEM_freeN(res);
+ MEM_freeN(rr);
}
/* version that's compatible with fullsample buffers */
@@ -1576,15 +1576,15 @@ void render_result_rect_get_pixels(RenderResult *rr,
/*************************** multiview functions *****************************/
-bool RE_HasCombinedLayer(RenderResult *res)
+bool RE_HasCombinedLayer(RenderResult *rr)
{
RenderView *rv;
- if (res == NULL) {
+ if (rr == NULL) {
return false;
}
- rv = res->views.first;
+ rv = rr->views.first;
if (rv == NULL) {
return false;
}
@@ -1592,11 +1592,11 @@ bool RE_HasCombinedLayer(RenderResult *res)
return (rv->rect32 || rv->rectf);
}
-bool RE_HasFloatPixels(RenderResult *res)
+bool RE_HasFloatPixels(RenderResult *rr)
{
RenderView *rview;
- for (rview = res->views.first; rview; rview = rview->next) {
+ for (rview = rr->views.first; rview; rview = rview->next) {
if (rview->rect32 && !rview->rectf) {
return false;
}
@@ -1605,31 +1605,31 @@ bool RE_HasFloatPixels(RenderResult *res)
return true;
}
-bool RE_RenderResult_is_stereo(RenderResult *res)
+bool RE_RenderResult_is_stereo(RenderResult *rr)
{
- if (!BLI_findstring(&res->views, STEREO_LEFT_NAME, offsetof(RenderView, name))) {
+ if (!BLI_findstring(&rr->views, STEREO_LEFT_NAME, offsetof(RenderView, name))) {
return false;
}
- if (!BLI_findstring(&res->views, STEREO_RIGHT_NAME, offsetof(RenderView, name))) {
+ if (!BLI_findstring(&rr->views, STEREO_RIGHT_NAME, offsetof(RenderView, name))) {
return false;
}
return true;
}
-RenderView *RE_RenderViewGetById(RenderResult *res, const int view_id)
+RenderView *RE_RenderViewGetById(RenderResult *rr, const int view_id)
{
- RenderView *rv = BLI_findlink(&res->views, view_id);
- BLI_assert(res->views.first);
- return rv ? rv : res->views.first;
+ RenderView *rv = BLI_findlink(&rr->views, view_id);
+ BLI_assert(rr->views.first);
+ return rv ? rv : rr->views.first;
}
-RenderView *RE_RenderViewGetByName(RenderResult *res, const char *viewname)
+RenderView *RE_RenderViewGetByName(RenderResult *rr, const char *viewname)
{
- RenderView *rv = BLI_findstring(&res->views, viewname, offsetof(RenderView, name));
- BLI_assert(res->views.first);
- return rv ? rv : res->views.first;
+ RenderView *rv = BLI_findstring(&rr->views, viewname, offsetof(RenderView, name));
+ BLI_assert(rr->views.first);
+ return rv ? rv : rr->views.first;
}
static RenderPass *duplicate_render_pass(RenderPass *rpass)
diff --git a/source/blender/simulation/intern/implicit.h b/source/blender/simulation/intern/implicit.h
index a3c8e5f34c4..c5afa90aa91 100644
--- a/source/blender/simulation/intern/implicit.h
+++ b/source/blender/simulation/intern/implicit.h
@@ -65,7 +65,7 @@ BLI_INLINE void implicit_print_matrix_elem(float v)
}
void SIM_mass_spring_set_vertex_mass(struct Implicit_Data *data, int index, float mass);
-void SIM_mass_spring_set_rest_transform(struct Implicit_Data *data, int index, float rot[3][3]);
+void SIM_mass_spring_set_rest_transform(struct Implicit_Data *data, int index, float tfm[3][3]);
void SIM_mass_spring_set_motion_state(struct Implicit_Data *data,
int index,
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index c57fe6d4ba1..80f330d91ca 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -200,7 +200,7 @@ void WM_lib_reload(struct Library *lib, struct bContext *C, struct ReportList *r
/* mouse cursors */
void WM_cursor_set(struct wmWindow *win, int curs);
bool WM_cursor_set_from_tool(struct wmWindow *win, const ScrArea *area, const ARegion *region);
-void WM_cursor_modal_set(struct wmWindow *win, int curs);
+void WM_cursor_modal_set(struct wmWindow *win, int val);
void WM_cursor_modal_restore(struct wmWindow *win);
void WM_cursor_wait(bool val);
void WM_cursor_grab_enable(struct wmWindow *win, int wrap, bool hide, int bounds[4]);
@@ -269,20 +269,20 @@ typedef void (*wmUIHandlerRemoveFunc)(struct bContext *C, void *userdata);
struct wmEventHandler_UI *WM_event_add_ui_handler(const struct bContext *C,
ListBase *handlers,
- wmUIHandlerFunc ui_handle,
- wmUIHandlerRemoveFunc ui_remove,
- void *userdata,
+ wmUIHandlerFunc handle_fn,
+ wmUIHandlerRemoveFunc remove_fn,
+ void *user_data,
const char flag);
void WM_event_remove_ui_handler(ListBase *handlers,
- wmUIHandlerFunc ui_handle,
- wmUIHandlerRemoveFunc ui_remove,
- void *userdata,
+ wmUIHandlerFunc handle_fn,
+ wmUIHandlerRemoveFunc remove_fn,
+ void *user_data,
const bool postpone);
void WM_event_remove_area_handler(struct ListBase *handlers, void *area);
void WM_event_free_ui_handler_all(struct bContext *C,
ListBase *handlers,
- wmUIHandlerFunc ui_handle,
- wmUIHandlerRemoveFunc ui_remove);
+ wmUIHandlerFunc handle_fn,
+ wmUIHandlerRemoveFunc remove_fn);
struct wmEventHandler_Op *WM_event_add_modal_handler(struct bContext *C, struct wmOperator *op);
void WM_event_modal_handler_area_replace(wmWindow *win,
@@ -676,7 +676,7 @@ struct ID *WM_drag_ID(const struct wmDrag *drag, short idcode);
struct ID *WM_drag_ID_from_event(const struct wmEvent *event, short idcode);
/* Set OpenGL viewport and scissor */
-void wmViewport(const struct rcti *rect);
+void wmViewport(const struct rcti *winrct);
void wmPartialViewport(rcti *drawrct, const rcti *winrct, const rcti *partialrct);
void wmWindowViewport(struct wmWindow *win);
@@ -886,7 +886,7 @@ double WM_tooltip_time_closed(void);
struct wmGenericCallback *WM_generic_callback_steal(struct wmGenericCallback *callback);
void WM_generic_callback_free(struct wmGenericCallback *callback);
-void WM_generic_user_data_free(struct wmGenericUserData *user_data);
+void WM_generic_user_data_free(struct wmGenericUserData *wm_userdata);
bool WM_region_use_viewport(struct ScrArea *area, struct ARegion *region);
diff --git a/source/blender/windowmanager/WM_toolsystem.h b/source/blender/windowmanager/WM_toolsystem.h
index 13d1666dc95..451f0ecd424 100644
--- a/source/blender/windowmanager/WM_toolsystem.h
+++ b/source/blender/windowmanager/WM_toolsystem.h
@@ -76,7 +76,7 @@ void WM_toolsystem_reinit_all(struct bContext *C, struct wmWindow *win);
void WM_toolsystem_ref_set_from_runtime(struct bContext *C,
struct WorkSpace *workspace,
struct bToolRef *tref,
- const struct bToolRef_Runtime *tool,
+ const struct bToolRef_Runtime *tref_rt,
const char *idname);
void WM_toolsystem_ref_sync_from_context(struct Main *bmain,
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
index a4412ecce5c..70ddae4d724 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h
@@ -96,7 +96,7 @@ void WM_gizmo_set_matrix_rotation_from_yz_axis(struct wmGizmo *gz,
const float y_axis[3],
const float z_axis[3]);
-void WM_gizmo_set_matrix_offset_location(struct wmGizmo *gz, const float origin[3]);
+void WM_gizmo_set_matrix_offset_location(struct wmGizmo *gz, const float offset[3]);
void WM_gizmo_set_matrix_offset_rotation_from_z_axis(struct wmGizmo *gz, const float z_axis[3]);
void WM_gizmo_set_matrix_offset_rotation_from_yz_axis(struct wmGizmo *gz,
const float y_axis[3],
@@ -130,20 +130,20 @@ void WM_gizmo_calc_matrix_final(const struct wmGizmo *gz, float r_mat[4][4]);
/* properties */
void WM_gizmo_properties_create_ptr(struct PointerRNA *ptr, struct wmGizmoType *gzt);
-void WM_gizmo_properties_create(struct PointerRNA *ptr, const char *opstring);
+void WM_gizmo_properties_create(struct PointerRNA *ptr, const char *gtstring);
void WM_gizmo_properties_alloc(struct PointerRNA **ptr,
struct IDProperty **properties,
- const char *wtstring);
+ const char *gtstring);
void WM_gizmo_properties_sanitize(struct PointerRNA *ptr, const bool no_context);
bool WM_gizmo_properties_default(struct PointerRNA *ptr, const bool do_update);
-void WM_gizmo_properties_reset(struct wmGizmo *op);
+void WM_gizmo_properties_reset(struct wmGizmo *gz);
void WM_gizmo_properties_clear(struct PointerRNA *ptr);
void WM_gizmo_properties_free(struct PointerRNA *ptr);
/* wm_gizmo_type.c */
const struct wmGizmoType *WM_gizmotype_find(const char *idname, bool quiet);
-void WM_gizmotype_append(void (*wtfunc)(struct wmGizmoType *));
-void WM_gizmotype_append_ptr(void (*mnpfunc)(struct wmGizmoType *, void *), void *userdata);
+void WM_gizmotype_append(void (*gtfunc)(struct wmGizmoType *));
+void WM_gizmotype_append_ptr(void (*gtfunc)(struct wmGizmoType *, void *), void *userdata);
bool WM_gizmotype_remove(struct bContext *C, struct Main *bmain, const char *idname);
void WM_gizmotype_remove_ptr(struct bContext *C, struct Main *bmain, struct wmGizmoType *gzt);
void WM_gizmotype_iter(struct GHashIterator *ghi);
@@ -151,11 +151,11 @@ void WM_gizmotype_iter(struct GHashIterator *ghi);
/* wm_gizmo_group_type.c */
struct wmGizmoGroupType *WM_gizmogrouptype_find(const char *idname, bool quiet);
struct wmGizmoGroupType *WM_gizmogrouptype_append(void (*wtfunc)(struct wmGizmoGroupType *));
-struct wmGizmoGroupType *WM_gizmogrouptype_append_ptr(void (*mnpfunc)(struct wmGizmoGroupType *,
- void *),
+struct wmGizmoGroupType *WM_gizmogrouptype_append_ptr(void (*wtfunc)(struct wmGizmoGroupType *,
+ void *),
void *userdata);
bool WM_gizmogrouptype_free(const char *idname);
-void WM_gizmogrouptype_free_ptr(struct wmGizmoGroupType *wt);
+void WM_gizmogrouptype_free_ptr(struct wmGizmoGroupType *gzgt);
void WM_gizmogrouptype_iter(struct GHashIterator *ghi);
struct wmGizmoGroupTypeRef *WM_gizmogrouptype_append_and_link(
diff --git a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
index b64d544962d..a5e51d0d395 100644
--- a/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
+++ b/source/blender/windowmanager/gizmo/intern/wm_gizmo_group.c
@@ -642,7 +642,7 @@ void GIZMOGROUP_OT_gizmo_tweak(wmOperatorType *ot)
/** \} */
-wmKeyMap *wm_gizmogroup_tweak_modal_keymap(wmKeyConfig *kc)
+wmKeyMap *wm_gizmogroup_tweak_modal_keymap(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
char name[KMAP_MAX_NAME];
@@ -658,14 +658,14 @@ wmKeyMap *wm_gizmogroup_tweak_modal_keymap(wmKeyConfig *kc)
};
STRNCPY(name, "Generic Gizmo Tweak Modal Map");
- keymap = WM_modalkeymap_find(kc, name);
+ keymap = WM_modalkeymap_find(keyconf, name);
/* this function is called for each spacetype, only needs to add map once */
if (keymap && keymap->modal_items) {
return NULL;
}
- keymap = WM_modalkeymap_ensure(kc, name, modal_items);
+ keymap = WM_modalkeymap_ensure(keyconf, name, modal_items);
/* items for modal map */
WM_modalkeymap_add_item(keymap, EVT_ESCKEY, KM_PRESS, KM_ANY, 0, TWEAK_MODAL_CANCEL);
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index d7ff2689a86..a39b10434e8 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -1761,13 +1761,13 @@ enum {
static char wm_keymap_update_flag = 0;
-void WM_keyconfig_update_tag(wmKeyMap *km, wmKeyMapItem *kmi)
+void WM_keyconfig_update_tag(wmKeyMap *keymap, wmKeyMapItem *kmi)
{
/* quick tag to do delayed keymap updates */
wm_keymap_update_flag |= WM_KEYMAP_UPDATE_RECONFIGURE;
- if (km) {
- km->flag |= KEYMAP_UPDATE;
+ if (keymap) {
+ keymap->flag |= KEYMAP_UPDATE;
}
if (kmi) {
kmi->flag |= KMI_UPDATE;
diff --git a/source/blender/windowmanager/intern/wm_toolsystem.c b/source/blender/windowmanager/intern/wm_toolsystem.c
index 72969f34162..570d60f6c60 100644
--- a/source/blender/windowmanager/intern/wm_toolsystem.c
+++ b/source/blender/windowmanager/intern/wm_toolsystem.c
@@ -450,10 +450,10 @@ static bool toolsystem_key_ensure_check(const bToolKey *tkey)
return false;
}
-int WM_toolsystem_mode_from_spacetype(ViewLayer *view_layer, ScrArea *area, int spacetype)
+int WM_toolsystem_mode_from_spacetype(ViewLayer *view_layer, ScrArea *area, int space_type)
{
int mode = -1;
- switch (spacetype) {
+ switch (space_type) {
case SPACE_VIEW3D: {
/* 'area' may be NULL in this case. */
Object *obact = OBACT(view_layer);
diff --git a/source/blender/windowmanager/message_bus/wm_message_bus.h b/source/blender/windowmanager/message_bus/wm_message_bus.h
index 23a53eace52..7ae356cf806 100644
--- a/source/blender/windowmanager/message_bus/wm_message_bus.h
+++ b/source/blender/windowmanager/message_bus/wm_message_bus.h
@@ -155,7 +155,7 @@ typedef struct wmMsgSubscribeKey_Static {
wmMsg_Static msg;
} wmMsgSubscribeKey_Static;
-void WM_msgtypeinfo_init_static(wmMsgTypeInfo *msg_type);
+void WM_msgtypeinfo_init_static(wmMsgTypeInfo *msgtype_info);
wmMsgSubscribeKey_Static *WM_msg_lookup_static(struct wmMsgBus *mbus,
const wmMsgParams_Static *msg_key_params);
@@ -208,7 +208,7 @@ typedef struct wmMsgSubscribeKey_RNA {
# define _WM_MESSAGE_EXTERN_END
#endif
-void WM_msgtypeinfo_init_rna(wmMsgTypeInfo *msg_type);
+void WM_msgtypeinfo_init_rna(wmMsgTypeInfo *msgtype_info);
wmMsgSubscribeKey_RNA *WM_msg_lookup_rna(struct wmMsgBus *mbus,
const wmMsgParams_RNA *msg_key_params);