Merge branch 'development' into redcode/driller_removal

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-12-03 13:35:16 -08:00
478 changed files with 7537 additions and 7933 deletions
@@ -8,6 +8,7 @@
import azlmbr.bus import azlmbr.bus
import azlmbr.math import azlmbr.math
from scene_api.scene_data import PrimitiveShape, DecompositionMode
from scene_helpers import * from scene_helpers import *
@@ -41,6 +42,35 @@ def add_material_component(entity_id):
raise RuntimeError("UpdateComponentForEntity for editor_material_component failed") raise RuntimeError("UpdateComponentForEntity for editor_material_component failed")
def add_physx_meshes(scene_manifest: sceneData.SceneManifest, source_file_name: str, mesh_name_list: List, all_node_paths: List[str]):
first_mesh = mesh_name_list[0].get_path()
# Add a Box Primitive PhysX mesh with a comment
physx_box = scene_manifest.add_physx_primitive_mesh_group(source_file_name + "_box", PrimitiveShape.BOX, 0.0, None)
scene_manifest.physx_mesh_group_add_comment(physx_box, "This is a box primitive")
# Select the first mesh, unselect every other node
scene_manifest.physx_mesh_group_add_selected_node(physx_box, first_mesh)
for node in all_node_paths:
if node != first_mesh:
scene_manifest.physx_mesh_group_add_unselected_node(physx_box, node)
# Add a Convex Mesh PhysX mesh with a comment
convex_mesh = scene_manifest.add_physx_convex_mesh_group(source_file_name + "_convex", 0.08, .0004,
True, True, True, True, True, 24, True, "Glass")
scene_manifest.physx_mesh_group_add_comment(convex_mesh, "This is a convex mesh")
# Select/Unselect nodes using lists
all_except_first_mesh = [x for x in all_node_paths if x != first_mesh]
scene_manifest.physx_mesh_group_add_selected_unselected_nodes(convex_mesh, [first_mesh], all_except_first_mesh)
# Configure mesh decomposition for this mesh
scene_manifest.physx_mesh_group_decompose_meshes(convex_mesh, 512, 32, .002, 100100, DecompositionMode.TETRAHEDRON,
0.06, 0.055, 0.00015, 3, 3, True, False)
# Add a Triangle mesh
triangle = scene_manifest.add_physx_triangle_mesh_group(source_file_name + "_triangle", False, True, True, True, True, True)
scene_manifest.physx_mesh_group_add_selected_unselected_nodes(triangle, [first_mesh], all_except_first_mesh)
def update_manifest(scene): def update_manifest(scene):
import uuid, os import uuid, os
import azlmbr.scene.graph import azlmbr.scene.graph
@@ -62,6 +92,8 @@ def update_manifest(scene):
previous_entity_id = azlmbr.entity.InvalidEntityId previous_entity_id = azlmbr.entity.InvalidEntityId
first_mesh = True first_mesh = True
add_physx_meshes(scene_manifest, source_filename_only, mesh_name_list, all_node_paths)
# Loop every mesh node in the scene # Loop every mesh node in the scene
for activeMeshIndex in range(len(mesh_name_list)): for activeMeshIndex in range(len(mesh_name_list)):
mesh_name = mesh_name_list[activeMeshIndex] mesh_name = mesh_name_list[activeMeshIndex]
@@ -106,6 +138,26 @@ def update_manifest(scene):
if not result: if not result:
raise RuntimeError("UpdateComponentForEntity failed for Mesh component") raise RuntimeError("UpdateComponentForEntity failed for Mesh component")
# Add a physics component referencing the triangle mesh we made for the first node
if previous_entity_id is None:
physx_mesh_component = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "GetOrAddComponentByTypeName",
entity_id, "{FD429282-A075-4966-857F-D0BBF186CFE6} EditorColliderComponent")
json_update = json.dumps({
"ShapeConfiguration": {
"PhysicsAsset": {
"Asset": {
"assetHint": os.path.join(source_relative_path, source_filename_only + "_triangle.pxmesh")
}
}
}
})
result = azlmbr.entity.EntityUtilityBus(azlmbr.bus.Broadcast, "UpdateComponentForEntity", entity_id, physx_mesh_component, json_update)
if not result:
raise RuntimeError("UpdateComponentForEntity failed for PhysX mesh component")
# an example of adding a material component to override the default material # an example of adding a material component to override the default material
if previous_entity_id is not None and first_mesh: if previous_entity_id is not None and first_mesh:
first_mesh = False first_mesh = False
@@ -0,0 +1,144 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
class HeightTests:
single_gradient_height_correct = (
"Successfully retrieved height for gradient1.",
"Failed to retrieve height for gradient1."
)
double_gradient_height_correct = (
"Successfully retrieved height when two gradients exist.",
"Failed to retrieve height when two gradients exist."
)
triple_gradient_height_correct = (
"Successfully retrieved height when three gradients exist.",
"Failed to retrieve height when three gradients exist."
)
terrain_data_changed_call_count_correct = (
"OnTerrainDataChanged called expected number of times.",
"OnTerrainDataChanged call count incorrect."
)
def TerrainHeightGradientList_AddRemoveGradientWorks():
"""
Summary:
Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree.
:return: None
"""
import os
import math as sys_math
import azlmbr.legacy.general as general
import azlmbr.bus as bus
import azlmbr.math as math
import azlmbr.terrain as terrain
import azlmbr.editor as editor
import azlmbr.vegetation as vegetation
import azlmbr.entity as EntityId
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
import editor_python_test_tools.pyside_utils as pyside_utils
from editor_python_test_tools.editor_entity_utils import EditorEntity
terrain_changed_call_count = 0
expected_terrain_changed_calls = 0
aabb_component_name = "Axis Aligned Box Shape"
gradientlist_component_name = "Terrain Height Gradient List"
layerspawner_component_name = "Terrain Layer Spawner"
gradient_value_path = "Configuration|Value"
def create_entity_at(entity_name, components_to_add, x, y, z):
entity = hydra.Entity(entity_name)
entity.create_entity(math.Vector3(x, y, z), components_to_add)
return entity
def on_terrain_changed(args):
nonlocal terrain_changed_call_count
terrain_changed_call_count += 1
def set_component_path_val(entity, component, path, value):
entity.get_set_test(component, path, value)
def set_gradients_check_height(main_entity, gradient_list, expected_height, test_results):
nonlocal expected_terrain_changed_calls
test_tolerance = 0.01
gradient_list_path = "Configuration|Gradient Entities"
set_component_path_val(main_entity, 1, gradient_list_path, gradient_list)
expected_terrain_changed_calls += 1
# Wait until the terrain data has been updated.
helper.wait_for_condition(lambda: terrain_changed_call_count == expected_terrain_changed_calls, 2.0)
# Get the height at the origin.
height = terrain.TerrainDataRequestBus(bus.Broadcast, "GetHeightFromFloats", 0.0, 0.0, 0)
Report.result(test_results, sys_math.isclose(height, expected_height, abs_tol=test_tolerance))
helper.init_idle()
# Open a level.
helper.open_level("Physics", "Base")
helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0)
general.idle_wait_frames(1)
# Add a terrain world component
world_component = hydra.add_level_component("Terrain World")
aabb_height = 1024.0
box_dimensions = math.Vector3(1.0, 1.0, aabb_height);
# Create a main entity with a LayerSpawner, AAbb and HeightGradientList.
main_entity = create_entity_at("entity2", [layerspawner_component_name, gradientlist_component_name, aabb_component_name], 0.0, 0.0, aabb_height/2.0)
# Create three gradient entities.
gradient_entity1 = create_entity_at("Constant Gradient1", ["Constant Gradient"], 0.0, 0.0, 0.0);
gradient_entity2 = create_entity_at("Constant Gradient2", ["Constant Gradient"], 0.0, 0.0, 0.0);
gradient_entity3 = create_entity_at("Constant Gradient3", ["Constant Gradient"], 0.0, 0.0, 0.0);
# Give everything a chance to finish initializing.
general.idle_wait_frames(1)
# Set the gradients to different values.
gradient_values = [0.5, 0.8, 0.3]
set_component_path_val(gradient_entity1, 0, gradient_value_path, gradient_values[0])
set_component_path_val(gradient_entity2, 0, gradient_value_path, gradient_values[1])
set_component_path_val(gradient_entity3, 0, gradient_value_path, gradient_values[2])
# Give the TerrainSystem time to tick.
general.idle_wait_frames(1)
# Set the dimensions of the Aabb.
set_component_path_val(main_entity, 2, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions)
# Set up a handler to wait for notifications from the TerrainSystem.
handler = azlmbr.terrain.TerrainDataNotificationBusHandler()
handler.connect()
handler.add_callback("OnTerrainDataChanged", on_terrain_changed)
# Add a gradient to GradientList, then check the height returned from the TerrainSystem is correct.
set_gradients_check_height(main_entity, [gradient_entity1.id], aabb_height * gradient_values[0], HeightTests.single_gradient_height_correct)
# Add gradient2 and check height at the origin, this should have changed to match the second gradient value.
set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id], aabb_height * gradient_values[1], HeightTests.double_gradient_height_correct)
# Add gradient3, the height should still be the second value, as that was the highest.
set_gradients_check_height(main_entity, [gradient_entity1.id, gradient_entity2.id, gradient_entity3.id], aabb_height * gradient_values[1], HeightTests.triple_gradient_height_correct)
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(TerrainHeightGradientList_AddRemoveGradientWorks)
@@ -27,3 +27,6 @@ class TestAutomation(EditorTestSuite):
class test_Terrain_SupportsPhysics(EditorSharedTest): class test_Terrain_SupportsPhysics(EditorSharedTest):
from .EditorScripts import Terrain_SupportsPhysics as test_module from .EditorScripts import Terrain_SupportsPhysics as test_module
class test_TerrainHeightGradientList_AddRemoveGradientWorks(EditorSharedTest):
from .EditorScripts import TerrainHeightGradientList_AddRemoveGradientWorks as test_module
@@ -8,6 +8,8 @@ General Asset Processor Batch Tests
""" """
# Import builtin libraries # Import builtin libraries
from os import listdir
import pytest import pytest
import logging import logging
import os import os
@@ -724,3 +726,11 @@ class TestsAssetProcessorBatch_AllPlatforms(object):
assert error_line_found, "The error could not be found in the newest run of the AP Batch log." assert error_line_found, "The error could not be found in the newest run of the AP Batch log."
@pytest.mark.assetpipeline
def test_AssetProcessor_Log_On_Failure(self, asset_processor, ap_setup_fixture, workspace):
asset_processor.prepare_test_environment(ap_setup_fixture["tests_dir"], "test_AP_Logs")
result, output = asset_processor.batch_process(expect_failure=True, capture_output=True)
assert result == False, f'AssetProcessorBatch should have failed because there is a bad asset, output was {output}'
jobLogs = listdir(workspace.paths.ap_job_logs() + "/test_AP_Logs")
assert not len(jobLogs) == 0, 'No job logs where output during failure.'
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:7c6b33c6137d6bd8c696f180c30a23089c95c1af398a630b4b13e080bec3254d
size 18220
@@ -10,6 +10,8 @@
#include "EditorPreferencesPageViewportManipulator.h" #include "EditorPreferencesPageViewportManipulator.h"
#include <AzToolsFramework/Viewport/ViewportSettings.h>
// Editor // Editor
#include "EditorViewportSettings.h" #include "EditorViewportSettings.h"
#include "Settings.h" #include "Settings.h"
@@ -19,7 +21,17 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s
serialize.Class<Manipulators>() serialize.Class<Manipulators>()
->Version(1) ->Version(1)
->Field("LineBoundWidth", &Manipulators::m_manipulatorLineBoundWidth) ->Field("LineBoundWidth", &Manipulators::m_manipulatorLineBoundWidth)
->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth); ->Field("CircleBoundWidth", &Manipulators::m_manipulatorCircleBoundWidth)
->Field("LinearManipulatorAxisLength", &Manipulators::m_linearManipulatorAxisLength)
->Field("PlanarManipulatorAxisLength", &Manipulators::m_planarManipulatorAxisLength)
->Field("SurfaceManipulatorRadius", &Manipulators::m_surfaceManipulatorRadius)
->Field("SurfaceManipulatorOpacity", &Manipulators::m_surfaceManipulatorOpacity)
->Field("LinearManipulatorConeLength", &Manipulators::m_linearManipulatorConeLength)
->Field("LinearManipulatorConeRadius", &Manipulators::m_linearManipulatorConeRadius)
->Field("ScaleManipulatorBoxHalfExtent", &Manipulators::m_scaleManipulatorBoxHalfExtent)
->Field("RotationManipulatorRadius", &Manipulators::m_rotationManipulatorRadius)
->Field("ManipulatorViewBaseScale", &Manipulators::m_manipulatorViewBaseScale)
->Field("FlipManipulatorAxesTowardsView", &Manipulators::m_flipManipulatorAxesTowardsView);
serialize.Class<CEditorPreferencesPage_ViewportManipulator>()->Version(2)->Field( serialize.Class<CEditorPreferencesPage_ViewportManipulator>()->Version(2)->Field(
"Manipulators", &CEditorPreferencesPage_ViewportManipulator::m_manipulators); "Manipulators", &CEditorPreferencesPage_ViewportManipulator::m_manipulators);
@@ -36,7 +48,55 @@ void CEditorPreferencesPage_ViewportManipulator::Reflect(AZ::SerializeContext& s
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorCircleBoundWidth, "Circle Bound Width", AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorCircleBoundWidth, "Circle Bound Width",
"Manipulator Circle Bound Width") "Manipulator Circle Bound Width")
->Attribute(AZ::Edit::Attributes::Min, 0.001f) ->Attribute(AZ::Edit::Attributes::Min, 0.001f)
->Attribute(AZ::Edit::Attributes::Max, 2.0f); ->Attribute(AZ::Edit::Attributes::Max, 2.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorAxisLength, "Linear Manipulator Axis Length",
"Length of default Linear Manipulator (for Translation and Scale Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.1f)
->Attribute(AZ::Edit::Attributes::Max, 5.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_planarManipulatorAxisLength, "Planar Manipulator Axis Length",
"Length of default Planar Manipulator (for Translation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.1f)
->Attribute(AZ::Edit::Attributes::Max, 5.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorRadius, "Surface Manipulator Radius",
"Radius of default Surface Manipulator (for Translation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.05f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_surfaceManipulatorOpacity, "Surface Manipulator Opacity",
"Opacity of default Surface Manipulator (for Translation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.01f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeLength, "Linear Manipulator Cone Length",
"Length of cone for default Linear Manipulator (for Translation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.05f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_linearManipulatorConeRadius, "Linear Manipulator Cone Radius",
"Radius of cone for default Linear Manipulator (for Translation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.05f)
->Attribute(AZ::Edit::Attributes::Max, 0.5f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_scaleManipulatorBoxHalfExtent, "Scale Manipulator Box Half Extent",
"Half extent of box for default Scale Manipulator")
->Attribute(AZ::Edit::Attributes::Min, 0.05f)
->Attribute(AZ::Edit::Attributes::Max, 1.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_rotationManipulatorRadius, "Rotation Manipulator Radius",
"Radius of default Angular Manipulators (for Rotation Manipulators)")
->Attribute(AZ::Edit::Attributes::Min, 0.5f)
->Attribute(AZ::Edit::Attributes::Max, 5.0f)
->DataElement(
AZ::Edit::UIHandlers::SpinBox, &Manipulators::m_manipulatorViewBaseScale, "Manipulator View Base Scale",
"The base scale to apply to all Manipulator Views (default is 1.0)")
->Attribute(AZ::Edit::Attributes::Min, 0.5f)
->Attribute(AZ::Edit::Attributes::Max, 2.0f)
->DataElement(
AZ::Edit::UIHandlers::CheckBox, &Manipulators::m_flipManipulatorAxesTowardsView, "Flip Manipulator Axes Towards View",
"Determines whether Planar and Linear Manipulators should switch to face the view (camera) in the Editor");
editContext editContext
->Class<CEditorPreferencesPage_ViewportManipulator>("Manipulator Viewport Preferences", "Manipulator Viewport Preferences") ->Class<CEditorPreferencesPage_ViewportManipulator>("Manipulator Viewport Preferences", "Manipulator Viewport Preferences")
@@ -82,10 +142,32 @@ void CEditorPreferencesPage_ViewportManipulator::OnApply()
{ {
SandboxEditor::SetManipulatorLineBoundWidth(m_manipulators.m_manipulatorLineBoundWidth); SandboxEditor::SetManipulatorLineBoundWidth(m_manipulators.m_manipulatorLineBoundWidth);
SandboxEditor::SetManipulatorCircleBoundWidth(m_manipulators.m_manipulatorCircleBoundWidth); SandboxEditor::SetManipulatorCircleBoundWidth(m_manipulators.m_manipulatorCircleBoundWidth);
AzToolsFramework::SetLinearManipulatorAxisLength(m_manipulators.m_linearManipulatorAxisLength);
AzToolsFramework::SetPlanarManipulatorAxisLength(m_manipulators.m_planarManipulatorAxisLength);
AzToolsFramework::SetSurfaceManipulatorRadius(m_manipulators.m_surfaceManipulatorRadius);
AzToolsFramework::SetSurfaceManipulatorOpacity(m_manipulators.m_surfaceManipulatorOpacity);
AzToolsFramework::SetLinearManipulatorConeLength(m_manipulators.m_linearManipulatorConeLength);
AzToolsFramework::SetLinearManipulatorConeRadius(m_manipulators.m_linearManipulatorConeRadius);
AzToolsFramework::SetScaleManipulatorBoxHalfExtent(m_manipulators.m_scaleManipulatorBoxHalfExtent);
AzToolsFramework::SetRotationManipulatorRadius(m_manipulators.m_rotationManipulatorRadius);
AzToolsFramework::SetFlipManipulatorAxesTowardsView(m_manipulators.m_flipManipulatorAxesTowardsView);
AzToolsFramework::SetManipulatorViewBaseScale(m_manipulators.m_manipulatorViewBaseScale);
} }
void CEditorPreferencesPage_ViewportManipulator::InitializeSettings() void CEditorPreferencesPage_ViewportManipulator::InitializeSettings()
{ {
m_manipulators.m_manipulatorLineBoundWidth = SandboxEditor::ManipulatorLineBoundWidth(); m_manipulators.m_manipulatorLineBoundWidth = SandboxEditor::ManipulatorLineBoundWidth();
m_manipulators.m_manipulatorCircleBoundWidth = SandboxEditor::ManipulatorCircleBoundWidth(); m_manipulators.m_manipulatorCircleBoundWidth = SandboxEditor::ManipulatorCircleBoundWidth();
m_manipulators.m_linearManipulatorAxisLength = AzToolsFramework::LinearManipulatorAxisLength();
m_manipulators.m_planarManipulatorAxisLength = AzToolsFramework::PlanarManipulatorAxisLength();
m_manipulators.m_surfaceManipulatorRadius = AzToolsFramework::SurfaceManipulatorRadius();
m_manipulators.m_surfaceManipulatorOpacity = AzToolsFramework::SurfaceManipulatorOpacity();
m_manipulators.m_linearManipulatorConeLength = AzToolsFramework::LinearManipulatorConeLength();
m_manipulators.m_linearManipulatorConeRadius = AzToolsFramework::LinearManipulatorConeRadius();
m_manipulators.m_scaleManipulatorBoxHalfExtent = AzToolsFramework::ScaleManipulatorBoxHalfExtent();
m_manipulators.m_rotationManipulatorRadius = AzToolsFramework::RotationManipulatorRadius();
m_manipulators.m_flipManipulatorAxesTowardsView = AzToolsFramework::FlipManipulatorAxesTowardsView();
m_manipulators.m_manipulatorViewBaseScale = AzToolsFramework::ManipulatorViewBaseScale();
} }
@@ -41,6 +41,16 @@ private:
float m_manipulatorLineBoundWidth = 0.0f; float m_manipulatorLineBoundWidth = 0.0f;
float m_manipulatorCircleBoundWidth = 0.0f; float m_manipulatorCircleBoundWidth = 0.0f;
float m_linearManipulatorAxisLength = 0.0f;
float m_planarManipulatorAxisLength = 0.0f;
float m_surfaceManipulatorRadius = 0.0f;
float m_surfaceManipulatorOpacity = 0.0f;
float m_linearManipulatorConeLength = 0.0f;
float m_linearManipulatorConeRadius = 0.0f;
float m_scaleManipulatorBoxHalfExtent = 0.0f;
float m_rotationManipulatorRadius = 0.0f;
float m_manipulatorViewBaseScale = 0.0f;
bool m_flipManipulatorAxesTowardsView = false;
}; };
Manipulators m_manipulators; Manipulators m_manipulators;
+93 -107
View File
@@ -12,6 +12,7 @@
#include <AzCore/Settings/SettingsRegistry.h> #include <AzCore/Settings/SettingsRegistry.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h> #include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/std/string/string_view.h> #include <AzCore/std/string/string_view.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
namespace SandboxEditor namespace SandboxEditor
{ {
@@ -57,31 +58,6 @@ namespace SandboxEditor
constexpr AZStd::string_view CameraDefaultStartingPositionY = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/y"; constexpr AZStd::string_view CameraDefaultStartingPositionY = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/y";
constexpr AZStd::string_view CameraDefaultStartingPositionZ = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/z"; constexpr AZStd::string_view CameraDefaultStartingPositionZ = "/Amazon/Preferences/Editor/Camera/DefaultStartingPosition/z";
template<typename T>
void SetRegistry(const AZStd::string_view setting, T&& value)
{
if (auto* registry = AZ::SettingsRegistry::Get())
{
registry->Set(setting, AZStd::forward<T>(value));
}
}
template<typename T>
AZStd::remove_cvref_t<T> GetRegistry(const AZStd::string_view setting, T&& defaultValue)
{
AZStd::remove_cvref_t<T> value = AZStd::forward<T>(defaultValue);
if (const auto* registry = AZ::SettingsRegistry::Get())
{
T potentialValue;
if (registry->Get(potentialValue, setting))
{
value = AZStd::move(potentialValue);
}
}
return value;
}
struct EditorViewportSettingsCallbacksImpl : public EditorViewportSettingsCallbacks struct EditorViewportSettingsCallbacksImpl : public EditorViewportSettingsCallbacks
{ {
EditorViewportSettingsCallbacksImpl() EditorViewportSettingsCallbacksImpl()
@@ -118,399 +94,409 @@ namespace SandboxEditor
AZ::Vector3 CameraDefaultEditorPosition() AZ::Vector3 CameraDefaultEditorPosition()
{ {
return AZ::Vector3( return AZ::Vector3(
aznumeric_cast<float>(GetRegistry(CameraDefaultStartingPositionX, 0.0)), aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionX, 0.0)),
aznumeric_cast<float>(GetRegistry(CameraDefaultStartingPositionY, -10.0)), aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionY, -10.0)),
aznumeric_cast<float>(GetRegistry(CameraDefaultStartingPositionZ, 4.0))); aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraDefaultStartingPositionZ, 4.0)));
} }
void SetCameraDefaultEditorPosition(const AZ::Vector3& defaultCameraPosition) void SetCameraDefaultEditorPosition(const AZ::Vector3& defaultCameraPosition)
{ {
SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX()); AzToolsFramework::SetRegistry(CameraDefaultStartingPositionX, defaultCameraPosition.GetX());
SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY()); AzToolsFramework::SetRegistry(CameraDefaultStartingPositionY, defaultCameraPosition.GetY());
SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ()); AzToolsFramework::SetRegistry(CameraDefaultStartingPositionZ, defaultCameraPosition.GetZ());
} }
AZ::u64 MaxItemsShownInAssetBrowserSearch() AZ::u64 MaxItemsShownInAssetBrowserSearch()
{ {
return GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast<AZ::u64>(50)); return AzToolsFramework::GetRegistry(AssetBrowserMaxItemsShownInSearchSetting, aznumeric_cast<AZ::u64>(50));
} }
void SetMaxItemsShownInAssetBrowserSearch(const AZ::u64 numberOfItemsShown) void SetMaxItemsShownInAssetBrowserSearch(const AZ::u64 numberOfItemsShown)
{ {
SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown); AzToolsFramework::SetRegistry(AssetBrowserMaxItemsShownInSearchSetting, numberOfItemsShown);
} }
bool GridSnappingEnabled() bool GridSnappingEnabled()
{ {
return GetRegistry(GridSnappingSetting, false); return AzToolsFramework::GetRegistry(GridSnappingSetting, false);
} }
void SetGridSnapping(const bool enabled) void SetGridSnapping(const bool enabled)
{ {
SetRegistry(GridSnappingSetting, enabled); AzToolsFramework::SetRegistry(GridSnappingSetting, enabled);
} }
float GridSnappingSize() float GridSnappingSize()
{ {
return aznumeric_cast<float>(GetRegistry(GridSizeSetting, 0.1)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(GridSizeSetting, 0.1));
} }
void SetGridSnappingSize(const float size) void SetGridSnappingSize(const float size)
{ {
SetRegistry(GridSizeSetting, size); AzToolsFramework::SetRegistry(GridSizeSetting, size);
} }
bool AngleSnappingEnabled() bool AngleSnappingEnabled()
{ {
return GetRegistry(AngleSnappingSetting, false); return AzToolsFramework::GetRegistry(AngleSnappingSetting, false);
} }
void SetAngleSnapping(const bool enabled) void SetAngleSnapping(const bool enabled)
{ {
SetRegistry(AngleSnappingSetting, enabled); AzToolsFramework::SetRegistry(AngleSnappingSetting, enabled);
} }
float AngleSnappingSize() float AngleSnappingSize()
{ {
return aznumeric_cast<float>(GetRegistry(AngleSizeSetting, 5.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(AngleSizeSetting, 5.0));
} }
void SetAngleSnappingSize(const float size) void SetAngleSnappingSize(const float size)
{ {
SetRegistry(AngleSizeSetting, size); AzToolsFramework::SetRegistry(AngleSizeSetting, size);
} }
bool ShowingGrid() bool ShowingGrid()
{ {
return GetRegistry(ShowGridSetting, false); return AzToolsFramework::GetRegistry(ShowGridSetting, false);
} }
void SetShowingGrid(const bool showing) void SetShowingGrid(const bool showing)
{ {
SetRegistry(ShowGridSetting, showing); AzToolsFramework::SetRegistry(ShowGridSetting, showing);
} }
bool StickySelectEnabled() bool StickySelectEnabled()
{ {
return GetRegistry(StickySelectSetting, false); return AzToolsFramework::GetRegistry(StickySelectSetting, false);
} }
void SetStickySelectEnabled(const bool enabled) void SetStickySelectEnabled(const bool enabled)
{ {
SetRegistry(StickySelectSetting, enabled); AzToolsFramework::SetRegistry(StickySelectSetting, enabled);
} }
float ManipulatorLineBoundWidth() float ManipulatorLineBoundWidth()
{ {
return aznumeric_cast<float>(GetRegistry(ManipulatorLineBoundWidthSetting, 0.1)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(ManipulatorLineBoundWidthSetting, 0.1));
} }
void SetManipulatorLineBoundWidth(const float lineBoundWidth) void SetManipulatorLineBoundWidth(const float lineBoundWidth)
{ {
SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth); AzToolsFramework::SetRegistry(ManipulatorLineBoundWidthSetting, lineBoundWidth);
} }
float ManipulatorCircleBoundWidth() float ManipulatorCircleBoundWidth()
{ {
return aznumeric_cast<float>(GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(ManipulatorCircleBoundWidthSetting, 0.1));
} }
void SetManipulatorCircleBoundWidth(const float circleBoundWidth) void SetManipulatorCircleBoundWidth(const float circleBoundWidth)
{ {
SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth); AzToolsFramework::SetRegistry(ManipulatorCircleBoundWidthSetting, circleBoundWidth);
} }
float CameraTranslateSpeed() float CameraTranslateSpeed()
{ {
return aznumeric_cast<float>(GetRegistry(CameraTranslateSpeedSetting, 10.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraTranslateSpeedSetting, 10.0));
} }
void SetCameraTranslateSpeed(const float speed) void SetCameraTranslateSpeed(const float speed)
{ {
SetRegistry(CameraTranslateSpeedSetting, speed); AzToolsFramework::SetRegistry(CameraTranslateSpeedSetting, speed);
} }
float CameraBoostMultiplier() float CameraBoostMultiplier()
{ {
return aznumeric_cast<float>(GetRegistry(CameraBoostMultiplierSetting, 3.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraBoostMultiplierSetting, 3.0));
} }
void SetCameraBoostMultiplier(const float multiplier) void SetCameraBoostMultiplier(const float multiplier)
{ {
SetRegistry(CameraBoostMultiplierSetting, multiplier); AzToolsFramework::SetRegistry(CameraBoostMultiplierSetting, multiplier);
} }
float CameraRotateSpeed() float CameraRotateSpeed()
{ {
return aznumeric_cast<float>(GetRegistry(CameraRotateSpeedSetting, 0.005)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraRotateSpeedSetting, 0.005));
} }
void SetCameraRotateSpeed(const float speed) void SetCameraRotateSpeed(const float speed)
{ {
SetRegistry(CameraRotateSpeedSetting, speed); AzToolsFramework::SetRegistry(CameraRotateSpeedSetting, speed);
} }
float CameraScrollSpeed() float CameraScrollSpeed()
{ {
return aznumeric_cast<float>(GetRegistry(CameraScrollSpeedSetting, 0.02)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraScrollSpeedSetting, 0.02));
} }
void SetCameraScrollSpeed(const float speed) void SetCameraScrollSpeed(const float speed)
{ {
SetRegistry(CameraScrollSpeedSetting, speed); AzToolsFramework::SetRegistry(CameraScrollSpeedSetting, speed);
} }
float CameraDollyMotionSpeed() float CameraDollyMotionSpeed()
{ {
return aznumeric_cast<float>(GetRegistry(CameraDollyMotionSpeedSetting, 0.01)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraDollyMotionSpeedSetting, 0.01));
} }
void SetCameraDollyMotionSpeed(const float speed) void SetCameraDollyMotionSpeed(const float speed)
{ {
SetRegistry(CameraDollyMotionSpeedSetting, speed); AzToolsFramework::SetRegistry(CameraDollyMotionSpeedSetting, speed);
} }
bool CameraOrbitYawRotationInverted() bool CameraOrbitYawRotationInverted()
{ {
return GetRegistry(CameraOrbitYawRotationInvertedSetting, false); return AzToolsFramework::GetRegistry(CameraOrbitYawRotationInvertedSetting, false);
} }
void SetCameraOrbitYawRotationInverted(const bool inverted) void SetCameraOrbitYawRotationInverted(const bool inverted)
{ {
SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted); AzToolsFramework::SetRegistry(CameraOrbitYawRotationInvertedSetting, inverted);
} }
bool CameraPanInvertedX() bool CameraPanInvertedX()
{ {
return GetRegistry(CameraPanInvertedXSetting, true); return AzToolsFramework::GetRegistry(CameraPanInvertedXSetting, true);
} }
void SetCameraPanInvertedX(const bool inverted) void SetCameraPanInvertedX(const bool inverted)
{ {
SetRegistry(CameraPanInvertedXSetting, inverted); AzToolsFramework::SetRegistry(CameraPanInvertedXSetting, inverted);
} }
bool CameraPanInvertedY() bool CameraPanInvertedY()
{ {
return GetRegistry(CameraPanInvertedYSetting, true); return AzToolsFramework::GetRegistry(CameraPanInvertedYSetting, true);
} }
void SetCameraPanInvertedY(const bool inverted) void SetCameraPanInvertedY(const bool inverted)
{ {
SetRegistry(CameraPanInvertedYSetting, inverted); AzToolsFramework::SetRegistry(CameraPanInvertedYSetting, inverted);
} }
float CameraPanSpeed() float CameraPanSpeed()
{ {
return aznumeric_cast<float>(GetRegistry(CameraPanSpeedSetting, 0.01)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraPanSpeedSetting, 0.01));
} }
void SetCameraPanSpeed(float speed) void SetCameraPanSpeed(float speed)
{ {
SetRegistry(CameraPanSpeedSetting, speed); AzToolsFramework::SetRegistry(CameraPanSpeedSetting, speed);
} }
float CameraRotateSmoothness() float CameraRotateSmoothness()
{ {
return aznumeric_cast<float>(GetRegistry(CameraRotateSmoothnessSetting, 5.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraRotateSmoothnessSetting, 5.0));
} }
void SetCameraRotateSmoothness(const float smoothness) void SetCameraRotateSmoothness(const float smoothness)
{ {
SetRegistry(CameraRotateSmoothnessSetting, smoothness); AzToolsFramework::SetRegistry(CameraRotateSmoothnessSetting, smoothness);
} }
float CameraTranslateSmoothness() float CameraTranslateSmoothness()
{ {
return aznumeric_cast<float>(GetRegistry(CameraTranslateSmoothnessSetting, 5.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraTranslateSmoothnessSetting, 5.0));
} }
void SetCameraTranslateSmoothness(const float smoothness) void SetCameraTranslateSmoothness(const float smoothness)
{ {
SetRegistry(CameraTranslateSmoothnessSetting, smoothness); AzToolsFramework::SetRegistry(CameraTranslateSmoothnessSetting, smoothness);
} }
bool CameraRotateSmoothingEnabled() bool CameraRotateSmoothingEnabled()
{ {
return GetRegistry(CameraRotateSmoothingSetting, true); return AzToolsFramework::GetRegistry(CameraRotateSmoothingSetting, true);
} }
void SetCameraRotateSmoothingEnabled(const bool enabled) void SetCameraRotateSmoothingEnabled(const bool enabled)
{ {
SetRegistry(CameraRotateSmoothingSetting, enabled); AzToolsFramework::SetRegistry(CameraRotateSmoothingSetting, enabled);
} }
bool CameraTranslateSmoothingEnabled() bool CameraTranslateSmoothingEnabled()
{ {
return GetRegistry(CameraTranslateSmoothingSetting, true); return AzToolsFramework::GetRegistry(CameraTranslateSmoothingSetting, true);
} }
void SetCameraTranslateSmoothingEnabled(const bool enabled) void SetCameraTranslateSmoothingEnabled(const bool enabled)
{ {
SetRegistry(CameraTranslateSmoothingSetting, enabled); AzToolsFramework::SetRegistry(CameraTranslateSmoothingSetting, enabled);
} }
bool CameraCaptureCursorForLook() bool CameraCaptureCursorForLook()
{ {
return GetRegistry(CameraCaptureCursorLookSetting, true); return AzToolsFramework::GetRegistry(CameraCaptureCursorLookSetting, true);
} }
void SetCameraCaptureCursorForLook(const bool capture) void SetCameraCaptureCursorForLook(const bool capture)
{ {
SetRegistry(CameraCaptureCursorLookSetting, capture); AzToolsFramework::SetRegistry(CameraCaptureCursorLookSetting, capture);
} }
float CameraDefaultOrbitDistance() float CameraDefaultOrbitDistance()
{ {
return aznumeric_cast<float>(GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0)); return aznumeric_cast<float>(AzToolsFramework::GetRegistry(CameraDefaultOrbitDistanceSetting, 20.0));
} }
void SetCameraDefaultOrbitDistance(const float distance) void SetCameraDefaultOrbitDistance(const float distance)
{ {
SetRegistry(CameraDefaultOrbitDistanceSetting, distance); AzToolsFramework::SetRegistry(CameraDefaultOrbitDistanceSetting, distance);
} }
AzFramework::InputChannelId CameraTranslateForwardChannelId() AzFramework::InputChannelId CameraTranslateForwardChannelId()
{ {
return AzFramework::InputChannelId( return AzFramework::InputChannelId(
GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str()); AzToolsFramework::GetRegistry(CameraTranslateForwardIdSetting, AZStd::string("keyboard_key_alphanumeric_W")).c_str());
} }
void SetCameraTranslateForwardChannelId(AZStd::string_view cameraTranslateForwardId) void SetCameraTranslateForwardChannelId(AZStd::string_view cameraTranslateForwardId)
{ {
SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId); AzToolsFramework::SetRegistry(CameraTranslateForwardIdSetting, cameraTranslateForwardId);
} }
AzFramework::InputChannelId CameraTranslateBackwardChannelId() AzFramework::InputChannelId CameraTranslateBackwardChannelId()
{ {
return AzFramework::InputChannelId( return AzFramework::InputChannelId(
GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str()); AzToolsFramework::GetRegistry(CameraTranslateBackwardIdSetting, AZStd::string("keyboard_key_alphanumeric_S")).c_str());
} }
void SetCameraTranslateBackwardChannelId(AZStd::string_view cameraTranslateBackwardId) void SetCameraTranslateBackwardChannelId(AZStd::string_view cameraTranslateBackwardId)
{ {
SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId); AzToolsFramework::SetRegistry(CameraTranslateBackwardIdSetting, cameraTranslateBackwardId);
} }
AzFramework::InputChannelId CameraTranslateLeftChannelId() AzFramework::InputChannelId CameraTranslateLeftChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraTranslateLeftIdSetting, AZStd::string("keyboard_key_alphanumeric_A")).c_str());
} }
void SetCameraTranslateLeftChannelId(AZStd::string_view cameraTranslateLeftId) void SetCameraTranslateLeftChannelId(AZStd::string_view cameraTranslateLeftId)
{ {
SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId); AzToolsFramework::SetRegistry(CameraTranslateLeftIdSetting, cameraTranslateLeftId);
} }
AzFramework::InputChannelId CameraTranslateRightChannelId() AzFramework::InputChannelId CameraTranslateRightChannelId()
{ {
return AzFramework::InputChannelId( return AzFramework::InputChannelId(
GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str()); AzToolsFramework::GetRegistry(CameraTranslateRightIdSetting, AZStd::string("keyboard_key_alphanumeric_D")).c_str());
} }
void SetCameraTranslateRightChannelId(AZStd::string_view cameraTranslateRightId) void SetCameraTranslateRightChannelId(AZStd::string_view cameraTranslateRightId)
{ {
SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId); AzToolsFramework::SetRegistry(CameraTranslateRightIdSetting, cameraTranslateRightId);
} }
AzFramework::InputChannelId CameraTranslateUpChannelId() AzFramework::InputChannelId CameraTranslateUpChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraTranslateUpIdSetting, AZStd::string("keyboard_key_alphanumeric_E")).c_str());
} }
void SetCameraTranslateUpChannelId(AZStd::string_view cameraTranslateUpId) void SetCameraTranslateUpChannelId(AZStd::string_view cameraTranslateUpId)
{ {
SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId); AzToolsFramework::SetRegistry(CameraTranslateUpIdSetting, cameraTranslateUpId);
} }
AzFramework::InputChannelId CameraTranslateDownChannelId() AzFramework::InputChannelId CameraTranslateDownChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraTranslateDownIdSetting, AZStd::string("keyboard_key_alphanumeric_Q")).c_str());
} }
void SetCameraTranslateDownChannelId(AZStd::string_view cameraTranslateDownId) void SetCameraTranslateDownChannelId(AZStd::string_view cameraTranslateDownId)
{ {
SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId); AzToolsFramework::SetRegistry(CameraTranslateDownIdSetting, cameraTranslateDownId);
} }
AzFramework::InputChannelId CameraTranslateBoostChannelId() AzFramework::InputChannelId CameraTranslateBoostChannelId()
{ {
return AzFramework::InputChannelId( return AzFramework::InputChannelId(
GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str()); AzToolsFramework::GetRegistry(CameraTranslateBoostIdSetting, AZStd::string("keyboard_key_modifier_shift_l")).c_str());
} }
void SetCameraTranslateBoostChannelId(AZStd::string_view cameraTranslateBoostId) void SetCameraTranslateBoostChannelId(AZStd::string_view cameraTranslateBoostId)
{ {
SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId); AzToolsFramework::SetRegistry(CameraTranslateBoostIdSetting, cameraTranslateBoostId);
} }
AzFramework::InputChannelId CameraOrbitChannelId() AzFramework::InputChannelId CameraOrbitChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraOrbitIdSetting, AZStd::string("keyboard_key_modifier_alt_l")).c_str());
} }
void SetCameraOrbitChannelId(AZStd::string_view cameraOrbitId) void SetCameraOrbitChannelId(AZStd::string_view cameraOrbitId)
{ {
SetRegistry(CameraOrbitIdSetting, cameraOrbitId); AzToolsFramework::SetRegistry(CameraOrbitIdSetting, cameraOrbitId);
} }
AzFramework::InputChannelId CameraFreeLookChannelId() AzFramework::InputChannelId CameraFreeLookChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraFreeLookIdSetting, AZStd::string("mouse_button_right")).c_str());
} }
void SetCameraFreeLookChannelId(AZStd::string_view cameraFreeLookId) void SetCameraFreeLookChannelId(AZStd::string_view cameraFreeLookId)
{ {
SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId); AzToolsFramework::SetRegistry(CameraFreeLookIdSetting, cameraFreeLookId);
} }
AzFramework::InputChannelId CameraFreePanChannelId() AzFramework::InputChannelId CameraFreePanChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraFreePanIdSetting, AZStd::string("mouse_button_middle")).c_str());
} }
void SetCameraFreePanChannelId(AZStd::string_view cameraFreePanId) void SetCameraFreePanChannelId(AZStd::string_view cameraFreePanId)
{ {
SetRegistry(CameraFreePanIdSetting, cameraFreePanId); AzToolsFramework::SetRegistry(CameraFreePanIdSetting, cameraFreePanId);
} }
AzFramework::InputChannelId CameraOrbitLookChannelId() AzFramework::InputChannelId CameraOrbitLookChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraOrbitLookIdSetting, AZStd::string("mouse_button_left")).c_str());
} }
void SetCameraOrbitLookChannelId(AZStd::string_view cameraOrbitLookId) void SetCameraOrbitLookChannelId(AZStd::string_view cameraOrbitLookId)
{ {
SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId); AzToolsFramework::SetRegistry(CameraOrbitLookIdSetting, cameraOrbitLookId);
} }
AzFramework::InputChannelId CameraOrbitDollyChannelId() AzFramework::InputChannelId CameraOrbitDollyChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraOrbitDollyIdSetting, AZStd::string("mouse_button_right")).c_str());
} }
void SetCameraOrbitDollyChannelId(AZStd::string_view cameraOrbitDollyId) void SetCameraOrbitDollyChannelId(AZStd::string_view cameraOrbitDollyId)
{ {
SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId); AzToolsFramework::SetRegistry(CameraOrbitDollyIdSetting, cameraOrbitDollyId);
} }
AzFramework::InputChannelId CameraOrbitPanChannelId() AzFramework::InputChannelId CameraOrbitPanChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraOrbitPanIdSetting, AZStd::string("mouse_button_middle")).c_str());
} }
void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId) void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId)
{ {
SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId); AzToolsFramework::SetRegistry(CameraOrbitPanIdSetting, cameraOrbitPanId);
} }
AzFramework::InputChannelId CameraFocusChannelId() AzFramework::InputChannelId CameraFocusChannelId()
{ {
return AzFramework::InputChannelId(GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str()); return AzFramework::InputChannelId(
AzToolsFramework::GetRegistry(CameraFocusIdSetting, AZStd::string("keyboard_key_alphanumeric_X")).c_str());
} }
void SetCameraFocusChannelId(AZStd::string_view cameraFocusId) void SetCameraFocusChannelId(AZStd::string_view cameraFocusId)
{ {
SetRegistry(CameraFocusIdSetting, cameraFocusId); AzToolsFramework::SetRegistry(CameraFocusIdSetting, cameraFocusId);
} }
} // namespace SandboxEditor } // namespace SandboxEditor
@@ -479,9 +479,11 @@ namespace AZ
// Merge Command Line arguments // Merge Command Line arguments
constexpr bool executeRegDumpCommands = false; constexpr bool executeRegDumpCommands = false;
SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands);
#if defined(AZ_DEBUG_BUILD) || defined(AZ_PROFILE_BUILD)
// Skip over merging the User Registry in non-debug and profile configurations
SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {}); SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(*m_settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
#endif
SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands); SettingsRegistryMergeUtils::MergeSettingsToRegistry_CommandLine(*m_settingsRegistry, m_commandLine, executeRegDumpCommands);
SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry); SettingsRegistryMergeUtils::MergeSettingsToRegistry_AddRuntimeFilePaths(*m_settingsRegistry);
@@ -12,13 +12,57 @@
namespace AzFramework::Terrain namespace AzFramework::Terrain
{ {
// Create a handler that can be accessed from Python scripts to receive terrain change notifications.
class TerrainDataNotificationHandler final
: public AzFramework::Terrain::TerrainDataNotificationBus::Handler
, public AZ::BehaviorEBusHandler
{
public:
AZ_EBUS_BEHAVIOR_BINDER(
TerrainDataNotificationHandler,
"{A83EF103-295A-4653-8279-F30FBF3F9037}",
AZ::SystemAllocator,
OnTerrainDataCreateBegin,
OnTerrainDataCreateEnd,
OnTerrainDataDestroyBegin,
OnTerrainDataDestroyEnd,
OnTerrainDataChanged);
void OnTerrainDataCreateBegin() override
{
Call(FN_OnTerrainDataCreateBegin);
}
void OnTerrainDataCreateEnd() override
{
Call(FN_OnTerrainDataCreateEnd);
}
void OnTerrainDataDestroyBegin() override
{
Call(FN_OnTerrainDataDestroyBegin);
}
void OnTerrainDataDestroyEnd() override
{
Call(FN_OnTerrainDataDestroyEnd);
}
void OnTerrainDataChanged(
const AZ::Aabb& dirtyRegion, AzFramework::Terrain::TerrainDataNotifications::TerrainDataChangedMask dataChangedMask) override
{
Call(FN_OnTerrainDataChanged, dirtyRegion, dataChangedMask);
}
};
void TerrainDataRequests::Reflect(AZ::ReflectContext* context) void TerrainDataRequests::Reflect(AZ::ReflectContext* context)
{ {
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context)) if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
{ {
behaviorContext->EBus<AzFramework::Terrain::TerrainDataRequestBus>("TerrainDataRequestBus") behaviorContext->EBus<AzFramework::Terrain::TerrainDataRequestBus>("TerrainDataRequestBus")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Script::Attributes::Category, "Terrain") ->Attribute(AZ::Script::Attributes::Category, "Terrain")
->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeight) ->Attribute(AZ::Script::Attributes::Module, "terrain")
->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetNormal) ->Event("GetNormal", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetNormal)
->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeight) ->Event("GetMaxSurfaceWeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetMaxSurfaceWeight)
->Event("GetMaxSurfaceWeightFromVector2", ->Event("GetMaxSurfaceWeightFromVector2",
@@ -34,8 +78,24 @@ namespace AzFramework::Terrain
->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb) ->Event("GetTerrainAabb", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainAabb)
->Event("GetTerrainHeightQueryResolution", ->Event("GetTerrainHeightQueryResolution",
&AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution) &AzFramework::Terrain::TerrainDataRequestBus::Events::GetTerrainHeightQueryResolution)
->Event("GetHeight", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightVal)
->Event("GetHeightFromVector2", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromVector2)
->Event("GetHeightFromFloats", &AzFramework::Terrain::TerrainDataRequestBus::Events::GetHeightValFromFloats)
; ;
behaviorContext->EBus<AzFramework::Terrain::TerrainDataNotificationBus>("TerrainDataNotificationBus")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
->Attribute(AZ::Script::Attributes::Category, "Terrain")
->Attribute(AZ::Script::Attributes::Module, "terrain")
->Event("OnTerrainDataCreateBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateBegin)
->Event("OnTerrainDataCreateEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataCreateEnd)
->Event("OnTerrainDataDestroyBegin", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyBegin)
->Event("OnTerrainDataDestroyEnd", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataDestroyEnd)
->Event("OnTerrainDataChanged", &AzFramework::Terrain::TerrainDataNotifications::OnTerrainDataChanged)
->Handler<AzFramework::Terrain::TerrainDataNotificationHandler>()
;
} }
//TerrainDataNotificationHandler::Reflect(context);
} }
} // namespace AzFramework::Terrain } // namespace AzFramework::Terrain
@@ -144,13 +144,31 @@ namespace AzFramework
return result; return result;
} }
SurfaceData::SurfacePoint BehaviorContextGetSurfacePointFromVector2( SurfaceData::SurfacePoint BehaviorContextGetSurfacePointFromVector2(
const AZ::Vector2& inPosition, const AZ::Vector2& inPosition, Sampler sampleFilter = Sampler::DEFAULT) const
Sampler sampleFilter = Sampler::DEFAULT) const
{ {
SurfaceData::SurfacePoint result; SurfaceData::SurfacePoint result;
GetSurfacePointFromVector2(inPosition, result, sampleFilter); GetSurfacePointFromVector2(inPosition, result, sampleFilter);
return result; return result;
} }
// Functions without the optional bool* parameter that can be used from Python tests.
float GetHeightVal(AZ::Vector3 position, Sampler sampler = Sampler::BILINEAR) const
{
bool terrainExists;
return GetHeight(position, sampler, &terrainExists);
}
float GetHeightValFromVector2(AZ::Vector2 position, Sampler sampler = Sampler::BILINEAR) const
{
bool terrainExists;
return GetHeightFromVector2(position, sampler, &terrainExists);
}
float GetHeightValFromFloats(float x, float y, Sampler sampler = Sampler::BILINEAR) const
{
bool terrainExists;
return GetHeightFromFloats(x, y, sampler, &terrainExists);
}
}; };
using TerrainDataRequestBus = AZ::EBus<TerrainDataRequests>; using TerrainDataRequestBus = AZ::EBus<TerrainDataRequests>;
@@ -5,6 +5,7 @@
* SPDX-License-Identifier: Apache-2.0 OR MIT * SPDX-License-Identifier: Apache-2.0 OR MIT
* *
*/ */
#pragma once
#pragma once #pragma once
@@ -52,7 +52,7 @@ namespace AzToolsFramework
void ReadOnlyEntitySystemComponent::RefreshReadOnlyState(const EntityIdList& entityIds) void ReadOnlyEntitySystemComponent::RefreshReadOnlyState(const EntityIdList& entityIds)
{ {
for (const AZ::EntityId entityId : entityIds) for (const AZ::EntityId& entityId : entityIds)
{ {
bool wasReadOnly = m_readOnlystates[entityId]; bool wasReadOnly = m_readOnlystates[entityId];
QueryReadOnlyStateForEntity(entityId); QueryReadOnlyStateForEntity(entityId);
@@ -67,10 +67,10 @@ namespace AzToolsFramework
void ReadOnlyEntitySystemComponent::RefreshReadOnlyStateForAllEntities() void ReadOnlyEntitySystemComponent::RefreshReadOnlyStateForAllEntities()
{ {
for (auto elem : m_readOnlystates) for (auto& elem : m_readOnlystates)
{ {
AZ::EntityId entityId = elem.first; AZ::EntityId entityId = elem.first;
bool wasReadOnly = m_readOnlystates[entityId]; bool wasReadOnly = elem.second;
QueryReadOnlyStateForEntity(entityId); QueryReadOnlyStateForEntity(entityId);
if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly) if (bool isReadOnly = m_readOnlystates[entityId]; wasReadOnly != isReadOnly)
@@ -14,7 +14,7 @@
namespace AzToolsFramework namespace AzToolsFramework
{ {
AZ_CVAR(bool, cl_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators"); AZ_CVAR(bool, ed_manipulatorDrawDebug, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Enable debug drawing for Manipulators");
const AZ::Color BaseManipulator::s_defaultMouseOverColor = AZ::Color(1.0f, 1.0f, 0.0f, 1.0f); // yellow const AZ::Color BaseManipulator::s_defaultMouseOverColor = AZ::Color(1.0f, 1.0f, 0.0f, 1.0f); // yellow
@@ -28,7 +28,7 @@ namespace AzFramework
namespace AzToolsFramework namespace AzToolsFramework
{ {
AZ_CVAR_EXTERNED(bool, cl_manipulatorDrawDebug); AZ_CVAR_EXTERNED(bool, ed_manipulatorDrawDebug);
namespace UndoSystem namespace UndoSystem
{ {
@@ -207,7 +207,7 @@ namespace AzToolsFramework
? AZ::Transform::CreateFromQuaternionAndTranslation(m_visualOrientationOverride, GetLocalPosition()) ? AZ::Transform::CreateFromQuaternionAndTranslation(m_visualOrientationOverride, GetLocalPosition())
: GetLocalTransform(); : GetLocalTransform();
if (cl_manipulatorDrawDebug) if (ed_manipulatorDrawDebug)
{ {
if (PerformingAction()) if (PerformingAction())
{ {
@@ -21,6 +21,7 @@
#include <AzToolsFramework/Manipulators/PlanarManipulator.h> #include <AzToolsFramework/Manipulators/PlanarManipulator.h>
#include <AzToolsFramework/Manipulators/SplineSelectionManipulator.h> #include <AzToolsFramework/Manipulators/SplineSelectionManipulator.h>
#include <AzToolsFramework/Maths/TransformUtils.h> #include <AzToolsFramework/Maths/TransformUtils.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
#include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h> #include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h>
AZ_CVAR( AZ_CVAR(
@@ -30,6 +31,13 @@ AZ_CVAR(
nullptr, nullptr,
AZ::ConsoleFunctorFlags::Null, AZ::ConsoleFunctorFlags::Null,
"Display additional debug drawing for manipulator bounds"); "Display additional debug drawing for manipulator bounds");
AZ_CVAR(
float,
ed_planarManipulatorBoundScaleFactor,
1.75f,
nullptr,
AZ::ConsoleFunctorFlags::Null,
"The scale factor to apply to the planar manipulator bounds");
namespace AzToolsFramework namespace AzToolsFramework
{ {
@@ -78,7 +86,8 @@ namespace AzToolsFramework
{ {
// check if we actually needed to flip the axis, if so, write to shouldCorrect // check if we actually needed to flip the axis, if so, write to shouldCorrect
// so we know and are able to draw it differently if we wish (e.g. hollow if flipped) // so we know and are able to draw it differently if we wish (e.g. hollow if flipped)
const bool correcting = ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState); const bool correcting =
FlipManipulatorAxesTowardsView() && ShouldFlipCameraAxis(worldFromLocal, localPosition, axis, cameraState);
// the corrected axis, if no flip was required, output == input // the corrected axis, if no flip was required, output == input
correctedAxis = correcting ? -axis : axis; correctedAxis = correcting ? -axis : axis;
@@ -325,7 +334,8 @@ namespace AzToolsFramework
float ManipulatorView::ManipulatorViewScaleMultiplier( float ManipulatorView::ManipulatorViewScaleMultiplier(
const AZ::Vector3& worldPosition, const AzFramework::CameraState& cameraState) const const AZ::Vector3& worldPosition, const AzFramework::CameraState& cameraState) const
{ {
return ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f; const float screenScale = ScreenSizeFixed() ? CalculateScreenToWorldMultiplier(worldPosition, cameraState) : 1.0f;
return screenScale * ManipulatorViewBaseScale();
} }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -342,47 +352,77 @@ namespace AzToolsFramework
const AZ::Vector3 axis1 = m_axis1; const AZ::Vector3 axis1 = m_axis1;
const AZ::Vector3 axis2 = m_axis2; const AZ::Vector3 axis2 = m_axis2;
CameraCorrectAxis( // support partial application of CameraCorrectAxis to reduce redundant call site parameters
axis1, m_cameraCorrectedAxis1, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, auto cameraCorrectAxisPartialFn =
manipulatorState.m_localPosition, cameraState); [&manipulatorState, &managerState, &mouseInteraction, &cameraState](const AZ::Vector3& inAxis, AZ::Vector3& outAxis)
CameraCorrectAxis( {
axis2, m_cameraCorrectedAxis2, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, CameraCorrectAxis(
manipulatorState.m_localPosition, cameraState); inAxis, outAxis, managerState, mouseInteraction, manipulatorState.m_worldFromLocal, manipulatorState.m_localPosition,
cameraState);
};
const Picking::BoundShapeQuad quadBound = CalculateQuadBound( cameraCorrectAxisPartialFn(axis1, m_cameraCorrectedAxis1);
manipulatorState.m_localPosition, manipulatorState, m_cameraCorrectedAxis1, m_cameraCorrectedAxis2, cameraCorrectAxisPartialFn(axis2, m_cameraCorrectedAxis2);
m_size * cameraCorrectAxisPartialFn(axis1 * axis1.Dot(m_offset), m_cameraCorrectedOffsetAxis1);
ManipulatorViewScaleMultiplier( cameraCorrectAxisPartialFn(axis2 * axis2.Dot(m_offset), m_cameraCorrectedOffsetAxis2);
manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState));
const AZ::Vector3 totalScale =
manipulatorState.m_nonUniformScale * AZ::Vector3(manipulatorState.m_worldFromLocal.GetUniformScale());
const auto cameraCorrectedVisualOffset = (m_cameraCorrectedOffsetAxis1 + m_cameraCorrectedOffsetAxis2) * totalScale.GetReciprocal();
const auto viewScale =
ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState);
const Picking::BoundShapeQuad quadBoundVisual = CalculateQuadBound(
manipulatorState.m_localPosition + (cameraCorrectedVisualOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1,
m_cameraCorrectedAxis2, m_size * viewScale);
debugDisplay.SetLineWidth(defaultLineWidth(manipulatorState.m_mouseOver)); debugDisplay.SetLineWidth(defaultLineWidth(manipulatorState.m_mouseOver));
debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis1Color, m_mouseOverColor).GetAsVector4()); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis1Color, m_mouseOverColor).GetAsVector4());
debugDisplay.DrawLine(quadBound.m_corner4, quadBound.m_corner3); debugDisplay.DrawLine(quadBoundVisual.m_corner4, quadBoundVisual.m_corner3);
debugDisplay.DrawLine(quadBoundVisual.m_corner1, quadBoundVisual.m_corner2);
debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis2Color, m_mouseOverColor).GetAsVector4()); debugDisplay.SetColor(ViewColor(manipulatorState.m_mouseOver, m_axis2Color, m_mouseOverColor).GetAsVector4());
debugDisplay.DrawLine(quadBound.m_corner2, quadBound.m_corner3); debugDisplay.DrawLine(quadBoundVisual.m_corner2, quadBoundVisual.m_corner3);
debugDisplay.DrawLine(quadBoundVisual.m_corner1, quadBoundVisual.m_corner4);
if (manipulatorState.m_mouseOver) if (manipulatorState.m_mouseOver)
{ {
debugDisplay.SetColor(Vector3ToVector4(m_mouseOverColor.GetAsVector3(), 0.5f)); debugDisplay.SetColor(Vector3ToVector4(m_mouseOverColor.GetAsVector3(), 0.5f));
debugDisplay.CullOff(); debugDisplay.CullOff();
debugDisplay.DrawQuad(quadBound.m_corner1, quadBound.m_corner2, quadBound.m_corner3, quadBound.m_corner4); debugDisplay.DrawQuad(
quadBoundVisual.m_corner1, quadBoundVisual.m_corner2, quadBoundVisual.m_corner3, quadBoundVisual.m_corner4);
debugDisplay.CullOn(); debugDisplay.CullOn();
} }
RefreshBoundInternal(managerId, manipulatorId, quadBound); // total size of bounds to use for mouse intersection
const float hitSize = m_size * ed_planarManipulatorBoundScaleFactor;
// size of edge bounds (the 'margin/border' outside the visual representation)
const float edgeSize = (hitSize - m_size) * 0.5f;
const AZ::Vector3 edgeOffset =
((m_cameraCorrectedAxis1 * edgeSize + m_cameraCorrectedAxis2 * edgeSize) * totalScale.GetReciprocal());
const auto cameraCorrectedHitOffset = cameraCorrectedVisualOffset - edgeOffset;
const Picking::BoundShapeQuad quadBoundHit = CalculateQuadBound(
manipulatorState.m_localPosition + (cameraCorrectedHitOffset * viewScale), manipulatorState, m_cameraCorrectedAxis1,
m_cameraCorrectedAxis2, hitSize * viewScale);
if (ed_manipulatorDisplayBoundDebug)
{
debugDisplay.DrawQuad(quadBoundHit.m_corner1, quadBoundHit.m_corner2, quadBoundHit.m_corner3, quadBoundHit.m_corner4);
}
RefreshBoundInternal(managerId, manipulatorId, quadBoundHit);
} }
void ManipulatorViewQuadBillboard::Draw( void ManipulatorViewQuadBillboard::Draw(
const ManipulatorManagerId managerId, const ManipulatorManagerId managerId,
const ManipulatorManagerState& /*managerState*/, [[maybe_unused]] const ManipulatorManagerState& managerState,
const ManipulatorId manipulatorId, const ManipulatorId manipulatorId,
const ManipulatorState& manipulatorState, const ManipulatorState& manipulatorState,
AzFramework::DebugDisplayRequests& debugDisplay, AzFramework::DebugDisplayRequests& debugDisplay,
const AzFramework::CameraState& cameraState, const AzFramework::CameraState& cameraState,
const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction)
{ {
const Picking::BoundShapeQuad quadBound = CalculateQuadBoundBillboard( const Picking::BoundShapeQuad quadBound = CalculateQuadBoundBillboard(
manipulatorState.m_localPosition, manipulatorState.m_worldFromLocal, manipulatorState.m_localPosition, manipulatorState.m_worldFromLocal,
@@ -442,7 +482,7 @@ namespace AzToolsFramework
void ManipulatorViewLineSelect::Draw( void ManipulatorViewLineSelect::Draw(
const ManipulatorManagerId managerId, const ManipulatorManagerId managerId,
const ManipulatorManagerState& /*managerState*/, [[maybe_unused]] const ManipulatorManagerState& managerState,
const ManipulatorId manipulatorId, const ManipulatorId manipulatorId,
const ManipulatorState& manipulatorState, const ManipulatorState& manipulatorState,
AzFramework::DebugDisplayRequests& debugDisplay, AzFramework::DebugDisplayRequests& debugDisplay,
@@ -570,7 +610,7 @@ namespace AzToolsFramework
void ManipulatorViewSphere::Draw( void ManipulatorViewSphere::Draw(
const ManipulatorManagerId managerId, const ManipulatorManagerId managerId,
const ManipulatorManagerState& /*managerState*/, [[maybe_unused]] const ManipulatorManagerState& managerState,
const ManipulatorId manipulatorId, const ManipulatorId manipulatorId,
const ManipulatorState& manipulatorState, const ManipulatorState& manipulatorState,
AzFramework::DebugDisplayRequests& debugDisplay, AzFramework::DebugDisplayRequests& debugDisplay,
@@ -599,12 +639,12 @@ namespace AzToolsFramework
void ManipulatorViewCircle::Draw( void ManipulatorViewCircle::Draw(
const ManipulatorManagerId managerId, const ManipulatorManagerId managerId,
const ManipulatorManagerState& /*managerState*/, [[maybe_unused]] const ManipulatorManagerState& managerState,
const ManipulatorId manipulatorId, const ManipulatorId manipulatorId,
const ManipulatorState& manipulatorState, const ManipulatorState& manipulatorState,
AzFramework::DebugDisplayRequests& debugDisplay, AzFramework::DebugDisplayRequests& debugDisplay,
const AzFramework::CameraState& cameraState, const AzFramework::CameraState& cameraState,
const ViewportInteraction::MouseInteraction& /*mouseInteraction*/) [[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction)
{ {
const float viewScale = const float viewScale =
ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState); ManipulatorViewScaleMultiplier(manipulatorState.m_worldFromLocal.TransformPoint(manipulatorState.m_localPosition), cameraState);
@@ -665,7 +705,7 @@ namespace AzToolsFramework
void ManipulatorViewSplineSelect::Draw( void ManipulatorViewSplineSelect::Draw(
const ManipulatorManagerId managerId, const ManipulatorManagerId managerId,
const ManipulatorManagerState& /*managerState*/, [[maybe_unused]] const ManipulatorManagerState& managerState,
const ManipulatorId manipulatorId, const ManipulatorId manipulatorId,
const ManipulatorState& manipulatorState, const ManipulatorState& manipulatorState,
AzFramework::DebugDisplayRequests& debugDisplay, AzFramework::DebugDisplayRequests& debugDisplay,
@@ -698,12 +738,17 @@ namespace AzToolsFramework
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
AZStd::unique_ptr<ManipulatorViewQuad> CreateManipulatorViewQuad( AZStd::unique_ptr<ManipulatorViewQuad> CreateManipulatorViewQuad(
const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const float size) const PlanarManipulator& planarManipulator,
const AZ::Color& axis1Color,
const AZ::Color& axis2Color,
const AZ::Vector3& offset,
const float size)
{ {
AZStd::unique_ptr<ManipulatorViewQuad> viewQuad = AZStd::make_unique<ManipulatorViewQuad>(); AZStd::unique_ptr<ManipulatorViewQuad> viewQuad = AZStd::make_unique<ManipulatorViewQuad>();
viewQuad->m_axis1 = planarManipulator.GetAxis1(); viewQuad->m_axis1 = planarManipulator.GetAxis1();
viewQuad->m_axis2 = planarManipulator.GetAxis2(); viewQuad->m_axis2 = planarManipulator.GetAxis2();
viewQuad->m_size = size; viewQuad->m_size = size;
viewQuad->m_offset = offset;
viewQuad->m_axis1Color = axis1Color; viewQuad->m_axis1Color = axis1Color;
viewQuad->m_axis2Color = axis2Color; viewQuad->m_axis2Color = axis2Color;
return viewQuad; return viewQuad;
@@ -54,7 +54,7 @@ namespace AzToolsFramework
AZ_RTTI(ManipulatorView, "{7529E3E9-39B3-4D15-899A-FA13770113B2}") AZ_RTTI(ManipulatorView, "{7529E3E9-39B3-4D15-899A-FA13770113B2}")
ManipulatorView(); ManipulatorView();
ManipulatorView(bool screenSizeFixed); explicit ManipulatorView(bool screenSizeFixed);
virtual ~ManipulatorView(); virtual ~ManipulatorView();
ManipulatorView(ManipulatorView&&) = default; ManipulatorView(ManipulatorView&&) = default;
ManipulatorView& operator=(ManipulatorView&&) = default; ManipulatorView& operator=(ManipulatorView&&) = default;
@@ -117,13 +117,16 @@ namespace AzToolsFramework
AZ::Vector3 m_axis1 = AZ::Vector3(1.0f, 0.0f, 0.0f); AZ::Vector3 m_axis1 = AZ::Vector3(1.0f, 0.0f, 0.0f);
AZ::Vector3 m_axis2 = AZ::Vector3(0.0f, 1.0f, 0.0f); AZ::Vector3 m_axis2 = AZ::Vector3(0.0f, 1.0f, 0.0f);
AZ::Vector3 m_offset = AZ::Vector3::CreateZero();
AZ::Color m_axis1Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); AZ::Color m_axis1Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f);
AZ::Color m_axis2Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); AZ::Color m_axis2Color = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f);
float m_size = 0.06f; //!< size to render and do mouse ray intersection tests against. float m_size = 0.06f; //!< size to render and do mouse ray intersection tests against.
private: private:
AZ::Vector3 m_cameraCorrectedAxis1; AZ::Vector3 m_cameraCorrectedAxis1; //!< First axis of quad (should be orthogonal to second axis).
AZ::Vector3 m_cameraCorrectedAxis2; AZ::Vector3 m_cameraCorrectedAxis2; //!< Second axis of quad (should be orthogonal to first axis).
AZ::Vector3 m_cameraCorrectedOffsetAxis1; //!< Offset along first axis (parallel with first axis).
AZ::Vector3 m_cameraCorrectedOffsetAxis2; //!< Offset along second axis (parallel with second axis).
}; };
//! A screen aligned quad, centered at the position of the manipulator, display filled. //! A screen aligned quad, centered at the position of the manipulator, display filled.
@@ -379,7 +382,11 @@ namespace AzToolsFramework
// Helpers to create various manipulator views. // Helpers to create various manipulator views.
AZStd::unique_ptr<ManipulatorViewQuad> CreateManipulatorViewQuad( AZStd::unique_ptr<ManipulatorViewQuad> CreateManipulatorViewQuad(
const PlanarManipulator& planarManipulator, const AZ::Color& axis1Color, const AZ::Color& axis2Color, float size); const PlanarManipulator& planarManipulator,
const AZ::Color& axis1Color,
const AZ::Color& axis2Color,
const AZ::Vector3& offset,
float size);
AZStd::unique_ptr<ManipulatorViewQuadBillboard> CreateManipulatorViewQuadBillboard(const AZ::Color& color, float size); AZStd::unique_ptr<ManipulatorViewQuadBillboard> CreateManipulatorViewQuadBillboard(const AZ::Color& color, float size);
@@ -132,7 +132,7 @@ namespace AzToolsFramework
const AzFramework::CameraState& cameraState, const AzFramework::CameraState& cameraState,
const ViewportInteraction::MouseInteraction& mouseInteraction) const ViewportInteraction::MouseInteraction& mouseInteraction)
{ {
if (cl_manipulatorDrawDebug) if (ed_manipulatorDrawDebug)
{ {
const AZ::Transform combined = TransformUniformScale(GetSpace()) * GetLocalTransform(); const AZ::Transform combined = TransformUniformScale(GetSpace()) * GetLocalTransform();
for (const auto& fixed : m_fixedAxes) for (const auto& fixed : m_fixedAxes)
@@ -171,7 +171,7 @@ namespace AzToolsFramework
const AzFramework::CameraState& cameraState, const AzFramework::CameraState& cameraState,
const ViewportInteraction::MouseInteraction& mouseInteraction) const ViewportInteraction::MouseInteraction& mouseInteraction)
{ {
if (cl_manipulatorDrawDebug) if (ed_manipulatorDrawDebug)
{ {
if (PerformingAction()) if (PerformingAction())
{ {
@@ -9,6 +9,7 @@
#include "ScaleManipulators.h" #include "ScaleManipulators.h"
#include <AzToolsFramework/Maths/TransformUtils.h> #include <AzToolsFramework/Maths/TransformUtils.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
namespace AzToolsFramework namespace AzToolsFramework
{ {
@@ -120,25 +121,25 @@ namespace AzToolsFramework
void ScaleManipulators::ConfigureView( void ScaleManipulators::ConfigureView(
const float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color) const float axisLength, const AZ::Color& axis1Color, const AZ::Color& axis2Color, const AZ::Color& axis3Color)
{ {
const float boxSize = 0.1f; const float boxHalfExtent = ScaleManipulatorBoxHalfExtent();
const AZ::Color colors[] = { axis1Color, axis2Color, axis3Color }; const AZ::Color colors[] = { axis1Color, axis2Color, axis3Color };
for (size_t manipulatorIndex = 0; manipulatorIndex < m_axisScaleManipulators.size(); ++manipulatorIndex) for (size_t manipulatorIndex = 0; manipulatorIndex < m_axisScaleManipulators.size(); ++manipulatorIndex)
{ {
const auto lineLength = axisLength - boxSize; const auto lineLength = axisLength - (2.0f * boxHalfExtent);
ManipulatorViews views; ManipulatorViews views;
views.emplace_back( views.emplace_back(CreateManipulatorViewLine(
CreateManipulatorViewLine(*m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth)); *m_axisScaleManipulators[manipulatorIndex], colors[manipulatorIndex], axisLength, m_lineBoundWidth));
views.emplace_back(CreateManipulatorViewBox( views.emplace_back(CreateManipulatorViewBox(
AZ::Transform::CreateIdentity(), colors[manipulatorIndex], AZ::Transform::CreateIdentity(), colors[manipulatorIndex],
m_axisScaleManipulators[manipulatorIndex]->GetAxis() * lineLength, AZ::Vector3(boxSize))); m_axisScaleManipulators[manipulatorIndex]->GetAxis() * (lineLength + boxHalfExtent), AZ::Vector3(boxHalfExtent)));
m_axisScaleManipulators[manipulatorIndex]->SetViews(AZStd::move(views)); m_axisScaleManipulators[manipulatorIndex]->SetViews(AZStd::move(views));
} }
ManipulatorViews views; ManipulatorViews views;
views.emplace_back(CreateManipulatorViewBox( views.emplace_back(CreateManipulatorViewBox(
AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxSize))); AZ::Transform::CreateIdentity(), AZ::Color::CreateOne(), AZ::Vector3::CreateZero(), AZ::Vector3(boxHalfExtent)));
m_uniformScaleManipulator->SetViews(AZStd::move(views)); m_uniformScaleManipulator->SetViews(AZStd::move(views));
} }
@@ -10,13 +10,10 @@
#include <AzCore/Math/VectorConversions.h> #include <AzCore/Math/VectorConversions.h>
#include <AzToolsFramework/Manipulators/ManipulatorView.h> #include <AzToolsFramework/Manipulators/ManipulatorView.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
namespace AzToolsFramework namespace AzToolsFramework
{ {
static const float SurfaceManipulatorTransparency = 0.75f;
static const float LinearManipulatorAxisLength = 2.0f;
static const float SurfaceManipulatorRadius = 0.1f;
static const AZ::Color LinearManipulatorXAxisColor = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorXAxisColor = AZ::Color(1.0f, 0.0f, 0.0f, 1.0f);
static const AZ::Color LinearManipulatorYAxisColor = AZ::Color(0.0f, 1.0f, 0.0f, 1.0f); static const AZ::Color LinearManipulatorYAxisColor = AZ::Color(0.0f, 1.0f, 0.0f, 1.0f);
static const AZ::Color LinearManipulatorZAxisColor = AZ::Color(0.0f, 0.0f, 1.0f, 1.0f); static const AZ::Color LinearManipulatorZAxisColor = AZ::Color(0.0f, 0.0f, 1.0f, 1.0f);
@@ -240,18 +237,16 @@ namespace AzToolsFramework
const AZ::Color& axis2Color, const AZ::Color& axis2Color,
const AZ::Color& axis3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) const AZ::Color& axis3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/)
{ {
const float coneLength = 0.28f;
const float coneRadius = 0.07f;
const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color }; const AZ::Color axesColor[] = { axis1Color, axis2Color, axis3Color };
const auto configureLinearView = [lineBoundWidth = m_lineBoundWidth, coneLength, axisLength, const auto configureLinearView =
coneRadius](LinearManipulator* linearManipulator, const AZ::Color& color) [lineBoundWidth = m_lineBoundWidth, coneLength = LinearManipulatorConeLength(), axisLength,
coneRadius = LinearManipulatorConeRadius()](LinearManipulator* linearManipulator, const AZ::Color& color)
{ {
const auto lineLength = axisLength - coneLength; const auto lineLength = axisLength - coneLength;
ManipulatorViews views; ManipulatorViews views;
views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, lineLength, lineBoundWidth)); views.emplace_back(CreateManipulatorViewLine(*linearManipulator, color, axisLength, lineBoundWidth));
views.emplace_back( views.emplace_back(
CreateManipulatorViewCone(*linearManipulator, color, linearManipulator->GetAxis() * lineLength, coneLength, coneRadius)); CreateManipulatorViewCone(*linearManipulator, color, linearManipulator->GetAxis() * lineLength, coneLength, coneRadius));
linearManipulator->SetViews(AZStd::move(views)); linearManipulator->SetViews(AZStd::move(views));
@@ -264,17 +259,23 @@ namespace AzToolsFramework
} }
void TranslationManipulators::ConfigurePlanarView( void TranslationManipulators::ConfigurePlanarView(
const float planeSize,
const AZ::Color& plane1Color, const AZ::Color& plane1Color,
const AZ::Color& plane2Color /*= AZ::Color(0.0f, 1.0f, 0.0f, 0.5f)*/, const AZ::Color& plane2Color /*= AZ::Color(0.0f, 1.0f, 0.0f, 0.5f)*/,
const AZ::Color& plane3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/) const AZ::Color& plane3Color /*= AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)*/)
{ {
const float planeSize = 0.6f;
const AZ::Color planesColor[] = { plane1Color, plane2Color, plane3Color }; const AZ::Color planesColor[] = { plane1Color, plane2Color, plane3Color };
const float linearAxisLength = LinearManipulatorAxisLength();
const float linearConeLength = LinearManipulatorConeLength();
for (size_t manipulatorIndex = 0; manipulatorIndex < m_planarManipulators.size(); ++manipulatorIndex) for (size_t manipulatorIndex = 0; manipulatorIndex < m_planarManipulators.size(); ++manipulatorIndex)
{ {
const auto& planarManipulator = *m_planarManipulators[manipulatorIndex];
const AZStd::shared_ptr<ManipulatorViewQuad> manipulatorView = CreateManipulatorViewQuad( const AZStd::shared_ptr<ManipulatorViewQuad> manipulatorView = CreateManipulatorViewQuad(
*m_planarManipulators[manipulatorIndex], planesColor[manipulatorIndex], planesColor[(manipulatorIndex + 1) % 3], planeSize); *m_planarManipulators[manipulatorIndex], planesColor[manipulatorIndex], planesColor[(manipulatorIndex + 1) % 3],
(planarManipulator.GetAxis1() + planarManipulator.GetAxis2()) *
(((linearAxisLength - linearConeLength) * 0.5f) - (planeSize * 0.5f)),
planeSize);
m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ manipulatorView }); m_planarManipulators[manipulatorIndex]->SetViews(ManipulatorViews{ manipulatorView });
} }
@@ -286,12 +287,11 @@ namespace AzToolsFramework
{ {
m_surfaceManipulator->SetView(CreateManipulatorViewSphere( m_surfaceManipulator->SetView(CreateManipulatorViewSphere(
color, radius, color, radius,
[](const ViewportInteraction::MouseInteraction& /*mouseInteraction*/, bool mouseOver, []([[maybe_unused]] const ViewportInteraction::MouseInteraction& mouseInteraction, bool mouseOver,
const AZ::Color& defaultColor) -> AZ::Color const AZ::Color& defaultColor) -> AZ::Color
{ {
const AZ::Color color[2] = { const AZ::Color color[2] = {
defaultColor, defaultColor, Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorOpacity())
Vector3ToVector4(BaseManipulator::s_defaultMouseOverColor.GetAsVector3(), SurfaceManipulatorTransparency)
}; };
return color[mouseOver]; return color[mouseOver];
@@ -325,16 +325,19 @@ namespace AzToolsFramework
void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators) void ConfigureTranslationManipulatorAppearance3d(TranslationManipulators* translationManipulators)
{ {
translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ());
translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); translationManipulators->ConfigurePlanarView(
PlanarManipulatorAxisLength(), LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor);
translationManipulators->ConfigureLinearView( translationManipulators->ConfigureLinearView(
LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor); LinearManipulatorAxisLength(), LinearManipulatorXAxisColor, LinearManipulatorYAxisColor, LinearManipulatorZAxisColor);
translationManipulators->ConfigureSurfaceView(SurfaceManipulatorRadius, SurfaceManipulatorColor); translationManipulators->ConfigureSurfaceView(SurfaceManipulatorRadius(), SurfaceManipulatorColor);
} }
void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators) void ConfigureTranslationManipulatorAppearance2d(TranslationManipulators* translationManipulators)
{ {
translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY()); translationManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY());
translationManipulators->ConfigurePlanarView(LinearManipulatorXAxisColor); translationManipulators->ConfigurePlanarView(
translationManipulators->ConfigureLinearView(LinearManipulatorAxisLength, LinearManipulatorXAxisColor, LinearManipulatorYAxisColor); PlanarManipulatorAxisLength(), LinearManipulatorXAxisColor, LinearManipulatorYAxisColor);
translationManipulators->ConfigureLinearView(
LinearManipulatorAxisLength(), LinearManipulatorXAxisColor, LinearManipulatorYAxisColor);
} }
} // namespace AzToolsFramework } // namespace AzToolsFramework
@@ -53,6 +53,7 @@ namespace AzToolsFramework
void SetAxes(const AZ::Vector3& axis1, const AZ::Vector3& axis2, const AZ::Vector3& axis3 = AZ::Vector3::CreateAxisZ()); void SetAxes(const AZ::Vector3& axis1, const AZ::Vector3& axis2, const AZ::Vector3& axis3 = AZ::Vector3::CreateAxisZ());
void ConfigurePlanarView( void ConfigurePlanarView(
float planeSize,
const AZ::Color& plane1Color, const AZ::Color& plane1Color,
const AZ::Color& plane2Color = AZ::Color(0.0f, 1.0f, 0.0f, 0.5f), const AZ::Color& plane2Color = AZ::Color(0.0f, 1.0f, 0.0f, 0.5f),
const AZ::Color& plane3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f)); const AZ::Color& plane3Color = AZ::Color(0.0f, 0.0f, 1.0f, 0.5f));
@@ -0,0 +1,123 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#include <AzToolsFramework/Viewport/ViewportSettings.h>
namespace AzToolsFramework
{
constexpr AZStd::string_view FlipManipulatorAxesTowardsViewSetting = "/Amazon/Preferences/Editor/Manipulator/FlipManipulatorAxesTowardsView";
constexpr AZStd::string_view LinearManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorAxisLength";
constexpr AZStd::string_view PlanarManipulatorAxisLengthSetting = "/Amazon/Preferences/Editor/Manipulator/PlanarManipulatorAxisLength";
constexpr AZStd::string_view SurfaceManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorRadius";
constexpr AZStd::string_view SurfaceManipulatorOpacitySetting = "/Amazon/Preferences/Editor/Manipulator/SurfaceManipulatorOpacity";
constexpr AZStd::string_view LinearManipulatorConeLengthSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeLength";
constexpr AZStd::string_view LinearManipulatorConeRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/LinearManipulatorConeRadius";
constexpr AZStd::string_view ScaleManipulatorBoxHalfExtentSetting = "/Amazon/Preferences/Editor/Manipulator/ScaleManipulatorBoxHalfExtent";
constexpr AZStd::string_view RotationManipulatorRadiusSetting = "/Amazon/Preferences/Editor/Manipulator/RotationManipulatorRadius";
constexpr AZStd::string_view ManipulatorViewBaseScaleSetting = "/Amazon/Preferences/Editor/Manipulator/ViewBaseScale";
bool FlipManipulatorAxesTowardsView()
{
return GetRegistry(FlipManipulatorAxesTowardsViewSetting, true);
}
void SetFlipManipulatorAxesTowardsView(const bool enabled)
{
SetRegistry(FlipManipulatorAxesTowardsViewSetting, enabled);
}
float LinearManipulatorAxisLength()
{
return aznumeric_cast<float>(GetRegistry(LinearManipulatorAxisLengthSetting, 2.0));
}
void SetLinearManipulatorAxisLength(const float length)
{
SetRegistry(LinearManipulatorAxisLengthSetting, length);
}
float PlanarManipulatorAxisLength()
{
return aznumeric_cast<float>(GetRegistry(PlanarManipulatorAxisLengthSetting, 0.6));
}
void SetPlanarManipulatorAxisLength(const float length)
{
SetRegistry(PlanarManipulatorAxisLengthSetting, length);
}
float SurfaceManipulatorRadius()
{
return aznumeric_cast<float>(GetRegistry(SurfaceManipulatorRadiusSetting, 0.1));
}
void SetSurfaceManipulatorRadius(const float radius)
{
SetRegistry(SurfaceManipulatorRadiusSetting, radius);
}
float SurfaceManipulatorOpacity()
{
return aznumeric_cast<float>(GetRegistry(SurfaceManipulatorOpacitySetting, 0.75));
}
void SetSurfaceManipulatorOpacity(const float opacity)
{
SetRegistry(SurfaceManipulatorOpacitySetting, opacity);
}
float LinearManipulatorConeLength()
{
return aznumeric_cast<float>(GetRegistry(LinearManipulatorConeLengthSetting, 0.28));
}
void SetLinearManipulatorConeLength(const float length)
{
SetRegistry(LinearManipulatorConeLengthSetting, length);
}
float LinearManipulatorConeRadius()
{
return aznumeric_cast<float>(GetRegistry(LinearManipulatorConeRadiusSetting, 0.1));
}
void SetLinearManipulatorConeRadius(const float radius)
{
SetRegistry(LinearManipulatorConeRadiusSetting, radius);
}
float ScaleManipulatorBoxHalfExtent()
{
return aznumeric_cast<float>(GetRegistry(ScaleManipulatorBoxHalfExtentSetting, 0.1));
}
void SetScaleManipulatorBoxHalfExtent(const float size)
{
SetRegistry(ScaleManipulatorBoxHalfExtentSetting, size);
}
float RotationManipulatorRadius()
{
return aznumeric_cast<float>(GetRegistry(RotationManipulatorRadiusSetting, 2.0));
}
void SetRotationManipulatorRadius(const float radius)
{
SetRegistry(RotationManipulatorRadiusSetting, radius);
}
float ManipulatorViewBaseScale()
{
return aznumeric_cast<float>(GetRegistry(ManipulatorViewBaseScaleSetting, 1.0));
}
void SetManipulatorViewBaseScale(const float scale)
{
SetRegistry(ManipulatorViewBaseScaleSetting, scale);
}
} // namespace AzToolsFramework
@@ -0,0 +1,69 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/Settings/SettingsRegistry.h>
namespace AzToolsFramework
{
template<typename T>
void SetRegistry(const AZStd::string_view setting, T&& value)
{
if (auto* registry = AZ::SettingsRegistry::Get())
{
registry->Set(setting, AZStd::forward<T>(value));
}
}
template<typename T>
AZStd::remove_cvref_t<T> GetRegistry(const AZStd::string_view setting, T&& defaultValue)
{
AZStd::remove_cvref_t<T> value = AZStd::forward<T>(defaultValue);
if (const auto* registry = AZ::SettingsRegistry::Get())
{
T potentialValue;
if (registry->Get(potentialValue, setting))
{
value = AZStd::move(potentialValue);
}
}
return value;
}
bool FlipManipulatorAxesTowardsView();
void SetFlipManipulatorAxesTowardsView(bool enabled);
float LinearManipulatorAxisLength();
void SetLinearManipulatorAxisLength(float length);
float PlanarManipulatorAxisLength();
void SetPlanarManipulatorAxisLength(float length);
float SurfaceManipulatorRadius();
void SetSurfaceManipulatorRadius(float radius);
float SurfaceManipulatorOpacity();
void SetSurfaceManipulatorOpacity(float opacity);
float LinearManipulatorConeLength();
void SetLinearManipulatorConeLength(float length);
float LinearManipulatorConeRadius();
void SetLinearManipulatorConeRadius(float radius);
float ScaleManipulatorBoxHalfExtent();
void SetScaleManipulatorBoxHalfExtent(float halfExtent);
float RotationManipulatorRadius();
void SetRotationManipulatorRadius(float radius);
float ManipulatorViewBaseScale();
void SetManipulatorViewBaseScale(float scale);
} // namespace AzToolsFramework
@@ -33,6 +33,7 @@
#include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h> #include <AzToolsFramework/ToolsComponents/EditorVisibilityBus.h>
#include <AzToolsFramework/ToolsComponents/TransformComponent.h> #include <AzToolsFramework/ToolsComponents/TransformComponent.h>
#include <AzToolsFramework/Viewport/ActionBus.h> #include <AzToolsFramework/Viewport/ActionBus.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
#include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h> #include <AzToolsFramework/ViewportSelection/EditorSelectionUtil.h>
#include <AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h> #include <AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h>
#include <Entity/EditorEntityContextBus.h> #include <Entity/EditorEntityContextBus.h>
@@ -1376,7 +1377,7 @@ namespace AzToolsFramework
// view // view
rotationManipulators->SetLocalAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); rotationManipulators->SetLocalAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ());
rotationManipulators->ConfigureView( rotationManipulators->ConfigureView(
2.0f, AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor, RotationManipulatorRadius(), AzFramework::ViewportColors::XAxisColor, AzFramework::ViewportColors::YAxisColor,
AzFramework::ViewportColors::ZAxisColor); AzFramework::ViewportColors::ZAxisColor);
struct SharedRotationState struct SharedRotationState
@@ -1535,7 +1536,8 @@ namespace AzToolsFramework
RecalculateAverageManipulatorTransform(m_entityIdManipulators.m_lookups, m_pivotOverrideFrame, m_pivotMode, m_referenceFrame)); RecalculateAverageManipulatorTransform(m_entityIdManipulators.m_lookups, m_pivotOverrideFrame, m_pivotMode, m_referenceFrame));
scaleManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ()); scaleManipulators->SetAxes(AZ::Vector3::CreateAxisX(), AZ::Vector3::CreateAxisY(), AZ::Vector3::CreateAxisZ());
scaleManipulators->ConfigureView(2.0f, AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne()); scaleManipulators->ConfigureView(
LinearManipulatorAxisLength(), AZ::Color::CreateOne(), AZ::Color::CreateOne(), AZ::Color::CreateOne());
struct SharedScaleState struct SharedScaleState
{ {
@@ -506,6 +506,8 @@ set(FILES
Viewport/ViewportMessages.cpp Viewport/ViewportMessages.cpp
Viewport/ViewportTypes.h Viewport/ViewportTypes.h
Viewport/ViewportTypes.cpp Viewport/ViewportTypes.cpp
Viewport/ViewportSettings.h
Viewport/ViewportSettings.cpp
ViewportUi/Button.h ViewportUi/Button.h
ViewportUi/Button.cpp ViewportUi/Button.cpp
ViewportUi/ButtonGroup.h ViewportUi/ButtonGroup.h
@@ -294,7 +294,7 @@ namespace O3DE::ProjectManager
} }
else if (numChangedDependencies > 1) else if (numChangedDependencies > 1)
{ {
notification += tr("%1 Gem %2").arg(QString(numChangedDependencies), tr("dependencies")); notification += tr("%1 Gem %2").arg(numChangedDependencies).arg(tr("dependencies"));
} }
notification += (added ? tr(" activated") : tr(" deactivated")); notification += (added ? tr(" activated") : tr(" deactivated"));
@@ -28,6 +28,7 @@
#include <QFileInfo> #include <QFileInfo>
#include <QDesktopServices> #include <QDesktopServices>
#include <QMessageBox> #include <QMessageBox>
#include <QMouseEvent>
namespace O3DE::ProjectManager namespace O3DE::ProjectManager
{ {
@@ -109,11 +110,11 @@ namespace O3DE::ProjectManager
vLayout->addWidget(m_progressBar); vLayout->addWidget(m_progressBar);
} }
void LabelButton::mousePressEvent([[maybe_unused]] QMouseEvent* event) void LabelButton::mousePressEvent(QMouseEvent* event)
{ {
if(m_enabled) if(m_enabled)
{ {
emit triggered(); emit triggered(event);
} }
} }
@@ -201,52 +202,64 @@ namespace O3DE::ProjectManager
projectNameLabel->setToolTip(m_projectInfo.m_path); projectNameLabel->setToolTip(m_projectInfo.m_path);
hLayout->addWidget(projectNameLabel); hLayout->addWidget(projectNameLabel);
QMenu* menu = new QMenu(this);
menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); });
menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); });
menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); });
menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); });
menu->addSeparator();
menu->addAction(tr("Open Project folder..."), this, [this]()
{
AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path);
});
#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT
menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]()
{
AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(m_projectInfo.m_path.toUtf8().constData());
const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName);
const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path);
auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg });
if(result.IsSuccess())
{
QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue());
}
else
{
QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError());
}
});
#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT
menu->addSeparator();
menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); });
menu->addSeparator();
menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); });
menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); });
m_projectMenuButton = new QPushButton(this); m_projectMenuButton = new QPushButton(this);
m_projectMenuButton->setObjectName("projectMenuButton"); m_projectMenuButton->setObjectName("projectMenuButton");
m_projectMenuButton->setMenu(menu); m_projectMenuButton->setMenu(CreateProjectMenu());
hLayout->addWidget(m_projectMenuButton); hLayout->addWidget(m_projectMenuButton);
} }
vLayout->addWidget(projectFooter); vLayout->addWidget(projectFooter);
connect(m_projectImageLabel->GetOpenEditorButton(), &QPushButton::clicked, [this](){ emit OpenProject(m_projectInfo.m_path); }); connect(m_projectImageLabel->GetOpenEditorButton(), &QPushButton::clicked, [this](){ emit OpenProject(m_projectInfo.m_path); });
connect(m_projectImageLabel, &LabelButton::triggered, [this](QMouseEvent* event) {
if (event->button() == Qt::RightButton)
{
m_projectMenuButton->menu()->move(event->globalPos());
m_projectMenuButton->menu()->show();
}
});
}
QMenu* ProjectButton::CreateProjectMenu()
{
QMenu* menu = new QMenu(this);
menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); });
menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); });
menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); });
menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); });
menu->addSeparator();
menu->addAction(tr("Open Project folder..."), this, [this]()
{
AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path);
});
#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT
menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]()
{
AZ::IO::FixedMaxPath editorExecutablePath = ProjectUtils::GetEditorExecutablePath(m_projectInfo.m_path.toUtf8().constData());
const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName);
const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path);
auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg });
if(result.IsSuccess())
{
QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue());
}
else
{
QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError());
}
});
#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT
menu->addSeparator();
menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); });
menu->addSeparator();
menu->addAction(tr("Remove from O3DE"), this, [this]() { emit RemoveProject(m_projectInfo.m_path); });
menu->addAction(tr("Delete this Project"), this, [this]() { emit DeleteProject(m_projectInfo.m_path); });
return menu;
} }
const ProjectInfo& ProjectButton::GetProjectInfo() const const ProjectInfo& ProjectButton::GetProjectInfo() const
@@ -24,6 +24,7 @@ QT_FORWARD_DECLARE_CLASS(QProgressBar)
QT_FORWARD_DECLARE_CLASS(QLayout) QT_FORWARD_DECLARE_CLASS(QLayout)
QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QVBoxLayout)
QT_FORWARD_DECLARE_CLASS(QEvent) QT_FORWARD_DECLARE_CLASS(QEvent)
QT_FORWARD_DECLARE_CLASS(QMenu)
namespace O3DE::ProjectManager namespace O3DE::ProjectManager
{ {
@@ -49,7 +50,7 @@ namespace O3DE::ProjectManager
QLayout* GetBuildOverlayLayout(); QLayout* GetBuildOverlayLayout();
signals: signals:
void triggered(); void triggered(QMouseEvent* event);
public slots: public slots:
void mousePressEvent(QMouseEvent* event) override; void mousePressEvent(QMouseEvent* event) override;
@@ -108,6 +109,8 @@ namespace O3DE::ProjectManager
void ShowWarning(bool show, const QString& warning); void ShowWarning(bool show, const QString& warning);
void ShowDefaultBuildButton(); void ShowDefaultBuildButton();
QMenu* CreateProjectMenu();
ProjectInfo m_projectInfo; ProjectInfo m_projectInfo;
LabelButton* m_projectImageLabel = nullptr; LabelButton* m_projectImageLabel = nullptr;
+2 -1
View File
@@ -63,8 +63,9 @@ namespace AZ
#if defined(USE_RENDERDOC) #if defined(USE_RENDERDOC)
// If RenderDoc is requested, we need to load the library as early as possible (before device queries/factories are made) // If RenderDoc is requested, we need to load the library as early as possible (before device queries/factories are made)
bool enableRenderDoc = RHI::QueryCommandLineOption("enableRenderDoc"); bool enableRenderDoc = RHI::QueryCommandLineOption("enableRenderDoc");
#if defined(USE_PIX)
s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || enableRenderDoc; s_pixGpuMarkersEnabled = s_pixGpuMarkersEnabled || enableRenderDoc;
#endif
if (enableRenderDoc && AZ_TRAIT_RENDERDOC_MODULE && !s_renderDocModule) if (enableRenderDoc && AZ_TRAIT_RENDERDOC_MODULE && !s_renderDocModule)
{ {
s_renderDocModule = DynamicModuleHandle::Create(AZ_TRAIT_RENDERDOC_MODULE); s_renderDocModule = DynamicModuleHandle::Create(AZ_TRAIT_RENDERDOC_MODULE);
@@ -43,6 +43,10 @@ namespace AZ
// Rendering -> Idle // Rendering -> Idle
// -> Queued (Rendering will transition to Queued if a pass was queued with the PassSystem during Rendering) // -> Queued (Rendering will transition to Queued if a pass was queued with the PassSystem during Rendering)
// //
// Any State -> Orphaned (transition to Orphaned state can be outside the jurisdiction of the pass and so can happen from any state)
// Orphaned -> Queued (When coming out of Orphaned state, pass will queue itself for build. In practice this
// (almost?) never happens as orphaned passes are re-created in most if not all cases.)
//
enum class PassState : u8 enum class PassState : u8
{ {
// Default value, you should only ever see this in the Pass constructor // Default value, you should only ever see this in the Pass constructor
@@ -92,7 +96,10 @@ namespace AZ
// | // |
// V // V
// Pass is currently rendering. Pass must be in Idle state before entering this state // Pass is currently rendering. Pass must be in Idle state before entering this state
Rendering Rendering,
// Special state: Orphaned State, pass was removed from it's parent and is awaiting deletion
Orphaned
}; };
// This enum keeps track of what actions the pass is queued for with the pass system // This enum keeps track of what actions the pass is queued for with the pass system
@@ -147,6 +147,11 @@ namespace AZ
m_treeDepth = m_parent->m_treeDepth + 1; m_treeDepth = m_parent->m_treeDepth + 1;
m_path = ConcatPassName(m_parent->m_path, m_name); m_path = ConcatPassName(m_parent->m_path, m_name);
m_flags.m_partOfHierarchy = m_parent->m_flags.m_partOfHierarchy; m_flags.m_partOfHierarchy = m_parent->m_flags.m_partOfHierarchy;
if (m_state == PassState::Orphaned)
{
QueueForBuildAndInitialization();
}
} }
void Pass::RemoveFromParent() void Pass::RemoveFromParent()
@@ -154,7 +159,7 @@ namespace AZ
AZ_RPI_PASS_ASSERT(m_parent != nullptr, "Trying to remove pass from parent but pointer to the parent pass is null."); AZ_RPI_PASS_ASSERT(m_parent != nullptr, "Trying to remove pass from parent but pointer to the parent pass is null.");
m_parent->RemoveChild(Ptr<Pass>(this)); m_parent->RemoveChild(Ptr<Pass>(this));
m_queueState = PassQueueState::NoQueue; m_queueState = PassQueueState::NoQueue;
m_state = PassState::Idle; m_state = PassState::Orphaned;
} }
void Pass::OnOrphan() void Pass::OnOrphan()
@@ -162,6 +167,8 @@ namespace AZ
m_parent = nullptr; m_parent = nullptr;
m_flags.m_partOfHierarchy = false; m_flags.m_partOfHierarchy = false;
m_treeDepth = 0; m_treeDepth = 0;
m_queueState = PassQueueState::NoQueue;
m_state = PassState::Orphaned;
} }
// --- Getters & Setters --- // --- Getters & Setters ---
@@ -225,6 +225,36 @@ namespace AudioControls
{ {
pItem->setFlags(pItem->flags() & ~Qt::ItemIsDragEnabled); pItem->setFlags(pItem->flags() & ~Qt::ItemIsDragEnabled);
} }
if (compatibleType == EACEControlType::eACET_SWITCH_STATE)
{
IAudioSystemControl* pControl = pAudioSystemEditorImpl->GetControl(GetItemId(pItem));
if (pControl && !pControl->IsLocalized())
{
size_t nConnect = 0;
for (int i = 0; i < pControl->GetParent()->ChildCount(); ++i)
{
IAudioSystemControl* child = pControl->GetParent()->GetChildAt(i);
if (child && child->IsConnected())
{
++nConnect;
}
}
QTreeWidgetItem* pParentItem = GetItem(pControl->GetParent()->GetId(), pControl->GetParent()->IsLocalized());
if (pParentItem)
{
if (nConnect > 0 && nConnect == pControl->GetParent()->ChildCount())
{
pParentItem->setForeground(0, m_connectedColor);
}
else
{
pParentItem->setForeground(0, m_disconnectedColor);
}
}
}
}
} }
} }
@@ -382,6 +382,9 @@ namespace GraphCanvas
m_translationAssets.push_back(assetId); m_translationAssets.push_back(assetId);
} }
}; };
m_translationAssets.clear();
AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb);
} }
@@ -143,7 +143,7 @@ namespace LmbrCentral
using EditorPolygonPrismShapeComponentManipulatorFixture = using EditorPolygonPrismShapeComponentManipulatorFixture =
UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin<EditorPolygonPrismShapeComponentFixture>; UnitTest::IndirectCallManipulatorViewportInteractionFixtureMixin<EditorPolygonPrismShapeComponentFixture>;
TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScale_ManipulatorsScaleCorrectly) TEST_F(EditorPolygonPrismShapeComponentManipulatorFixture, PolygonPrismNonUniformScaleManipulatorsScaleCorrectly)
{ {
// set the non-uniform scale and enter the polygon prism shape component's component mode // set the non-uniform scale and enter the polygon prism shape component's component mode
const AZ::Vector3 nonUniformScale(2.0f, 3.0f, 4.0f); const AZ::Vector3 nonUniformScale(2.0f, 3.0f, 4.0f);
@@ -171,8 +171,8 @@ namespace LmbrCentral
const auto screenStart = AzFramework::WorldToScreen(worldStart, m_cameraState); const auto screenStart = AzFramework::WorldToScreen(worldStart, m_cameraState);
const auto screenEnd = AzFramework::WorldToScreen(worldEnd, m_cameraState); const auto screenEnd = AzFramework::WorldToScreen(worldEnd, m_cameraState);
// small diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators // diagonal offset to ensure we interact with the planar manipulator and not one of the linear manipulators
const AzFramework::ScreenVector offset(5, -5); const AzFramework::ScreenVector offset(50, -50);
m_actionDispatcher m_actionDispatcher
->CameraState(m_cameraState) ->CameraState(m_cameraState)
@@ -17,6 +17,7 @@
#include <AzToolsFramework/Manipulators/ManipulatorManager.h> #include <AzToolsFramework/Manipulators/ManipulatorManager.h>
#include <AzToolsFramework/Manipulators/ManipulatorView.h> #include <AzToolsFramework/Manipulators/ManipulatorView.h>
#include <AzToolsFramework/Manipulators/PlanarManipulator.h> #include <AzToolsFramework/Manipulators/PlanarManipulator.h>
#include <AzToolsFramework/Viewport/ViewportSettings.h>
#include <Editor/Source/ComponentModes/Joints/JointsComponentModeCommon.h> #include <Editor/Source/ComponentModes/Joints/JointsComponentModeCommon.h>
#include <PhysX/EditorJointBus.h> #include <PhysX/EditorJointBus.h>
@@ -34,22 +35,22 @@ namespace PhysX
const float XRotationManipulatorWidth = 0.05f; const float XRotationManipulatorWidth = 0.05f;
} // namespace Internal } // namespace Internal
JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone( JointsSubComponentModeAngleCone::JointsSubComponentModeAngleCone(const AZStd::string& propertyName, float max, float min)
const AZStd::string& propertyName, float max, float min)
: m_propertyName(propertyName) : m_propertyName(propertyName)
, m_max(max) , m_max(max)
, m_min(min) , m_min(min)
{ {
} }
void JointsSubComponentModeAngleCone::Setup(const AZ::EntityComponentIdPair& idPair) void JointsSubComponentModeAngleCone::Setup(const AZ::EntityComponentIdPair& idPair)
{ {
m_entityComponentIdPair = idPair; m_entityComponentIdPair = idPair;
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Position); m_resetPostion, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value,
JointsComponentModeCommon::ParamaterNames::Position);
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation); m_resetRotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetVector3Value,
JointsComponentModeCommon::ParamaterNames::Rotation);
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
m_resetLimits, m_entityComponentIdPair, &EditorJointRequests::GetLinearValuePair, m_propertyName); m_resetLimits, m_entityComponentIdPair, &EditorJointRequests::GetLinearValuePair, m_propertyName);
@@ -57,7 +58,8 @@ namespace PhysX
AZ::Transform localTransform = AZ::Transform::CreateIdentity(); AZ::Transform localTransform = AZ::Transform::CreateIdentity();
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue, JointsComponentModeCommon::ParamaterNames::Transform); localTransform, m_entityComponentIdPair, &EditorJointRequests::GetTransformValue,
JointsComponentModeCommon::ParamaterNames::Transform);
const AZ::Quaternion localRotation = localTransform.GetRotation(); const AZ::Quaternion localRotation = localTransform.GetRotation();
// Initialize manipulators used to resize the base of the cone. // Initialize manipulators used to resize the base of the cone.
@@ -105,10 +107,10 @@ namespace PhysX
{ {
AngleLimitsFloatPair m_startValues; AngleLimitsFloatPair m_startValues;
}; };
auto sharedState = AZStd::make_shared<SharedState>();
auto sharedState = AZStd::make_shared<SharedState>();
m_yLinearManipulator->InstallLeftMouseDownCallback( m_yLinearManipulator->InstallLeftMouseDownCallback(
[this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/)
{ {
AngleLimitsFloatPair currentValue; AngleLimitsFloatPair currentValue;
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
@@ -137,7 +139,7 @@ namespace PhysX
}); });
m_zLinearManipulator->InstallLeftMouseDownCallback( m_zLinearManipulator->InstallLeftMouseDownCallback(
[this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/) mutable [this, sharedState](const AzToolsFramework::LinearManipulator::Action& /*action*/)
{ {
AngleLimitsFloatPair currentValue; AngleLimitsFloatPair currentValue;
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
@@ -166,7 +168,7 @@ namespace PhysX
}); });
m_yzPlanarManipulator->InstallLeftMouseDownCallback( m_yzPlanarManipulator->InstallLeftMouseDownCallback(
[this, sharedState]([[maybe_unused]]const AzToolsFramework::PlanarManipulator::Action& action) mutable [this, sharedState]([[maybe_unused]] const AzToolsFramework::PlanarManipulator::Action& action)
{ {
AngleLimitsFloatPair currentValue; AngleLimitsFloatPair currentValue;
EditorJointRequestBus::EventResult( EditorJointRequestBus::EventResult(
@@ -207,9 +209,8 @@ namespace PhysX
{ {
AZ::Transform m_startTM; AZ::Transform m_startTM;
}; };
auto sharedStateXRotate = AZStd::make_shared<SharedStateXRotate>();
auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void auto mouseDownCallback = [this, sharedRotationState](const AzToolsFramework::AngularManipulator::Action& action)
{ {
AZ::Quaternion normalizedStart = action.m_start.m_rotation.GetNormalized(); AZ::Quaternion normalizedStart = action.m_start.m_rotation.GetNormalized();
sharedRotationState->m_axis = AZ::Vector3(normalizedStart.GetX(), normalizedStart.GetY(), normalizedStart.GetZ()); sharedRotationState->m_axis = AZ::Vector3(normalizedStart.GetX(), normalizedStart.GetY(), normalizedStart.GetZ());
@@ -222,8 +223,9 @@ namespace PhysX
sharedRotationState->m_valuePair = currentValue; sharedRotationState->m_valuePair = currentValue;
}; };
auto sharedStateXRotate = AZStd::make_shared<SharedStateXRotate>();
auto mouseDownRotateXCallback = auto mouseDownRotateXCallback =
[this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action) mutable -> void [this, sharedStateXRotate]([[maybe_unused]] const AzToolsFramework::AngularManipulator::Action& action)
{ {
PhysX::EditorJointRequestBus::EventResult( PhysX::EditorJointRequestBus::EventResult(
sharedStateXRotate->m_startTM, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetTransformValue, sharedStateXRotate->m_startTM, m_entityComponentIdPair, &PhysX::EditorJointRequests::GetTransformValue,
@@ -233,7 +235,7 @@ namespace PhysX
m_xRotationManipulator->InstallLeftMouseDownCallback(mouseDownRotateXCallback); m_xRotationManipulator->InstallLeftMouseDownCallback(mouseDownRotateXCallback);
m_xRotationManipulator->InstallMouseMoveCallback( m_xRotationManipulator->InstallMouseMoveCallback(
[this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action) mutable -> void [this, sharedStateXRotate](const AzToolsFramework::AngularManipulator::Action& action)
{ {
const AZ::Quaternion manipulatorOrientation = action.m_start.m_rotation * action.m_current.m_delta; const AZ::Quaternion manipulatorOrientation = action.m_start.m_rotation * action.m_current.m_delta;
@@ -241,11 +243,11 @@ namespace PhysX
newTransform = sharedStateXRotate->m_startTM * AZ::Transform::CreateFromQuaternion(action.m_current.m_delta); newTransform = sharedStateXRotate->m_startTM * AZ::Transform::CreateFromQuaternion(action.m_current.m_delta);
PhysX::EditorJointRequestBus::Event( PhysX::EditorJointRequestBus::Event(
m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Position, m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value,
newTransform.GetTranslation()); JointsComponentModeCommon::ParamaterNames::Position, newTransform.GetTranslation());
PhysX::EditorJointRequestBus::Event( PhysX::EditorJointRequestBus::Event(
m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value, JointsComponentModeCommon::ParamaterNames::Rotation, m_entityComponentIdPair, &PhysX::EditorJointRequests::SetVector3Value,
newTransform.GetRotation().GetEulerDegrees()); JointsComponentModeCommon::ParamaterNames::Rotation, newTransform.GetRotation().GetEulerDegrees());
m_yLinearManipulator->SetLocalOrientation(manipulatorOrientation); m_yLinearManipulator->SetLocalOrientation(manipulatorOrientation);
m_zLinearManipulator->SetLocalOrientation(manipulatorOrientation); m_zLinearManipulator->SetLocalOrientation(manipulatorOrientation);
@@ -332,8 +334,7 @@ namespace PhysX
{ {
AzToolsFramework::ManipulatorViews views; AzToolsFramework::ManipulatorViews views;
views.emplace_back(CreateManipulatorViewLine( views.emplace_back(CreateManipulatorViewLine(
*linearManipulator, color, axisLength, *linearManipulator, color, axisLength, AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId)));
AzToolsFramework::ManipulatorLineBoundWidth(AzFramework::InvalidViewportId)));
views.emplace_back(CreateManipulatorViewCone( views.emplace_back(CreateManipulatorViewCone(
*linearManipulator, color, linearManipulator->GetAxis() * (axisLength - coneLength), coneLength, coneRadius)); *linearManipulator, color, linearManipulator->GetAxis() * (axisLength - coneLength), coneLength, coneRadius));
linearManipulator->SetViews(AZStd::move(views)); linearManipulator->SetViews(AZStd::move(views));
@@ -345,9 +346,9 @@ namespace PhysX
void JointsSubComponentModeAngleCone::ConfigurePlanarView(const AZ::Color& planeColor, const AZ::Color& plane2Color) void JointsSubComponentModeAngleCone::ConfigurePlanarView(const AZ::Color& planeColor, const AZ::Color& plane2Color)
{ {
const float planeSize = 0.6f;
AzToolsFramework::ManipulatorViews views; AzToolsFramework::ManipulatorViews views;
views.emplace_back(CreateManipulatorViewQuad(*m_yzPlanarManipulator, planeColor, plane2Color, planeSize)); views.emplace_back(CreateManipulatorViewQuad(
*m_yzPlanarManipulator, planeColor, plane2Color, AZ::Vector3::CreateZero(), AzToolsFramework::PlanarManipulatorAxisLength()));
m_yzPlanarManipulator->SetViews(AZStd::move(views)); m_yzPlanarManipulator->SetViews(AZStd::move(views));
} }
@@ -864,7 +864,8 @@ namespace PhysX
{ {
if (auto* physicsSystem = AZ::Interface<AzPhysics::SystemInterface>::Get()) if (auto* physicsSystem = AZ::Interface<AzPhysics::SystemInterface>::Get())
{ {
if (const auto* physicsConfiguration = physicsSystem->GetConfiguration()) if (const auto* physicsConfiguration = physicsSystem->GetConfiguration();
physicsConfiguration && physicsConfiguration->m_materialLibraryAsset)
{ {
const auto& materials = physicsConfiguration->m_materialLibraryAsset->GetMaterialsData(); const auto& materials = physicsConfiguration->m_materialLibraryAsset->GetMaterialsData();
@@ -1,38 +0,0 @@
/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/EBus/EBus.h>
#include <AzCore/Asset/AssetCommon.h>
namespace PythonAssetBuilder
{
//! A request bus to help produce Open 3D Engine asset data
class PythonBuilderRequests
: public AZ::EBusTraits
{
public:
//////////////////////////////////////////////////////////////////////////
// EBusTraits overrides
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
//////////////////////////////////////////////////////////////////////////
//! Creates an AZ::Entity populated with Editor components and a name
virtual AZ::Outcome<AZ::EntityId, AZStd::string> CreateEditorEntity(const AZStd::string& name) = 0;
//! Writes out a .SLICE file with a given list of entities; optionally can be set to dynamic
virtual AZ::Outcome<AZ::Data::AssetType, AZStd::string> WriteSliceFile(
AZStd::string_view filename,
AZStd::vector<AZ::EntityId> entityList,
bool makeDynamic) = 0;
};
using PythonBuilderRequestBus = AZ::EBus<PythonBuilderRequests>;
}
@@ -8,7 +8,6 @@
#include <PythonAssetBuilderSystemComponent.h> #include <PythonAssetBuilderSystemComponent.h>
#include <PythonAssetBuilder/PythonAssetBuilderBus.h> #include <PythonAssetBuilder/PythonAssetBuilderBus.h>
#include <PythonAssetBuilder/PythonBuilderRequestBus.h>
#include <AzCore/IO/Path/Path.h> #include <AzCore/IO/Path/Path.h>
#include <AzCore/Serialization/SerializeContext.h> #include <AzCore/Serialization/SerializeContext.h>
@@ -57,13 +56,6 @@ namespace PythonAssetBuilder
->Event("RegisterAssetBuilder", &PythonAssetBuilderRequestBus::Events::RegisterAssetBuilder) ->Event("RegisterAssetBuilder", &PythonAssetBuilderRequestBus::Events::RegisterAssetBuilder)
->Event("GetExecutableFolder", &PythonAssetBuilderRequestBus::Events::GetExecutableFolder) ->Event("GetExecutableFolder", &PythonAssetBuilderRequestBus::Events::GetExecutableFolder)
; ;
behaviorContext->EBus<PythonBuilderRequestBus>("PythonBuilderRequestBus")
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation)
->Attribute(AZ::Script::Attributes::Module, "asset.entity")
->Event("WriteSliceFile", &PythonBuilderRequestBus::Events::WriteSliceFile)
->Event("CreateEditorEntity", &PythonBuilderRequestBus::Events::CreateEditorEntity)
;
} }
} }
@@ -97,13 +89,10 @@ namespace PythonAssetBuilder
{ {
pythonInterface->StartPython(true); pythonInterface->StartPython(true);
} }
PythonBuilderRequestBus::Handler::BusConnect();
} }
void PythonAssetBuilderSystemComponent::Deactivate() void PythonAssetBuilderSystemComponent::Deactivate()
{ {
PythonBuilderRequestBus::Handler::BusDisconnect();
m_messageSink.reset(); m_messageSink.reset();
if (PythonAssetBuilderRequestBus::HasHandlers()) if (PythonAssetBuilderRequestBus::HasHandlers())
@@ -148,109 +137,4 @@ namespace PythonAssetBuilder
} }
return AZ::Failure(AZStd::string("GetExecutableFolder access is missing.")); return AZ::Failure(AZStd::string("GetExecutableFolder access is missing."));
} }
AZ::Outcome<AZ::EntityId, AZStd::string> PythonAssetBuilderSystemComponent::CreateEditorEntity(const AZStd::string& name)
{
AZ::EntityId entityId;
AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult(
entityId,
&AzToolsFramework::EditorEntityContextRequestBus::Events::CreateNewEditorEntity,
name.c_str());
if (entityId.IsValid() == false)
{
return AZ::Failure<AZStd::string>("Failed to CreateNewEditorEntity.");
}
AZ::Entity* entity = nullptr;
AZ::ComponentApplicationBus::BroadcastResult(entity, &AZ::ComponentApplicationRequests::FindEntity, entityId);
if (entity == nullptr)
{
return AZ::Failure<AZStd::string>(AZStd::string::format("Failed to find created entityId %s", entityId.ToString().c_str()));
}
entity->Deactivate();
AzToolsFramework::EditorEntityContextRequestBus::Broadcast(
&AzToolsFramework::EditorEntityContextRequestBus::Events::AddRequiredComponents,
*entity);
entity->Activate();
return AZ::Success(entityId);
}
AZ::Outcome<AZ::Data::AssetType, AZStd::string> PythonAssetBuilderSystemComponent::WriteSliceFile(
AZStd::string_view filename,
AZStd::vector<AZ::EntityId> entityList,
bool makeDynamic)
{
using namespace AzToolsFramework::SliceUtilities;
AZ::SerializeContext* serializeContext = nullptr;
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
if (serializeContext == nullptr)
{
return AZ::Failure<AZStd::string>("GetSerializeContext failed");
}
// transaction->Commit() requires the "@user@" alias
auto settingsRegistry = AZ::SettingsRegistry::Get();
auto ioBase = AZ::IO::FileIOBase::GetInstance();
if (ioBase->GetAlias("@user@") == nullptr)
{
if (AZ::IO::Path userPath; settingsRegistry->Get(userPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_ProjectUserPath))
{
userPath /= "AssetProcessorTemp";
ioBase->SetAlias("@user@", userPath.c_str());
}
}
// transaction->Commit() expects the file to exist and write-able
AZ::IO::HandleType fileHandle;
AZ::IO::LocalFileIO::GetInstance()->Open(filename.data(), AZ::IO::OpenMode::ModeWrite, fileHandle);
if (fileHandle == AZ::IO::InvalidHandle)
{
return AZ::Failure<AZStd::string>(
AZStd::string::format("Failed to create slice file %.*s", aznumeric_cast<int>(filename.size()), filename.data()));
}
AZ::IO::LocalFileIO::GetInstance()->Close(fileHandle);
AZ::u32 creationFlags = 0;
if (makeDynamic)
{
creationFlags |= SliceTransaction::CreateAsDynamic;
}
SliceTransaction::TransactionPtr transaction = SliceTransaction::BeginNewSlice(nullptr, serializeContext, creationFlags);
// add entities
for (const AZ::EntityId& entityId : entityList)
{
auto addResult = transaction->AddEntity(entityId, SliceTransaction::SliceAddEntityFlags::DiscardSliceAncestry);
if (!addResult)
{
return AZ::Failure<AZStd::string>(AZStd::string::format("Failed slice add entity: %s", addResult.GetError().c_str()));
}
}
// commit to a file
AZ::Data::AssetType sliceAssetType;
auto resultCommit = transaction->Commit(filename.data(), nullptr, [&sliceAssetType](
SliceTransaction::TransactionPtr transactionPtr,
[[maybe_unused]] const char* fullPath,
const SliceTransaction::SliceAssetPtr& sliceAssetPtr)
{
sliceAssetType = sliceAssetPtr->GetType();
return AZ::Success();
});
if (!resultCommit)
{
return AZ::Failure<AZStd::string>(AZStd::string::format("Failed commit slice: %s", resultCommit.GetError().c_str()));
}
return AZ::Success(sliceAssetType);
}
} }
@@ -11,7 +11,6 @@
#include <AzCore/Component/Component.h> #include <AzCore/Component/Component.h>
#include <PythonAssetBuilder/PythonAssetBuilderBus.h> #include <PythonAssetBuilder/PythonAssetBuilderBus.h>
#include <PythonAssetBuilder/PythonBuilderRequestBus.h>
namespace PythonAssetBuilder namespace PythonAssetBuilder
{ {
@@ -21,7 +20,6 @@ namespace PythonAssetBuilder
class PythonAssetBuilderSystemComponent class PythonAssetBuilderSystemComponent
: public AZ::Component : public AZ::Component
, protected PythonAssetBuilderRequestBus::Handler , protected PythonAssetBuilderRequestBus::Handler
, protected PythonBuilderRequestBus::Handler
{ {
public: public:
AZ_COMPONENT(PythonAssetBuilderSystemComponent, "{E2872C13-D103-4534-9A95-76A66C8DDB5D}"); AZ_COMPONENT(PythonAssetBuilderSystemComponent, "{E2872C13-D103-4534-9A95-76A66C8DDB5D}");
@@ -42,13 +40,6 @@ namespace PythonAssetBuilder
AZ::Outcome<bool, AZStd::string> RegisterAssetBuilder(const AssetBuilderSDK::AssetBuilderDesc& desc) override; AZ::Outcome<bool, AZStd::string> RegisterAssetBuilder(const AssetBuilderSDK::AssetBuilderDesc& desc) override;
AZ::Outcome<AZStd::string, AZStd::string> GetExecutableFolder() const override; AZ::Outcome<AZStd::string, AZStd::string> GetExecutableFolder() const override;
// PythonBuilderRequestBus
AZ::Outcome<AZ::EntityId, AZStd::string> CreateEditorEntity(const AZStd::string& name) override;
AZ::Outcome<AZ::Data::AssetType, AZStd::string> WriteSliceFile(
AZStd::string_view filename,
AZStd::vector<AZ::EntityId> entityList,
bool makeDynamic) override;
private: private:
using PythonBuilderWorkerPointer = AZStd::shared_ptr<PythonBuilderWorker>; using PythonBuilderWorkerPointer = AZStd::shared_ptr<PythonBuilderWorker>;
using PythonBuilderWorkerMap = AZStd::unordered_map<AZ::Uuid, PythonBuilderWorkerPointer>; using PythonBuilderWorkerMap = AZStd::unordered_map<AZ::Uuid, PythonBuilderWorkerPointer>;
@@ -14,7 +14,6 @@
#include "Source/PythonAssetBuilderSystemComponent.h" #include "Source/PythonAssetBuilderSystemComponent.h"
#include <PythonAssetBuilder/PythonAssetBuilderBus.h> #include <PythonAssetBuilder/PythonAssetBuilderBus.h>
#include <PythonAssetBuilder/PythonBuilderRequestBus.h>
#include <AzCore/Asset/AssetCommon.h> #include <AzCore/Asset/AssetCommon.h>
#include <AssetBuilderSDK/AssetBuilderSDK.h> #include <AssetBuilderSDK/AssetBuilderSDK.h>
@@ -87,65 +86,6 @@ namespace UnitTest
&PythonAssetBuilderRequestBus::Events::GetExecutableFolder); &PythonAssetBuilderRequestBus::Events::GetExecutableFolder);
EXPECT_TRUE(result.IsSuccess()); EXPECT_TRUE(result.IsSuccess());
} }
// test bus API exists
TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_CreateEditorEntity_Exists)
{
using namespace PythonAssetBuilder;
EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers());
// Some static tests to make sure the public API has not changed since that
// would break Python asset builders using this EBus
{
AZ::Outcome<AZ::EntityId, AZStd::string> result;
AZStd::string name;
PythonBuilderRequestBus::BroadcastResult(
result,
&PythonBuilderRequestBus::Events::CreateEditorEntity,
name);
EXPECT_FALSE(result.IsSuccess());
}
m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor());
m_systemEntity->CreateComponent<PythonAssetBuilderSystemComponent>();
m_systemEntity->Init();
m_systemEntity->Activate();
EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers());
}
TEST_F(PythonAssetBuilderTest, PythonBuilderRequestBus_WriteSliceFile_Exists)
{
using namespace PythonAssetBuilder;
EXPECT_FALSE(PythonBuilderRequestBus::HasHandlers());
// Some static tests to make sure the public API has not changed since that
// would break Python asset builders using this EBus
{
AZ::Outcome<AZ::Data::AssetType, AZStd::string> result;
AZStd::string_view filename;
AZStd::vector<AZ::EntityId> entities;
bool makeDynamic = {};
PythonBuilderRequestBus::BroadcastResult(
result,
&PythonBuilderRequestBus::Events::WriteSliceFile,
filename,
entities,
makeDynamic);
EXPECT_FALSE(result.IsSuccess());
}
m_app->RegisterComponentDescriptor(PythonAssetBuilderSystemComponent::CreateDescriptor());
m_systemEntity->CreateComponent<PythonAssetBuilderSystemComponent>();
m_systemEntity->Init();
m_systemEntity->Activate();
EXPECT_TRUE(PythonBuilderRequestBus::HasHandlers());
}
} }
AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV);
@@ -106,17 +106,4 @@ namespace UnitTest
PythonBuilderNotificationBus::Event(builderId, &PythonBuilderNotificationBus::Events::OnCancel); PythonBuilderNotificationBus::Event(builderId, &PythonBuilderNotificationBus::Events::OnCancel);
EXPECT_EQ(1, mockJobHandler.m_onCancelCount); EXPECT_EQ(1, mockJobHandler.m_onCancelCount);
} }
TEST_F(PythonBuilderProcessJobTest, PythonBuilderRequestBus_Behavior_Exists)
{
using namespace PythonAssetBuilder;
using namespace AssetBuilderSDK;
RegisterAssetBuilder(m_app.get(), m_systemEntity);
auto entry = m_app->GetBehaviorContext()->m_ebuses.find("PythonBuilderRequestBus");
ASSERT_NE(m_app->GetBehaviorContext()->m_ebuses.end(), entry);
EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("WriteSliceFile"));
EXPECT_NE(entry->second->m_events.end(), entry->second->m_events.find("CreateEditorEntity"));
}
} }
@@ -9,7 +9,6 @@
set(FILES set(FILES
Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonAssetBuilderBus.h
Include/PythonAssetBuilder/PythonBuilderNotificationBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h
Include/PythonAssetBuilder/PythonBuilderRequestBus.h
Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.cpp
Source/PythonAssetBuilderSystemComponent.h Source/PythonAssetBuilderSystemComponent.h
Source/PythonBuilderMessageSink.cpp Source/PythonBuilderMessageSink.cpp
@@ -9,7 +9,6 @@
set(FILES set(FILES
Include/PythonAssetBuilder/PythonAssetBuilderBus.h Include/PythonAssetBuilder/PythonAssetBuilderBus.h
Include/PythonAssetBuilder/PythonBuilderNotificationBus.h Include/PythonAssetBuilder/PythonBuilderNotificationBus.h
Include/PythonAssetBuilder/PythonBuilderRequestBus.h
Source/PythonAssetBuilderSystemComponent.cpp Source/PythonAssetBuilderSystemComponent.cpp
Source/PythonAssetBuilderSystemComponent.h Source/PythonAssetBuilderSystemComponent.h
Source/PythonBuilderMessageSink.cpp Source/PythonBuilderMessageSink.cpp
@@ -4,8 +4,11 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import azlmbr.scene as sceneApi import typing
import json import json
import azlmbr.scene as sceneApi
from enum import Enum, IntEnum
# Wraps the AZ.SceneAPI.Containers.SceneGraph.NodeIndex internal class # Wraps the AZ.SceneAPI.Containers.SceneGraph.NodeIndex internal class
class SceneGraphNodeIndex: class SceneGraphNodeIndex:
@@ -24,6 +27,7 @@ class SceneGraphNodeIndex:
def equal(self, other) -> bool: def equal(self, other) -> bool:
return self.nodeIndex.Equal(other) return self.nodeIndex.Equal(other)
# Wraps AZ.SceneAPI.Containers.SceneGraph.Name internal class # Wraps AZ.SceneAPI.Containers.SceneGraph.Name internal class
class SceneGraphName(): class SceneGraphName():
def __init__(self, sceneGraphName) -> None: def __init__(self, sceneGraphName) -> None:
@@ -35,6 +39,7 @@ class SceneGraphName():
def get_name(self) -> str: def get_name(self) -> str:
return self.name.GetName() return self.name.GetName()
# Wraps AZ.SceneAPI.Containers.SceneGraph class # Wraps AZ.SceneAPI.Containers.SceneGraph class
class SceneGraph(): class SceneGraph():
def __init__(self, sceneGraphInstance) -> None: def __init__(self, sceneGraphInstance) -> None:
@@ -90,13 +95,26 @@ class SceneGraph():
def get_node_content(self, node): def get_node_content(self, node):
return self.sceneGraph.GetNodeContent(node) return self.sceneGraph.GetNodeContent(node)
class PrimitiveShape(IntEnum):
BEST_FIT = 0
SPHERE = 1
BOX = 2
CAPSULE = 3
class DecompositionMode(IntEnum):
VOXEL = 0
TETRAHEDRON = 1
# Contains a dictionary to contain and export AZ.SceneAPI.Containers.SceneManifest # Contains a dictionary to contain and export AZ.SceneAPI.Containers.SceneManifest
class SceneManifest(): class SceneManifest():
def __init__(self): def __init__(self):
self.manifest = {'values': []} self.manifest = {'values': []}
def add_mesh_group(self, name: str) -> dict: def add_mesh_group(self, name: str) -> dict:
meshGroup = {} meshGroup = {}
meshGroup['$type'] = '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup' meshGroup['$type'] = '{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup'
meshGroup['name'] = name meshGroup['name'] = name
meshGroup['nodeSelectionList'] = {'selectedNodes': [], 'unselectedNodes': []} meshGroup['nodeSelectionList'] = {'selectedNodes': [], 'unselectedNodes': []}
@@ -272,5 +290,242 @@ class SceneManifest():
mesh_group['rules']['rules'].append(rule) mesh_group['rules']['rules'].append(rule)
def __add_physx_base_mesh_group(self, name: str, physics_material: typing.Optional[str]) -> dict:
import azlmbr.math
group = {
'$type': '{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup',
'id': azlmbr.math.Uuid_CreateRandom().ToString(),
'name': name,
'NodeSelectionList': {
'selectedNodes': [],
'unselectedNodes': []
},
"MaterialSlots": [
"Material"
],
"PhysicsMaterials": [
self.__default_or_value(physics_material, "<Default Physics Material>")
],
"rules": {
"rules": []
}
}
self.manifest['values'].append(group)
return group
def add_physx_triangle_mesh_group(self, name: str, merge_meshes: bool = True, weld_vertices: bool = False,
disable_clean_mesh: bool = False,
force_32bit_indices: bool = False,
suppress_triangle_mesh_remap_table: bool = False,
build_triangle_adjacencies: bool = False,
mesh_weld_tolerance: float = 0.0,
num_tris_per_leaf: int = 4,
physics_material: typing.Optional[str] = None) -> dict:
"""
Adds a Triangle type PhysX Mesh Group to the scene.
:param name: Name of the mesh group.
:param merge_meshes: When true, all selected nodes will be merged into a single collision mesh.
:param weld_vertices: When true, mesh welding is performed. Clean mesh must be enabled.
:param disable_clean_mesh: When true, mesh cleaning is disabled. This makes cooking faster.
:param force_32bit_indices: When true, 32-bit indices will always be created regardless of triangle count.
:param suppress_triangle_mesh_remap_table: When true, the face remap table is not created.
This saves a significant amount of memory, but the SDK will not be able to provide the remap
information for internal mesh triangles returned by collisions, sweeps or raycasts hits.
:param build_triangle_adjacencies: When true, the triangle adjacency information is created.
:param mesh_weld_tolerance: If mesh welding is enabled, this controls the distance at
which vertices are welded. If mesh welding is not enabled, this value defines the
acceptance distance for mesh validation. Provided no two vertices are within this
distance, the mesh is considered to be clean. If not, a warning will be emitted.
:param num_tris_per_leaf: Mesh cooking hint for max triangles per leaf limit. Fewer triangles per leaf
produces larger meshes with better runtime performance and worse cooking performance.
:param physics_material: Configure which physics material to use.
:return: The newly created mesh group.
"""
group = self.__add_physx_base_mesh_group(name, physics_material)
group["export method"] = 0
group["TriangleMeshAssetParams"] = {
"MergeMeshes": merge_meshes,
"WeldVertices": weld_vertices,
"DisableCleanMesh": disable_clean_mesh,
"Force32BitIndices": force_32bit_indices,
"SuppressTriangleMeshRemapTable": suppress_triangle_mesh_remap_table,
"BuildTriangleAdjacencies": build_triangle_adjacencies,
"MeshWeldTolerance": mesh_weld_tolerance,
"NumTrisPerLeaf": num_tris_per_leaf
}
return group
def add_physx_convex_mesh_group(self, name: str, area_test_epsilon: float = 0.059, plane_tolerance: float = 0.0006,
use_16bit_indices: bool = False,
check_zero_area_triangles: bool = False,
quantize_input: bool = False,
use_plane_shifting: bool = False,
shift_vertices: bool = False,
gauss_map_limit: int = 32,
build_gpu_data: bool = False,
physics_material: typing.Optional[str] = None) -> dict:
"""
Adds a Convex type PhysX Mesh Group to the scene.
:param name: Name of the mesh group.
:param area_test_epsilon: If the area of a triangle of the hull is below this value, the triangle will be
rejected. This test is done only if Check Zero Area Triangles is used.
:param plane_tolerance: The value is used during hull construction. When a new point is about to be added
to the hull it gets dropped when the point is closer to the hull than the planeTolerance.
:param use_16bit_indices: Denotes the use of 16-bit vertex indices in Convex triangles or polygons.
:param check_zero_area_triangles: Checks and removes almost zero-area triangles during convex hull computation.
The rejected area size is specified in Area Test Epsilon.
:param quantize_input: Quantizes the input vertices using the k-means clustering.
:param use_plane_shifting: Enables plane shifting vertex limit algorithm. Plane shifting is an alternative
algorithm for the case when the computed hull has more vertices than the specified vertex
limit.
:param shift_vertices: Convex hull input vertices are shifted to be around origin to provide better
computation stability
:param gauss_map_limit: Vertex limit beyond which additional acceleration structures are computed for each
convex mesh. Increase that limit to reduce memory usage. Computing the extra structures
all the time does not guarantee optimal performance.
:param build_gpu_data: When true, additional information required for GPU-accelerated rigid body
simulation is created. This can increase memory usage and cooking times for convex meshes
and triangle meshes. Convex hulls are created with respect to GPU simulation limitations.
Vertex limit is set to 64 and vertex limit per face is internally set to 32.
:param physics_material: Configure which physics material to use.
:return: The newly created mesh group.
"""
group = self.__add_physx_base_mesh_group(name, physics_material)
group["export method"] = 1
group["ConvexAssetParams"] = {
"AreaTestEpsilon": area_test_epsilon,
"PlaneTolerance": plane_tolerance,
"Use16bitIndices": use_16bit_indices,
"CheckZeroAreaTriangles": check_zero_area_triangles,
"QuantizeInput": quantize_input,
"UsePlaneShifting": use_plane_shifting,
"ShiftVertices": shift_vertices,
"GaussMapLimit": gauss_map_limit,
"BuildGpuData": build_gpu_data
}
return group
def add_physx_primitive_mesh_group(self, name: str,
primitive_shape_target: PrimitiveShape = PrimitiveShape.BEST_FIT,
volume_term_coefficient: float = 0.0,
physics_material: typing.Optional[str] = None) -> dict:
"""
Adds a Primitive Shape type PhysX Mesh Group to the scene
:param name: Name of the mesh group.
:param primitive_shape_target: The shape that should be fitted to this mesh. If BEST_FIT is selected, the
algorithm will determine which of the shapes fits best.
:param volume_term_coefficient: This parameter controls how aggressively the primitive fitting algorithm will try
to minimize the volume of the fitted primitive. A value of 0 (no volume minimization) is
recommended for most meshes, especially those with moderate to high vertex counts.
:param physics_material: Configure which physics material to use.
:return: The newly created mesh group.
"""
group = self.__add_physx_base_mesh_group(name, physics_material)
group["export method"] = 2
group["PrimitiveAssetParams"] = {
"PrimitiveShapeTarget": int(primitive_shape_target),
"VolumeTermCoefficient": volume_term_coefficient
}
return group
def physx_mesh_group_decompose_meshes(self, mesh_group: dict, max_convex_hulls: int = 1024,
max_num_vertices_per_convex_hull: int = 64,
concavity: float = .001,
resolution: float = 100000,
mode: DecompositionMode = DecompositionMode.VOXEL,
alpha: float = .05,
beta: float = .05,
min_volume_per_convex_hull: float = 0.0001,
plane_downsampling: int = 4,
convex_hull_downsampling: int = 4,
pca: bool = False,
project_hull_vertices: bool = True) -> None:
"""
Enables and configures mesh decomposition for a PhysX Mesh Group.
Only valid for convex or primitive mesh types.
:param mesh_group: Mesh group to configure decomposition for.
:param max_convex_hulls: Controls the maximum number of hulls to generate.
:param max_num_vertices_per_convex_hull: Controls the maximum number of triangles per convex hull.
:param concavity: Maximum concavity of each approximate convex hull.
:param resolution: Maximum number of voxels generated during the voxelization stage.
:param mode: Select voxel-based approximate convex decomposition or tetrahedron-based
approximate convex decomposition.
:param alpha: Controls the bias toward clipping along symmetry planes.
:param beta: Controls the bias toward clipping along revolution axes.
:param min_volume_per_convex_hull: Controls the adaptive sampling of the generated convex hulls.
:param plane_downsampling: Controls the granularity of the search for the best clipping plane.
:param convex_hull_downsampling: Controls the precision of the convex hull generation process
during the clipping plane selection stage.
:param pca: Enable or disable normalizing the mesh before applying the convex decomposition.
:param project_hull_vertices: Project the output convex hull vertices onto the original source mesh to increase
the floating point accuracy of the results.
"""
mesh_group['DecomposeMeshes'] = True
mesh_group['ConvexDecompositionParams'] = {
"MaxConvexHulls": max_convex_hulls,
"MaxNumVerticesPerConvexHull": max_num_vertices_per_convex_hull,
"Concavity": concavity,
"Resolution": resolution,
"Mode": int(mode),
"Alpha": alpha,
"Beta": beta,
"MinVolumePerConvexHull": min_volume_per_convex_hull,
"PlaneDownsampling": plane_downsampling,
"ConvexHullDownsampling": convex_hull_downsampling,
"PCA": pca,
"ProjectHullVertices": project_hull_vertices
}
def physx_mesh_group_add_selected_node(self, mesh_group: dict, node: str) -> None:
"""
Adds a node to the selected nodes list
:param mesh_group: Mesh group to add to.
:param node: Node path to add.
"""
mesh_group['NodeSelectionList']['selectedNodes'].append(node)
def physx_mesh_group_add_unselected_node(self, mesh_group: dict, node: str) -> None:
"""
Adds a node to the unselected nodes list
:param mesh_group: Mesh group to add to.
:param node: Node path to add.
"""
mesh_group['NodeSelectionList']['unselectedNodes'].append(node)
def physx_mesh_group_add_selected_unselected_nodes(self, mesh_group: dict, selected: typing.List[str],
unselected: typing.List[str]) -> None:
"""
Adds a set of nodes to the selected/unselected node lists
:param mesh_group: Mesh group to add to.
:param selected: List of node paths to add to the selected list.
:param unselected: List of node paths to add to the unselected list.
"""
mesh_group['NodeSelectionList']['selectedNodes'].extend(selected)
mesh_group['NodeSelectionList']['unselectedNodes'].extend(unselected)
def physx_mesh_group_add_comment(self, mesh_group: dict, comment: str) -> None:
"""
Adds a comment rule
:param mesh_group: Mesh group to add the rule to.
:param comment: Comment string.
"""
rule = {
"$type": "CommentRule",
"comment": comment
}
mesh_group['rules']['rules'].append(rule)
def export(self): def export(self):
return json.dumps(self.manifest) return json.dumps(self.manifest)
@@ -0,0 +1,50 @@
{
"entries": [
{
"base": "AuthorityToAutonomousNoParams Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Authority To Autonomous No Params Notify Event"
},
"slots": [
{
"base": "AuthorityToAutonomousNoParams Notify Event",
"details": {
"name": "AuthorityToAutonomousNoParams Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,56 @@
{
"entries": [
{
"base": "AuthorityToAutonomous Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Authority To Autonomous Notify Event"
},
"slots": [
{
"base": "someFloat",
"details": {
"name": "someFloat"
}
},
{
"base": "AuthorityToAutonomous Notify Event",
"details": {
"name": "AuthorityToAutonomous Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,50 @@
{
"entries": [
{
"base": "AuthorityToClientNoParams Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Authority To Client No Params Notify Event"
},
"slots": [
{
"base": "AuthorityToClientNoParams Notify Event",
"details": {
"name": "AuthorityToClientNoParams Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,56 @@
{
"entries": [
{
"base": "AuthorityToClient Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Authority To Client Notify Event"
},
"slots": [
{
"base": "someFloat",
"details": {
"name": "someFloat"
}
},
{
"base": "AuthorityToClient Notify Event",
"details": {
"name": "AuthorityToClient Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,50 @@
{
"entries": [
{
"base": "AutonomousToAuthorityNoParams Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Autonomous To Authority No Params Notify Event"
},
"slots": [
{
"base": "AutonomousToAuthorityNoParams Notify Event",
"details": {
"name": "AutonomousToAuthorityNoParams Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,56 @@
{
"entries": [
{
"base": "AutonomousToAuthority Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Autonomous To Authority Notify Event"
},
"slots": [
{
"base": "someFloat",
"details": {
"name": "someFloat"
}
},
{
"base": "AutonomousToAuthority Notify Event",
"details": {
"name": "AutonomousToAuthority Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,50 @@
{
"entries": [
{
"base": "ServerToAuthorityNoParam Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Server To Authority No Param Notify Event"
},
"slots": [
{
"base": "ServerToAuthorityNoParam Notify Event",
"details": {
"name": "ServerToAuthorityNoParam Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -0,0 +1,56 @@
{
"entries": [
{
"base": "ServerToAuthority Notify Event",
"context": "AZEventHandler",
"variant": "",
"details": {
"name": "Server To Authority Notify Event"
},
"slots": [
{
"base": "someFloat",
"details": {
"name": "someFloat"
}
},
{
"base": "ServerToAuthority Notify Event",
"details": {
"name": "ServerToAuthority Notify Event"
}
},
{
"base": "Connect",
"details": {
"name": "Connect"
}
},
{
"base": "Disconnect",
"details": {
"name": "Disconnect"
}
},
{
"base": "On Connected",
"details": {
"name": "On Connected"
}
},
{
"base": "On Disconnected",
"details": {
"name": "On Disconnected"
}
},
{
"base": "OnEvent",
"details": {
"name": "OnEvent"
}
}
]
}
]
}
@@ -1,45 +0,0 @@
{
"entries": [
{
"base": "Entity Transform",
"context": "BehaviorClass",
"variant": "",
"details": {
"name": "Entity Transform"
},
"methods": [
{
"base": "Rotate",
"context": "Entity Transform",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Rotate"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Rotate is invoked"
},
"details": {
"name": "Entity Transform::Rotate",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "const EntityId&",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}",
"details": {
"name": "const Vector3&"
}
}
]
}
]
}
]
}
@@ -5,8 +5,7 @@
"context": "BehaviorClass", "context": "BehaviorClass",
"variant": "", "variant": "",
"details": { "details": {
"name": "Material Data", "name": "Material Data"
"category": "Rendering"
}, },
"methods": [ "methods": [
{ {
@@ -433,6 +432,7 @@
}, },
{ {
"base": "GetNormal", "base": "GetNormal",
"context": "Getter",
"details": { "details": {
"name": "Get Normal" "name": "Get Normal"
}, },
@@ -440,13 +440,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Normal"
} }
} }
] ]
}, },
{ {
"base": "GetDiffuse", "base": "GetDiffuse",
"context": "Getter",
"details": { "details": {
"name": "Get Diffuse" "name": "Get Diffuse"
}, },
@@ -454,13 +455,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Diffuse"
} }
} }
] ]
}, },
{ {
"base": "GetSpecular", "base": "GetSpecular",
"context": "Getter",
"details": { "details": {
"name": "Get Specular" "name": "Get Specular"
}, },
@@ -468,13 +470,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Specular"
} }
} }
] ]
}, },
{ {
"base": "GetBump", "base": "GetBump",
"context": "Getter",
"details": { "details": {
"name": "Get Bump" "name": "Get Bump"
}, },
@@ -482,13 +485,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Bump"
} }
} }
] ]
}, },
{ {
"base": "GetEmissive", "base": "GetEmissive",
"context": "Getter",
"details": { "details": {
"name": "Get Emissive" "name": "Get Emissive"
}, },
@@ -496,13 +500,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Emissive"
} }
} }
] ]
}, },
{ {
"base": "GetRoughness", "base": "GetRoughness",
"context": "Getter",
"details": { "details": {
"name": "Get Roughness" "name": "Get Roughness"
}, },
@@ -510,13 +515,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Roughness"
} }
} }
] ]
}, },
{ {
"base": "GetBaseColor", "base": "GetBaseColor",
"context": "Getter",
"details": { "details": {
"name": "Get Base Color" "name": "Get Base Color"
}, },
@@ -524,13 +530,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Base Color"
} }
} }
] ]
}, },
{ {
"base": "GetAmbientOcclusion", "base": "GetAmbientOcclusion",
"context": "Getter",
"details": { "details": {
"name": "Get Ambient Occlusion" "name": "Get Ambient Occlusion"
}, },
@@ -538,13 +545,14 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Ambient Occlusion"
} }
} }
] ]
}, },
{ {
"base": "GetMetallic", "base": "GetMetallic",
"context": "Getter",
"details": { "details": {
"name": "Get Metallic" "name": "Get Metallic"
}, },
@@ -552,7 +560,7 @@
{ {
"typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}",
"details": { "details": {
"name": "int" "name": "Metallic"
} }
} }
] ]
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,438 @@
{
"entries": [
{
"base": "NetworkTestPlayerComponent",
"context": "BehaviorClass",
"variant": "",
"details": {
"name": "Network Test Player Component"
},
"methods": [
{
"base": "AutonomousToAuthority",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Autonomous To Authority"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Autonomous To Authority is invoked"
},
"details": {
"name": "Autonomous To Authority"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "float"
}
}
]
},
{
"base": "ServerToAuthority",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Server To Authority"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Server To Authority is invoked"
},
"details": {
"name": "Server To Authority"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "float"
}
}
]
},
{
"base": "AutonomousToAuthorityByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Autonomous To Authority By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Autonomous To Authority By Entity Id is invoked"
},
"details": {
"name": "Autonomous To Authority By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "some Float"
}
}
]
},
{
"base": "ServerToAuthorityByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Server To Authority By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Server To Authority By Entity Id is invoked"
},
"details": {
"name": "Server To Authority By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "some Float"
}
}
]
},
{
"base": "AutonomousToAuthorityNoParams",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Autonomous To Authority No Params"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Autonomous To Authority No Params is invoked"
},
"details": {
"name": "Autonomous To Authority No Params"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
}
]
},
{
"base": "AuthorityToAutonomous",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Autonomous"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Autonomous is invoked"
},
"details": {
"name": "Authority To Autonomous"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "float"
}
}
]
},
{
"base": "AuthorityToClientNoParams",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Client No Params"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Client No Params is invoked"
},
"details": {
"name": "Authority To Client No Params"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
}
]
},
{
"base": "AuthorityToClientByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Client By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Client By Entity Id is invoked"
},
"details": {
"name": "Authority To Client By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "some Float"
}
}
]
},
{
"base": "AuthorityToClient",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Client"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Client is invoked"
},
"details": {
"name": "Authority To Client"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "float"
}
}
]
},
{
"base": "AuthorityToAutonomousNoParams",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Autonomous No Params"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Autonomous No Params is invoked"
},
"details": {
"name": "Authority To Autonomous No Params"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
}
]
},
{
"base": "ServerToAuthorityNoParamByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Server To Authority No Param By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Server To Authority No Param By Entity Id is invoked"
},
"details": {
"name": "Server To Authority No Param By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
}
]
},
{
"base": "AuthorityToClientNoParamsByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Client No Params By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Client No Params By Entity Id is invoked"
},
"details": {
"name": "Authority To Client No Params By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
}
]
},
{
"base": "AuthorityToAutonomousByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Autonomous By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Autonomous By Entity Id is invoked"
},
"details": {
"name": "Authority To Autonomous By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "some Float"
}
}
]
},
{
"base": "AutonomousToAuthorityNoParamsByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Autonomous To Authority No Params By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Autonomous To Authority No Params By Entity Id is invoked"
},
"details": {
"name": "Autonomous To Authority No Params By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
}
]
},
{
"base": "AuthorityToAutonomousNoParamsByEntityId",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Authority To Autonomous No Params By Entity Id"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Authority To Autonomous No Params By Entity Id is invoked"
},
"details": {
"name": "Authority To Autonomous No Params By Entity Id"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Source",
"tooltip": "The Source containing the NetworkTestPlayerComponentController"
}
}
]
},
{
"base": "ServerToAuthorityNoParam",
"context": "NetworkTestPlayerComponent",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Server To Authority No Param"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Server To Authority No Param is invoked"
},
"details": {
"name": "Server To Authority No Param"
},
"params": [
{
"typeid": "{CA5E5C37-98A6-04D2-E15C-1B4BFEE4C7DD}",
"details": {
"name": "Network Test Player Component"
}
}
]
}
]
}
]
}
@@ -5,8 +5,7 @@
"context": "BehaviorClass", "context": "BehaviorClass",
"variant": "", "variant": "",
"details": { "details": {
"name": "Network Test Player Component Network Input", "name": "Network Test Player Component Network Input"
"category": "Automated Testing"
}, },
"methods": [ "methods": [
{ {
@@ -27,13 +26,7 @@
{ {
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": { "details": {
"name": "Forward Back" "name": "left Right"
}
},
{
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": {
"name": "Left Right"
} }
} }
], ],
@@ -47,9 +40,9 @@
] ]
}, },
{ {
"base": "FwdBack", "base": "GetFwdBack",
"details": { "details": {
"name": "Get Forward Back" "name": "Get Fwd Back"
}, },
"params": [ "params": [
{ {
@@ -63,15 +56,15 @@
{ {
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": { "details": {
"name": "Forward Back" "name": "Fwd Back"
} }
} }
] ]
}, },
{ {
"base": "FwdBack", "base": "SetFwdBack",
"details": { "details": {
"name": "Set Forward Back" "name": "Set Fwd Back"
}, },
"params": [ "params": [
{ {
@@ -83,13 +76,13 @@
{ {
"typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}",
"details": { "details": {
"name": "Forward Back" "name": "Fwd Back"
} }
} }
] ]
}, },
{ {
"base": "LeftRight", "base": "GetLeftRight",
"details": { "details": {
"name": "Get Left Right" "name": "Get Left Right"
}, },
@@ -111,7 +104,7 @@
] ]
}, },
{ {
"base": "LeftRight", "base": "SetLeftRight",
"details": { "details": {
"name": "Set Left Right" "name": "Set Left Right"
}, },
@@ -5,19 +5,32 @@
"context": "BehaviorClass", "context": "BehaviorClass",
"variant": "", "variant": "",
"details": { "details": {
"name": "ReferenceShapeConfig" "name": "Reference Shape Config"
}, },
"methods": [ "methods": [
{ {
"base": "shapeEntityId", "base": "GetshapeEntityId",
"context": "Getter",
"details": { "details": {
"name": "ReferenceShapeConfig::shapeEntityId::Getter" "name": "Getshape Entity Id"
}, },
"params": [ "params": [
{ {
"typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}",
"details": { "details": {
"name": "ReferenceShapeConfig*" "name": "Vegetation Reference Shape"
}
},
{
"typeid": "",
"details": {
"name": "shape Entity Id"
}
},
{
"typeid": "",
"details": {
"name": ""
} }
} }
], ],
@@ -25,28 +38,29 @@
{ {
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": { "details": {
"name": "EntityId&", "name": "Entity Id",
"tooltip": "Entity Unique Id" "tooltip": "Entity Unique Id"
} }
} }
] ]
}, },
{ {
"base": "shapeEntityId", "base": "SetshapeEntityId",
"context": "Setter",
"details": { "details": {
"name": "ReferenceShapeConfig::shapeEntityId::Setter" "name": "Setshape Entity Id"
}, },
"params": [ "params": [
{ {
"typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}", "typeid": "{3E49974D-2EE0-4AF9-92B9-229A22B515C3}",
"details": { "details": {
"name": "ReferenceShapeConfig*" "name": "Vegetation Reference Shape"
} }
}, },
{ {
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": { "details": {
"name": "const EntityId&", "name": "shape Entity Id",
"tooltip": "Entity Unique Id" "tooltip": "Entity Unique Id"
} }
} }
@@ -1,471 +0,0 @@
{
"entries": [
{
"base": "Unit Testing",
"context": "BehaviorClass",
"variant": "",
"details": {
"name": "Unit Testing",
"category": "Tests"
},
"methods": [
{
"base": "ExpectLessThanEqual",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectLessThanEqual"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectLessThanEqual is invoked"
},
"details": {
"name": "Expect Less Than Equal",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Reference"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectGreaterThanEqual",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectGreaterThanEqual"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectGreaterThanEqual is invoked"
},
"details": {
"name": "Unit Testing::Expect Greater Than Equal",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Reference"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "MarkComplete",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke MarkComplete"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after MarkComplete is invoked"
},
"details": {
"name": "Mark Complete",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectTrue",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectTrue"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectTrue is invoked"
},
"details": {
"name": "Expect True",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "Checkpoint",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Checkpoint"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Checkpoint is invoked"
},
"details": {
"name": "Checkpoint",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectFalse",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectFalse"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectFalse is invoked"
},
"details": {
"name": "Expect False",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectEqual",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectEqual"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectEqual is invoked"
},
"details": {
"name": "Expect Equal",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}",
"details": {
"name": "Reference"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectLessThan",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectLessThan"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectLessThan is invoked"
},
"details": {
"name": "Expect Less Than",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Candidate"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "Reference"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "AddSuccess",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke Add Success"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after Add Success is invoked"
},
"details": {
"name": "Add Success",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectNotEqual",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectNotEqual"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectNotEqual is invoked"
},
"details": {
"name": "Expect Not Equal",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}",
"details": {
"name": "Aabb"
}
},
{
"typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}",
"details": {
"name": "Aabb"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "ExpectGreaterThan",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke ExpectGreaterThan"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after ExpectGreaterThan is invoked"
},
"details": {
"name": "Expect Greater Than",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "double"
}
},
{
"typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}",
"details": {
"name": "double"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
},
{
"base": "AddFailure",
"context": "Unit Testing",
"entry": {
"name": "In",
"tooltip": "When signaled, this will invoke AddFailure"
},
"exit": {
"name": "Out",
"tooltip": "Signaled after AddFailure is invoked"
},
"details": {
"name": "Add Failure",
"category": "Other"
},
"params": [
{
"typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}",
"details": {
"name": "Entity Id",
"tooltip": "Entity Unique Id"
}
},
{
"typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}",
"details": {
"name": "Report"
}
}
]
}
]
}
]
}
@@ -7,31 +7,30 @@
"details": { "details": {
"name": "Add Element at End", "name": "Add Element at End",
"category": "Containers", "category": "Containers",
"tooltip": "Adds the provided element at the end of the container", "tooltip": "Adds the provided element at the end of the container"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Container", "base": "DataOutput_Container_0",
"details": { "details": {
"name": "Container" "name": "Container"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
@@ -7,30 +7,29 @@
"details": { "details": {
"name": "Clear All Elements", "name": "Clear All Elements",
"category": "Containers", "category": "Containers",
"tooltip": "Eliminates all the elements in the container", "tooltip": "Eliminates all the elements in the container"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Container", "base": "DataOutput_Container_0",
"details": { "details": {
"name": "Container" "name": "Container"
} }
@@ -7,38 +7,37 @@
"details": { "details": {
"name": "Erase", "name": "Erase",
"category": "Containers", "category": "Containers",
"tooltip": "Erase the element at the specified Index or with the specified Key", "tooltip": "Erase the element at the specified Index or with the specified Key"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Container", "base": "DataOutput_Container_0",
"details": { "details": {
"name": "Container" "name": "Container"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
} }
}, },
{ {
"base": "Output_Element Not Found", "base": "Output_Element Not Found_1",
"details": { "details": {
"name": "Element Not Found", "name": "Element Not Found",
"tooltip": "Triggered if the specified element was not found" "tooltip": "Triggered if the specified element was not found"
@@ -11,34 +11,34 @@
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Signaled upon node entry" "tooltip": "Signaled upon node entry"
} }
}, },
{ {
"base": "Input_Break", "base": "Input_Break_1",
"details": { "details": {
"name": "Break", "name": "Break",
"tooltip": "Stops the iteration when signaled" "tooltip": "Stops the iteration when signaled"
} }
}, },
{ {
"base": "Output_Each", "base": "Output_Each_0",
"details": { "details": {
"name": "Each", "name": "Each",
"tooltip": "Signalled after each element of the container" "tooltip": "Signalled after each element of the container"
} }
}, },
{ {
"base": "Output_Finished", "base": "Output_Finished_1",
"details": { "details": {
"name": "Finished", "name": "Finished",
"tooltip": "The container has been fully iterated over" "tooltip": "The container has been fully iterated over"
@@ -7,32 +7,31 @@
"details": { "details": {
"name": "Get Element", "name": "Get Element",
"category": "Containers", "category": "Containers",
"tooltip": "Returns the element at the specified Index or Key", "tooltip": "Returns the element at the specified Index or Key"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
} }
}, },
{ {
"base": "Output_Key Not Found", "base": "Output_Key Not Found_1",
"details": { "details": {
"name": "Key Not Found", "name": "Key Not Found",
"tooltip": "Triggered if the specified key was not found" "tooltip": "Triggered if the specified key was not found"
@@ -7,25 +7,24 @@
"details": { "details": {
"name": "Get First Element", "name": "Get First Element",
"category": "Containers", "category": "Containers",
"tooltip": "Retrieves the first element in the container", "tooltip": "Retrieves the first element in the container"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
@@ -7,25 +7,24 @@
"details": { "details": {
"name": "Get Last Element", "name": "Get Last Element",
"category": "Containers", "category": "Containers",
"tooltip": "Get Last Element", "tooltip": "Get Last Element"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
@@ -7,30 +7,29 @@
"details": { "details": {
"name": "Get Size", "name": "Get Size",
"category": "Containers", "category": "Containers",
"tooltip": "Get the number of elements in the specified container", "tooltip": "Get the number of elements in the specified container"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataOutput_Size", "base": "DataOutput_Size_0",
"details": { "details": {
"name": "Size" "name": "Size"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
@@ -7,31 +7,30 @@
"details": { "details": {
"name": "Insert", "name": "Insert",
"category": "Containers", "category": "Containers",
"tooltip": "Inserts an element into the container at the specified Index or Key", "tooltip": "Inserts an element into the container at the specified Index or Key"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Container", "base": "DataOutput_Container_0",
"details": { "details": {
"name": "Container" "name": "Container"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Input signal" "tooltip": "Input signal"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Output signal" "tooltip": "Output signal"
@@ -7,44 +7,43 @@
"details": { "details": {
"name": "Is Empty", "name": "Is Empty",
"category": "Containers", "category": "Containers",
"tooltip": "Returns whether the container is empty", "tooltip": "Returns whether the container is empty"
"subtitle": "Containers"
}, },
"slots": [ "slots": [
{ {
"base": "DataOutput_Is Empty", "base": "DataOutput_Is Empty_0",
"details": { "details": {
"name": "Is Empty" "name": "Is Empty"
} }
}, },
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "Output_True", "base": "Output_True_1",
"details": { "details": {
"name": "True", "name": "True",
"tooltip": "The container is empty" "tooltip": "The container is empty"
} }
}, },
{ {
"base": "Output_False", "base": "Output_False_2",
"details": { "details": {
"name": "False", "name": "False",
"tooltip": "The container is not empty" "tooltip": "The container is not empty"
} }
}, },
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
@@ -11,35 +11,35 @@
}, },
"slots": [ "slots": [
{ {
"base": "Input_Connect", "base": "Input_Connect_0",
"details": { "details": {
"name": "Connect", "name": "Connect",
"tooltip": "Connect the AZ Event to this AZ Event Handler." "tooltip": "Connect the AZ Event to this AZ Event Handler."
} }
}, },
{ {
"base": "Input_Disconnect", "base": "Input_Disconnect_1",
"details": { "details": {
"name": "Disconnect", "name": "Disconnect",
"tooltip": "Disconnect current AZ Event from this AZ Event Handler." "tooltip": "Disconnect current AZ Event from this AZ Event Handler."
} }
}, },
{ {
"base": "Output_On Connected", "base": "Output_On Connected_0",
"details": { "details": {
"name": "On Connected", "name": "On Connected",
"tooltip": "Signaled when a connection has taken place." "tooltip": "Signaled when a connection has taken place."
} }
}, },
{ {
"base": "Output_On Disconnected", "base": "Output_On Disconnected_1",
"details": { "details": {
"name": "On Disconnected", "name": "On Disconnected",
"tooltip": "Signaled when this event handler is disconnected." "tooltip": "Signaled when this event handler is disconnected."
} }
}, },
{ {
"base": "Output_OnEvent", "base": "Output_OnEvent_2",
"details": { "details": {
"name": "OnEvent", "name": "OnEvent",
"tooltip": "Triggered when the AZ Event invokes Signal() function." "tooltip": "Triggered when the AZ Event invokes Signal() function."
@@ -11,35 +11,35 @@
}, },
"slots": [ "slots": [
{ {
"base": "Input_Connect", "base": "Input_Connect_0",
"details": { "details": {
"name": "Connect", "name": "Connect",
"tooltip": "Connect this event handler to the specified entity." "tooltip": "Connect this event handler to the specified entity."
} }
}, },
{ {
"base": "Input_Disconnect", "base": "Input_Disconnect_1",
"details": { "details": {
"name": "Disconnect", "name": "Disconnect",
"tooltip": "Disconnect this event handler." "tooltip": "Disconnect this event handler."
} }
}, },
{ {
"base": "Output_OnConnected", "base": "Output_OnConnected_0",
"details": { "details": {
"name": "OnConnected", "name": "OnConnected",
"tooltip": "Signaled when a connection has taken place." "tooltip": "Signaled when a connection has taken place."
} }
}, },
{ {
"base": "Output_OnDisconnected", "base": "Output_OnDisconnected_1",
"details": { "details": {
"name": "OnDisconnected", "name": "OnDisconnected",
"tooltip": "Signaled when this event handler is disconnected." "tooltip": "Signaled when this event handler is disconnected."
} }
}, },
{ {
"base": "Output_OnFailure", "base": "Output_OnFailure_2",
"details": { "details": {
"name": "OnFailure", "name": "OnFailure",
"tooltip": "Signaled when it is not possible to connect this handler." "tooltip": "Signaled when it is not possible to connect this handler."
@@ -7,18 +7,17 @@
"details": { "details": {
"name": "Function Definition", "name": "Function Definition",
"category": "Core", "category": "Core",
"tooltip": "Represents either an execution entry or exit node.", "tooltip": "Represents either an execution entry or exit node."
"subtitle": "Core"
}, },
"slots": [ "slots": [
{ {
"base": "Input_ ", "base": "Input_ _0",
"details": { "details": {
"name": " " "name": " "
} }
}, },
{ {
"base": "Output_ ", "base": "Output_ _0",
"details": { "details": {
"name": " " "name": " "
} }
@@ -5,7 +5,7 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MethodOverloaded", "name": "Method Overloaded",
"category": "Core", "category": "Core",
"tooltip": "MethodOverloaded" "tooltip": "MethodOverloaded"
} }
@@ -7,8 +7,7 @@
"details": { "details": {
"name": "Nodeling", "name": "Nodeling",
"category": "Core", "category": "Core",
"tooltip": "Represents either an execution entry or exit node", "tooltip": "Represents either an execution entry or exit node"
"subtitle": "Core"
} }
} }
] ]
@@ -11,35 +11,35 @@
}, },
"slots": [ "slots": [
{ {
"base": "Input_Connect", "base": "Input_Connect_0",
"details": { "details": {
"name": "Connect", "name": "Connect",
"tooltip": "Connect this event handler to the specified entity." "tooltip": "Connect this event handler to the specified entity."
} }
}, },
{ {
"base": "Input_Disconnect", "base": "Input_Disconnect_1",
"details": { "details": {
"name": "Disconnect", "name": "Disconnect",
"tooltip": "Disconnect this event handler." "tooltip": "Disconnect this event handler."
} }
}, },
{ {
"base": "Output_OnConnected", "base": "Output_OnConnected_0",
"details": { "details": {
"name": "OnConnected", "name": "OnConnected",
"tooltip": "Signaled when a connection has taken place." "tooltip": "Signaled when a connection has taken place."
} }
}, },
{ {
"base": "Output_OnDisconnected", "base": "Output_OnDisconnected_1",
"details": { "details": {
"name": "OnDisconnected", "name": "OnDisconnected",
"tooltip": "Signaled when this event handler is disconnected." "tooltip": "Signaled when this event handler is disconnected."
} }
}, },
{ {
"base": "Output_OnFailure", "base": "Output_OnFailure_2",
"details": { "details": {
"name": "OnFailure", "name": "OnFailure",
"tooltip": "Signaled when it is not possible to connect this handler." "tooltip": "Signaled when it is not possible to connect this handler."
@@ -11,14 +11,14 @@
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In", "name": "In",
"tooltip": "Fires the specified ScriptEvent when signaled" "tooltip": "Fires the specified ScriptEvent when signaled"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out", "name": "Out",
"tooltip": "Trigged after the ScriptEvent has been signaled and returns" "tooltip": "Trigged after the ScriptEvent has been signaled and returns"
@@ -7,38 +7,37 @@
"details": { "details": {
"name": "Add", "name": "Add",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots", "tooltip": "This node is deprecated, use Add (+), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Matrix3x3: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Matrix3x3: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Matrix3x3: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Matrix3x3: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Matrix3x3", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Matrix3x3" "name": "Result"
} }
} }
] ]
@@ -5,40 +5,39 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "DivideByNumber", "name": "Divide By Number",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "returns matrix created from multiply the source matrix by 1/Divisor", "tooltip": "returns matrix created from multiply the source matrix by 1/Divisor"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Matrix3x3: Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Matrix3x3: Source" "name": "Source"
} }
}, },
{ {
"base": "DataInput_Number: Divisor", "base": "DataInput_Divisor_1",
"details": { "details": {
"name": "Number: Divisor" "name": "Divisor"
} }
}, },
{ {
"base": "DataOutput_Result: Matrix3x3", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Matrix3x3" "name": "Result"
} }
} }
] ]
@@ -1,44 +1,43 @@
{ {
"entries": [ "entries": [
{ {
"base": "{57BA2085-2225-5E7E-B132-9CCD0AFC55EA}", "base": "{DF3A38B7-2C72-5CE5-BB8C-3293C7431F60}",
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "DivideByVector", "name": "Divide By Vector",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slot configurations.", "tooltip": "This node is deprecated, use Divide (/), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Vector3: Numerator", "base": "DataInput_Numerator_0",
"details": { "details": {
"name": "Vector3: Numerator" "name": "Numerator"
} }
}, },
{ {
"base": "DataInput_Vector3: Divisor", "base": "DataInput_Divisor_1",
"details": { "details": {
"name": "Vector3: Divisor" "name": "Divisor"
} }
}, },
{ {
"base": "DataOutput_Result: Vector3", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Vector3" "name": "Result"
} }
} }
] ]
@@ -7,32 +7,31 @@
"details": { "details": {
"name": "Length", "name": "Length",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations", "tooltip": "This node is deprecated, use the Length node, it provides contextual type and slot configurations"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Quaternion: Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Quaternion: Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Result: Number", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Number" "name": "Result"
} }
} }
] ]
@@ -5,40 +5,39 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MultiplyByColor", "name": "Multiply By Color",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Color: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Color: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Color: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Color: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Color", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Color" "name": "Result"
} }
} }
] ]
@@ -1,44 +1,43 @@
{ {
"entries": [ "entries": [
{ {
"base": "{FDB0FF00-F185-5CCF-851A-BBD5116C43EC}", "base": "{29187DB1-2573-5243-86EB-190B64E00C54}",
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MultiplyByMatrix", "name": "Multiply By Matrix",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Matrix3x3: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Matrix3x3: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Matrix3x3: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Matrix3x3: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Matrix3x3", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Matrix3x3" "name": "Result"
} }
} }
] ]
@@ -5,40 +5,39 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MultiplyByRotation", "name": "Multiply By Rotation",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Quaternion: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Quaternion: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Quaternion: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Quaternion: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Quaternion", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Quaternion" "name": "Result"
} }
} }
] ]
@@ -5,40 +5,39 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MultiplyByTransform", "name": "Multiply By Transform",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Transform: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Transform: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Transform: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Transform: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Transform", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Transform" "name": "Result"
} }
} }
] ]
@@ -5,40 +5,39 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "MultiplyByVector", "name": "Multiply By Vector",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots", "tooltip": "This node is deprecated, use Multiply (*), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Vector4: Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Vector4: Source" "name": "Source"
} }
}, },
{ {
"base": "DataInput_Vector4: Multiplier", "base": "DataInput_Multiplier_1",
"details": { "details": {
"name": "Vector4: Multiplier" "name": "Multiplier"
} }
}, },
{ {
"base": "DataOutput_Result: Vector4", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Vector4" "name": "Result"
} }
} }
] ]
@@ -7,32 +7,31 @@
"details": { "details": {
"name": "Negate", "name": "Negate",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "returns Source with every element multiplied by -1", "tooltip": "returns Source with every element multiplied by -1"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Color: Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Color: Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Result: Color", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Color" "name": "Result"
} }
} }
] ]
@@ -1,44 +1,43 @@
{ {
"entries": [ "entries": [
{ {
"base": "{C94009EE-73ED-5CA2-B1AC-026EB08D1EF5}", "base": "{36F01867-D157-5540-ADB8-3E71F96D2187}",
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "Subtract", "name": "Subtract",
"category": "Deprecated", "category": "Deprecated",
"tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots", "tooltip": "This node is deprecated, use Subtract (-), it provides contextual type and slots"
"subtitle": "Deprecated"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Vector3: A", "base": "DataInput_A_0",
"details": { "details": {
"name": "Vector3: A" "name": "A"
} }
}, },
{ {
"base": "DataInput_Vector3: B", "base": "DataInput_B_1",
"details": { "details": {
"name": "Vector3: B" "name": "B"
} }
}, },
{ {
"base": "DataOutput_Result: Vector3", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result: Vector3" "name": "Result"
} }
} }
] ]
@@ -5,7 +5,7 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "WrapperMock", "name": "Wrapper Mock",
"category": "Developer", "category": "Developer",
"tooltip": "Node for Mocking Wrapper Node visuals" "tooltip": "Node for Mocking Wrapper Node visuals"
} }
@@ -7,35 +7,35 @@
"details": { "details": {
"name": "Get Entity Forward", "name": "Get Entity Forward",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" "tooltip": "returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_EntityId", "base": "DataInput_EntityId_0",
"details": { "details": {
"name": "EntityId" "name": "EntityId"
} }
}, },
{ {
"base": "DataInput_Scale", "base": "DataInput_Scale_1",
"details": { "details": {
"name": "Scale" "name": "Scale"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -7,35 +7,35 @@
"details": { "details": {
"name": "Get Entity Right", "name": "Get Entity Right",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" "tooltip": "returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_EntityId", "base": "DataInput_EntityId_0",
"details": { "details": {
"name": "EntityId" "name": "EntityId"
} }
}, },
{ {
"base": "DataInput_Scale", "base": "DataInput_Scale_1",
"details": { "details": {
"name": "Scale" "name": "Scale"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -7,35 +7,35 @@
"details": { "details": {
"name": "Get Entity Up", "name": "Get Entity Up",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" "tooltip": "returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_EntityId", "base": "DataInput_EntityId_0",
"details": { "details": {
"name": "EntityId" "name": "EntityId"
} }
}, },
{ {
"base": "DataInput_Scale", "base": "DataInput_Scale_1",
"details": { "details": {
"name": "Scale" "name": "Scale"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -7,29 +7,29 @@
"details": { "details": {
"name": "Is Active", "name": "Is Active",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns true if entity with the provided Id is valid and active." "tooltip": "returns true if entity with the provided Id is valid and active."
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Entity Id", "base": "DataInput_Entity Id_0",
"details": { "details": {
"name": "Entity Id" "name": "Entity Id"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -7,29 +7,29 @@
"details": { "details": {
"name": "Is Valid", "name": "Is Valid",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns true if Source is valid, else false" "tooltip": "returns true if Source is valid, else false"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -7,29 +7,29 @@
"details": { "details": {
"name": "To String", "name": "To String",
"category": "Entity/Entity", "category": "Entity/Entity",
"tooltip": "Returns a string representation of Source" "tooltip": "returns a string representation of Source"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_Out", "base": "Output_Out_0",
"details": { "details": {
"name": "Out" "name": "Out"
} }
}, },
{ {
"base": "DataInput_Source", "base": "DataInput_Source_0",
"details": { "details": {
"name": "Source" "name": "Source"
} }
}, },
{ {
"base": "DataOutput_Result", "base": "DataOutput_Result_0",
"details": { "details": {
"name": "Result" "name": "Result"
} }
@@ -0,0 +1,70 @@
{
"entries": [
{
"base": "{FDD3D684-2C9A-0C05-D2A3-FD67685D8F26}",
"context": "ScriptCanvas::Node",
"variant": "",
"details": {
"name": "Branch Input Type Example",
"category": "Examples",
"tooltip": "Example of branch passing as input by value, pointer and reference."
},
"slots": [
{
"base": "Input_Get Internal Vector_0",
"details": {
"name": "Get Internal Vector"
}
},
{
"base": "Output_On Get Internal Vector_0",
"details": {
"name": "On Get Internal Vector"
}
},
{
"base": "DataOutput_Result_0",
"details": {
"name": "Result"
}
},
{
"base": "Input_Branches On Input Type_1",
"details": {
"name": "Branches On Input Type"
}
},
{
"base": "DataInput_Input Type_0",
"details": {
"name": "Input Type"
}
},
{
"base": "Output_By Value_1",
"details": {
"name": "By Value"
}
},
{
"base": "DataOutput_Value Input_1",
"details": {
"name": "Value Input"
}
},
{
"base": "Output_By Pointer_2",
"details": {
"name": "By Pointer"
}
},
{
"base": "DataOutput_Pointer Input_2",
"details": {
"name": "Pointer Input"
}
}
]
}
]
}
@@ -5,62 +5,61 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "InputTypeExample", "name": "Input Type Example",
"category": "Tests", "category": "Examples",
"tooltip": "Example of passing as input by value, pointer and reference.", "tooltip": "Example of passing as input by value, pointer and reference."
"subtitle": "Tests"
}, },
"slots": [ "slots": [
{ {
"base": "Input_Clear By Value", "base": "Input_Clear By Value_0",
"details": { "details": {
"name": "Clear By Value" "name": "Clear By Value"
} }
}, },
{ {
"base": "DataInput_Value Input", "base": "DataInput_Value Input_0",
"details": { "details": {
"name": "Value Input" "name": "Value Input"
} }
}, },
{ {
"base": "Output_On Clear By Value", "base": "Output_On Clear By Value_0",
"details": { "details": {
"name": "On Clear By Value" "name": "On Clear By Value"
} }
}, },
{ {
"base": "Input_Clear By Pointer", "base": "Input_Clear By Pointer_1",
"details": { "details": {
"name": "Clear By Pointer" "name": "Clear By Pointer"
} }
}, },
{ {
"base": "DataInput_Pointer Input", "base": "DataInput_Pointer Input_1",
"details": { "details": {
"name": "Pointer Input" "name": "Pointer Input"
} }
}, },
{ {
"base": "Output_On Clear By Pointer", "base": "Output_On Clear By Pointer_1",
"details": { "details": {
"name": "On Clear By Pointer" "name": "On Clear By Pointer"
} }
}, },
{ {
"base": "Input_Clear By Reference", "base": "Input_Clear By Reference_2",
"details": { "details": {
"name": "Clear By Reference" "name": "Clear By Reference"
} }
}, },
{ {
"base": "DataInput_Reference Input", "base": "DataInput_Reference Input_2",
"details": { "details": {
"name": "Reference Input" "name": "Reference Input"
} }
}, },
{ {
"base": "Output_On Clear By Reference", "base": "Output_On Clear By Reference_2",
"details": { "details": {
"name": "On Clear By Reference" "name": "On Clear By Reference"
} }
@@ -5,20 +5,19 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "PropertyExample", "name": "Property Example",
"category": "Tests", "category": "Examples",
"tooltip": "Example of using properties.", "tooltip": "Example of using properties."
"subtitle": "Tests"
}, },
"slots": [ "slots": [
{ {
"base": "Input_In", "base": "Input_In_0",
"details": { "details": {
"name": "In" "name": "In"
} }
}, },
{ {
"base": "Output_On In", "base": "Output_On In_0",
"details": { "details": {
"name": "On In" "name": "On In"
} }
@@ -5,62 +5,61 @@
"context": "ScriptCanvas::Node", "context": "ScriptCanvas::Node",
"variant": "", "variant": "",
"details": { "details": {
"name": "ReturnTypeExample", "name": "Return Type Example",
"category": "Tests", "category": "Examples",
"tooltip": "Example of returning by value, pointer and reference.", "tooltip": "Example of returning by value, pointer and reference."
"subtitle": "Tests"
}, },
"slots": [ "slots": [
{ {
"base": "Input_Return By Value", "base": "Input_Return By Value_0",
"details": { "details": {
"name": "Return By Value" "name": "Return By Value"
} }
}, },
{ {
"base": "Output_On Return By Value", "base": "Output_On Return By Value_0",
"details": { "details": {
"name": "On Return By Value" "name": "On Return By Value"
} }
}, },
{ {
"base": "DataOutput_Value", "base": "DataOutput_Value_0",
"details": { "details": {
"name": "Value" "name": "Value"
} }
}, },
{ {
"base": "Input_Return By Pointer", "base": "Input_Return By Pointer_1",
"details": { "details": {
"name": "Return By Pointer" "name": "Return By Pointer"
} }
}, },
{ {
"base": "Output_On Return By Pointer", "base": "Output_On Return By Pointer_1",
"details": { "details": {
"name": "On Return By Pointer" "name": "On Return By Pointer"
} }
}, },
{ {
"base": "DataOutput_Pointer", "base": "DataOutput_Pointer_1",
"details": { "details": {
"name": "Pointer" "name": "Pointer"
} }
}, },
{ {
"base": "Input_Return By Reference", "base": "Input_Return By Reference_2",
"details": { "details": {
"name": "Return By Reference" "name": "Return By Reference"
} }
}, },
{ {
"base": "Output_On Return By Reference", "base": "Output_On Return By Reference_2",
"details": { "details": {
"name": "On Return By Reference" "name": "On Return By Reference"
} }
}, },
{ {
"base": "DataOutput_Reference", "base": "DataOutput_Reference_2",
"details": { "details": {
"name": "Reference" "name": "Reference"
} }

Some files were not shown because too many files have changed in this diff Show More