Cleanup: spelling
This commit is contained in:
parent
afd976a3b4
commit
26ffed7466
|
@ -266,7 +266,7 @@ inline void processor_apply_pixels(const OCIO::Processor *processor, T *pixels,
|
||||||
{
|
{
|
||||||
/* TODO: implement faster version for when we know the conversion
|
/* TODO: implement faster version for when we know the conversion
|
||||||
* is a simple matrix transform between linear spaces. In that case
|
* is a simple matrix transform between linear spaces. In that case
|
||||||
* unpremultiply is not needed. */
|
* un-premultiply is not needed. */
|
||||||
|
|
||||||
/* Process large images in chunks to keep temporary memory requirement down. */
|
/* Process large images in chunks to keep temporary memory requirement down. */
|
||||||
const size_t chunk_size = std::min((size_t)(16 * 1024 * 1024), num_pixels);
|
const size_t chunk_size = std::min((size_t)(16 * 1024 * 1024), num_pixels);
|
||||||
|
@ -354,7 +354,7 @@ void ColorSpaceManager::to_scene_linear(ColorSpaceProcessor *processor_,
|
||||||
processor->applyRGB(pixel);
|
processor->applyRGB(pixel);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Unassociate and associate alpha since color management should not
|
/* Un-associate and associate alpha since color management should not
|
||||||
* be affected by transparency. */
|
* be affected by transparency. */
|
||||||
float alpha = pixel[3];
|
float alpha = pixel[3];
|
||||||
float inv_alpha = 1.0f / alpha;
|
float inv_alpha = 1.0f / alpha;
|
||||||
|
|
|
@ -942,12 +942,12 @@ void ShaderGraph::refine_bump_nodes()
|
||||||
foreach (NodePair &pair, nodes_dy)
|
foreach (NodePair &pair, nodes_dy)
|
||||||
add(pair.second);
|
add(pair.second);
|
||||||
|
|
||||||
/* connect what is connected is bump to samplecenter input*/
|
/* Connect what is connected is bump to sample-center input. */
|
||||||
connect(out, node->input("SampleCenter"));
|
connect(out, node->input("SampleCenter"));
|
||||||
|
|
||||||
/* bump input is just for connectivity purpose for the graph input,
|
/* Bump input is just for connectivity purpose for the graph input,
|
||||||
* we re-connected this input to samplecenter, so lets disconnect it
|
* we re-connected this input to sample-center, so lets disconnect it
|
||||||
* from bump input */
|
* from bump input. */
|
||||||
disconnect(bump_input);
|
disconnect(bump_input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1032,12 +1032,14 @@ bool BLI_bvhtree_update_node(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* call BLI_bvhtree_update_node() first for every node/point/triangle */
|
/**
|
||||||
|
* Call #BLI_bvhtree_update_node() first for every node/point/triangle.
|
||||||
|
*/
|
||||||
void BLI_bvhtree_update_tree(BVHTree *tree)
|
void BLI_bvhtree_update_tree(BVHTree *tree)
|
||||||
{
|
{
|
||||||
/* Update bottom=>top
|
/* Update bottom=>top
|
||||||
* TRICKY: the way we build the tree all the childs have an index greater than the parent
|
* TRICKY: the way we build the tree all the children have an index greater than the parent
|
||||||
* This allows us todo a bottom up update by starting on the bigger numbered branch */
|
* This allows us todo a bottom up update by starting on the bigger numbered branch. */
|
||||||
|
|
||||||
BVHNode **root = tree->nodes + tree->totleaf;
|
BVHNode **root = tree->nodes + tree->totleaf;
|
||||||
BVHNode **index = tree->nodes + tree->totleaf + tree->totbranch - 1;
|
BVHNode **index = tree->nodes + tree->totleaf + tree->totbranch - 1;
|
||||||
|
@ -2309,7 +2311,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is a generic function to perform a depth first search on the BVHTree
|
* This is a generic function to perform a depth first search on the #BVHTree
|
||||||
* where the search order and nodes traversed depend on callbacks passed in.
|
* where the search order and nodes traversed depend on callbacks passed in.
|
||||||
*
|
*
|
||||||
* \param tree: Tree to walk.
|
* \param tree: Tree to walk.
|
||||||
|
@ -2317,7 +2319,7 @@ static bool bvhtree_walk_dfs_recursive(BVHTree_WalkData *walk_data, const BVHNod
|
||||||
* \param walk_leaf_cb: Callback to test leaf nodes, callback must store its own result,
|
* \param walk_leaf_cb: Callback to test leaf nodes, callback must store its own result,
|
||||||
* returning false exits early.
|
* returning false exits early.
|
||||||
* \param walk_order_cb: Callback that indicates which direction to search,
|
* \param walk_order_cb: Callback that indicates which direction to search,
|
||||||
* either from the node with the lower or higher k-dop axis value.
|
* either from the node with the lower or higher K-DOP axis value.
|
||||||
* \param userdata: Argument passed to all callbacks.
|
* \param userdata: Argument passed to all callbacks.
|
||||||
*/
|
*/
|
||||||
void BLI_bvhtree_walk_dfs(BVHTree *tree,
|
void BLI_bvhtree_walk_dfs(BVHTree *tree,
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
/** \file
|
/** \file
|
||||||
* \ingroup bli
|
* \ingroup bli
|
||||||
*
|
*
|
||||||
* Utility functions for variable size bitmasks.
|
* Utility functions for variable size bit-masks.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -409,7 +409,7 @@ char *BLI_str_quoted_substrN(const char *__restrict str, const char *__restrict
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* string with all instances of substr_old replaced with substr_new,
|
* string with all instances of substr_old replaced with substr_new,
|
||||||
* Returns a copy of the cstring \a str into a newly mallocN'd
|
* Returns a copy of the c-string \a str into a newly #MEM_mallocN'd
|
||||||
* and returns it.
|
* and returns it.
|
||||||
*
|
*
|
||||||
* \note A rather wasteful string-replacement utility, though this shall do for now...
|
* \note A rather wasteful string-replacement utility, though this shall do for now...
|
||||||
|
@ -430,53 +430,49 @@ char *BLI_str_replaceN(const char *__restrict str,
|
||||||
|
|
||||||
BLI_assert(substr_old[0] != '\0');
|
BLI_assert(substr_old[0] != '\0');
|
||||||
|
|
||||||
/* while we can still find a match for the old substring that we're searching for,
|
/* While we can still find a match for the old sub-string that we're searching for,
|
||||||
* keep dicing and replacing
|
* keep dicing and replacing. */
|
||||||
*/
|
|
||||||
while ((match = strstr(str, substr_old))) {
|
while ((match = strstr(str, substr_old))) {
|
||||||
/* the assembly buffer only gets created when we actually need to rebuild the string */
|
/* the assembly buffer only gets created when we actually need to rebuild the string */
|
||||||
if (ds == NULL) {
|
if (ds == NULL) {
|
||||||
ds = BLI_dynstr_new();
|
ds = BLI_dynstr_new();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if the match position does not match the current position in the string,
|
/* If the match position does not match the current position in the string,
|
||||||
* copy the text up to this position and advance the current position in the string
|
* copy the text up to this position and advance the current position in the string. */
|
||||||
*/
|
|
||||||
if (str != match) {
|
if (str != match) {
|
||||||
/* add the segment of the string from str to match to the buffer,
|
/* Add the segment of the string from `str` to match to the buffer,
|
||||||
* then restore the value at match */
|
* then restore the value at match. */
|
||||||
BLI_dynstr_nappend(ds, str, (match - str));
|
BLI_dynstr_nappend(ds, str, (match - str));
|
||||||
|
|
||||||
/* now our current position should be set on the start of the match */
|
/* now our current position should be set on the start of the match */
|
||||||
str = match;
|
str = match;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* add the replacement text to the accumulation buffer */
|
/* Add the replacement text to the accumulation buffer. */
|
||||||
BLI_dynstr_append(ds, substr_new);
|
BLI_dynstr_append(ds, substr_new);
|
||||||
|
|
||||||
/* advance the current position of the string up to the end of the replaced segment */
|
/* Advance the current position of the string up to the end of the replaced segment. */
|
||||||
str += len_old;
|
str += len_old;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* finish off and return a new string that has had all occurrences of */
|
/* Finish off and return a new string that has had all occurrences of. */
|
||||||
if (ds) {
|
if (ds) {
|
||||||
char *str_new;
|
char *str_new;
|
||||||
|
|
||||||
/* add what's left of the string to the assembly buffer
|
/* Add what's left of the string to the assembly buffer
|
||||||
* - we've been adjusting str to point at the end of the replaced segments
|
* - we've been adjusting `str` to point at the end of the replaced segments. */
|
||||||
*/
|
|
||||||
BLI_dynstr_append(ds, str);
|
BLI_dynstr_append(ds, str);
|
||||||
|
|
||||||
/* convert to new c-string (MEM_malloc'd), and free the buffer */
|
/* Convert to new c-string (MEM_malloc'd), and free the buffer. */
|
||||||
str_new = BLI_dynstr_get_cstring(ds);
|
str_new = BLI_dynstr_get_cstring(ds);
|
||||||
BLI_dynstr_free(ds);
|
BLI_dynstr_free(ds);
|
||||||
|
|
||||||
return str_new;
|
return str_new;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* just create a new copy of the entire string - we avoid going through the assembly buffer
|
/* Just create a new copy of the entire string - we avoid going through the assembly buffer
|
||||||
* for what should be a bit more efficiency...
|
* for what should be a bit more efficiency. */
|
||||||
*/
|
|
||||||
return BLI_strdup(str);
|
return BLI_strdup(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -901,16 +901,17 @@ static void math_layer_info_init(BevelParams *bp, BMesh *bm)
|
||||||
MEM_freeN(stack);
|
MEM_freeN(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Use a tie-breaking rule to choose a representative face when
|
/**
|
||||||
* there are number of choices, face[0], face[1], ..., face[nfaces].
|
* Use a tie-breaking rule to choose a representative face when
|
||||||
|
* there are number of choices, `face[0]`, `face[1]`, ..., `face[nfaces]`.
|
||||||
* This is needed when there are an odd number of segments, and the center
|
* This is needed when there are an odd number of segments, and the center
|
||||||
* segmment (and its continuation into vmesh) can usually arbitrarily be
|
* segment (and its continuation into vmesh) can usually arbitrarily be
|
||||||
* the previous face or the next face.
|
* the previous face or the next face.
|
||||||
* Or, for the center polygon of a corner, all of the faces around
|
* Or, for the center polygon of a corner, all of the faces around
|
||||||
* the vertex are possible choices.
|
* the vertex are possible choices.
|
||||||
* If we just choose randomly, the resulting UV maps or material
|
* If we just choose randomly, the resulting UV maps or material
|
||||||
* assignment can look ugly/inconsistent.
|
* assignment can look ugly/inconsistent.
|
||||||
* Allow for the case when args are null.
|
* Allow for the case when arguments are null.
|
||||||
*/
|
*/
|
||||||
static BMFace *choose_rep_face(BevelParams *bp, BMFace **face, int nfaces)
|
static BMFace *choose_rep_face(BevelParams *bp, BMFace **face, int nfaces)
|
||||||
{
|
{
|
||||||
|
@ -2948,7 +2949,7 @@ static void build_boundary(BevelParams *bp, BevVert *bv, bool construct)
|
||||||
bool betodd = (between % 2) == 1;
|
bool betodd = (between % 2) == 1;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
/* Put first half of in-between edges at index 0, second half at index bp->seg.
|
/* Put first half of in-between edges at index 0, second half at index bp->seg.
|
||||||
* If between is odd, put middle one at midindex. */
|
* If between is odd, put middle one at mid-index. */
|
||||||
for (e3 = e->next; e3 != e2; e3 = e3->next) {
|
for (e3 = e->next; e3 != e2; e3 = e3->next) {
|
||||||
v1->elast = e3;
|
v1->elast = e3;
|
||||||
if (i < bet2) {
|
if (i < bet2) {
|
||||||
|
@ -4682,10 +4683,11 @@ static float interp_poly_area(BevVert *bv, BMFace *frep)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If we make a poly out of verts around bv, snapping to rep frep, will uv poly have zero area?
|
* If we make a poly out of verts around \a bv, snapping to rep \a frep,
|
||||||
* The uv poly is made by snapping all outside-of-frep vertices to the closest edge in frep.
|
* will uv poly have zero area?
|
||||||
|
* The uv poly is made by snapping all `outside-of-frep` vertices to the closest edge in \a frep.
|
||||||
* Sometimes this results in a zero or very small area polygon, which translates to a zero
|
* Sometimes this results in a zero or very small area polygon, which translates to a zero
|
||||||
* or very small area polygong in UV space -- not good for interpolating textures.
|
* or very small area polygon in UV space -- not good for interpolating textures.
|
||||||
*/
|
*/
|
||||||
static bool is_bad_uv_poly(BevVert *bv, BMFace *frep)
|
static bool is_bad_uv_poly(BevVert *bv, BMFace *frep)
|
||||||
{
|
{
|
||||||
|
@ -4693,8 +4695,8 @@ static bool is_bad_uv_poly(BevVert *bv, BMFace *frep)
|
||||||
return area < BEVEL_EPSILON_BIG;
|
return area < BEVEL_EPSILON_BIG;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Pick a good face from all the faces around bv to use for
|
* Pick a good face from all the faces around \a bv to use for
|
||||||
* a representative face, using choose_rep_face.
|
* a representative face, using choose_rep_face.
|
||||||
* We want to choose from among the faces that would be
|
* We want to choose from among the faces that would be
|
||||||
* chosen for a single-segment edge polygon between two successive
|
* chosen for a single-segment edge polygon between two successive
|
||||||
|
@ -4801,10 +4803,12 @@ static void build_center_ngon(BevelParams *bp, BMesh *bm, BevVert *bv, int mat_n
|
||||||
BLI_array_free(ve);
|
BLI_array_free(ve);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Special case of bevel_build_rings when tri-corner and profile is 0.
|
/**
|
||||||
|
* Special case of #bevel_build_rings when triangle-corner and profile is 0.
|
||||||
* There is no corner mesh except, if nseg odd, for a center poly.
|
* There is no corner mesh except, if nseg odd, for a center poly.
|
||||||
* Boundary verts merge with previous ones according to pattern:
|
* Boundary verts merge with previous ones according to pattern:
|
||||||
* (i, 0, k) merged with (i+1, 0, ns-k) for k <= ns/2. */
|
* (i, 0, k) merged with (i+1, 0, ns-k) for k <= ns/2.
|
||||||
|
*/
|
||||||
static void build_square_in_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv, VMesh *vm1)
|
static void build_square_in_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv, VMesh *vm1)
|
||||||
{
|
{
|
||||||
int n, ns, ns2, odd, i, k;
|
int n, ns, ns2, odd, i, k;
|
||||||
|
@ -4838,7 +4842,9 @@ static void build_square_in_vmesh(BevelParams *bp, BMesh *bm, BevVert *bv, VMesh
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy whichever of a and b is closer to v into r. */
|
/**
|
||||||
|
* Copy whichever of \a a and \a b is closer to v into \a r.
|
||||||
|
*/
|
||||||
static void closer_v3_v3v3v3(float r[3], float a[3], float b[3], float v[3])
|
static void closer_v3_v3v3v3(float r[3], float a[3], float b[3], float v[3])
|
||||||
{
|
{
|
||||||
if (len_squared_v3v3(a, v) <= len_squared_v3v3(b, v)) {
|
if (len_squared_v3v3(a, v) <= len_squared_v3v3(b, v)) {
|
||||||
|
@ -4998,7 +5004,7 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
|
||||||
bndv = bndv->next;
|
bndv = bndv->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill in rest of centerlines by interpolation. */
|
/* Fill in rest of center-lines by interpolation. */
|
||||||
copy_v3_v3(co2, bv->v->co);
|
copy_v3_v3(co2, bv->v->co);
|
||||||
bndv = vm->boundstart;
|
bndv = vm->boundstart;
|
||||||
for (i = 0; i < n_bndv; i++) {
|
for (i = 0; i < n_bndv; i++) {
|
||||||
|
@ -5049,7 +5055,7 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
|
||||||
}
|
}
|
||||||
vmesh_copy_equiv_verts(vm);
|
vmesh_copy_equiv_verts(vm);
|
||||||
|
|
||||||
/* Fill in interior points by interpolation from edges to centerlines. */
|
/* Fill in interior points by interpolation from edges to center-lines. */
|
||||||
bndv = vm->boundstart;
|
bndv = vm->boundstart;
|
||||||
for (i = 0; i < n_bndv; i++) {
|
for (i = 0; i < n_bndv; i++) {
|
||||||
im1 = (i == 0) ? n_bndv - 1 : i - 1;
|
im1 = (i == 0) ? n_bndv - 1 : i - 1;
|
||||||
|
@ -5087,9 +5093,9 @@ static VMesh *square_out_adj_vmesh(BevelParams *bp, BevVert *bv)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given that the boundary is built and the boundary BMVerts have been made,
|
* Given that the boundary is built and the boundary #BMVert's have been made,
|
||||||
* calculate the positions of the interior mesh points for the M_ADJ pattern,
|
* calculate the positions of the interior mesh points for the M_ADJ pattern,
|
||||||
* using cubic subdivision, then make the BMVerts and the new faces.
|
* using cubic subdivision, then make the #BMVert's and the new faces.
|
||||||
*/
|
*/
|
||||||
static void bevel_build_rings(BevelParams *bp, BMesh *bm, BevVert *bv, BoundVert *vpipe)
|
static void bevel_build_rings(BevelParams *bp, BMesh *bm, BevVert *bv, BoundVert *vpipe)
|
||||||
{
|
{
|
||||||
|
@ -5312,7 +5318,7 @@ static void bevel_build_cutoff(BevelParams *bp, BMesh *bm, BevVert *bv)
|
||||||
i = bndv->index;
|
i = bndv->index;
|
||||||
|
|
||||||
/* Find the "down" direction for this side of the cutoff face. */
|
/* Find the "down" direction for this side of the cutoff face. */
|
||||||
/* Find the direction along the intersection of the two adjecent profile normals. */
|
/* Find the direction along the intersection of the two adjacent profile normals. */
|
||||||
cross_v3_v3v3(down_direction, bndv->profile.plane_no, bndv->prev->profile.plane_no);
|
cross_v3_v3v3(down_direction, bndv->profile.plane_no, bndv->prev->profile.plane_no);
|
||||||
if (dot_v3v3(down_direction, bv->v->no) > 0.0f) {
|
if (dot_v3v3(down_direction, bv->v->no) > 0.0f) {
|
||||||
negate_v3(down_direction);
|
negate_v3(down_direction);
|
||||||
|
@ -7121,7 +7127,7 @@ static float find_profile_fullness(BevelParams *bp)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fills the ProfileSpacing struct with the 2D coordinates for the profile's vertices.
|
* Fills the ProfileSpacing struct with the 2D coordinates for the profile's vertices.
|
||||||
* The superellipse used for multisegment profiles does not have a closed-form way
|
* The superellipse used for multi-segment profiles does not have a closed-form way
|
||||||
* to generate evenly spaced points along an arc. We use an expensive search procedure
|
* to generate evenly spaced points along an arc. We use an expensive search procedure
|
||||||
* to find the parameter values that lead to bp->seg even chords.
|
* to find the parameter values that lead to bp->seg even chords.
|
||||||
* We also want spacing for a number of segments that is a power of 2 >= bp->seg (but at least 4).
|
* We also want spacing for a number of segments that is a power of 2 >= bp->seg (but at least 4).
|
||||||
|
|
|
@ -106,7 +106,7 @@
|
||||||
* This is read-only, for writing use PBVH vertex iterators. There vd.index matches
|
* This is read-only, for writing use PBVH vertex iterators. There vd.index matches
|
||||||
* the indices used here.
|
* the indices used here.
|
||||||
*
|
*
|
||||||
* For multires, the same vertex in multiple grids is counted multiple times, with
|
* For multi-resolution, the same vertex in multiple grids is counted multiple times, with
|
||||||
* different index for each grid. */
|
* different index for each grid. */
|
||||||
|
|
||||||
void SCULPT_vertex_random_access_init(SculptSession *ss)
|
void SCULPT_vertex_random_access_init(SculptSession *ss)
|
||||||
|
@ -779,25 +779,32 @@ bool SCULPT_vertex_is_boundary(SculptSession *ss, const int index)
|
||||||
|
|
||||||
/* Utils */
|
/* Utils */
|
||||||
|
|
||||||
/* Returns true when the step belongs to the stroke that is directly performend by the brush and
|
/**
|
||||||
* not by one of the symmetry passes. */
|
* Returns true when the step belongs to the stroke that is directly performed by the brush and
|
||||||
|
* not by one of the symmetry passes.
|
||||||
|
*/
|
||||||
bool SCULPT_stroke_is_main_symmetry_pass(StrokeCache *cache)
|
bool SCULPT_stroke_is_main_symmetry_pass(StrokeCache *cache)
|
||||||
{
|
{
|
||||||
return cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 &&
|
return cache->mirror_symmetry_pass == 0 && cache->radial_symmetry_pass == 0 &&
|
||||||
cache->tile_pass == 0;
|
cache->tile_pass == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes
|
/**
|
||||||
* enabled. */
|
* Return true only once per stroke on the first symmetry pass, regardless of the symmetry passes
|
||||||
/* This should be used for functionality that needs to be computed once per stroke of a particular
|
* enabled.
|
||||||
* tool (allocating memory, updating random seeds...). */
|
*
|
||||||
|
* This should be used for functionality that needs to be computed once per stroke of a particular
|
||||||
|
* tool (allocating memory, updating random seeds...).
|
||||||
|
*/
|
||||||
bool SCULPT_stroke_is_first_brush_step(StrokeCache *cache)
|
bool SCULPT_stroke_is_first_brush_step(StrokeCache *cache)
|
||||||
{
|
{
|
||||||
return cache->first_time && cache->mirror_symmetry_pass == 0 &&
|
return cache->first_time && cache->mirror_symmetry_pass == 0 &&
|
||||||
cache->radial_symmetry_pass == 0 && cache->tile_pass == 0;
|
cache->radial_symmetry_pass == 0 && cache->tile_pass == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returnns true on the first brush step of each symmetry pass. */
|
/**
|
||||||
|
* Returns true on the first brush step of each symmetry pass.
|
||||||
|
*/
|
||||||
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache)
|
bool SCULPT_stroke_is_first_brush_step_of_symmetry_pass(StrokeCache *cache)
|
||||||
{
|
{
|
||||||
return cache->first_time;
|
return cache->first_time;
|
||||||
|
@ -1119,8 +1126,10 @@ typedef enum StrokeFlags {
|
||||||
CLIP_Z = 4,
|
CLIP_Z = 4,
|
||||||
} StrokeFlags;
|
} StrokeFlags;
|
||||||
|
|
||||||
/* Initialize a SculptOrigVertData for accessing original vertex data;
|
/**
|
||||||
* handles BMesh, mesh, and multires. */
|
* Initialize a #SculptOrigVertData for accessing original vertex data;
|
||||||
|
* handles #BMesh, #Mesh, and multi-resolution.
|
||||||
|
*/
|
||||||
void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, SculptUndoNode *unode)
|
void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, SculptUndoNode *unode)
|
||||||
{
|
{
|
||||||
SculptSession *ss = ob->sculpt;
|
SculptSession *ss = ob->sculpt;
|
||||||
|
@ -1140,8 +1149,10 @@ void SCULPT_orig_vert_data_unode_init(SculptOrigVertData *data, Object *ob, Scul
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize a SculptOrigVertData for accessing original vertex data;
|
/**
|
||||||
* handles BMesh, mesh, and multires. */
|
* Initialize a #SculptOrigVertData for accessing original vertex data;
|
||||||
|
* handles #BMesh, #Mesh, and multi-resolution.
|
||||||
|
*/
|
||||||
void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node)
|
void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *node)
|
||||||
{
|
{
|
||||||
SculptUndoNode *unode;
|
SculptUndoNode *unode;
|
||||||
|
@ -1149,8 +1160,9 @@ void SCULPT_orig_vert_data_init(SculptOrigVertData *data, Object *ob, PBVHNode *
|
||||||
SCULPT_orig_vert_data_unode_init(data, ob, unode);
|
SCULPT_orig_vert_data_unode_init(data, ob, unode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update a SculptOrigVertData for a particular vertex from the PBVH
|
/**
|
||||||
* iterator. */
|
* Update a #SculptOrigVertData for a particular vertex from the PBVH iterator.
|
||||||
|
*/
|
||||||
void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter)
|
void SCULPT_orig_vert_data_update(SculptOrigVertData *orig_data, PBVHVertexIter *iter)
|
||||||
{
|
{
|
||||||
if (orig_data->unode->type == SCULPT_UNDO_COORDS) {
|
if (orig_data->unode->type == SCULPT_UNDO_COORDS) {
|
||||||
|
@ -1286,8 +1298,8 @@ static void sculpt_project_v3(const SculptProjectVector *spvc, const float vec[3
|
||||||
* otherwise.
|
* otherwise.
|
||||||
*
|
*
|
||||||
* Factors: some brushes like grab cannot do dynamic topology.
|
* Factors: some brushes like grab cannot do dynamic topology.
|
||||||
* Others, like smooth, are better without. Same goes for alt-
|
* Others, like smooth, are better without.
|
||||||
* key smoothing. */
|
* Same goes for alt-key smoothing. */
|
||||||
bool SCULPT_stroke_is_dynamic_topology(const SculptSession *ss, const Brush *brush)
|
bool SCULPT_stroke_is_dynamic_topology(const SculptSession *ss, const Brush *brush)
|
||||||
{
|
{
|
||||||
return ((BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) &&
|
return ((BKE_pbvh_type(ss->pbvh) == PBVH_BMESH) &&
|
||||||
|
@ -2143,9 +2155,11 @@ static void calc_area_normal_and_center(
|
||||||
|
|
||||||
/** \} */
|
/** \} */
|
||||||
|
|
||||||
/* Return modified brush strength. Includes the direction of the brush, positive
|
/**
|
||||||
|
* Return modified brush strength. Includes the direction of the brush, positive
|
||||||
* values pull vertices, negative values push. Uses tablet pressure and a
|
* values pull vertices, negative values push. Uses tablet pressure and a
|
||||||
* special multiplier found experimentally to scale the strength factor. */
|
* special multiplier found experimentally to scale the strength factor.
|
||||||
|
*/
|
||||||
static float brush_strength(const Sculpt *sd,
|
static float brush_strength(const Sculpt *sd,
|
||||||
const StrokeCache *cache,
|
const StrokeCache *cache,
|
||||||
const float feather,
|
const float feather,
|
||||||
|
@ -2461,7 +2475,9 @@ bool SCULPT_search_circle_cb(PBVHNode *node, void *data_v)
|
||||||
return dist_sq < data->radius_squared || true;
|
return dist_sq < data->radius_squared || true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handles clipping against a mirror modifier and SCULPT_LOCK axis flags. */
|
/**
|
||||||
|
* Handles clipping against a mirror modifier and #SCULPT_LOCK_X/Y/Z axis flags.
|
||||||
|
*/
|
||||||
void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3])
|
void SCULPT_clip(Sculpt *sd, SculptSession *ss, float co[3], const float val[3])
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) {
|
||||||
|
@ -5967,9 +5983,10 @@ static void do_radial_symmetry(Sculpt *sd,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Noise texture gives different values for the same input coord; this
|
/**
|
||||||
* can tear a multires mesh during sculpting so do a stitch in this
|
* Noise texture gives different values for the same input coord; this
|
||||||
* case. */
|
* can tear a multi-resolution mesh during sculpting so do a stitch in this case.
|
||||||
|
*/
|
||||||
static void sculpt_fix_noise_tear(Sculpt *sd, Object *ob)
|
static void sculpt_fix_noise_tear(Sculpt *sd, Object *ob)
|
||||||
{
|
{
|
||||||
SculptSession *ss = ob->sculpt;
|
SculptSession *ss = ob->sculpt;
|
||||||
|
@ -5996,7 +6013,7 @@ static void do_symmetrical_brush_actions(Sculpt *sd,
|
||||||
cache->bstrength = brush_strength(sd, cache, feather, ups);
|
cache->bstrength = brush_strength(sd, cache, feather, ups);
|
||||||
cache->symmetry = symm;
|
cache->symmetry = symm;
|
||||||
|
|
||||||
/* symm is a bit combination of XYZ -
|
/* `symm` is a bit combination of XYZ -
|
||||||
* 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
|
* 1 is mirror X; 2 is Y; 3 is XY; 4 is Z; 5 is XZ; 6 is YZ; 7 is XYZ */
|
||||||
for (int i = 0; i <= symm; i++) {
|
for (int i = 0; i <= symm; i++) {
|
||||||
if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
|
if (i == 0 || (symm & i && (symm != 5 || i != 3) && (symm != 6 || (i != 3 && i != 5)))) {
|
||||||
|
|
|
@ -125,7 +125,7 @@ void main_python_exit(void);
|
||||||
* patched USD (see usd.diff) to avoid that particular static constructor, and have an
|
* patched USD (see usd.diff) to avoid that particular static constructor, and have an
|
||||||
* initialization function instead.
|
* initialization function instead.
|
||||||
*
|
*
|
||||||
* This function is implemented in the USD source code, pxr/base/lib/plug/initConfig.cpp.
|
* This function is implemented in the USD source code, `pxr/base/lib/plug/initConfig.cpp`.
|
||||||
*/
|
*/
|
||||||
void usd_initialise_plugin_path(const char *datafiles_usd_path);
|
void usd_initialise_plugin_path(const char *datafiles_usd_path);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue