Cleanup: comment indentation & spelling

This commit is contained in:
2019-02-11 10:51:25 +11:00
parent 9ca6fc41ae
commit ffd0fee97c
30 changed files with 101 additions and 112 deletions

View File

@@ -1187,8 +1187,8 @@ bool data_transfer_layersmapping_vgroups(
idx_src = fromlayers; idx_src = fromlayers;
if (idx_src >= BLI_listbase_count(&ob_src->defbase)) { if (idx_src >= BLI_listbase_count(&ob_src->defbase)) {
/* This can happen when vgroups are removed from source object... /* This can happen when vgroups are removed from source object...
* Remapping would be really tricky here, we'd need to go over all objects in Main everytime we delete * Remapping would be really tricky here, we'd need to go over all objects in
* a vgroup... for now, simpler and safer to abort. */ * Main every time we delete a vgroup... for now, simpler and safer to abort. */
return false; return false;
} }
} }

View File

@@ -1371,7 +1371,8 @@ bool BKE_gpencil_smooth_stroke_thickness(bGPDstroke *gps, int point_index, float
} }
/** /**
* Apply smooth for UV rotation to stroke point (use pressure) */ * Apply smooth for UV rotation to stroke point (use pressure).
*/
bool BKE_gpencil_smooth_stroke_uv(bGPDstroke *gps, int point_index, float influence) bool BKE_gpencil_smooth_stroke_uv(bGPDstroke *gps, int point_index, float influence)
{ {
bGPDspoint *ptb = &gps->points[point_index]; bGPDspoint *ptb = &gps->points[point_index];

View File

@@ -416,7 +416,7 @@ ATTR_NONNULL(1) static void libblock_remap_data(
else { else {
i = set_listbasepointers(bmain, lb_array); i = set_listbasepointers(bmain, lb_array);
/* Note that this is a very 'bruteforce' approach, maybe we could use some depsgraph to only process /* Note that this is a very 'brute force' approach, maybe we could use some depsgraph to only process
* objects actually using given old_id... sounds rather unlikely currently, though, so this will do for now. */ * objects actually using given old_id... sounds rather unlikely currently, though, so this will do for now. */
while (i--) { while (i--) {
@@ -966,7 +966,7 @@ static void id_delete(Main *bmain, const bool do_tagged_deletion)
* This means that we won't have to loop over all deleted IDs to remove usages * This means that we won't have to loop over all deleted IDs to remove usages
* of other deleted IDs. * of other deleted IDs.
* This gives tremendous speed-up when deleting a large amount of IDs from a Main * This gives tremendous speed-up when deleting a large amount of IDs from a Main
* countaining thousands of those. * containing thousands of those.
* This also means that we have to be very careful here, as we by-pass many 'common' * This also means that we have to be very careful here, as we by-pass many 'common'
* processing, hence risking to 'corrupt' at least user counts, if not IDs themselves. */ * processing, hence risking to 'corrupt' at least user counts, if not IDs themselves. */
bool keep_looping = true; bool keep_looping = true;
@@ -1081,7 +1081,7 @@ void BKE_id_delete(Main *bmain, void *idv)
/** /**
* Properly delete all IDs tagged with \a LIB_TAG_DOIT, in given \a bmain database. * Properly delete all IDs tagged with \a LIB_TAG_DOIT, in given \a bmain database.
* *
* This is more efficient than calling #BKE_id_delete repitively on a large set of IDs * This is more efficient than calling #BKE_id_delete repetitively on a large set of IDs
* (several times faster when deleting most of the IDs at once)... * (several times faster when deleting most of the IDs at once)...
* *
* \warning Considered experimental for now, seems to be working OK but this is * \warning Considered experimental for now, seems to be working OK but this is

View File

@@ -1793,7 +1793,7 @@ int BLI_bvhtree_range_query(
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name BLI_bvhtree_nearest_projected /** \name BLI_bvhtree_nearest_projected
* \{ */ * \{ */
static void bvhtree_nearest_projected_dfs_recursive( static void bvhtree_nearest_projected_dfs_recursive(
BVHNearestProjectedData *__restrict data, const BVHNode *node) BVHNearestProjectedData *__restrict data, const BVHNode *node)

View File

@@ -774,7 +774,7 @@ float dist_squared_ray_to_aabb_v3_simple(
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name dist_squared_to_projected_aabb and helpers /** \name dist_squared_to_projected_aabb and helpers
* \{ */ * \{ */
/** /**
* \param projmat: Projection Matrix (usually perspective * \param projmat: Projection Matrix (usually perspective

View File

@@ -1259,8 +1259,8 @@ void BLI_setenv_if_new(const char *env, const char *val)
} }
/** /**
* get an env var, result has to be used immediately * Get an env var, result has to be used immediately.
*/ */
const char *BLI_getenv(const char *env) const char *BLI_getenv(const char *env)
{ {
#ifdef _MSC_VER #ifdef _MSC_VER

View File

@@ -1671,13 +1671,13 @@ float BM_edge_calc_face_angle(const BMEdge *e)
} }
/** /**
* \brief BMESH EDGE/FACE ANGLE * \brief BMESH EDGE/FACE ANGLE
* *
* Calculates the angle between two faces in world space. * Calculates the angle between two faces in world space.
* Assumes the face normals are correct. * Assumes the face normals are correct.
* *
* \return angle in radians * \return angle in radians
*/ */
float BM_edge_calc_face_angle_with_imat3_ex(const BMEdge *e, const float imat3[3][3], const float fallback) float BM_edge_calc_face_angle_with_imat3_ex(const BMEdge *e, const float imat3[3][3], const float fallback)
{ {
if (BM_edge_is_manifold(e)) { if (BM_edge_is_manifold(e)) {

View File

@@ -1349,7 +1349,7 @@ static bool make_unit_square_map(
/* The cols of m are: {vmid - va, vmid - vb, vmid + vd - va -vb, va + vb - vmid; /* The cols of m are: {vmid - va, vmid - vb, vmid + vd - va -vb, va + vb - vmid;
* blender transform matrices are stored such that m[i][*] is ith column; * blender transform matrices are stored such that m[i][*] is ith column;
* the last elements of each col remain as they are in unity matrix */ * the last elements of each col remain as they are in unity matrix. */
sub_v3_v3v3(&r_mat[0][0], vmid, va); sub_v3_v3v3(&r_mat[0][0], vmid, va);
r_mat[0][3] = 0.0f; r_mat[0][3] = 0.0f;
sub_v3_v3v3(&r_mat[1][0], vmid, vb); sub_v3_v3v3(&r_mat[1][0], vmid, vb);

View File

@@ -258,14 +258,14 @@ void AnimationExporter::export_bone_animations_recursive(Object *ob, Bone *bone,
export_bone_animations_recursive(ob, child, sampler); export_bone_animations_recursive(ob, child, sampler);
} }
/* /**
* In some special cases the exported Curve needs to be replaced * In some special cases the exported Curve needs to be replaced
* by a modified curve (for collada purposes) * by a modified curve (for collada purposes)
* This method checks if a conversion is necessary and if applicable * This method checks if a conversion is necessary and if applicable
* returns a pointer to the modified BCAnimationCurve. * returns a pointer to the modified BCAnimationCurve.
* IMPORTANT: the modified curve must be deleted by the caller when no longer needed * IMPORTANT: the modified curve must be deleted by the caller when no longer needed
* if no conversion is needed this method returns a NULL; * if no conversion is needed this method returns a NULL;
*/ */
BCAnimationCurve *AnimationExporter::get_modified_export_curve(Object *ob, BCAnimationCurve &curve, BCAnimationCurveMap &curves) BCAnimationCurve *AnimationExporter::get_modified_export_curve(Object *ob, BCAnimationCurve &curve, BCAnimationCurveMap &curves)
{ {
std::string channel_target = curve.get_channel_target(); std::string channel_target = curve.get_channel_target();

View File

@@ -394,11 +394,11 @@ void BCAnimationSampler::generate_transforms(Object *ob, Bone *bone, BCAnimation
generate_transforms(ob, child, curves); generate_transforms(ob, child, curves);
} }
/* /**
* Collect all keyframes from all animation curves related to the object * Collect all keyframes from all animation curves related to the object
* The bc_get... functions check for NULL and correct object type * The bc_get... functions check for NULL and correct object type
* The add_keyframes_from() function checks for NULL * The add_keyframes_from() function checks for NULL
*/ */
void BCAnimationSampler::initialize_keyframes(BCFrameSet &frameset, Object *ob) void BCAnimationSampler::initialize_keyframes(BCFrameSet &frameset, Object *ob)
{ {
frameset.clear(); frameset.clear();

View File

@@ -310,12 +310,12 @@ Object *bc_get_assigned_armature(Object *ob)
return ob_arm; return ob_arm;
} }
/* /**
* Returns the highest selected ancestor * Returns the highest selected ancestor
* returns NULL if no ancestor is selected * returns NULL if no ancestor is selected
* IMPORTANT: This function expects that all exported objects have set: * IMPORTANT: This function expects that all exported objects have set:
* ob->id.tag & LIB_TAG_DOIT * ob->id.tag & LIB_TAG_DOIT
*/ */
Object *bc_get_highest_selected_ancestor_or_self(LinkNode *export_set, Object *ob) Object *bc_get_highest_selected_ancestor_or_self(LinkNode *export_set, Object *ob)
{ {
@@ -970,8 +970,7 @@ bool bc_bone_matrix_local_get(Object *ob, Bone *bone, Matrix &mat, bool for_open
/* OPEN_SIM_COMPATIBILITY /* OPEN_SIM_COMPATIBILITY
* AFAIK animation to second life is via BVH, but no * AFAIK animation to second life is via BVH, but no
* reason to not have the collada-animation be correct * reason to not have the collada-animation be correct */
*/
if (for_opensim) { if (for_opensim) {
float temp[4][4]; float temp[4][4];
copy_m4_m4(temp, bone->arm_mat); copy_m4_m4(temp, bone->arm_mat);

View File

@@ -112,7 +112,7 @@ void TextureBaseOperation::executePixelSampled(float output[4], float x, float y
/* When no interpolation/filtering happens in multitex() foce nearest interpolation. /* When no interpolation/filtering happens in multitex() foce nearest interpolation.
* We do it here because (a) we can't easily say multitex() that we want nearest * We do it here because (a) we can't easily say multitex() that we want nearest
* interpolaiton and (b) in such configuration multitex() sinply floor's the value * interpolation and (b) in such configuration multitex() sinply floor's the value
* which often produces artifacts. * which often produces artifacts.
*/ */
if (m_texture != NULL && (m_texture->imaflag & TEX_INTERPOL) == 0) { if (m_texture != NULL && (m_texture->imaflag & TEX_INTERPOL) == 0) {

View File

@@ -218,7 +218,7 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
* and do an upsample blur for each new accumulated layer. * and do an upsample blur for each new accumulated layer.
* - Finally add accumulation buffer onto the source color buffer. * - Finally add accumulation buffer onto the source color buffer.
* *
* [1/1] is original copy resolution (can be half or quater res for performance) * [1/1] is original copy resolution (can be half or quarter res for performance)
* *
* [DOWNSAMPLE CHAIN] [UPSAMPLE CHAIN] * [DOWNSAMPLE CHAIN] [UPSAMPLE CHAIN]
* *

View File

@@ -584,8 +584,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
} }
/* draw current painting strokes /* draw current painting strokes
* (only if region is equal to originated paint region) * (only if region is equal to originated paint region) */
*/
if ((draw_ctx->obact == ob) && if ((draw_ctx->obact == ob) &&
((gpd->runtime.ar == NULL) || (gpd->runtime.ar == draw_ctx->ar))) ((gpd->runtime.ar == NULL) || (gpd->runtime.ar == draw_ctx->ar)))
{ {

View File

@@ -658,7 +658,7 @@ GPUBatch *DRW_cache_gpencil_axes_get(void)
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Common Object API /** \name Common Object API
* \{ */ * \{ */
GPUBatch *DRW_cache_object_all_edges_get(Object *ob) GPUBatch *DRW_cache_object_all_edges_get(Object *ob)
{ {

View File

@@ -206,8 +206,7 @@ static int pose_slide_init(bContext *C, wmOperator *op, ePoseSlide_Modes mode)
pso->axislock = RNA_enum_get(op->ptr, "axis_lock"); pso->axislock = RNA_enum_get(op->ptr, "axis_lock");
/* for each Pose-Channel which gets affected, get the F-Curves for that channel /* for each Pose-Channel which gets affected, get the F-Curves for that channel
* and set the relevant transform flags... * and set the relevant transform flags... */
*/
poseAnim_mapping_get(C, &pso->pfLinks); poseAnim_mapping_get(C, &pso->pfLinks);
Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(CTX_data_view_layer(C), Object **objects = BKE_view_layer_array_from_objects_in_mode_unique_data(CTX_data_view_layer(C),

View File

@@ -1244,9 +1244,8 @@ static bool gpsculpt_brush_init(bContext *C, wmOperator *op)
gso->is_multiframe = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gso->gpd); gso->is_multiframe = (bool)GPENCIL_MULTIEDIT_SESSIONS_ON(gso->gpd);
gso->use_multiframe_falloff = (ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_FRAME_FALLOFF) != 0; gso->use_multiframe_falloff = (ts->gp_sculpt.flag & GP_SCULPT_SETT_FLAG_FRAME_FALLOFF) != 0;
/* init multiedit falloff curve data before doing anything, /* Init multi-edit falloff curve data before doing anything,
* so we won't have to do it again later * so we won't have to do it again later. */
*/
if (gso->is_multiframe) { if (gso->is_multiframe) {
curvemapping_initialize(ts->gp_sculpt.cur_falloff); curvemapping_initialize(ts->gp_sculpt.cur_falloff);
} }

View File

@@ -720,8 +720,8 @@ void gp_point_to_xy_fl(
/** /**
* generic based on gp_point_to_xy_fl * generic based on gp_point_to_xy_fl
*/ */
void gp_point_3d_to_xy(const GP_SpaceConversion *gsc, const short flag, const float pt[3], float xy[2]) void gp_point_3d_to_xy(const GP_SpaceConversion *gsc, const short flag, const float pt[3], float xy[2])
{ {
const ARegion *ar = gsc->ar; const ARegion *ar = gsc->ar;

View File

@@ -740,8 +740,7 @@ bool ED_mball_select_pick(bContext *C, const int mval[2], bool extend, bool dese
metaelem_id += 0x10000; metaelem_id += 0x10000;
} }
/* When some metaelem was found, then it is necessary to select or /* When some metaelem was found, then it is necessary to select or deselect it. */
* deselect it. */
if (ml_act) { if (ml_act) {
if (!extend && !deselect && !toggle) { if (!extend && !deselect && !toggle) {
uint objects_len; uint objects_len;

View File

@@ -260,8 +260,8 @@ static bool object_has_modifier_cb(Object *ob, void *data)
} }
/* Use with ED_object_iter_other(). Sets the total number of levels /* Use with ED_object_iter_other(). Sets the total number of levels
* for any multires modifiers on the object to the int pointed to by * for any multires modifiers on the object to the int pointed to by
* callback_data. */ * callback_data. */
bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v) bool ED_object_multires_update_totlevels_cb(Object *ob, void *totlevel_v)
{ {
ModifierData *md; ModifierData *md;

View File

@@ -1190,12 +1190,12 @@ static TreeTraversalAction outliner_hide_find_data_to_edit(TreeElement *te, void
LayerCollection *lc = te->directdata; LayerCollection *lc = te->directdata;
if (lc->collection->flag & COLLECTION_IS_MASTER) { if (lc->collection->flag & COLLECTION_IS_MASTER) {
/* skip - showing warning/error message might be misleading /* Skip - showing warning/error message might be misleading
* when deleting multiple collections, so just do nothing */ * when deleting multiple collections, so just do nothing. */
} }
else { else {
/* Delete, duplicate and link don't edit children, those will come along /* Delete, duplicate and link don't edit children,
* with the parents. */ * those will come along with the parents. */
BLI_gset_add(data->collections_to_edit, lc); BLI_gset_add(data->collections_to_edit, lc);
} }
} }

View File

@@ -241,8 +241,7 @@ static bool parent_drop_allowed(SpaceOops *soops, TreeElement *te, Object *poten
/* currently outliner organized in a way that if there's no parent scene /* currently outliner organized in a way that if there's no parent scene
* element for object it means that all displayed objects belong to * element for object it means that all displayed objects belong to
* active scene and parenting them is allowed (sergey) * active scene and parenting them is allowed (sergey) */
*/
if (scene) { if (scene) {
for (ViewLayer *view_layer = scene->view_layers.first; for (ViewLayer *view_layer = scene->view_layers.first;
view_layer; view_layer;

View File

@@ -4548,7 +4548,7 @@ static void applyTrackball(TransInfo *t, const int UNUSED(mval[2]))
/* Transform (Normal Rotation) */ /* Transform (Normal Rotation) */
/** \name Transform Normal Rotation /** \name Transform Normal Rotation
* \{ */ * \{ */
static void storeCustomLNorValue(TransDataContainer *tc, BMesh *bm) static void storeCustomLNorValue(TransDataContainer *tc, BMesh *bm)
{ {

View File

@@ -369,7 +369,7 @@ typedef struct GPUShaderConfigData {
const char *lib; const char *lib;
const char *def; const char *def;
} GPUShaderConfigData; } GPUShaderConfigData;
/* shader.c */ /* gpu_shader.c */
extern const GPUShaderConfigData GPU_shader_cfg_data[GPU_SHADER_CFG_LEN]; extern const GPUShaderConfigData GPU_shader_cfg_data[GPU_SHADER_CFG_LEN];
/** Keep these in sync with: /** Keep these in sync with:

View File

@@ -1097,12 +1097,6 @@ static char *rna_MaterialSlot_path(PointerRNA *ptr)
return BLI_sprintfN("material_slots[%d]", index); return BLI_sprintfN("material_slots[%d]", index);
} }
/* why does this have to be so complicated?, can't all this crap be
* moved to in BGE conversion function? - Campbell *
*
* logic from check_body_type()
* */
static char *rna_ObjectDisplay_path(PointerRNA *UNUSED(ptr)) static char *rna_ObjectDisplay_path(PointerRNA *UNUSED(ptr))
{ {
return BLI_strdup("display"); return BLI_strdup("display");

View File

@@ -357,7 +357,7 @@ PyTypeObject BPyGPUBatch_Type = {
/* -------------------------------------------------------------------- */ /* -------------------------------------------------------------------- */
/** \name Public API /** \name Public API
* \{ */ * \{ */
PyObject *BPyGPUBatch_CreatePyObject(GPUBatch *batch) PyObject *BPyGPUBatch_CreatePyObject(GPUBatch *batch)
{ {