Cleanup: Use r_ prefix for boolean return parameters
Also rearrange some lines to simplify logic.
This commit is contained in:
parent
c40971d79a
commit
98395e0bdf
|
@ -218,12 +218,12 @@ Alembic::AbcGeom::IXform AbcObjectReader::xform()
|
|||
void AbcObjectReader::read_matrix(float r_mat[4][4] /* local matrix */,
|
||||
const chrono_t time,
|
||||
const float scale,
|
||||
bool &is_constant)
|
||||
bool &r_is_constant)
|
||||
{
|
||||
IXform ixform = xform();
|
||||
if (!ixform) {
|
||||
unit_m4(r_mat);
|
||||
is_constant = true;
|
||||
r_is_constant = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -254,7 +254,7 @@ void AbcObjectReader::read_matrix(float r_mat[4][4] /* local matrix */,
|
|||
mul_m4_m4m4(r_mat, scale_mat, r_mat);
|
||||
}
|
||||
|
||||
is_constant = schema.isConstant();
|
||||
r_is_constant = schema.isConstant();
|
||||
}
|
||||
|
||||
void AbcObjectReader::addCacheModifier()
|
||||
|
|
|
@ -200,7 +200,7 @@ static bool node_needs_own_transform_relation(const bNode &node)
|
|||
|
||||
static void process_nodes_for_depsgraph(const bNodeTree &tree,
|
||||
Set<ID *> &ids,
|
||||
bool &needs_own_transform_relation)
|
||||
bool &r_needs_own_transform_relation)
|
||||
{
|
||||
Set<const bNodeTree *> handled_groups;
|
||||
|
||||
|
@ -211,10 +211,10 @@ static void process_nodes_for_depsgraph(const bNodeTree &tree,
|
|||
if (ELEM(node->type, NODE_GROUP, NODE_CUSTOM_GROUP)) {
|
||||
const bNodeTree *group = (bNodeTree *)node->id;
|
||||
if (group != nullptr && handled_groups.add(group)) {
|
||||
process_nodes_for_depsgraph(*group, ids, needs_own_transform_relation);
|
||||
process_nodes_for_depsgraph(*group, ids, r_needs_own_transform_relation);
|
||||
}
|
||||
}
|
||||
needs_own_transform_relation |= node_needs_own_transform_relation(*node);
|
||||
r_needs_own_transform_relation |= node_needs_own_transform_relation(*node);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -90,13 +90,13 @@ static void try_capture_field_on_geometry(GeometryComponent &component,
|
|||
const StringRef name,
|
||||
const eAttrDomain domain,
|
||||
const GField &field,
|
||||
std::atomic<bool> &failure)
|
||||
std::atomic<bool> &r_failure)
|
||||
{
|
||||
const int domain_size = component.attribute_domain_size(domain);
|
||||
MutableAttributeAccessor attributes = *component.attributes_for_write();
|
||||
const int domain_size = attributes.domain_size(domain);
|
||||
if (domain_size == 0) {
|
||||
return;
|
||||
}
|
||||
MutableAttributeAccessor attributes = *component.attributes_for_write();
|
||||
|
||||
GeometryComponentFieldContext field_context{component, domain};
|
||||
const IndexMask mask{IndexMask(domain_size)};
|
||||
|
@ -133,7 +133,7 @@ static void try_capture_field_on_geometry(GeometryComponent &component,
|
|||
* it's required, and adding the attribute might fail if the domain or type is incorrect. */
|
||||
type.destruct_n(buffer, domain_size);
|
||||
MEM_freeN(buffer);
|
||||
failure = true;
|
||||
r_failure = true;
|
||||
}
|
||||
|
||||
static void node_geo_exec(GeoNodeExecParams params)
|
||||
|
|
Loading…
Reference in New Issue