Skip to content

Commit

Permalink
Merge pull request #17 from frenchdog/feature/BIFROST-8669/update_to_…
Browse files Browse the repository at this point in the history
…bifrost_2.7.1.0

BIFROST 8669: version 1.2.0 changes matching Bifrost 2.7.1.0
  • Loading branch information
frenchdog authored May 15, 2023
2 parents fe4486a + 227dd54 commit 4dcff5f
Show file tree
Hide file tree
Showing 25 changed files with 15,181 additions and 3,151 deletions.
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
## [1.2.0] - 2023-05-12

### Build

- BIFROST-8086 - fix unit test errors

### Feature

- BIFROST 8452 - Add color support to the _read_usd_curve_ and improve _define_usd_curves_ UI
- Add option in _read_usd_curves_ to import _displayColor_ attribute as _point_color_ geo property.
- Add Combo Box in _define_usd_curves_ to set basis and type parameters.

- BIFROST-8452 - Add option in _read_usd_meshes_ to import _displayColor_ attribute as _point_color_ geo property

- BIFROST-6771 - Add soft min-max sliders and color pickers widgets in following compounds
- _define_usd_display_color_
- _define_usd_point_instancer_
- _define_usd_preview_surface_
- _define_usd_transform_
- _duplicate_usd_prim_definition_

- BIFROST-8319 - Add _get_authored_attribute_names_ node, to get all authored attributes names

- BIFROST-8100 - Add _get_all_attribute_names_ node, to get all prim attributes names

### Bugfix

- BIFROST-8426 - Inconsistent UI in define_usd_prim

- BIFROST-8273 - fix sublayers not saved if relative_path is on
- Use the layer's save file path (m_filePath) instead of the sdfLayerIdentifier in the recursive call to Layer::exportToFile().
- Add new more complete unit test for export_layer_to_file() that covers multiple cases for relative and absolute paths to sublayers.
- removed call to changeDir() that has side effect and is not required anymore for unit tests.


## [1.1.0] - 2023-03-29

### Build
Expand All @@ -21,4 +56,4 @@

## [1.0.0] - 2022-12-12

Initial release
- Initial release
2 changes: 1 addition & 1 deletion cmake/version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file has been auto-generated.

