Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2021-07-07 12:55:19 +10:00
parent 63a8b3b972
commit 5bbbc98471
74 changed files with 158 additions and 157 deletions

View File

@ -40,8 +40,8 @@ BlenderViewportParameters::BlenderViewportParameters(BL::SpaceView3D &b_v3d)
BL::View3DShading shading = b_v3d.shading();
PointerRNA cshading = RNA_pointer_get(&shading.ptr, "cycles");
/* We only copy the shading parameters if we are in look dev mode. otherwise
* defaults are being used. These defaults mimic normal render settings */
/* We only copy the shading parameters if we are in look-dev mode.
* Otherwise defaults are being used. These defaults mimic normal render settings. */
if (shading.type() == BL::View3DShading::type_RENDERED) {
use_scene_world = shading.use_scene_world_render();
use_scene_lights = shading.use_scene_lights_render();

View File

@ -237,7 +237,7 @@ ccl_device bool curve_intersect_iterative(const float3 ray_dir,
return false; /* Rejects NaNs */
}
/* Backface culling. */
/* Back-face culling. */
const float3 R = normalize(Q - P);
const float3 U = dradiusdu * R + dPdu;
const float3 V = cross(dPdu, R);
@ -458,10 +458,12 @@ ccl_device_inline bool cylinder_culling_test(const float2 p1, const float2 p2, c
return num * num <= r * r * den2;
}
/*! Intersects a ray with a quad with backface culling
* enabled. The quad v0,v1,v2,v3 is split into two triangles
* v0,v1,v3 and v2,v3,v1. The edge v1,v2 decides which of the two
* triangles gets intersected. */
/**
* Intersects a ray with a quad with back-face culling
* enabled. The quad v0,v1,v2,v3 is split into two triangles
* v0,v1,v3 and v2,v3,v1. The edge v1,v2 decides which of the two
* triangles gets intersected.
*/
ccl_device_inline bool ribbon_intersect_quad(const float ray_tfar,
const float3 quad_v0,
const float3 quad_v1,

View File

@ -81,7 +81,7 @@ class Camera : public Node {
/* ** Rolling shutter effect. ** */
/* Defines rolling shutter effect type. */
NODE_SOCKET_API(RollingShutterType, rolling_shutter_type)
/* Specifies exposure time of scanlines when using
/* Specifies exposure time of scan-lines when using
* rolling shutter effect.
*/
NODE_SOCKET_API(float, rolling_shutter_duration)

View File

@ -345,7 +345,7 @@ void StereoProjection(float left,
float zero_plane,
float dist,
float eye)
/* Perform the perspective projection for one eye's subfield.
/* Perform the perspective projection for one eye's sub-field.
* The projection is in the direction of the negative z axis.
*
* -6.0, 6.0, -4.8, 4.8,
@ -392,8 +392,7 @@ void StereoProjection(float left,
glFrustum(leftw, rightw, bottomw, topw, clip_near, clip_far);
glTranslatef(-xmid - eye, -ymid, -zero_plane - dist);
return;
} /* stereoproj */
}
class Application : public GHOST_IEventConsumer {
public:

View File

@ -39,8 +39,8 @@ struct ReportList;
/* Attribute.domain */
/**
* \warning: Careful when changing existing items. Arrays may be initialized from this (e.g.
* #DATASET_layout_hierarchy).
* \warning Careful when changing existing items.
* Arrays may be initialized from this (e.g. #DATASET_layout_hierarchy).
*/
typedef enum AttributeDomain {
ATTR_DOMAIN_AUTO = -1, /* Use for nodes to choose automatically based on other data. */

View File

@ -45,7 +45,7 @@ extern "C" {
#define PTCACHE_RESET_OUTDATED 2
/* #define PTCACHE_RESET_FREE 3 */ /*UNUSED*/
/* Add the blendfile name after blendcache_ */
/* Add the blend-file name after `blendcache_`. */
#define PTCACHE_EXT ".bphys"
#define PTCACHE_PATH "blendcache_"

View File

@ -444,7 +444,7 @@ void BKE_animdata_merge_copy(
return;
}
// TODO: we must unset all "tweakmode" flags
/* TODO: we must unset all "tweak-mode" flags. */
if ((src->flag & ADT_NLA_EDIT_ON) || (dst->flag & ADT_NLA_EDIT_ON)) {
CLOG_ERROR(
&LOG,
@ -1590,10 +1590,10 @@ void BKE_animdata_blend_read_data(BlendDataReader *reader, AnimData *adt)
/* relink active track/strip - even though strictly speaking this should only be used
* if we're in 'tweaking mode', we need to be able to have this loaded back for
* undo, but also since users may not exit tweakmode before saving (T24535)
* undo, but also since users may not exit tweak-mode before saving (T24535).
*/
/* TODO: it's not really nice that anyone should be able to save the file in this
* state, but it's going to be too hard to enforce this single case... */
* state, but it's going to be too hard to enforce this single case. */
BLO_read_data_address(reader, &adt->act_track);
BLO_read_data_address(reader, &adt->actstrip);
}

View File

@ -562,7 +562,7 @@ static void splineik_evaluate_bone(
* spline dictates, while still maintaining roll control from the existing bone animation. */
mul_m3_m3m3(pose_mat, dmat, rmat);
/* Attempt to reduce shearing, though I doubt this'll really help too much now... */
/* Attempt to reduce shearing, though I doubt this will really help too much now. */
normalize_m3(pose_mat);
mul_m3_m3m3(base_pose_mat, dmat, base_pose_mat);

View File

@ -1290,9 +1290,9 @@ BVHTree *bvhtree_from_editmesh_looptri(
}
/**
* Builds a bvh tree where nodes are the looptri faces of the given dm
* Builds a BVH-tree where nodes are the looptri faces of the given mesh.
*
* \note for editmesh this is currently a duplicate of bvhtree_from_mesh_faces_ex
* \note for edit-mesh this is currently a duplicate of #bvhtree_from_mesh_faces_ex
*/
BVHTree *bvhtree_from_mesh_looptri_ex(BVHTreeFromMesh *data,
const struct MVert *vert,

View File

@ -398,8 +398,7 @@ int BKE_sculpt_get_first_deform_matrices(struct Depsgraph *depsgraph,
if (crazyspace_modifier_supports_deform_matrices(md)) {
const ModifierTypeInfo *mti = BKE_modifier_get_info(md->type);
if (defmats == NULL) {
/* NOTE: Evaluated object si re-set to its original undeformed
* state. */
/* NOTE: Evaluated object is re-set to its original un-deformed state. */
Mesh *me = object_eval.data;
me_eval = BKE_mesh_copy_for_eval(me, true);
crazyspace_init_verts_and_matrices(me_eval, &defmats, &deformedVerts);

View File

@ -248,7 +248,7 @@ typedef struct PaintAdjData {
int *n_target;
/** Index to start reading n_target for each point. */
int *n_index;
/** Num of neighs for each point. */
/** Number of neighbors for each point. */
int *n_num;
/** Vertex adjacency flags. */
int *flags;

View File

@ -108,7 +108,7 @@ LatticeDeformData *BKE_lattice_deform_data_create(const Object *oblatt, const Ob
invert_m4_m4(imat, latmat);
}
/* Prefetch latice deform group weights. */
/* Prefetch lattice deform group weights. */
int defgrp_index = -1;
const MDeformVert *dvert = BKE_lattice_deform_verts_get(oblatt);
if (lt->vgroup[0] && dvert) {

View File

@ -1642,9 +1642,8 @@ static bool check_for_dupid(ListBase *lb, ID *id, char *name, ID **r_id_sorting_
* already.
*/
if (!is_orig_name_used) {
/* Don't bother updating prev_ static variables here, this case is not supposed to happen
* that often, and is not straight-forward here, so just ignore and reset them to default.
*/
/* Don't bother updating `prev_*` static variables here, this case is not supposed to happen
* that often, and is not straight-forward here, so just ignore and reset them to default. */
prev_id_type = ID_LINK_PLACEHOLDER;
prev_final_base_name[0] = '\0';
prev_number = MIN_NUMBER - 1;
@ -1684,7 +1683,7 @@ static bool check_for_dupid(ListBase *lb, ID *id, char *name, ID **r_id_sorting_
continue;
}
/* Update prev_ static variables, in case next call is for the same type of IDs and with the
/* Update `prev_*` static variables, in case next call is for the same type of IDs and with the
* same initial base name, we can skip a lot of above process. */
prev_id_type = id_type;
strcpy(prev_final_base_name, base_name);

View File

@ -998,7 +998,7 @@ void BKE_mesh_loop_islands_add(MeshIslandStore *island_store,
}
/* TODO: I'm not sure edge seam flag is enough to define UV islands?
* Maybe we should also consider UVmaps values
* Maybe we should also consider UV-maps values
* themselves (i.e. different UV-edges for a same mesh-edge => boundary edge too?).
* Would make things much more complex though,
* and each UVMap would then need its own mesh mapping, not sure we want that at all!

View File

@ -631,10 +631,10 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode)
{
NlaStrip *strip;
/* sanity checks
* - obviously we've got to have some starting data
* - when not in tweakmode, the active Action does not have any scaling applied :)
* - when in tweakmode, if the no-mapping flag is set, do not map
/* Sanity checks:
* - Obviously we've got to have some starting data.
* - When not in tweak-mode, the active Action does not have any scaling applied :)
* - When in tweak-mode, if the no-mapping flag is set, do not map.
*/
if ((adt == NULL) || (adt->flag & ADT_NLA_EDIT_ON) == 0 || (adt->flag & ADT_NLA_EDIT_NOMAP)) {
return cframe;
@ -2089,9 +2089,8 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
return false;
}
/* if block is already in tweakmode, just leave, but we should report
* that this block is in tweakmode (as our returncode)
*/
/* If block is already in tweak-mode, just leave, but we should report
* that this block is in tweak-mode (as our returncode). */
if (adt->flag & ADT_NLA_EDIT_ON) {
return true;
}
@ -2111,8 +2110,8 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
}
}
/* There are situations where we may have multiple strips selected and we want to enter tweakmode
* on all of those at once. Usually in those cases,
/* There are situations where we may have multiple strips selected and we want to enter
* tweak-mode on all of those at once. Usually in those cases,
* it will usually just be a single strip per AnimData.
* In such cases, compromise and take the last selected track and/or last selected strip, T28468.
*/
@ -2142,7 +2141,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
if (ELEM(NULL, activeTrack, activeStrip, activeStrip->act)) {
if (G.debug & G_DEBUG) {
printf("NLA tweakmode enter - neither active requirement found\n");
printf("NLA tweak-mode enter - neither active requirement found\n");
printf("\tactiveTrack = %p, activeStrip = %p\n", (void *)activeTrack, (void *)activeStrip);
}
return false;
@ -2192,7 +2191,7 @@ bool BKE_nla_tweakmode_enter(AnimData *adt)
return true;
}
/* Exit tweakmode for this AnimData block */
/* Exit tweak-mode for this AnimData block. */
void BKE_nla_tweakmode_exit(AnimData *adt)
{
NlaStrip *strip;

View File

@ -2157,7 +2157,7 @@ static bool pbvh_faces_node_raycast(PBVH *pbvh,
const float *co[3];
if (origco) {
/* intersect with backuped original coordinates */
/* Intersect with backed up original coordinates. */
co[0] = origco[face_verts[0]];
co[1] = origco[face_verts[1]];
co[2] = origco[face_verts[2]];

View File

@ -155,7 +155,7 @@ static ImBuf *tracking_context_get_keyframed_ibuf(MovieClip *clip,
return tracking_context_get_frame_ibuf(clip, user, clip_flag, keyed_framenr);
}
/* Get image buffer which si used as reference for track. */
/* Get image buffer which is used as reference for track. */
static ImBuf *tracking_context_get_reference_ibuf(MovieClip *clip,
MovieClipUser *user,
int clip_flag,

View File

@ -95,7 +95,7 @@ template<typename Ret, typename... Params> class FunctionRef<Ret(Params...)> {
* A pointer to the referenced callable object. This can be a C function, a lambda object or any
* other callable.
*
* The value does not need to be initialized because it is not used unless callback_ is set as
* The value does not need to be initialized because it is not used unless `callback_` is set as
* well, in which case it will be initialized as well.
*
* Use `intptr_t` to avoid warnings when casting to function pointers.

View File

@ -249,7 +249,7 @@ template<typename Key> class HashedSetSlot {
template<typename ForwardKey, typename IsEqual>
bool contains(const ForwardKey &key, const IsEqual &is_equal, const uint64_t hash) const
{
/* hash_ might be uninitialized here, but that is ok. */
/* `hash_` might be uninitialized here, but that is ok. */
if (hash_ == hash) {
if (state_ == Occupied) {
return is_equal(key, *key_buffer_);

View File

@ -462,7 +462,7 @@ void BLI_filelist_entry_free(struct direntry *entry)
}
/**
* frees storage for an array of direntries, including the array itself.
* Frees storage for an array of #direntry, including the array itself.
*/
void BLI_filelist_free(struct direntry *filelist, const unsigned int nrentries)
{

View File

@ -167,7 +167,7 @@ void invert_qt_qt_normalized(float q1[4], const float q2[4])
invert_qt_normalized(q1);
}
/* simple mult */
/* Simple multiply. */
void mul_qt_fl(float q[4], const float f)
{
q[0] *= f;

View File

@ -235,13 +235,13 @@ void BLI_path_normalize(const char *relabase, char *path)
memmove(path + a, eind, strlen(eind) + 1);
}
else {
/* support for odd paths: eg /../home/me --> /home/me
/* Support for odd paths: eg `/../home/me` --> `/home/me`
* this is a valid path in blender but we can't handle this the usual way below
* simply strip this prefix then evaluate the path as usual.
* pythons os.path.normpath() does this */
* Python's `os.path.normpath()` does this. */
/* NOTE: previous version of following call used an offset of 3 instead of 4,
* which meant that the "/../home/me" example actually became "home/me".
* which meant that the `/../home/me` example actually became `home/me`.
* Using offset of 3 gives behavior consistent with the aforementioned
* Python routine. */
memmove(path, path + 3, strlen(path + 3) + 1);
@ -1070,8 +1070,8 @@ bool BLI_path_abs(char *path, const char *basepath)
* paths relative to the .blend file -elubie */
BLI_str_replace_char(tmp + BLI_path_unc_prefix_len(tmp), '\\', '/');
/* Paths starting with // will get the blend file as their base,
* this isn't standard in any os but is used in blender all over the place */
/* Paths starting with `//` will get the blend file as their base,
* this isn't standard in any OS but is used in blender all over the place. */
if (wasrelative) {
const char *lslash;
BLI_strncpy(base, basepath, sizeof(base));

View File

@ -100,8 +100,8 @@ void BLI_system_backtrace(FILE *fp)
# undef SIZE
# else
/* ------------------ */
/* non msvc/osx/linux */
/* --------------------- */
/* Non MSVC/Apple/Linux. */
(void)fp;
# endif
}

View File

@ -788,7 +788,7 @@ void bmo_create_grid_exec(BMesh *bm, BMOperator *op)
}
/**
* Fills first available UVmap with grid-like UVs for all faces OpFlag-ged by given flag.
* Fills first available UV-map with grid-like UV's for all faces with `oflag` set.
*
* \param bm: The BMesh to operate on
* \param x_segments: The x-resolution of the grid
@ -1131,7 +1131,7 @@ static void bm_mesh_calc_uvs_sphere_face(BMFace *f, const int cd_loop_uv_offset)
}
/**
* Fills first available UVmap with spherical projected UVs for all faces OpFlag-ged by given flag.
* Fills first available UV-map with spherical projected UVs for all faces with `oflag` set.
*
* \param bm: The BMesh to operate on
* \param oflag: The flag to check faces with.
@ -1344,7 +1344,7 @@ void bmo_create_circle_exec(BMesh *bm, BMOperator *op)
}
/**
* Fills first available UVmap with 2D projected UVs for all faces OpFlag-ged by given flag.
* Fills first available UV-map with 2D projected UVs for all faces with `oflag` set.
*
* \param bm: The BMesh to operate on.
* \param mat: The transform matrix applied to the created circle.
@ -1536,7 +1536,7 @@ void bmo_create_cone_exec(BMesh *bm, BMOperator *op)
}
/**
* Fills first available UVmap with cylinder/cone-like UVs for all faces OpFlag-ged by given flag.
* Fills first available UV-map with cylinder/cone-like UVs for all faces with `oflag` set.
*
* \param bm: The BMesh to operate on.
* \param mat: The transform matrix applied to the created cone/cylinder.
@ -1712,7 +1712,7 @@ void bmo_create_cube_exec(BMesh *bm, BMOperator *op)
}
/**
* Fills first available UVmap with cube-like UVs for all faces OpFlag-ged by given flag.
* Fills first available UV-map with cube-like UVs for all faces with `oflag` set.
*
* \note Expects tagged faces to be six quads.
* \note Caller must order faces for correct alignment.

View File

@ -53,7 +53,7 @@ DebugInfo::GroupStateMap DebugInfo::m_group_states;
static std::string operation_class_name(NodeOperation *op)
{
std::string full_name = typeid(*op).name();
/* Remove namespaces. */
/* Remove name-spaces. */
size_t pos = full_name.find_last_of(':');
BLI_assert(pos != std::string::npos);
return full_name.substr(pos + 1);

View File

@ -36,7 +36,7 @@ void NormalizeOperation::initExecution()
void NormalizeOperation::executePixel(float output[4], int x, int y, void *data)
{
/* using generic two floats struct to store x: min y: mult */
/* using generic two floats struct to store `x: min`, `y: multiply` */
NodeTwoFloats *minmult = (NodeTwoFloats *)data;
this->m_imageReader->read(output, x, y, nullptr);
@ -89,7 +89,7 @@ void *NormalizeOperation::initializeTileData(rcti *rect)
lockMutex();
if (this->m_cachedInstance == nullptr) {
MemoryBuffer *tile = (MemoryBuffer *)this->m_imageReader->initializeTileData(rect);
/* using generic two floats struct to store x: min y: mult */
/* using generic two floats struct to store `x: min`, `y: multiply`. */
NodeTwoFloats *minmult = new NodeTwoFloats();
float *buffer = tile->getBuffer();

View File

@ -36,7 +36,7 @@ class NormalizeOperation : public NodeOperation {
/**
* \brief temporarily cache of the execution storage
* it stores x->min and y->mult
* it stores `x->min` and `y->multiply`.
*/
NodeTwoFloats *m_cachedInstance;

View File

@ -432,7 +432,7 @@ void antialias_tagbuf(int xsize, int ysize, char *rectmove)
}
}
/* 2: evaluate horizontal scanlines and calculate alphas */
/* 2: evaluate horizontal scan-lines and calculate alphas. */
row1 = rectmove;
for (y = 0; y < ysize; y++) {
row1++;
@ -463,7 +463,7 @@ void antialias_tagbuf(int xsize, int ysize, char *rectmove)
}
}
/* 3: evaluate vertical scanlines and calculate alphas */
/* 3: evaluate vertical scan-lines and calculate alphas */
/* use for reading a copy of the original tagged buffer */
for (x = 0; x < xsize; x++) {
row1 = rectmove + x + xsize;

View File

@ -95,7 +95,7 @@ struct ViewLayer *DEG_get_evaluated_view_layer(const struct Depsgraph *graph);
/* Get evaluated version of object for given original one. */
struct Object *DEG_get_evaluated_object(const struct Depsgraph *depsgraph, struct Object *object);
/* Get evaluated version of given ID datablock. */
/* Get evaluated version of given ID data-block. */
struct ID *DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id);
/* Get evaluated version of data pointed to by RNA pointer */
@ -106,7 +106,7 @@ void DEG_get_evaluated_rna_pointer(const struct Depsgraph *depsgraph,
/* Get original version of object for given evaluated one. */
struct Object *DEG_get_original_object(struct Object *object);
/* Get original version of given evaluated ID datablock. */
/* Get original version of given evaluated ID data-block. */
struct ID *DEG_get_original_id(struct ID *id);
/* Check whether given ID is an original,
@ -122,7 +122,7 @@ bool DEG_is_original_object(const struct Object *object);
bool DEG_is_evaluated_id(const struct ID *id);
bool DEG_is_evaluated_object(const struct Object *object);
/* Check whether depsgraph os fully evaluated. This includes the following checks:
/* Check whether depsgraph is fully evaluated. This includes the following checks:
* - Relations are up-to-date.
* - Nothing is tagged for update. */
bool DEG_is_fully_evaluated(const struct Depsgraph *depsgraph);

View File

@ -289,7 +289,7 @@ class DepsgraphNodeBuilder : public DepsgraphBuilder {
* setting the current state. */
Collection *collection_;
/* Accumulated flag over the hierarchy of currently building collections.
* Denotes whether all the hierarchy from parent of collection_ to the
* Denotes whether all the hierarchy from parent of `collection_` to the
* very root is visible (aka not restricted.). */
bool is_parent_collection_visible_;

View File

@ -680,7 +680,7 @@ typedef struct EEVEE_GeometryMotionData {
int use_deform;
struct GPUBatch *batch; /* Batch for time = t. */
struct GPUVertBuf *vbo[2]; /* Vbo for time = t +/- step. */
struct GPUVertBuf *vbo[2]; /* VBO for time = t +/- step. */
} EEVEE_GeometryMotionData;
/* ************ EFFECTS DATA ************* */

View File

@ -144,7 +144,7 @@ void EEVEE_subsurface_output_init(EEVEE_ViewLayerData *UNUSED(sldata),
/* Clear texture.
* Due to the late initialization of the SSS it can happen that the `taa_current_sample` is
* already higher than one. This is noticeable when loading a file that has the diffuse light
* pass in look dev mode active. `texture_created` will make sure that newly created textures
* pass in look-dev mode active. `texture_created` will make sure that newly created textures
* are cleared. */
if (effects->taa_current_sample == 1 || texture_created) {
const float clear[4] = {0.0f, 0.0f, 0.0f, 0.0f};

View File

@ -278,7 +278,7 @@ vec3 probe_evaluate_grid(GridData gd, vec3 P, vec3 N, vec3 localpos)
float ws_dist_point_to_cell = length(ws_point_to_cell);
vec3 ws_light = ws_point_to_cell / ws_dist_point_to_cell;
/* Smooth backface test */
/* Smooth back-face test. */
float weight = saturate(dot(ws_light, N));
/* Precomputed visibility */

View File

@ -101,7 +101,7 @@ struct RayTraceParameters {
};
/* Returns true on hit. */
/* TODO: fclem remove the backface check and do it the SSR resolve code. */
/* TODO(fclem): remove the back-face check and do it the SSR resolve code. */
bool raytrace(Ray ray,
RayTraceParameters params,
const bool discard_backface,
@ -151,7 +151,7 @@ bool raytrace(Ray ray,
/* ... and above it with the added thickness. */
hit = hit && (delta > ss_p.z - ss_p.w || abs(delta) < abs(ssray.direction.z * stride * 2.0));
}
/* Discard backface hits. */
/* Discard back-face hits. */
hit = hit && !(discard_backface && prev_delta < 0.0);
/* Reject hit if background. */
hit = hit && (depth_sample != 1.0);

View File

@ -9,8 +9,8 @@ layout(location = 1) out vec4 lineOutput;
void main()
{
/* Manual backface cullling.. Not ideal for performance
* but needed for view clarity in xray mode and support
/* Manual back-face culling. Not ideal for performance
* but needed for view clarity in X-ray mode and support
* for inverted bone matrices. */
if ((inverted == 1) == gl_FrontFacing) {
discard;

View File

@ -24,7 +24,7 @@ void main()
workbench_float_pair_decode(mat_data.a, roughness, metallic);
#ifdef V3D_LIGHTING_MATCAP
/* When using matcaps, mat_data.a is the backface sign. */
/* When using matcaps, mat_data.a is the back-face sign. */
N = (mat_data.a > 0.0) ? N : -N;
fragColor.rgb = get_matcap_lighting(base_color, N, I);

View File

@ -701,7 +701,7 @@ BLI_INLINE void draw_select_buffer(DRWShadingGroup *shgroup,
int count = 1;
int tot = is_instancing ? GPU_vertbuf_get_vertex_len(batch->inst[0]) :
GPU_vertbuf_get_vertex_len(batch->verts[0]);
/* Hack : get "vbo" data without actually drawing. */
/* HACK: get VBO data without actually drawing. */
int *select_id = (void *)GPU_vertbuf_get_data(state->select_buf);
/* Batching */

View File

@ -4025,7 +4025,7 @@ static bool acf_nlaaction_setting_valid(bAnimContext *UNUSED(ac),
/* conditionally supported */
case ACHANNEL_SETTING_PINNED: /* pinned - map/unmap */
if ((adt) && (adt->flag & ADT_NLA_EDIT_ON)) {
/* this should only appear in tweakmode */
/* This should only appear in tweak-mode. */
return true;
}
else {
@ -5176,7 +5176,7 @@ void ANIM_channel_draw_widgets(const bContext *C,
}
/* step 3) draw special toggles .................................
* - in Graph Editor, checkboxes for visibility in curves area
* - in Graph Editor, check-boxes for visibility in curves area
* - in NLA Editor, glowing dots for solo/not solo...
* - in Grease Pencil mode, color swatches for layer color
*/

View File

@ -747,7 +747,7 @@ static bool animedit_poll_channels_active(bContext *C)
return 1;
}
/* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */
/* Poll callback for Animation Editor channels list region + not in NLA-tweak-mode for NLA. */
static bool animedit_poll_channels_nla_tweakmode_off(bContext *C)
{
ScrArea *area = CTX_wm_area(C);
@ -763,7 +763,7 @@ static bool animedit_poll_channels_nla_tweakmode_off(bContext *C)
return 0;
}
/* NLA TweakMode test */
/* NLA tweak-mode test. */
if (area->spacetype == SPACE_NLA) {
if ((scene == NULL) || (scene->flag & SCE_NLA_EDIT_ON)) {
return 0;

View File

@ -1172,7 +1172,7 @@ static void annotation_stroke_eraser_dostroke(tGPsdata *p,
((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) {
/* Check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
* - this assumes that line-width is irrelevant.
*/
if (gpencil_stroke_inside_circle(mval, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
if ((annotation_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) ||

View File

@ -1579,7 +1579,7 @@ static void gpencil_stroke_eraser_dostroke(tGPsdata *p,
((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) {
/* Check if point segment of stroke had anything to do with
* eraser region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
* - this assumes that line-width is irrelevant.
*/
if (gpencil_stroke_inside_circle(mval, radius, pc0[0], pc0[1], pc2[0], pc2[1])) {

View File

@ -910,7 +910,7 @@ static bool gpencil_vertexpaint_select_stroke(tGP_BrushVertexpaintData *gso,
((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) {
/* Check if point segment of stroke had anything to do with
* brush region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
* - this assumes that line-width is irrelevant.
*/
if (gpencil_stroke_inside_circle(gso->mval, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {

View File

@ -448,7 +448,7 @@ static void gpencil_weightpaint_select_stroke(tGP_BrushWeightpaintData *gso,
((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) {
/* Check if point segment of stroke had anything to do with
* brush region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
* - this assumes that line-width is irrelevant.
*/
if (gpencil_stroke_inside_circle(gso->mval, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {

View File

@ -245,7 +245,7 @@ enum {
#define UI_PANEL_BOX_STYLE_MARGIN (U.widget_unit * 0.2f)
/* but->drawflag - these flags should only affect how the button is drawn. */
/* NOTE: currently, these flags _are not passed_ to the widget's state() or draw() functions
/* NOTE: currently, these flags *are not passed* to the widget's state() or draw() functions
* (except for the 'align' ones)!
*/
enum {
@ -678,7 +678,7 @@ void UI_block_region_set(uiBlock *block, struct ARegion *region);
void UI_block_lock_set(uiBlock *block, bool val, const char *lockstr);
void UI_block_lock_clear(uiBlock *block);
/* automatic aligning, horiz or verical */
/* Automatic aligning, horizontal or vertical. */
void UI_block_align_begin(uiBlock *block);
void UI_block_align_end(uiBlock *block);

View File

@ -229,7 +229,7 @@ void ui_draw_but_TAB_outline(const rcti *rect,
{0.98, 0.805},
};
/* mult */
/* Multiply. */
for (a = 0; a < 4; a++) {
mul_v2_fl(vec[a], rad);
}

View File

@ -3268,7 +3268,7 @@ static bool ui_textedit_copypaste(uiBut *but, uiHandleButtonData *data, const in
}
#ifdef WITH_INPUT_IME
/* enable ime, and set up uibut ime data */
/* Enable IME, and setup #uiBut IME data. */
static void ui_textedit_ime_begin(wmWindow *win, uiBut *UNUSED(but))
{
/* XXX Is this really needed? */
@ -3284,7 +3284,7 @@ static void ui_textedit_ime_begin(wmWindow *win, uiBut *UNUSED(but))
wm_window_IME_begin(win, x, y, 0, 0, true);
}
/* disable ime, and clear uibut ime data */
/* Disable IME, and clear #uiBut IME data. */
static void ui_textedit_ime_end(wmWindow *win, uiBut *UNUSED(but))
{
wm_window_IME_end(win);

View File

@ -1519,7 +1519,7 @@ static void icon_draw_rect(float x,
draw_h = h;
draw_x += (w - draw_w) / 2;
}
/* if the image is squared, the draw_ initialization values are good */
/* If the image is squared, the `draw_*` initialization values are good. */
/* first allocate imbuf for scaling and copy preview into it */
ima = IMB_allocImBuf(rw, rh, 32, IB_rect);

View File

@ -4015,23 +4015,23 @@ static void curvemap_tools_dofunc(bContext *C, void *cumap_v, int event)
case UICURVE_FUNC_RESET_VIEW:
BKE_curvemapping_reset_view(cumap);
break;
case UICURVE_FUNC_HANDLE_VECTOR: /* set vector */
case UICURVE_FUNC_HANDLE_VECTOR: /* Set vector. */
BKE_curvemap_handle_set(cuma, HD_VECT);
BKE_curvemapping_changed(cumap, false);
break;
case UICURVE_FUNC_HANDLE_AUTO: /* set auto */
case UICURVE_FUNC_HANDLE_AUTO: /* Set auto. */
BKE_curvemap_handle_set(cuma, HD_AUTO);
BKE_curvemapping_changed(cumap, false);
break;
case UICURVE_FUNC_HANDLE_AUTO_ANIM: /* set auto-clamped */
case UICURVE_FUNC_HANDLE_AUTO_ANIM: /* Set auto-clamped. */
BKE_curvemap_handle_set(cuma, HD_AUTO_ANIM);
BKE_curvemapping_changed(cumap, false);
break;
case UICURVE_FUNC_EXTEND_HOZ: /* extend horiz */
case UICURVE_FUNC_EXTEND_HOZ: /* Extend horizontal. */
cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;
BKE_curvemapping_changed(cumap, false);
break;
case UICURVE_FUNC_EXTEND_EXP: /* extend extrapolate */
case UICURVE_FUNC_EXTEND_EXP: /* Extend extrapolate. */
cumap->flag |= CUMA_EXTEND_EXTRAPOLATE;
BKE_curvemapping_changed(cumap, false);
break;

View File

@ -701,7 +701,7 @@ int UI_calc_float_precision(int prec, double value)
/* Check on the number of decimal places need to display the number,
* this is so 0.00001 is not displayed as 0.00,
* _but_, this is only for small values si 10.0001 will not get the same treatment.
* _but_, this is only for small values as 10.0001 will not get the same treatment.
*/
value = fabs(value);
if ((value < pow10_neg[prec]) && (value > (1.0 / max_pow))) {

View File

@ -2088,7 +2088,7 @@ static void widget_draw_text(const uiFontStyle *fstyle,
but_pos_ofs = but->pos;
#ifdef WITH_INPUT_IME
/* if is ime compositing, move the cursor */
/* If is IME compositing, move the cursor. */
if (ime_data && ime_data->composite_len && ime_data->cursor_pos != -1) {
but_pos_ofs += ime_data->cursor_pos;
}
@ -2140,12 +2140,12 @@ static void widget_draw_text(const uiFontStyle *fstyle,
}
#ifdef WITH_INPUT_IME
/* ime cursor following */
/* IME cursor following. */
if (ime_reposition_window) {
ui_but_ime_reposition(but, ime_win_x, ime_win_y, false);
}
if (ime_data && ime_data->composite_len) {
/* composite underline */
/* Composite underline. */
widget_draw_text_ime_underline(fstyle, wcol, but, rect, ime_data, drawstr);
}
#endif

View File

@ -1745,7 +1745,7 @@ typedef struct v2dScrollerMove {
* This is a CUT DOWN VERSION of the 'real' version, which is defined in view2d.c,
* as we only need focus bubble info.
*
* \warning: The start of this struct must not change,
* \warning The start of this struct must not change,
* so that it stays in sync with the 'real' version.
* For now, we don't need to have a separate (internal) header for structs like this...
*/

View File

@ -6560,7 +6560,7 @@ enum {
typedef struct BMElemSort {
/** Sort factor */
float srt;
/** Original index of this element _in its mempool_ */
/** Original index of this element (in its #BLI_mempool). */
int org_idx;
} BMElemSort;

View File

@ -1539,8 +1539,8 @@ static void region_rect_recursive(
region->winx = BLI_rcti_size_x(&region->winrct) + 1;
region->winy = BLI_rcti_size_y(&region->winrct) + 1;
/* if region opened normally, we store this for hide/reveal usage */
/* prevent rounding errors for UI_DPI_FAC mult and divide */
/* If region opened normally, we store this for hide/reveal usage. */
/* Prevent rounding errors for UI_DPI_FAC multiply and divide. */
if (region->winx > 1) {
region->sizex = (region->winx + 0.5f) / UI_DPI_FAC;
}

View File

@ -2052,7 +2052,7 @@ static bool line_clip_rect2f(const rctf *cliprect,
float l2_clip[2])
{
/* first account for horizontal, then vertical lines */
/* horiz */
/* Horizontal. */
if (fabsf(l1[1] - l2[1]) < PROJ_PIXEL_TOLERANCE) {
/* is the line out of range on its Y axis? */
if (l1[1] < rect->ymin || l1[1] > rect->ymax) {

View File

@ -293,8 +293,8 @@ typedef struct SculptGestureContext {
/* These store the view origin and normal in world space, which is used in some gestures to
* generate geometry aligned from the view directly in world space. */
/* World space view origin and normal are not affected by object symmetry when doing symmetry
* passes, so there is no separate variables with the true_ prefix to store their original values
* without symmetry modifications. */
* passes, so there is no separate variables with the `true_` prefix to store their original
* values without symmetry modifications. */
float world_space_view_origin[3];
float world_space_view_normal[3];

View File

@ -239,7 +239,7 @@ static FileSelect file_select_do(bContext *C, int selected_idx, bool do_diropen)
}
/**
* \warning: loops over all files so better use cautiously
* \warning Loops over all files so better use cautiously.
*/
static bool file_is_any_selected(struct FileList *files)
{

View File

@ -2069,7 +2069,7 @@ void filelist_uid_unset(FileUID *r_uid)
}
/**
* \warning: The UID will only be valid for the current session. Use as runtime data only!
* \warning The UID will only be valid for the current session. Use as runtime data only!
*/
void filelist_file_cache_slidingwindow_set(FileList *filelist, size_t window_size)
{

View File

@ -288,14 +288,14 @@ static int mouse_nla_channels(
/* button region... */
if (x >= (v2d->cur.xmax - NLACHANNEL_BUTTON_WIDTH)) {
if (nlaedit_is_tweakmode_on(ac) == 0) {
/* 'push-down' action - only usable when not in TweakMode */
/* 'push-down' action - only usable when not in tweak-mode */
/* TODO: make this use the operator instead of calling the function directly
* however, calling the operator requires that we supply the args,
* and that works with proper buttons only */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(ale->id));
}
else {
/* when in tweakmode, this button becomes the toggle for mapped editing */
/* When in tweak-mode, this button becomes the toggle for mapped editing. */
adt->flag ^= ADT_NLA_EDIT_NOMAP;
}
@ -308,13 +308,13 @@ static int mouse_nla_channels(
/* NOTE: rest of NLA-Action name doubles for operating on the AnimData block
* - this is useful when there's no clear divider, and makes more sense in
* the case of users trying to use this to change actions
* - in tweakmode, clicking here gets us out of tweakmode, as changing selection
* while in tweakmode is really evil!
* - in tweak-mode, clicking here gets us out of tweak-mode, as changing selection
* while in tweak-mode is really evil!
* - we disable "solo" flags too, to make it easier to work with stashed actions
* with less trouble
*/
if (nlaedit_is_tweakmode_on(ac)) {
/* exit tweakmode immediately */
/* Exit tweak-mode immediately. */
nlaedit_disable_tweakmode(ac, true);
/* changes to NLA-Action occurred */
@ -515,7 +515,7 @@ static int nlachannels_pushdown_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
/* 'push-down' action - only usable when not in TweakMode */
/* 'push-down' action - only usable when not in Tweak-mode. */
BKE_nla_action_pushdown(adt, ID_IS_OVERRIDE_LIBRARY(id));
struct Main *bmain = CTX_data_main(C);

View File

@ -135,7 +135,7 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
for (ale = anim_data.first; ale; ale = ale->next) {
AnimData *adt = ale->data;
/* try entering tweakmode if valid */
/* Try entering tweak-mode if valid. */
ok |= BKE_nla_tweakmode_enter(adt);
/* mark the active track as being "solo"? */
@ -154,9 +154,8 @@ static int nlaedit_enable_tweakmode_exec(bContext *C, wmOperator *op)
ANIM_animdata_update(&ac, &anim_data);
ANIM_animdata_freelist(&anim_data);
/* if we managed to enter tweakmode on at least one AnimData block,
* set the flag for this in the active scene and send notifiers
*/
/* If we managed to enter tweak-mode on at least one AnimData block,
* set the flag for this in the active scene and send notifiers. */
if (ac.scene && ok) {
/* set editing flag */
ac.scene->flag |= SCE_NLA_EDIT_ON;
@ -206,7 +205,7 @@ void NLA_OT_tweakmode_enter(wmOperatorType *ot)
/** \name Disable Tweak-Mode Operator
* \{ */
/* NLA Editor internal API function for exiting tweakmode */
/* NLA Editor internal API function for exiting tweak-mode. */
bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
{
ListBase anim_data = {NULL, NULL};
@ -232,7 +231,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
BKE_nlatrack_solo_toggle(adt, NULL);
}
/* to be sure that we're doing everything right, just exit tweakmode... */
/* To be sure that we're doing everything right, just exit tweak-mode. */
BKE_nla_tweakmode_exit(adt);
ale->update |= ANIM_UPDATE_DEPS;
@ -242,7 +241,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
ANIM_animdata_update(ac, &anim_data);
ANIM_animdata_freelist(&anim_data);
/* if we managed to enter tweakmode on at least one AnimData block,
/* if we managed to enter tweak-mode on at least one AnimData block,
* set the flag for this in the active scene and send notifiers
*/
if (ac->scene) {
@ -257,7 +256,7 @@ bool nlaedit_disable_tweakmode(bAnimContext *ac, bool do_solo)
return true;
}
/* exit tweakmode operator callback */
/* Exit tweak-mode operator callback. */
static int nlaedit_disable_tweakmode_exec(bContext *C, wmOperator *op)
{
bAnimContext ac;

View File

@ -39,17 +39,16 @@
/* ************************** poll callbacks for operators **********************************/
/* tweakmode is NOT enabled */
/* Tweak-mode is NOT enabled. */
bool nlaop_poll_tweakmode_off(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
* 1) active editor must be NLA
* 2) tweakmode is currently set as a 'per-scene' flag
* 2) tweak-mode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
* but not all AnimData blocks will be in tweakmode for
* various reasons
* but not all AnimData blocks will be in tweak-mode for various reasons.
*/
if (ED_operator_nla_active(C) == 0) {
return 0;
@ -63,17 +62,16 @@ bool nlaop_poll_tweakmode_off(bContext *C)
return 1;
}
/* tweakmode IS enabled */
/* Tweak-mode IS enabled. */
bool nlaop_poll_tweakmode_on(bContext *C)
{
Scene *scene;
/* for now, we check 2 things:
* 1) active editor must be NLA
* 2) tweakmode is currently set as a 'per-scene' flag
* 2) tweak-mode is currently set as a 'per-scene' flag
* so that it will affect entire NLA data-sets,
* but not all AnimData blocks will be in tweakmode for
* various reasons
* but not all AnimData blocks will be in tweak-mode for various reasons.
*/
if (ED_operator_nla_active(C) == 0) {
return 0;
@ -87,7 +85,7 @@ bool nlaop_poll_tweakmode_on(bContext *C)
return 1;
}
/* is tweakmode enabled - for use in NLA operator code */
/* is tweak-mode enabled - for use in NLA operator code */
bool nlaedit_is_tweakmode_on(bAnimContext *ac)
{
if (ac && ac->scene) {

View File

@ -453,7 +453,7 @@ static void nlaedit_select_leftright(bContext *C,
Scene *scene = ac->scene;
float xmin, xmax;
/* if currently in tweakmode, exit tweakmode first */
/* if currently in tweak-mode, exit tweak-mode first */
if (scene->flag & SCE_NLA_EDIT_ON) {
WM_operator_name_call(C, "NLA_OT_tweakmode_exit", WM_OP_EXEC_DEFAULT, NULL);
}
@ -612,7 +612,7 @@ static int mouse_nla_strips(bContext *C,
nlaedit_strip_at_region_position(ac, mval[0], mval[1], &ale, &strip);
/* if currently in tweakmode, exit tweakmode before changing selection states
/* if currently in tweak-mode, exit tweak-mode before changing selection states
* now that we've found our target...
*/
if (scene->flag & SCE_NLA_EDIT_ON) {

View File

@ -38,9 +38,9 @@ namespace blender::ed::spreadsheet {
* Definition for the component->attribute-domain hierarchy.
* Constructed at compile time.
*
* \warning: Order of attribute-domains matters! It __must__ match the #AttributeDomain definition
* and fill gaps with unset optionals (i.e. `std::nullopt`). Would be nice to use array
* designators for this (which C++ doesn't support).
* \warning Order of attribute-domains matters! It __must__ match the #AttributeDomain
* definition and fill gaps with unset optionals (i.e. `std::nullopt`). Would be nice to use
* array designators for this (which C++ doesn't support).
*/
constexpr DatasetComponentLayoutInfo DATASET_layout_hierarchy[] = {
{

View File

@ -535,7 +535,7 @@ static void iter_snap_objects(SnapObjectContext *sctx,
* \{ */
/* Store all ray-hits
* Support for storing all depths, not just the first (raycast 'all') */
* Support for storing all depths, not just the first (ray-cast 'all'). */
struct RayCastAll_Data {
void *bvhdata;
@ -626,7 +626,7 @@ static bool raycast_tri_backface_culling_test(
return dot_v3v3(no, dir) < 0.0f;
}
/* Callback to raycast with backface culling (Mesh). */
/* Callback to ray-cast with back-face culling (#Mesh). */
static void mesh_looptri_raycast_backface_culling_cb(void *userdata,
int index,
const BVHTreeRay *ray,
@ -653,7 +653,7 @@ static void mesh_looptri_raycast_backface_culling_cb(void *userdata,
}
}
/* Callback to raycast with backface culling (EditMesh). */
/* Callback to ray-cast with back-face culling (#EditMesh). */
static void editmesh_looptri_raycast_backface_culling_cb(void *userdata,
int index,
const BVHTreeRay *ray,

View File

@ -2154,7 +2154,7 @@ static void p_collapse_cost_vertex(PVert *vert, float *r_mincost, PEdge **r_mine
static void p_chart_post_collapse_flush(PChart *chart, PEdge *collapsed)
{
/* move to collapsed_ */
/* Move to `collapsed_*`. */
PVert *v, *nextv = NULL, *verts = chart->verts;
PEdge *e, *nexte = NULL, *edges = chart->edges, *laste = NULL;
@ -2224,7 +2224,7 @@ static void p_chart_post_collapse_flush(PChart *chart, PEdge *collapsed)
static void p_chart_post_split_flush(PChart *chart)
{
/* move from collapsed_ */
/* Move from `collapsed_*`. */
PVert *v, *nextv = NULL;
PEdge *e, *nexte = NULL;
@ -2259,7 +2259,7 @@ static void p_chart_post_split_flush(PChart *chart)
static void p_chart_simplify_compute(PChart *chart)
{
/* Computes a list of edge collapses / vertex splits. The collapsed
* simplices go in the chart->collapsed_* lists, The original and
* simplices go in the `chart->collapsed_*` lists, The original and
* collapsed may then be view as stacks, where the next collapse/split
* is at the top of the respective lists. */

View File

@ -514,7 +514,7 @@ class Stroke : public Interface1D {
return _id;
}
/** The different blending modes available to similate the interaction media-medium. */
/** The different blending modes available to simulate the interaction media-medium. */
typedef enum {
DRY_MEDIUM, /**< To simulate a dry medium such as Pencil or Charcoal. */
HUMID_MEDIUM, /**< To simulate ink painting (color subtraction blending). */

View File

@ -365,8 +365,8 @@ static void detect_workarounds()
(strstr(version, "Build 20.19.15.4285"))) {
GCaps.use_main_context_workaround = true;
}
/* See T70187: merging vertices fail. This has been tested from 18.2.2 till 19.3.0~dev of the
* Mesa driver */
/* See T70187: merging vertices fail. This has been tested from `18.2.2` till `19.3.0~dev`
* of the Mesa driver */
if (GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_UNIX, GPU_DRIVER_OPENSOURCE) &&
(strstr(version, "Mesa 18.") || strstr(version, "Mesa 19.0") ||
strstr(version, "Mesa 19.1") || strstr(version, "Mesa 19.2"))) {

View File

@ -72,7 +72,7 @@ class GLDrawList : public DrawList {
GLuint buffer_id_;
/** Length of whole the buffer (in byte). */
GLsizeiptr buffer_size_;
/** Offset of data_ inside the whole buffer (in byte). */
/** Offset of `data_` inside the whole buffer (in byte). */
GLintptr data_offset_;
/** To free the buffer_id_. */

View File

@ -74,8 +74,9 @@ typedef struct ParticleSpring {
/* Child particles are created around or between parent particles */
typedef struct ChildParticle {
/** Num is face index on the final derived mesh. */
int num, parent;
/** Face index on the final derived mesh. */
int num;
int parent;
/** Nearest particles to the child, used for the interpolation. */
int pa[4];
/** Interpolation weights for the above particles. */

View File

@ -144,7 +144,7 @@ typedef struct PointCache {
#define PTCACHE_FRAMES_SKIPPED (1 << 8)
#define PTCACHE_EXTERNAL (1 << 9)
#define PTCACHE_READ_INFO (1 << 10)
/** don't use the filename of the blendfile the data is linked from (write a local cache) */
/** Don't use the filename of the blend-file the data is linked from (write a local cache). */
#define PTCACHE_IGNORE_LIBPATH (1 << 11)
/**
* High resolution cache is saved for smoke for backwards compatibility,

View File

@ -297,7 +297,7 @@ static int rna_NlaStrip_action_editable(PointerRNA *ptr, const char **UNUSED(r_i
{
NlaStrip *strip = (NlaStrip *)ptr->data;
/* strip actions shouldn't be editable if NLA tweakmode is on */
/* Strip actions shouldn't be editable if NLA tweak-mode is on. */
if (ptr->owner_id) {
AnimData *adt = BKE_animdata_from_id(ptr->owner_id);

View File

@ -2136,7 +2136,7 @@ static void rna_SpaceDopeSheetEditor_action_update(bContext *C, PointerRNA *ptr)
return;
}
/* Exit editmode first - we cannot change actions while in tweakmode. */
/* Exit editmode first - we cannot change actions while in tweak-mode. */
BKE_nla_tweakmode_exit(adt);
/* To prevent data loss (i.e. if users flip between actions using the Browse menu),

View File

@ -229,7 +229,7 @@ def sort(props_list, sort_priority):
def file_basename(input_filename):
# if needed will use os.path
# If needed will use `os.path`.
if input_filename.endswith(".txt"):
if input_filename.endswith("_work.txt"):
base_filename = input_filename.replace("_work.txt", "")

View File

@ -81,9 +81,11 @@ static void copy_spline_domain_attributes(const CurveComponent &curve_component,
});
}
/* Get the offsets for the splines whose endpoints we want to output. Filter those which are cylic,
* or that evaluate to empty. Could be easily adapted to include a selection argument to support
* attribute selection. */
/**
* Get the offsets for the splines whose endpoints we want to output.
* Filter those which are cyclic, or that evaluate to empty.
* Could be easily adapted to include a selection argument to support attribute selection.
*/
static blender::Vector<int> get_endpoint_spline_offsets(Span<SplinePtr> splines)
{
blender::Vector<int> spline_offsets;

View File

@ -484,7 +484,10 @@ int WM_event_absolute_delta_y(const struct wmEvent *event)
* \{ */
#ifdef WITH_INPUT_IME
/* most os using ctrl/oskey + space to switch ime, avoid added space */
/**
* Most OS's use `Ctrl+Space` / `OsKey+Space` to switch IME,
* so don't type in the space character.
*/
bool WM_event_is_ime_switch(const struct wmEvent *event)
{
return event->val == KM_PRESS && event->type == EVT_SPACEKEY &&