Merge branch 'blender-v3.0-release'

This commit is contained in:
Hans Goudey 2021-11-02 18:22:50 -05:00
commit ac0eefe26f
2 changed files with 21 additions and 3 deletions

View File

@ -163,8 +163,26 @@ static bool parse_channels(const ImageSpec &in_spec,
file_layers[layername].passes.push_back(pass);
}
/* 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. */
/* If file contains a single unnamed layer, name it after the first layer metadata we find. */
if (file_layers.size() == 1 && file_layers.find("") != file_layers.end()) {
for (const ParamValue &attrib : in_spec.extra_attribs) {
const string attrib_name = attrib.name().string();
if (string_startswith(attrib_name, "cycles.") && string_endswith(attrib_name, ".samples")) {
/* Extract layer name. */
const size_t start = strlen("cycles.");
const size_t end = attrib_name.size() - strlen(".samples");
const string layername = attrib_name.substr(start, end - start);
/* Reinsert as named instead of unnamed layer. */
const MergeImageLayer layer = file_layers[""];
file_layers.clear();
file_layers[layername] = layer;
}
}
}
/* 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;
MergeImageLayer &layer = i.second;

View File

@ -71,7 +71,7 @@ void register_node_type_geo_set_curve_tilt()
{
static bNodeType ntype;
geo_node_type_base(&ntype, GEO_NODE_SET_CURVE_TILT, "Set Tilt", NODE_CLASS_GEOMETRY, 0);
geo_node_type_base(&ntype, GEO_NODE_SET_CURVE_TILT, "Set Curve Tilt", NODE_CLASS_GEOMETRY, 0);
ntype.geometry_node_execute = blender::nodes::geo_node_set_curve_tilt_exec;
ntype.declare = blender::nodes::geo_node_set_curve_tilt_declare;
nodeRegisterType(&ntype);