set(BIFROST_USD_PACK_MAJOR_VERSION 1)
set(BIFROST_USD_PACK_MINOR_VERSION 1)
set(BIFROST_USD_PACK_MINOR_VERSION 2)
set(BIFROST_USD_PACK_PATCH_LEVEL 0)
16 changes: 8 additions & 8 deletions src/BifrostUsd/Layer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//-
// Copyright 2022 Autodesk, Inc.
// Copyright 2023 Autodesk, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -384,27 +384,27 @@ bool Layer::exportToFile(const Amino::String& filePath,
// Replace anonymous sublayer identifier by real layer file path
for (int i = 0; i < static_cast<int>(m_subLayers.size()); ++i) {
const auto& layer = m_subLayers[i];
Amino::String layerPath = layer.m_filePath.empty() ?
Amino::String sdfLayerIdentifier = layer.m_filePath.empty() ?
layer.m_originalFilePath : layer.m_filePath;
if (relativePath) {
Amino::String relPath = "";
if (Bifrost::FileUtils::getRelativePath(
layerPath,
sdfLayerIdentifier,
Bifrost::FileUtils::extractParentPath(outFilePath.c_str())
.c_str(),
relPath)) {
layerPath = relPath;
std::replace(layerPath.begin(), layerPath.end(), '\\', '/');
sdfLayerIdentifier = relPath;
std::replace(sdfLayerIdentifier.begin(), sdfLayerIdentifier.end(), '\\', '/');
}
}
if (layerPath.empty()) {
if (sdfLayerIdentifier.empty()) {
return false;
}

layer.exportToFile(layerPath, relativePath);
layer.exportToFile(layer.m_filePath, relativePath);

outLayer->RemoveSubLayerPath(i);
outLayer->InsertSubLayerPath(layerPath.c_str(), i);
outLayer->InsertSubLayerPath(sdfLayerIdentifier.c_str(), i);
}

return outLayer->Save();
Expand Down
344 changes: 264 additions & 80 deletions src/nodedefs/compounds/define_usd_curves.json

Large diffs are not rendered by default.

12 changes: 11 additions & 1 deletion src/nodedefs/compounds/define_usd_display_color.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"metaName": "icon",
"metaType": "string",
"metaValue": "../icons/usd.svg"
}
}
],
"ports": [
{
Expand All @@ -119,6 +119,16 @@
"metaName": "UIWidget",
"metaType": "string",
"metaValue": "ColorPicker"
},
{
"metaName": "UiSoftMin",
"metaType": "string",
"metaValue": "{0, 0, 0}"
},
{
"metaName": "UiSoftMax",
"metaType": "string",
"metaValue": "{1, 1, 1}"
}
]
}
Expand Down
10 changes: 10 additions & 0 deletions src/nodedefs/compounds/define_usd_point_instancer.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,16 @@
"metaName": "UIWidget",
"metaType": "string",
"metaValue": "ColorPicker"
},
{
"metaName": "UiSoftMin",
"metaType": "string",
"metaValue": "{0, 0, 0}"
},
{
"metaName": "UiSoftMax",
"metaType": "string",
"metaValue": "{1, 1, 1}"
}
]
},
Expand Down
8 changes: 4 additions & 4 deletions src/nodedefs/compounds/define_usd_preview_surface.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@
{
"metaName": "UiSoftMin",
"metaType": "string",
"metaValue": "0"
"metaValue": "{0, 0, 0}"
},
{
"metaName": "UiSoftMax",
"metaType": "string",
"metaValue": "1"
"metaValue": "{1, 1, 1}"
}
]
},
Expand All @@ -215,12 +215,12 @@
{
"metaName": "UiSoftMin",
"metaType": "string",
"metaValue": "0"
"metaValue": "{0, 0, 0}"
},
{
"metaName": "UiSoftMax",
"metaType": "string",
"metaValue": "1"
"metaValue": "{1, 1, 1}"
}
]
},
Expand Down
50 changes: 25 additions & 25 deletions src/nodedefs/compounds/define_usd_prim.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@
"metaName": "io_ports",
"metadata": [
{
"metaName": "variant_set_name"
"metaName": "variant_name"
},
{
"metaName": "variant_name"
"metaName": "variant_set_name"
}
]
}
Expand Down Expand Up @@ -160,7 +160,7 @@
{
"metaName": "UILayout",
"metaType": "string",
"metaValue": "{\n \"NodeLayout\": {\n \"hideUndeclaredPorts\": false,\n \"items\": [\n {\n \"port\": \"path\"\n },\n {\n \"port\": \"variant_set_definitions\"\n },\n {\n \"port\": \"reference_definitions\"\n },\n {\n \"port\": \"attribute_definitions\"\n },\n {\n \"port\": \"children\"\n },\n {\n \"port\": \"relationship_definitions\"\n },\n {\n \"expanded\": false,\n \"group\": \"General\",\n \"items\": [\n {\n \"port\": \"type\"\n },\n {\n \"port\": \"specifier\"\n },\n {\n \"port\": \"kind\"\n },\n {\n \"port\": \"purpose\"\n },\n {\n \"port\": \"active\"\n },\n {\n \"port\": \"instanceable\"\n },\n {\n \"expanded\": false,\n \"group\": \"Variant Selection\",\n \"items\": [\n {\n \"port\": \"variant_set_prim_path\"\n },\n {\n \"port\": \"variant_set_name\"\n },\n {\n \"port\": \"variant_name\"\n }\n ]\n },\n {\n \"port\": \"material\"\n }\n ]\n }\n ]\n }\n}\n"
"metaValue": "{\n \"NodeLayout\": {\n \"hideUndeclaredPorts\": false,\n \"items\": [\n {\n \"port\": \"path\"\n },\n {\n \"port\": \"variant_set_definitions\"\n },\n {\n \"port\": \"reference_definitions\"\n },\n {\n \"port\": \"attribute_definitions\"\n },\n {\n \"port\": \"children\"\n },\n {\n \"port\": \"relationship_definitions\"\n },\n {\n \"expanded\": false,\n \"group\": \"General\",\n \"items\": [\n {\n \"port\": \"type\"\n },\n {\n \"port\": \"specifier\"\n },\n {\n \"port\": \"kind\"\n },\n {\n \"port\": \"purpose\"\n },\n {\n \"port\": \"active\"\n },\n {\n \"port\": \"instanceable\"\n },\n {\n \"expanded\": false,\n \"group\": \"Variant Selection\",\n \"items\": [\n {\n \"port\": \"variant_set_prim_path\"\n },\n {\n \"port\": \"variant_name\"\n },\n {\n \"port\": \"variant_set_name\"\n }\n ]\n },\n {\n \"port\": \"material\"\n }\n ]\n }\n ]\n }\n}\n"
},
{
"metaName": "PortExpandedState",
Expand Down Expand Up @@ -340,13 +340,13 @@
"portDefault": {}
},
{
"portName": "variant_set_name",
"portName": "variant_name",
"portDirection": "input",
"portType": "string",
"portDefault": ""
},
{
"portName": "variant_name",
"portName": "variant_set_name",
"portDirection": "input",
"portType": "string",
"portDefault": ""
Expand Down Expand Up @@ -7789,10 +7789,10 @@
"metaName": "io_ports",
"metadata": [
{
"metaName": "variant_set_name"
"metaName": "variant_name"
},
{
"metaName": "variant_name"
"metaName": "variant_set_name"
},
{
"metaName": "prim"
Expand Down Expand Up @@ -7841,12 +7841,12 @@
],
"ports": [
{
"portName": "variant_set_name",
"portName": "variant_name",
"portDirection": "input",
"portType": "string"
},
{
"portName": "variant_name",
"portName": "variant_set_name",
"portDirection": "input",
"portType": "string"
},
Expand Down Expand Up @@ -7917,10 +7917,10 @@
"metaName": "io_ports",
"metadata": [
{
"metaName": "variant_set_name"
"metaName": "variant_name"
},
{
"metaName": "variant_name"
"metaName": "variant_set_name"
}
]
}
Expand Down Expand Up @@ -7961,12 +7961,12 @@
],
"ports": [
{
"portName": "variant_set_name",
"portName": "variant_name",
"portDirection": "input",
"portType": "string"
},
{
"portName": "variant_name",
"portName": "variant_set_name",
"portDirection": "input",
"portType": "string"
},
Expand Down Expand Up @@ -8078,13 +8078,13 @@
"source": "and.output",
"target": ".output"
},
{
"source": ".variant_set_name",
"target": "string_empty.string"
},
{
"source": ".variant_name",
"target": "string_empty1.string"
},
{
"source": ".variant_set_name",
"target": "string_empty.string"
}
],
"values": [],
Expand Down Expand Up @@ -8157,10 +8157,10 @@
"metaName": "prim"
},
{
"metaName": "variant_set_name"
"metaName": "variant_name"
},
{
"metaName": "variant_name"
"metaName": "variant_set_name"
}
]
}
Expand Down Expand Up @@ -8205,12 +8205,12 @@
"portDirection": "input"
},
{
"portName": "variant_set_name",
"portName": "variant_name",
"portDirection": "input",
"portType": "string"
},
{
"portName": "variant_name",
"portName": "variant_set_name",
"portDirection": "input",
"portType": "string"
},
Expand Down Expand Up @@ -8287,13 +8287,13 @@
"source": ".prim",
"target": "set_property5.object"
},
{
"source": ".variant_set_name",
"target": "set_property1.value"
},
{
"source": ".variant_name",
"target": "set_property3.value"
},
{
"source": ".variant_set_name",
"target": "set_property1.value"
}
],
"values": [
Expand Down
14 changes: 13 additions & 1 deletion src/nodedefs/compounds/define_usd_transform.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,19 @@
"x": "0f",
"y": "0f",
"z": "0f"
}
},
"metadata": [
{
"metaName": "UiSoftMin",
"metaType": "string",
"metaValue": "{-180, -180, -180}"
},
{
"metaName": "UiSoftMax",
"metaType": "string",
"metaValue": "{180, 180, 180}"
}
]
},
{
"portName": "scale",
Expand Down
Loading

0 comments on commit 4dcff5f

Please sign in to comment.