From 1ec987f73c47b92d0b604ab7168a71803be3d0db Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 18 Jun 2017 02:07:22 +1000 Subject: [PATCH 1/6] Add Cone: tip soft-min should be zero Default value should be included in range. --- source/blender/editors/mesh/editmesh_add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 3725590c188..07fedffaf80 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -384,7 +384,7 @@ void MESH_OT_primitive_cone_add(wmOperatorType *ot) /* props */ RNA_def_int(ot->srna, "vertices", 32, 3, MESH_ADD_VERTS_MAXI, "Vertices", "", 3, 500); RNA_def_float_distance(ot->srna, "radius1", 1.0f, 0.0, OBJECT_ADD_SIZE_MAXF, "Radius 1", "", 0.001, 100.00); - RNA_def_float_distance(ot->srna, "radius2", 0.0f, 0.0, OBJECT_ADD_SIZE_MAXF, "Radius 2", "", 0.001, 100.00); + RNA_def_float_distance(ot->srna, "radius2", 0.0f, 0.0, OBJECT_ADD_SIZE_MAXF, "Radius 2", "", 0.0, 100.00); RNA_def_float_distance(ot->srna, "depth", 2.0f, 0.0, OBJECT_ADD_SIZE_MAXF, "Depth", "", 0.001, 100.00); RNA_def_enum(ot->srna, "end_fill_type", fill_type_items, 1, "Base Fill Type", ""); From b94a433ca34d74cfefd2e41042bc001b3f8d20bc Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 18 Jun 2017 02:33:13 +1000 Subject: [PATCH 2/6] Docs: Fix file:line links in generated API docs --- doc/python_api/sphinx_doc_gen.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index c8bf0243d2c..3b0e8f52c83 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1613,10 +1613,8 @@ def pyrna2sphinx(basepath): else: url_base = API_BASEURL - fw(" :file: `%s <%s/%s>`_:%d\n\n" % (location[0], - url_base, - location[0], - location[1])) + fw(" :file: `%s\\:%d <%s/%s$%d>`_\n\n" % + (location[0], location[1], url_base, location[0], location[1])) file.close() From cd8c46627f9908ede5b3c9fb5ac3b39d31536ec0 Mon Sep 17 00:00:00 2001 From: Lukas Stockner Date: Sun, 18 Jun 2017 05:13:32 +0200 Subject: [PATCH 3/6] Fix unreported: Copy-pasting nodes crashes when they have an undefined type --- source/blender/editors/space_node/node_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 9dc39b1839b..5f8f839025f 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -2086,7 +2086,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op) /* make sure all clipboard nodes would be valid in the target tree */ all_nodes_valid = true; for (node = clipboard_nodes_lb->first; node; node = node->next) { - if (!node->typeinfo->poll_instance(node, ntree)) { + if (!node->typeinfo->poll_instance || !node->typeinfo->poll_instance(node, ntree)) { all_nodes_valid = false; BKE_reportf(op->reports, RPT_ERROR, "Cannot add node %s into node tree %s", node->name, ntree->id.name + 2); } From f158a206f2dd57079afe4236283b73775c82acaf Mon Sep 17 00:00:00 2001 From: Thomas Beck Date: Sun, 18 Jun 2017 16:26:09 +0200 Subject: [PATCH 4/6] Fix T51840: UI redraw in node editor header missing on pointcache bake Missing a notifier handler in the node editor --- source/blender/editors/space_node/space_node.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c index bbdf6feef01..2267316d257 100644 --- a/source/blender/editors/space_node/space_node.c +++ b/source/blender/editors/space_node/space_node.c @@ -753,6 +753,10 @@ static void node_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegi break; } break; + case NC_WM: + if (wmn->data == ND_JOB) + ED_region_tag_redraw(ar); + break; case NC_SCENE: case NC_MATERIAL: case NC_TEXTURE: From 3190eaf10942c2ce9e5102f209902c8bad674fe9 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 18 Jun 2017 23:54:52 +0200 Subject: [PATCH 5/6] Fix T51774: Children particles hair interpolation not correct with textures or dp. Children where always getting at least one segment of fixed length... Now fully hidden ones (zero length) get no segment at all. Note that even very short ones keep getting one 'unit' length segment - would rather avoid changing that at this point, given how complex children particles 'length' can get with all kind of modifiers... Think we can live with that for now anyway. --- source/blender/blenkernel/intern/particle_child.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/particle_child.c b/source/blender/blenkernel/intern/particle_child.c index 842de869291..bfcda89a635 100644 --- a/source/blender/blenkernel/intern/particle_child.c +++ b/source/blender/blenkernel/intern/particle_child.c @@ -355,9 +355,13 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod { const float step_length = 1.0f / (float)(totkeys - 1); - float cur_length = 0.0f; - + + if (max_length <= 0.0f) { + keys->segments = -1; + totkeys = 0; + } + /* we have to correct velocity because of kink & clump */ for (k = 0, key = keys; k < totkeys; ++k, ++key) { if (k >= 2) { From 72c9141a7a56fa4762ac0daae501f1609532506c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 19 Jun 2017 09:33:23 +1000 Subject: [PATCH 6/6] Cleanup: doxygen comments Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync. --- intern/ghost/GHOST_C-api.h | 2 +- intern/ghost/intern/GHOST_WindowCocoa.h | 2 +- intern/memutil/MEM_CacheLimiterC-Api.h | 24 ++--- source/blender/alembic/intern/abc_exporter.cc | 13 ++- source/blender/alembic/intern/abc_util.h | 2 +- source/blender/blenkernel/intern/bvhutils.c | 6 +- .../blender/blenkernel/intern/mesh_evaluate.c | 4 +- source/blender/blenlib/intern/BLI_ghash.c | 12 +-- source/blender/blenlib/intern/math_geom.c | 4 +- source/blender/blenlib/intern/math_matrix.c | 22 ++--- source/blender/blenlib/intern/string_utf8.c | 2 +- .../editors/armature/armature_naming.c | 4 +- .../blender/editors/gpencil/gpencil_intern.h | 89 +------------------ .../blender/editors/gpencil/gpencil_utils.c | 62 ++++++++++--- .../blender/editors/space_image/image_ops.c | 4 +- .../editors/transform/transform_conversions.c | 6 +- .../editors/transform/transform_snap_object.c | 4 +- .../freestyle/intern/geometry/matrix_util.h | 6 +- source/blender/imbuf/IMB_imbuf_types.h | 22 +++-- source/blender/python/intern/bpy_rna.c | 2 +- source/blender/render/intern/source/zbuf.c | 1 - .../GamePlayer/common/GPC_MouseDevice.h | 2 - 22 files changed, 130 insertions(+), 165 deletions(-) diff --git a/intern/ghost/GHOST_C-api.h b/intern/ghost/GHOST_C-api.h index 6887063eae9..967d3f58143 100644 --- a/intern/ghost/GHOST_C-api.h +++ b/intern/ghost/GHOST_C-api.h @@ -43,7 +43,7 @@ extern "C" { * Creates a "handle" for a C++ GHOST object. * A handle is just an opaque pointer to an empty struct. * In the API the pointer is casted to the actual C++ class. - * \param name Name of the handle to create. + * The 'name' argument to the macro is the name of the handle to create. */ GHOST_DECLARE_HANDLE(GHOST_SystemHandle); diff --git a/intern/ghost/intern/GHOST_WindowCocoa.h b/intern/ghost/intern/GHOST_WindowCocoa.h index b234291396b..5168c48ca2f 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.h +++ b/intern/ghost/intern/GHOST_WindowCocoa.h @@ -56,7 +56,7 @@ public: * \param systemCocoa The associated system class to forward events to * \param title The text shown in the title bar of the window. * \param left The coordinate of the left edge of the window. - * \param top The coordinate of the top edge of the window. + * \param bottom The coordinate of the bottom edge of the window. * \param width The width the window. * \param height The height the window. * \param state The state the window is initially opened with. diff --git a/intern/memutil/MEM_CacheLimiterC-Api.h b/intern/memutil/MEM_CacheLimiterC-Api.h index 0fe5469a4d4..b5680890eb8 100644 --- a/intern/memutil/MEM_CacheLimiterC-Api.h +++ b/intern/memutil/MEM_CacheLimiterC-Api.h @@ -61,8 +61,8 @@ bool MEM_CacheLimiter_is_disabled(void); * Create new MEM_CacheLimiter object * managed objects are destructed with the data_destructor * - * @param data_destructor - * @return A new MEM_CacheLimter object + * \param data_destructor + * \return A new MEM_CacheLimter object */ MEM_CacheLimiterC *new_MEM_CacheLimiter(MEM_CacheLimiter_Destruct_Func data_destructor, @@ -73,7 +73,7 @@ MEM_CacheLimiterC *new_MEM_CacheLimiter(MEM_CacheLimiter_Destruct_Func data_dest * * Frees the memory of the CacheLimiter but does not touch managed objects! * - * @param This "This" pointer + * \param This "This" pointer */ void delete_MEM_CacheLimiter(MEM_CacheLimiterC *This); @@ -81,8 +81,8 @@ void delete_MEM_CacheLimiter(MEM_CacheLimiterC *This); /** * Manage object * - * @param This "This" pointer, data data object to manage - * @return CacheLimiterHandle to ref, unref, touch the managed object + * \param This "This" pointer, data data object to manage + * \return CacheLimiterHandle to ref, unref, touch the managed object */ MEM_CacheLimiterHandleC *MEM_CacheLimiter_insert(MEM_CacheLimiterC *This, void *data); @@ -90,7 +90,7 @@ MEM_CacheLimiterHandleC *MEM_CacheLimiter_insert(MEM_CacheLimiterC *This, void * /** * Free objects until memory constraints are satisfied * - * @param This "This" pointer + * \param This "This" pointer */ void MEM_CacheLimiter_enforce_limits(MEM_CacheLimiterC *This); @@ -99,7 +99,7 @@ void MEM_CacheLimiter_enforce_limits(MEM_CacheLimiterC *This); * Unmanage object previously inserted object. * Does _not_ delete managed object! * - * @param This "This" pointer, handle of object + * \param handle of object */ void MEM_CacheLimiter_unmanage(MEM_CacheLimiterHandleC *handle); @@ -108,7 +108,7 @@ void MEM_CacheLimiter_unmanage(MEM_CacheLimiterHandleC *handle); /** * Raise priority of object (put it at the tail of the deletion chain) * - * @param handle of object + * \param handle of object */ void MEM_CacheLimiter_touch(MEM_CacheLimiterHandleC *handle); @@ -117,7 +117,7 @@ void MEM_CacheLimiter_touch(MEM_CacheLimiterHandleC *handle); * Increment reference counter. Objects with reference counter != 0 are _not_ * deleted. * - * @param handle of object + * \param handle of object */ void MEM_CacheLimiter_ref(MEM_CacheLimiterHandleC *handle); @@ -126,7 +126,7 @@ void MEM_CacheLimiter_ref(MEM_CacheLimiterHandleC *handle); * Decrement reference counter. Objects with reference counter != 0 are _not_ * deleted. * - * @param handle of object + * \param handle of object */ void MEM_CacheLimiter_unref(MEM_CacheLimiterHandleC *handle); @@ -134,7 +134,7 @@ void MEM_CacheLimiter_unref(MEM_CacheLimiterHandleC *handle); /** * Get reference counter. * - * @param handle of object + * \param handle of object */ int MEM_CacheLimiter_get_refcount(MEM_CacheLimiterHandleC *handle); @@ -142,7 +142,7 @@ int MEM_CacheLimiter_get_refcount(MEM_CacheLimiterHandleC *handle); /** * Get pointer to managed object * - * @param handle of object + * \param handle of object */ void *MEM_CacheLimiter_get(MEM_CacheLimiterHandleC *handle); diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc index 3f359990980..4fe65b96f36 100644 --- a/source/blender/alembic/intern/abc_exporter.cc +++ b/source/blender/alembic/intern/abc_exporter.cc @@ -131,13 +131,12 @@ static bool object_type_is_exportable(Object *ob) /** * Returns whether this object should be exported into the Alembic file. * - * @param settings export settings, used for options like 'selected only'. - * @param ob the object in question. - * @param is_duplicated normally false; true when the object is instanced - * into the scene by a dupli-object (e.g. part of a - * dupligroup). This ignores selection and layer - * visibility, and assumes that the dupli-object itself - * (e.g. the group-instantiating empty) is exported. + * \param settings: export settings, used for options like 'selected only'. + * \param ob: the object in question. + * \param is_duplicated: Normally false; true when the object is instanced + * into the scene by a dupli-object (e.g. part of a dupligroup). + * This ignores selection and layer visibility, + * and assumes that the dupli-object itself (e.g. the group-instantiating empty) is exported. */ static bool export_object(const ExportSettings * const settings, Object *ob, bool is_duplicated) diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h index 74d0faf97d3..2526958111a 100644 --- a/source/blender/alembic/intern/abc_util.h +++ b/source/blender/alembic/intern/abc_util.h @@ -33,7 +33,7 @@ #endif /** - * @brief The CacheReader struct is only used for anonymous pointers, + * \brief The CacheReader struct is only used for anonymous pointers, * to interface between C and C++ code. This library only creates * pointers to AbcObjectReader (or subclasses thereof). */ diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index c0e4ef37a93..c1fad4f80c8 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -917,10 +917,10 @@ BVHTree *bvhtree_from_mesh_faces( /** * Builds a bvh tree where nodes are the given tessellated faces (note: does not copy given mfaces!). - * \param vert_allocated if true, vert freeing will be done when freeing data. - * \param face_allocated if true, face freeing will be done when freeing data. + * \param vert_allocated: if true, vert freeing will be done when freeing data. + * \param face_allocated: if true, face freeing will be done when freeing data. * \param faces_mask: if not null, true elements give which faces to add to BVH tree. - * \param numFaces_active if >= 0, number of active faces to add to BVH tree (else will be computed from mask). + * \param faces_num_active: if >= 0, number of active faces to add to BVH tree (else will be computed from mask). */ BVHTree *bvhtree_from_mesh_faces_ex( BVHTreeFromMesh *data, const MVert *vert, const bool vert_allocated, diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index 37f4477febf..5dfcef9f9bf 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -1629,8 +1629,8 @@ void BKE_mesh_normals_loop_custom_from_vertices_set( /** * Computes average per-vertex normals from given custom loop normals. * - * @param clnors The computed custom loop normals. - * @param r_vert_clnors The (already allocated) array where to store averaged per-vertex normals. + * \param clnors: The computed custom loop normals. + * \param r_vert_clnors: The (already allocated) array where to store averaged per-vertex normals. */ void BKE_mesh_normals_loop_to_vertex( const int numVerts, const MLoop *mloops, const int numLoops, diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index d1fe3557801..69dee12c713 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -116,6 +116,12 @@ struct GHash { }; +/* -------------------------------------------------------------------- */ +/* GHash API */ + +/** \name Internal Utility API + * \{ */ + BLI_INLINE void ghash_entry_copy( GHash *gh_dst, Entry *dst, GHash *gh_src, Entry *src, GHashKeyCopyFP keycopyfp, GHashValCopyFP valcopyfp) @@ -132,12 +138,6 @@ BLI_INLINE void ghash_entry_copy( } } -/* -------------------------------------------------------------------- */ -/* GHash API */ - -/** \name Internal Utility API - * \{ */ - /** * Get the full hash for a key. */ diff --git a/source/blender/blenlib/intern/math_geom.c b/source/blender/blenlib/intern/math_geom.c index e28f4902c14..bfe1aefcbbd 100644 --- a/source/blender/blenlib/intern/math_geom.c +++ b/source/blender/blenlib/intern/math_geom.c @@ -572,8 +572,8 @@ float dist_squared_to_ray_v3( } /** * Find the closest point in a seg to a ray and return the distance squared. - * \param r_point : Is the point on segment closest to ray (or to ray_origin if the ray and the segment are parallel). - * \param depth: the distance of r_point projection on ray to the ray_origin. + * \param r_point: Is the point on segment closest to ray (or to ray_origin if the ray and the segment are parallel). + * \param r_depth: the distance of r_point projection on ray to the ray_origin. */ float dist_squared_ray_to_seg_v3( const float ray_origin[3], const float ray_direction[3], diff --git a/source/blender/blenlib/intern/math_matrix.c b/source/blender/blenlib/intern/math_matrix.c index 9a60c670ec7..f47f9ad76e6 100644 --- a/source/blender/blenlib/intern/math_matrix.c +++ b/source/blender/blenlib/intern/math_matrix.c @@ -1738,16 +1738,16 @@ void blend_m4_m4m4(float out[4][4], float dst[4][4], float src[4][4], const floa /** * A polar-decomposition-based interpolation between matrix A and matrix B. * - * \note This code is about five times slower as the 'naive' interpolation done by \a blend_m3_m3m3 - * (it typically remains below 2 usec on an average i74700, while \a blend_m3_m3m3 remains below 0.4 usec). + * \note This code is about five times slower as the 'naive' interpolation done by #blend_m3_m3m3 + * (it typically remains below 2 usec on an average i74700, while #blend_m3_m3m3 remains below 0.4 usec). * However, it gives expected results even with non-uniformaly scaled matrices, see T46418 for an example. * * Based on "Matrix Animation and Polar Decomposition", by Ken Shoemake & Tom Duff * - * @return R the interpolated matrix. - * @param A the intput matrix which is totally effective with \a t = 0.0. - * @param B the intput matrix which is totally effective with \a t = 1.0. - * @param t the interpolation factor. + * \param R: Resulting interpolated matrix. + * \param A: Input matrix which is totally effective with `t = 0.0`. + * \param B: Input matrix which is totally effective with `t = 1.0`. + * \param t: Interpolation factor. */ void interp_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t) { @@ -1777,12 +1777,12 @@ void interp_m3_m3m3(float R[3][3], float A[3][3], float B[3][3], const float t) } /** - * Complete transform matrix interpolation, based on polar-decomposition-based interpolation from interp_m3_m3m3. + * Complete transform matrix interpolation, based on polar-decomposition-based interpolation from #interp_m3_m3m3. * - * @return R the interpolated matrix. - * @param A the intput matrix which is totally effective with \a t = 0.0. - * @param B the intput matrix which is totally effective with \a t = 1.0. - * @param t the interpolation factor. + * \param R: Resulting interpolated matrix. + * \param A: Input matrix which is totally effective with `t = 0.0`. + * \param B: Input matrix which is totally effective with `t = 1.0`. + * \param t: Interpolation factor. */ void interp_m4_m4m4(float R[4][4], float A[4][4], float B[4][4], const float t) { diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c index b7e5e3e101e..229a97a2fa7 100644 --- a/source/blender/blenlib/intern/string_utf8.c +++ b/source/blender/blenlib/intern/string_utf8.c @@ -167,7 +167,7 @@ utf8_error: /** * Remove any invalid utf-8 byte (taking into account multi-bytes sequence of course). * - * @return number of stripped bytes. + * \return number of stripped bytes. */ int BLI_utf8_invalid_strip(char *str, size_t length) { diff --git a/source/blender/editors/armature/armature_naming.c b/source/blender/editors/armature/armature_naming.c index c928508237d..db4b642fe91 100644 --- a/source/blender/editors/armature/armature_naming.c +++ b/source/blender/editors/armature/armature_naming.c @@ -311,8 +311,8 @@ typedef struct BoneFlipNameData { * This way if we are flipping related bones (e.g., Bone.L, Bone.R) at the same time * all the bones are safely renamed, without conflicting with each other. * - * \param arm Armature the bones belong to - * \param bones ListBase of BoneConflict elems, populated via ED_armature_bones_flip_names_add + * \param arm: Armature the bones belong to + * \param bones_names: List of BoneConflict elems. */ void ED_armature_bones_flip_names(bArmature *arm, ListBase *bones_names) { diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index 13af06fd4fd..a3734c56c59 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -71,75 +71,23 @@ typedef struct GP_SpaceConversion { float mat[4][4]; /* transform matrix on the strokes (introduced in [b770964]) */ } GP_SpaceConversion; - -/** - * Check whether a given stroke segment is inside a circular brush - * - * \param mval The current screen-space coordinates (midpoint) of the brush - * \param mvalo The previous screen-space coordinates (midpoint) of the brush (NOT CURRENTLY USED) - * \param rad The radius of the brush - * - * \param x0, y0 The screen-space x and y coordinates of the start of the stroke segment - * \param x1, y1 The screen-space x and y coordinates of the end of the stroke segment - */ bool gp_stroke_inside_circle(const int mval[2], const int UNUSED(mvalo[2]), int rad, int x0, int y0, int x1, int y1); - -/** - * Init settings for stroke point space conversions - * - * \param[out] r_gsc The space conversion settings struct, populated with necessary params - */ void gp_point_conversion_init(struct bContext *C, GP_SpaceConversion *r_gsc); -/** - * Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D) - * - * \param[out] r_x The screen-space x-coordinate of the point - * \param[out] r_y The screen-space y-coordinate of the point - */ void gp_point_to_xy(GP_SpaceConversion *settings, struct bGPDstroke *gps, struct bGPDspoint *pt, int *r_x, int *r_y); -/** - * Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D) - * - * Just like gp_point_to_xy(), except the resulting coordinates are floats not ints. - * Use this version to solve "stair-step" artifacts which may arise when roundtripping the calculations. - * - * \param[out] r_x The screen-space x-coordinate of the point - * \param[out] r_y The screen-space y-coordinate of the point - */ void gp_point_to_xy_fl(GP_SpaceConversion *gsc, bGPDstroke *gps, bGPDspoint *pt, float *r_x, float *r_y); -/** - * Convert point to parent space - * - * \param pt Original point - * \param diff_mat Matrix with the difference between original parent matrix - * \param[out] r_pt Pointer to new point after apply matrix - */ void gp_point_to_parent_space(bGPDspoint *pt, float diff_mat[4][4], bGPDspoint *r_pt); -/** - * Change points position relative to parent object - */ + void gp_apply_parent(bGPDlayer *gpl, bGPDstroke *gps); -/** - * Change point position relative to parent object - */ + void gp_apply_parent_point(bGPDlayer *gpl, bGPDspoint *pt); -/** - * Convert a screenspace point to a 3D Grease Pencil coordinate. - * - * For use with editing tools where it is easier to perform the operations in 2D, - * and then later convert the transformed points back to 3D. - * - * \param screeN_co The screenspace 2D coordinates to convert to - * \param[out] r_out The resulting 3D coordinates of the input point - */ bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, struct Scene *scene, const float screen_co[2], float r_out[3]); /* Poll Callbacks ------------------------------------ */ @@ -165,43 +113,10 @@ struct GHash *gp_copybuf_validate_colormap(bGPdata *gpd); void gp_stroke_delete_tagged_points(bGPDframe *gpf, bGPDstroke *gps, bGPDstroke *next_stroke, int tag_flags); -/** - * Apply smooth to stroke point - * \param gps Stroke to smooth - * \param i Point index - * \param inf Amount of smoothing to apply - * \param affect_pressure Apply smoothing to pressure values too? - */ bool gp_smooth_stroke(bGPDstroke *gps, int i, float inf, bool affect_pressure); - -/** -* Apply smooth for strength to stroke point -* \param gps Stroke to smooth -* \param i Point index -* \param inf Amount of smoothing to apply -*/ bool gp_smooth_stroke_strength(bGPDstroke *gps, int i, float inf); - -/** -* Apply smooth for thickness to stroke point (use pressure) -* \param gps Stroke to smooth -* \param i Point index -* \param inf Amount of smoothing to apply -*/ bool gp_smooth_stroke_thickness(bGPDstroke *gps, int i, float inf); - -/** - * Subdivide a stroke once, by adding points at the midpoint between each pair of points - * \param gps Stroke data - * \param new_totpoints Total number of points (after subdividing) - */ void gp_subdivide_stroke(bGPDstroke *gps, const int new_totpoints); - -/** -* Add randomness to stroke -* \param gps Stroke data -* \param brush Brush data -*/ void gp_randomize_stroke(bGPDstroke *gps, bGPDbrush *brush); /* Layers Enums -------------------------------------- */ diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 2b662d04f03..ed05b8be9ca 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -391,7 +391,16 @@ EnumPropertyItem *ED_gpencil_layers_with_new_enum_itemf(bContext *C, PointerRNA /* ******************************************************** */ /* Brush Tool Core */ -/* Check if part of stroke occurs within last segment drawn by eraser */ +/** + * Check whether a given stroke segment is inside a circular brush + * + * \param mval The current screen-space coordinates (midpoint) of the brush + * \param mvalo The previous screen-space coordinates (midpoint) of the brush (NOT CURRENTLY USED) + * \param rad The radius of the brush + * + * \param x0, y0 The screen-space x and y coordinates of the start of the stroke segment + * \param x1, y1 The screen-space x and y coordinates of the end of the stroke segment + */ bool gp_stroke_inside_circle(const int mval[2], const int UNUSED(mvalo[2]), int rad, int x0, int y0, int x1, int y1) { @@ -502,7 +511,11 @@ bGPDpalettecolor *ED_gpencil_stroke_getcolor(bGPdata *gpd, bGPDstroke *gps) /* ******************************************************** */ /* Space Conversion */ -/* Init handling for space-conversion function (from passed-in parameters) */ +/** + * Init settings for stroke point space conversions + * + * \param r_gsc: [out] The space conversion settings struct, populated with necessary params + */ void gp_point_conversion_init(bContext *C, GP_SpaceConversion *r_gsc) { ScrArea *sa = CTX_wm_area(C); @@ -538,7 +551,13 @@ void gp_point_conversion_init(bContext *C, GP_SpaceConversion *r_gsc) } } -/* convert point to parent space */ +/** + * Convert point to parent space + * + * \param pt Original point + * \param diff_mat Matrix with the difference between original parent matrix + * \param[out] r_pt Pointer to new point after apply matrix + */ void gp_point_to_parent_space(bGPDspoint *pt, float diff_mat[4][4], bGPDspoint *r_pt) { float fpt[3]; @@ -547,7 +566,9 @@ void gp_point_to_parent_space(bGPDspoint *pt, float diff_mat[4][4], bGPDspoint * copy_v3_v3(&r_pt->x, fpt); } -/* Change position relative to parent object */ +/** + * Change points position relative to parent object + */ void gp_apply_parent(bGPDlayer *gpl, bGPDstroke *gps) { bGPDspoint *pt; @@ -568,7 +589,9 @@ void gp_apply_parent(bGPDlayer *gpl, bGPDstroke *gps) } } -/* Change point position relative to parent object */ +/** + * Change point position relative to parent object + */ void gp_apply_parent_point(bGPDlayer *gpl, bGPDspoint *pt) { /* undo matrix */ @@ -583,8 +606,13 @@ void gp_apply_parent_point(bGPDlayer *gpl, bGPDspoint *pt) copy_v3_v3(&pt->x, fpt); } -/* Convert Grease Pencil points to screen-space values - * WARNING: This assumes that the caller has already checked whether the stroke in question can be drawn +/** + * Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D) + * + * \param[out] r_x The screen-space x-coordinate of the point + * \param[out] r_y The screen-space y-coordinate of the point + * + * \warning This assumes that the caller has already checked whether the stroke in question can be drawn. */ void gp_point_to_xy(GP_SpaceConversion *gsc, bGPDstroke *gps, bGPDspoint *pt, int *r_x, int *r_y) @@ -628,8 +656,16 @@ void gp_point_to_xy(GP_SpaceConversion *gsc, bGPDstroke *gps, bGPDspoint *pt, } } -/* Convert Grease Pencil points to screen-space values (as floats) - * WARNING: This assumes that the caller has already checked whether the stroke in question can be drawn +/** + * Convert a Grease Pencil coordinate (i.e. can be 2D or 3D) to screenspace (2D) + * + * Just like gp_point_to_xy(), except the resulting coordinates are floats not ints. + * Use this version to solve "stair-step" artifacts which may arise when roundtripping the calculations. + * + * \param r_x: [out] The screen-space x-coordinate of the point + * \param r_y: [out] The screen-space y-coordinate of the point + * + * \warning This assumes that the caller has already checked whether the stroke in question can be drawn */ void gp_point_to_xy_fl(GP_SpaceConversion *gsc, bGPDstroke *gps, bGPDspoint *pt, float *r_x, float *r_y) @@ -688,6 +724,12 @@ void gp_point_to_xy_fl(GP_SpaceConversion *gsc, bGPDstroke *gps, bGPDspoint *pt, /** * Project screenspace coordinates to 3D-space * + * For use with editing tools where it is easier to perform the operations in 2D, + * and then later convert the transformed points back to 3D. + * + * \param screen_co: The screenspace 2D coordinates to convert to + * \param r_out: The resulting 3D coordinates of the input point + * * \note We include this as a utility function, since the standard method * involves quite a few steps, which are invariably always the same * for all GPencil operations. So, it's nicer to just centralize these. @@ -722,7 +764,7 @@ bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, Scene *scene, const float screen } /** - * Apply smooth to stroke point + * Apply smooth to stroke point * \param gps Stroke to smooth * \param i Point index * \param inf Amount of smoothing to apply diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index c2cfca295a4..501a5a35899 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1067,6 +1067,7 @@ typedef struct ImageOpenData { typedef struct ImageFrameRange { struct ImageFrameRange *next, *prev; ListBase frames; + /** The full path of the first file in the list of image files */ char filepath[FILE_MAX]; } ImageFrameRange; @@ -1092,8 +1093,7 @@ static void image_open_cancel(bContext *UNUSED(C), wmOperator *op) /** * \brief Get a list of frames from the list of image files matching the first file name sequence pattern * \param ptr [in] the RNA pointer containing the "directory" entry and "files" collection - * \param frames [out] the list of frame numbers found in the files matching the first one by name - * \param path [out] the full path of the first file in the list of image files + * \param frames_all [out] the list of frame numbers found in the files matching the first one by name */ static void image_sequence_get_frame_ranges(PointerRNA *ptr, ListBase *frames_all) { diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index dabce262125..ba474e93b70 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -2008,9 +2008,9 @@ static bool bmesh_test_dist_add( } /** - * \parm mtx: Measure disatnce in this space. - * \parm dists: Store the closest connected distance to selected vertices. - * \parm index: Optionally store the original index we're measuring the distance to (can be NULL). + * \param mtx: Measure disatnce in this space. + * \param dists: Store the closest connected distance to selected vertices. + * \param index: Optionally store the original index we're measuring the distance to (can be NULL). */ static void editmesh_set_connectivity_distance(BMesh *bm, float mtx[3][3], float *dists, int *index) { diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c index b33528b4149..aecd24d4e40 100644 --- a/source/blender/editors/transform/transform_snap_object.c +++ b/source/blender/editors/transform/transform_snap_object.c @@ -234,7 +234,7 @@ static void raycast_all_cb(void *userdata, int index, const BVHTreeRay *ray, BVH /* -------------------------------------------------------------------- */ -/** \Common utilities +/** Common utilities * \{ */ /** @@ -620,7 +620,7 @@ static float dist_aabb_to_plane( /* -------------------------------------------------------------------- */ -/** \Walk DFS +/** Walk DFS * \{ */ typedef void (*Nearest2DGetEdgeVertsCallback)(const int index, const float *v_pair[2], void *data); diff --git a/source/blender/freestyle/intern/geometry/matrix_util.h b/source/blender/freestyle/intern/geometry/matrix_util.h index d65b0ea803b..444fd7c4785 100644 --- a/source/blender/freestyle/intern/geometry/matrix_util.h +++ b/source/blender/freestyle/intern/geometry/matrix_util.h @@ -50,15 +50,15 @@ namespace MatrixUtil { /** * computes the eigen values and eigen vectors of a semi definite symmetric matrix * - * @param matrix is stored in column symmetric storage, i.e. + * \param mat: The matrix stored in column symmetric storage, i.e. * matrix = { m11, m12, m22, m13, m23, m33, m14, m24, m34, m44 ... } * size = n(n+1)/2 * - * @param eigen_vectors (return) = { v1, v2, v3, ..., vn } + * \param eigen_vec: (return) = { v1, v2, v3, ..., vn } * where vk = vk0, vk1, ..., vkn * size = n^2, must be allocated by caller * - * @param eigen_values (return) are in decreasing order + * \param eigen_val: (return) are in decreasing order * size = n, must be allocated by caller */ void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec, double *eigen_val); diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index f4b2539d7d7..1701c2ba307 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -237,9 +237,8 @@ typedef struct ImBuf { /** * \name Imbuf Component flags * \brief These flags determine the components of an ImBuf struct. - */ -/**@{*/ -/** \brief Flag defining the components of the ImBuf struct. */ + * + * \{ */ #define IB_rect (1 << 0) #define IB_test (1 << 1) @@ -259,15 +258,20 @@ typedef struct ImBuf { #define IB_thumbnail (1 << 15) #define IB_multiview (1 << 16) +/** \} */ + /** * \name Imbuf preset profile tags * \brief Some predefined color space profiles that 8 bit imbufs can represent - */ + * + * \{ */ #define IB_PROFILE_NONE 0 #define IB_PROFILE_LINEAR_RGB 1 #define IB_PROFILE_SRGB 2 #define IB_PROFILE_CUSTOM 3 +/** \} */ + /* dds */ #ifdef WITH_DDS #ifndef DDS_MAKEFOURCC @@ -298,8 +302,16 @@ extern const char *imb_ext_audio[]; /* image formats that can only be loaded via filepath */ extern const char *imb_ext_image_filepath_only[]; +/** + * \name Imbuf Color Management Flag + * \brief Used with #ImBuf.colormanage_flag + * + * \{ */ + enum { IMB_COLORMANAGE_IS_DATA = (1 << 0) }; -#endif +/** \} */ + +#endif /* __IMB_IMBUF_TYPES_H__ */ diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index cfbb4ccdc38..eda880d4dce 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -7345,7 +7345,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr, StructRNA *srna, v arg_count = ((PyCodeObject *)PyFunction_GET_CODE(item))->co_argcount; /* note, the number of args we check for and the number of args we give to - * @staticmethods are different (quirk of python), + * '@staticmethods' are different (quirk of python), * this is why rna_function_arg_count() doesn't return the value -1*/ if (is_staticmethod) { func_arg_count++; diff --git a/source/blender/render/intern/source/zbuf.c b/source/blender/render/intern/source/zbuf.c index e497ec1a870..68707f163af 100644 --- a/source/blender/render/intern/source/zbuf.c +++ b/source/blender/render/intern/source/zbuf.c @@ -1601,7 +1601,6 @@ void zspan_scanconvert(ZSpan *zspan, void *handle, float *v1, float *v2, float * * Note: uses globals. * \param v1 start coordinate s * \param v2 target coordinate t - * \param b1 * \param b2 * \param b3 * \param a index for coordinate (x, y, or z) diff --git a/source/gameengine/GamePlayer/common/GPC_MouseDevice.h b/source/gameengine/GamePlayer/common/GPC_MouseDevice.h index 504df2376bb..24922197723 100644 --- a/source/gameengine/GamePlayer/common/GPC_MouseDevice.h +++ b/source/gameengine/GamePlayer/common/GPC_MouseDevice.h @@ -67,8 +67,6 @@ public: * Call this routine to update the mouse device when a button state changes. * \param button Which button state changes. * \param isDown The new state of the button. - * \param x Position x-coordinate of the cursor at the time of the state change. - * \param y Position y-coordinate of the cursor at the time of the state change. * \return Indication as to whether the event was processed. */ virtual bool ConvertButtonEvent(TButtonId button, bool isDown);