Cleanup: spelling in comments
This commit is contained in:
parent
42717596d0
commit
16afff2ddc
|
@ -619,6 +619,6 @@ void GHOST_Wintab::printContextDebugInfo()
|
|||
axis_y.axMax - axis_y.axMin + 1);
|
||||
}
|
||||
|
||||
/* Other stuff while we have a logcontext. */
|
||||
/* Other stuff while we have a log-context. */
|
||||
printf("sysmode %d\n", lc.lcSysMode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -451,7 +451,7 @@ bool last_cylic_segment_is_vector(Span<int8_t> handle_types_left, Span<int8_t> h
|
|||
|
||||
/**
|
||||
* Return true if the handle types at the index are free (#BEZIER_HANDLE_FREE) or vector
|
||||
* (#BEZIER_HANDLE_VECTOR). In these cases, directional continuitity from the previous and next
|
||||
* (#BEZIER_HANDLE_VECTOR). In these cases, directional continuities from the previous and next
|
||||
* evaluated segments is assumed not to be desired.
|
||||
*/
|
||||
bool point_is_sharp(Span<int8_t> handle_types_left, Span<int8_t> handle_types_right, int index);
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace blender::bke::pbvh::pixels {
|
|||
struct TrianglePaintInput {
|
||||
int3 vert_indices;
|
||||
/**
|
||||
* Delta barycentric coordinates between 2 neighbouring UV's in the U direction.
|
||||
* Delta barycentric coordinates between 2 neighboring UV's in the U direction.
|
||||
*
|
||||
* Only the first two coordinates are stored. The third should be recalculated
|
||||
*/
|
||||
|
|
|
@ -78,8 +78,8 @@ const VolumeGrid *BKE_volume_grid_active_get_for_read(const struct Volume *volum
|
|||
const VolumeGrid *BKE_volume_grid_find_for_read(const struct Volume *volume, const char *name);
|
||||
|
||||
/* Tries to set the name of the velocity field. If no such grid exists with the given base name,
|
||||
* this will try common postfixes in order to detect velocity fields split into multiple grids.
|
||||
* Return false if neither finding with the base name nor with the postfixes succeeded. */
|
||||
* this will try common post-fixes in order to detect velocity fields split into multiple grids.
|
||||
* Return false if neither finding with the base name nor with the post-fixes succeeded. */
|
||||
bool BKE_volume_set_velocity_grid_by_name(struct Volume *volume, const char *base_name);
|
||||
|
||||
/* Grid
|
||||
|
|
|
@ -1958,11 +1958,12 @@ static void nlaevalchan_assert_blendOrcombine_compatible(NlaEvalChannelSnapshot
|
|||
BLI_assert(lower_necs->length == blended_necs->length);
|
||||
}
|
||||
|
||||
/** Check each remap domain of blended values individually in case animator had a non-combine NLA
|
||||
/**
|
||||
* Check each remap domain of blended values individually in case animator had a non-combine NLA
|
||||
* strip with a subset of quaternion channels and remapping through any of them failed and thus
|
||||
* potentially has undefined values.
|
||||
*
|
||||
* \returns true if case occured and handled. Returns false if case didn't occur.
|
||||
* \returns true if case occurred and handled. Returns false if case didn't occur.
|
||||
*/
|
||||
static bool nlaevalchan_combine_quaternion_handle_undefined_blend_values(
|
||||
NlaEvalChannelSnapshot *blended_necs, NlaEvalChannelSnapshot *upper_or_lower_necs)
|
||||
|
@ -1992,8 +1993,10 @@ static void nlaevalchan_copy_values(NlaEvalChannelSnapshot *dst, NlaEvalChannelS
|
|||
memcpy(dst->values, src->values, src->length * sizeof(float));
|
||||
}
|
||||
|
||||
/** Copies from lower necs to blended necs if upper necs is NULL or has zero influence.
|
||||
* \return true if copied. */
|
||||
/**
|
||||
* Copies from lower necs to blended necs if upper necs is NULL or has zero influence.
|
||||
* \return true if copied.
|
||||
*/
|
||||
static bool nlaevalchan_blendOrcombine_try_copy_from_lower(NlaEvalChannelSnapshot *lower_necs,
|
||||
NlaEvalChannelSnapshot *upper_necs,
|
||||
const float upper_influence,
|
||||
|
@ -2008,12 +2011,14 @@ static bool nlaevalchan_blendOrcombine_try_copy_from_lower(NlaEvalChannelSnapsho
|
|||
return true;
|
||||
}
|
||||
|
||||
/** Copies to lower necs from blended necs if upper necs is NULL or has zero influence. If
|
||||
/**
|
||||
* Copies to lower necs from blended necs if upper necs is NULL or has zero influence. If
|
||||
* successful, copies blended_necs remap domains to lower_necs.
|
||||
*
|
||||
* Does not check upper value blend domains.
|
||||
*
|
||||
* \return true if copied. */
|
||||
* \return true if copied.
|
||||
*/
|
||||
static bool nlaevalchan_blendOrcombine_try_copy_to_lower(NlaEvalChannelSnapshot *blended_necs,
|
||||
NlaEvalChannelSnapshot *upper_necs,
|
||||
const float upper_influence,
|
||||
|
@ -2033,7 +2038,8 @@ static bool nlaevalchan_blendOrcombine_try_copy_to_lower(NlaEvalChannelSnapshot
|
|||
return true;
|
||||
}
|
||||
|
||||
/** Based on blendmode, blend lower necs with upper necs into blended necs.
|
||||
/**
|
||||
* Based on blendmode, blend lower necs with upper necs into blended necs.
|
||||
*
|
||||
* Each upper value's blend domain determines whether to blend or to copy directly
|
||||
* from lower.
|
||||
|
@ -2133,7 +2139,6 @@ static void nlaevalchan_combine_quaternion(NlaEvalChannelSnapshot *lower_necs,
|
|||
* \param upper_blendmode: Enum value in eNlaStrip_Blend_Mode.
|
||||
* \param upper_influence: Value in range [0, 1].
|
||||
* \param upper_necs: Never NULL.
|
||||
*
|
||||
*/
|
||||
static void nlaevalchan_blendOrcombine(NlaEvalChannelSnapshot *lower_necs,
|
||||
NlaEvalChannelSnapshot *upper_necs,
|
||||
|
|
|
@ -3564,19 +3564,19 @@ void BKE_object_apply_parent_inverse(struct Object *ob)
|
|||
* Use parent's world transform as the child's origin.
|
||||
*
|
||||
* Let:
|
||||
* local = identity
|
||||
* world = orthonormalized(parent)
|
||||
* `local = identity`
|
||||
* `world = orthonormalized(parent)`
|
||||
*
|
||||
* Then:
|
||||
* world = parent @ parentinv @ local
|
||||
* inv(parent) @ world = parentinv
|
||||
* parentinv = inv(parent) @ world
|
||||
* `world = parent @ parentinv @ local`
|
||||
* `inv(parent) @ world = parentinv`
|
||||
* `parentinv = inv(parent) @ world`
|
||||
*
|
||||
* NOTE: If ob->obmat has shear, then this `parentinv` is insufficient because
|
||||
* parent @ parentinv => shearless result
|
||||
* NOTE: If `ob->obmat` has shear, then this `parentinv` is insufficient because
|
||||
* `parent @ parentinv => shearless result`
|
||||
*
|
||||
* Thus, local will have shear which cannot be decomposed into TRS:
|
||||
* local = inv(parent @ parentinv) @ world
|
||||
* `local = inv(parent @ parentinv) @ world`
|
||||
*
|
||||
* This is currently not supported for consistency in the handling of shear during the other
|
||||
* parenting ops: Parent (Keep Transform), Clear [Parent] and Keep Transform.
|
||||
|
@ -3591,11 +3591,11 @@ void BKE_object_apply_parent_inverse(struct Object *ob)
|
|||
|
||||
/* Now, preserve `world` given the new `parentinv`.
|
||||
*
|
||||
* world = parent @ parentinv @ local
|
||||
* inv(parent) @ world = parentinv @ local
|
||||
* inv(parentinv) @ inv(parent) @ world = local
|
||||
* `world = parent @ parentinv @ local`
|
||||
* `inv(parent) @ world = parentinv @ local`
|
||||
* `inv(parentinv) @ inv(parent) @ world = local`
|
||||
*
|
||||
* local = inv(parentinv) @ inv(parent) @ world
|
||||
* `local = inv(parentinv) @ inv(parent) @ world`
|
||||
*/
|
||||
float ob_local[4][4];
|
||||
copy_m4_m4(ob_local, ob->parentinv);
|
||||
|
|
|
@ -22,12 +22,14 @@
|
|||
|
||||
namespace blender::bke::pbvh::pixels {
|
||||
|
||||
/** Durind debugging this check could be enabled. It will write to each image pixel that is covered
|
||||
* by the pbvh. */
|
||||
/**
|
||||
* During debugging this check could be enabled.
|
||||
* It will write to each image pixel that is covered by the PBVH.
|
||||
*/
|
||||
constexpr bool USE_WATERTIGHT_CHECK = false;
|
||||
|
||||
/**
|
||||
* Calculate the delta of two neighbour uv coordinates in the given image buffer.
|
||||
* Calculate the delta of two neighbor UV coordinates in the given image buffer.
|
||||
*/
|
||||
static float2 calc_barycentric_delta(const float2 uvs[3],
|
||||
const float2 start_uv,
|
||||
|
|
|
@ -81,7 +81,7 @@ void eevee_shader_material_create_info_amend(GPUMaterial *gpumat,
|
|||
const bool do_fragment_attrib_load = is_background || is_volume;
|
||||
|
||||
if (is_hair && !info.vertex_out_interfaces_.is_empty()) {
|
||||
/** Hair attributes comme from sampler buffer. Transfer attributes to sampler. */
|
||||
/** Hair attributes come from sampler buffer. Transfer attributes to sampler. */
|
||||
for (auto &input : info.vertex_inputs_) {
|
||||
info.sampler(0, ImageType::FLOAT_BUFFER, input.name, Frequency::BATCH);
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ void DRW_hair_free(void);
|
|||
/* draw_volume.cc */
|
||||
|
||||
/**
|
||||
* Add attributes bindings of volume grids to an exhisting shading group.
|
||||
* Add attributes bindings of volume grids to an existing shading group.
|
||||
* No draw call is added so the caller can decide how to use the data.
|
||||
* \return nullptr if there is something to draw.
|
||||
*/
|
||||
|
|
|
@ -70,7 +70,7 @@ BLI_STATIC_ASSERT_ALIGN(ViewInfos, 16)
|
|||
struct VolumeInfos {
|
||||
/* Object to grid-space. */
|
||||
float4x4 grids_xform[DRW_GRID_PER_VOLUME_MAX];
|
||||
/* NOTE: vec4 for alignement. Only float3 needed. */
|
||||
/* NOTE: vec4 for alignment. Only float3 needed. */
|
||||
float4 color_mul;
|
||||
float density_scale;
|
||||
float temperature_mul;
|
||||
|
|
|
@ -1126,17 +1126,17 @@ static void get_keyframe_values_create_reports(ReportList *reports,
|
|||
for (int i = 0; i < count; i++) {
|
||||
const bool cur_index_evaluated = ELEM(index, i, -1) || force_all;
|
||||
if (!cur_index_evaluated) {
|
||||
/* values[i] was never intended to be remapped. */
|
||||
/* `values[i]` was never intended to be remapped. */
|
||||
continue;
|
||||
}
|
||||
|
||||
if (BLI_BITMAP_TEST_BOOL(successful_remaps, i)) {
|
||||
/* values[i] succesfully remapped. */
|
||||
/* `values[i]` successfully remapped. */
|
||||
continue;
|
||||
}
|
||||
|
||||
total_failed++;
|
||||
/* Report that values[i] were intended to be remapped but failed remapping process. */
|
||||
/* Report that `values[i]` were intended to be remapped but failed remapping process. */
|
||||
BLI_dynstr_appendf(ds_failed_indices, "%d, ", i);
|
||||
}
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ static void cage2d_draw_box_corners(const rctf *r,
|
|||
const float color[3],
|
||||
const float line_width)
|
||||
{
|
||||
/* Note(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
/* NOTE(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */
|
||||
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
immBindBuiltinProgram(GPU_SHADER_3D_POLYLINE_UNIFORM_COLOR);
|
||||
|
@ -442,7 +442,7 @@ static void imm_draw_point_aspect_2d(
|
|||
uint pos, float x, float y, float rad_x, float rad_y, bool solid)
|
||||
{
|
||||
if (solid) {
|
||||
/* Note(Metal/AMD): Small Triangle-list primitives more optimal for GPU HW than Trianglestrip.
|
||||
/* NOTE(Metal/AMD): Small Triangle-list primitives more optimal for GPU HW than Triangle-strip.
|
||||
*/
|
||||
immBegin(GPU_PRIM_TRIS, 6);
|
||||
immVertex2f(pos, x - rad_x, y - rad_y);
|
||||
|
@ -455,7 +455,7 @@ static void imm_draw_point_aspect_2d(
|
|||
immEnd();
|
||||
}
|
||||
else {
|
||||
/* Note(Metal/AMD): Small Line-list primitives more optimal for GPU HW than Linestrip. */
|
||||
/* NOTE(Metal/AMD): Small Line-list primitives more optimal for GPU HW than Line-strip. */
|
||||
immBegin(GPU_PRIM_LINES, 8);
|
||||
immVertex2f(pos, x - rad_x, y - rad_y);
|
||||
immVertex2f(pos, x - rad_x, y + rad_y);
|
||||
|
@ -479,7 +479,7 @@ static void cage2d_draw_circle_wire(const rctf *r,
|
|||
const int draw_options,
|
||||
const float line_width)
|
||||
{
|
||||
/* Note(Metal): Prefer using 3D coordinates with 3D shader input, even if rendering 2D gizmo's.
|
||||
/* NOTE(Metal): Prefer using 3D coordinates with 3D shader input, even if rendering 2D gizmo's.
|
||||
*/
|
||||
uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT);
|
||||
|
||||
|
@ -491,7 +491,7 @@ static void cage2d_draw_circle_wire(const rctf *r,
|
|||
immUniform2fv("viewportSize", &viewport[2]);
|
||||
immUniform1f("lineWidth", line_width * U.pixelsize);
|
||||
|
||||
/* Small 'lines' primitives more efficient for hardware processing than linestrip. */
|
||||
/* Small 'lines' primitives more efficient for hardware processing than line-strip. */
|
||||
immBegin(GPU_PRIM_LINES, 8);
|
||||
immVertex3f(pos, r->xmin, r->ymin, 0.0f);
|
||||
immVertex3f(pos, r->xmax, r->ymin, 0.0f);
|
||||
|
|
|
@ -1638,7 +1638,7 @@ struct CollectionAddInfo {
|
|||
ushort local_view_bits;
|
||||
/* The transform that should be applied to the collection, determined through operator properties
|
||||
* if set (e.g. to place the collection under the cursor), otherwise through context (e.g. 3D
|
||||
* cursor location). */
|
||||
* cursor location). */
|
||||
float loc[3], rot[3];
|
||||
};
|
||||
|
||||
|
|
|
@ -855,7 +855,7 @@ bool ED_object_modifier_apply(Main *bmain,
|
|||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||
ModifierData *md_eval = (ob_eval) ? BKE_modifiers_findby_name(ob_eval, md->name) : md;
|
||||
|
||||
/* allow apply of a not-realtime modifier, by first re-enabling realtime. */
|
||||
/* Allow apply of a non-real-time modifier, by first re-enabling real-time. */
|
||||
int prev_mode = md_eval->mode;
|
||||
md_eval->mode |= eModifierMode_Realtime;
|
||||
|
||||
|
|
|
@ -984,7 +984,7 @@ void MOD_lineart_smooth_chains(LineartRenderBuffer *rb, float tolerance)
|
|||
/* No need to care for different line types/occlusion and so on, because at this stage they
|
||||
* are all the same within a chain. */
|
||||
|
||||
/* If p3 is within the p1-p2 segment of a width of "tolerance" */
|
||||
/* If p3 is within the p1-p2 segment of a width of "tolerance". */
|
||||
if (dist_to_line_segment_v2(eci3->pos, eci->pos, eci2->pos) < tolerance) {
|
||||
/* And if p4 is on the extension of p1-p2 , we remove p3. */
|
||||
if ((eci4 = eci3->next) && (dist_to_line_v2(eci4->pos, eci->pos, eci2->pos) < tolerance)) {
|
||||
|
|
|
@ -116,7 +116,7 @@ typedef enum eGPUDefaultValue {
|
|||
|
||||
typedef struct GPUCodegenOutput {
|
||||
char *attr_load;
|
||||
/* Nodetree functions calls. */
|
||||
/* Node-tree functions calls. */
|
||||
char *displacement;
|
||||
char *surface;
|
||||
char *volume;
|
||||
|
|
|
@ -627,7 +627,7 @@ struct ShaderCreateInfo {
|
|||
Resource res(Resource::BindType::SAMPLER, slot);
|
||||
res.sampler.type = type;
|
||||
res.sampler.name = name;
|
||||
/* Produces asan errors for the moment. */
|
||||
/* Produces ASAN errors for the moment. */
|
||||
// res.sampler.sampler = sampler;
|
||||
UNUSED_VARS(sampler);
|
||||
((freq == Frequency::PASS) ? pass_resources_ : batch_resources_).append(res);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* their standard libraries are not quite there yet.
|
||||
* LLVM/libc++ only has a float parser since LLVM 14,
|
||||
* and gcc/libstdc++ since 11.1. So until at least these are
|
||||
* the mininum spec, use an external library. */
|
||||
* the minimum spec, use an external library. */
|
||||
#include "fast_float.h"
|
||||
#include <charconv>
|
||||
|
||||
|
|
|
@ -364,7 +364,7 @@ typedef struct wmKeyMapItem {
|
|||
short type;
|
||||
/** KM_ANY, KM_PRESS, KM_NOTHING etc. */
|
||||
int8_t val;
|
||||
/** Use when `val == KM_CLICK_DRAG`, */
|
||||
/** Use when `val == KM_CLICK_DRAG`. */
|
||||
int8_t direction;
|
||||
/** `oskey` also known as apple, windows-key or super. */
|
||||
short shift, ctrl, alt, oskey;
|
||||
|
|
|
@ -562,8 +562,8 @@ static void rna_PaintModeSettings_canvas_source_update(bContext *C, PointerRNA *
|
|||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
Object *ob = CTX_data_active_object(C);
|
||||
/* When canvas source changes the pbvh would require updates when switching between color
|
||||
* attributes. */
|
||||
/* When canvas source changes the PBVH would require updates when switching between color
|
||||
* attributes. */
|
||||
if (ob && ob->type == OB_MESH) {
|
||||
BKE_texpaint_slots_refresh_object(scene, ob);
|
||||
DEG_id_tag_update(&ob->id, 0);
|
||||
|
|
|
@ -722,7 +722,7 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node
|
|||
}
|
||||
case SH_NODE_ADD_SHADER: {
|
||||
/* Simple passthrough node. Each original inputs will get the same weight. */
|
||||
/* TODO(fclem) Better use some kind of reroute node? */
|
||||
/* TODO(fclem): Better use some kind of reroute node? */
|
||||
nodes_copy[id] = nodeAddStaticNode(NULL, ntree, SH_NODE_MATH);
|
||||
nodes_copy[id]->custom1 = NODE_MATH_ADD;
|
||||
nodes_copy[id]->tmp_flag = -2; /* Copy */
|
||||
|
@ -761,14 +761,14 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node
|
|||
}
|
||||
id++;
|
||||
/* Reroute the weight input to the 3 processing nodes. Simplify linking later-on. */
|
||||
/* TODO(fclem) Better use some kind of reroute node? */
|
||||
/* TODO(fclem): Better use some kind of reroute node? */
|
||||
nodes_copy[id] = nodeAddStaticNode(NULL, ntree, SH_NODE_MATH);
|
||||
nodes_copy[id]->custom1 = NODE_MATH_ADD;
|
||||
nodes_copy[id]->tmp_flag = -2; /* Copy */
|
||||
((bNodeSocketValueFloat *)ntree_shader_node_input_get(nodes_copy[id], 0)->default_value)
|
||||
->value = 0.0f;
|
||||
id++;
|
||||
/* Link between nodes for the substraction. */
|
||||
/* Link between nodes for the subtraction. */
|
||||
fromnode = nodes_copy[id_start];
|
||||
tonode = nodes_copy[id_start + 1];
|
||||
fromsock = ntree_shader_node_output_get(fromnode, 0);
|
||||
|
@ -890,8 +890,8 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node
|
|||
break;
|
||||
}
|
||||
|
||||
/* Manually add the link to the socket to avoid calling
|
||||
* BKE_ntree_update_main_tree(G.main, oop, nullptr. */
|
||||
/* Manually add the link to the socket to avoid calling:
|
||||
* `BKE_ntree_update_main_tree(G.main, oop, nullptr)`. */
|
||||
fromsock->link = nodeAddLink(ntree, fromnode, fromsock, tonode, tosock);
|
||||
BLI_assert(fromsock->link);
|
||||
}
|
||||
|
|
|
@ -37,15 +37,15 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat,
|
|||
NodeTexImage *tex_original = (NodeTexImage *)node_original->storage;
|
||||
ImageUser *iuser = &tex_original->iuser;
|
||||
eGPUSamplerState sampler = GPU_SAMPLER_REPEAT | GPU_SAMPLER_ANISO | GPU_SAMPLER_FILTER;
|
||||
/* TODO(fclem): For now assume mipmap is always enabled. */
|
||||
/* TODO(@fclem): For now assume mipmap is always enabled. */
|
||||
if (true) {
|
||||
sampler |= GPU_SAMPLER_MIPMAP;
|
||||
}
|
||||
|
||||
GPUNodeLink *outalpha;
|
||||
|
||||
/* HACK(fclem): For lookdev mode: do not compile an empty environment and just create an empty
|
||||
* texture entry point. We manually bind to it after DRW_shgroup_add_material_resources(). */
|
||||
/* HACK(@fclem): For lookdev mode: do not compile an empty environment and just create an empty
|
||||
* texture entry point. We manually bind to it after #DRW_shgroup_add_material_resources(). */
|
||||
if (!ima && !GPU_material_flag_get(mat, GPU_MATFLAG_LOOKDEV_HACK)) {
|
||||
return GPU_stack_link(mat, node, "node_tex_environment_empty", in, out);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue