Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2019-06-12 09:04:10 +10:00
parent 8ce93ef6ae
commit 6529d20d79
132 changed files with 331 additions and 326 deletions

@ -138,7 +138,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
const char *result = _PyUnicode_AsString(py_str);
if (result) {
/* 99% of the time this is enough but we better support non unicode
* chars since blender doesnt limit this.
* chars since blender doesn't limit this.
*/
return result;
}
@ -151,7 +151,7 @@ static const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
return PyBytes_AS_STRING(*coerce);
}
else {
/* Clear the error, so Cycles can be at leadt used without
/* Clear the error, so Cycles can be at least used without
* GPU and OSL support,
*/
PyErr_Clear();

@ -226,7 +226,7 @@ ccl_device float bssrdf_burley_eval(const float d, float r)
if (r >= Rm)
return 0.0f;
/* Burley refletance profile, equation (3).
/* Burley reflectance profile, equation (3).
*
* NOTES:
* - Surface albedo is already included into sc->weight, no need to

@ -377,9 +377,9 @@ ccl_device_inline void camera_sample(KernelGlobals *kg,
const int shutter_table_offset = kernel_data.cam.shutter_table_offset;
ray->time = lookup_table_read(kg, time, shutter_table_offset, SHUTTER_TABLE_SIZE);
/* TODO(sergey): Currently single rolling shutter effect type only
* where scanlines are acquired from top to bottom and whole scanline
* where scan-lines are acquired from top to bottom and whole scanline
* is acquired at once (no delay in acquisition happens between pixels
* of single scanline).
* of single scan-line).
*
* Might want to support more models in the future.
*/

@ -71,8 +71,9 @@ ccl_device_inline void kernel_write_pass_float_variance(ccl_global float *buffer
{
kernel_write_pass_float(buffer, value);
/* The online one-pass variance update that's used for the megakernel can't easily be implemented
* with atomics, so for the split kernel the E[x^2] - 1/N * (E[x])^2 fallback is used. */
/* The online one-pass variance update that's used for the mega-kernel can't easily be
* implemented with atomics,
* so for the split kernel the E[x^2] - 1/N * (E[x])^2 fallback is used. */
kernel_write_pass_float(buffer + 1, value * value);
}

@ -314,7 +314,7 @@ enum PathRayFlag {
/* Ray is to be terminated, but continue with transparent bounces and
* emission as long as we encounter them. This is required to make the
* MIS between direct and indirect light rays match, as shadow rays go
* through transparent surfaces to reach emisison too. */
* through transparent surfaces to reach emission too. */
PATH_RAY_TERMINATE_AFTER_TRANSPARENT = (1 << 21),
/* Ray is to be terminated. */
PATH_RAY_TERMINATE = (PATH_RAY_TERMINATE_IMMEDIATE | PATH_RAY_TERMINATE_AFTER_TRANSPARENT),
@ -1148,7 +1148,7 @@ typedef struct KernelCamera {
ProjectionTransform worldtondc;
Transform worldtocamera;
/* Stores changes in the projeciton matrix. Use for camera zoom motion
/* Stores changes in the projection matrix. Use for camera zoom motion
* blur and motion pass output for perspective camera. */
ProjectionTransform perspective_pre;
ProjectionTransform perspective_post;

@ -184,8 +184,8 @@ bool Session::draw_gpu(BufferParams &buffer_params, DeviceDrawParams &draw_param
/* then verify the buffers have the expected size, so we don't
* draw previous results in a resized window */
if (!buffer_params.modified(display->params)) {
/* for CUDA we need to do tonemapping still, since we can
* only access GL buffers from the main thread */
/* for CUDA we need to do tone-mapping still, since we can
* only access GL buffers from the main thread. */
if (gpu_need_tonemap) {
thread_scoped_lock buffers_lock(buffers_mutex);
tonemap(tile_manager.state.sample);

@ -317,7 +317,7 @@ void QuadDice::dice(SubPatch &sub, EdgeFactors &ef)
int Mu = max(ef.tu0, ef.tu1);
int Mv = max(ef.tv0, ef.tv1);
#if 0 /* Doesnt work very well, especially at grazing angles. */
#if 0 /* Doesn't work very well, especially at grazing angles. */
float S = scale_factor(sub, ef, Mu, Mv);
#else
float S = 1.0f;

@ -198,7 +198,7 @@ ccl_device void math_trimatrix_cholesky(ccl_global float *A, int n, int stride)
}
/* Solve A*S=y for S given A and y,
* where A is symmetrical positive-semidefinite and both inputs are destroyed in the process.
* where A is symmetrical positive-semi-definite and both inputs are destroyed in the process.
*
* We can apply Cholesky decomposition to find a lower triangular L so that L*Lt = A.
* With that we get (L*Lt)*S = L*(Lt*S) = L*b = y, defining b as Lt*S.

@ -243,7 +243,7 @@ vector<int> distribute_threads_on_nodes(const int num_threads)
if (num_active_group_processors >= num_threads) {
/* If the current thread is set up in a way that its affinity allows to
* use at least requested number of threads we do not explicitly set
* affinity to the worker therads.
* affinity to the worker threads.
* This way we allow users to manually edit affinity of the parent
* thread, and here we follow that affinity. This way it's possible to
* have two Cycles/Blender instances running manually set to a different
@ -254,7 +254,7 @@ vector<int> distribute_threads_on_nodes(const int num_threads)
vector<int> num_per_node_processors;
get_per_node_num_processors(&num_per_node_processors);
if (num_per_node_processors.size() == 0) {
/* Error was already repported, here we can't do anything, so we simply
/* Error was already reported, here we can't do anything, so we simply
* leave default affinity to all the worker threads. */
return thread_nodes;
}

@ -446,8 +446,8 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
***************************************************************************************/
/**
* Sets 3D mouse deadzone
* \param deadzone Deadzone of the 3D mouse (both for rotation and pan) relative to full range
* Sets 3D mouse dead-zone.
* \param deadzone: Dead-zone of the 3D mouse (both for rotation and pan) relative to full range.
*/
extern void GHOST_setNDOFDeadZone(float deadzone);
#endif

@ -89,7 +89,7 @@ class GHOST_DropTargetWin32 : public IDropTarget {
/* Internal helper functions */
/**
* Base the effect on those allowed by the dropsource.
* Base the effect on those allowed by the drop-source.
* \param dwAllowed Drop sources allowed drop effect.
* \return The allowed drop effect.
*/

@ -957,7 +957,7 @@ GHOST_TWindowState GHOST_WindowX11::getState() const
state = icccmGetState();
/*
* In the Iconic and Withdrawn state, the window
* is unmaped, so only need return a Minimized state.
* is unmapped, so only need return a Minimized state.
*/
if ((state == IconicState) || (state == WithdrawnState))
state_ret = GHOST_kWindowStateMinimized;

@ -170,7 +170,7 @@ void BKE_animdata_fix_paths_rename_all(struct ID *ref_id,
const char *newName);
/* Fix the path after removing elements that are not ID (e.g., node).
* Returen truth if any animation data was affected. */
* Return true if any animation data was affected. */
bool BKE_animdata_fix_paths_remove(struct ID *id, const char *path);
/* -------------------------------------- */

@ -38,7 +38,8 @@ struct Object;
struct Scene;
struct ViewLayer;
struct bArmature;
/* NOTE: bakeModifier() called from UI: needs to create new datablocks, hence the need for this. */
/* NOTE: bakeModifier() called from UI:
* needs to create new databloc-ks, hence the need for this. */
struct bContext;
struct bGPDframe;
struct bGPDlayer;
@ -159,11 +160,11 @@ typedef struct GpencilModifierTypeInfo {
struct bGPDframe *gpf);
/**
* Bake-down GP modifier's effects into the GP datablock.
* Bake-down GP modifier's effects into the GP data-block.
*
* This gets called when the user clicks the "Apply" button in the UI.
* As such, this callback needs to go through all layers/frames in the
* datablock, mutating the geometry and/or creating new datablocks/objects
* data-block, mutating the geometry and/or creating new data-blocks/objects
*/
void (*bakeModifier)(struct Main *bmain,
struct Depsgraph *depsgraph,
@ -175,7 +176,7 @@ typedef struct GpencilModifierTypeInfo {
/**
* Callback for GP "time" modifiers that offset keyframe time
* Returns the frame number to be used after apply the modifier. This is
* usually an offset of the animation for duplicated datablocks.
* usually an offset of the animation for duplicated data-blocks.
*
* This function is optional.
*/
@ -243,9 +244,9 @@ typedef struct GpencilModifierTypeInfo {
/**
* Should call the given walk function with a pointer to each ID
* pointer (i.e. each datablock pointer) that the modifier data
* pointer (i.e. each data-block pointer) that the modifier data
* stores. This is used for linking on file load and for
* unlinking datablocks or forwarding datablock references.
* unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.

@ -293,9 +293,9 @@ typedef struct ModifierTypeInfo {
void *userData);
/* Should call the given walk function with a pointer to each ID
* pointer (i.e. each datablock pointer) that the modifier data
* pointer (i.e. each data-block pointer) that the modifier data
* stores. This is used for linking on file load and for
* unlinking datablocks or forwarding datablock references.
* unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.
@ -317,14 +317,14 @@ typedef struct ModifierTypeInfo {
TexWalkFunc walk,
void *userData);
/* Free given runtime data.
/* Free given run-time data.
*
* This data is coming from a modifier of the corresponding type, but actual
* modifier data is not known here.
*
* Notes:
* - The data itself is to be de-allocated as well.
* - This calback is allowed to receive NULL pointer as a data, so it's
* - This callback is allowed to receive NULL pointer as a data, so it's
* more like "ensure the data is freed".
*/
void (*freeRuntimeData)(void *runtime_data);

@ -103,7 +103,7 @@ typedef struct SPHData {
struct EdgeHash *eh;
float *gravity;
float hfac;
/* Average distance to neighbours (other particles in the support domain),
/* Average distance to neighbors (other particles in the support domain),
* for calculating the Courant number (adaptive time step). */
int pass;
float element_size;
@ -263,7 +263,7 @@ BLI_INLINE float psys_frand(ParticleSystem *psys, unsigned int seed)
/* XXX far from ideal, this simply scrambles particle random numbers a bit
* to avoid obvious correlations.
* Can't use previous psys->frand arrays because these require initialization
* inside psys_check_enabled, which wreaks havok in multithreaded depgraph updates.
* inside psys_check_enabled, which wreaks havoc in multi-threaded depgraph updates.
*/
unsigned int offset = PSYS_FRAND_SEED_OFFSET[psys->seed % PSYS_FRAND_COUNT];
unsigned int multiplier = PSYS_FRAND_SEED_MULTIPLIER[psys->seed % PSYS_FRAND_COUNT];

@ -153,9 +153,9 @@ typedef struct ShaderFxTypeInfo {
void *userData);
/* Should call the given walk function with a pointer to each ID
* pointer (i.e. each datablock pointer) that the effect data
* pointer (i.e. each data-block pointer) that the effect data
* stores. This is used for linking on file load and for
* unlinking datablocks or forwarding datablock references.
* unlinking data-blocks or forwarding data-block references.
*
* This function is optional. If it is not present, foreachObjectLink
* will be used.

@ -1679,7 +1679,7 @@ static void editbmesh_calc_modifier_final_normals(const Mesh *mesh_input,
if (!do_loop_normals) {
BKE_mesh_ensure_normals_for_display(mesh_final);
/* Some modifiers, like datatransfer, may generate those data, we do not want to keep them,
/* Some modifiers, like data-transfer, may generate those data, we do not want to keep them,
* as they are used by display code when available (i.e. even if autosmooth is disabled). */
if (CustomData_has_layer(&mesh_final->ldata, CD_NORMAL)) {
CustomData_free_layers(&mesh_final->ldata, CD_NORMAL, mesh_final->totloop);

@ -284,7 +284,7 @@ void BKE_animdata_free(ID *id, const bool do_id_user)
/* Copying -------------------------------------------- */
/**
* Make a copy of the given AnimData - to be used when copying datablocks.
* Make a copy of the given AnimData - to be used when copying data-blocks.
* \param flag: Control ID pointers management,
* see LIB_ID_CREATE_.../LIB_ID_COPY_... flags in BKE_library.h
* \return The copied animdata.
@ -464,7 +464,7 @@ static bool animpath_matches_basepath(const char path[], const char basepath[])
/* Move F-Curves in src action to dst action, setting up all the necessary groups
* for this to happen, but only if the F-Curves being moved have the appropriate
* "base path".
* - This is used when data moves from one datablock to another, causing the
* - This is used when data moves from one data-block to another, causing the
* F-Curves to need to be moved over too
*/
void action_move_fcurves_by_basepath(bAction *srcAct, bAction *dstAct, const char basepath[])
@ -638,7 +638,7 @@ void BKE_animdata_separate_by_basepath(Main *bmain, ID *srcID, ID *dstID, ListBa
* they will get picked up by the dependency system.
*
* \param C: Context pointer - for getting active data
* \param[in,out] ptr: RNA pointer for property's datablock.
* \param[in,out] ptr: RNA pointer for property's data-block.
* May be modified as result of path remapping.
* \param prop: RNA definition of property to add for
* \return MEM_alloc'd string representing the path to the property from the given #PointerRNA
@ -3260,7 +3260,7 @@ void nlastrip_evaluate(Depsgraph *depsgraph,
* we tag the current strip as being evaluated, and clear this when we leave.
*/
/* TODO: be careful with this flag, since some edit tools may be running and have
* set this while animplayback was running */
* set this while animation playback was running. */
if (strip->flag & NLASTRIP_FLAG_EDIT_TOUCHED) {
return;
}
@ -3524,7 +3524,7 @@ static bool animsys_evaluate_nla(Depsgraph *depsgraph,
dummy_strip->extendmode = adt->act_extendmode;
}
/* Unless extendmode is Nothing (might be useful for flattening NLA evaluation),
/* Unless extend-mode is Nothing (might be useful for flattening NLA evaluation),
* disable range. */
if (dummy_strip->extendmode != NLASTRIP_EXTEND_NOTHING) {
dummy_strip->flag |= NLASTRIP_FLAG_NO_TIME_MAP;
@ -3938,7 +3938,7 @@ void BKE_animsys_evaluate_all_animation(Main *main,
* - this is like EVAL_ANIM_IDS, but this handles the case "embedded nodetrees"
* (i.e. scene/material/texture->nodetree) which we need a special exception
* for, otherwise they'd get skipped
* - ntp = "node tree parent" = datablock where node tree stuff resides
* - ntp = "node tree parent" = data-block where node tree stuff resides
*/
#define EVAL_ANIM_NODETREE_IDS(first, NtId_Type, aflag) \
for (id = first; id; id = id->next) { \
@ -3956,7 +3956,7 @@ void BKE_animsys_evaluate_all_animation(Main *main,
(void)0
/* optimization:
* when there are no actions, don't go over database and loop over heaps of datablocks,
* when there are no actions, don't go over database and loop over heaps of data-blocks,
* which should ultimately be empty, since it is not possible for now to have any animation
* without some actions, and drivers wouldn't get affected by any state changes
*

@ -362,7 +362,7 @@ static void setup_app_data(bContext *C,
if (mode == LOAD_UNDO) {
/* In undo/redo case, we do a whole lot of magic tricks to avoid having to re-read linked
* datablocks from libraries (since those are not supposed to change). Unfortunately, that
* data-blocks from libraries (since those are not supposed to change). Unfortunately, that
* means that we do not reset their user count, however we do increase that one when doing
* lib_link on local IDs using linked ones.
* There is no real way to predict amount of changes here, so we have to fully redo
@ -782,13 +782,13 @@ bool BKE_blendfile_write_partial(Main *bmain_src,
/* Backup paths because remap relative will overwrite them.
*
* NOTE: we do this only on the list of datablocks that we are writing
* NOTE: we do this only on the list of data-blocks that we are writing
* because the restored full list is not guaranteed to be in the same
* order as before, as expected by BKE_bpath_list_restore.
*
* This happens because id_sort_by_name does not take into account
* string case or the library name, so the order is not strictly
* defined for two linked datablocks with the same name! */
* defined for two linked data-blocks with the same name! */
if (write_flags & G_FILE_RELATIVE_REMAP) {
path_list_backup = BKE_bpath_list_backup(bmain_dst, path_list_flag);
}

@ -5098,7 +5098,7 @@ static bConstraint *add_new_constraint_internal(const char *name, short type)
const bConstraintTypeInfo *cti = BKE_constraint_typeinfo_from_type(type);
const char *newName;
/* Set up a generic constraint datablock */
/* Set up a generic constraint data-block. */
con->type = type;
con->flag |= CONSTRAINT_EXPAND | CONSTRAINT_STATICOVERRIDE_LOCAL;
con->enforce = 1.0f;

@ -2298,7 +2298,7 @@ static CustomDataLayer *customData_add_layer__internal(CustomData *data,
int flag = 0, index = data->totlayer;
void *newlayerdata = NULL;
/* Passing a layerdata to copy from with an alloctype that won't copy is
/* Passing a layer-data to copy from with an alloctype that won't copy is
* most likely a bug */
BLI_assert(!layerdata || (alloctype == CD_ASSIGN) || (alloctype == CD_DUPLICATE) ||
(alloctype == CD_REFERENCE));

@ -90,8 +90,10 @@ void BKE_object_data_transfer_dttypes_to_cdmask(const int dtdata_types,
}
}
/* Check what can do each layer type
* (if it is actually handled by transferdata, if it supports advanced mixing... */
/**
* Check what can do each layer type
* (if it is actually handled by transfer-data, if it supports advanced mixing.
*/
bool BKE_object_data_transfer_get_dttypes_capacity(const int dtdata_types,
bool *r_advanced_mixing,
bool *r_threshold)

@ -2687,7 +2687,7 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
if (fabsf(v1[1] - v4[1]) < FLT_EPSILON && fabsf(v2[1] - v3[1]) < FLT_EPSILON &&
fabsf(v3[1] - v4[1]) < FLT_EPSILON) {
/* Optimisation: If all the handles are flat/at the same values,
/* Optimization: If all the handles are flat/at the same values,
* the value is simply the shared value (see T40372 -> F91346)
*/
cvalue = v1[1];

@ -1418,7 +1418,7 @@ static float eval_fmodifier_influence(FModifier *fcm, float evaltime)
* several times by modifiers requesting the time be modified, as the final result
* would have required using the modified time
* - modifiers only ever receive the unmodified time, as subsequent modifiers should be
* working on the 'global' result of the modified curve, not some localised segment,
* working on the 'global' result of the modified curve, not some localized segment,
* so nevaltime gets set to whatever the last time-modifying modifier likes...
* - we start from the end of the stack, as only the last one matters for now
*

@ -4907,10 +4907,10 @@ static void image_user_id_eval_animation(struct Image *ima,
void BKE_image_user_id_eval_animation(Depsgraph *depsgraph, ID *id)
{
/* This is called from the dependency graph to update the image
* users in datablocks. It computes the current frame number
* users in data-blocks. It computes the current frame number
* and tags the image to be refreshed.
* This does not consider nested node trees as these are handled
* as their own datablock. */
* as their own data-block. */
bool skip_nested_nodes = true;
image_walk_id_all_users(id, skip_nested_nodes, depsgraph, image_user_id_eval_animation);
}

@ -933,7 +933,7 @@ static const char *particle_adrcodes_to_paths(int adrcode, int *array_index)
* and 'root' parts of path.
*
* Input:
* - id - the datablock that the curve's IPO block
* - id - the data-block that the curve's IPO block
* is attached to and/or which the new paths will start from
* - blocktype, adrcode - determines setting to get
* - actname, constname, seq - used to build path
@ -1934,12 +1934,12 @@ static void nlastrips_to_animdata(ID *id, ListBase *strips)
/* Called from do_versions() in readfile.c to convert the old 'IPO/adrcode' system
* to the new 'Animato/RNA' system.
*
* The basic method used here, is to loop over datablocks which have IPO-data, and
* add those IPO's to new AnimData blocks as Actions.
* The basic method used here, is to loop over data-blocks which have IPO-data,
* and add those IPO's to new AnimData blocks as Actions.
* Action/NLA data only works well for Objects, so these only need to be checked for there.
*
* Data that has been converted should be freed immediately, which means that it is immediately
* clear which datablocks have yet to be converted, and also prevent freeing errors when we exit.
* clear which data-blocks have yet to be converted, and also prevent freeing errors when we exit.
*/
// XXX currently done after all file reading...
void do_versions_ipos_to_animato(Main *bmain)

@ -243,7 +243,7 @@ void BKE_view_layer_free_ex(ViewLayer *view_layer, const bool do_id_user)
}
/**
* Tag all the selected objects of a renderlayer
* Tag all the selected objects of a render-layer.
*/
void BKE_view_layer_selected_objects_tag(ViewLayer *view_layer, const int tag)
{

@ -329,7 +329,7 @@ void BKE_id_copy_ensure_local(Main *bmain, const ID *old_id, ID *new_id)
}
/**
* Generic 'make local' function, works for most of datablock types...
* Generic 'make local' function, works for most of data-block types...
*/
void BKE_id_make_local_generic(Main *bmain,
ID *id,
@ -609,7 +609,7 @@ bool BKE_id_copy_is_allowed(const ID *id)
}
/**
* Generic entry point for copying a datablock (new API).
* Generic entry point for copying a data-block (new API).
*
* \note Copy is only affecting given data-block
* (no ID used by copied one will be affected, besides usercount).
@ -619,7 +619,7 @@ bool BKE_id_copy_is_allowed(const ID *id)
* \note Usercount of new copy is always set to 1.
*
* \param bmain: Main database, may be NULL only if LIB_ID_CREATE_NO_MAIN is specified.
* \param id: Source datablock.
* \param id: Source data-block.
* \param r_newid: Pointer to new (copied) ID pointer.
* \param flag: Set of copy options, see DNA_ID.h enum for details
* (leave to zero for default, full copy).
@ -876,7 +876,7 @@ bool id_single_user(bContext *C, ID *id, PointerRNA *ptr, PropertyRNA *prop)
RNA_property_pointer_set(ptr, prop, idptr, NULL);
RNA_property_update(C, ptr, prop);
/* tag grease pencil datablock and disable onion */
/* tag grease pencil data-block and disable onion */
if (GS(id->name) == ID_GD) {
DEG_id_tag_update(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
DEG_id_tag_update(newid, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
@ -920,7 +920,7 @@ static int libblock_management_us_min(void *UNUSED(user_data),
return IDWALK_RET_NOP;
}
/** Add a 'NO_MAIN' datablock to given main (also sets usercounts of its IDs if needed). */
/** Add a 'NO_MAIN' data-block to given main (also sets usercounts of its IDs if needed). */
void BKE_libblock_management_main_add(Main *bmain, void *idv)
{
ID *id = idv;
@ -950,7 +950,7 @@ void BKE_libblock_management_main_add(Main *bmain, void *idv)
BKE_main_unlock(bmain);
}
/** Remove a datablock from given main (set it to 'NO_MAIN' status). */
/** Remove a data-block from given main (set it to 'NO_MAIN' status). */
void BKE_libblock_management_main_remove(Main *bmain, void *idv)
{
ID *id = idv;
@ -1121,7 +1121,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
/* *********** ALLOC AND FREE *****************
*
* BKE_libblock_free(ListBase *lb, ID *id )
* provide a list-basis and datablock, but only ID is read
* provide a list-basis and data-block, but only ID is read
*
* void *BKE_libblock_alloc(ListBase *lb, type, name)
* inserts in list and returns a new ID
@ -1129,7 +1129,7 @@ void BKE_main_lib_objects_recalc_all(Main *bmain)
* **************************** */
/**
* Get allocation size fo a given datablock type and optionally allocation name.
* Get allocation size fo a given data-block type and optionally allocation name.
*/
size_t BKE_libblock_get_alloc_info(short type, const char **name)
{
@ -1369,7 +1369,7 @@ void BKE_libblock_init_empty(ID *id)
}
}
/** Generic helper to create a new empty datablock of given type in given \a bmain database.
/** Generic helper to create a new empty data-block of given type in given \a bmain database.
*
* \param name: can be NULL, in which case we get default name for this ID type. */
void *BKE_id_new(Main *bmain, const short type, const char *name)
@ -1387,7 +1387,7 @@ void *BKE_id_new(Main *bmain, const short type, const char *name)
}
/**
* Generic helper to create a new temporary empty datablock of given type,
* Generic helper to create a new temporary empty data-block of given type,
* *outside* of any Main database.
*
* \param name: can be NULL, in which case we get default name for this ID type. */
@ -1566,7 +1566,7 @@ static ID *is_dupid(ListBase *lb, ID *id, const char *name)
*
* Normally the ID that's being check is already in the ListBase, so ID *id
* points at the new entry. The Python Library module needs to know what
* the name of a datablock will be before it is appended; in this case ID *id
* the name of a data-block will be before it is appended; in this case ID *id
* id is NULL
*/
@ -1760,7 +1760,7 @@ void id_clear_lib_data_ex(Main *bmain, ID *id, const bool id_in_mainlist)
}
}
/* Internal bNodeTree blocks inside datablocks also stores id->lib,
/* Internal bNodeTree blocks inside data-blocks also stores id->lib,
* make sure this stays in sync. */
if ((ntree = ntreeFromID(id))) {
id_clear_lib_data_ex(bmain, &ntree->id, false); /* Datablocks' nodetree is never in Main. */
@ -1906,11 +1906,11 @@ static void library_make_local_copying_check(ID *id,
BLI_gset_remove(loop_tags, id, NULL);
}
/** Make linked datablocks local.
/** Make linked data-blocks local.
*
* \param bmain: Almost certainly global main.
* \param lib: If not NULL, only make local datablocks from this library.
* \param untagged_only: If true, only make local datablocks not tagged with
* \param lib: If not NULL, only make local data-blocks from this library.
* \param untagged_only: If true, only make local data-blocks not tagged with
* LIB_TAG_PRE_EXISTING. \param set_fake: If true, set fake user on all localized data-blocks
* (except group and objects ones).
*/
@ -1947,12 +1947,12 @@ void BKE_library_make_local(Main *bmain,
TIMEIT_VALUE_PRINT(make_local);
#endif
/* Step 1: Detect datablocks to make local. */
/* Step 1: Detect data-blocks to make local. */
for (int a = set_listbasepointers(bmain, lbarray); a--;) {
ID *id = lbarray[a]->first;
/* Do not explicitly make local non-linkable IDs (shapekeys, in fact),
* they are assumed to be handled by real datablocks responsible of them. */
* they are assumed to be handled by real data-blocks responsible of them. */
const bool do_skip = (id && !BKE_idcode_is_linkable(GS(id->name)));
for (; id; id = id->next) {
@ -2000,11 +2000,11 @@ void BKE_library_make_local(Main *bmain,
}
#ifdef DEBUG_TIME
printf("Step 1: Detect datablocks to make local: Done.\n");
printf("Step 1: Detect data-blocks to make local: Done.\n");
TIMEIT_VALUE_PRINT(make_local);
#endif
/* Step 2: Check which datablocks we can directly make local
/* Step 2: Check which data-blocks we can directly make local
* (because they are only used by already, or future, local data),
* others will need to be duplicated. */
GSet *loop_tags = BLI_gset_ptr_new(__func__);
@ -2019,7 +2019,7 @@ void BKE_library_make_local(Main *bmain,
BKE_main_relations_free(bmain);
#ifdef DEBUG_TIME
printf("Step 2: Check which datablocks we can directly make local: Done.\n");
printf("Step 2: Check which data-blocks we can directly make local: Done.\n");
TIMEIT_VALUE_PRINT(make_local);
#endif
@ -2385,7 +2385,7 @@ static int id_order_compare(const void *a, const void *b)
}
/**
* Returns ordered list of datablocks for display in the UI.
* Returns ordered list of data-blocks for display in the UI.
* Result is list of LinkData of IDs that must be freed.
*/
void BKE_id_ordered_list(ListBase *ordered_lb, const ListBase *lb)

@ -1073,7 +1073,7 @@ FOREACH_FINALIZE:
#undef FOREACH_CALLBACK_INVOKE
/**
* Loop over all of the ID's this datablock links to.
* Loop over all of the ID's this data-block links to.
*/
void BKE_library_foreach_ID_link(
Main *bmain, ID *id, LibraryIDLinkCallback callback, void *user_data, int flag)
@ -1096,7 +1096,7 @@ void BKE_library_update_ID_link_user(ID *id_dst, ID *id_src, const int cb_flag)
}
/**
* Say whether given \a id_type_owner can use (in any way) a datablock of \a id_type_used.
* Say whether given \a id_type_owner can use (in any way) a data-block of \a id_type_used.
*
* This is a 'simplified' abstract version of #BKE_library_foreach_ID_link() above,
* quite useful to reduce* useless iterations in some cases.
@ -1123,7 +1123,7 @@ bool BKE_library_id_can_use_idtype(ID *id_owner, const short id_type_used)
}
if (BKE_animdata_from_id(id_owner)) {
/* AnimationData can use virtually any kind of datablocks, through drivers especially. */
/* AnimationData can use virtually any kind of data-blocks, through drivers especially. */
return true;
}
@ -1409,11 +1409,11 @@ static int foreach_libblock_used_linked_data_tag_clear_cb(void *user_data,
/**
* Detect orphaned linked data blocks (i.e. linked data not used (directly or indirectly)
* in any way by any local data), including complex cases like 'linked archipelagoes', i.e.
* linked datablocks that use each other in loops,
* linked data-blocks that use each other in loops,
* which prevents their deletion by 'basic' usage checks.
*
* \param do_init_tag: if \a true, all linked data are checked, if \a false,
* only linked datablocks already tagged with #LIB_TAG_DOIT are checked.
* only linked data-blocks already tagged with #LIB_TAG_DOIT are checked.
*/
void BKE_library_unused_linked_data_set_tag(Main *bmain, const bool do_init_tag)
{
@ -1445,12 +1445,12 @@ void BKE_library_unused_linked_data_set_tag(Main *bmain, const bool do_init_tag)
}
/**
* Untag linked data blocks used by other untagged linked datablocks.
* Used to detect datablocks that we can forcefully make local
* Untag linked data blocks used by other untagged linked data-blocks.
* Used to detect data-blocks that we can forcefully make local
* (instead of copying them to later get rid of original):
* All datablocks we want to make local are tagged by caller,
* after this function has ran caller knows datablocks still tagged can directly be made local,
* since they are only used by other datablocks that will also be made fully local.
* All data-blocks we want to make local are tagged by caller,
* after this function has ran caller knows data-blocks still tagged can directly be made local,
* since they are only used by other data-blocks that will also be made fully local.
*/
void BKE_library_indirectly_used_data_tag_clear(Main *bmain)
{

@ -266,8 +266,8 @@ static int foreach_libblock_remap_callback(void *user_data, ID *id_self, ID **id
}
if (cb_flag & IDWALK_CB_USER) {
/* NOTE: We don't user-count IDs which are not in the main database.
* This is because in certain conditions we can have datablocks in
* the main which are referencing datablocks outside of it.
* This is because in certain conditions we can have data-blocks in
* the main which are referencing data-blocks outside of it.
* For example, BKE_mesh_new_from_object() called on an evaluated
* object will cause such situation.
*/
@ -409,7 +409,7 @@ static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new
}
/**
* Execute the 'data' part of the remapping (that is, all ID pointers from other ID datablocks).
* Execute the 'data' part of the remapping (that is, all ID pointers from other ID data-blocks).
*
* Behavior differs depending on whether given \a id is NULL or not:
* - \a id NULL: \a old_id must be non-NULL, \a new_id may be NULL (unlinking \a old_id) or not
@ -419,14 +419,14 @@ static void libblock_remap_data_postprocess_nodetree_update(Main *bmain, ID *new
* - \a id is non-NULL:
* + If \a old_id is NULL, \a new_id must also be NULL,
* and all ID pointers from \a id are cleared
* (i.e. \a id does not references any other datablock anymore).
* (i.e. \a id does not references any other data-block anymore).
* + If \a old_id is non-NULL, behavior is as with a NULL \a id, but only within given \a id.
*
* \param bmain: the Main data storage to operate on (must never be NULL).
* \param id: the datablock to operate on
* \param id: the data-block to operate on
* (can be NULL, in which case we operate over all IDs from given bmain).
* \param old_id: the datablock to dereference (may be NULL if \a id is non-NULL).
* \param new_id: the new datablock to replace \a old_id references with (may be NULL).
* \param old_id: the data-block to dereference (may be NULL if \a id is non-NULL).
* \param new_id: the new data-block to replace \a old_id references with (may be NULL).
* \param r_id_remap_data: if non-NULL, the IDRemap struct to use
* (uselful to retrieve info about remapping process).
*/

@ -60,7 +60,7 @@ void *BKE_lightprobe_add(Main *bmain, const char *name)
}
/**
* Only copy internal data of LightProbe ID from source
* Only copy internal data of #LightProbe ID from source
* to already allocated/initialized destination.
* You probably never want to use that directly,
* use #BKE_id_copy or #BKE_id_copy_ex for typical needs.

@ -483,7 +483,7 @@ ListBase *which_libbase(Main *bmain, short type)
int set_listbasepointers(Main *bmain, ListBase **lb)
{
/* BACKWARDS! also watch order of free-ing! (mesh<->mat), first items freed last.
* This is important because freeing data decreases usercounts of other datablocks,
* This is important because freeing data decreases user-counts of other data-blocks,
* if this data is its self freed it can crash. */
lb[INDEX_ID_LI] = &(
bmain->libraries); /* Libraries may be accessed from pretty much any other ID... */

@ -31,6 +31,7 @@
* This file is admittedly a bit confusticated,
* in quite few areas speed was chosen over readability,
* though it is commented - so shouldn't be so hard to see what's going on.
*
* Implementation:
*
* To rasterize the mask its converted into geometry that use a ray-cast for each pixel lookup.

@ -1515,7 +1515,7 @@ static void movieclip_build_proxy_ibuf(
scaleibuf->planes = 24;
}
/* TODO: currently the most weak part of multithreaded proxies,
/* TODO: currently the most weak part of multi-threaded proxies,
* could be solved in a way that thread only prepares memory
* buffer and write to disk happens separately
*/

@ -2314,7 +2314,7 @@ static void multires_sync_levels(Scene *scene, Object *ob_src, Object *ob_dst)
if (!mmd_src) {
/* object could have MDISP even when there is no multires modifier
* this could lead to troubles due to i've got no idea how mdisp could be
* upsampled correct without modifier data.
* up-sampled correct without modifier data.
* just remove mdisps if no multires present (nazgul) */
multires_customdata_delete(ob_src->data);

@ -1856,7 +1856,7 @@ bool BKE_nla_action_stash(AnimData *adt)
BLI_assert(nlt != NULL);
/* We need to ensure that if there wasn't any previous instance,
* it must go to tbe bottom of the stack. */
* it must go to be bottom of the stack. */
if (prev_track == NULL) {
BLI_remlink(&adt->nla_tracks, nlt);
BLI_addhead(&adt->nla_tracks, nlt);

@ -139,7 +139,7 @@ void BKE_object_eval_transform_final(Depsgraph *depsgraph, Object *ob)
{
DEG_debug_print_eval(depsgraph, __func__, ob->id.name, ob);
/* Make sure inverse matrix is always up to date. This way users of it
* do not need to worry about relcalculating it. */
* do not need to worry about recalculating it. */
invert_m4_m4(ob->imat, ob->obmat);
/* Set negative scale flag in object. */
if (is_negative_m4(ob->obmat)) {

@ -1031,7 +1031,7 @@ static void pbvh_update_normals_accum_task_cb(void *__restrict userdata,
if (bvh->verts[v].flag & ME_VERT_PBVH_UPDATE) {
/* Note: This avoids `lock, add_v3_v3, unlock`
* and is five to ten times quicker than a spinlock.
* and is five to ten times quicker than a spin-lock.
* Not exact equivalent though, since atomicity is only ensured for one component
* of the vector at a time, but here it shall not make any sensible difference. */
for (int k = 3; k--;) {

@ -1664,8 +1664,8 @@ struct FastNodeBuildInfo {
/**
* Recursively split the node if it exceeds the leaf_limit.
* This function is multithreadabe since each invocation applies
* to a sub part of the arrays
* This function is multi-threadabe since each invocation applies
* to a sub part of the arrays.
*/
static void pbvh_bmesh_node_limit_ensure_fast(
PBVH *bvh, BMFace **nodeinfo, BBC *bbc_array, struct FastNodeBuildInfo *node, MemArena *arena)

@ -3341,7 +3341,7 @@ int BKE_ptcache_write(PTCacheID *pid, unsigned int cfra)
return !error;
}
/* youll need to close yourself after!
/* you'll need to close yourself after!
* mode - PTCACHE_CLEAR_ALL,
*/

@ -40,7 +40,9 @@
#include "BKE_scene.h"
#include "BKE_main.h"
/* ***************************** Sequencer cache design notes ******************************
/**
* Sequencer Cache Design Notes
* ============================
*
* Cache key members:
* is_temp_cache - this cache entry will be freed before rendering next frame
@ -50,8 +52,8 @@
*
* Linking: We use links to reduce number of iterations needed to manage cache.
* Entries are linked in order as they are put into cache.
* Only pernament (is_temp_cache = 0) cache entries are linked.
* Putting SEQ_CACHE_STORE_FINAL_OUT will reset linking
* Only permanent (is_temp_cache = 0) cache entries are linked.
* Putting #SEQ_CACHE_STORE_FINAL_OUT will reset linking
*
* Function:
* All images created during rendering are added to cache, even if the cache is already full.

@ -347,7 +347,7 @@ void BKE_sequencer_free_clipboard(void)
* note that these pointers should _never_ be access in the sequencer,
* they are only for storage while in the clipboard
* notice 'newid' is used for temp pointer storage here, validate on access (this is safe usage,
* since those datablocks are fully out of Main lists).
* since those data-blocks are fully out of Main lists).
*/
#define ID_PT (*id_pt)
static void seqclipboard_ptr_free(Main *UNUSED(bmain), ID **id_pt)
@ -406,7 +406,7 @@ static void seqclipboard_ptr_restore(Main *bmain, ID **id_pt)
}
}
/* Replace with pointer to actual datablock. */
/* Replace with pointer to actual data-block. */
seqclipboard_ptr_free(bmain, id_pt);
ID_PT = id_restore;
}

@ -952,7 +952,7 @@ static void free_softbody_intern(SoftBody *sb)
*
* it actually checks if the particle intrudes a short range force field generated
* by the faces of the target object and returns a force to drive the particel out
* the strength of the field grows exponetially if the particle is on the 'wrong' side of the face
* the strength of the field grows exponentially if the particle is on the 'wrong' side of the face
* 'wrong' side : projection to the face normal is negative (all referred to a vertex in the face)
*
* flaw of this: 'fast' particles as well as 'fast' colliding faces
@ -962,7 +962,7 @@ static void free_softbody_intern(SoftBody *sb)
* besides our h is way larger than in QM because forces propagate way slower here
* we have to deal with fuzzy(time) in the range of 1/25 seconds (typical frame rate)
* yup collision targets are not known here any better
* and 1/25 second is looong compared to real collision events
* and 1/25 second is very long compared to real collision events
* Q: why not use 'simple' collision here like bouncing back a particle
* --> reverting is velocity on the face normal
* A: because our particles are not alone here
@ -1707,11 +1707,10 @@ static int sb_detect_vertex_collisionCached(float opco[3],
copy_v3_v3(nv3, mvert[vt->tri[2]].co);
if (mprevvert) {
/* grab the average speed of the collider vertices
* before we spoil nvX
/* Grab the average speed of the collider vertices before we spoil nvX
* humm could be done once a SB steps but then we' need to store that too
* since the AABB reduced propabitlty to get here drasticallly
* it might be a nice tradeof CPU <--> memory
* since the AABB reduced probability to get here drastically
* it might be a nice tradeoff CPU <--> memory.
*/
sub_v3_v3v3(vv1, nv1, mprevvert[vt->tri[0]].co);
sub_v3_v3v3(vv2, nv2, mprevvert[vt->tri[1]].co);

@ -71,16 +71,16 @@ BLI_INLINE void sound_verify_evaluated_id(ID *id)
UNUSED_VARS_NDEBUG(id);
/* This is a bit tricky and not quite reliable, but good enough check.
*
* We don't want audio system handles to be allocated on amn original datablocks, and only want
* them to be allocated on a datablocks which are result of dependency graph evaluation.
* We don't want audio system handles to be allocated on an original data-blocks, and only want
* them to be allocated on a data-blocks which are result of dependency graph evaluation.
*
* Datablocks which are covered by a copy-on-write system of dependency graph will have
* LIB_TAG_COPIED_ON_WRITE tag set on them. But if some of datablocks during its evaluation
* Data-blocks which are covered by a copy-on-write system of dependency graph will have
* LIB_TAG_COPIED_ON_WRITE tag set on them. But if some of data-blocks during its evaluation
* decides to re-allocate it's nested one (for example, object evaluation could re-allocate mesh
* when evaluating modifier stack). Such datablocks will have LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT
* tag set on them.
* when evaluating modifier stack). Such data-blocks will have
* LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT tag set on them.
*
* Additionally, we also allow datablocks outside of main database. Those can not be "original"
* Additionally, we also allow data-blocks outside of main database. Those can not be "original"
* and could be used as a temporary evaluated result during operations like baking.
*
* NOTE: We conder ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */
@ -608,7 +608,7 @@ void *BKE_sound_add_scene_sound(
Scene *scene, Sequence *sequence, int startframe, int endframe, int frameskip)
{
sound_verify_evaluated_id(&scene->id);
/* Happens when sequence's sound datablock was removed. */
/* Happens when sequence's sound data-block was removed. */
if (sequence->sound == NULL) {
return NULL;
}

@ -61,7 +61,7 @@ typedef struct ConverterStorage {
*/
int *manifold_vertex_index;
/* Indexed by vertex index from mesh, corresponds to whether this vertex has
* infinite sharpness due to non-manifol topology.
* infinite sharpness due to non-manifold topology.
*/
BLI_bitmap *infinite_sharp_vertices_map;
/* Reverse mapping to above. */

@ -2294,7 +2294,7 @@ static struct PBVH *ccgDM_getPBVH(Object *ob, DerivedMesh *dm)
}
if (ob->sculpt->pbvh) {
/* Note that we have to clean up exisitng pbvh instead of updating it in case it does not
/* Note that we have to clean up existing pbvh instead of updating it in case it does not
* match current grid_pbvh status. */
const PBVHType pbvh_type = BKE_pbvh_type(ob->sculpt->pbvh);
if (grid_pbvh) {
@ -3016,7 +3016,7 @@ struct DerivedMesh *subsurf_make_derived_from_derived(struct DerivedMesh *dm,
* subsurf structure in order to save computation time since
* re-creation is rather a complicated business.
*
* TODO(sergey): There was a good eason why final calculation
* TODO(sergey): There was a good reason why final calculation
* used to free entirely cached subsurf structure. reason of
* this is to be investigated still to be sure we don't have
* regressions here.

@ -2019,7 +2019,7 @@ static void txt_undo_add_unprefix_op(Text *text,
* 4 bytes */
txt_undo_store_uint32(utxt->buf, &utxt->pos, line_index_mask_len);
/* Adding linenumbers of lines that shall not be indented if undoing.
/* Adding line-numbers of lines that shall not be indented if undoing.
* 'line_index_mask_len * 4' bytes */
for (idata = line_index_mask->first; idata; idata = idata->next) {
txt_undo_store_uint32(utxt->buf, &utxt->pos, idata->value);

@ -38,7 +38,7 @@
* sin, cos, tan, asin, acos, atan, atan2,
* exp, log, sqrt, pow, fmod
*
* The implementation has no global state and can be used multithreaded.
* The implementation has no global state and can be used multi-threaded.
*/
#include <math.h>

@ -506,7 +506,7 @@ float dist_to_line_v3(const float p[3], const float l1[3], const float l2[3])
*
* \param axis_ref: used when v1,v2,v3 form a line and to check if the corner is concave/convex.
*
* \note the distance from \a v1 & \a v3 to \a v2 doesnt matter
* \note the distance from \a v1 & \a v3 to \a v2 doesn't matter
* (it just defines the planes).
*
* \return the lowest squared distance to either of the planes.

@ -625,7 +625,7 @@ void mul_m2v2(const float mat[2][2], float vec[2])
mul_v2_m2v2(vec, mat, vec);
}
/* same as mul_m4_v3() but doesnt apply translation component */
/** Same as #mul_m4_v3() but doesn't apply translation component. */
void mul_mat3_m4_v3(const float mat[4][4], float vec[3])
{
const float x = vec[0];

@ -632,7 +632,7 @@ static unsigned int scanfill(ScanFillContext *sf_ctx, PolyFill *pf, const int fl
ed2 = ed1->next;
/* commented out... the ESC here delivers corrupted memory
* (and doesnt work during grab) */
* (and doesn't work during grab). */
/* if (callLocalInterruptCallBack()) break; */
if (totface >= maxface) {
/* printf("Fill error: endless loop. Escaped at vert %d, tot: %d.\n", a, verts); */

@ -167,8 +167,8 @@ void BLI_string_flip_side_name(char *r_name,
/* We first check the case with a .### extension, let's find the last period */
if (isdigit(r_name[len - 1])) {
index = strrchr(r_name, '.'); // last occurrence
if (index && isdigit(index[1])) { // doesnt handle case bone.1abc2 correct..., whatever!
index = strrchr(r_name, '.'); /* last occurrence. */
if (index && isdigit(index[1])) { /* doesn't handle case bone.1abc2 correct..., whatever! */
if (strip_number == false) {
BLI_strncpy(number, index, name_len);
}

@ -495,7 +495,7 @@ void BLI_spin_lock(SpinLock *spin)
#elif defined(_MSC_VER)
while (InterlockedExchangeAcquire(spin, 1)) {
while (*spin) {
/* Spinlock hint for processors with hyperthreading. */
/* Spin-lock hint for processors with hyperthreading. */
YieldProcessor();
}
}

@ -18,7 +18,7 @@
* \ingroup blenloader
*
* Utils to check/validate a Main is in sane state,
* only checks relations between datablocks and libraries for now.
* only checks relations between data-blocks and libraries for now.
*
* \note Does not *fix* anything, only reports found errors.
*/
@ -77,7 +77,7 @@ bool BLO_main_validate_libraries(Main *bmain, ReportList *reports)
for (Main *curmain = bmain->next; curmain != NULL; curmain = curmain->next) {
Library *curlib = curmain->curlib;
if (curlib == NULL) {
BKE_report(reports, RPT_ERROR, "Library database with NULL library datablock!");
BKE_report(reports, RPT_ERROR, "Library database with NULL library data-block!");
continue;
}

@ -129,7 +129,7 @@ void BLO_blendhandle_print_sizes(BlendHandle *bh, void *fp)
}
/**
* Gets the names of all the datablocks in a file of a certain type
* Gets the names of all the data-blocks in a file of a certain type
* (e.g. all the scene names in a file).
*
* \param bh: The blendhandle to access.
@ -161,7 +161,7 @@ LinkNode *BLO_blendhandle_get_datablock_names(BlendHandle *bh, int ofblocktype,
}
/**
* Gets the previews of all the datablocks in a file of a certain type
* Gets the previews of all the data-blocks in a file of a certain type
* (e.g. all the scene previews in a file).
*
* \param bh: The blendhandle to access.
@ -251,7 +251,7 @@ LinkNode *BLO_blendhandle_get_previews(BlendHandle *bh, int ofblocktype, int *to
}
/**
* Gets the names of all the linkable datablock types available in a file.
* Gets the names of all the linkable data-block types available in a file.
* (e.g. "Scene", "Mesh", "Light", etc.).
*
* \param bh: The blendhandle to access.
@ -357,7 +357,7 @@ BlendFileData *BLO_read_from_memory(const void *mem,
* (assuming their data are already loaded & valid).
*
* \param oldmain: old main,
* from which we will keep libraries and other datablocks that should not have changed.
* from which we will keep libraries and other data-blocks that should not have changed.
* \param filename: current file, only for retrieving library data.
*/
BlendFileData *BLO_read_from_memfile(Main *oldmain,
@ -439,7 +439,7 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
#endif
}
}
/* In any case, we need to move all lib datablocks themselves - those are
/* In any case, we need to move all lib data-blocks themselves - those are
* 'first level data', getting rid of them would imply updating spaces & co
* to prevent invalid pointers access. */
BLI_movelisttolist(&newmain->libraries, &oldmain->libraries);

@ -212,7 +212,7 @@
* - link all LibBlocks and indirect pointers to libblocks
* - initialize #FileGlobal and copy pointers to #Global
*
* \note Still a weak point is the new-address function, that doesnt solve reading from
* \note Still a weak point is the new-address function, that doesn't solve reading from
* multiple files at the same time.
* (added remark: oh, i thought that was solved? will look at that... (ton).
*/
@ -676,8 +676,8 @@ static Main *blo_find_main(FileData *fd, const char *filepath, const char *relab
m = BKE_main_new();
BLI_addtail(mainlist, m);
/* Add library datablock itself to 'main' Main, since libraries are **never** linked data.
* Fixes bug where you could end with all ID_LI datablocks having the same name... */
/* Add library data-block itself to 'main' Main, since libraries are **never** linked data.
* Fixes bug where you could end with all ID_LI data-blocks having the same name... */
lib = BKE_libblock_alloc(mainlist->first, ID_LI, BLI_path_basename(filepath), 0);
lib->id.us = ID_FAKE_USERS(
lib); /* Important, consistency with main ID reading code from read_libblock(). */
@ -9488,8 +9488,8 @@ static void lib_link_all(FileData *fd, Main *main)
BLO_main_validate_shapekeys(main, NULL);
if (fd->memfile != NULL) {
/* When doing redo, we perform a tremendous amount of esoterics magic tricks to avoid having to
* re-read all library datablocks.
/* When doing redo, we perform a tremendous amount of esoteric magic tricks to avoid having to
* re-read all library data-blocks.
* Unfortunately, that means that we do not clear Collections' parents lists, which then get
* improperly extended in some cases by lib_link_scene() and lib_link_collection() calls above
* (when ome local collection is parent of linked ones).
@ -9810,7 +9810,7 @@ static void sort_bhead_old_map(FileData *fd)
static BHead *find_previous_lib(FileData *fd, BHead *bhead)
{
/* skip library datablocks in undo, see comment in read_libblock */
/* Skip library data-blocks in undo, see comment in read_libblock. */
if (fd->memfile) {
return NULL;
}
@ -11680,7 +11680,7 @@ static void read_library_linked_ids(FileData *basefd,
/* BLI_assert(*realid != NULL); */
/* Now that we have a real ID, replace all pointers to placeholders in
* fd->libmap with pointers to the real datablocks. We do this for all
* fd->libmap with pointers to the real data-blocks. We do this for all
* libraries since multiple might be referencing this ID. */
change_link_placeholder_to_real_ID_pointer(mainlist, basefd, id, *realid);
@ -11785,11 +11785,11 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
BLO_main_expander(expand_doit_library);
/* At this point the base blend file has been read, and each library blend
* encountered so far has a main with placeholders for linked datablocks.
* encountered so far has a main with placeholders for linked data-blocks.
*
* Now we will read the library blend files and replace the placeholders
* with actual datablocks. We loop over library mains multiple times in
* case a library needs to link additional datablocks from another library
* with actual data-blocks. We loop over library mains multiple times in
* case a library needs to link additional data-blocks from another library
* that had been read previously. */
while (do_it) {
do_it = false;
@ -11797,10 +11797,10 @@ static void read_libraries(FileData *basefd, ListBase *mainlist)
/* Loop over mains of all library blend files encountered so far. Note
* this list gets longer as more indirectly library blends are found. */
for (Main *mainptr = mainl->next; mainptr; mainptr = mainptr->next) {
/* Does this library have any more linked datablocks we need to read? */
/* Does this library have any more linked data-blocks we need to read? */
if (has_linked_ids_to_read(mainptr)) {
#if 0
printf("Reading linked datablocks from %s (%s)\n",
printf("Reading linked data-blocks from %s (%s)\n",
mainptr->curlib->id.name,
mainptr->curlib->name);
#endif

@ -1198,7 +1198,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (bGPdata *gpd = bmain->gpencils.first; gpd; gpd = gpd->id.next) {
bool enabled = false;
/* Ensure that the datablock's onionskinning toggle flag
/* Ensure that the datablock's onion-skinning toggle flag
* stays in sync with the status of the actual layers
*/
for (bGPDlayer *gpl = gpd->layers.first; gpl; gpl = gpl->next) {

@ -784,7 +784,7 @@ void do_versions_after_linking_280(Main *bmain)
}
/* We need to assign lib pointer to generated hidden collections *after* all have been created,
* otherwise we'll end up with several datablocks sharing same name/library,
* otherwise we'll end up with several data-blocks sharing same name/library,
* which is FORBIDDEN!
* Note: we need this to be recursive,
* since a child collection may be sorted before its parent in bmain. */

@ -35,7 +35,7 @@
* _ = 4 byte pointer, - = 8 byte pointer
* </pre>
*
* datablocks: (also see struct #BHead).
* data-blocks: (also see struct #BHead).
* <pre>
* <bh.code> 4 chars
* <bh.len> int, len data after BHead
@ -2354,7 +2354,7 @@ static void write_light(WriteData *wd, Light *la)
static void write_collection_nolib(WriteData *wd, Collection *collection)
{
/* Shared function for collection datablocks and scene master collection. */
/* Shared function for collection data-blocks and scene master collection. */
write_previews(wd, collection->preview);
for (CollectionObject *cob = collection->gobject.first; cob; cob = cob->next) {
@ -3779,7 +3779,7 @@ static bool write_file_handle(Main *mainvar,
NULL :
BKE_override_static_operations_store_initialize();
/* This outer loop allows to save first datablocks from real mainvar,
/* This outer loop allows to save first data-blocks from real mainvar,
* then the temp ones from override process,
* if needed, without duplicating whole code. */
Main *bmain = mainvar;

@ -856,7 +856,7 @@ void BM_editselection_normal(BMEditSelection *ese, float r_normal[3])
add_v3_v3v3(r_normal, eed->v1->no, eed->v2->no);
sub_v3_v3v3(plane, eed->v2->co, eed->v1->co);
/* the 2 vertex normals will be close but not at rightangles to the edge
/* the 2 vertex normals will be close but not at right angles to the edge
* for rotate about edge we want them to be at right angles, so we need to
* do some extra calculation to correct the vert normals,
* we need the plane for this */

@ -368,7 +368,7 @@ typedef struct BMVertsCalcNormalsData {
const float (*edgevec)[3];
const float (*vcos)[3];
/* Read-write data, protected by an atomic-based fake spinlock-like system... */
/* Read-write data, protected by an atomic-based fake spin-lock like system. */
float (*vnos)[3];
} BMVertsCalcNormalsData;
@ -412,7 +412,7 @@ static void mesh_verts_calc_normals_accum_cb(void *userdata, MempoolIterData *mp
float *v_no = data->vnos ? data->vnos[BM_elem_index_get(l_iter->v)] : l_iter->v->no;
/* This block is a lockless threadsafe madd_v3_v3fl.
* It uses the first float of the vector as a sort of cheap spinlock,
* It uses the first float of the vector as a sort of cheap spin-lock,
* assuming FLT_MAX is a safe 'illegal' value that cannot be set here otherwise.
* It also assumes that collisions between threads are highly unlikely,
* else performances would be quite bad here. */
@ -617,7 +617,7 @@ static void bm_mesh_edges_sharp_tag(BMesh *bm,
else if (do_sharp_edges_tag) {
/* Note that we do not care about the other sharp-edge cases
* (sharp poly, non-manifold edge, etc.),
* only tag edge as sharp when it is due to angle threashold. */
* only tag edge as sharp when it is due to angle threshold. */
BM_elem_flag_disable(e, BM_ELEM_SMOOTH);
}
}

@ -1739,7 +1739,7 @@ static int BMO_opcode_from_opname_check(const char *opname)
*
* \note The common v/e/f suffix can be mixed,
* so `avef` is can be used for all verts, edges and faces.
* Order is not important so `Hfev` is also valid (all unflagged verts, edges and faces).
* Order is not important so `Hfev` is also valid (all un-flagged verts, edges and faces).
*/
bool BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, va_list vlist)

@ -1512,7 +1512,7 @@ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq,
{
/* Note: we cannot use result of normal_tri_v3 here to detect colinear vectors
* (vertex on a straight line) from zero value,
* because it does not normalize both vectors before making crossproduct.
* because it does not normalize both vectors before making cross-product.
* Instead of adding two costly normalize computations,
* just check ourselves for colinear case. */
/* Note: FEPSILON might need some finer tweaking at some point?
@ -1529,7 +1529,7 @@ float BM_loop_calc_face_normal_safe_ex(const BMLoop *l, const float epsilon_sq,
mul_v3_v3fl(v_tmp, v2, fac);
sub_v3_v3(v_tmp, v1);
if (fac != 0.0f && !is_zero_v3(v1) && len_squared_v3(v_tmp) > epsilon_sq) {
/* Not co-linear, we can compute crossproduct and normalize it into normal. */
/* Not co-linear, we can compute cross-product and normalize it into normal. */
cross_v3_v3v3(r_normal, v1, v2);
return normalize_v3(r_normal);
}

@ -64,9 +64,8 @@ void *BMW_begin(BMWalker *walker, void *start)
/**
* \brief Init Walker
*
* Allocates and returns a new mesh walker of
* a given type. The elements visited are filtered
* by the bitmask 'searchmask'.
* Allocates and returns a new mesh walker of a given type.
* The elements visited are filtered by the bitmask 'searchmask'.
*/
void BMW_init(BMWalker *walker,
BMesh *bm,

@ -68,8 +68,6 @@ typedef struct BMWalker {
/* define to make BMW_init more clear */
#define BMW_MASK_NOP 0
/* initialize a walker. searchmask restricts some (not all) walkers to
* elements with a specific tool flag set. flags is specific to each walker.*/
void BMW_init(struct BMWalker *walker,
BMesh *bm,
int type,

@ -68,7 +68,7 @@ typedef enum CompositorPriority {
// workscheduler threading models
/**
* COM_TM_QUEUE is a multithreaded model, which uses the BLI_thread_queue pattern.
* COM_TM_QUEUE is a multi-threaded model, which uses the BLI_thread_queue pattern.
* This is the default option.
*/
#define COM_TM_QUEUE 1

@ -81,7 +81,7 @@ void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph,
/* Get scene at its evaluated state.
*
* Technically, this is a copied-on-written and fully evaluated version of the input scene.
* This function will check that the datablock has been expanded (and copied) from the original
* This function will check that the data-block has been expanded (and copied) from the original
* one. Assert will happen if it's not. */
struct Scene *DEG_get_evaluated_scene(const struct Depsgraph *graph);
@ -119,13 +119,13 @@ struct ID *DEG_get_original_id(struct ID *id);
/* Check whether given ID is an original,
*
* Original IDs are considered all the IDs which are not covered by copy-on-write system and are
* not out-of-main localized datablocks. */
* not out-of-main localized data-blocks. */
bool DEG_is_original_id(struct ID *id);
bool DEG_is_original_object(struct Object *object);
/* Opposite of the above.
*
* If the datablock is not original it must be evaluated, and vice versa. */
* If the data-block is not original it must be evaluated, and vice versa. */
bool DEG_is_evaluated_id(struct ID *id);
bool DEG_is_evaluated_object(struct Object *object);

@ -1193,7 +1193,7 @@ void DepsgraphRelationBuilder::build_animdata_curves_targets(ID *id,
}
graph_->add_new_relation(
operation_from, operation_to, "Animation -> Prop", RELATION_CHECK_BEFORE_ADD);
/* It is possible that animation is writing to a nested ID datablock,
/* It is possible that animation is writing to a nested ID data-block,
* need to make sure animation is evaluated after target ID is copied. */
const IDNode *id_node_from = operation_from->owner->owner;
const IDNode *id_node_to = operation_to->owner->owner;
@ -1397,8 +1397,8 @@ void DepsgraphRelationBuilder::build_driver_data(ID *id, FCurve *fcu)
/* If it's not a Bone, handle the generic single dependency case. */
add_relation(driver_key, property_entry_key, "Driver -> Driven Property");
/* Similar to the case with f-curves, driver might drive a nested
* datablock, which means driver execution should wait for that
* datablock to be copied. */
* data-block, which means driver execution should wait for that
* data-block to be copied. */
{
PointerRNA id_ptr;
PointerRNA ptr;
@ -1838,11 +1838,11 @@ void DepsgraphRelationBuilder::build_shapekeys(Key *key)
* Therefore, each user of a piece of shared geometry data ends up evaluating
* its own version of the stuff, complete with whatever modifiers it may use.
*
* - The datablocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU, ID_LT.)
* - The data-blocks for the geometry data - "obdata" (e.g. ID_ME, ID_CU, ID_LT.)
* are used for
* 1) calculating the bounding boxes of the geometry data,
* 2) aggregating inward links from other objects (e.g. for text on curve)
* and also for the links coming from the shapekey datablocks
* and also for the links coming from the shapekey data-blocks
* - Animation/Drivers affecting the parameters of the geometry are made to
* trigger updates on the obdata geometry component, which then trigger
* downstream re-evaluation of the individual instances of this geometry. */
@ -1966,7 +1966,7 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object)
&object->id, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL);
add_relation(time_key, obdata_ubereval_key, "Legacy particle time");
}
/* Object data datablock. */
/* Object data data-block. */
build_object_data_geometry_datablock((ID *)object->data);
Key *key = BKE_key_from_object(object);
if (key != NULL) {
@ -2502,7 +2502,7 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node)
}
GHASH_FOREACH_END();
/* NOTE: We currently ignore implicit relations to an external
* datablocks for copy-on-write operations. This means, for example,
* data-blocks for copy-on-write operations. This means, for example,
* copy-on-write component of Object will not wait for copy-on-write
* component of it's Mesh. This is because pointers are all known
* already so remapping will happen all correct. And then If some object

@ -153,7 +153,7 @@ Scene *DEG_get_evaluated_scene(const Depsgraph *graph)
{
const DEG::Depsgraph *deg_graph = reinterpret_cast<const DEG::Depsgraph *>(graph);
Scene *scene_cow = deg_graph->scene_cow;
/* TODO(sergey): Shall we expand datablock here? Or is it OK to assume
/* TODO(sergey): Shall we expand data-block here? Or is it OK to assume
* that calleer is OK with just a pointer in case scene is not updated
* yet? */
BLI_assert(scene_cow != NULL && DEG::deg_copy_on_write_is_expanded(&scene_cow->id));
@ -201,7 +201,7 @@ ID *DEG_get_evaluated_id(const Depsgraph *depsgraph, ID *id)
}
/* TODO(sergey): This is a duplicate of Depsgraph::get_cow_id(),
* but here we never do assert, since we don't know nature of the
* incoming ID datablock. */
* incoming ID data-block. */
const DEG::Depsgraph *deg_graph = (const DEG::Depsgraph *)depsgraph;
const DEG::IDNode *id_node = deg_graph->find_id_node(id);
if (id_node == NULL) {
@ -292,14 +292,14 @@ bool DEG_is_original_id(ID *id)
* What we want here is to be able to tell whether given ID is a result of dependency graph
* evaluation or not.
*
* All the datablocks which are created by copy-on-write mechanism will have will be tagged with
* LIB_TAG_COPIED_ON_WRITE tag. Those datablocks can not be original.
* All the data-blocks which are created by copy-on-write mechanism will have will be tagged with
* LIB_TAG_COPIED_ON_WRITE tag. Those data-blocks can not be original.
*
* Modifier stack evaluation might create special datablocks which have all the modifiers
* applied, and those will be tagged with LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT. Such datablocks
* Modifier stack evaluation might create special data-blocks which have all the modifiers
* applied, and those will be tagged with LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT. Such data-blocks
* can not be original as well.
*
* Localization is usually happening from evaluated datablock, or will have some special pointer
* Localization is usually happening from evaluated data-block, or will have some special pointer
* magic which will make them to act as evaluated.
*
* NOTE: We conder ID evaluated if ANY of those flags is set. We do NOT require ALL of them. */

@ -22,7 +22,7 @@
*/
/* Enable special; trickery to treat nested owned IDs (such as nodetree of
* material) to be handled in same way as "real" datablocks, even tho some
* material) to be handled in same way as "real" data-blocks, even tho some
* internal BKE routines doesn't treat them like that.
*
* TODO(sergey): Re-evaluate that after new ID handling is in place. */
@ -496,7 +496,7 @@ BLI_INLINE bool check_datablock_expanded(const ID *id_cow)
return (id_cow->name[0] != '\0');
}
/* Those are datablocks which are not covered by dependency graph and hence
/* Those are data-blocks which are not covered by dependency graph and hence
* does not need any remapping or anything.
*
* TODO(sergey): How to make it more robust for the future, so we don't have
@ -736,7 +736,7 @@ void update_animation_data_after_copy(const ID *id_orig, ID *id_cow)
/* Do some special treatment of data transfer from original ID to it's
* CoW complementary part.
*
* Only use for the newly created CoW datablocks. */
* Only use for the newly created CoW data-blocks. */
void update_id_after_copy(const Depsgraph *depsgraph,
const IDNode *id_node,
const ID *id_orig,
@ -784,7 +784,7 @@ void update_id_after_copy(const Depsgraph *depsgraph,
BKE_animsys_update_driver_array(id_cow);
}
/* This callback is used to validate that all nested ID datablocks are
/* This callback is used to validate that all nested ID data-blocks are
* properly expanded. */
int foreach_libblock_validate_callback(void *user_data,
ID * /*id_self*/,
@ -1483,10 +1483,10 @@ void discard_edit_mode_pointers(ID *id_cow)
} // namespace
/* Free content of the CoW datablock
/* Free content of the CoW data-block
* Notes:
* - Does not recurs into nested ID datablocks.
* - Does not free datablock itself. */
* - Does not recurs into nested ID data-blocks.
* - Does not free data-block itself. */
void deg_free_copy_on_write_datablock(ID *id_cow)
{
if (!check_datablock_expanded(id_cow)) {

@ -47,8 +47,8 @@ struct Depsgraph;
class DepsgraphNodeBuilder;
struct IDNode;
/* Get fully expanded (ready for use) copy-on-write datablock for the given
* original datablock.
/* Get fully expanded (ready for use) copy-on-write data-block for the given
* original data-block.
*/
ID *deg_expand_copy_on_write_datablock(const struct Depsgraph *depsgraph,
const IDNode *id_node,
@ -59,8 +59,8 @@ ID *deg_expand_copy_on_write_datablock(const struct Depsgraph *depsgraph,
DepsgraphNodeBuilder *node_builder = NULL,
bool create_placeholders = false);
/* Makes sure given CoW datablock is brought back to state of the original
* datablock.
/* Makes sure given CoW data-block is brought back to state of the original
* data-block.
*/
ID *deg_update_copy_on_write_datablock(const struct Depsgraph *depsgraph, const IDNode *id_node);
ID *deg_update_copy_on_write_datablock(const struct Depsgraph *depsgraph, struct ID *id_orig);
@ -88,7 +88,7 @@ bool deg_copy_on_write_is_expanded(const struct ID *id_cow);
/* Check whether copy-on-write datablock is needed for given ID.
*
* There are some exceptions on datablocks which are covered by dependency graph
* There are some exceptions on data-blocks which are covered by dependency graph
* but which we don't want to start duplicating.
*
* This includes images.

@ -56,7 +56,7 @@ extern "C" {
#include "intern/eval/deg_eval_copy_on_write.h"
// Invalidate datablock data when update is flushed on it.
// Invalidate data-block data when update is flushed on it.
//
// The idea of this is to help catching cases when area is accessing data which
// is not yet evaluated, which could happen due to missing relations. The issue
@ -254,11 +254,11 @@ void flush_editors_id_update(Depsgraph *graph, const DEGEditorUpdateContext *upd
id_orig->name,
(unsigned int)id_cow->recalc);
/* Inform editors. Only if the datablock is being evaluated a second
/* Inform editors. Only if the data-block is being evaluated a second
* time, to distinguish between user edits and initial evaluation when
* the datablock becomes visible.
* the data-block becomes visible.
*
* TODO: image datablocks do not use COW, so might not be detected
* TODO: image data-blocks do not use COW, so might not be detected
* correctly. */
if (deg_copy_on_write_is_expanded(id_cow)) {
if (graph->is_active && id_node->is_user_modified) {

@ -100,7 +100,7 @@ enum class OperationCode {
/* Evaluation of geometry is completely done.. */
GEOMETRY_EVAL_DONE,
/* Evaluation of a shape key.
* NOTE: Currently only for object data datablocks. */
* NOTE: Currently only for object data data-blocks. */
GEOMETRY_SHAPEKEY,
/* Object data. --------------------------------------------------------- */
@ -188,7 +188,7 @@ enum class OperationCode {
/* Synchronization. ----------------------------------------------------- */
SYNCHRONIZE_TO_ORIGINAL,
/* Generic datablock ---------------------------------------------------- */
/* Generic data-block --------------------------------------------------- */
GENERIC_DATABLOCK_UPDATE,
/* Sequencer. ----------------------------------------------------------- */

@ -207,9 +207,9 @@ void EEVEE_bloom_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *ved
/** Bloom algorithm
*
* Overview:
* - Downsample the color buffer doing a small blur during each step.
* - Accumulate bloom color using previously downsampled color buffers
* and do an upsample blur for each new accumulated layer.
* - Down-sample the color buffer doing a small blur during each step.
* - Accumulate bloom color using previously down-sampled color buffers
* and do an up-sample blur for each new accumulated layer.
* - Finally add accumulation buffer onto the source color buffer.
*
* [1/1] is original copy resolution (can be half or quarter res for performance)

@ -185,7 +185,7 @@ void EEVEE_depth_of_field_cache_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_
/** Depth of Field algorithm
*
* Overview :
* - Downsample the color buffer into 2 buffers weighted with
* - Down-sample the color buffer into 2 buffers weighted with
* CoC values. Also output CoC into a texture.
* - Shoot quads for every pixel and expand it depending on the CoC.
* Do one pass for near Dof and one pass for far Dof.

@ -487,7 +487,7 @@ void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, GPUTexture *depth_src, int l
}
/**
* Simple downsampling algorithm. Reconstruct mip chain up to mip level.
* Simple down-sampling algorithm. Reconstruct mip chain up to mip level.
*/
void EEVEE_downsample_buffer(EEVEE_Data *vedata, GPUTexture *texture_src, int level)
{

@ -1248,7 +1248,7 @@ void EEVEE_lightbake_job(void *custom_data, short *stop, short *do_update, float
/* Assume that if lbake->gl_context is NULL
* we are not running in this in a job, so update
* the scene lightcache pointer before deleting it. */
* the scene light-cache pointer before deleting it. */
if (lbake->gl_context == NULL) {
BLI_assert(BLI_thread_is_main());
EEVEE_lightbake_update(lbake);

@ -754,7 +754,7 @@ void EEVEE_lightprobes_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *ved
}
planar_pool_ensure_alloc(vedata, pinfo->num_planar);
/* If lightcache auto-update is enable we tag the relevant part
/* If light-cache auto-update is enable we tag the relevant part
* of the cache to update and fire up a baking job. */
if (!DRW_state_is_image_render() && !DRW_state_is_opengl_render() &&
(pinfo->do_grid_update || pinfo->do_cube_update)) {

@ -712,7 +712,7 @@ static float light_shape_power_get(const Light *la, const EEVEE_Light *evli)
}
else {
power = 1.0f / (evli->radius * evli->radius * M_PI); /* 1/(r²*Pi) */
/* Make illumation power closer to cycles for bigger radii. Cycles uses a cos^3 term that we
/* Make illumination power closer to cycles for bigger radii. Cycles uses a cos^3 term that we
* cannot reproduce so we account for that by scaling the light power. This function is the
* result of a rough manual fitting. */
power += 1.0f / (2.0f * M_PI); /* power *= 1 + r²/2 */

@ -126,7 +126,7 @@ void EEVEE_lookdev_cache_init(EEVEE_Data *vedata,
MEM_SAFE_FREE(stl->lookdev_cube_mips);
/* We do this to use a special light cache for lookdev.
* This lightcache needs to be per viewport. But we need to
* This light-cache needs to be per viewport. But we need to
* have correct freeing when the viewport is closed. So we
* need to reference all textures to the txl and the memblocks
* to the stl. */

@ -209,7 +209,7 @@ void EEVEE_screen_raytrace_cache_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *v
* - First pass Trace rays across the depth buffer. The hit position and pdf are
* recorded in a RGBA16F render target for each ray (sample).
*
* - We downsample the previous frame color buffer.
* - We down-sample the previous frame color buffer.
*
* - For each final pixel, we gather neighbors rays and choose a color buffer
* mipmap for each ray using its pdf. (filtered importance sampling)

@ -1,5 +1,5 @@
/**
* Simple downsample shader. Takes the average of the 4 texels of lower mip.
* Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform samplerCube source;

@ -1,5 +1,5 @@
/**
* Simple downsample shader. Takes the average of the 4 texels of lower mip.
* Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform sampler2D source;

@ -1,5 +1,5 @@
/**
* Shader that downsample depth buffer,
* Shader that down-sample depth buffer,
* saving min and max value of each texel in the above mipmaps.
* Adapted from http://rastergrid.com/blog/2010/10/hierarchical-z-map-based-occlusion-culling/
*/

@ -1,5 +1,5 @@
/**
* Simple downsample shader. Takes the average of the 4 texels of lower mip.
* Simple down-sample shader. Takes the average of the 4 texels of lower mip.
*/
uniform sampler2DArray source;

@ -2060,8 +2060,8 @@ void DRW_gpencil_populate_particles(GPENCIL_e_data *e_data, GHash *gh_objects, v
for (int i = 0; i < stl->g_data->gp_cache_used; i++) {
tGPencilObjectCache *cache_ob = &stl->g_data->gp_object_cache[i];
if (cache_ob->is_dup_ob) {
/* reasign duplicate objects because memory for particles is not available
* and need to use the original datablock and runtime data */
/* Reassign duplicate objects because memory for particles is not available
* and need to use the original data-block and run-time data. */
Object *ob = (Object *)BLI_ghash_lookup(gh_objects, cache_ob->name);
if (ob) {
cache_ob->ob = ob;

@ -849,7 +849,7 @@ void **DRW_view_layer_engine_data_ensure(DrawEngineType *engine_type,
* \{ */
/* Used for DRW_drawdata_from_id()
* All ID-datablocks which have their own 'local' DrawData
* All ID-data-blocks which have their own 'local' DrawData
* should have the same arrangement in their structs.
*/
typedef struct IdDdtTemplate {

@ -381,7 +381,7 @@ typedef struct DRWManager {
} uniform_names;
} DRWManager;
extern DRWManager DST; /* TODO : get rid of this and allow multithreaded rendering */
extern DRWManager DST; /* TODO: get rid of this and allow multi-threaded rendering. */
/* --------------- FUNCTIONS ------------- */

@ -515,7 +515,7 @@ bool ANIM_animdata_get_context(const bContext *C, bAnimContext *ac)
* 2A) nla tracks: include animdata block's data as there are NLA tracks+strips there
* 2B) actions to convert to nla: include animdata block's data as there is an action that can be
* converted to a new NLA strip, and the filtering options allow this
* 2C) allow non-animated datablocks to be included so that datablocks can be added
* 2C) allow non-animated data-blocks to be included so that data-blocks can be added
* 3) drivers: include drivers from animdata block (for Drivers mode in Graph Editor)
* 4A) nla strip keyframes: these are the per-strip controls for time and influence
* 4B) normal keyframes: only when there is an active action
@ -1618,7 +1618,7 @@ static size_t animfilter_block_data(
AnimData *adt = BKE_animdata_from_id(id);
size_t items = 0;
/* image object datablocks have no anim-data so check for NULL */
/* image object data-blocks have no anim-data so check for NULL */
if (adt) {
IdAdtTemplate *iat = (IdAdtTemplate *)id;
@ -1704,7 +1704,7 @@ static size_t animdata_filter_shapekey(bAnimContext *ac,
return items;
}
/* Helper for Grease Pencil - layers within a datablock */
/* Helper for Grease Pencil - layers within a data-block. */
static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data,
bDopeSheet *ads,
bGPdata *gpd,
@ -1737,7 +1737,7 @@ static size_t animdata_filter_gpencil_layers_data(ListBase *anim_data,
return items;
}
/* Helper for Grease Pencil - Grease Pencil datablock - GP Frames */
/* Helper for Grease Pencil - Grease Pencil data-block - GP Frames. */
static size_t animdata_filter_gpencil_data(ListBase *anim_data,
bDopeSheet *ads,
bGPdata *gpd,
@ -1746,8 +1746,8 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
size_t items = 0;
/* When asked from "AnimData" blocks (i.e. the top-level containers for normal animation),
* for convenience, this will return GP Datablocks instead. This may cause issues down
* the track, but for now, this will do...
* for convenience, this will return GP Data-blocks instead.
* This may cause issues down the track, but for now, this will do.
*/
if (filter_mode & ANIMFILTER_ANIMDATA) {
/* just add GPD as a channel - this will add everything needed */
@ -1781,7 +1781,7 @@ static size_t animdata_filter_gpencil_data(ListBase *anim_data,
return items;
}
/* Grab all Grease Pencil datablocks in file */
/* Grab all Grease Pencil data-blocks in file. */
// TODO: should this be amalgamated with the dopesheet filtering code?
static size_t animdata_filter_gpencil(bAnimContext *ac,
ListBase *anim_data,
@ -1847,7 +1847,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
}
}
/* finally, include this object's grease pencil datablock */
/* finally, include this object's grease pencil data-block. */
/* XXX: Should we store these under expanders per item? */
items += animdata_filter_gpencil_data(anim_data, ads, ob->data, filter_mode);
}
@ -1856,7 +1856,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
else {
bGPdata *gpd;
/* Grab all Grease Pencil datablocks directly from main,
/* Grab all Grease Pencil data-blocks directly from main,
* but only those that seem to be useful somewhere */
for (gpd = ac->bmain->gpencils.first; gpd; gpd = gpd->id.next) {
/* only show if gpd is used by something... */
@ -1864,7 +1864,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac,
continue;
}
/* add GP frames from this datablock */
/* add GP frames from this data-block. */
items += animdata_filter_gpencil_data(anim_data, ads, gpd, filter_mode);
}
}
@ -1983,7 +1983,7 @@ static size_t animdata_filter_mask(Main *bmain,
Mask *mask;
size_t items = 0;
/* for now, grab mask datablocks directly from main */
/* For now, grab mask data-blocks directly from main. */
// XXX: this is not good...
for (mask = bmain->masks.first; mask; mask = mask->id.next) {
ListBase tmp_data = {NULL, NULL};
@ -2004,7 +2004,7 @@ static size_t animdata_filter_mask(Main *bmain,
if (tmp_items) {
/* include data-expand widget first */
if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
/* add mask datablock as channel too (if for drawing, and it has layers) */
/* add mask data-block as channel too (if for drawing, and it has layers) */
ANIMCHANNEL_NEW_CHANNEL(mask, ANIMTYPE_MASKDATABLOCK, NULL, NULL);
}
@ -3030,7 +3030,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, Base *base, int filter_m
}
/* if only F-Curves with visible flags set can be shown, check that
* datablock hasn't been set to invisible
* data-block hasn't been set to invisible.
*/
if (filter_mode & ANIMFILTER_CURVE_VISIBLE) {
if ((ob->adt) && (ob->adt->flag & ADT_CURVES_NOT_VISIBLE)) {

@ -182,7 +182,7 @@ static int add_driver_with_target(ReportList *UNUSED(reports),
/* Set driver expression, so that the driver works out of the box
*
* The following checks define a bit of "autodetection magic" we use
* The following checks define a bit of "auto-detection magic" we use
* to ensure that the drivers will behave as expected out of the box
* when faced with properties with different units.
*/

@ -334,7 +334,7 @@ static short summary_keyframes_loop(KeyframeEditData *ked,
case ALE_FCURVE:
default: {
if (ked && ked->iterflags) {
/* make backups of the current values, so that a localised fix
/* make backups of the current values, so that a localized fix
* (e.g. NLA time remapping) can be applied to these values
*/
float f1 = ked->f1;

@ -15,11 +15,12 @@
*
* The Original Code is Copyright (C) 2018, Blender Foundation
* This is a new part of Blender
* Operators for dealing with armatures and GP datablocks
*/
/** \file
* \ingroup edgpencil
*
* Operators for dealing with armatures and GP data-blocks.
*/
#include <stdio.h>

@ -15,11 +15,12 @@
*
* The Original Code is Copyright (C) 2008, Blender Foundation
* This is a new part of Blender
* Operators for dealing with GP datablocks and layers
*/
/** \file
* \ingroup edgpencil
*
* Operators for dealing with GP data-blocks and layers.
*/
#include <stdio.h>
@ -539,7 +540,7 @@ static int gp_layer_duplicate_object_exec(bContext *C, wmOperator *op)
Material *ma_src = give_current_material(ob_src, gps_src->mat_nr + 1);
int idx = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src);
/* reasign the stroke material to the right slot in destination object */
/* Reassign the stroke material to the right slot in destination object. */
gps_dst->mat_nr = idx;
/* add new stroke to frame */
@ -1077,7 +1078,7 @@ static int gp_isolate_layer_exec(bContext *C, wmOperator *op)
}
/* Set/Clear flags as appropriate */
/* TODO: Include onionskinning on this list? */
/* TODO: Include onion-skinning on this list? */
if (isolate) {
/* Set flags on all "other" layers */
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
@ -2322,7 +2323,7 @@ int ED_gpencil_join_objects_exec(bContext *C, wmOperator *op)
for (bGPDframe *gpf = gpl_new->frames.first; gpf; gpf = gpf->next) {
for (bGPDstroke *gps = gpf->strokes.first; gps; gps = gps->next) {
/* reasign material. Look old material and try to find in dst */
/* Reassign material. Look old material and try to find in destination. */
ma_src = give_current_material(ob_src, gps->mat_nr + 1);
gps->mat_nr = BKE_gpencil_object_material_ensure(bmain, ob_dst, ma_src);

@ -994,7 +994,7 @@ ListBase gp_strokes_copypastebuf = {NULL, NULL};
/* Hash for hanging on to all the colors used by strokes in the buffer
*
* This is needed to prevent dangling and unsafe pointers when pasting across datablocks,
* This is needed to prevent dangling and unsafe pointers when pasting across data-blocks,
* or after a color used by a stroke in the buffer gets deleted (via user action or undo).
*/
static GHash *gp_strokes_copypastebuf_colors = NULL;
@ -4026,7 +4026,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
/* make copy of source stroke */
bGPDstroke *gps_dst = BKE_gpencil_stroke_duplicate(gps);
/* reasign material */
/* Reassign material. */
gps_dst->mat_nr = idx;
/* link to destination frame */
@ -4052,7 +4052,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
gps->prev = gps->next = NULL;
/* relink to destination frame */
BLI_addtail(&gpf_dst->strokes, gps);
/* reasign material */
/* Reassign material. */
gps->mat_nr = idx;
}
}

@ -7182,8 +7182,10 @@ void UI_but_tooltip_refresh(bContext *C, uiBut *but)
}
}
/* removes tooltip timer from active but
* (meaning tooltip is disabled until it's reenabled again) */
/**
* Removes tool-tip timer from active but
* (meaning tool-tip is disabled until it's re-enabled again).
*/
void UI_but_tooltip_timer_remove(bContext *C, uiBut *but)
{
uiHandleButtonData *data;
@ -8511,7 +8513,7 @@ static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, u
/**
* Function used to prevent losing the open menu when using nested pull-downs,
* when moving mouse towards the pulldown menu over other buttons that could
* when moving mouse towards the pull-down menu over other buttons that could
* steal the highlight from the current button, only checks:
*
* - while mouse moves in triangular area defined old mouse position and

@ -528,8 +528,8 @@ bool ui_region_contains_point_px(const ARegion *ar, int x, int y)
return false;
}
/* also, check that with view2d, that the mouse is not over the scrollbars
* NOTE: care is needed here, since the mask rect may include the scrollbars
/* also, check that with view2d, that the mouse is not over the scroll-bars
* NOTE: care is needed here, since the mask rect may include the scroll-bars
* even when they are not visible, so we need to make a copy of the mask to
* use to check
*/

@ -3079,7 +3079,7 @@ static void colorband_update_cb(bContext *UNUSED(C), void *bt_v, void *coba_v)
uiBut *bt = bt_v;
ColorBand *coba = coba_v;
/* sneaky update here, we need to sort the colorband points to be in order,
/* Sneaky update here, we need to sort the color-band points to be in order,
* however the RNA pointer then is wrong, so we update it */
BKE_colorband_update_sort(coba);
bt->rnapoin.data = coba->data + coba->cur;

@ -1654,7 +1654,7 @@ float UI_text_clip_middle_ex(const uiFontStyle *fstyle,
if ((okwidth > 0.0f) && (strwidth > okwidth)) {
/* utf8 two-dots leader '..' (shorter than ellipsis '...'),
* some compilers complain with real litteral string. */
* some compilers complain with real literal string. */
const char sep[] = {0xe2, 0x80, 0xA5, 0x0};
const int sep_len = sizeof(sep) - 1;
const float sep_strwidth = BLF_width(fstyle->uifont_id, sep, sep_len + 1);
@ -3800,7 +3800,7 @@ static void widget_swatch(
if (state & (UI_BUT_DISABLED | UI_BUT_INACTIVE)) {
/* Now we reduce alpha of the inner color (i.e. the color shown)
* so that this setting can look grayed out, while retaining
* the checkboard (for transparent values). This is needed
* the checkerboard (for transparent values). This is needed
* here as the effects of ui_widget_color_disabled() are overwritten.
*/
wcol->inner[3] /= 2;

@ -247,8 +247,7 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
cp = ts->header;
break;
case TH_HEADERDESEL:
/* we calculate a dynamic builtin header deselect color,
* also for pulldowns... */
/* We calculate a dynamic builtin header deselect color, also for pull-downs. */
cp = ts->header;
headerdesel[0] = cp[0] > 10 ? cp[0] - 10 : 0;
headerdesel[1] = cp[1] > 10 ? cp[1] - 10 : 0;

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