浏览代码

Merge pull request #357 from Unity-Technologies/fix_label_config_editor_indexing

Fixed an indexing issue with the Id Label Config editor
/main
GitHub 3 年前
当前提交
d3ef2733
共有 4 个文件被更改,包括 16 次插入6 次删除
  1. 1
      TestProjects/PerceptionURP/Assets/Tests/Editor/PerceptionCameraEditorUrpTests.cs
  2. 12
      com.unity.perception/Editor/GroundTruth/IdLabelConfigEditor.cs
  3. 2
      com.unity.perception/package.json
  4. 7
      com.unity.perception/CHANGELOG.md

1
TestProjects/PerceptionURP/Assets/Tests/Editor/PerceptionCameraEditorUrpTests.cs


gameObject.SetActive(false);
gameObject.AddComponent<Camera>();
gameObject.AddComponent<UniversalAdditionalCameraData>();
var perceptionCamera = gameObject.AddComponent<PerceptionCamera>();
gameObject.SetActive(true);
LogAssert.Expect(LogType.Error, "GroundTruthRendererFeature must be present on the ScriptableRenderer associated with the camera. The ScriptableRenderer can be accessed through Edit -> Project Settings... -> Graphics -> Scriptable Render Pipeline Settings -> Renderer List.");

12
com.unity.perception/Editor/GroundTruth/IdLabelConfigEditor.cs


protected override IdLabelEntry CreateLabelEntryFromLabelString(SerializedProperty serializedArray,
string labelToAdd)
{
int maxLabel = Int32.MinValue;
var maxLabel = int.MinValue;
for (int i = 0; i < serializedArray.arraySize; i++)
for (var i = 0; i < serializedArray.arraySize; i++)
}
if (maxLabel == -1)
{
var startingLabelId =
(StartingLabelId) serializedObject.FindProperty(nameof(IdLabelConfig.startingLabelId)).enumValueIndex;
if (startingLabelId == StartingLabelId.One)
maxLabel = 0;
}
return new IdLabelEntry

2
com.unity.perception/package.json


"path": "Samples~/Human Pose Labeling and Randomization"
}
]
}
}

7
com.unity.perception/CHANGELOG.md


### Known Issues
### Added
User can now choose the base folder location to store their generated data.
The user can now choose the base folder location to store their generated datasets.
Added 'projection' field in the capture.sensor metadata. Values are either "perspective" or "orthographic"
Added a `projection` field in the capture.sensor metadata. Values are either "perspective" or "orthographic".
### Changed

### Removed
### Fixed
Fixed an indexing issue with the IdLabelConfig editor. When a new label was added to an empty Id Label Config with Auto Assign IDs enabled, the starting id (0 or 1) was ignored and the new label would always have an id of 0.
## [0.8.0-preview.4] - 2021-07-05

正在加载...
取消
保存