Cleanup: spelling in comments
This commit is contained in:
parent
a91c6f1804
commit
c1c6c11ca6
|
@ -52,7 +52,7 @@ struct PackedBVH {
|
|||
array<int> object_node;
|
||||
/* primitive type - triangle or strand */
|
||||
array<int> prim_type;
|
||||
/* visibility visibilitys for primitives */
|
||||
/* Visibility visibilities for primitives. */
|
||||
array<uint> prim_visibility;
|
||||
/* mapping from BVH primitive index to true primitive index, as primitives
|
||||
* may be duplicated due to spatial splits. -1 for instances. */
|
||||
|
|
|
@ -72,7 +72,7 @@ ccl_device_inline float3 ray_offset(float3 P, float3 Ng)
|
|||
}
|
||||
|
||||
#if defined(__VOLUME_RECORD_ALL__) || (defined(__SHADOW_RECORD_ALL__) && defined(__KERNEL_CPU__))
|
||||
/* ToDo: Move to another file? */
|
||||
/* TODO: Move to another file? */
|
||||
ccl_device int intersections_compare(const void *a, const void *b)
|
||||
{
|
||||
const Intersection *isect_a = (const Intersection *)a;
|
||||
|
|
|
@ -654,7 +654,7 @@ ccl_device_inline
|
|||
|
||||
ccl_device void bsdf_blur(const KernelGlobals *kg, ShaderClosure *sc, float roughness)
|
||||
{
|
||||
/* ToDo: do we want to blur volume closures? */
|
||||
/* TODO: do we want to blur volume closures? */
|
||||
#ifdef __SVM__
|
||||
switch (sc->type) {
|
||||
case CLOSURE_BSDF_MICROFACET_MULTI_GGX_ID:
|
||||
|
|
|
@ -91,7 +91,7 @@ ccl_device float3 bsdf_principled_diffuse_compute_brdf(
|
|||
return make_float3(value, value, value);
|
||||
}
|
||||
|
||||
/* Compute Fresnel at entry point, to be compbined with PRINCIPLED_DIFFUSE_LAMBERT_EXIT
|
||||
/* Compute Fresnel at entry point, to be combined with #PRINCIPLED_DIFFUSE_LAMBERT_EXIT
|
||||
* at the exit point to get the complete BSDF. */
|
||||
ccl_device_inline float bsdf_principled_diffuse_compute_entry_fresnel(const float NdotV)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ ccl_device_inline float bsdf_principled_diffuse_compute_entry_fresnel(const floa
|
|||
return (1.0f - 0.5f * FV);
|
||||
}
|
||||
|
||||
/* Ad-hoc weight adjusment to avoid retro-reflection taking away half the
|
||||
/* Ad-hoc weight adjustment to avoid retro-reflection taking away half the
|
||||
* samples from BSSRDF. */
|
||||
ccl_device_inline float bsdf_principled_diffuse_retro_reflection_sample_weight(
|
||||
PrincipledDiffuseBsdf *bsdf, const float3 I)
|
||||
|
|
|
@ -136,10 +136,10 @@ ccl_device float bssrdf_burley_eval(const float d, float r)
|
|||
/* Burley reflectance profile, equation (3).
|
||||
*
|
||||
* NOTES:
|
||||
* - Surface albedo is already included into sc->weight, no need to
|
||||
* - Surface albedo is already included into `sc->weight`, no need to
|
||||
* multiply by this term here.
|
||||
* - This is normalized diffuse model, so the equation is multiplied
|
||||
* by 2*pi, which also matches cdf().
|
||||
* by `2*pi`, which also matches `cdf()`.
|
||||
*/
|
||||
float exp_r_3_d = expf(-r / (3.0f * d));
|
||||
float exp_r_d = exp_r_3_d * exp_r_3_d * exp_r_3_d;
|
||||
|
@ -288,7 +288,7 @@ ccl_device int bssrdf_setup(ShaderData *sd, Bssrdf *bssrdf, ClosureType type, co
|
|||
bsdf->roughness = bssrdf->roughness;
|
||||
flag |= bsdf_principled_diffuse_setup(bsdf, PRINCIPLED_DIFFUSE_RETRO_REFLECTION);
|
||||
|
||||
/* Ad-hoc weight adjusment to avoid retro-reflection taking away half the
|
||||
/* Ad-hoc weight adjustment to avoid retro-reflection taking away half the
|
||||
* samples from BSSRDF. */
|
||||
bsdf->sample_weight *= bsdf_principled_diffuse_retro_reflection_sample_weight(bsdf, sd->I);
|
||||
}
|
||||
|
|
|
@ -232,7 +232,7 @@ ccl_device void volume_shadow_heterogeneous(INTEGRATOR_STATE_ARGS,
|
|||
* because `exp(a)*exp(b) = exp(a+b)`, also do a quick #VOLUME_THROUGHPUT_EPSILON
|
||||
* check then. */
|
||||
sum += (-sigma_t * dt);
|
||||
if ((i & 0x07) == 0) { /* ToDo: Other interval? */
|
||||
if ((i & 0x07) == 0) { /* TODO: Other interval? */
|
||||
tp = *throughput * exp3(sum);
|
||||
|
||||
/* stop if nearly all light is blocked */
|
||||
|
|
|
@ -253,7 +253,7 @@ ccl_device_inline bool subsurface_random_walk(INTEGRATOR_STATE_ARGS,
|
|||
bool have_opposite_interface = false;
|
||||
float opposite_distance = 0.0f;
|
||||
|
||||
/* Todo: Disable for alpha>0.999 or so? */
|
||||
/* TODO: Disable for `alpha > 0.999` or so? */
|
||||
/* Our heuristic, a compromise between guiding and classic. */
|
||||
const float guided_fraction = 1.0f - fmaxf(0.5f, powf(fabsf(anisotropy), 0.125f));
|
||||
|
||||
|
@ -295,7 +295,7 @@ ccl_device_inline bool subsurface_random_walk(INTEGRATOR_STATE_ARGS,
|
|||
float sample_sigma_t = volume_channel_get(sigma_t, channel);
|
||||
float randt = path_state_rng_1D(kg, &rng_state, PRNG_SCATTER_DISTANCE);
|
||||
|
||||
/* We need the result of the raycast to compute the full guided PDF, so just remember the
|
||||
/* We need the result of the ray-cast to compute the full guided PDF, so just remember the
|
||||
* relevant terms to avoid recomputing them later. */
|
||||
float backward_fraction = 0.0f;
|
||||
float forward_pdf_factor = 0.0f;
|
||||
|
@ -330,7 +330,7 @@ ccl_device_inline bool subsurface_random_walk(INTEGRATOR_STATE_ARGS,
|
|||
float hg_pdf;
|
||||
if (guided) {
|
||||
cos_theta = sample_phase_dwivedi(diffusion_length, phase_log, scatter_u);
|
||||
/* The backwards guiding distribution is just mirrored along sd->N, so swapping the
|
||||
/* The backwards guiding distribution is just mirrored along `sd->N`, so swapping the
|
||||
* sign here is enough to sample from that instead. */
|
||||
if (guide_backward) {
|
||||
cos_theta = -cos_theta;
|
||||
|
@ -358,7 +358,7 @@ ccl_device_inline bool subsurface_random_walk(INTEGRATOR_STATE_ARGS,
|
|||
|
||||
/* Prepare distance sampling.
|
||||
* For the backwards case, this also needs the sign swapped since now directions against
|
||||
* sd->N (and therefore with negative cos_theta) are preferred. */
|
||||
* `sd->N` (and therefore with negative cos_theta) are preferred. */
|
||||
forward_stretching = (1.0f - cos_theta / diffusion_length);
|
||||
backward_stretching = (1.0f + cos_theta / diffusion_length);
|
||||
if (guided) {
|
||||
|
@ -369,10 +369,10 @@ ccl_device_inline bool subsurface_random_walk(INTEGRATOR_STATE_ARGS,
|
|||
/* Sample direction along ray. */
|
||||
float t = -logf(1.0f - randt) / sample_sigma_t;
|
||||
|
||||
/* On the first bounce, we use the raycast to check if the opposite side is nearby.
|
||||
/* On the first bounce, we use the ray-cast to check if the opposite side is nearby.
|
||||
* If yes, we will later use backwards guided sampling in order to have a decent
|
||||
* chance of connecting to it.
|
||||
* Todo: Maybe use less than 10 times the mean free path? */
|
||||
* TODO: Maybe use less than 10 times the mean free path? */
|
||||
ray.t = (bounce == 0) ? max(t, 10.0f / (min3(sigma_t))) : t;
|
||||
scene_intersect_local(kg, &ray, &ss_isect, object, NULL, 1);
|
||||
hit = (ss_isect.num_hits > 0);
|
||||
|
|
|
@ -143,10 +143,10 @@ shader node_image_texture(int use_mapping = 0,
|
|||
* in between we blend between two textures, and in the middle we a blend
|
||||
* between three textures.
|
||||
*
|
||||
* the Nxyz values are the barycentric coordinates in an equilateral
|
||||
* the `Nxyz` values are the barycentric coordinates in an equilateral
|
||||
* triangle, which in case of blending, in the middle has a smaller
|
||||
* equilateral triangle where 3 textures blend. this divides things into
|
||||
* 7 zones, with an if () test for each zone */
|
||||
* 7 zones, with an if () test for each zone. */
|
||||
|
||||
vector weight = vector(0.0, 0.0, 0.0);
|
||||
float blend = projection_blend;
|
||||
|
|
|
@ -142,10 +142,10 @@ ccl_device_noinline void svm_node_tex_image_box(const KernelGlobals *kg,
|
|||
* in between we blend between two textures, and in the middle we a blend
|
||||
* between three textures.
|
||||
*
|
||||
* the Nxyz values are the barycentric coordinates in an equilateral
|
||||
* The `Nxyz` values are the barycentric coordinates in an equilateral
|
||||
* triangle, which in case of blending, in the middle has a smaller
|
||||
* equilateral triangle where 3 textures blend. this divides things into
|
||||
* 7 zones, with an if() test for each zone */
|
||||
* 7 zones, with an if() test for each zone. */
|
||||
|
||||
float3 weight = make_float3(0.0f, 0.0f, 0.0f);
|
||||
float blend = __int_as_float(node.w);
|
||||
|
|
|
@ -48,7 +48,7 @@ struct BVHCache;
|
|||
typedef struct BVHTreeFromEditMesh {
|
||||
struct BVHTree *tree;
|
||||
|
||||
/* default callbacks to bvh nearest and raycast */
|
||||
/** Default callbacks to bvh nearest and ray-cast. */
|
||||
BVHTree_NearestPointCallback nearest_callback;
|
||||
BVHTree_RayCastCallback raycast_callback;
|
||||
|
||||
|
@ -60,18 +60,18 @@ typedef struct BVHTreeFromEditMesh {
|
|||
} BVHTreeFromEditMesh;
|
||||
|
||||
/**
|
||||
* Struct that stores basic information about a BVHTree built from a mesh.
|
||||
* Struct that stores basic information about a #BVHTree built from a mesh.
|
||||
*/
|
||||
typedef struct BVHTreeFromMesh {
|
||||
struct BVHTree *tree;
|
||||
|
||||
/* default callbacks to bvh nearest and raycast */
|
||||
/** Default callbacks to bvh nearest and ray-cast. */
|
||||
BVHTree_NearestPointCallback nearest_callback;
|
||||
BVHTree_RayCastCallback raycast_callback;
|
||||
|
||||
/* Vertex array, so that callbacks have instant access to data. */
|
||||
const struct MVert *vert;
|
||||
const struct MEdge *edge; /* only used for BVHTreeFromMeshEdges */
|
||||
const struct MEdge *edge; /* only used for #BVHTreeFromMeshEdges */
|
||||
const struct MFace *face;
|
||||
const struct MLoop *loop;
|
||||
const struct MLoopTri *looptri;
|
||||
|
|
|
@ -161,9 +161,11 @@ void bvhcache_free(BVHCache *bvh_cache)
|
|||
MEM_freeN(bvh_cache);
|
||||
}
|
||||
|
||||
/* BVH tree balancing inside a mutex lock must be run in isolation. Balancing
|
||||
/**
|
||||
* BVH-tree balancing inside a mutex lock must be run in isolation. Balancing
|
||||
* is multithreaded, and we do not want the current thread to start another task
|
||||
* that may involve acquiring the same mutex lock that it is waiting for. */
|
||||
* that may involve acquiring the same mutex lock that it is waiting for.
|
||||
*/
|
||||
static void bvhtree_balance_isolated(void *userdata)
|
||||
{
|
||||
BLI_bvhtree_balance((BVHTree *)userdata);
|
||||
|
@ -233,8 +235,12 @@ float bvhtree_sphereray_tri_intersection(const BVHTreeRay *ray,
|
|||
* BVH from meshes callbacks
|
||||
*/
|
||||
|
||||
/* Callback to bvh tree nearest point. The tree must have been built using bvhtree_from_mesh_faces.
|
||||
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
|
||||
/**
|
||||
* Callback to BVH-tree nearest point.
|
||||
* The tree must have been built using #bvhtree_from_mesh_faces.
|
||||
*
|
||||
* \param userdata: Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree.
|
||||
*/
|
||||
static void mesh_faces_nearest_point(void *userdata,
|
||||
int index,
|
||||
const float co[3],
|
||||
|
@ -325,8 +331,12 @@ static void editmesh_looptri_nearest_point(void *userdata,
|
|||
}
|
||||
}
|
||||
|
||||
/* Callback to bvh tree raycast. The tree must have been built using bvhtree_from_mesh_faces.
|
||||
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
|
||||
/**
|
||||
* Callback to BVH-tree ray-cast.
|
||||
* The tree must have been built using bvhtree_from_mesh_faces.
|
||||
*
|
||||
* \param userdata: Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree.
|
||||
*/
|
||||
static void mesh_faces_spherecast(void *userdata,
|
||||
int index,
|
||||
const BVHTreeRay *ray,
|
||||
|
@ -430,8 +440,12 @@ static void editmesh_looptri_spherecast(void *userdata,
|
|||
}
|
||||
}
|
||||
|
||||
/* Callback to bvh tree nearest point. The tree must have been built using bvhtree_from_mesh_edges.
|
||||
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
|
||||
/**
|
||||
* Callback to BVH-tree nearest point.
|
||||
* The tree must have been built using #bvhtree_from_mesh_edges.
|
||||
*
|
||||
* \param userdata: Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree.
|
||||
*/
|
||||
static void mesh_edges_nearest_point(void *userdata,
|
||||
int index,
|
||||
const float co[3],
|
||||
|
@ -491,8 +505,12 @@ static void editmesh_verts_spherecast(void *userdata,
|
|||
mesh_verts_spherecast_do(index, eve->co, ray, hit);
|
||||
}
|
||||
|
||||
/* Callback to bvh tree raycast. The tree must have been built using bvhtree_from_mesh_verts.
|
||||
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
|
||||
/**
|
||||
* Callback to BVH-tree ray-cast.
|
||||
* The tree must have been built using bvhtree_from_mesh_verts.
|
||||
*
|
||||
* \param userdata: Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree.
|
||||
*/
|
||||
static void mesh_verts_spherecast(void *userdata,
|
||||
int index,
|
||||
const BVHTreeRay *ray,
|
||||
|
@ -504,8 +522,12 @@ static void mesh_verts_spherecast(void *userdata,
|
|||
mesh_verts_spherecast_do(index, v, ray, hit);
|
||||
}
|
||||
|
||||
/* Callback to bvh tree raycast. The tree must have been built using bvhtree_from_mesh_edges.
|
||||
* userdata must be a BVHMeshCallbackUserdata built from the same mesh as the tree. */
|
||||
/**
|
||||
* Callback to BVH-tree ray-cast.
|
||||
* The tree must have been built using bvhtree_from_mesh_edges.
|
||||
*
|
||||
* \param userdata: Must be a #BVHMeshCallbackUserdata built from the same mesh as the tree.
|
||||
*/
|
||||
static void mesh_edges_spherecast(void *userdata,
|
||||
int index,
|
||||
const BVHTreeRay *ray,
|
||||
|
@ -647,7 +669,9 @@ static void bvhtree_from_mesh_verts_setup_data(BVHTreeFromMesh *data,
|
|||
data->vert_allocated = vert_allocated;
|
||||
}
|
||||
|
||||
/* Builds a bvh tree where nodes are the vertices of the given em */
|
||||
/**
|
||||
* Builds a BVH-tree where nodes are the vertices of the given `em`.
|
||||
*/
|
||||
BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data,
|
||||
BMEditMesh *em,
|
||||
const BLI_bitmap *verts_mask,
|
||||
|
@ -704,10 +728,10 @@ BVHTree *bvhtree_from_editmesh_verts(
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds a bvh tree where nodes are the given vertices (NOTE: does not copy given `vert`!).
|
||||
* Builds a BVH-tree where nodes are the given vertices (NOTE: does not copy given `vert`!).
|
||||
* \param vert_allocated: if true, vert freeing will be done when freeing data.
|
||||
* \param verts_mask: if not null, true elements give which vert to add to BVH tree.
|
||||
* \param verts_num_active: if >= 0, number of active verts to add to BVH tree
|
||||
* \param verts_mask: if not null, true elements give which vert to add to BVH-tree.
|
||||
* \param verts_num_active: if >= 0, number of active verts to add to BVH-tree
|
||||
* (else will be computed from mask).
|
||||
*/
|
||||
BVHTree *bvhtree_from_mesh_verts_ex(BVHTreeFromMesh *data,
|
||||
|
@ -860,7 +884,9 @@ static void bvhtree_from_mesh_edges_setup_data(BVHTreeFromMesh *data,
|
|||
data->edge_allocated = edge_allocated;
|
||||
}
|
||||
|
||||
/* Builds a bvh tree where nodes are the edges of the given em */
|
||||
/**
|
||||
* Builds a BVH-tree where nodes are the edges of the given `em`.
|
||||
*/
|
||||
BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data,
|
||||
BMEditMesh *em,
|
||||
const BLI_bitmap *edges_mask,
|
||||
|
@ -916,11 +942,11 @@ BVHTree *bvhtree_from_editmesh_edges(
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds a bvh tree where nodes are the given edges .
|
||||
* Builds a BVH-tree where nodes are the given edges.
|
||||
* \param vert, vert_allocated: if true, elem freeing will be done when freeing data.
|
||||
* \param edge, edge_allocated: if true, elem freeing will be done when freeing data.
|
||||
* \param edges_mask: if not null, true elements give which vert to add to BVH tree.
|
||||
* \param edges_num_active: if >= 0, number of active edges to add to BVH tree
|
||||
* \param edges_mask: if not null, true elements give which vert to add to BVH-tree.
|
||||
* \param edges_num_active: if >= 0, number of active edges to add to BVH-tree
|
||||
* (else will be computed from mask).
|
||||
*/
|
||||
BVHTree *bvhtree_from_mesh_edges_ex(BVHTreeFromMesh *data,
|
||||
|
@ -1050,12 +1076,12 @@ static void bvhtree_from_mesh_faces_setup_data(BVHTreeFromMesh *data,
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds a bvh tree where nodes are the given tessellated faces
|
||||
* Builds a BVH-tree where nodes are the given tessellated faces
|
||||
* (NOTE: does not copy given mfaces!).
|
||||
* \param vert_allocated: if true, vert freeing will be done when freeing data.
|
||||
* \param face_allocated: if true, face freeing will be done when freeing data.
|
||||
* \param faces_mask: if not null, true elements give which faces to add to BVH tree.
|
||||
* \param faces_num_active: if >= 0, number of active faces to add to BVH tree
|
||||
* \param faces_mask: if not null, true elements give which faces to add to BVH-tree.
|
||||
* \param faces_num_active: if >= 0, number of active faces to add to BVH-tree
|
||||
* (else will be computed from mask).
|
||||
*/
|
||||
BVHTree *bvhtree_from_mesh_faces_ex(BVHTreeFromMesh *data,
|
||||
|
@ -1135,7 +1161,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree(float epsilon,
|
|||
if (tree) {
|
||||
const BMLoop *(*looptris)[3] = (const BMLoop *(*)[3])em->looptris;
|
||||
|
||||
/* Insert BMesh-tessellation triangles into the bvh tree, unless they are hidden
|
||||
/* Insert BMesh-tessellation triangles into the BVH-tree, unless they are hidden
|
||||
* and/or selected. Even if the faces themselves are not selected for the snapped
|
||||
* transform, having a vertex selected means the face (and thus it's tessellated
|
||||
* triangles) will be moving and will not be a good snap targets. */
|
||||
|
@ -1232,7 +1258,7 @@ static void bvhtree_from_mesh_looptri_setup_data(BVHTreeFromMesh *data,
|
|||
}
|
||||
|
||||
/**
|
||||
* Builds a bvh tree where nodes are the looptri faces of the given bm
|
||||
* Builds a BVH-tree where nodes are the `looptri` faces of the given `bm`.
|
||||
*/
|
||||
BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data,
|
||||
BMEditMesh *em,
|
||||
|
@ -1684,7 +1710,7 @@ BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
|
|||
mesh_eval_mutex);
|
||||
}
|
||||
else {
|
||||
/* Setup BVHTreeFromMesh */
|
||||
/* Setup #BVHTreeFromMesh */
|
||||
data->nearest_callback = nullptr; /* TODO */
|
||||
data->raycast_callback = nullptr; /* TODO */
|
||||
}
|
||||
|
@ -1704,7 +1730,7 @@ BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
|
|||
mesh_eval_mutex);
|
||||
}
|
||||
else {
|
||||
/* Setup BVHTreeFromMesh */
|
||||
/* Setup #BVHTreeFromMesh */
|
||||
data->nearest_callback = editmesh_looptri_nearest_point;
|
||||
data->raycast_callback = editmesh_looptri_spherecast;
|
||||
}
|
||||
|
@ -1741,7 +1767,9 @@ BVHTree *BKE_bvhtree_from_editmesh_get(BVHTreeFromEditMesh *data,
|
|||
|
||||
/** \} */
|
||||
|
||||
/* Frees data allocated by a call to bvhtree_from_editmesh_*. */
|
||||
/**
|
||||
* Frees data allocated by a call to `bvhtree_from_editmesh_*`.
|
||||
*/
|
||||
void free_bvhtree_from_editmesh(struct BVHTreeFromEditMesh *data)
|
||||
{
|
||||
if (data->tree) {
|
||||
|
@ -1752,7 +1780,9 @@ void free_bvhtree_from_editmesh(struct BVHTreeFromEditMesh *data)
|
|||
}
|
||||
}
|
||||
|
||||
/* Frees data allocated by a call to bvhtree_from_mesh_*. */
|
||||
/**
|
||||
* Frees data allocated by a call to `bvhtree_from_mesh_*`.
|
||||
*/
|
||||
void free_bvhtree_from_mesh(struct BVHTreeFromMesh *data)
|
||||
{
|
||||
if (data->tree && !data->cached) {
|
||||
|
|
|
@ -311,7 +311,7 @@ static void curve_deform_coords_impl(const Object *ob_curve,
|
|||
} \
|
||||
((void)0)
|
||||
|
||||
/* already in 'cd.curvespace', prev for loop */
|
||||
/* Already in 'cd.curvespace', previous for loop. */
|
||||
#define DEFORM_OP_CLAMPED(dvert) \
|
||||
{ \
|
||||
const float weight = invert_vgroup ? 1.0f - BKE_defvert_find_weight(dvert, defgrp_index) : \
|
||||
|
@ -369,7 +369,7 @@ static void curve_deform_coords_impl(const Object *ob_curve,
|
|||
}
|
||||
|
||||
for (a = 0; a < vert_coords_len; a++) {
|
||||
/* already in 'cd.curvespace', prev for loop */
|
||||
/* Already in 'cd.curvespace', previous for loop. */
|
||||
calc_curve_deform(ob_curve, vert_coords[a], defaxis, &cd, NULL);
|
||||
mul_m4_v3(cd.objectspace, vert_coords[a]);
|
||||
}
|
||||
|
|
|
@ -1797,7 +1797,7 @@ static void neighbor_coords_edge_get(const SubdivCCG *subdiv_ccg,
|
|||
r_neighbors->coords[i + 2] = coord_step_inside_from_boundary(subdiv_ccg, &grid_coord);
|
||||
|
||||
if (grid_coord.grid_index == coord->grid_index) {
|
||||
/* Prev and next along the edge for the current grid. */
|
||||
/* Previous and next along the edge for the current grid. */
|
||||
r_neighbors->coords[0] = boundary_coords[prev_point_index];
|
||||
r_neighbors->coords[1] = boundary_coords[next_point_index];
|
||||
}
|
||||
|
|
|
@ -1042,7 +1042,7 @@ static int pose_slide_invoke_common(bContext *C, wmOperator *op, const wmEvent *
|
|||
const ActKeyColumn *nk = ED_keylist_find_next(pso->keylist, cframe);
|
||||
|
||||
/* New set the frames. */
|
||||
/* Prev frame. */
|
||||
/* Previous frame. */
|
||||
pso->prevFrame = (pk) ? (pk->cfra) : (pso->cframe - 1);
|
||||
RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
|
||||
/* Next frame. */
|
||||
|
@ -1051,7 +1051,7 @@ static int pose_slide_invoke_common(bContext *C, wmOperator *op, const wmEvent *
|
|||
}
|
||||
else {
|
||||
/* Current frame itself is a keyframe, so just take keyframes on either side. */
|
||||
/* Prev frame. */
|
||||
/* Previous frame. */
|
||||
pso->prevFrame = (ak->prev) ? (ak->prev->cfra) : (pso->cframe - 1);
|
||||
RNA_int_set(op->ptr, "prev_frame", pso->prevFrame);
|
||||
/* Next frame. */
|
||||
|
|
|
@ -57,7 +57,7 @@ void ui_button_group_add_but(uiBlock *block, uiBut *but)
|
|||
uiButtonGroup *current_button_group = block->button_groups.last;
|
||||
|
||||
/* We can't use the button directly because adding it to
|
||||
* this list would mess with its prev and next pointers. */
|
||||
* this list would mess with its `prev` and `next` pointers. */
|
||||
LinkData *button_link = BLI_genericNodeN(but);
|
||||
BLI_addtail(¤t_button_group->buttons, button_link);
|
||||
}
|
||||
|
|
|
@ -183,8 +183,8 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
|
|||
else if (U.render_display_type == USER_RENDER_DISPLAY_SCREEN) {
|
||||
area = CTX_wm_area(C);
|
||||
|
||||
/* if the active screen is already in fullscreen mode, skip this and
|
||||
* unset the area, so that the fullscreen area is just changed later */
|
||||
/* If the active screen is already in full-screen mode, skip this and
|
||||
* unset the area, so that the full-screen area is just changed later. */
|
||||
if (area && area->full) {
|
||||
area = NULL;
|
||||
}
|
||||
|
@ -216,10 +216,10 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
|
|||
ED_area_newspace(C, area, SPACE_IMAGE, true);
|
||||
sima = area->spacedata.first;
|
||||
|
||||
/* makes ESC go back to prev space */
|
||||
/* Makes "Escape" go back to previous space. */
|
||||
sima->flag |= SI_PREVSPACE;
|
||||
|
||||
/* we already had a fullscreen here -> mark new space as a stacked fullscreen */
|
||||
/* We already had a full-screen here -> mark new space as a stacked full-screen. */
|
||||
if (area->full) {
|
||||
area->flag |= AREA_FLAG_STACKED_FULLSCREEN;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ ScrArea *render_view_open(bContext *C, int mx, int my, ReportList *reports)
|
|||
// XXX newspace(area, SPACE_IMAGE);
|
||||
sima = area->spacedata.first;
|
||||
|
||||
/* makes ESC go back to prev space */
|
||||
/* Makes "Escape" go back to previous space. */
|
||||
sima->flag |= SI_PREVSPACE;
|
||||
}
|
||||
}
|
||||
|
@ -275,7 +275,7 @@ static int render_view_cancel_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
ScrArea *area = CTX_wm_area(C);
|
||||
SpaceImage *sima = area->spacedata.first;
|
||||
|
||||
/* ensure image editor fullscreen and area fullscreen states are in sync */
|
||||
/* ensure image editor full-screen and area full-screen states are in sync */
|
||||
if ((sima->flag & SI_FULLWINDOW) && !area->full) {
|
||||
sima->flag &= ~SI_FULLWINDOW;
|
||||
}
|
||||
|
|
|
@ -1880,7 +1880,7 @@ static bool euler_filter_single_channel(FCurve *fcu)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Prev follows bezt, bezt = "current" point to be fixed. */
|
||||
/* `prev` follows bezt, bezt = "current" point to be fixed. */
|
||||
/* Our method depends on determining a "difference" from the previous vert. */
|
||||
bool is_modified = false;
|
||||
for (i = 1, prev = fcu->bezt, bezt = fcu->bezt + 1; i < fcu->totvert; i++, prev = bezt++) {
|
||||
|
|
|
@ -378,7 +378,7 @@ void ED_image_point_pos__reverse(SpaceImage *sima,
|
|||
}
|
||||
|
||||
/**
|
||||
* This is more a user-level functionality, for going to next/prev used slot,
|
||||
* This is more a user-level functionality, for going to `next/prev` used slot,
|
||||
* Stepping onto the last unused slot too.
|
||||
*/
|
||||
bool ED_image_slot_cycle(struct Image *image, int direction)
|
||||
|
|
|
@ -2177,7 +2177,7 @@ static void draw_nodetree(const bContext *C,
|
|||
}
|
||||
|
||||
/**
|
||||
* Make the background slightly brighter to indicate that users are inside a nodegroup.
|
||||
* Make the background slightly brighter to indicate that users are inside a node-group.
|
||||
*/
|
||||
static void draw_background_color(const SpaceNode *snode)
|
||||
{
|
||||
|
|
|
@ -86,8 +86,8 @@ static void load_post_callback(struct Main * /*main*/,
|
|||
}
|
||||
|
||||
static bCallbackFuncStore load_post_callback_funcstore = {
|
||||
nullptr,
|
||||
nullptr, /* next, prev */
|
||||
nullptr, /* next */
|
||||
nullptr, /* prev */
|
||||
load_post_callback, /* func */
|
||||
nullptr, /* arg */
|
||||
0 /* alloc */
|
||||
|
|
|
@ -20,11 +20,10 @@
|
|||
/** \file
|
||||
* \ingroup imbuf
|
||||
*
|
||||
* This file was moved here from the src/ directory. It is meant to
|
||||
* deal with endianness. It resided in a general blending lib. The
|
||||
* other functions were only used during rendering. This single
|
||||
* function remained. It should probably move to imbuf/intern/util.c,
|
||||
* but we'll keep it here for the time being. (nzc)
|
||||
* This file was moved here from the `src/` directory.
|
||||
* It is meant to deal with endianness. It resided in a general blending lib.
|
||||
* The other functions were only used during rendering. This single function remained.
|
||||
* It should probably move to `imbuf/intern/util.c`, but we'll keep it here for the time being.
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
|
|
@ -274,7 +274,7 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Could pe part of the magic check above,
|
||||
/* Could be part of the magic check above,
|
||||
* by convention this check only requests the size needed to read it's magic though. */
|
||||
if (size < HEADER_SIZE) {
|
||||
return NULL;
|
||||
|
|
|
@ -955,7 +955,7 @@ void ArmatureImporter::make_shape_keys(bContext *C)
|
|||
COLLADAFW::UniqueIdArray &morphTargetIds = (*mc)->getMorphTargets();
|
||||
COLLADAFW::FloatOrDoubleArray &morphWeights = (*mc)->getMorphWeights();
|
||||
|
||||
/* Prereq: all the geometries must be imported and mesh objects must be made */
|
||||
/* Prerequisite: all the geometries must be imported and mesh objects must be made. */
|
||||
Object *source_ob = this->mesh_importer->get_object_by_geom_uid((*mc)->getSource());
|
||||
|
||||
if (source_ob) {
|
||||
|
|
Loading…
Reference in New Issue