Cleanup: spelling in comments
This commit is contained in:
parent
0c30873d82
commit
bc2220733a
|
@ -108,7 +108,7 @@ static void action_copy_data(Main *UNUSED(bmain), ID *id_dst, const ID *id_src,
|
|||
/* Duplicate F-Curve. */
|
||||
|
||||
/* XXX TODO: pass subdata flag?
|
||||
* But surprisingly does not seem to be doing any ID refcounting... */
|
||||
* But surprisingly does not seem to be doing any ID reference-counting. */
|
||||
fcurve_dst = BKE_fcurve_copy(fcurve_src);
|
||||
|
||||
BLI_addtail(&action_dst->curves, fcurve_dst);
|
||||
|
|
|
@ -416,9 +416,9 @@ static void setup_app_data(bContext *C,
|
|||
* 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
|
||||
* refcounting.
|
||||
* Now that we re-use (and do not liblink in readfile.c) most local datablocks as well, we have
|
||||
* to recompute refcount for all local IDs too. */
|
||||
* reference-counting.
|
||||
* Now that we re-use (and do not liblink in readfile.c) most local data-blocks as well,
|
||||
* we have to recompute reference-counts for all local IDs too. */
|
||||
BKE_main_id_refcount_recompute(bmain, false);
|
||||
}
|
||||
|
||||
|
|
|
@ -1511,8 +1511,8 @@ Depsgraph *CTX_data_expect_evaluated_depsgraph(const bContext *C)
|
|||
{
|
||||
Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C);
|
||||
/* TODO(sergey): Assert that the dependency graph is fully evaluated.
|
||||
* Note that first the depsgraph and scene post-eval hooks needs to run extra round of updates
|
||||
* first to make check here really reliable. */
|
||||
* Note that first the depsgraph and scene post-evaluation hooks needs to run extra round of
|
||||
* updates first to make check here really reliable. */
|
||||
return depsgraph;
|
||||
}
|
||||
|
||||
|
|
|
@ -322,8 +322,8 @@ void id_us_min(ID *id)
|
|||
|
||||
if (id->us <= limit) {
|
||||
if (!ID_TYPE_IS_DEPRECATED(GS(id->name))) {
|
||||
/* Do not assert on deprecated ID types, we cannot really ensure that their ID refcounting
|
||||
* is valid... */
|
||||
/* Do not assert on deprecated ID types, we cannot really ensure that their ID
|
||||
* reference-counting is valid. */
|
||||
CLOG_ERROR(&LOG,
|
||||
"ID user decrement error: %s (from '%s'): %d <= %d",
|
||||
id->name,
|
||||
|
|
|
@ -261,7 +261,7 @@ static bool library_foreach_ID_link(Main *bmain,
|
|||
* (the node tree), but re-use those generated for the 'owner' ID (the material). */
|
||||
if (inherit_data == NULL) {
|
||||
data.cb_flag = ID_IS_LINKED(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
|
||||
/* When an ID is defined as not refcounting its ID usages, it should never do it. */
|
||||
/* When an ID is defined as not reference-counting its ID usages, it should never do it. */
|
||||
data.cb_flag_clear = (id->tag & LIB_TAG_NO_USER_REFCOUNT) ?
|
||||
IDWALK_CB_USER | IDWALK_CB_USER_ONE :
|
||||
0;
|
||||
|
|
|
@ -1062,7 +1062,7 @@ Mesh *BKE_mesh_new_from_object_to_bmain(Main *bmain,
|
|||
* everything is only allowed to reference original data-blocks.
|
||||
*
|
||||
* Note that user-count updates has to be done *after* mesh has been transferred to Main database
|
||||
* (since doing refcounting on non-Main IDs is forbidden). */
|
||||
* (since doing reference-counting on non-Main IDs is forbidden). */
|
||||
BKE_library_foreach_ID_link(
|
||||
nullptr, &mesh->id, foreach_libblock_make_original_callback, nullptr, IDWALK_NOP);
|
||||
|
||||
|
|
|
@ -2955,7 +2955,7 @@ namespace blender::bke {
|
|||
/**
|
||||
* Free the node itself.
|
||||
*
|
||||
* \note: ID user refcounting and changing the `nodes_by_id` vector are up to the caller.
|
||||
* \note: ID user reference-counting and changing the `nodes_by_id` vector are up to the caller.
|
||||
*/
|
||||
void node_free_node(bNodeTree *ntree, bNode *node)
|
||||
{
|
||||
|
@ -3031,7 +3031,7 @@ void ntreeFreeLocalNode(bNodeTree *ntree, bNode *node)
|
|||
void nodeRemoveNode(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user)
|
||||
{
|
||||
/* This function is not for localized node trees, we do not want
|
||||
* do to ID user refcounting and removal of animdation data then. */
|
||||
* do to ID user reference-counting and removal of animdation data then. */
|
||||
BLI_assert((ntree->id.tag & LIB_TAG_LOCALIZED) == 0);
|
||||
|
||||
bool node_has_id = false;
|
||||
|
|
|
@ -517,7 +517,7 @@ enum eBlurKernelType;
|
|||
BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj);
|
||||
void paint_delete_blur_kernel(BlurKernel *);
|
||||
|
||||
/* Initialize viewport pivot from evaulated bounding box center of ob. */
|
||||
/** Initialize viewport pivot from evaluated bounding box center of `ob`. */
|
||||
void paint_init_pivot(struct Object *ob, struct Scene *scene);
|
||||
|
||||
/* paint curve defines */
|
||||
|
|
|
@ -262,7 +262,7 @@ bool GPU_backend_type_selection_detect(void)
|
|||
backends_to_check.append(GPU_BACKEND_OPENGL);
|
||||
}
|
||||
|
||||
/* Add fallback to OpenGL when Metal backend is requested on a platform that doens't support
|
||||
/* Add fallback to OpenGL when Metal backend is requested on a platform that doesn't support
|
||||
* metal. */
|
||||
if (backends_to_check[0] == GPU_BACKEND_METAL) {
|
||||
backends_to_check.append(GPU_BACKEND_OPENGL);
|
||||
|
|
|
@ -286,7 +286,7 @@ void MTLShaderInterface::prepare_common_shader_inputs()
|
|||
MTLShaderInputAttribute &shd_attr = attributes_[attr_index];
|
||||
current_input->name_offset = shd_attr.name_offset;
|
||||
current_input->name_hash = BLI_hash_string(this->get_name_at_offset(shd_attr.name_offset));
|
||||
/* For Metal, we flatten the vertex attribute indices within the shader in order to minimise
|
||||
/* For Metal, we flatten the vertex attribute indices within the shader in order to minimize
|
||||
* complexity. ShaderInput "Location" contains the original attribute location, as can be
|
||||
* fetched using `GPU_shader_get_attribute_info`. ShaderInput binding contains the array index
|
||||
* into the MTLShaderInterface `attributes_` array. */
|
||||
|
|
|
@ -812,7 +812,7 @@ enum {
|
|||
* ID is considered as runtime, and should not be saved when writing .blend file, nor influence
|
||||
* (in)direct status of linked data.
|
||||
*
|
||||
* Only meaningful for IDs belonging to regular Main database, all other cases are implicitely
|
||||
* Only meaningful for IDs belonging to regular Main database, all other cases are implicitly
|
||||
* considered runtime-only.
|
||||
*
|
||||
* RESET_NEVER
|
||||
|
@ -860,10 +860,10 @@ enum {
|
|||
|
||||
/**
|
||||
* Most of ID tags are cleared on file write (i.e. also when storing undo steps), since they
|
||||
* either have of very short lifetime (not expected to exist accross undo steps), or are info that
|
||||
* either have of very short lifetime (not expected to exist across undo steps), or are info that
|
||||
* will be re-generated when reading undo steps.
|
||||
*
|
||||
* However a few of these need to be explicitely preserved accross undo steps.
|
||||
* However a few of these need to be explicitly preserved across undo steps.
|
||||
*/
|
||||
#define LIB_TAG_KEEP_ON_UNDO (LIB_TAG_EXTRAUSER | LIB_TAG_MISSING | LIB_TAG_RUNTIME)
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static void rna_DriverTarget_update_name(Main *bmain, Scene *scene, PointerRNA *
|
|||
|
||||
/* ----------- */
|
||||
|
||||
/* NOTE: this function exists only to avoid id refcounting. */
|
||||
/* NOTE: this function exists only to avoid id reference-counting. */
|
||||
static void rna_DriverTarget_id_set(PointerRNA *ptr,
|
||||
PointerRNA value,
|
||||
struct ReportList *UNUSED(reports))
|
||||
|
|
|
@ -103,7 +103,7 @@ static void rna_Mask_update_parent(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|||
rna_Mask_update_data(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
/* NOTE: this function exists only to avoid id refcounting. */
|
||||
/* NOTE: this function exists only to avoid id reference-counting. */
|
||||
static void rna_MaskParent_id_set(PointerRNA *ptr,
|
||||
PointerRNA value,
|
||||
struct ReportList *UNUSED(reports))
|
||||
|
|
|
@ -1966,7 +1966,7 @@ static void rna_SpaceTextEditor_updateEdited(Main *UNUSED(bmain),
|
|||
|
||||
/* Space Properties */
|
||||
|
||||
/* NOTE: this function exists only to avoid id refcounting. */
|
||||
/* NOTE: this function exists only to avoid id reference-counting. */
|
||||
static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr,
|
||||
PointerRNA value,
|
||||
struct ReportList *UNUSED(reports))
|
||||
|
|
|
@ -459,29 +459,29 @@ class GlareOperation : public NodeOperation {
|
|||
return 1.0f - std::pow(get_color_modulation_factor(), iteration + 1);
|
||||
}
|
||||
|
||||
/* Streaks are computed by iteratively applying a filter that samples 3 neighbouring pixels in
|
||||
* the direction of the streak. Those neighbouring pixels are then combined using a weighted sum.
|
||||
* The weights of the neighbours are the fade factors computed by this method. Farther neighbours
|
||||
/* Streaks are computed by iteratively applying a filter that samples 3 neighboring pixels in
|
||||
* the direction of the streak. Those neighboring pixels are then combined using a weighted sum.
|
||||
* The weights of the neighbors are the fade factors computed by this method. Farther neighbors
|
||||
* are expected to have lower weights because they contribute less to the combined result. Since
|
||||
* the iteration magnitude represents how far the neighbours are, as noted in the description of
|
||||
* the compute_streak_iteration_magnitude method, the fade factor for the closest neighbour is
|
||||
* the iteration magnitude represents how far the neighbors are, as noted in the description of
|
||||
* the compute_streak_iteration_magnitude method, the fade factor for the closest neighbor is
|
||||
* computed as the user supplied fade parameter raised to the power of the magnitude, noting that
|
||||
* the fade value is in the [0, 1] range while the magnitude is larger than or equal one, so the
|
||||
* higher the power the lower the resulting fade factor. Furthermore, the other two neighbours
|
||||
* are just squared and cubed versions of the fade factor for the closest neighbour to get even
|
||||
* lower fade factors for those farther neighbours. */
|
||||
* higher the power the lower the resulting fade factor. Furthermore, the other two neighbors
|
||||
* are just squared and cubed versions of the fade factor for the closest neighbor to get even
|
||||
* lower fade factors for those farther neighbors. */
|
||||
float3 compute_streak_fade_factors(float iteration_magnitude)
|
||||
{
|
||||
const float fade_factor = std::pow(node_storage(bnode()).fade, iteration_magnitude);
|
||||
return float3(fade_factor, std::pow(fade_factor, 2.0f), std::pow(fade_factor, 3.0f));
|
||||
}
|
||||
|
||||
/* Streaks are computed by iteratively applying a filter that samples the neighbouring pixels in
|
||||
/* Streaks are computed by iteratively applying a filter that samples the neighboring pixels in
|
||||
* the direction of the streak. Each higher iteration samples pixels that are farther away, the
|
||||
* magnitude computed by this method describes how farther away the neighbours are sampled. The
|
||||
* magnitude computed by this method describes how farther away the neighbors are sampled. The
|
||||
* magnitude exponentially increase with the iteration. A base of 4, was chosen as compromise
|
||||
* between better quality and performance, since a lower base corresponds to more tightly spaced
|
||||
* neighbours but would require more iterations to produce a streak of the same length. */
|
||||
* neighbors but would require more iterations to produce a streak of the same length. */
|
||||
float compute_streak_iteration_magnitude(int iteration)
|
||||
{
|
||||
return std::pow(4.0f, iteration);
|
||||
|
|
Loading…
Reference in New Issue