Cleanup: comment blocks, trailing space in comments

This commit is contained in:
Campbell Barton 2021-06-24 15:56:58 +10:00
parent 2e99a74df9
commit 4b9ff3cd42
578 changed files with 1154 additions and 1125 deletions

View File

@ -79,15 +79,15 @@ typedef struct CLG_IDFilter {
} CLG_IDFilter;
typedef struct CLogContext {
/** Single linked list of types. */
/** Single linked list of types. */
CLG_LogType *types;
/** Single linked list of references. */
/** Single linked list of references. */
CLG_LogRef *refs;
#ifdef WITH_CLOG_PTHREADS
pthread_mutex_t types_lock;
#endif
/* exclude, include filters. */
/* exclude, include filters. */
CLG_IDFilter *filters[2];
bool use_color;
bool use_basename;

View File

@ -181,7 +181,7 @@ static void rtc_filter_occluded_func(const RTCFilterFunctionNArguments *args)
/* record intersection */
ctx->local_isect->hits[hit_idx] = current_isect;
ctx->local_isect->Ng[hit_idx] = normalize(make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z));
/* This tells Embree to continue tracing .*/
/* This tells Embree to continue tracing. */
*args->valid = 0;
break;
}

View File

@ -297,7 +297,7 @@ struct BVHSpatialBin {
*/
struct BVHSpatialStorage {
/* Accumulated bounds when sweeping from right to left. */
/* Accumulated bounds when sweeping from right to left. */
vector<BoundBox> right_bounds;
/* Bins used for histogram when selecting best split plane. */

View File

@ -65,7 +65,7 @@ class DenoiseParams {
/* Viewport start sample. */
int start_sample;
/** Native Denoiser **/
/** Native Denoiser. */
/* Pixel radius for neighboring pixels to take into account. */
int radius;
@ -81,7 +81,7 @@ class DenoiseParams {
/* Clamp the input to the range of +-1e8. Should be enough for any legitimate data. */
bool clamp_input;
/** OIDN/Optix Denoiser **/
/** OIDN/Optix Denoiser. */
/* Passes handed over to the OIDN/OptiX denoiser (default to color + albedo). */
DenoiserInput input_passes;

View File

@ -116,7 +116,7 @@ CCL_NAMESPACE_BEGIN
# endif
# endif /* __SHADOW_RECORD_ALL__ */
/* Record all intersections - Volume BVH traversal */
/* Record all intersections - Volume BVH traversal. */
# if defined(__VOLUME_RECORD_ALL__)
# define BVH_FUNCTION_NAME bvh_intersect_volume_all

View File

@ -61,8 +61,8 @@ ccl_device_forceinline float3 bsdf_ashikhmin_shirley_eval_reflect(const ShaderCl
const MicrofacetBsdf *bsdf = (const MicrofacetBsdf *)sc;
float3 N = bsdf->N;
float NdotI = dot(N, I); /* in Cycles/OSL convention I is omega_out */
float NdotO = dot(N, omega_in); /* and consequently we use for O omaga_in ;) */
float NdotI = dot(N, I); /* in Cycles/OSL convention I is omega_out */
float NdotO = dot(N, omega_in); /* and consequently we use for O omaga_in ;) */
float out = 0.0f;

View File

@ -22,7 +22,7 @@
CCL_NAMESPACE_BEGIN
/* normal on triangle */
/* Normal on triangle. */
ccl_device_inline float3 triangle_normal(KernelGlobals *kg, ShaderData *sd)
{
/* load triangle vertices */
@ -40,7 +40,7 @@ ccl_device_inline float3 triangle_normal(KernelGlobals *kg, ShaderData *sd)
}
}
/* point and normal on triangle */
/* Point and normal on triangle. */
ccl_device_inline void triangle_point_normal(
KernelGlobals *kg, int object, int prim, float u, float v, float3 *P, float3 *Ng, int *shader)
{

View File

@ -64,7 +64,7 @@ typedef struct KernelGlobals {
OSLThreadData *osl_tdata;
# endif
/* **** Run-time data **** */
/* **** Run-time data **** */
/* Heap-allocated storage for transparent shadows intersections. */
Intersection *transparent_shadow_intersections;

View File

@ -35,7 +35,7 @@
CCL_NAMESPACE_BEGIN
/* Spherical coordinates <-> Cartesian direction */
/* Spherical coordinates <-> Cartesian direction. */
ccl_device float2 direction_to_spherical(float3 dir)
{

View File

@ -79,7 +79,7 @@ ccl_device void enqueue_ray_index_local(
{
int lidx = ccl_local_id(1) * ccl_local_size(0) + ccl_local_id(0);
/* Get local queue id .*/
/* Get local queue id. */
unsigned int lqidx;
if (enqueue_flag) {
lqidx = atomic_fetch_and_inc_uint32(local_queue_atomics);

View File

@ -302,7 +302,7 @@ enum PathRayFlag {
PATH_RAY_DIFFUSE_ANCESTOR = (1 << 15),
/* Single pass has been written. */
PATH_RAY_SINGLE_PASS_DONE = (1 << 16),
/* Ray is behind a shadow catcher .*/
/* Ray is behind a shadow catcher. */
PATH_RAY_SHADOW_CATCHER = (1 << 17),
/* Store shadow data for shadow catcher or denoising. */
PATH_RAY_STORE_SHADOW_INFO = (1 << 18),

View File

@ -317,4 +317,4 @@ class OSLRenderServices : public OSL::RendererServices {
CCL_NAMESPACE_END
#endif /* __OSL_SERVICES_H__ */
#endif /* __OSL_SERVICES_H__ */

View File

@ -803,7 +803,7 @@ ccl_device void svm_node_closure_bsdf(KernelGlobals *kg,
float melanin_redness = stack_load_float_default(
stack, melanin_redness_ofs, data_node2.w);
/* Randomize melanin. */
/* Randomize melanin. */
float random_color = stack_load_float_default(stack, random_color_ofs, data_node3.z);
random_color = clamp(random_color, 0.0f, 1.0f);
float factor_random_color = 1.0f + 2.0f * (random - 0.5f) * random_color;

View File

@ -333,7 +333,7 @@ static M44d get_interpolated_matrix_for_time(const MatrixSampleMap &samples, chr
chrono_t t = (time - prev_time) / (next_time - prev_time);
/* ensure rotation around the shortest angle */
/* Ensure rotation around the shortest angle. */
if ((prev_rotation ^ next_rotation) < 0) {
next_rotation = -next_rotation;
}

View File

@ -195,4 +195,4 @@ class OSLCompiler {
CCL_NAMESPACE_END
#endif /* __OSL_H__ */
#endif /* __OSL_H__ */

View File

@ -1252,7 +1252,7 @@ bool Session::update_progressive_refine(bool cancel)
double current_time = time_dt();
if (current_time - last_update_time < params.progressive_update_timeout) {
/* if last sample was processed, we need to write buffers anyway */
/* If last sample was processed, we need to write buffers anyway. */
if (!write && sample != 1)
return false;
}

View File

@ -224,7 +224,7 @@ ccl_device_inline ssef fastpow24(const ssef &arg)
ssef arg2 = arg * arg;
ssef arg4 = arg2 * arg2;
/* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
/* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
x = improve_5throot_solution(x, arg4);
/* error max = 0.00021 avg = 1.6e-05 |avg| = 1.6e-05 */
x = improve_5throot_solution(x, arg4);

View File

@ -129,7 +129,7 @@ class DebugFlags {
DEVICE_NONE,
/* All OpenCL devices will be used. */
DEVICE_ALL,
/* Default system OpenCL device will be used. */
/* Default system OpenCL device will be used. */
DEVICE_DEFAULT,
/* Host processor will be used. */
DEVICE_CPU,

View File

@ -88,7 +88,7 @@ class TaskScheduler {
/* Approximate number of threads that will work on task, which may be lower
* or higher than the actual number of threads. Use as little as possible and
* leave splitting up tasks to the scheduler.. */
* leave splitting up tasks to the scheduler. */
static int num_threads();
protected:

View File

@ -124,7 +124,7 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
GHOST_X11_ERROR_HANDLERS_OVERRIDE(handler_store);
/* -------------------------------------------------------------------- */
/* Begin Inline Glew */
/* Begin Inline Glew */
#ifdef USE_GLXEW_INIT_WORKAROUND
const GLubyte *extStart = (GLubyte *)"";

View File

@ -161,5 +161,5 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::setCurrentDisplaySetting(
// CGDisplayErr err = ::CGDisplaySwitchToMode(m_displayIDs[display], displayModeValues);
return /*err == CGDisplayNoErr ?*/ GHOST_kSuccess /*: GHOST_kFailure*/;
return /* err == CGDisplayNoErr ? */ GHOST_kSuccess /* : GHOST_kFailure */;
}

View File

@ -589,9 +589,7 @@ static void SleepTillEvent(Display *display, GHOST_TInt64 maxSleep)
}
}
/* This function borrowed from Qt's X11 support
* qclipboard_x11.cpp
* */
/* This function borrowed from Qt's X11 support qclipboard_x11.cpp */
struct init_timestamp_data {
Time timestamp;
};
@ -2675,8 +2673,8 @@ void GHOST_SystemX11::refreshXInputDevices()
xtablet.PressureLevels = xvi->axes[2].max_value;
if (xvi->num_axes > 3) {
/* this is assuming that the tablet has the same tilt resolution in both
* positive and negative directions. It would be rather weird if it didn't.. */
/* This is assuming that the tablet has the same tilt resolution in both
* positive and negative directions. It would be rather weird if it didn't. */
xtablet.XtiltLevels = xvi->axes[3].max_value;
xtablet.YtiltLevels = xvi->axes[4].max_value;
}

View File

@ -78,7 +78,7 @@ extern short (*MEM_testN)(void *vmemh);
/**
* Duplicates a block of memory, and returns a pointer to the
* newly allocated block. */
* newly allocated block. */
extern void *(*MEM_dupallocN)(const void *vmemh) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT;
/**

View File

@ -103,7 +103,7 @@ int main(int argc, char *argv[])
/* ----------------------------------------------------------------- */
/* Round two, do a normal allocation, and corrupt some blocks. */
/* ----------------------------------------------------------------- */
/* switch off, because it will complain about some things. */
/* Switch off, because it will complain about some things. */
MEM_set_error_callback(NULL);
for (i = 0; i < NUM_BLOCKS; i++) {

View File

@ -378,7 +378,7 @@ void PrintArray(const Array3Df& array);
* (if automatic_range_detection = true)
* \note and TODO this automatic detection only works when the image contains
* at least one pixel of both bounds.
**/
*/
void FloatArrayToScaledByteArray(const Array3Df& float_array,
Array3Du* byte_array,
bool automatic_range_detection = false);

View File

@ -195,7 +195,7 @@ vec4 OCIO_ProcessColor(vec4 col, vec4 col_overlay, vec2 noise_uv)
return col;
}
/* ------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------ */
in vec2 texCoord_interp;
out vec4 fragColor;

View File

@ -38,7 +38,7 @@ unsigned int blf_hash(unsigned int val);
char *blf_dir_search(const char *file);
char *blf_dir_metrics_search(const char *filename);
/* int blf_dir_split(const char *str, char *file, int *size); */ /* UNUSED */
/* int blf_dir_split(const char *str, char *file, int *size); */ /* UNUSED */
int blf_font_init(void);
void blf_font_exit(void);

View File

@ -108,7 +108,7 @@ void action_group_colors_sync(struct bActionGroup *grp, const struct bActionGrou
/* Add a new action group with the given name to the action */
struct bActionGroup *action_groups_add_new(struct bAction *act, const char name[]);
/* Add given channel into (active) group */
/* Add given channel into (active) group */
void action_groups_add_channel(struct bAction *act,
struct bActionGroup *agrp,
struct FCurve *fcurve);

View File

@ -242,7 +242,7 @@ bool BKE_animsys_rna_path_resolve(struct PointerRNA *ptr,
bool BKE_animsys_read_from_rna_path(struct PathResolvedRNA *anim_rna, float *r_value);
bool BKE_animsys_write_to_rna_path(struct PathResolvedRNA *anim_rna, const float value);
/* Evaluation loop for evaluating animation data */
/* Evaluation loop for evaluating animation data. */
void BKE_animsys_evaluate_animdata(struct ID *id,
struct AnimData *adt,
const struct AnimationEvalContext *anim_eval_context,

View File

@ -306,7 +306,7 @@ template<> struct DefaultMixerStruct<float3> {
};
template<> struct DefaultMixerStruct<ColorGeometry4f> {
/* Use a special mixer for colors. ColorGeometry4f can't be added/multiplied, because this is not
* something one should usually do with colors. */
* something one should usually do with colors. */
using type = ColorGeometryMixer;
};
template<> struct DefaultMixerStruct<int> {

View File

@ -103,8 +103,8 @@ typedef struct Cloth {
* The definition of a cloth vertex.
*/
typedef struct ClothVertex {
int flags; /* General flags per vertex. */
float v[3]; /* The velocity of the point. */
int flags; /* General flags per vertex. */
float v[3]; /* The velocity of the point. */
float xconst[3]; /* constrained position */
float x[3]; /* The current position of this vertex. */
float xold[3]; /* The previous position of this vertex.*/

View File

@ -59,7 +59,7 @@ typedef struct bConstraintOb {
/** space matrix for custom object space */
float space_obj_world_matrix[4][4];
/** type of owner */
/** type of owner. */
short type;
/** rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
short rotOrder;

View File

@ -32,11 +32,11 @@ extern "C" {
/** #DispList.type */
enum {
/** A closed polygon (that can be filled). */
/** A closed polygon (that can be filled). */
DL_POLY = 0,
/** An open polygon. */
/** An open polygon. */
DL_SEGM = 1,
/** A grid surface that respects #DL_CYCL_U & #DL_CYCL_V. */
/** A grid surface that respects #DL_CYCL_U & #DL_CYCL_V. */
DL_SURF = 2,
/** Triangles. */
DL_INDEX3 = 4,

View File

@ -180,7 +180,7 @@ int BKE_fcm_envelope_find_index(struct FCM_EnvelopeData *array,
* but should become userpref */
#define BEZT_BINARYSEARCH_THRESH 0.01f /* was 0.00001, but giving errors */
/* -------- Data Management -------- */
/* -------- Data Management -------- */
struct FCurve *BKE_fcurve_create(void);
void BKE_fcurve_free(struct FCurve *fcu);
struct FCurve *BKE_fcurve_copy(const struct FCurve *fcu);
@ -302,7 +302,7 @@ bool BKE_fcurve_bezt_subdivide_handles(struct BezTriple *bezt,
struct BezTriple *next,
float *r_pdelta);
/* -------- Curve Sanity -------- */
/* -------- Curve Sanity -------- */
void calchandles_fcurve(struct FCurve *fcu);
void calchandles_fcurve_ex(struct FCurve *fcu, eBezTriple_Flag handle_sel_flag);
@ -312,7 +312,7 @@ bool test_time_fcurve(struct FCurve *fcu);
void BKE_fcurve_correct_bezpart(const float v1[2], float v2[2], float v3[2], const float v4[2]);
/* -------- Evaluation -------- */
/* -------- Evaluation -------- */
/* evaluate fcurve */
float evaluate_fcurve(struct FCurve *fcu, float evaltime);
@ -329,7 +329,7 @@ float calculate_fcurve(struct PathResolvedRNA *anim_rna,
/* ************* F-Curve Samples API ******************** */
/* -------- Defines -------- */
/* -------- Defines -------- */
/* Basic signature for F-Curve sample-creation function
* - fcu: the F-Curve being operated on
@ -337,12 +337,12 @@ float calculate_fcurve(struct PathResolvedRNA *anim_rna,
*/
typedef float (*FcuSampleFunc)(struct FCurve *fcu, void *data, float evaltime);
/* ----- Sampling Callbacks ------ */
/* ----- Sampling Callbacks ------ */
/* Basic sampling callback which acts as a wrapper for evaluate_fcurve() */
float fcurve_samplingcb_evalcurve(struct FCurve *fcu, void *data, float evaltime);
/* -------- Main Methods -------- */
/* -------- Main Methods -------- */
/* Main API function for creating a set of sampled curve data, given some callback function
* used to retrieve the values to store.

View File

@ -220,7 +220,7 @@ BLI_INLINE void BKE_multires_construct_tangent_matrix(float tangent_matrix[3][3]
/* Versioning. */
/* Convert displacement which is stored for simply-subdivided mesh to a Catmull-Clark
* subdivided mesh. */
* subdivided mesh. */
void multires_do_versions_simple_to_catmull_clark(struct Object *object,
struct MultiresModifierData *mmd);

View File

@ -393,9 +393,9 @@ typedef enum eObRelationTypes {
} eObRelationTypes;
typedef enum eObjectSet {
OB_SET_SELECTED, /* Selected Objects */
OB_SET_VISIBLE, /* Visible Objects */
OB_SET_ALL, /* All Objects */
OB_SET_SELECTED, /* Selected Objects. */
OB_SET_VISIBLE, /* Visible Objects. */
OB_SET_ALL, /* All Objects. */
} eObjectSet;
struct LinkNode *BKE_object_relational_superset(struct ViewLayer *view_layer,

View File

@ -62,7 +62,7 @@ struct wmWindow;
struct wmWindowManager;
/* spacetype has everything stored to get an editor working, it gets initialized via
* ED_spacetypes_init() in editors/space_api/spacetypes.c */
* #ED_spacetypes_init() in `editors/space_api/spacetypes.c` */
/* an editor in Blender is a combined ScrArea + SpaceType + SpaceData */
#define BKE_ST_MAXNAME 64
@ -206,7 +206,7 @@ typedef struct ARegionType {
* performed.
*
* This callback is not called on indirect changes of the current viewport (which could happen
* when the `v2d->tot is changed and `cur` is adopted accordingly). */
* when the `v2d->tot is changed and `cur` is adopted accordingly). */
void (*on_view2d_changed)(const struct bContext *C, struct ARegion *region);
/* custom drawing callbacks */

View File

@ -25,7 +25,7 @@
/* struct DerivedMesh is used directly */
#include "BKE_DerivedMesh.h"
/* Thread sync primitives used directly. */
/* Thread sync primitives used directly. */
#include "BLI_threads.h"
#ifdef __cplusplus

View File

@ -91,7 +91,7 @@ bool txt_cursor_is_line_end(struct Text *text);
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 */
/* Utility functions, could be moved somewhere more generic but are python/text related. */
int text_check_bracket(const char ch);
bool text_check_delim(const char ch);
bool text_check_digit(const char ch);

View File

@ -960,7 +960,7 @@ static Mesh *modifier_modify_mesh_and_geometry_set(ModifierData *md,
mesh_output = mesh_component.release();
}
/* Return an empty mesh instead of null. */
/* Return an empty mesh instead of null. */
if (mesh_output == nullptr) {
mesh_output = BKE_mesh_new_nomain(0, 0, 0, 0, 0);
BKE_mesh_copy_parameters_for_eval(mesh_output, input_mesh);

View File

@ -370,7 +370,7 @@ void set_active_action_group(bAction *act, bActionGroup *agrp, short select)
/* Sync colors used for action/bone group with theme settings */
void action_group_colors_sync(bActionGroup *grp, const bActionGroup *ref_grp)
{
/* only do color copying if using a custom color (i.e. not default color) */
/* Only do color copying if using a custom color (i.e. not default color). */
if (grp->customCol) {
if (grp->customCol > 0) {
/* copy theme colors on-to group's custom color in case user tries to edit color */

View File

@ -946,7 +946,7 @@ static bool nlastrips_path_rename_fix(ID *owner_id,
is_changed |= fcurves_path_rename_fix(
owner_id, prefix, oldName, newName, oldKey, newKey, &strip->act->curves, verify_paths);
}
/* Ignore own F-Curves, since those are local. */
/* Ignore own F-Curves, since those are local. */
/* Check sub-strips (if meta-strips). */
is_changed |= nlastrips_path_rename_fix(
owner_id, prefix, oldName, newName, oldKey, newKey, &strip->strips, verify_paths);
@ -1422,7 +1422,7 @@ void BKE_animdata_fix_paths_rename_all(ID *ref_id,
* NOTE: it is assumed that the structure we're replacing is <prefix><["><name><"]>
* i.e. pose.bones["Bone"]
*/
/* TODO: use BKE_animdata_main_cb for looping over all data */
/* TODO: use BKE_animdata_main_cb for looping over all data. */
void BKE_animdata_fix_paths_rename_all_ex(Main *bmain,
ID *ref_id,
const char *prefix,

View File

@ -327,7 +327,7 @@ bool BKE_where_on_path(const Object *ob,
}
const Nurb *nu = nurbs->first;
/* make sure that first and last frame are included in the vectors here */
/* Make sure that first and last frame are included in the vectors here. */
if (ELEM(nu->type, CU_POLY, CU_BEZIER, CU_NURBS)) {
key_curve_position_weights(frac, w, KEY_LINEAR);
}

View File

@ -852,7 +852,7 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list,
/* loop over strips, checking if they fall within the range */
for (strip = strips->first; strip; strip = strip->next) {
/* check if current time occurs within this strip */
/* Check if current time occurs within this strip. */
if (IN_RANGE_INCL(ctime, strip->start, strip->end) ||
(strip->flag & NLASTRIP_FLAG_NO_TIME_MAP)) {
/* this strip is active, so try to use it */
@ -1564,7 +1564,7 @@ static bool nla_blend_get_inverted_strip_value(const int blendmode,
}
}
/** \returns true if solution exists and output is written to. */
/** \returns true if solution exists and output is written to. */
static bool nla_combine_get_inverted_strip_value(const int mix_mode,
float base_value,
const float lower_value,
@ -2017,7 +2017,7 @@ static void nlaeval_fmodifiers_join_stacks(ListBase *result, ListBase *list1, Li
{
FModifier *fcm1, *fcm2;
/* if list1 is invalid... */
/* if list1 is invalid... */
if (ELEM(NULL, list1, list1->first)) {
if (list2 && list2->first) {
result->first = list2->first;

View File

@ -1627,7 +1627,7 @@ void BKE_armature_mat_world_to_pose(Object *ob, const float inmat[4][4], float o
return;
}
/* get inverse of (armature) object's matrix */
/* Get inverse of (armature) object's matrix. */
invert_m4_m4(obmat, ob->obmat);
/* multiply given matrix by object's-inverse to find pose-space matrix */
@ -2063,9 +2063,11 @@ void BKE_armature_mat_pose_to_delta(float delta_mat[4][4],
* Used for Objects and Pose Channels, since both can have multiple rotation representations.
* \{ */
/* Called from RNA when rotation mode changes
/**
* Called from RNA when rotation mode changes
* - the result should be that the rotations given in the provided pointers have had conversions
* applied (as appropriate), such that the rotation of the element hasn't 'visually' changed */
* applied (as appropriate), such that the rotation of the element hasn't 'visually' changed.
*/
void BKE_rotMode_change_values(
float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode)
{
@ -2333,7 +2335,7 @@ void BKE_armature_where_is_bone(Bone *bone, const Bone *bone_parent, const bool
/* yoffs(b-1) + root(b) + bonemat(b) */
BKE_bone_offset_matrix_get(bone, offs_bone);
/* Compose the matrix for this bone */
/* Compose the matrix for this bone. */
mul_m4_m4m4(bone->arm_mat, bone_parent->arm_mat, offs_bone);
}
else {

View File

@ -121,7 +121,7 @@ TEST(vec_roll_to_mat3_normalized, Rotationmatrix)
/* TODO: This test will pass after fixing T82455) */
/* If normalized_vector is close to -Y and
* it has X and Z values above a threshold,
* apply the special case. */
* apply the special case. */
{
const float expected_roll_mat[3][3] = {{0.000000f, -9.99999975e-06f, 1.000000f},
{9.99999975e-06f, -0.999999881f, 9.99999975e-06f},

View File

@ -837,7 +837,7 @@ void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, Scene *scene, Object *ob
BIK_init_tree(depsgraph, scene, object, ctime);
/* construct the Spline IK trees
* - this is not integrated as an IK plugin, since it should be able
* to function in conjunction with standard IK. */
* to function in conjunction with standard IK. */
BKE_pose_splineik_init_tree(scene, object, ctime);
}

View File

@ -615,7 +615,7 @@ static void camera_frame_fit_data_init(const Scene *scene,
BKE_camera_params_init(params);
BKE_camera_params_from_object(params, ob);
/* compute matrix, viewplane, .. */
/* Compute matrix, view-plane, etc. */
if (scene) {
BKE_camera_params_compute_viewplane(
params, scene->r.xsch, scene->r.ysch, scene->r.xasp, scene->r.yasp);
@ -975,7 +975,7 @@ void BKE_camera_multiview_window_matrix(const RenderData *rd,
BKE_camera_params_from_object(&params, camera);
BKE_camera_multiview_params(rd, &params, camera, viewname);
/* Compute matrix, viewplane, .. */
/* Compute matrix, view-plane, etc. */
BKE_camera_params_compute_viewplane(&params, rd->xsch, rd->ysch, rd->xasp, rd->yasp);
BKE_camera_params_compute_matrix(&params);

View File

@ -1458,7 +1458,7 @@ bool BKE_collection_cycle_find(Collection *new_ancestor, Collection *collection)
}
/* Find possible objects in collection or its children, that would instantiate the given ancestor
* collection (that would also make a fully invalid cycle of dependencies) .*/
* collection (that would also make a fully invalid cycle of dependencies). */
return collection_instance_find_recursive(collection, new_ancestor);
}

View File

@ -272,7 +272,7 @@ void BKE_constraint_mat_convertspace(Object *ob,
float diff_mat[4][4];
float imat[4][4];
/* prevent crashes in these unlikely events */
/* Prevent crashes in these unlikely events. */
if (ob == NULL || mat == NULL) {
return;
}
@ -3536,34 +3536,34 @@ static void stretchto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *t
damptrack_do_transform(cob->matrix, vec, TRACK_Y);
break;
case PLANE_X:
/* new Y aligns object target connection*/
/* New Y aligns object target connection. */
copy_v3_v3(cob->matrix[1], vec);
/* build new Z vector */
/* othogonal to "new Y" "old X! plane */
/* Build new Z vector. */
/* Orthogonal to "new Y" "old X! plane. */
cross_v3_v3v3(orth, xx, vec);
normalize_v3(orth);
/* new Z*/
/* New Z. */
copy_v3_v3(cob->matrix[2], orth);
/* we decided to keep X plane*/
/* We decided to keep X plane. */
cross_v3_v3v3(xx, vec, orth);
normalize_v3_v3(cob->matrix[0], xx);
break;
case PLANE_Z:
/* new Y aligns object target connection*/
/* New Y aligns object target connection. */
copy_v3_v3(cob->matrix[1], vec);
/* build new X vector */
/* othogonal to "new Y" "old Z! plane */
/* Build new X vector. */
/* Orthogonal to "new Y" "old Z! plane. */
cross_v3_v3v3(orth, zz, vec);
normalize_v3(orth);
/* new X */
/* New X. */
negate_v3_v3(cob->matrix[0], orth);
/* we decided to keep Z */
/* We decided to keep Z. */
cross_v3_v3v3(zz, vec, orth);
normalize_v3_v3(cob->matrix[2], zz);
break;
@ -4678,7 +4678,7 @@ static void pivotcon_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *ta
}
}
/* find the pivot-point to use */
/* Find the pivot-point to use. */
if (VALID_CONS_TARGET(ct)) {
/* apply offset to target location */
add_v3_v3v3(pivot, ct->matrix[3], data->offset);

View File

@ -1225,8 +1225,11 @@ enum eContextObjectMode CTX_data_mode_enum(const bContext *C)
return CTX_data_mode_enum_ex(obedit, obact, obact ? obact->mode : OB_MODE_OBJECT);
}
/* would prefer if we can use the enum version below over this one - Campbell */
/* must be aligned with above enum */
/**
* Would prefer if we can use the enum version below over this one - Campbell.
*
* \note Must be aligned with above enum.
*/
static const char *data_mode_strings[] = {
"mesh_edit", "curve_edit", "surface_edit", "text_edit",
"armature_edit", "mball_edit", "lattice_edit", "posemode",

View File

@ -1926,7 +1926,7 @@ static int cu_isectLL(const float v1[3],
static bool bevelinside(const BevList *bl1, const BevList *bl2)
{
/* is bl2 INSIDE bl1 ? with left-right method and "lambda's" */
/* returns '1' if correct hole */
/* returns '1' if correct hole. */
BevPoint *bevp, *prevbevp;
float min, max, vec[3], hvec1[3], hvec2[3], lab, mu;
int nr, links = 0, rechts = 0, mode;
@ -1941,7 +1941,7 @@ static bool bevelinside(const BevList *bl1, const BevList *bl2)
hvec2[0] += 1000;
/* test it with all edges of potential surrounding poly */
/* count number of transitions left-right */
/* count number of transitions left-right. */
bevp = bl1->bevpoints;
nr = bl1->nr;
@ -2133,7 +2133,7 @@ static void tilt_bezpart(const BezTriple *prevbezt,
}
if (weight_array) {
/* basic interpolation for now, could copy tilt interp too */
/* Basic interpolation for now, could copy tilt interp too. */
*weight_array = prevbezt->weight + (bezt->weight - prevbezt->weight) *
(3.0f * fac * fac - 2.0f * fac * fac * fac);
@ -2684,7 +2684,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render)
1;
#endif
/* STEP 1: MAKE POLYS */
/* STEP 1: MAKE POLYS */
BKE_curve_bevelList_free(&ob->runtime.curve_cache->bev);
if (cu->editnurb && ob->type != OB_FONT) {
@ -4361,7 +4361,7 @@ void BKE_nurbList_handles_set(ListBase *editnurb, const char code)
else {
char h_new = HD_FREE;
/* there is 1 handle not FREE: FREE it all, else make ALIGNED */
/* There is 1 handle not FREE: FREE it all, else make ALIGNED. */
if (code == 5) {
h_new = HD_ALIGN;
}
@ -4932,7 +4932,7 @@ bool BKE_nurb_type_convert(Nurb *nu,
int a, c, nr;
if (nu->type == CU_POLY) {
if (type == CU_BEZIER) { /* to Bezier with vecthandles */
if (type == CU_BEZIER) { /* To Bezier with vecthandles. */
nr = nu->pntsu;
bezt = (BezTriple *)MEM_calloc_arrayN(nr, sizeof(BezTriple), "setsplinetype2");
nu->bezt = bezt;

View File

@ -97,7 +97,7 @@ static void curve_bevel_make_extrude_and_fill(const Curve *cu,
* in a consistent direction.
*
* These should be small enough for stack allocations because the current limit
* for #Curve.bevresol is 32. */
* for #Curve.bevresol is 32. */
float *quarter_coords_x = alloca(sizeof(float) * (cu->bevresol + 1));
float *quarter_coords_y = alloca(sizeof(float) * (cu->bevresol + 1));
bevel_quarter_fill(cu, quarter_coords_x, quarter_coords_y);

View File

@ -323,7 +323,7 @@ static void curve_to_displist(const Curve *cu,
/* Check that there are more than two points so the curve doesn't loop back on itself. This
* needs to be separate from `is_cyclic` because cyclic sampling can work with two points
* and resolution > 1. */
* and resolution > 1. */
const bool use_cyclic_sample = is_cyclic && (samples_len != 2);
DispList *dl = (DispList *)MEM_callocN(sizeof(DispList), __func__);

View File

@ -1271,7 +1271,7 @@ static bool vfont_to_curve(Object *ob,
MEM_freeN(i_textbox_array);
/* TEXT ON CURVE */
/* Note: Only OB_CURVE objects could have a path */
/* NOTE: Only OB_CURVE objects could have a path. */
if (cu->textoncurve && cu->textoncurve->type == OB_CURVE) {
BLI_assert(cu->textoncurve->runtime.curve_cache != NULL);
if (cu->textoncurve->runtime.curve_cache != NULL &&

View File

@ -29,7 +29,7 @@
#include "attribute_access_intern.hh"
/* Can't include BKE_object_deform.h right now, due to an enum forward declaration. */
/* Can't include BKE_object_deform.h right now, due to an enum forward declaration. */
extern "C" MDeformVert *BKE_object_defgroup_data_create(ID *id);
using blender::fn::GVArray;

View File

@ -3808,11 +3808,11 @@ static ListBase *gpencil_stroke_perimeter_ex(const bGPdata *gpd,
last_prev_pt[0] -= 1.0f;
}
/* generate points for start cap */
/* Generate points for start cap. */
num_perimeter_points += generate_perimeter_cap(
first_pt, first_next_pt, first_radius, perimeter_right_side, subdivisions, gps->caps[0]);
/* generate perimeter points */
/* Generate perimeter points. */
float curr_pt[3], next_pt[3], prev_pt[3];
float vec_next[2], vec_prev[2];
float nvec_next[2], nvec_prev[2];

View File

@ -5188,7 +5188,7 @@ bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser)
return ibuf != NULL;
}
/* ******** Pool for image buffers ******** */
/* ******** Pool for image buffers ******** */
typedef struct ImagePoolItem {
struct ImagePoolItem *next, *prev;

View File

@ -262,7 +262,7 @@ static AdrBit2Path *adrcode_bitmaps_to_paths(int blocktype, int adrcode, int *to
/* Object types */
static const char *ob_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -377,7 +377,7 @@ static const char *ob_adrcodes_to_paths(int adrcode, int *array_index)
*/
static const char *pchan_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -434,7 +434,7 @@ static const char *pchan_adrcodes_to_paths(int adrcode, int *array_index)
/* Constraint types */
static const char *constraint_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -605,7 +605,7 @@ static const char *mtex_adrcodes_to_paths(int adrcode, int *UNUSED(array_index))
/* Texture types */
static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -692,7 +692,7 @@ static const char *texture_adrcodes_to_paths(int adrcode, int *array_index)
/* Material Types */
static const char *material_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -785,7 +785,7 @@ static const char *material_adrcodes_to_paths(int adrcode, int *array_index)
/* Camera Types */
static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -830,7 +830,7 @@ static const char *camera_adrcodes_to_paths(int adrcode, int *array_index)
/* Light Types */
static const char *light_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -875,7 +875,7 @@ static const char *light_adrcodes_to_paths(int adrcode, int *array_index)
/* Sound Types */
static const char *sound_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -901,7 +901,7 @@ static const char *sound_adrcodes_to_paths(int adrcode, int *array_index)
/* World Types */
static const char *world_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */
@ -947,7 +947,7 @@ static const char *world_adrcodes_to_paths(int adrcode, int *array_index)
/* Particle Types */
static const char *particle_adrcodes_to_paths(int adrcode, int *array_index)
{
/* set array index like this in-case nothing sets it correctly */
/* Set array index like this in-case nothing sets it correctly. */
*array_index = 0;
/* result depends on adrcode */

View File

@ -55,7 +55,7 @@ wmKeyConfigPref *BKE_keyconfig_pref_ensure(UserDef *userdef, const char *kc_idna
}
if (kpt->prop == NULL) {
IDPropertyTemplate val = {0};
kpt->prop = IDP_New(IDP_GROUP, &val, kc_idname); /* name is unimportant */
kpt->prop = IDP_New(IDP_GROUP, &val, kc_idname); /* name is unimportant. */
}
return kpt;
}

View File

@ -93,18 +93,18 @@ LatticeDeformData *BKE_lattice_deform_data_create(const Object *oblatt, const Ob
/* for example with a particle system: (ob == NULL) */
if (ob == NULL) {
/* in deformspace, calc matrix */
/* In deform-space, calc matrix. */
invert_m4_m4(latmat, oblatt->obmat);
/* back: put in deform array */
invert_m4_m4(imat, latmat);
}
else {
/* in deformspace, calc matrix */
/* In deform-space, calc matrix. */
invert_m4_m4(imat, oblatt->obmat);
mul_m4_m4m4(latmat, imat, ob->obmat);
/* back: put in deform array */
/* back: put in deform array. */
invert_m4_m4(imat, latmat);
}

View File

@ -1827,7 +1827,7 @@ void BKE_view_layer_bases_in_mode_iterator_end(BLI_Iterator *UNUSED(iter))
/** \} */
/* Evaluation */
/* Evaluation. */
/* Applies object's restrict flags on top of flags coming from the collection
* and stores those in base->flag. BASE_VISIBLE_DEPSGRAPH ignores viewport flags visibility

View File

@ -83,7 +83,7 @@ bool BKE_lib_query_foreachid_process(LibraryForeachIDData *data, ID **id_pp, int
ID *old_id = *id_pp;
/* Update the callback flags with the ones defined (or forbidden) in `data` by the generic
* caller code. */
* caller code. */
cb_flag = ((cb_flag | data->cb_flag) & ~data->cb_flag_clear);
/* Update the callback flags with some extra information regarding overrides: all 'loopback',

View File

@ -1923,7 +1923,7 @@ static void interp_weights_uv_v2_apply(const float uv[2],
r_pt[1] += dvec[0] * uv[1];
}
/* when a new points added - resize all shapekey array */
/* When a new points added - resize all shape-key array. */
void BKE_mask_layer_shape_changed_add(MaskLayer *masklay,
int index,
bool do_init,

View File

@ -272,20 +272,20 @@ static void build_bvh_spatial(PROCESS *process,
* any and all purposes, provided that this notice appears in all copies.
*/
#define L 0 /* left direction: -x, -i */
#define R 1 /* right direction: +x, +i */
#define B 2 /* bottom direction: -y, -j */
#define T 3 /* top direction: +y, +j */
#define N 4 /* near direction: -z, -k */
#define F 5 /* far direction: +z, +k */
#define LBN 0 /* left bottom near corner */
#define LBF 1 /* left bottom far corner */
#define LTN 2 /* left top near corner */
#define LTF 3 /* left top far corner */
#define RBN 4 /* right bottom near corner */
#define RBF 5 /* right bottom far corner */
#define RTN 6 /* right top near corner */
#define RTF 7 /* right top far corner */
#define L 0 /* Left direction: -x, -i. */
#define R 1 /* Right direction: +x, +i. */
#define B 2 /* Bottom direction: -y, -j. */
#define T 3 /* Top direction: +y, +j. */
#define N 4 /* Near direction: -z, -k. */
#define F 5 /* Far direction: +z, +k. */
#define LBN 0 /* Left bottom near corner. */
#define LBF 1 /* Left bottom far corner. */
#define LTN 2 /* Left top near corner. */
#define LTF 3 /* Left top far corner. */
#define RBN 4 /* Right bottom near corner. */
#define RBF 5 /* Right bottom far corner. */
#define RTN 6 /* Right top near corner. */
#define RTF 7 /* Right top far corner. */
/**
* the LBN corner of cube (i, j, k), corresponds with location
@ -293,7 +293,8 @@ static void build_bvh_spatial(PROCESS *process,
*/
#define HASHBIT (5)
#define HASHSIZE (size_t)(1 << (3 * HASHBIT)) /*! < hash table size (32768) */
/** Hash table size (32768). */
#define HASHSIZE (size_t)(1 << (3 * HASHBIT))
#define HASH(i, j, k) ((((((i)&31) << 5) | ((j)&31)) << 5) | ((k)&31))

View File

@ -109,7 +109,7 @@ static int cddm_poly_compare(MLoop *mloop_array,
i_loop_source++;
if (i_loop_source == mpoly_source->totloop) {
/* End of loops for source, must match end of loop for target. */
/* End of loops for source, must match end of loop for target. */
if (i_loop_target_offset == mpoly_target->totloop - 1) {
compare_completed = true;
same_loops = true;
@ -597,7 +597,7 @@ Mesh *BKE_mesh_merge_verts(Mesh *mesh,
mp_new->loopstart = STACK_SIZE(mloop) - c;
STACK_PUSH(oldp, i);
} /* end of the loop that tests polys */
} /* End of the loop that tests polys. */
if (poly_gset) {
// printf("hash quality %.6f\n", BLI_gset_calc_quality(poly_gset));

View File

@ -1514,7 +1514,7 @@ void multires_topology_changed(Mesh *me)
*
* Since the multires data files only contain displacement vectors without knowledge about
* subdivision level some extra work is needed. Namely make is to all displacement grids have
* proper level and number of displacement vectors set. */
* proper level and number of displacement vectors set. */
void multires_ensure_external_read(struct Mesh *mesh, int top_level)
{
if (!CustomData_external_test(&mesh->ldata, CD_MDISPS)) {

View File

@ -55,7 +55,7 @@
/* Surface refers to a simplified and lower-memory footprint representation of the limit surface.
*
* Used to store pre-calculated information which is expensive or impossible to evaluate when
* traversing the final limit surface. */
* traversing the final limit surface. */
typedef struct SurfacePoint {
float P[3];
@ -1027,7 +1027,7 @@ static void converter_init(const MultiresReshapeSmoothContext *reshape_smooth_co
converter->user_data = (void *)reshape_smooth_context;
}
/* Create subdiv descriptor created for topology at a reshape level, */
/* Create subdiv descriptor created for topology at a reshape level. */
static void reshape_subdiv_create(MultiresReshapeSmoothContext *reshape_smooth_context)
{
const MultiresReshapeContext *reshape_context = reshape_smooth_context->reshape_context;
@ -1050,7 +1050,7 @@ typedef void(ReshapeSubdivCoarsePositionCb)(
const Vertex *vertex,
float r_P[3]);
/* Refine subdivision surface topology at a reshape level for new coarse vertices positions. */
/* Refine subdivision surface topology at a reshape level for new coarse vertices positions. */
static void reshape_subdiv_refine(const MultiresReshapeSmoothContext *reshape_smooth_context,
ReshapeSubdivCoarsePositionCb coarse_position_cb)
{

View File

@ -2854,7 +2854,7 @@ void BKE_object_copy_proxy_drivers(Object *ob, Object *target)
else {
/* only on local objects because this causes indirect links
* 'a -> b -> c', blend to point directly to a.blend
* when a.blend has a proxy that's linked into c.blend */
* when a.blend has a proxy that's linked into `c.blend`. */
if (!ID_IS_LINKED(ob)) {
id_lib_extern((ID *)dtar->id);
}

View File

@ -122,7 +122,7 @@ static float jonswap(const Ocean *oc, const float k2)
float val = alpha_beta_spectrum(m_alpha, beta, GRAVITY, omega, m_peakomega);
/* Peak sharpening */
/* Peak sharpening. */
val *= peak_sharpen(m_omega, m_peakomega, m_gamma);
return val;

View File

@ -785,7 +785,7 @@ static void do_twist(const ParticleChildModifierContext *modifier_ctx,
return;
}
if (part->twist == 0.0f) {
/* No twist along the strand. */
/* No twist along the strand. */
return;
}
/* Dependent on whether it's threaded update or not, curve comes

View File

@ -142,7 +142,7 @@ static void distribute_grid(Mesh *mesh, ParticleSystem *psys)
size[(axis + 1) % 3] = (int)ceil(delta[(axis + 1) % 3] / d);
size[(axis + 2) % 3] = (int)ceil(delta[(axis + 2) % 3] / d);
/* float errors grrr.. */
/* float errors grrr. */
size[(axis + 1) % 3] = MIN2(size[(axis + 1) % 3], res);
size[(axis + 2) % 3] = MIN2(size[(axis + 2) % 3], res);

View File

@ -840,7 +840,7 @@ void psys_get_birth_coords(
copy_v3_v3(state->co, loc);
/* boids don't get any initial velocity */
/* boids don't get any initial velocity. */
zero_v3(state->vel);
/* boids store direction in ave */
@ -1920,7 +1920,7 @@ static void sph_force_cb(void *sphdata_v, ParticleKey *state, float *force, floa
}
}
/* Artificial buoyancy force in negative gravity direction */
/* Artificial buoyancy force in negative gravity direction. */
if (fluid->buoyancy > 0.0f && gravity) {
madd_v3_v3fl(force, gravity, fluid->buoyancy * (density - rest_density));
}
@ -2095,7 +2095,7 @@ static void sphclassical_force_cb(void *sphdata_v,
}
}
/* Artificial buoyancy force in negative gravity direction */
/* Artificial buoyancy force in negative gravity direction. */
if (fluid->buoyancy > 0.0f && gravity) {
madd_v3_v3fl(force, gravity, fluid->buoyancy * (pa->sphdensity - rest_density));
}
@ -3369,7 +3369,7 @@ static void hair_create_input_mesh(ParticleSimulationData *sim,
/* XXX placeholder for more flexible future hair settings */
hair_radius = part->size;
/* make vgroup for pin roots etc.. */
/* Make vgroup for pin roots etc. */
hair_index = 1;
LOOP_PARTICLES
{

View File

@ -2316,7 +2316,7 @@ static void pbvh_bmesh_verify(PBVH *pbvh)
vert_count++;
}
/* if totvert differs from number of verts inside the hash. hash-totvert is checked above */
/* If totvert differs from number of verts inside the hash. hash-totvert is checked above. */
BLI_assert(vert_count == pbvh->bm->totvert);
# endif

View File

@ -3050,7 +3050,7 @@ void BKE_ptcache_remove(void)
closedir(dir);
}
else {
rmdir = 0; /* path doesn't exist */
rmdir = 0; /* Path doesn't exist. */
}
if (rmdir) {

View File

@ -668,7 +668,7 @@ void BKE_rigidbody_calc_volume(Object *ob, float *r_vol)
radius = max_fff(size[0], size[1], size[2]) * 0.5f;
}
/* calculate volume as appropriate */
/* Calculate volume as appropriate. */
switch (rbo->shape) {
case RB_SHAPE_BOX:
volume = size[0] * size[1] * size[2];
@ -744,10 +744,10 @@ void BKE_rigidbody_calc_center_of_mass(Object *ob, float r_center[3])
* (i.e. Object pivot is centralized in boundbox)
* - boundbox gives full width
*/
/* XXX: all dimensions are auto-determined now... later can add stored settings for this */
/* XXX: all dimensions are auto-determined now... later can add stored settings for this. */
BKE_object_dimensions_get(ob, size);
/* calculate volume as appropriate */
/* Calculate volume as appropriate. */
switch (rbo->shape) {
case RB_SHAPE_BOX:
case RB_SHAPE_SPHERE:

View File

@ -3379,7 +3379,7 @@ static bool depsgraph_key_compare(const void *key_a_v, const void *key_b_v)
{
const DepsgraphKey *key_a = key_a_v;
const DepsgraphKey *key_b = key_b_v;
/* TODO(sergey): Compare rest of */
/* TODO(sergey): Compare rest of. */
return !(key_a->view_layer == key_b->view_layer);
}

View File

@ -546,7 +546,7 @@ static void shrinkwrap_calc_normal_projection_cb_ex(void *__restrict userdata,
}
if (calc->vert != NULL && calc->smd->projAxis == MOD_SHRINKWRAP_PROJECT_OVER_NORMAL) {
/* calc->vert contains verts from evaluated mesh. */
/* calc->vert contains verts from evaluated mesh. */
/* These coordinates are deformed by vertexCos only for normal projection
* (to get correct normals) for other cases calc->verts contains undeformed coordinates and
* vertexCos should be used */

View File

@ -150,11 +150,11 @@ typedef struct SB_thread_context {
#define BSF_INTERSECT 1 /* edge intersects collider face */
/* private definitions for bodypoint states */
#define SBF_DOFUZZY 1 /* Bodypoint do fuzzy */
#define SBF_OUTOFCOLLISION 2 /* Bodypoint does not collide */
#define SBF_DOFUZZY 1 /* Bodypoint do fuzzy. */
#define SBF_OUTOFCOLLISION 2 /* Bodypoint does not collide. */
#define BFF_INTERSECT 1 /* collider edge intrudes face */
#define BFF_CLOSEVERT 2 /* collider vertex repulses face */
#define BFF_INTERSECT 1 /* collider edge intrudes face. */
#define BFF_CLOSEVERT 2 /* collider vertex repulses face. */
/* humm .. this should be calculated from sb parameters and sizes. */
static float SoftHeunTol = 1.0f;
@ -2344,7 +2344,7 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float *
aabbmin[0] = aabbmin[1] = aabbmin[2] = 1e20f;
aabbmax[0] = aabbmax[1] = aabbmax[2] = -1e20f;
/* old one with homogeneous masses */
/* old one with homogeneous masses */
/* claim a minimum mass for vertex */
#if 0
if (sb->nodemass > 0.009999f) {

View File

@ -63,7 +63,7 @@ void subdiv_ccg_average_faces_boundaries_and_corners(SubdivCCG *subdiv_ccg,
/** \name Generally useful internal helpers
* \{ */
/* Number of floats in per-vertex elements. */
/* Number of floats in per-vertex elements. */
static int num_element_float_get(const SubdivCCG *subdiv_ccg)
{
/* We always have 3 floats for coordinate. */
@ -1489,7 +1489,7 @@ BLI_INLINE SubdivCCGCoord coord_at_next_col(const SubdivCCG *subdiv_ccg,
return result;
}
/* For the input coordinate which is at the boundary of the grid do one step inside. */
/* For the input coordinate which is at the boundary of the grid do one step inside. */
static SubdivCCGCoord coord_step_inside_from_boundary(const SubdivCCG *subdiv_ccg,
const SubdivCCGCoord *coord)

View File

@ -282,7 +282,7 @@ static void buffer_apply_offset(void **buffer, const int offset)
*buffer = ((unsigned char *)*buffer) + offset;
}
/* Write given number of floats to the beginning of given buffer. */
/* Write given number of floats to the beginning of given buffer. */
static void buffer_write_float_value(void **buffer, const float *values_buffer, int num_values)
{
memcpy(*buffer, values_buffer, sizeof(float) * num_values);

View File

@ -1749,7 +1749,7 @@ static void subdiv_foreach_vertices_of_loose_edges_task(void *__restrict userdat
/* Subdivision vertices which corresponds to edge's v1 and v2. */
const int subdiv_v1_index = ctx->vertices_corner_offset + coarse_edge->v1;
const int subdiv_v2_index = ctx->vertices_corner_offset + coarse_edge->v2;
/* First subdivided inner vertex of the edge. */
/* First subdivided inner vertex of the edge. */
const int subdiv_start_vertex = ctx->vertices_edge_offset +
coarse_edge_index * num_subdiv_vertices_per_coarse_edge;
/* Perform interpolation. */

View File

@ -1381,7 +1381,7 @@ ImBuf *BKE_tracking_stabilize_frame(
return ibuf;
}
/* Allocate frame for stabilization result, copy alpha mode and colorspace. */
/* Allocate frame for stabilization result, copy alpha mode and colorspace. */
ibuf_flags = 0;
if (ibuf->rect) {
ibuf_flags |= IB_rect;

View File

@ -747,7 +747,7 @@ static const char *unit_find_str(const char *str, const char *substr, bool case_
* "1*1+1*0.01 +2*0.001 " - Add add signs if ( + - * / | & ~ < > ^ ! = % ) not found in between.
*/
/* Not too strict, (+ - * /) are most common. */
/* Not too strict, (+ - * /) are most common. */
static bool ch_is_op(char op)
{
switch (op) {
@ -917,7 +917,7 @@ static int unit_scale_str(char *str,
return 0;
}
/* XXX - investigate, does not respect len_max properly. */
/* XXX - investigate, does not respect len_max properly. */
char *str_found = (char *)unit_find_str(str, replace_str, case_sensitive);
if (str_found == NULL) {

View File

@ -180,7 +180,7 @@ class ColorSceneLinear4f final : public ColorRGBA<float, eSpace::SceneLinear, Al
/**
* Convert to its byte encoded counter space.
**/
*/
ColorSceneLinearByteEncoded4b<Alpha> encode() const
{
ColorSceneLinearByteEncoded4b<Alpha> encoded;

View File

@ -35,7 +35,7 @@ extern "C" {
*/
/* ********************************************** */
/* Data Types and Type Defines */
/* Data Types and Type Defines */
/* Base Structs --------------------------------- */

View File

@ -34,36 +34,36 @@ extern "C" {
# if defined(__cplusplus) || (defined(__STDC__) && __STDC__)
# undef __P
# define __P(protos) protos
# else /* Not C++ or ANSI C. */
# else /* Not C++ or ANSI C. */
# undef __P
# define __P(protos) ()
/* We can get away without defining `const' here only because in this file
* it is used only inside the prototype for `fnmatch', which is elided in
* non-ANSI C where `const' is problematical. */
# endif /* C++ or ANSI C. */
* non-ANSI C where `const' is problematical. */
# endif /* C++ or ANSI C. */
/* We #undef these before defining them because some losing systems
* (HP-UX A.08.07 for example) define these in <unistd.h>. */
* (HP-UX A.08.07 for example) define these in <unistd.h>. */
# undef FNM_PATHNAME
# undef FNM_NOESCAPE
# undef FNM_PERIOD
/* Bits set in the FLAGS argument to `fnmatch'. */
# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
/* Bits set in the FLAGS argument to `fnmatch'. */
# define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
# define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
# define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
# if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE < 2 || defined(_GNU_SOURCE)
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */
# define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
# endif
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
/* Value returned by `fnmatch' if STRING does not match PATTERN. */
# define FNM_NOMATCH 1
/* Match STRING against the filename pattern PATTERN,
* returning zero if it matches, FNM_NOMATCH if not. */
* returning zero if it matches, FNM_NOMATCH if not. */
extern int fnmatch __P((const char *__pattern, const char *__string, int __flags));
#else

View File

@ -27,13 +27,13 @@ extern "C" {
/* Compute MD5 message digest for LEN bytes beginning at BUFFER. The
* result is always in little endian byte order, so that a byte-wise
* output yields to the wanted ASCII representation of the message
* digest. */
* digest. */
void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock);
/* Compute MD5 message digest for bytes read from STREAM. The
* resulting message digest number will be written into the 16 bytes
* beginning at RESBLOCK. */
* beginning at RESBLOCK. */
int BLI_hash_md5_stream(FILE *stream, void *resblock);

View File

@ -382,10 +382,11 @@ MINLINE float line_point_side_v2(const float l1[2],
const float pt[2]) ATTR_WARN_UNUSED_RESULT;
/********************************** Angles ***********************************/
/* - angle with 2 arguments is angle between vector */
/* - angle with 3 arguments is angle between 3 points at the middle point */
/* - angle_normalized_* is faster equivalent if vectors are normalized */
/* - angle with 2 arguments is angle between vector.
* - angle with 3 arguments is angle between 3 points at the middle point.
* - angle_normalized_* is faster equivalent if vectors are normalized.
*/
float angle_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT;
float angle_signed_v2v2(const float v1[2], const float v2[2]) ATTR_WARN_UNUSED_RESULT;
float angle_v2v2v2(const float a[2], const float b[2], const float c[2]) ATTR_WARN_UNUSED_RESULT;

View File

@ -34,8 +34,8 @@ typedef struct {
void *val;
} SmallHashEntry;
/* how much stack space to use before dynamically allocating memory.
* set to match one of the values in 'hashsizes' to avoid too many mallocs */
/* How much stack space to use before dynamically allocating memory.
* set to match one of the values in 'hashsizes' to avoid too many mallocs. */
#define SMSTACKSIZE 131
typedef struct SmallHash {
unsigned int nbuckets;

View File

@ -147,7 +147,7 @@ typedef struct TaskParallelSettings {
* (similar to OpenMP's firstprivate).
*/
void *userdata_chunk; /* Pointer to actual data. */
size_t userdata_chunk_size; /* Size of that data. */
size_t userdata_chunk_size; /* Size of that data. */
/* Function called from calling thread once whole range have been
* processed.
*/

View File

@ -517,7 +517,7 @@ extern "C" {
# define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(*(arr)))
#endif
/* ARRAY_SET_ITEMS#(v, ...): set indices of array 'v' */
/* ARRAY_SET_ITEMS#(v, ...): set indices of array 'v' */
/* internal helpers */
#define _VA_ARRAY_SET_ITEMS2(v, a) ((v)[0] = (a))
#define _VA_ARRAY_SET_ITEMS3(v, a, b) \

View File

@ -963,7 +963,7 @@ class Vector {
}
/* At least double the size of the previous allocation. Otherwise consecutive calls to grow can
* cause a reallocation every time even though min_capacity only increments. */
* cause a reallocation every time even though min_capacity only increments. */
const int64_t min_new_capacity = this->capacity() * 2;
const int64_t new_capacity = std::max(min_capacity, min_new_capacity);

View File

@ -26,7 +26,7 @@
# include <dirent.h>
#endif
#include <string.h> /* strcpy etc.. */
#include <string.h> /* #strcpy etc. */
#include <sys/stat.h>
#include <time.h>

View File

@ -414,7 +414,7 @@ static void rotate_right(DLRBT_Tree *tree, DLRBT_Node *root)
}
/* *********************************************** */
/* Post-Insertion Balancing */
/* Post-Insertion Balancing */
/* forward defines for insertion checks */
static void insert_check_1(DLRBT_Tree *tree, DLRBT_Node *node);
@ -472,7 +472,7 @@ static void insert_check_2(DLRBT_Tree *tree, DLRBT_Node *node)
}
}
/* W. 4+5) Perform rotation on sub-tree containing the 'new' node, then do any */
/* W. 4+5) Perform rotation on sub-tree containing the 'new' node, then do any. */
static void insert_check_3(DLRBT_Tree *tree, DLRBT_Node *node)
{
DLRBT_Node *gp = get_grandparent(node);

View File

@ -290,7 +290,7 @@ static int vertex_sort(const void *p1, const void *p2, void *vs_ctx_p)
* to have some way of writing the boxes back to the original data.
* \param len: the number of boxes in the array.
* \param r_tot_x, r_tot_y: set so you can normalize the data.
* */
*/
void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r_tot_y)
{
uint box_index, verts_pack_len, i, j, k;
@ -312,7 +312,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
/* Sort boxes, biggest first */
qsort(boxarray, (size_t)len, sizeof(BoxPack), box_areasort);
/* add verts to the boxes, these are only used internally */
/* Add verts to the boxes, these are only used internally. */
vert = MEM_mallocN(sizeof(BoxVert[4]) * (size_t)len, "BoxPack Verts");
vertex_pack_indices = MEM_mallocN(sizeof(int[3]) * (size_t)len, "BoxPack Indices");
@ -357,7 +357,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
/* Pack the First box!
* then enter the main box-packing loop */
box = boxarray; /* get the first box */
box = boxarray; /* Get the first box. */
/* First time, no boxes packed */
box->v[BL]->free = 0; /* Can't use any if these */
box->v[BR]->free &= ~(BLF | BRF);

View File

@ -66,29 +66,29 @@
* \{ */
typedef enum eOpCode {
/* Double constant: (-> dval) */
/* Double constant: (-> dval). */
OPCODE_CONST,
/* 1 argument function call: (a -> func1(a)) */
/* 1 argument function call: (a -> func1(a)). */
OPCODE_FUNC1,
/* 2 argument function call: (a b -> func2(a,b)) */
/* 2 argument function call: (a b -> func2(a,b)). */
OPCODE_FUNC2,
/* 3 argument function call: (a b c -> func3(a,b,c)) */
/* 3 argument function call: (a b c -> func3(a,b,c)). */
OPCODE_FUNC3,
/* Parameter access: (-> params[ival]) */
OPCODE_PARAMETER,
/* Minimum of multiple inputs: (a b c... -> min); ival = arg count */
/* Minimum of multiple inputs: (a b c... -> min); ival = arg count. */
OPCODE_MIN,
/* Maximum of multiple inputs: (a b c... -> max); ival = arg count */
/* Maximum of multiple inputs: (a b c... -> max); ival = arg count. */
OPCODE_MAX,
/* Jump (pc += jmp_offset) */
OPCODE_JMP,
/* Pop and jump if zero: (a -> ); JUMP IF NOT a */
/* Pop and jump if zero: (a -> ); JUMP IF NOT a. */
OPCODE_JMP_ELSE,
/* Jump if nonzero, or pop: (a -> a JUMP) IF a ELSE (a -> ) */
/* Jump if nonzero, or pop: (a -> a JUMP) IF a ELSE (a -> ). */
OPCODE_JMP_OR,
/* Jump if zero, or pop: (a -> a JUMP) IF NOT a ELSE (a -> ) */
/* Jump if zero, or pop: (a -> a JUMP) IF NOT a ELSE (a -> ). */
OPCODE_JMP_AND,
/* For comparison chaining: (a b -> 0 JUMP) IF NOT func2(a,b) ELSE (a b -> b) */
/* For comparison chaining: (a b -> 0 JUMP) IF NOT func2(a,b) ELSE (a b -> b). */
OPCODE_CMP_CHAIN,
} eOpCode;

View File

@ -239,7 +239,7 @@ fnmatch (const char *pattern, const char *string, int flags)
# undef FOLD
}
#endif /* _LIBC or not __GNU_LIBRARY__. */
#endif /* _LIBC or not __GNU_LIBRARY__. */
/* clang-format on */

View File

@ -92,7 +92,7 @@ struct md5_ctx {
/* This array contains the bytes used to pad the buffer to the next 64-byte boundary.
* (RFC 1321, 3.1: Step 1) */
static const unsigned char fillbuf[64] = {0x80, 0 /* , 0, 0, ... */};
static const unsigned char fillbuf[64] = {0x80, 0 /* , 0, 0, ... */};
/**
* Initialize structure containing state of computation.
@ -136,7 +136,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
md5_uint32 C = ctx->C;
md5_uint32 D = ctx->D;
/* Process all bytes in the buffer with 64 bytes in each round of the loop. */
/* Process all bytes in the buffer with 64 bytes in each round of the loop. */
while (words < endp) {
md5_uint32 *cwp = correct_words;
md5_uint32 A_save = A;
@ -161,7 +161,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
* T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64
*/
/* Round 1. */
/* Round 1. */
OP(A, B, C, D, 7, 0xd76aa478);
OP(D, A, B, C, 12, 0xe8c7b756);
OP(C, D, A, B, 17, 0x242070db);
@ -190,7 +190,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
a += b; \
(void)0
/* Round 2. */
/* Round 2. */
OP(FG, A, B, C, D, 1, 5, 0xf61e2562);
OP(FG, D, A, B, C, 6, 9, 0xc040b340);
OP(FG, C, D, A, B, 11, 14, 0x265e5a51);
@ -208,7 +208,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
OP(FG, C, D, A, B, 7, 14, 0x676f02d9);
OP(FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
/* Round 3. */
/* Round 3. */
OP(FH, A, B, C, D, 5, 4, 0xfffa3942);
OP(FH, D, A, B, C, 8, 11, 0x8771f681);
OP(FH, C, D, A, B, 11, 16, 0x6d9d6122);
@ -226,7 +226,7 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
OP(FH, C, D, A, B, 15, 16, 0x1fa27cf8);
OP(FH, B, C, D, A, 2, 23, 0xc4ac5665);
/* Round 4. */
/* Round 4. */
OP(FI, A, B, C, D, 0, 6, 0xf4292244);
OP(FI, D, A, B, C, 7, 10, 0x432aff97);
OP(FI, C, D, A, B, 14, 15, 0xab9423a7);
@ -246,14 +246,14 @@ static void md5_process_block(const void *buffer, size_t len, struct md5_ctx *ct
#undef OP
/* Add the starting values of the context. */
/* Add the starting values of the context. */
A += A_save;
B += B_save;
C += C_save;
D += D_save;
}
/* Put checksum in context given as argument. */
/* Put checksum in context given as argument. */
ctx->A = A;
ctx->B = B;
ctx->C = C;
@ -330,7 +330,7 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock)
++len[1];
}
/* If end of file is reached, end the loop. */
/* If end of file is reached, end the loop. */
if (n == 0) {
break;
}
@ -354,10 +354,10 @@ int BLI_hash_md5_stream(FILE *stream, void *resblock)
*(md5_uint32 *)&buffer[sum + pad] = SWAP(len[0] << 3);
*(md5_uint32 *)&buffer[sum + pad + 4] = SWAP((len[1] << 3) | (len[0] >> 29));
/* Process last bytes. */
/* Process last bytes. */
md5_process_block(buffer, sum + pad + 8, &ctx);
/* Construct result in desired memory. */
/* Construct result in desired memory. */
md5_read_ctx(&ctx, resblock);
return 0;
}
@ -374,15 +374,15 @@ void *BLI_hash_md5_buffer(const char *buffer, size_t len, void *resblock)
size_t blocks = len & ~63;
size_t pad, rest;
/* Initialize the computation context. */
/* Initialize the computation context. */
md5_init_ctx(&ctx);
/* Process whole buffer but last len % 64 bytes. */
/* Process whole buffer but last len % 64 bytes. */
md5_process_block(buffer, blocks, &ctx);
/* REST bytes are not processed yet. */
/* REST bytes are not processed yet. */
rest = len - blocks;
/* Copy to own buffer. */
/* Copy to own buffer. */
memcpy(restbuf, &buffer[blocks], rest);
/* Append needed fill bytes at end of buffer.
* We can copy 64 bytes because the buffer is always big enough. */

View File

@ -192,7 +192,7 @@ MINLINE double ratiod(double min, double max, double pos)
return range == 0 ? 0 : ((pos - min) / range);
}
/* Map a normalized value, i.e. from interval [0, 1] to interval [a, b] */
/* Map a normalized value, i.e. from interval [0, 1] to interval [a, b]. */
MINLINE float scalenorm(float a, float b, float x)
{
BLI_assert(x <= 1 && x >= 0);
@ -760,7 +760,7 @@ MALWAYS_INLINE __m128 _bli_math_fastpow24(const __m128 arg)
__m128 x = _bli_math_fastpow(0x3F4CCCCD, 0x4F55A7FB, arg);
__m128 arg2 = _mm_mul_ps(arg, arg);
__m128 arg4 = _mm_mul_ps(arg2, arg2);
/* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
/* error max = 0.018 avg = 0.0031 |avg| = 0.0031 */
x = _bli_math_improve_5throot_solution(x, arg4);
/* error max = 0.00021 avg = 1.6e-05 |avg| = 1.6e-05 */
x = _bli_math_improve_5throot_solution(x, arg4);

Some files were not shown because too many files have changed in this diff Show More