Cleanup: correct spelling in comments

This commit is contained in:
Campbell Barton 2021-02-05 16:23:34 +11:00
parent b62b923f54
commit 17e1e2bfd8
417 changed files with 833 additions and 823 deletions

@ -103,7 +103,7 @@ static bool compile_cuda(CompilationSettings &settings)
return false;
}
/* Tranfer options to a classic C array. */
/* Transfer options to a classic C array. */
vector<const char *> opts(options.size());
for (size_t i = 0; i < options.size(); i++) {
opts[i] = options[i].c_str();

@ -31,7 +31,7 @@ bool BlenderSync::sync_dupli_particle(BL::Object &b_ob,
BL::DepsgraphObjectInstance &b_instance,
Object *object)
{
/* test if this dupli was generated from a particle sytem */
/* Test if this dupli was generated from a particle system. */
BL::ParticleSystem b_psys = b_instance.particle_system();
if (!b_psys)
return false;

@ -136,7 +136,7 @@ class BlenderSession {
/* ** Resumable render ** */
/* Overall number of chunks in which the sample range is to be devided. */
/* Overall number of chunks in which the sample range is to be divided. */
static int num_resumable_chunks;
/* Current resumable chunk index to render. */

@ -942,7 +942,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine &b_engine,
else if (shadingsystem == 1)
params.shadingsystem = SHADINGSYSTEM_OSL;
/* color managagement */
/* Color management. */
params.display_buffer_linear = b_engine.support_display_space_shader(b_scene);
if (b_engine.is_preview()) {

@ -703,7 +703,7 @@ BVHNode *BVHBuild::build_node(const BVHRange &range,
unalignedSplitSAH = params.sah_node_cost * unaligned_split.bounds.half_area() +
params.sah_primitive_cost * unaligned_split.nodeSAH;
/* TOOD(sergey): Check we can create leaf already. */
/* Check whether unaligned split is better than the regulat one. */
/* Check whether unaligned split is better than the regular one. */
if (unalignedSplitSAH < splitSAH) {
do_unalinged_split = true;
}
@ -842,7 +842,7 @@ BVHNode *BVHBuild::create_leaf_node(const BVHRange &range, const vector<BVHRefer
vector<BVHReference, LeafReferenceStackAllocator> object_references;
uint visibility[PRIMITIVE_NUM_TOTAL] = {0};
/* NOTE: Keep initializtion in sync with actual number of primitives. */
/* NOTE: Keep initialization in sync with actual number of primitives. */
BoundBox bounds[PRIMITIVE_NUM_TOTAL] = {
BoundBox::empty, BoundBox::empty, BoundBox::empty, BoundBox::empty};
int ob_num = 0;

@ -184,7 +184,7 @@ CUDADevice::CUDADevice(DeviceInfo &info, Stats &stats, Profiler &profiler, bool
functions.loaded = false;
/* Intialize CUDA. */
/* Initialize CUDA. */
CUresult result = cuInit(0);
if (result != CUDA_SUCCESS) {
set_error(string_printf("Failed to initialize CUDA runtime (%s)", cuewErrorString(result)));

@ -296,7 +296,7 @@ class MultiDevice : public Device {
i++;
}
/* Change geomtry BVH pointers back to the multi BVH */
/* Change geometry BVH pointers back to the multi BVH. */
for (size_t k = 0; k < bvh->geometry.size(); ++k) {
bvh->geometry[k]->bvh = geom_bvhs[k];
}

@ -80,7 +80,7 @@ class network_device_memory : public device_memory {
vector<char> local_data;
};
/* Common netowrk error function / object for both DeviceNetwork and DeviceServer*/
/* Common network error function / object for both DeviceNetwork and DeviceServer. */
class NetworkError {
public:
NetworkError()

@ -34,7 +34,7 @@ CCL_NAMESPACE_BEGIN
/* Disable workarounds, seems to be working fine on latest drivers. */
# define CYCLES_DISABLE_DRIVER_WORKAROUNDS
/* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workaounds for testing */
/* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workarounds for testing. */
# ifndef CYCLES_DISABLE_DRIVER_WORKAROUNDS
/* Work around AMD driver hangs by ensuring each command is finished before doing anything else. */
# undef clEnqueueNDRangeKernel
@ -287,7 +287,7 @@ class OpenCLDevice : public Device {
/* Try to load the program from device cache or disk */
bool load();
/* Compile the kernel (first separate, failback to local) */
/* Compile the kernel (first separate, fail-back to local). */
void compile();
/* Create the OpenCL kernels after loading or compiling */
void create_kernels();
@ -628,7 +628,7 @@ class OpenCLDevice : public Device {
void release_mem_object_safe(cl_mem mem);
void release_program_safe(cl_program program);
/* ** Those guys are for workign around some compiler-specific bugs ** */
/* ** Those guys are for working around some compiler-specific bugs ** */
cl_program load_cached_kernel(ustring key, thread_scoped_lock &cache_locker);

@ -2151,7 +2151,7 @@ void OpenCLDevice::release_program_safe(cl_program program)
}
}
/* ** Those guys are for workign around some compiler-specific bugs ** */
/* ** Those guys are for working around some compiler-specific bugs ** */
cl_program OpenCLDevice::load_cached_kernel(ustring key, thread_scoped_lock &cache_locker)
{

@ -42,7 +42,7 @@ CCL_NAMESPACE_BEGIN
#define BVH_FEATURE(f) (((BVH_FUNCTION_FEATURES) & (f)) != 0)
/* Debugging heleprs */
/* Debugging helpers. */
#ifdef __KERNEL_DEBUG__
# define BVH_DEBUG_INIT() \
do { \

@ -125,7 +125,7 @@ ccl_device_inline void microfacet_beckmann_sample_slopes(KernelGlobals *kg,
}
*slope_y = fast_ierff(2.0f * randv - 1.0f);
#else
/* Use precomputed table on CPU, it gives better perfomance. */
/* Use precomputed table on CPU, it gives better performance. */
int beckmann_table_offset = kernel_data.tables.beckmann_offset;
*slope_x = lookup_table_read_2D(

@ -78,7 +78,7 @@ ccl_device void kernel_filter_construct_transform(const ccl_global float *ccl_re
/* === Generate the feature transformation. ===
* This transformation maps the num_features-dimensional feature space to a reduced feature
* (r-feature) space which generally has fewer dimensions.
* This mainly helps to prevent overfitting. */
* This mainly helps to prevent over-fitting. */
float feature_matrix[DENOISE_FEATURES * DENOISE_FEATURES];
math_matrix_zero(feature_matrix, num_features);
FOR_PIXEL_WINDOW
@ -91,7 +91,7 @@ ccl_device void kernel_filter_construct_transform(const ccl_global float *ccl_re
math_matrix_jacobi_eigendecomposition(feature_matrix, transform, num_features, transform_stride);
*rank = 0;
/* Prevent overfitting when a small window is used. */
/* Prevent over-fitting when a small window is used. */
int max_rank = min(num_features, num_pixels / 3);
if (pca_threshold < 0.0f) {
float threshold_energy = 0.0f;

@ -93,7 +93,7 @@ ccl_device void kernel_filter_construct_transform(const float *ccl_restrict buff
math_matrix_jacobi_eigendecomposition(feature_matrix, transform, num_features, 1);
*rank = 0;
/* Prevent overfitting when a small window is used. */
/* Prevent over-fitting when a small window is used. */
int max_rank = min(num_features, num_pixels / 3);
if (pca_threshold < 0.0f) {
float threshold_energy = 0.0f;

@ -435,7 +435,7 @@ ccl_device_inline float bvh_instance_push(
return t;
}
/* Transorm ray to exit static object in BVH */
/* Transform ray to exit static object in BVH. */
ccl_device_inline float bvh_instance_pop(
KernelGlobals *kg, int object, const Ray *ray, float3 *P, float3 *dir, float3 *idir, float t)
@ -497,7 +497,7 @@ ccl_device_inline float bvh_instance_motion_push(KernelGlobals *kg,
return t;
}
/* Transorm ray to exit motion blurred object in BVH */
/* Transform ray to exit motion blurred object in BVH. */
ccl_device_inline float bvh_instance_motion_pop(KernelGlobals *kg,
int object,

@ -251,7 +251,7 @@ ccl_device void kernel_bake_evaluate(
path_rng_2D(kg, rng_hash, sample, num_samples, PRNG_FILTER_U, &filter_x, &filter_y);
}
/* Barycentric UV with subpixel offset. */
/* Barycentric UV with sub-pixel offset. */
float u = primitive[2];
float v = primitive[3];

@ -63,12 +63,12 @@ ccl_device float4 film_map(KernelGlobals *kg, float4 rgba_in, float scale)
{
float4 result;
/* conversion to srgb */
/* Conversion to SRGB. */
result.x = color_linear_to_srgb(rgba_in.x * scale);
result.y = color_linear_to_srgb(rgba_in.y * scale);
result.z = color_linear_to_srgb(rgba_in.z * scale);
/* clamp since alpha might be > 1.0 due to russian roulette */
/* Clamp since alpha might be > 1.0 due to Russian roulette. */
result.w = saturate(rgba_in.w * scale);
return result;

@ -21,7 +21,7 @@ CCL_NAMESPACE_BEGIN
/* "Correlated Multi-Jittered Sampling"
* Andrew Kensler, Pixar Technical Memo 13-01, 2013 */
/* todo: find good value, suggested 64 gives pattern on cornell box ceiling */
/* TODO: find good value, suggested 64 gives pattern on cornell box ceiling. */
#define CMJ_RANDOM_OFFSET_LIMIT 4096
ccl_device_inline bool cmj_is_pow2(int i)
@ -179,7 +179,7 @@ ccl_device void cmj_sample_2D(int s, int N, int p, float *fx, float *fy)
smodm = cmj_fast_mod_pow2(s, m);
}
else {
/* Doing s*inmv gives precision issues here. */
/* Doing `s * inmv` gives precision issues here. */
sdivm = s / m;
smodm = s - sdivm * m;
}

@ -155,7 +155,7 @@ ccl_device_forceinline void kernel_branched_path_volume(KernelGlobals *kg,
else
# endif /* __VOLUME_DECOUPLED__ */
{
/* GPU: no decoupled ray marching, scatter probalistically */
/* GPU: no decoupled ray marching, scatter probabilistically. */
int num_samples = kernel_data.integrator.volume_samples;
float num_samples_inv = 1.0f / num_samples;

@ -304,7 +304,7 @@ ccl_device_inline bool sample_is_even(int pattern, int sample)
#elif defined(__KERNEL_OPENCL__)
return popcount(sample & 0xaaaaaaaa) & 1;
#else
/* TODO(Stefan): popcnt intrinsic for Windows with fallback for older CPUs. */
/* TODO(Stefan): pop-count intrinsic for Windows with fallback for older CPUs. */
int i = sample & 0xaaaaaaaa;
i = i - ((i >> 1) & 0x55555555);
i = (i & 0x33333333) + ((i >> 2) & 0x33333333);

@ -1641,7 +1641,7 @@ enum RayState {
RAY_UPDATE_BUFFER,
/* Denotes ray needs to skip most surface shader work. */
RAY_HAS_ONLY_VOLUME,
/* Donotes ray has hit background */
/* Denotes ray has hit background */
RAY_HIT_BACKGROUND,
/* Denotes ray has to be regenerated */
RAY_TO_REGENERATE,
@ -1699,7 +1699,7 @@ typedef struct WorkTile {
ccl_global float *buffer;
} WorkTile;
/* Precoumputed sample table sizes for PMJ02 sampler. */
/* Pre-computed sample table sizes for PMJ02 sampler. */
#define NUM_PMJ_SAMPLES 64 * 64
#define NUM_PMJ_PATTERNS 48

@ -1033,7 +1033,7 @@ bool OSLRenderServices::get_background_attribute(
return set_attribute_int(f, type, derivatives, val);
}
else if (name == u_ndc) {
/* NDC coordinates with special exception for otho */
/* NDC coordinates with special exception for orthographic projection. */
OSLThreadData *tdata = kg->osl_tdata;
OSL::ShaderGlobals *globals = &tdata->globals;
float3 ndc[3];

@ -129,7 +129,7 @@ static void shaderdata_to_shaderglobals(
/* clear trace data */
tdata->tracedata.init = false;
/* used by renderservices */
/* Used by render-services. */
sd->osl_globals = kg;
sd->osl_path_state = state;
}

@ -42,7 +42,7 @@ point map_to_sphere(vector dir)
float v, u;
if (len > 0.0) {
if (dir[0] == 0.0 && dir[1] == 0.0) {
u = 0.0; /* Othwise domain error. */
u = 0.0; /* Otherwise domain error. */
}
else {
u = (1.0 - atan2(dir[0], dir[1]) / M_PI) / 2.0;

@ -41,7 +41,7 @@ ccl_device_inline void kernel_split_branched_path_indirect_loop_init(KernelGloba
# undef BRANCHED_STORE
/* set loop counters to intial position */
/* Set loop counters to initial position. */
branched_state->next_closure = 0;
branched_state->next_sample = 0;
}

@ -35,7 +35,7 @@ ccl_device_noinline bool kernel_split_branched_path_volume_indirect_light_iter(K
PathRadiance *L = &kernel_split_state.path_radiance[ray_index];
ShaderData *emission_sd = AS_SHADER_DATA(&kernel_split_state.sd_DL_shadow[ray_index]);
/* GPU: no decoupled ray marching, scatter probalistically */
/* GPU: no decoupled ray marching, scatter probabilistically. */
int num_samples = kernel_data.integrator.volume_samples;
float num_samples_inv = 1.0f / num_samples;

@ -20,7 +20,7 @@ ccl_device void kernel_enqueue_inactive(KernelGlobals *kg,
ccl_local_param unsigned int *local_queue_atomics)
{
#ifdef __BRANCHED_PATH__
/* Enqeueue RAY_INACTIVE rays into QUEUE_INACTIVE_RAYS queue. */
/* Enqueue RAY_INACTIVE rays into QUEUE_INACTIVE_RAYS queue. */
if (ccl_local_id(0) == 0 && ccl_local_id(1) == 0) {
*local_queue_atomics = 0;
}

@ -25,7 +25,7 @@ CCL_NAMESPACE_BEGIN
ccl_device void kernel_shader_setup(KernelGlobals *kg,
ccl_local_param unsigned int *local_queue_atomics)
{
/* Enqeueue RAY_TO_REGENERATE rays into QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS queue. */
/* Enqueue RAY_TO_REGENERATE rays into QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS queue. */
if (ccl_local_id(0) == 0 && ccl_local_id(1) == 0) {
*local_queue_atomics = 0;
}

@ -37,7 +37,7 @@ ccl_device void svm_node_hsv(
color = rgb_to_hsv(color);
/* remember: fmod doesn't work for negative numbers here */
/* Remember: `fmodf` doesn't work for negative numbers here. */
color.x = fmodf(color.x + hue + 0.5f, 1.0f);
color.y = saturate(color.y * sat);
color.z *= val;
@ -48,7 +48,7 @@ ccl_device void svm_node_hsv(
color.y = fac * color.y + (1.0f - fac) * in_color.y;
color.z = fac * color.z + (1.0f - fac) * in_color.z;
/* Clamp color to prevent negative values caused by oversaturation. */
/* Clamp color to prevent negative values caused by over saturation. */
color.x = max(color.x, 0.0f);
color.y = max(color.y, 0.0f);
color.z = max(color.z, 0.0f);

@ -38,7 +38,7 @@ ccl_device float4 svm_image_texture(KernelGlobals *kg, int id, float x, float y,
return r;
}
/* Remap coordnate from 0..1 box to -1..-1 */
/* Remap coordinate from 0..1 box to -1..-1 */
ccl_device_inline float3 texco_remap_square(float3 co)
{
return (co - make_float3(0.5f, 0.5f, 0.5f)) * 2.0f;

@ -615,8 +615,8 @@ ccl_device_noinline float perlin_3d(float x, float y, float z)
*
* Point Offset from v0
* v0 (0, 0, 0, 0)
* v1 (0, 0, 1, 0) The full avx type is computed by inserting the following
* v2 (0, 1, 0, 0) sse types into both the low and high parts of the avx.
* v1 (0, 0, 1, 0) The full AVX type is computed by inserting the following
* v2 (0, 1, 0, 0) sse types into both the low and high parts of the AVX.
* v3 (0, 1, 1, 0)
* v4 (1, 0, 0, 0)
* v5 (1, 0, 1, 0) (0, 1, 0, 1) = shuffle<0, 2, 0, 2>(shuffle<2, 2, 2, 2>(V, V + 1))

@ -205,8 +205,8 @@ typedef enum NodeHairInfo {
NODE_INFO_CURVE_IS_STRAND,
NODE_INFO_CURVE_INTERCEPT,
NODE_INFO_CURVE_THICKNESS,
/*fade for minimum hair width transpency*/
/*NODE_INFO_CURVE_FADE,*/
/* Fade for minimum hair width transiency. */
// NODE_INFO_CURVE_FADE,
NODE_INFO_CURVE_TANGENT_NORMAL,
NODE_INFO_CURVE_RANDOM,
} NodeHairInfo;

@ -1346,7 +1346,7 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress)
bool need_shader_updates = false;
/* check for changes in shaders (newly requested atttributes) */
/* Check for changes in shaders (newly requested attributes). */
foreach (Node *object_node, objects) {
AlembicObject *object = static_cast<AlembicObject *>(object_node);
@ -1626,7 +1626,7 @@ void AlembicProcedural::read_subd(Scene *scene,
mesh->clear_non_sockets();
/* udpate sockets */
/* Update sockets. */
Object *object = abc_object->get_object();
cached_data.transforms.copy_to_socket(frame_time, object, object->get_tfm_socket());
@ -1660,7 +1660,7 @@ void AlembicProcedural::read_subd(Scene *scene,
mesh->set_num_subd_faces(mesh->get_subd_shader().size());
/* udpate attributes */
/* Update attributes. */
update_attributes(mesh->subd_attributes, cached_data, frame_time);

@ -361,7 +361,7 @@ class AlembicProcedural : public Procedural {
/* Tag for an update only if something was modified. */
void tag_update(Scene *scene);
/* Returns a pointer to an exisiting or a newly created AlembicObject for the given path. */
/* Returns a pointer to an existing or a newly created AlembicObject for the given path. */
AlembicObject *get_or_create_object(const ustring &path);
private:

@ -448,7 +448,7 @@ bool RenderBuffers::get_pass_rect(
pixels[1] = f.y * scale_exposure;
pixels[2] = f.z * scale_exposure;
/* clamp since alpha might be > 1.0 due to russian roulette */
/* Clamp since alpha might be > 1.0 due to Russian roulette. */
pixels[3] = saturate(f.w * scale);
}
}

@ -252,11 +252,11 @@ void Camera::update(Scene *scene)
Transform fulltoborder = transform_from_viewplane(viewport_camera_border);
Transform bordertofull = transform_inverse(fulltoborder);
/* ndc to raster */
/* NDC to raster. */
Transform ndctoraster = transform_scale(width, height, 1.0f) * bordertofull;
Transform full_ndctoraster = transform_scale(full_width, full_height, 1.0f) * bordertofull;
/* raster to screen */
/* Raster to screen. */
Transform screentondc = fulltoborder * transform_from_viewplane(viewplane);
Transform screentoraster = ndctoraster * screentondc;
@ -264,7 +264,7 @@ void Camera::update(Scene *scene)
Transform full_screentoraster = full_ndctoraster * screentondc;
Transform full_rastertoscreen = transform_inverse(full_screentoraster);
/* screen to camera */
/* Screen to camera. */
ProjectionTransform cameratoscreen;
if (camera_type == CAMERA_PERSPECTIVE)
cameratoscreen = projection_perspective(fov, nearclip, farclip);

@ -386,7 +386,7 @@ void ColorSpaceManager::free_memory()
#endif
}
/* Template instanstations so we don't have to inline functions. */
/* Template instantiations so we don't have to inline functions. */
template void ColorSpaceManager::to_scene_linear(ustring, uchar *, size_t, bool);
template void ColorSpaceManager::to_scene_linear(ustring, ushort *, size_t, bool);
template void ColorSpaceManager::to_scene_linear(ustring, half *, size_t, bool);

@ -847,7 +847,7 @@ bool DenoiseImage::save_output(const string &out_filepath, string &error)
out.reset();
/* Copy temporary file to outputput filepath. */
/* Copy temporary file to output filepath. */
string rename_error;
if (ok && !OIIO::Filesystem::rename(tmp_filepath, out_filepath, rename_error)) {
error = "Failed to move denoised image to " + out_filepath + ": " + rename_error;

@ -1453,7 +1453,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
if (shader->need_update_uvs) {
device_update_flags |= ATTR_FLOAT2_NEEDS_REALLOC;
/* Attributes might need to be tesselated if added. */
/* Attributes might need to be tessellated if added. */
if (geom->is_mesh()) {
Mesh *mesh = static_cast<Mesh *>(geom);
if (mesh->need_tesselation()) {
@ -1465,7 +1465,7 @@ void GeometryManager::device_update_preprocess(Device *device, Scene *scene, Pro
if (shader->need_update_attribute) {
device_update_flags |= ATTRS_NEED_REALLOC;
/* Attributes might need to be tesselated if added. */
/* Attributes might need to be tessellated if added. */
if (geom->is_mesh()) {
Mesh *mesh = static_cast<Mesh *>(geom);
if (mesh->need_tesselation()) {

@ -276,7 +276,7 @@ void ShaderGraph::connect(ShaderOutput *from, ShaderInput *to)
emission->set_color(make_float3(1.0f, 1.0f, 1.0f));
emission->set_strength(1.0f);
convert = add(emission);
/* Connect float inputs to Strength to save an additional Falue->Color conversion. */
/* Connect float inputs to Strength to save an additional Value->Color conversion. */
if (from->type() == SocketType::FLOAT) {
convert_in = convert->input("Strength");
}

@ -419,7 +419,7 @@ int ImageManager::add_image_slot(ImageLoader *loader,
thread_scoped_lock device_lock(images_mutex);
/* Fnd existing image. */
/* Find existing image. */
for (slot = 0; slot < images.size(); slot++) {
img = images[slot];
if (img && ImageLoader::equals(img->loader, loader) && img->params == params) {

@ -979,7 +979,7 @@ void LightManager::device_update(Device *device,
VLOG(1) << "Total " << scene->lights.size() << " lights.";
/* Detect which lights are enabled, also determins if we need to update the background. */
/* Detect which lights are enabled, also determines if we need to update the background. */
test_enabled_lights(scene);
device_free(device, dscene, need_update_background);

@ -151,7 +151,7 @@ static bool parse_channels(const ImageSpec &in_spec,
string layername, passname, channelname;
if (parse_channel_name(
pass.channel_name, layername, passname, channelname, multiview_channels)) {
/* Channer part of a render layer. */
/* Channel part of a render layer. */
pass.op = parse_channel_operation(passname);
}
else {
@ -163,7 +163,7 @@ static bool parse_channels(const ImageSpec &in_spec,
file_layers[layername].passes.push_back(pass);
}
/* Loop over all detected RenderLayers, check whether they contain a full set of input channels.
/* Loop over all detected render-layers, check whether they contain a full set of input channels.
* Any channels that won't be processed internally are also passed through. */
for (auto &i : file_layers) {
const string &name = i.first;
@ -457,7 +457,7 @@ static bool save_output(const string &filepath,
out.reset();
/* Copy temporary file to outputput filepath. */
/* Copy temporary file to output filepath. */
string rename_error;
if (ok && !OIIO::Filesystem::rename(tmp_filepath, filepath, rename_error)) {
error = "Failed to move merged image to " + filepath + ": " + rename_error;

@ -1612,7 +1612,7 @@ class OSLNode : public ShaderNode {
SHADER_NODE_NO_CLONE_CLASS(OSLNode)
/* ideally we could beter detect this, but we can't query this now */
/* Ideally we could better detect this, but we can't query this now. */
bool has_spatial_varying()
{
return true;

@ -380,7 +380,7 @@ const char *OSLShaderManager::shader_load_filepath(string filepath)
return hash;
}
/* autocompile .OSL to .OSO if needed */
/* Auto-compile .OSL to .OSO if needed. */
if (oso_modified_time == 0 || (oso_modified_time < modified_time)) {
OSLShaderManager::osl_compile(filepath, osopath);
modified_time = path_modified_time(osopath);
@ -562,7 +562,7 @@ OSLNode *OSLShaderManager::osl_node(ShaderGraph *graph,
}
}
/* set bytcode hash or filepath */
/* Set byte-code hash or file-path. */
if (!bytecode_hash.empty()) {
node->bytecode_hash = bytecode_hash;
}

@ -358,7 +358,7 @@ class Scene : public NodeOwner {
DeviceRequestedFeatures get_requested_device_features();
/* Maximumnumber of closure during session lifetime. */
/* Maximum number of closure during session lifetime. */
int max_closure_global;
/* Get maximum number of closures to be used in kernel. */

@ -549,7 +549,7 @@ void DiagSplit::split_ngon(const Mesh::SubdFace &face, Patch *patches, size_t pa
subpatch.edge_v1.indices_decrease_along_edge = true;
subpatch.edge_u0.indices_decrease_along_edge = u0_reversed;
/* Perfrom split. */
/* Perform split. */
{
subpatch.edge_u0.T = T(subpatch.patch, subpatch.c00, subpatch.c10);
subpatch.edge_u1.T = T(subpatch.patch, subpatch.c01, subpatch.c11);
@ -646,7 +646,7 @@ void DiagSplit::post_split()
/* Set start and end indices for edges generated from a split. */
foreach (Edge &edge, edges) {
if (edge.start_vert_index < 0) {
/* Fixup offsets. */
/* Fix up offsets. */
if (edge.top_indices_decrease) {
edge.top_offset = edge.top->T - edge.top_offset;
}

@ -40,7 +40,7 @@ class DiagSplit {
SubdParams params;
vector<Subpatch> subpatches;
/* deque is used so that element pointers remain vaild when size is changed. */
/* `deque` is used so that element pointers remain valid when size is changed. */
deque<Edge> edges;
float3 to_world(Patch *patch, float2 uv);

@ -349,7 +349,7 @@ ccl_device_inline float fractf(float x)
return x - floorf(x);
}
/* Adapted from godotengine math_funcs.h. */
/* Adapted from godot-engine math_funcs.h. */
ccl_device_inline float wrapf(float value, float max, float min)
{
float range = max - min;
@ -385,7 +385,7 @@ ccl_device_inline float nonzerof(float f, float eps)
return f;
}
/* Signum function testing for zero. Matches GLSL and OSL functions. */
/* `signum` function testing for zero. Matches GLSL and OSL functions. */
ccl_device_inline float compatible_signf(float f)
{
if (f == 0.0f) {
@ -754,7 +754,7 @@ ccl_device_inline float2 map_to_sphere(const float3 co)
float u, v;
if (l > 0.0f) {
if (UNLIKELY(co.x == 0.0f && co.y == 0.0f)) {
u = 0.0f; /* othwise domain error */
u = 0.0f; /* Otherwise domain error. */
}
else {
u = (1.0f - atan2f(co.x, co.y) / M_PI_F) / 2.0f;

@ -84,7 +84,7 @@ ccl_device_inline int fast_rint(float x)
{
/* used by sin/cos/tan range reduction. */
#ifdef __KERNEL_SSE4__
/* Single roundps instruction on SSE4.1+ (for gcc/clang at least). */
/* Single `roundps` instruction on SSE4.1+ (for gcc/clang at least). */
return float_to_int(rintf(x));
#else
/* emulate rounding by adding/subtracting 0.5. */
@ -613,7 +613,7 @@ ccl_device_inline float fast_erfcf(float x)
ccl_device_inline float fast_ierff(float x)
{
/* From: Approximating the erfinv function by Mike Giles. */
/* From: Approximating the `erfinv` function by Mike Giles. */
/* To avoid trouble at the limit, clamp input to 1-eps. */
float a = fabsf(x);
if (a > 0.99999994f) {

@ -161,7 +161,7 @@ ccl_device_inline void math_trimatrix_add_gramian(ccl_global float *A,
}
}
/* Transpose matrix A inplace. */
/* Transpose matrix A in place. */
ccl_device_inline void math_matrix_transpose(ccl_global float *A, int n, int stride)
{
for (int i = 0; i < n; i++) {

@ -49,7 +49,7 @@ class MD5Hash {
void process(const uint8_t *data);
void finish(uint8_t digest[16]);
uint32_t count[2]; /* message length in bits, lsw first */
uint32_t count[2]; /* message length in bits, LSW first. */
uint32_t abcd[4]; /* digest buffer */
uint8_t buf[64]; /* accumulate block */
};

@ -126,7 +126,7 @@ template<int SIZE, typename T> class ccl_try_align(16) StackAllocator
return size_t(-1);
}
/* Rebind to other ype of allocator. */
/* Rebind to other type of allocator. */
template<class U> struct rebind {
typedef StackAllocator<SIZE, U> other;

@ -66,9 +66,9 @@ string string_from_wstring(const wstring &path);
string string_to_ansi(const string &str);
#endif
/* Make a string from a size in bytes in human readable form */
/* Make a string from a size in bytes in human readable form. */
string string_human_readable_size(size_t size);
/* Make a string from a unitless quantity in human readable form */
/* Make a string from a unit-less quantity in human readable form. */
string string_human_readable_number(size_t num);
CCL_NAMESPACE_END

@ -580,7 +580,7 @@ typedef struct {
GHOST_TUns32 xPixels;
/** Number of lines. */
GHOST_TUns32 yPixels;
/** Numberof bits per pixel. */
/** Number of bits per pixel. */
GHOST_TUns32 bpp;
/** Refresh rate (in Hertz). */
GHOST_TUns32 frequency;

@ -127,8 +127,8 @@ class GHOST_Context : public GHOST_IContext {
}
/**
* Gets the OpenGL framebuffer associated with the OpenGL context
* \return The ID of an OpenGL framebuffer object.
* Gets the OpenGL frame-buffer associated with the OpenGL context
* \return The ID of an OpenGL frame-buffer object.
*/
virtual unsigned int getDefaultFramebuffer()
{

@ -115,10 +115,10 @@ class GHOST_ContextCGL : public GHOST_Context {
/** The OpenGL drawing context */
NSOpenGLContext *m_openGLContext;
/** The virtualized default framebuffer */
/** The virtualized default frame-buffer. */
unsigned int m_defaultFramebuffer;
/** The virtualized default framebuffer's texture */
/** The virtualized default frame-buffer's texture. */
MTLTexture *m_defaultFramebufferMetalTexture;
bool m_coreProfile;

@ -97,8 +97,8 @@ class GHOST_ContextD3D : public GHOST_Context {
}
/**
* Gets the OpenGL framebuffer associated with the OpenGL context
* \return The ID of an OpenGL framebuffer object.
* Gets the OpenGL frame-buffer associated with the OpenGL context
* \return The ID of an OpenGL frame-buffer object.
*/
unsigned int getDefaultFramebuffer()
{

@ -26,7 +26,7 @@
#ifdef _MSC_VER
# ifdef DEBUG
/* Suppress stl-MSVC debug info warning. */
/* Suppress STL-MSVC debug info warning. */
# pragma warning(disable : 4786)
# endif
#endif

@ -203,7 +203,7 @@ void *GHOST_DropTargetX11::getURIListGhostData(unsigned char *dropBuffer, int dr
GHOST_TStringArray *strArray = NULL;
int totPaths = 0, curLength = 0;
/* count total number of file pathes in buffer */
/* Count total number of file paths in buffer. */
for (int i = 0; i <= dropBufferSize; i++) {
if (dropBuffer[i] == 0 || dropBuffer[i] == '\n' || dropBuffer[i] == '\r') {
if (curLength) {

@ -103,22 +103,22 @@ class GHOST_DropTargetX11 {
/* Data type of the dragged object */
GHOST_TDragnDropTypes m_draggedObjectType;
/* is dnd stuff initialzied */
/* Is drag-and-drop stuff initialized. */
static bool m_xdndInitialized;
/* class holding internal stiff of xdnd library */
/* Class holding internal stiff of `xdnd` library. */
static DndClass m_dndClass;
/* list of supported types to be dragged into */
/* List of supported types to be dragged into. */
static Atom *m_dndTypes;
/* list of supported dran'n'drop actions */
/* List of supported drag-and-drop actions. */
static Atom *m_dndActions;
/* List of supported MIME types to be dragged into */
/* List of supported MIME types to be dragged into. */
static const char *m_dndMimeTypes[];
/* counter of references to global XDND structures */
/* Counter of references to global #XDND structures. */
static int m_refCounter;
#ifdef WITH_CXX_GUARDEDALLOC

@ -303,10 +303,10 @@ class GHOST_ImeWin32 {
*/
void EndIME(HWND window_handle);
/* Updatg resultInfo and compInfo */
/** Update #resultInfo and #compInfo */
void UpdateInfo(HWND window_handle);
/* disable ime when start up */
/** Disable IME when start up. */
void CheckFirst(HWND window_handle);
ImeComposition resultInfo, compInfo;

@ -40,7 +40,7 @@ GHOST_SystemPathsWin32::~GHOST_SystemPathsWin32()
const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *versionstr) const
{
/* 1 utf-16 might translante into 3 utf-8. 2 utf-16 translates into 4 utf-8*/
/* 1 utf-16 might translate into 3 utf-8. 2 utf-16 translates into 4 utf-8. */
static char knownpath[MAX_PATH * 3 + 128] = {0};
PWSTR knownpath_16 = NULL;

@ -963,7 +963,7 @@ GHOST_EventButton *GHOST_SystemWin32::processButtonEvent(GHOST_TEventType type,
processCursorEvent(window);
}
else {
/* Tablet should be hadling inbetween mouse moves, only move to event position. */
/* Tablet should be handling in between mouse moves, only move to event position. */
DWORD msgPos = ::GetMessagePos();
int msgPosX = GET_X_LPARAM(msgPos);
int msgPosY = GET_Y_LPARAM(msgPos);

@ -23,7 +23,7 @@
* \ingroup GHOST
*/
#include <X11/XKBlib.h> /* Allow detectable auto-repeate. */
#include <X11/XKBlib.h> /* Allow detectable auto-repeat. */
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
@ -185,10 +185,10 @@ GHOST_SystemX11::GHOST_SystemX11() : GHOST_System(), m_xkb_descr(NULL), m_start_
GHOST_ASSERT(false, "Could not instantiate timer!");
}
/* Taking care not to overflow the tv.tv_sec * 1000 */
/* Taking care not to overflow the `tv.tv_sec * 1000`. */
m_start_time = GHOST_TUns64(tv.tv_sec) * 1000 + tv.tv_usec / 1000;
/* Use detectable auto-repeate, mac and windows also do this. */
/* Use detectable auto-repeat, mac and windows also do this. */
int use_xkb;
int xkb_opcode, xkb_event, xkb_error;
int xkb_major = XkbMajorVersion, xkb_minor = XkbMinorVersion;
@ -528,7 +528,7 @@ bool GHOST_SystemX11::openX11_IM()
if (!m_display)
return false;
/* set locale modifiers such as "@im=ibus" specified by XMODIFIERS */
/* set locale modifiers such as `@im=ibus` specified by XMODIFIERS. */
XSetLocaleModifiers("");
m_xim = XOpenIM(m_display, NULL, (char *)GHOST_X11_RES_NAME, (char *)GHOST_X11_RES_CLASS);
@ -1146,7 +1146,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
*/
if ((xke->keycode >= 10 && xke->keycode < 20) &&
((key_sym = XLookupKeysym(xke, ShiftMask)) >= XK_0) && (key_sym <= XK_9)) {
/* pass (keep shift'ed key_sym) */
/* Pass (keep shifted `key_sym`). */
}
else {
/* regular case */
@ -1161,12 +1161,12 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
#endif
#if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
/* getting unicode on key-up events gives XLookupNone status */
/* Setting unicode on key-up events gives #XLookupNone status. */
XIC xic = window->getX11_XIC();
if (xic && xke->type == KeyPress) {
Status status;
/* use utf8 because its not locale depentant, from xorg docs */
/* Use utf8 because its not locale repentant, from XORG docs. */
if (!(len = Xutf8LookupString(
xic, xke, utf8_buf, sizeof(utf8_array) - 5, &key_sym, &status))) {
utf8_buf[0] = '\0';
@ -1269,8 +1269,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
gbmask = GHOST_kButtonMaskRight;
/* It seems events 6 and 7 are for horizontal scrolling.
* you can re-order button mapping like this... (swaps 6,7 with 8,9)
* xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7"
*/
* `xmodmap -e "pointer = 1 2 3 4 5 8 9 6 7"` */
else if (xbe.button == 6)
gbmask = GHOST_kButtonMaskButton6;
else if (xbe.button == 7)
@ -1289,8 +1288,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
/* change of size, border, layer etc. */
case ConfigureNotify: {
/* XConfigureEvent & xce = xe->xconfigure; */
// XConfigureEvent & xce = xe->xconfigure;
g_event = new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window);
break;
}
@ -1934,8 +1932,8 @@ static GHOST_TKey ghost_key_from_keycode(const XkbDescPtr xkb_descr, const KeyCo
#define XCLIB_XCOUT_SENTCONVSEL 1 /* sent a request */
#define XCLIB_XCOUT_INCR 2 /* in an incr loop */
#define XCLIB_XCOUT_FALLBACK 3 /* STRING failed, need fallback to UTF8 */
#define XCLIB_XCOUT_FALLBACK_UTF8 4 /* UTF8 failed, move to compouned */
#define XCLIB_XCOUT_FALLBACK_COMP 5 /* compouned failed, move to text. */
#define XCLIB_XCOUT_FALLBACK_UTF8 4 /* UTF8 failed, move to compound. */
#define XCLIB_XCOUT_FALLBACK_COMP 5 /* compound failed, move to text. */
#define XCLIB_XCOUT_FALLBACK_TEXT 6
/* Retrieves the contents of a selections. */
@ -2198,30 +2196,30 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
restore_events.push_back(evt);
}
/* fallback is needed. set XA_STRING to target and restart the loop. */
/* Fallback is needed. Set #XA_STRING to target and restart the loop. */
if (context == XCLIB_XCOUT_FALLBACK) {
context = XCLIB_XCOUT_NONE;
target = m_atom.STRING;
continue;
}
else if (context == XCLIB_XCOUT_FALLBACK_UTF8) {
/* utf8 fail, move to compouned text. */
/* utf8 fail, move to compound text. */
context = XCLIB_XCOUT_NONE;
target = m_atom.COMPOUND_TEXT;
continue;
}
else if (context == XCLIB_XCOUT_FALLBACK_COMP) {
/* compouned text fail, move to text. */
/* Compound text fail, move to text. */
context = XCLIB_XCOUT_NONE;
target = m_atom.TEXT;
continue;
}
else if (context == XCLIB_XCOUT_FALLBACK_TEXT) {
/* text fail, nothing else to try, break. */
/* Text fail, nothing else to try, break. */
context = XCLIB_XCOUT_NONE;
}
/* only continue if xcout() is doing something */
/* Only continue if #xcout() is doing something. */
if (context == XCLIB_XCOUT_NONE)
break;
}
@ -2232,9 +2230,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool selection) const
}
if (sel_len) {
/* only print the buffer out, and free it, if it's not
* empty
*/
/* Only print the buffer out, and free it, if it's not empty. */
unsigned char *tmp_data = (unsigned char *)malloc(sel_len + 1);
memcpy((char *)tmp_data, (char *)sel_buf, sel_len);
tmp_data[sel_len] = '\0';
@ -2288,28 +2284,28 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
* \{ */
class DialogData {
public:
/* Width of the dialog */
/* Width of the dialog. */
uint width;
/* Heigth of the dialog */
/* Height of the dialog. */
uint height;
/* Default padding (x direction) between controls and edge of dialog */
/* Default padding (x direction) between controls and edge of dialog. */
uint padding_x;
/* Default padding (y direction) between controls and edge of dialog */
/* Default padding (y direction) between controls and edge of dialog. */
uint padding_y;
/* Width of a single button */
/* Width of a single button. */
uint button_width;
/* Height of a single button */
/* Height of a single button. */
uint button_height;
/* Inset of a button to its text */
/* Inset of a button to its text. */
uint button_inset_x;
/* Size of the border of the button */
/* Size of the border of the button. */
uint button_border_size;
/* Height of a line of text */
uint line_height;
/* offset of the text inside the button */
/* Offset of the text inside the button. */
uint button_text_offset_y;
/* Construct a new DialogData with the default settings */
/* Construct a new #DialogData with the default settings. */
DialogData()
: width(640),
height(175),

@ -24,7 +24,7 @@
#pragma once
#include <X11/XKBlib.h> /* Allow detectable auto-repeate. */
#include <X11/XKBlib.h> /* Allow detectable auto-repeat. */
#include <X11/Xlib.h>
#include "../GHOST_Types.h"

@ -392,7 +392,7 @@ class GHOST_Window : public GHOST_IWindow {
/** Stores whether this is a full screen window. */
bool m_fullScreen;
/** Whether to attempt to initialize a context with a stereo framebuffer. */
/** Whether to attempt to initialize a context with a stereo frame-buffer. */
bool m_wantStereoVisual;
/** Full-screen width */

@ -1368,7 +1368,7 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap
GHOST_TUns32 fullBitRow, fullMaskRow;
int x, y, cols;
cols = sizeX / 8; /* Num of whole bytes per row (width of bm/mask) */
cols = sizeX / 8; /* Number of whole bytes per row (width of bm/mask). */
if (sizeX % 8)
cols++;
@ -1407,7 +1407,7 @@ GHOST_TSuccess GHOST_WindowWin32::setWindowCustomCursorShape(GHOST_TUns8 *bitmap
GHOST_TSuccess GHOST_WindowWin32::setProgressBar(float progress)
{
/*SetProgressValue sets state to TBPF_NORMAL automaticly*/
/* #SetProgressValue sets state to #TBPF_NORMAL automatically. */
if (m_Bar && S_OK == m_Bar->SetProgressValue(m_hWnd, 10000 * progress, 10000))
return GHOST_kSuccess;

@ -573,7 +573,7 @@ class GHOST_WindowWin32 : public GHOST_Window {
/** Pointer to system. */
GHOST_SystemWin32 *m_system;
/** Pointer to COM IDropTarget implementor. */
/** Pointer to COM #IDropTarget implementer. */
GHOST_DropTargetWin32 *m_dropTarget;
/** Window handle. */
HWND m_hWnd;
@ -582,14 +582,16 @@ class GHOST_WindowWin32 : public GHOST_Window {
/** Flag for if window has captured the mouse. */
bool m_hasMouseCaptured;
/** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab().
* Multiple grabs must be released with a single ungrab. */
/**
* Flag if an operator grabs the mouse with #WM_cursor_grab_enable, #WM_cursor_grab_disable
* Multiple grabs must be released with a single un-grab.
*/
bool m_hasGrabMouse;
/** Count of number of pressed buttons. */
int m_nPressedButtons;
/** HCURSOR structure of the custom cursor. */
HCURSOR m_customCursor;
/** Request GL context aith alpha channel. */
/** Request GL context with alpha channel. */
bool m_wantAlphaBackground;
/** ITaskbarList3 structure for progress bar. */

@ -1169,7 +1169,7 @@ GHOST_TSuccess GHOST_WindowX11::setOrder(GHOST_TWindowOrder order)
XGetWindowAttributes(m_display, m_window, &attr);
/* iconized windows give bad match error */
/* Minimized windows give bad match error. */
if (attr.map_state == IsViewable)
XSetInputFocus(m_display, m_window, RevertToPointerRoot, CurrentTime);
XFlush(m_display);

@ -125,7 +125,7 @@ class GHOST_XrGraphicsBindingOpenGL : public GHOST_IXrGraphicsBinding {
oxr_binding.wgl.hGLRC = ctx_wgl.m_hGLRC;
#endif
/* Generate a framebuffer to use for blitting into the texture. */
/* Generate a frame-buffer to use for blitting into the texture. */
glGenFramebuffers(1, &m_fbo);
}

@ -338,7 +338,7 @@ void GHOST_XrSession::endFrameDrawing(std::vector<XrCompositionLayerBaseHeader *
void GHOST_XrSession::draw(void *draw_customdata)
{
std::vector<XrCompositionLayerProjectionView>
projection_layer_views; /* Keep alive until xrEndFrame() call! */
projection_layer_views; /* Keep alive until #xrEndFrame() call! */
XrCompositionLayerProjection proj_layer;
std::vector<XrCompositionLayerBaseHeader *> layers;
@ -354,7 +354,7 @@ void GHOST_XrSession::draw(void *draw_customdata)
static void copy_openxr_pose_to_ghost_pose(const XrPosef &oxr_pose, GHOST_XrPose &r_ghost_pose)
{
/* Set and convert to Blender coodinate space. */
/* Set and convert to Blender coordinate space. */
r_ghost_pose.position[0] = oxr_pose.position.x;
r_ghost_pose.position[1] = oxr_pose.position.y;
r_ghost_pose.position[2] = oxr_pose.position.z;
@ -366,7 +366,7 @@ static void copy_openxr_pose_to_ghost_pose(const XrPosef &oxr_pose, GHOST_XrPose
static void ghost_xr_draw_view_info_from_view(const XrView &view, GHOST_XrDrawViewInfo &r_info)
{
/* Set and convert to Blender coodinate space. */
/* Set and convert to Blender coordinate space. */
copy_openxr_pose_to_ghost_pose(view.pose, r_info.eye_pose);
r_info.fov.angle_left = view.fov.angleLeft;

@ -203,7 +203,7 @@ void IK_QJacobian::InvertSDLS()
// singular the least squares inverse tries to minimize |J(dtheta) - dX)|
// and doesn't try to minimize dTheta. This results in eratic changes in
// angle. The damped least squares minimizes |dtheta| to try and reduce this
// erratic behaviour.
// erratic behavior.
//
// The selectively damped least squares (SDLS) is used here instead of the
// DLS. The SDLS damps individual singular values, instead of using a single
@ -325,7 +325,7 @@ void IK_QJacobian::InvertDLS()
// inverse tries to minimize |J(dtheta) - dX)| and doesn't
// try to minimize dTheta. This results in eratic changes in angle.
// Damped least squares minimizes |dtheta| to try and reduce this
// erratic behaviour.
// erratic behavior.
// We don't want to use the damped solution everywhere so we
// only increase lamda from zero as we approach a singularity.

@ -463,7 +463,7 @@ inline bool isnan(double i) {
#endif
}
/// Ceil function that has the same behaviour for positive
/// Ceil function that has the same behavior for positive
/// and negative values
template <typename FloatType>
FloatType ceil0(const FloatType& value) {

@ -138,7 +138,7 @@ MIKK_INLINE tbool VNotZero(const SVec3 v)
// Shift operations in C are only defined for shift values which are
// not negative and smaller than sizeof(value) * CHAR_BIT.
// The mask, used with bitwise-and (&), prevents undefined behaviour
// The mask, used with bitwise-and (&), prevents undefined behavior
// when the shift count is 0 or >= the width of unsigned int.
MIKK_INLINE unsigned int rotl(unsigned int value, unsigned int count)
{
@ -1454,12 +1454,12 @@ static void BuildNeighborsFast(STriInfo pTriInfos[],
pEdges[f * 3 + i].f = f; // record face number
}
// sort over all edges by i0, this is the pricy one.
// sort over all edges by i0, this is the pricey one.
QuickSortEdges(pEdges, 0, iNrTrianglesIn * 3 - 1, 0, uSeed); // sort channel 0 which is i0
// sub sort over i1, should be fast.
// could replace this with a 64 bit int sort over (i0,i1)
// with i0 as msb in the quicksort call above.
// with i0 as msb in the quick-sort call above.
iEntries = iNrTrianglesIn * 3;
iCurStartIndex = 0;
for (i = 1; i < iEntries; i++) {

@ -59,7 +59,7 @@ typedef struct Global {
short moving;
/** To indicate render is busy, prevent renderwindow events etc. */
/** To indicate render is busy, prevent render-window events etc. */
bool is_rendering;
/**

@ -248,7 +248,7 @@ typedef struct GpencilModifierTypeInfo {
#define GPENCIL_MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_gpencil_"
/* Initialize modifier's global data (type info and some common global storages). */
/* Initialize modifier's global data (type info and some common global storage). */
void BKE_gpencil_modifier_init(void);
void BKE_gpencil_modifierType_panel_id(GpencilModifierType type, char *r_idname);

@ -43,10 +43,10 @@ typedef struct wmKeyConfigPrefType_Runtime {
typedef struct wmKeyConfigPrefType_Runtime wmKeyConfigPrefType_Runtime;
#endif
/* KeyConfig preferenes (UserDef). */
/* KeyConfig preferences (UserDef). */
struct wmKeyConfigPref *BKE_keyconfig_pref_ensure(struct UserDef *userdef, const char *kc_idname);
/* KeyConfig preferenes (RNA). */
/* KeyConfig preferences (RNA). */
struct wmKeyConfigPrefType_Runtime *BKE_keyconfig_pref_type_find(const char *idname, bool quiet);
void BKE_keyconfig_pref_type_add(struct wmKeyConfigPrefType_Runtime *kpt_rt);
void BKE_keyconfig_pref_type_remove(const struct wmKeyConfigPrefType_Runtime *kpt_rt);

@ -219,7 +219,7 @@ void id_fake_user_set(struct ID *id);
void id_fake_user_clear(struct ID *id);
void BKE_id_clear_newpoin(struct ID *id);
/** Flags to control make local code behaviour. */
/** Flags to control make local code behavior. */
enum {
/** Making that ID local is part of making local a whole library. */
LIB_ID_MAKELOCAL_FULL_LIBRARY = 1 << 0,

@ -399,7 +399,7 @@ typedef struct ModifierTypeInfo {
/* Used to find a modifier's panel type. */
#define MODIFIER_TYPE_PANEL_PREFIX "MOD_PT_"
/* Initialize modifier's global data (type info and some common global storages). */
/* Initialize modifier's global data (type info and some common global storage). */
void BKE_modifier_init(void);
const ModifierTypeInfo *BKE_modifier_get_info(ModifierType type);

@ -365,7 +365,7 @@ typedef struct SculptBoundaryEditInfo {
/* How many steps were needed to reach this vertex from the boundary. */
int num_propagation_steps;
/* Stregth that is used to deform this vertex. */
/* Strength that is used to deform this vertex. */
float strength_factor;
} SculptBoundaryEditInfo;
@ -530,7 +530,7 @@ typedef struct SculptSession {
float gesture_initial_normal[3];
bool gesture_initial_hit;
/* TODO(jbakker): Replace rv3d adn v3d with ViewContext */
/* TODO(jbakker): Replace rv3d and v3d with ViewContext */
struct RegionView3D *rv3d;
struct View3D *v3d;
struct Scene *scene;

@ -149,7 +149,7 @@ typedef struct ShaderFxTypeInfo {
#define SHADERFX_TYPE_PANEL_PREFIX "FX_PT_"
/* Initialize global data (type info and some common global storages). */
/* Initialize global data (type info and some common global storage). */
void BKE_shaderfx_init(void);
void BKE_shaderfxType_panel_id(ShaderFxType type, char *r_idname);

@ -49,7 +49,7 @@ typedef struct BodyPoint {
/* allocates and initializes general main data */
extern struct SoftBody *sbNew(struct Scene *scene);
/* frees internal data and softbody itself */
/* frees internal data and soft-body itself */
extern void sbFree(struct Object *ob);
/* frees simulation data to reset simulation */
@ -66,7 +66,7 @@ extern void sbObjectStep(struct Depsgraph *depsgraph,
/* makes totally fresh start situation, resets time */
extern void sbObjectToSoftbody(struct Object *ob);
/* links the softbody module to a 'test for Interrupt' function */
/* links the soft-body module to a 'test for Interrupt' function */
/* pass NULL to unlink again */
extern void sbSetInterruptCallBack(int (*f)(void));

@ -428,8 +428,8 @@ static void splineik_evaluate_bone(
if (fabsf(scaleFac) != 0.0f) {
scale = 1.0f / fabsf(scaleFac);
/* we need to clamp this within sensible values */
/* NOTE: these should be fine for now, but should get sanitised in future */
/* We need to clamp this within sensible values. */
/* NOTE: these should be fine for now, but should get sanitized in future. */
CLAMP(scale, 0.0001f, 100000.0f);
}
else {
@ -483,7 +483,7 @@ static void splineik_evaluate_bone(
final_scale = 1.0f;
}
/* apply the scaling (assuming normalised scale) */
/* Apply the scaling (assuming normalized scale). */
mul_v3_fl(poseMat[0], final_scale);
mul_v3_fl(poseMat[2], final_scale);
break;

@ -3419,7 +3419,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface,
break;
}
/* Set output format, png in case exr isn't supported */
/* Set output format, PNG in case EXR isn't supported. */
#ifdef WITH_OPENEXR
if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */
ibuf->ftype = IMB_FTYPE_OPENEXR;

@ -201,8 +201,8 @@ static void unsubdivide_face_center_vertex_tag(BMesh *bm, BMVert *initial_vertex
/* Repeat a similar operation for all vertices in the queue. */
/* In this case, add to the queue the vertices connected by 2 steps using the diagonals in any
* direction. If a solution exists and intial_vertex was a pole, this is guaranteed that will tag
* all the (0,0) vertices of the grids, and nothing else. */
* direction. If a solution exists and `initial_vertex` was a pole, this is guaranteed that will
* tag all the (0,0) vertices of the grids, and nothing else. */
/* If it was not a pole, it may or may not find a solution, even if the solution exists. */
while (!BLI_gsqueue_is_empty(queue)) {
BMVert *from_v;

@ -125,7 +125,7 @@ float *tracking_track_get_mask_for_region(int frame_width,
const float region_max[2],
MovieTrackingTrack *track);
/*********************** Frame accessr *************************/
/*********************** Frame Accessor *************************/
struct libmv_FrameAccessor;

@ -88,10 +88,10 @@ typedef enum eFileAttributes {
FILE_ATTR_TEMPORARY = 1 << 7, /* Used for temporary storage. */
FILE_ATTR_SPARSE_FILE = 1 << 8, /* Sparse File. */
FILE_ATTR_OFFLINE = 1 << 9, /* Data is not immediately available. */
FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows Lnk. File-based redirection. */
FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated reparse point. */
FILE_ATTR_ALIAS = 1 << 10, /* Mac Alias or Windows LNK. File-based redirection. */
FILE_ATTR_REPARSE_POINT = 1 << 11, /* File has associated re-parse point. */
FILE_ATTR_SYMLINK = 1 << 12, /* Reference to another file. */
FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symlink. */
FILE_ATTR_JUNCTION_POINT = 1 << 13, /* Folder Symbolic-link. */
FILE_ATTR_MOUNT_POINT = 1 << 14, /* Volume mounted as a folder. */
FILE_ATTR_HARDLINK = 1 << 15, /* Duplicated directory entry. */
} eFileAttributes;

@ -177,7 +177,7 @@ typedef enum eEulerRotationOrders {
EULER_ORDER_YZX,
EULER_ORDER_ZXY,
EULER_ORDER_ZYX,
/* there are 6 more entries with dulpicate entries included */
/* There are 6 more entries with duplicate entries included. */
} eEulerRotationOrders;
void eulO_to_quat(float quat[4], const float eul[3], const short order);

@ -95,7 +95,7 @@ struct Plane {
/* Test equality on the exact fields. */
bool operator==(const Plane &other) const;
/* Hash onthe exact fields. */
/* Hash on the exact fields. */
uint64_t hash() const;
void make_canonical();
@ -144,7 +144,7 @@ struct Face : NonCopyable {
/* Test equality of verts, in same positions. */
bool operator==(const Face &other) const;
/* Test equaliy faces allowing cyclic shifts. */
/* Test equality faces allowing cyclic shifts. */
bool cyclic_equal(const Face &other) const;
FacePos next_pos(FacePos p) const

@ -40,7 +40,7 @@ extern "C" {
#if defined(__linux__) || defined(__GNU__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
defined(__FreeBSD_kernel__) || defined(__HAIKU__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
/* Linux-i386, Linux-Alpha, Linux-PPC */
# include <stdint.h>
/* XXX */

@ -49,7 +49,7 @@ void BLI_hostname_get(char *buffer, size_t bufsize);
size_t BLI_system_memory_max_in_megabytes(void);
int BLI_system_memory_max_in_megabytes_int(void);
/* getpid */
/* For `getpid`. */
#ifdef WIN32
# define BLI_SYSTEM_PID_H <process.h>

@ -50,7 +50,7 @@ typedef struct VoronoiEdge {
/* point on Voronoi place on the right side of edge */
float right[2];
/* directional coeffitients satisfying equation y = f * x + g (edge lies on this line) */
/* Directional coefficients satisfying equation `y = f * x + g` (edge lies on this line). */
float f, g;
/* some edges consist of two parts,

@ -64,7 +64,7 @@ extern "C" {
# define S_ISDIR(x) (((x)&_S_IFDIR) == _S_IFDIR)
#endif
/* defines for using ISO C++ conformant names */
/* Defines for using ISO C++ conferment names. */
#if !defined(_MSC_VER) || _MSC_VER < 1900
# define snprintf _snprintf
#endif

@ -369,7 +369,7 @@ void BLI_filelist_entry_datetime_to_string(const struct stat *st,
int yesterday_yday = 0;
if (r_is_today || r_is_yesterday) {
/* Localtime() has only one buffer so need to get data out before called again. */
/* `localtime()` has only one buffer so need to get data out before called again. */
const time_t ts_now = time(NULL);
struct tm *today = localtime(&ts_now);

@ -94,7 +94,7 @@ struct BVHTree {
BVHNode *nodearray; /* pre-alloc branch nodes */
BVHNode **nodechild; /* pre-alloc children for nodes */
float *nodebv; /* pre-alloc bounding-volumes for nodes */
float epsilon; /* epslion is used for inflation of the k-dop */
float epsilon; /* Epsilon is used for inflation of the K-DOP. */
int totleaf; /* leafs */
int totbranch;
axis_t start_axis, stop_axis; /* bvhtree_kdop_axes array indices according to axis */
@ -365,7 +365,7 @@ static void create_kdop_hull(
int k;
axis_t axis_iter;
/* don't init boudings for the moving case */
/* Don't initialize bounds for the moving case */
if (!moving) {
node_minmax_init(tree, node);
}
@ -573,9 +573,9 @@ typedef struct BVHBuildHelper {
int tree_type;
int totleafs;
/** Min number of leafs that are archievable from a node at depth N */
/** Min number of leafs that are achievable from a node at depth `N`. */
int leafs_per_child[32];
/** Number of nodes at depth N (tree_type^N) */
/** Number of nodes at depth `N (tree_type^N)`. */
int branches_on_level[32];
/** Number of leafs that are placed on the level that is not 100% filled */

@ -533,7 +533,7 @@ static void bchunk_list_calc_trim_len(const BArrayInfo *info,
data_trim_len = data_trim_len - data_last_chunk_len;
if (data_last_chunk_len) {
if (data_last_chunk_len < info->chunk_byte_size_min) {
/* may be zero and thats OK */
/* May be zero and that's OK. */
data_trim_len -= info->chunk_byte_size;
data_last_chunk_len += info->chunk_byte_size;
}

@ -385,7 +385,7 @@ void BLI_box_pack_2d(BoxPack *boxarray, const uint len, float *r_tot_x, float *r
box++; /* next box, needed for the loop below */
/* ...done packing the first box */
/* Main boxpacking loop */
/* Main box-packing loop */
for (box_index = 1; box_index < len; box_index++, box++) {
/* These floats are used for sorting re-sorting */

@ -754,7 +754,7 @@ template<> CDTVert<double>::CDTVert(const vec2<double> &pt)
{
this->co.exact = pt;
this->co.approx = pt;
this->co.abs_approx = pt; /* Not used, so does't matter. */
this->co.abs_approx = pt; /* Not used, so doesn't matter. */
this->input_ids = nullptr;
this->symedge = nullptr;
this->index = -1;
@ -1411,12 +1411,12 @@ void dc_tri(CDTArrangement<T> *cdt,
/* Guibas-Stolfi Divide-and_Conquer algorithm. */
template<typename T> void dc_triangulate(CDTArrangement<T> *cdt, Array<SiteInfo<T>> &sites)
{
/* Compress sites in place to eliminted verts that merge to others. */
/* Compress sites in place to eliminated verts that merge to others. */
int i = 0;
int j = 0;
int nsites = sites.size();
while (j < nsites) {
/* Invariante: sites[0..i-1] have non-merged verts from 0..(j-1) in them. */
/* Invariant: `sites[0..i-1]` have non-merged verts from `0..(j-1)` in them. */
sites[i] = sites[j++];
if (sites[i].v->merge_to_index < 0) {
i++;

@ -307,7 +307,7 @@ static VFontData *objfnt_to_ftvfontdata(PackedFile *pf)
/* Extract the first 256 character from TTF */
lcode = charcode = FT_Get_First_Char(face, &glyph_index);
/* No charmap found from the ttf so we need to figure it out */
/* No `charmap` found from the TTF so we need to figure it out. */
if (glyph_index == 0) {
FT_CharMap found = NULL;
FT_CharMap charmap;

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