Cleanup: spelling in comments
This commit is contained in:
parent
48383cf20e
commit
cd1dbab348
@ -140,7 +140,7 @@ vector2 compute_2d_gabor_noise_cell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
||||||
* in the space of each cell of the 3x3 cell neighbourhood. */
|
* in the space of each cell of the 3x3 cell neighborhood. */
|
||||||
vector2 compute_2d_gabor_noise(vector2 coordinates,
|
vector2 compute_2d_gabor_noise(vector2 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
@ -251,7 +251,7 @@ vector2 compute_3d_gabor_noise_cell(
|
|||||||
return noise;
|
return noise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identical to compute_2d_gabor_noise but works in the 3D neighbourhood of the noise. */
|
/* Identical to compute_2d_gabor_noise but works in the 3D neighborhood of the noise. */
|
||||||
vector2 compute_3d_gabor_noise(vector3 coordinates,
|
vector2 compute_3d_gabor_noise(vector3 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
|
@ -137,7 +137,7 @@ ccl_device float2 compute_2d_gabor_noise_cell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
||||||
* in the space of each cell of the 3x3 cell neighbourhood. */
|
* in the space of each cell of the 3x3 cell neighborhood. */
|
||||||
ccl_device float2 compute_2d_gabor_noise(float2 coordinates,
|
ccl_device float2 compute_2d_gabor_noise(float2 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
@ -248,7 +248,7 @@ ccl_device float2 compute_3d_gabor_noise_cell(
|
|||||||
return noise;
|
return noise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identical to compute_2d_gabor_noise but works in the 3D neighbourhood of the noise. */
|
/* Identical to compute_2d_gabor_noise but works in the 3D neighborhood of the noise. */
|
||||||
ccl_device float2 compute_3d_gabor_noise(float3 coordinates,
|
ccl_device float2 compute_3d_gabor_noise(float3 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
|
@ -730,9 +730,9 @@ Action *get_action(ID &animated_id);
|
|||||||
* Get the Action and the Slot that animate this ID.
|
* Get the Action and the Slot that animate this ID.
|
||||||
*
|
*
|
||||||
* \return One of two options:
|
* \return One of two options:
|
||||||
* - pair<Action, Slot> when an Action and a Slot are assigned. In other
|
* - `pair<Action, Slot>` when an Action and a Slot are assigned. In other
|
||||||
* words, when this ID is actually animated by this Action+Slot pair.
|
* words, when this ID is actually animated by this Action+Slot pair.
|
||||||
* - nullopt: when this ID is not animated. This can have several causes: not
|
* - `nullopt`: when this ID is not animated. This can have several causes: not
|
||||||
* an animatable type, no Action assigned, or no Slot assigned.
|
* an animatable type, no Action assigned, or no Slot assigned.
|
||||||
*/
|
*/
|
||||||
std::optional<std::pair<Action *, Slot *>> get_action_slot_pair(ID &animated_id);
|
std::optional<std::pair<Action *, Slot *>> get_action_slot_pair(ID &animated_id);
|
||||||
|
@ -469,7 +469,7 @@ void AssetLibraryService::allocate_service_instance()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void on_blendfile_load(Main * /*bMain*/,
|
static void on_blendfile_load(Main * /*bmain*/,
|
||||||
PointerRNA ** /*pointers*/,
|
PointerRNA ** /*pointers*/,
|
||||||
const int /*num_pointers*/,
|
const int /*num_pointers*/,
|
||||||
void * /*arg*/)
|
void * /*arg*/)
|
||||||
|
@ -44,8 +44,8 @@ struct rcti;
|
|||||||
#define BLF_CACHE_BYTES 400000
|
#define BLF_CACHE_BYTES 400000
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Offset from icon id to Unicode Supplimentary Private Use Area-B,
|
* Offset from icon id to Unicode Supplementary Private Use Area-B,
|
||||||
* added with Unicode 2.0. 65,536 codepoints at U+100000..U+10FFFF.
|
* added with Unicode 2.0. 65,536 code-points at U+100000..U+10FFFF.
|
||||||
*/
|
*/
|
||||||
#define BLF_ICON_OFFSET 0x100000L
|
#define BLF_ICON_OFFSET 0x100000L
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
blender::Map<std::string, Library *> libraries_map_;
|
blender::Map<std::string, Library *> libraries_map_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* In case an explicitely added ID has the same session_uid as an existing one in current
|
* In case an explicitly added ID has the same session_uid as an existing one in current
|
||||||
* context, the added one should be able to 'steal' that session_uid in the context, and
|
* context, the added one should be able to 'steal' that session_uid in the context, and
|
||||||
* re-assign a new one to the other ID.
|
* re-assign a new one to the other ID.
|
||||||
*/
|
*/
|
||||||
@ -241,17 +241,17 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
* Control how to handle IDs and their dependencies when they are added to this context.
|
* Control how to handle IDs and their dependencies when they are added to this context.
|
||||||
*
|
*
|
||||||
* \note For linked IDs, if #MAKE_LOCAL is not used, the library ID pointer is _not_ considered
|
* \note For linked IDs, if #MAKE_LOCAL is not used, the library ID pointer is _not_ considered
|
||||||
* nor hanlded as a regular dependency. Instead, the library is _always_ added to the context
|
* nor handled as a regular dependency. Instead, the library is _always_ added to the context
|
||||||
* data, and never duplicated. Also, library matching always happens based on absolute filepath.
|
* data, and never duplicated. Also, library matching always happens based on absolute filepath.
|
||||||
*
|
*
|
||||||
* \warning Heterogenous usages of these operations flags during a same PartialWriteContext
|
* \warning Heterogenous usages of these operations flags during a same PartialWriteContext
|
||||||
* session may not generate expected results. Typically, once an ID has been added to the context
|
* session may not generate expected results. Typically, once an ID has been added to the context
|
||||||
* as 'matching' counterpart of the source Main (i.e. sharing the same session UID), it will not
|
* as 'matching' counterpart of the source Main (i.e. sharing the same session UID), it will not
|
||||||
* be re-processed further if found again as dependency of another ID, or added explicitely as
|
* be re-processed further if found again as dependency of another ID, or added explicitly as
|
||||||
* root ID.
|
* root ID.
|
||||||
* So e.g. if an ID is added (explicitely or implicitely) but none of its dependencies are (using
|
* So e.g. if an ID is added (explicitly or implicitly) but none of its dependencies are (using
|
||||||
* `CLEAR_DEPENDENCIES`), re-adding the same ID (explicitely or implicitely) with e.g.
|
* `CLEAR_DEPENDENCIES`), re-adding the same ID (explicitly or implicitly) with e.g.
|
||||||
* `ADD_DEPENDENCIES` set wil __not__ add its dependencies.
|
* `ADD_DEPENDENCIES` set will __not__ add its dependencies.
|
||||||
* This is not expected to be an issue in current use-cases.
|
* This is not expected to be an issue in current use-cases.
|
||||||
*/
|
*/
|
||||||
enum IDAddOperations {
|
enum IDAddOperations {
|
||||||
@ -272,7 +272,7 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
* Clear all dependency IDs that are not in the partial write context. Mutually exclusive with
|
* Clear all dependency IDs that are not in the partial write context. Mutually exclusive with
|
||||||
* #ADD_DEPENDENCIES.
|
* #ADD_DEPENDENCIES.
|
||||||
*
|
*
|
||||||
* WARNING: This also means that dependencies like obdata, shapekeys or actions are not
|
* WARNING: This also means that dependencies like obdata, shape-keys or actions are not
|
||||||
* duplicated either.
|
* duplicated either.
|
||||||
*/
|
*/
|
||||||
CLEAR_DEPENDENCIES = 1 << 8,
|
CLEAR_DEPENDENCIES = 1 << 8,
|
||||||
@ -282,8 +282,8 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
*/
|
*/
|
||||||
ADD_DEPENDENCIES = 1 << 9,
|
ADD_DEPENDENCIES = 1 << 9,
|
||||||
/**
|
/**
|
||||||
* For each explicitely added IDs (i.e. these with a fake user), ensure all of their
|
* For each explicitly added IDs (i.e. these with a fake user), ensure all of their
|
||||||
* dependencies are independant copies, instead of being shared with other explicitely added
|
* dependencies are independent copies, instead of being shared with other explicitly added
|
||||||
* IDs. Only relevant with #ADD_DEPENDENCIES.
|
* IDs. Only relevant with #ADD_DEPENDENCIES.
|
||||||
*
|
*
|
||||||
* \warning Implies that the `session_uid` of these duplicated dependencies will be different
|
* \warning Implies that the `session_uid` of these duplicated dependencies will be different
|
||||||
@ -335,7 +335,7 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
* Delete the copy of the given ID from the partial write context.
|
* Delete the copy of the given ID from the partial write context.
|
||||||
*
|
*
|
||||||
* \note The search is based on the #ID.session_uid of the given ID. This means that if
|
* \note The search is based on the #ID.session_uid of the given ID. This means that if
|
||||||
* `duplicate_depencies` option was used when adding the ID, these independant dependencies
|
* `duplicate_depencies` option was used when adding the ID, these independent dependencies
|
||||||
* duplicates cannot be removed directly from the context. Use #remove_unused for this.
|
* duplicates cannot be removed directly from the context. Use #remove_unused for this.
|
||||||
*
|
*
|
||||||
* \note No dependencies will be removed. Use #remove_unused to remove all unused IDs from the
|
* \note No dependencies will be removed. Use #remove_unused to remove all unused IDs from the
|
||||||
@ -383,8 +383,8 @@ class PartialWriteContext : NonCopyable, NonMovable {
|
|||||||
* - API to replace the matching context IDs by a 'new version' (similar to 'add_id', but
|
* - API to replace the matching context IDs by a 'new version' (similar to 'add_id', but
|
||||||
* ensuring that the context ID, if it already exists, is a pristine copy of the given source
|
* ensuring that the context ID, if it already exists, is a pristine copy of the given source
|
||||||
* one).
|
* one).
|
||||||
* - Rework the remapping of relative filepaths, since data already exisitng in the
|
* - Rework the remapping of relative filepaths, since data already existing in the
|
||||||
* loaded-from-disk temp context wil have different rootpath than the data from current
|
* loaded-from-disk temp context will have different root-path than the data from current
|
||||||
* G_MAIN.
|
* G_MAIN.
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
@ -1825,7 +1825,7 @@ ID *PartialWriteContext::id_add(
|
|||||||
id = BKE_id_owner_get(const_cast<ID *>(id), true);
|
id = BKE_id_owner_get(const_cast<ID *>(id), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The given ID may have already been added (either explicitely or as a dependency) before. */
|
/* The given ID may have already been added (either explicitly or as a dependency) before. */
|
||||||
ID *ctx_root_id = BKE_main_idmap_lookup_uid(matching_uid_map_, id->session_uid);
|
ID *ctx_root_id = BKE_main_idmap_lookup_uid(matching_uid_map_, id->session_uid);
|
||||||
if (ctx_root_id) {
|
if (ctx_root_id) {
|
||||||
/* If the root orig ID is already in the context, assume all of its dependencies are as well.
|
/* If the root orig ID is already in the context, assume all of its dependencies are as well.
|
||||||
@ -1908,7 +1908,7 @@ ID *PartialWriteContext::id_add(
|
|||||||
return IDWALK_RET_NOP;
|
return IDWALK_RET_NOP;
|
||||||
}
|
}
|
||||||
/* else if (add_dependencies) */
|
/* else if (add_dependencies) */
|
||||||
/* The given ID may have already been added (either explicitely or as a dependency) before. */
|
/* The given ID may have already been added (either explicitly or as a dependency) before. */
|
||||||
ID *ctx_deps_id = nullptr;
|
ID *ctx_deps_id = nullptr;
|
||||||
if (duplicate_dependencies) {
|
if (duplicate_dependencies) {
|
||||||
ctx_deps_id = local_ctx_id_map.lookup(orig_deps_id);
|
ctx_deps_id = local_ctx_id_map.lookup(orig_deps_id);
|
||||||
@ -1923,7 +1923,7 @@ ID *PartialWriteContext::id_add(
|
|||||||
* a case is bad practice. On the other hand, some of these pointers are present in
|
* a case is bad practice. On the other hand, some of these pointers are present in
|
||||||
* 'normal' IDs, like e.g. the parent collections ones. This implies that currently, all
|
* 'normal' IDs, like e.g. the parent collections ones. This implies that currently, all
|
||||||
* attempt to adding a collection to a partial write context should make usage of a custom
|
* attempt to adding a collection to a partial write context should make usage of a custom
|
||||||
* `dependencies_filter_cb` function to explicitely clear these pointers. */
|
* `dependencies_filter_cb` function to explicitly clear these pointers. */
|
||||||
CLOG_ERROR(&LOG_PARTIALWRITE,
|
CLOG_ERROR(&LOG_PARTIALWRITE,
|
||||||
"First dependency to ID '%s' found through a 'loopback' usage from ID '%s', "
|
"First dependency to ID '%s' found through a 'loopback' usage from ID '%s', "
|
||||||
"this should never happen",
|
"this should never happen",
|
||||||
|
@ -579,7 +579,7 @@ bool BKE_lib_id_make_local(Main *bmain, ID *id, const int flags)
|
|||||||
const bool lib_local = (flags & LIB_ID_MAKELOCAL_FULL_LIBRARY) != 0;
|
const bool lib_local = (flags & LIB_ID_MAKELOCAL_FULL_LIBRARY) != 0;
|
||||||
|
|
||||||
/* Skip indirectly linked IDs, unless the whole library is made local, or handling them is
|
/* Skip indirectly linked IDs, unless the whole library is made local, or handling them is
|
||||||
* explicitely requested. */
|
* explicitly requested. */
|
||||||
if (!(lib_local || (flags & LIB_ID_MAKELOCAL_INDIRECT) != 0) && (id->tag & LIB_TAG_INDIRECT)) {
|
if (!(lib_local || (flags & LIB_ID_MAKELOCAL_INDIRECT) != 0) && (id->tag & LIB_TAG_INDIRECT)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -934,7 +934,7 @@ float3 whitepoint_from_temp_tint(const float temperature, const float tint)
|
|||||||
const float2 isotherm = normalize(interpolate(isotherm0, isotherm1, f));
|
const float2 isotherm = normalize(interpolate(isotherm0, isotherm1, f));
|
||||||
|
|
||||||
/* Offset away from the Planckian locus according to the tint.
|
/* Offset away from the Planckian locus according to the tint.
|
||||||
* Tint is parametrized such that +-3000 tint corresponds to +-1 delta UV. */
|
* Tint is parameterized such that +-3000 tint corresponds to +-1 delta UV. */
|
||||||
uv -= isotherm * tint / 3000.0f;
|
uv -= isotherm * tint / 3000.0f;
|
||||||
|
|
||||||
/* Convert CIE 1960 uv -> xyY. */
|
/* Convert CIE 1960 uv -> xyY. */
|
||||||
|
@ -35,7 +35,7 @@ class ActionFilterTest : public testing::Test {
|
|||||||
|
|
||||||
static void SetUpTestSuite()
|
static void SetUpTestSuite()
|
||||||
{
|
{
|
||||||
/* BKE_id_free() hits a code path that uses CLOG, which crashes if not initialised properly. */
|
/* BKE_id_free() hits a code path that uses CLOG, which crashes if not initialized properly. */
|
||||||
CLG_init();
|
CLG_init();
|
||||||
|
|
||||||
/* To make id_can_have_animdata() and friends work, the `id_types` array needs to be set up. */
|
/* To make id_can_have_animdata() and friends work, the `id_types` array needs to be set up. */
|
||||||
|
@ -759,7 +759,7 @@ struct PaintOperationExecutor {
|
|||||||
const bool is_first_sample = (curve_points.size() == 1);
|
const bool is_first_sample = (curve_points.size() == 1);
|
||||||
|
|
||||||
/* Use the vector from the previous to the next point. Set the direction based on the first two
|
/* Use the vector from the previous to the next point. Set the direction based on the first two
|
||||||
* samples. For subsuquent samples, interpolate with the previous direction to get a smoothed
|
* samples. For subsequent samples, interpolate with the previous direction to get a smoothed
|
||||||
* value over time. */
|
* value over time. */
|
||||||
if (is_first_sample) {
|
if (is_first_sample) {
|
||||||
self.smoothed_pen_direction_ = self.screen_space_coords_orig_.last() - coords;
|
self.smoothed_pen_direction_ = self.screen_space_coords_orig_.last() - coords;
|
||||||
@ -842,7 +842,7 @@ struct PaintOperationExecutor {
|
|||||||
MutableSpan<float> new_radii = drawing_->radii_for_write().slice(new_points);
|
MutableSpan<float> new_radii = drawing_->radii_for_write().slice(new_points);
|
||||||
MutableSpan<float> new_opacities = drawing_->opacities_for_write().slice(new_points);
|
MutableSpan<float> new_opacities = drawing_->opacities_for_write().slice(new_points);
|
||||||
|
|
||||||
/* Interploate the screen space positions. */
|
/* Interpolate the screen space positions. */
|
||||||
linear_interpolation<float2>(prev_coords, coords, new_screen_space_coords, is_first_sample);
|
linear_interpolation<float2>(prev_coords, coords, new_screen_space_coords, is_first_sample);
|
||||||
point_attributes_to_skip.add_multiple({"position", "radius", "opacity"});
|
point_attributes_to_skip.add_multiple({"position", "radius", "opacity"});
|
||||||
|
|
||||||
@ -1158,7 +1158,7 @@ static void trim_stroke_ends(bke::greasepencil::Drawing &drawing,
|
|||||||
BLI_assert(screen_space_positions_attribute.is_span());
|
BLI_assert(screen_space_positions_attribute.is_span());
|
||||||
const Span<float2> screen_space_positions =
|
const Span<float2> screen_space_positions =
|
||||||
screen_space_positions_attribute.get_internal_span().slice(points);
|
screen_space_positions_attribute.get_internal_span().slice(points);
|
||||||
/* Extract the drawn stroke into a seperate geometry, so we can trim the ends for just this
|
/* Extract the drawn stroke into a separate geometry, so we can trim the ends for just this
|
||||||
* stroke. */
|
* stroke. */
|
||||||
bke::CurvesGeometry stroke = bke::curves_copy_curve_selection(
|
bke::CurvesGeometry stroke = bke::curves_copy_curve_selection(
|
||||||
drawing.strokes(), IndexRange::from_single(active_curve), {});
|
drawing.strokes(), IndexRange::from_single(active_curve), {});
|
||||||
|
@ -170,7 +170,7 @@ void calc_brush_cube_distances(const SculptSession &ss,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Scale the distances based on the brush radius and the cached "hardness" setting, which increases
|
* Scale the distances based on the brush radius and the cached "hardness" setting, which increases
|
||||||
* the strength of the effect for vertices torwards the outside of the radius.
|
* the strength of the effect for vertices towards the outside of the radius.
|
||||||
*/
|
*/
|
||||||
void apply_hardness_to_distances(float radius, float hardness, MutableSpan<float> distances);
|
void apply_hardness_to_distances(float radius, float hardness, MutableSpan<float> distances);
|
||||||
inline void apply_hardness_to_distances(const StrokeCache &cache,
|
inline void apply_hardness_to_distances(const StrokeCache &cache,
|
||||||
|
@ -1533,7 +1533,7 @@ static void grease_pencil_brush_cursor_draw(PaintCursorContext *pcontext)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hide the cursor while drwaing. */
|
/* Hide the cursor while drawing. */
|
||||||
if (grease_pencil->runtime->is_drawing_stroke) {
|
if (grease_pencil->runtime->is_drawing_stroke) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ vec2 compute_2d_gabor_noise_cell(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
/* Computes the Gabor noise value by dividing the space into a grid and evaluating the Gabor noise
|
||||||
* in the space of each cell of the 3x3 cell neighbourhood. */
|
* in the space of each cell of the 3x3 cell neighborhood. */
|
||||||
vec2 compute_2d_gabor_noise(vec2 coordinates,
|
vec2 compute_2d_gabor_noise(vec2 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
@ -249,7 +249,7 @@ vec2 compute_3d_gabor_noise_cell(
|
|||||||
return noise;
|
return noise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Identical to compute_2d_gabor_noise but works in the 3D neighbourhood of the noise. */
|
/* Identical to compute_2d_gabor_noise but works in the 3D neighborhood of the noise. */
|
||||||
vec2 compute_3d_gabor_noise(vec3 coordinates,
|
vec2 compute_3d_gabor_noise(vec3 coordinates,
|
||||||
float frequency,
|
float frequency,
|
||||||
float isotropy,
|
float isotropy,
|
||||||
|
@ -46,7 +46,7 @@ void VKShaderInterface::init(const shader::ShaderCreateInfo &info)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Subpass inputs are read as samplers.
|
/* Sub-pass inputs are read as samplers.
|
||||||
* In future this can change depending on extensions that will be supported. */
|
* In future this can change depending on extensions that will be supported. */
|
||||||
uniform_len_ += info.subpass_inputs_.size();
|
uniform_len_ += info.subpass_inputs_.size();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user