Merge branch 'development' into redcode/crythread-2nd-pass
Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 4.0 KiB |
@@ -13,9 +13,9 @@ import os
|
||||
import sys
|
||||
import time
|
||||
import azlmbr.atom
|
||||
import azlmbr.atomtools as atomtools
|
||||
import azlmbr.materialeditor as materialeditor
|
||||
import azlmbr.bus as bus
|
||||
import azlmbr.atomtools.general as general
|
||||
|
||||
|
||||
def is_close(actual, expected, buffer=sys.float_info.min):
|
||||
@@ -125,11 +125,11 @@ def is_pane_visible(pane_name):
|
||||
"""
|
||||
:return: bool
|
||||
"""
|
||||
return materialeditor.MaterialEditorWindowRequestBus(bus.Broadcast, "IsDockWidgetVisible", pane_name)
|
||||
return atomtools.AtomToolsWindowRequestBus(bus.Broadcast, "IsDockWidgetVisible", pane_name)
|
||||
|
||||
|
||||
def set_pane_visibility(pane_name, value):
|
||||
materialeditor.MaterialEditorWindowRequestBus(bus.Broadcast, "SetDockWidgetVisible", pane_name, value)
|
||||
atomtools.AtomToolsWindowRequestBus(bus.Broadcast, "SetDockWidgetVisible", pane_name, value)
|
||||
|
||||
|
||||
def select_lighting_config(config_name):
|
||||
@@ -175,7 +175,7 @@ def wait_for_condition(function, timeout_in_seconds=1.0):
|
||||
with Timeout(timeout_in_seconds) as t:
|
||||
while True:
|
||||
try:
|
||||
general.idle_wait_frames(1)
|
||||
atomtools.general.idle_wait_frames(1)
|
||||
except Exception:
|
||||
print("WARNING: Couldn't wait for frame")
|
||||
|
||||
@@ -269,6 +269,6 @@ class ScreenshotHelper:
|
||||
|
||||
|
||||
def capture_screenshot(file_path):
|
||||
return ScreenshotHelper(azlmbr.atomtools.general.idle_wait_frames).capture_screenshot_blocking(
|
||||
return ScreenshotHelper(atomtools.general.idle_wait_frames).capture_screenshot_blocking(
|
||||
os.path.join(file_path)
|
||||
)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba9a2cd047a5ee696aaeed882869017a02fd4f5eeee91b6b2bfb830ad1e5ee15
|
||||
size 10927631
|
||||
oid sha256:c285cdf72ebe4c274f8d1fbab6ff558f9344d4fa62fb9d07cf11f7511ffaaac9
|
||||
size 2177072
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
{
|
||||
"values": [
|
||||
{
|
||||
"$type": "ActorGroup",
|
||||
"name": "Jack",
|
||||
"selectedRootBone": "RootNode.jack_root",
|
||||
"id": "{B7194F91-D8A1-5D5D-AC6D-DDEBC087D80D}",
|
||||
"rules": {
|
||||
"rules": [
|
||||
{
|
||||
"$type": "MetaDataRule",
|
||||
"metaData": "AdjustActor -actorID $(ACTORID) -name \"Jack\"\nActorSetCollisionMeshes -actorID $(ACTORID) -lod 0 -nodeList \"\"\nAdjustActor -actorID $(ACTORID) -nodesExcludedFromBounds \"\" -nodeAction \"select\"\nAdjustActor -actorID $(ACTORID) -nodeAction \"replace\" -attachmentNodes \"\"\nAdjustActor -actorID $(ACTORID) -motionExtractionNodeName \"jack_root\"\nAdjustActor -actorID $(ACTORID) -mirrorSetup \"\"\n"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup",
|
||||
"id": "{BF2CCF49-9BE0-5103-987A-84649A974991}",
|
||||
"name": "Jack",
|
||||
"NodeSelectionList": {
|
||||
"unselectedNodes": [
|
||||
"RootNode",
|
||||
"RootNode.jack_root",
|
||||
"RootNode.jack_meshZUp",
|
||||
"RootNode.jack_root.Bip01__pelvis",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2",
|
||||
"RootNode.jack_root.Bip01__pelvis.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.Bitangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.SkinWeight_",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.transform",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.Tangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.map1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.jack",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.Bitangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.SkinWeight_",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.transform",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.Tangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.map1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.jack",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3.transform"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
|
||||
"name": "Jack",
|
||||
"nodeSelectionList": {
|
||||
"selectedNodes": [
|
||||
"RootNode",
|
||||
"RootNode.jack_root",
|
||||
"RootNode.jack_meshZUp",
|
||||
"RootNode.jack_root.Bip01__pelvis",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2",
|
||||
"RootNode.jack_root.Bip01__pelvis.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.Bitangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.SkinWeight_",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.transform",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.Tangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.map1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_1.jack",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.Bitangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.SkinWeight_",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.transform",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.Tangent",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.map1",
|
||||
"RootNode.jack_meshZUp.jack_meshZUp_2.jack",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr",
|
||||
"RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3.transform",
|
||||
"RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3.transform"
|
||||
]
|
||||
},
|
||||
"rules": {
|
||||
"rules": [
|
||||
{
|
||||
"$type": "SkinRule"
|
||||
},
|
||||
{
|
||||
"$type": "MaterialRule"
|
||||
}
|
||||
]
|
||||
},
|
||||
"id": "{59B1DB76-5B27-5569-8DF6-55296FD0E5D8}"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
<Material MtlFlags="524544" DccMaterialHash="0" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="Jack:jack" MtlFlags="524416" DccMaterialHash="0" Shader="Illum" GenMask="A00080000003" StringGenMask="%ALLOW_SILHOUETTE_POM%ALLOW_SPECULAR_ANTIALIASING%FX_DISSOLVE%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="" Diffuse="0.80000001,0.80000001,0.80000001,1" Specular="0.5,0.5,0.5,1" Opacity="1" Shininess="3.4240739" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/jack_diff.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/jack_spec.dds"/>
|
||||
</Textures>
|
||||
<PublicParams DissolveColor="1,1,1" EmittanceMapGamma="1" DissolveEdgeThickness="0" SSSIndex="0" DissolvePercentage="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bb1c97394454a0a0c3b4aaf8380878aac3f7bedc9091ec920963932ad6ad2290
|
||||
size 30484
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d090219fc20e7c1d9f0c187f976a7cb55e5b27b39e087aa8281ac794f314cb32
|
||||
size 22364
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8fa78264ca46a2f201e24c3ba6a543e713bf9fd984df0a10f52b191d21077227
|
||||
size 106676
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ebf610eecec9a4da2d5c9260c48b81f6a04eaf7686d69850ad9f5d06fdbcf183
|
||||
size 12940
|
||||
@@ -1,14 +0,0 @@
|
||||
<Material MtlFlags="524544" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="jack" MtlFlags="524416" Shader="Illum" GenMask="4001010020001" StringGenMask="%ALLOW_SILHOUETTE_POM%EMITTANCE_MAP%NORMAL_MAP%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="mat_metal" Diffuse="1,1,1,1" Specular="1,1,1,1" Emittance="1,1,1,200" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/brokenrobot_black_diff.dds"/>
|
||||
<Texture Map="Bumpmap" File="objects/characters/jack/textures/brokenrobot_01_ddna.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/brokenrobot_spec.dds"/>
|
||||
<Texture Map="Emittance" File="objects/characters/jack/textures/jack_emis.dds"/>
|
||||
</Textures>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30afe8cf6e4aca846b07ef81747607afb47c0ff88283f363aca29ded9818c3db
|
||||
size 8148
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dba25dd8b3840d01aefb69007919b07befc5365fff714493c87cf1eff644d5dc
|
||||
size 8148
|
||||
@@ -1,8 +0,0 @@
|
||||
<Material MtlFlags="524544" >
|
||||
<SubMaterials>
|
||||
<Material Name="dummyPlane_mat" MtlFlags="1152" Shader="Nodraw" GenMask="0" SurfaceType="" MatTemplate="" Diffuse="0.500000,0.500000,0.500000" Specular="0.000000,0.000000,0.000000" Emissive="0.000000,0.000000,0.000000" Shininess="10" Opacity="1" >
|
||||
<Textures>
|
||||
</Textures>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
</Material>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Material MtlFlags="524544" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="jack" MtlFlags="524416" Shader="Illum" GenMask="4001010020001" StringGenMask="%ALLOW_SILHOUETTE_POM%EMITTANCE_MAP%NORMAL_MAP%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="mat_player_collider" Diffuse="1,1,1,1" Specular="1,1,1,1" Emittance="0.99110222,0.0056053922,0.0056053922,200" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/brokenrobot_white_diff.dds"/>
|
||||
<Texture Map="Bumpmap" File="objects/characters/jack/textures/brokenrobot_01_ddna.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/brokenrobot_spec.dds"/>
|
||||
<Texture Map="Emittance" File="objects/characters/jack/textures/brokenrobot_emis.dds"/>
|
||||
</Textures>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Material MtlFlags="524544" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="jack" MtlFlags="524416" Shader="Illum" GenMask="4001010020001" StringGenMask="%ALLOW_SILHOUETTE_POM%EMITTANCE_MAP%NORMAL_MAP%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="mat_player_collider" Diffuse="1,1,1,1" Specular="1,1,1,1" Emittance="0.00091058103,0.70837593,0.76815128,160" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/brokenrobot_white_diff.dds"/>
|
||||
<Texture Map="Bumpmap" File="objects/characters/jack/textures/brokenrobot_01_ddna.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/brokenrobot_spec.dds"/>
|
||||
<Texture Map="Emittance" File="objects/characters/jack/textures/jack_emis.dds"/>
|
||||
</Textures>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Material MtlFlags="524544" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="jack" MtlFlags="524416" Shader="Illum" GenMask="4001010020001" StringGenMask="%ALLOW_SILHOUETTE_POM%EMITTANCE_MAP%NORMAL_MAP%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="mat_player_collider" Diffuse="1,1,1,1" Specular="1,1,1,1" Emittance="0.98225069,0.00030352699,0.00030352699,200" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/brokenrobot_black_diff.dds"/>
|
||||
<Texture Map="Bumpmap" File="objects/characters/jack/textures/brokenrobot_01_ddna.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/brokenrobot_spec.dds"/>
|
||||
<Texture Map="Emittance" File="objects/characters/jack/textures/brokenrobot_emis.dds"/>
|
||||
</Textures>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,14 +0,0 @@
|
||||
<Material MtlFlags="524544" vertModifType="0">
|
||||
<SubMaterials>
|
||||
<Material Name="jack" MtlFlags="524416" Shader="Illum" GenMask="4001010020001" StringGenMask="%ALLOW_SILHOUETTE_POM%EMITTANCE_MAP%NORMAL_MAP%SPECULAR_MAP%SUBSURFACE_SCATTERING" SurfaceType="mat_player_collider" Diffuse="1,1,1,1" Specular="1,1,1,1" Emittance="0.00091058103,0.70837593,0.76815128,160" Opacity="1" Shininess="255" vertModifType="0" LayerAct="1">
|
||||
<Textures>
|
||||
<Texture Map="Diffuse" File="objects/characters/jack/textures/jack_diff.dds"/>
|
||||
<Texture Map="Bumpmap" File="objects/characters/jack/textures/jack_ddna.dds"/>
|
||||
<Texture Map="Specular" File="objects/characters/jack/textures/jack_spec_02_spec.dds"/>
|
||||
<Texture Map="Emittance" File="objects/characters/jack/textures/jack_emis.dds"/>
|
||||
</Textures>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
</SubMaterials>
|
||||
<PublicParams EmittanceMapGamma="1" SSSIndex="0" IndirectColor="0.25,0.25,0.25"/>
|
||||
</Material>
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ca5c900fabf8b5c8c9313a0144886f4da3f812c82e8cffd652d9c61b9bb5b953
|
||||
size 4221960
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80f40a78e4b21dd27f5ddf34337e7d0e2119b7cfa08f0eea38d4b1d63808821f
|
||||
size 3178996
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e5f5e327624e0f1fd35fac141019941b12ad0642c25853be9f7fd5b9b6f91bc5
|
||||
size 3168212
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:089e74ca9a41967038e16a9107099a73f8e93d39c487ff5bacdde18f418bf761
|
||||
size 3176732
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d45cd564d2b52575d1ad37b907a7d378871f05f6c9e5569ec73d7973d56599c9
|
||||
size 3167984
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:83a872c07f7cbbcb868903429dd8d5a71e8c0b7b0e2cb16cb08b5cb26b02251c
|
||||
size 3177492
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:81c1bc9545a17232523fd97561013534221b3bf8927feefa52bdc757e294c2e2
|
||||
size 3179140
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:99f476a56205c80878be7472857a6430ce6dc40f2eb1558de4933a5b79fa2420
|
||||
size 814244
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Reflectance /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:366959c8a31356669d47f58d07157171ed369b3e7549b3b65a8b8d153a1477a6
|
||||
size 3179956
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e839924e03ba99459547df1cf5334de3bdad75b18e76176e430e343a979d9f05
|
||||
size 3168472
|
||||
-1
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:36f537bb5be89fccba1502e9e8f8dfffbf05ea8aa82ac439305e8c2502b01691
|
||||
size 16804800
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b0457cbbbe1fe7e52fdb9af7ee2bc32df96a453fe248738b35ffe0b8087a28c5
|
||||
size 12615988
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /M=50,50,50,0,50,50 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4ba741103d039bddf72d4834c92a5e069285e31b8be2e7f4e8103f9c5c81694f
|
||||
size 3167864
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4d7cb58f48e4df76214509fc01d5170fd38bc447d56af61f008c04a1653c2d20
|
||||
size 12614884
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /M=50,50,50,0,50,50 /preset=Reflectance /reduce=0
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:80a2c56bfcb8c98bf5a72ec9fdb5fcc6eae28ba1c3c26efad5c8a36e6105f1d0
|
||||
size 3173936
|
||||
@@ -1 +0,0 @@
|
||||
/autooptimizefile=0 /preset=Reflectance /reduce=0
|
||||
@@ -68,45 +68,21 @@ QIcon& CEditorPreferencesPage_ViewportMovement::GetIcon()
|
||||
|
||||
void CEditorPreferencesPage_ViewportMovement::OnApply()
|
||||
{
|
||||
if (SandboxEditor::UsingNewCameraSystem())
|
||||
{
|
||||
SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_moveSpeed);
|
||||
SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed);
|
||||
SandboxEditor::SetCameraBoostMultiplier(m_cameraMovementSettings.m_fastMoveSpeed);
|
||||
SandboxEditor::SetCameraScrollSpeed(m_cameraMovementSettings.m_wheelZoomSpeed);
|
||||
SandboxEditor::SetCameraOrbitYawRotationInverted(m_cameraMovementSettings.m_invertYRotation);
|
||||
SandboxEditor::SetCameraPanInvertedX(m_cameraMovementSettings.m_invertPan);
|
||||
SandboxEditor::SetCameraPanInvertedY(m_cameraMovementSettings.m_invertPan);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSettings.cameraMoveSpeed = m_cameraMovementSettings.m_moveSpeed;
|
||||
gSettings.cameraRotateSpeed = m_cameraMovementSettings.m_rotateSpeed;
|
||||
gSettings.cameraFastMoveSpeed = m_cameraMovementSettings.m_fastMoveSpeed;
|
||||
gSettings.wheelZoomSpeed = m_cameraMovementSettings.m_wheelZoomSpeed;
|
||||
gSettings.invertYRotation = m_cameraMovementSettings.m_invertYRotation;
|
||||
gSettings.invertPan = m_cameraMovementSettings.m_invertPan;
|
||||
}
|
||||
SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_moveSpeed);
|
||||
SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed);
|
||||
SandboxEditor::SetCameraBoostMultiplier(m_cameraMovementSettings.m_fastMoveSpeed);
|
||||
SandboxEditor::SetCameraScrollSpeed(m_cameraMovementSettings.m_wheelZoomSpeed);
|
||||
SandboxEditor::SetCameraOrbitYawRotationInverted(m_cameraMovementSettings.m_invertYRotation);
|
||||
SandboxEditor::SetCameraPanInvertedX(m_cameraMovementSettings.m_invertPan);
|
||||
SandboxEditor::SetCameraPanInvertedY(m_cameraMovementSettings.m_invertPan);
|
||||
}
|
||||
|
||||
void CEditorPreferencesPage_ViewportMovement::InitializeSettings()
|
||||
{
|
||||
if (SandboxEditor::UsingNewCameraSystem())
|
||||
{
|
||||
m_cameraMovementSettings.m_moveSpeed = SandboxEditor::CameraTranslateSpeed();
|
||||
m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed();
|
||||
m_cameraMovementSettings.m_fastMoveSpeed = SandboxEditor::CameraBoostMultiplier();
|
||||
m_cameraMovementSettings.m_wheelZoomSpeed = SandboxEditor::CameraScrollSpeed();
|
||||
m_cameraMovementSettings.m_invertYRotation = SandboxEditor::CameraOrbitYawRotationInverted();
|
||||
m_cameraMovementSettings.m_invertPan = SandboxEditor::CameraPanInvertedX() && SandboxEditor::CameraPanInvertedY();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_cameraMovementSettings.m_moveSpeed = gSettings.cameraMoveSpeed;
|
||||
m_cameraMovementSettings.m_rotateSpeed = gSettings.cameraRotateSpeed;
|
||||
m_cameraMovementSettings.m_fastMoveSpeed = gSettings.cameraFastMoveSpeed;
|
||||
m_cameraMovementSettings.m_wheelZoomSpeed = gSettings.wheelZoomSpeed;
|
||||
m_cameraMovementSettings.m_invertYRotation = gSettings.invertYRotation;
|
||||
m_cameraMovementSettings.m_invertPan = gSettings.invertPan;
|
||||
}
|
||||
m_cameraMovementSettings.m_moveSpeed = SandboxEditor::CameraTranslateSpeed();
|
||||
m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed();
|
||||
m_cameraMovementSettings.m_fastMoveSpeed = SandboxEditor::CameraBoostMultiplier();
|
||||
m_cameraMovementSettings.m_wheelZoomSpeed = SandboxEditor::CameraScrollSpeed();
|
||||
m_cameraMovementSettings.m_invertYRotation = SandboxEditor::CameraOrbitYawRotationInverted();
|
||||
m_cameraMovementSettings.m_invertPan = SandboxEditor::CameraPanInvertedX() && SandboxEditor::CameraPanInvertedY();
|
||||
}
|
||||
|
||||
@@ -118,8 +118,4 @@ namespace SandboxEditor
|
||||
|
||||
SANDBOX_API AzFramework::InputChannelId CameraOrbitPanChannelId();
|
||||
SANDBOX_API void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId);
|
||||
|
||||
//! Return if the new editor camera system is enabled or not.
|
||||
//! @note This is implemented in EditorViewportWidget.cpp
|
||||
SANDBOX_API bool UsingNewCameraSystem();
|
||||
} // namespace SandboxEditor
|
||||
|
||||
@@ -72,7 +72,6 @@
|
||||
#include "IPostEffectGroup.h"
|
||||
#include "EditorPreferencesPageGeneral.h"
|
||||
#include "ViewportManipulatorController.h"
|
||||
#include "LegacyViewportCameraController.h"
|
||||
#include "EditorViewportSettings.h"
|
||||
|
||||
#include "ViewPane.h"
|
||||
@@ -105,17 +104,8 @@
|
||||
|
||||
AZ_CVAR(
|
||||
bool, ed_visibility_logTiming, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Output the timing of the new IVisibilitySystem query");
|
||||
AZ_CVAR(bool, ed_useNewCameraSystem, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Editor camera system");
|
||||
AZ_CVAR(bool, ed_showCursorCameraLook, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Show the cursor when using free look with the new camera system");
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
bool UsingNewCameraSystem()
|
||||
{
|
||||
return ed_useNewCameraSystem;
|
||||
}
|
||||
} // namespace SandboxEditor
|
||||
|
||||
EditorViewportWidget* EditorViewportWidget::m_pPrimaryViewport = nullptr;
|
||||
|
||||
#if AZ_TRAIT_OS_PLATFORM_APPLE
|
||||
@@ -640,7 +630,7 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
|
||||
if (m_renderViewport)
|
||||
{
|
||||
m_renderViewport->GetControllerList()->SetEnabled(true);
|
||||
m_renderViewport->SetInputProcessingEnabled(true);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1274,15 +1264,8 @@ void EditorViewportWidget::SetViewportId(int id)
|
||||
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::ViewportManipulatorController>());
|
||||
|
||||
if (ed_useNewCameraSystem)
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_renderViewport->GetControllerList()->Add(AZStd::make_shared<SandboxEditor::LegacyViewportCameraController>());
|
||||
}
|
||||
|
||||
m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
|
||||
|
||||
m_renderViewport->SetViewportSettings(&g_EditorViewportSettings);
|
||||
|
||||
UpdateScene();
|
||||
@@ -2239,7 +2222,6 @@ void EditorViewportWidget::CenterOnAABB(const AABB& aabb)
|
||||
orbitDistance = fabs(orbitDistance);
|
||||
|
||||
SetViewTM(newTM);
|
||||
SandboxEditor::OrbitCameraControlsBus::Event(GetViewportId(), &SandboxEditor::OrbitCameraControlsBus::Events::SetOrbitDistance, orbitDistance);
|
||||
}
|
||||
|
||||
void EditorViewportWidget::CenterOnSliceInstance()
|
||||
|
||||
@@ -108,24 +108,12 @@ void GotoPositionDialog::OnUpdateNumbers()
|
||||
|
||||
void GotoPositionDialog::accept()
|
||||
{
|
||||
if (SandboxEditor::UsingNewCameraSystem())
|
||||
{
|
||||
SandboxEditor::InterpolateDefaultViewportCameraToTransform(
|
||||
AZ::Vector3(
|
||||
aznumeric_cast<float>(m_ui->m_dymX->value()), aznumeric_cast<float>(m_ui->m_dymY->value()),
|
||||
aznumeric_cast<float>(m_ui->m_dymZ->value())),
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAnglePitch->value())),
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAngleYaw->value())));
|
||||
}
|
||||
else
|
||||
{
|
||||
SandboxEditor::SetDefaultViewportCameraPosition(AZ::Vector3(
|
||||
SandboxEditor::InterpolateDefaultViewportCameraToTransform(
|
||||
AZ::Vector3(
|
||||
aznumeric_cast<float>(m_ui->m_dymX->value()), aznumeric_cast<float>(m_ui->m_dymY->value()),
|
||||
aznumeric_cast<float>(m_ui->m_dymZ->value())));
|
||||
SandboxEditor::SetDefaultViewportCameraRotation(
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAnglePitch->value())),
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAngleYaw->value())));
|
||||
}
|
||||
aznumeric_cast<float>(m_ui->m_dymZ->value())),
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAnglePitch->value())),
|
||||
AZ::DegToRad(aznumeric_cast<float>(m_ui->m_dymAngleYaw->value())));
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
@@ -1,537 +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
|
||||
*
|
||||
*/
|
||||
|
||||
#include "LegacyViewportCameraController.h"
|
||||
|
||||
#include <AzFramework/Input/Devices/Mouse/InputDeviceMouse.h>
|
||||
#include <AzFramework/Input/Devices/Keyboard/InputDeviceKeyboard.h>
|
||||
#include <AzFramework/Viewport/ScreenGeometry.h>
|
||||
#include <AzToolsFramework/Viewport/ViewportMessages.h>
|
||||
#include <Atom/RPI.Public/ViewportContextBus.h>
|
||||
#include <Atom/RPI.Public/ViewportContext.h>
|
||||
|
||||
#include <IViewSystem.h>
|
||||
#include <ISystem.h>
|
||||
#include "CryCommon/MathConversion.h"
|
||||
#include "SandboxAPI.h"
|
||||
#include "Settings.h"
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
|
||||
LegacyViewportCameraControllerInstance::LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewportId, LegacyViewportCameraController* controller)
|
||||
: AzFramework::MultiViewportControllerInstanceInterface<LegacyViewportCameraController>(viewportId, controller)
|
||||
{
|
||||
OrbitCameraControlsBus::Handler::BusConnect(viewportId);
|
||||
}
|
||||
|
||||
LegacyViewportCameraControllerInstance::~LegacyViewportCameraControllerInstance()
|
||||
{
|
||||
OrbitCameraControlsBus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::JustAltHeld() const
|
||||
{
|
||||
return (m_modifiers ^ Qt::AltModifier) == 0;
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::NoModifierHeld() const
|
||||
{
|
||||
return !m_modifiers;
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::AllowDolly() const
|
||||
{
|
||||
return JustAltHeld();
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::AllowOrbit() const
|
||||
{
|
||||
return JustAltHeld();
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::AllowPan() const
|
||||
{
|
||||
// begin pan with alt (inverted movement) or no modifiers
|
||||
return JustAltHeld() || NoModifierHeld();
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::InvertPan() const
|
||||
{
|
||||
return JustAltHeld();
|
||||
}
|
||||
|
||||
void LegacyViewportCameraControllerInstance::SetOrbitDistance(float orbitDistance)
|
||||
{
|
||||
m_orbitDistance = orbitDistance;
|
||||
}
|
||||
|
||||
|
||||
AZ::RPI::ViewportContextPtr LegacyViewportCameraControllerInstance::GetViewportContext()
|
||||
{
|
||||
// This could be cached, if needed
|
||||
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
if (!viewportContextManager)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
return viewportContextManager->GetViewportContextById(GetViewportId());
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseMove(
|
||||
int dx, int dy)
|
||||
{
|
||||
if (dx == 0 && dy == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
auto viewportContext = GetViewportContext();
|
||||
if (!viewportContext)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
float speedScale = gSettings.cameraMoveSpeed;
|
||||
|
||||
if (m_modifiers & Qt::Key_Control)
|
||||
{
|
||||
speedScale *= gSettings.cameraFastMoveSpeed;
|
||||
}
|
||||
|
||||
if (m_inMoveMode || m_inOrbitMode || m_inRotateMode || m_inZoomMode)
|
||||
{
|
||||
m_totalMouseMoveDelta += AZStd::abs(dx) + AZStd::abs(dy);
|
||||
}
|
||||
|
||||
if ((m_inRotateMode && m_inMoveMode) || m_inZoomMode)
|
||||
{
|
||||
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
|
||||
Vec3 ydir = m.GetColumn1().GetNormalized();
|
||||
Vec3 pos = m.GetTranslation();
|
||||
|
||||
const float posDelta = 0.2f * dy * speedScale;
|
||||
pos = pos - ydir * posDelta;
|
||||
m_orbitDistance = m_orbitDistance + posDelta;
|
||||
m_orbitDistance = fabs(m_orbitDistance);
|
||||
|
||||
m.SetTranslation(pos);
|
||||
viewportContext->SetCameraTransform(LYTransformToAZTransform(m));
|
||||
return true;
|
||||
}
|
||||
else if (m_inRotateMode)
|
||||
{
|
||||
Ang3 angles(dy, 0, dx);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
if (gSettings.invertYRotation)
|
||||
{
|
||||
angles.x = -angles.x;
|
||||
}
|
||||
Matrix34 camtm = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
Ang3 ypr = CCamera::CreateAnglesYPR(Matrix33(camtm));
|
||||
ypr.x += angles.z;
|
||||
ypr.y += angles.x;
|
||||
|
||||
ypr.y = AZStd::clamp(ypr.y, -1.5f, 1.5f); // to keep rotation in reasonable range
|
||||
ypr.z = 0; // to have camera always upward
|
||||
|
||||
camtm = Matrix34(CCamera::CreateOrientationYPR(ypr), camtm.GetTranslation());
|
||||
viewportContext->SetCameraTransform(LYTransformToAZTransform(camtm));
|
||||
return true;
|
||||
}
|
||||
else if (m_inMoveMode)
|
||||
{
|
||||
// Slide.
|
||||
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
Vec3 xdir = m.GetColumn0().GetNormalized();
|
||||
Vec3 zdir = m.GetColumn2().GetNormalized();
|
||||
|
||||
if (InvertPan())
|
||||
{
|
||||
xdir = -xdir;
|
||||
zdir = -zdir;
|
||||
}
|
||||
|
||||
Vec3 pos = m.GetTranslation();
|
||||
pos += 0.1f * xdir * dx * speedScale + 0.1f * zdir * dy * speedScale;
|
||||
m.SetTranslation(pos);
|
||||
|
||||
AZ::Transform transform = viewportContext->GetCameraTransform();
|
||||
transform.SetTranslation(LYVec3ToAZVec3(pos));
|
||||
viewportContext->SetCameraTransform(transform);
|
||||
return true;
|
||||
}
|
||||
else if (m_inOrbitMode)
|
||||
{
|
||||
Ang3 angles(dy, 0, dx);
|
||||
angles = angles * 0.002f * gSettings.cameraRotateSpeed;
|
||||
|
||||
if (gSettings.invertPan)
|
||||
{
|
||||
angles.z = -angles.z;
|
||||
}
|
||||
|
||||
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
Ang3 ypr = CCamera::CreateAnglesYPR(Matrix33(m));
|
||||
ypr.x += angles.z;
|
||||
ypr.y = AZStd::clamp(ypr.y, -1.5f, 1.5f); // to keep rotation in reasonable range
|
||||
ypr.y += angles.x;
|
||||
|
||||
Matrix33 rotateTM = CCamera::CreateOrientationYPR(ypr);
|
||||
|
||||
Vec3 src = m.GetTranslation();
|
||||
Vec3 trg(m_orbitTarget.GetX(), m_orbitTarget.GetY(), m_orbitTarget.GetZ());
|
||||
float fCameraRadius = (trg - src).GetLength();
|
||||
|
||||
// Calc new source.
|
||||
src = trg - rotateTM * Vec3(0, 1, 0) * fCameraRadius;
|
||||
Matrix34 camTM = rotateTM;
|
||||
camTM.SetTranslation(src);
|
||||
|
||||
viewportContext->SetCameraTransform(LYTransformToAZTransform(camTM));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::HandleMouseWheel(float zDelta)
|
||||
{
|
||||
auto viewportContext = GetViewportContext();
|
||||
if (!viewportContext)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Matrix34 m = AZTransformToLYTransform(viewportContext->GetCameraTransform());
|
||||
const Vec3 ydir = m.GetColumn1().GetNormalized();
|
||||
|
||||
Vec3 pos = m.GetTranslation();
|
||||
|
||||
const float posDelta = 0.01f * zDelta * gSettings.wheelZoomSpeed;
|
||||
pos += ydir * posDelta;
|
||||
m_orbitDistance = m_orbitDistance - posDelta;
|
||||
m_orbitDistance = fabs(m_orbitDistance);
|
||||
|
||||
m.SetTranslation(pos);
|
||||
viewportContext->SetCameraTransform(LYTransformToAZTransform(m));
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::IsKeyDown(Qt::Key key) const
|
||||
{
|
||||
return m_pressedKeys.contains(key);
|
||||
}
|
||||
|
||||
Qt::Key LegacyViewportCameraControllerInstance::GetKeyboardKey(const AzFramework::InputChannel& inputChannel)
|
||||
{
|
||||
using Key = AzFramework::InputDeviceKeyboard::Key;
|
||||
const auto& id = inputChannel.GetInputChannelId();
|
||||
if (id == Key::AlphanumericW)
|
||||
{
|
||||
return Qt::Key_W;
|
||||
}
|
||||
else if (id == Key::AlphanumericA)
|
||||
{
|
||||
return Qt::Key_A;
|
||||
}
|
||||
else if (id == Key::AlphanumericS)
|
||||
{
|
||||
return Qt::Key_S;
|
||||
}
|
||||
else if (id == Key::AlphanumericD)
|
||||
{
|
||||
return Qt::Key_D;
|
||||
}
|
||||
else if (id == Key::AlphanumericQ)
|
||||
{
|
||||
return Qt::Key_Q;
|
||||
}
|
||||
else if (id == Key::AlphanumericE)
|
||||
{
|
||||
return Qt::Key_E;
|
||||
}
|
||||
else if (id == Key::NavigationArrowUp)
|
||||
{
|
||||
return Qt::Key_Up;
|
||||
}
|
||||
else if (id == Key::NavigationArrowUp)
|
||||
{
|
||||
return Qt::Key_Down;
|
||||
}
|
||||
else if (id == Key::NavigationArrowUp)
|
||||
{
|
||||
return Qt::Key_Left;
|
||||
}
|
||||
else if (id == Key::NavigationArrowUp)
|
||||
{
|
||||
return Qt::Key_Right;
|
||||
}
|
||||
return Qt::Key_unknown;
|
||||
}
|
||||
|
||||
Qt::KeyboardModifier LegacyViewportCameraControllerInstance::GetKeyboardModifier(const AzFramework::InputChannel& inputChannel)
|
||||
{
|
||||
using Key = AzFramework::InputDeviceKeyboard::Key;
|
||||
const auto& id = inputChannel.GetInputChannelId();
|
||||
if (id == Key::ModifierAltL || id == Key::ModifierAltR)
|
||||
{
|
||||
return Qt::KeyboardModifier::AltModifier;
|
||||
}
|
||||
if (id == Key::ModifierCtrlL || id == Key::ModifierCtrlR)
|
||||
{
|
||||
return Qt::KeyboardModifier::ControlModifier;
|
||||
}
|
||||
if (id == Key::ModifierShiftL || id == Key::ModifierShiftR)
|
||||
{
|
||||
return Qt::KeyboardModifier::ShiftModifier;
|
||||
}
|
||||
return Qt::KeyboardModifier::NoModifier;
|
||||
}
|
||||
|
||||
bool LegacyViewportCameraControllerInstance::HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event)
|
||||
{
|
||||
using AzFramework::InputChannel;
|
||||
using MouseButton = AzFramework::InputDeviceMouse::Button;
|
||||
const auto& id = event.m_inputChannel.GetInputChannelId();
|
||||
const auto& state = event.m_inputChannel.GetState();
|
||||
bool shouldCaptureCursor = m_capturingCursor;
|
||||
bool shouldConsumeEvent = false;
|
||||
|
||||
if (id == AzFramework::InputDeviceMouse::Movement::X || id == AzFramework::InputDeviceMouse::Movement::Y)
|
||||
{
|
||||
int dx = 0;
|
||||
int dy = 0;
|
||||
if (id == AzFramework::InputDeviceMouse::Movement::X)
|
||||
{
|
||||
dx = -aznumeric_cast<int>(event.m_inputChannel.GetValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
dy = -aznumeric_cast<int>(event.m_inputChannel.GetValue());
|
||||
}
|
||||
return HandleMouseMove(dx, dy);
|
||||
}
|
||||
else if (id == MouseButton::Left)
|
||||
{
|
||||
if (state == InputChannel::State::Began)
|
||||
{
|
||||
if (AllowOrbit())
|
||||
{
|
||||
AzFramework::CameraState cameraState;
|
||||
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::EventResult(
|
||||
cameraState, event.m_viewportId,
|
||||
&AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Events::GetCameraState);
|
||||
|
||||
m_inOrbitMode = true;
|
||||
m_orbitTarget = cameraState.m_position + cameraState.m_forward * m_orbitDistance;
|
||||
|
||||
shouldConsumeEvent = true;
|
||||
shouldCaptureCursor = true;
|
||||
}
|
||||
}
|
||||
else if (state == InputChannel::State::Ended)
|
||||
{
|
||||
m_inOrbitMode = false;
|
||||
shouldCaptureCursor = false;
|
||||
}
|
||||
}
|
||||
else if (id == MouseButton::Right)
|
||||
{
|
||||
if (state == InputChannel::State::Began)
|
||||
{
|
||||
if (AllowDolly())
|
||||
{
|
||||
m_inZoomMode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_inRotateMode = true;
|
||||
}
|
||||
|
||||
shouldCaptureCursor = true;
|
||||
// Record how much the cursor has been moved to see if we should own the mouse up event.
|
||||
m_totalMouseMoveDelta = 0;
|
||||
}
|
||||
else if (state == InputChannel::State::Ended)
|
||||
{
|
||||
m_inZoomMode = false;
|
||||
m_inRotateMode = false;
|
||||
// If we've moved the cursor more than a couple pixels, we should eat this mouse up event to prevent the context menu controller from seeing it.
|
||||
shouldConsumeEvent = m_totalMouseMoveDelta > 2;
|
||||
shouldCaptureCursor = false;
|
||||
}
|
||||
}
|
||||
else if (id == MouseButton::Middle)
|
||||
{
|
||||
if (state == InputChannel::State::Began)
|
||||
{
|
||||
if (AllowPan())
|
||||
{
|
||||
m_inMoveMode = true;
|
||||
shouldConsumeEvent = true;
|
||||
shouldCaptureCursor = true;
|
||||
}
|
||||
}
|
||||
else if (state == InputChannel::State::Ended)
|
||||
{
|
||||
m_inMoveMode = false;
|
||||
shouldCaptureCursor = false;
|
||||
}
|
||||
}
|
||||
else if (auto modifier = GetKeyboardModifier(event.m_inputChannel); modifier != Qt::KeyboardModifier::NoModifier)
|
||||
{
|
||||
if (state == InputChannel::State::Ended)
|
||||
{
|
||||
m_modifiers &= ~modifier;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_modifiers |= modifier;
|
||||
}
|
||||
}
|
||||
else if (id == AzFramework::InputDeviceMouse::Movement::Z)
|
||||
{
|
||||
if (state == InputChannel::State::Began || state == InputChannel::State::Updated)
|
||||
{
|
||||
shouldConsumeEvent = HandleMouseWheel(event.m_inputChannel.GetValue());
|
||||
}
|
||||
}
|
||||
else if (auto key = GetKeyboardKey(event.m_inputChannel); key != Qt::Key_unknown)
|
||||
{
|
||||
if (!event.m_inputChannel.IsActive())
|
||||
{
|
||||
m_pressedKeys.erase(key);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pressedKeys.insert(key);
|
||||
shouldConsumeEvent = true;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateCursorCapture(shouldCaptureCursor);
|
||||
|
||||
return shouldConsumeEvent;
|
||||
}
|
||||
|
||||
void LegacyViewportCameraControllerInstance::UpdateCursorCapture(bool shouldCaptureCursor)
|
||||
{
|
||||
if (m_capturingCursor != shouldCaptureCursor)
|
||||
{
|
||||
if (shouldCaptureCursor)
|
||||
{
|
||||
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Event(
|
||||
GetViewportId(),
|
||||
&AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Events::BeginCursorCapture
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Event(
|
||||
GetViewportId(),
|
||||
&AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Events::EndCursorCapture
|
||||
);
|
||||
}
|
||||
|
||||
m_capturingCursor = shouldCaptureCursor;
|
||||
}
|
||||
}
|
||||
|
||||
void LegacyViewportCameraControllerInstance::ResetInputChannels()
|
||||
{
|
||||
m_modifiers = 0;
|
||||
m_pressedKeys.clear();
|
||||
UpdateCursorCapture(false);
|
||||
m_inRotateMode = m_inMoveMode = m_inOrbitMode = m_inZoomMode = false;
|
||||
}
|
||||
|
||||
void LegacyViewportCameraControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event)
|
||||
{
|
||||
auto viewportContext = GetViewportContext();
|
||||
if (!viewportContext)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
AZ::Transform transform = viewportContext->GetCameraTransform();
|
||||
AZ::Vector3 xdir = transform.GetBasisX();
|
||||
AZ::Vector3 ydir = transform.GetBasisY();
|
||||
AZ::Vector3 zdir = transform.GetBasisZ();
|
||||
|
||||
AZ::Vector3 pos = transform.GetTranslation();
|
||||
|
||||
float speedScale = AZStd::GetMin(30.0f * event.m_deltaTime.count(), 20.0f);
|
||||
|
||||
// Use the global modifier keys instead of our keymap. It's more reliable.
|
||||
const bool shiftPressed = m_modifiers & Qt::ShiftModifier;
|
||||
const bool controlPressed = m_modifiers & Qt::ControlModifier;
|
||||
|
||||
speedScale *= gSettings.cameraMoveSpeed;
|
||||
if (controlPressed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (shiftPressed)
|
||||
{
|
||||
speedScale *= gSettings.cameraFastMoveSpeed;
|
||||
}
|
||||
|
||||
bool cameraMoved = false;
|
||||
|
||||
if (IsKeyDown(Qt::Key_Up) || IsKeyDown(Qt::Key_W))
|
||||
{
|
||||
// move forward
|
||||
cameraMoved = true;
|
||||
pos = pos + (speedScale * m_moveSpeed * ydir);
|
||||
}
|
||||
|
||||
if (IsKeyDown(Qt::Key_Down) || IsKeyDown(Qt::Key_S))
|
||||
{
|
||||
// move backward
|
||||
cameraMoved = true;
|
||||
pos = pos - (speedScale * m_moveSpeed * ydir);
|
||||
}
|
||||
|
||||
if (IsKeyDown(Qt::Key_Left) || IsKeyDown(Qt::Key_A))
|
||||
{
|
||||
// move left
|
||||
cameraMoved = true;
|
||||
pos = pos - (speedScale * m_moveSpeed * xdir);
|
||||
}
|
||||
|
||||
if (IsKeyDown(Qt::Key_Right) || IsKeyDown(Qt::Key_D))
|
||||
{
|
||||
// move right
|
||||
cameraMoved = true;
|
||||
pos = pos + (speedScale * m_moveSpeed * xdir);
|
||||
}
|
||||
|
||||
if (IsKeyDown(Qt::Key_E))
|
||||
{
|
||||
// move Up
|
||||
cameraMoved = true;
|
||||
pos = pos + (speedScale * m_moveSpeed * zdir);
|
||||
}
|
||||
|
||||
if (IsKeyDown(Qt::Key_Q))
|
||||
{
|
||||
// move down
|
||||
cameraMoved = true;
|
||||
pos = pos - (speedScale * m_moveSpeed * zdir);
|
||||
}
|
||||
|
||||
if (cameraMoved)
|
||||
{
|
||||
transform.SetTranslation(pos);
|
||||
viewportContext->SetCameraTransform(transform);
|
||||
}
|
||||
}
|
||||
|
||||
} //namespace SandboxEditor
|
||||
@@ -1,91 +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 <AzFramework/Viewport/ViewportId.h>
|
||||
#include <AzFramework/Viewport/MultiViewportController.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
|
||||
#include <Atom/RPI.Public/Base.h>
|
||||
|
||||
#include <QtCore/qnamespace.h>
|
||||
#include <QPoint>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
struct ScreenPoint;
|
||||
}
|
||||
|
||||
namespace SandboxEditor
|
||||
{
|
||||
class OrbitCameraControls
|
||||
: public AZ::EBusTraits
|
||||
{
|
||||
public:
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// EBusTraits overrides
|
||||
static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
|
||||
static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
|
||||
using BusIdType = AzFramework::ViewportId;
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
virtual void SetOrbitDistance(float orbitDistance [[maybe_unused]]) {;}
|
||||
};
|
||||
using OrbitCameraControlsBus = AZ::EBus<OrbitCameraControls>;
|
||||
|
||||
class LegacyViewportCameraControllerInstance;
|
||||
using LegacyViewportCameraController = AzFramework::MultiViewportController<LegacyViewportCameraControllerInstance>;
|
||||
|
||||
class LegacyViewportCameraControllerInstance final
|
||||
: public AzFramework::MultiViewportControllerInstanceInterface<LegacyViewportCameraController>
|
||||
, public OrbitCameraControlsBus::Handler
|
||||
{
|
||||
public:
|
||||
LegacyViewportCameraControllerInstance(AzFramework::ViewportId viewport, LegacyViewportCameraController* controller);
|
||||
~LegacyViewportCameraControllerInstance();
|
||||
|
||||
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
|
||||
void ResetInputChannels() override;
|
||||
void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override;
|
||||
|
||||
void SetOrbitDistance(float orbitDistance) override;
|
||||
|
||||
private:
|
||||
bool JustAltHeld() const;
|
||||
bool NoModifierHeld() const;
|
||||
bool AllowDolly() const;
|
||||
bool AllowOrbit() const;
|
||||
bool AllowPan() const;
|
||||
bool InvertPan() const;
|
||||
|
||||
static Qt::KeyboardModifier GetKeyboardModifier(const AzFramework::InputChannel& inputChannel);
|
||||
static Qt::Key GetKeyboardKey(const AzFramework::InputChannel& inputChannel);
|
||||
|
||||
AZ::RPI::ViewportContextPtr GetViewportContext();
|
||||
|
||||
bool HandleMouseMove(int dx, int dy);
|
||||
bool HandleMouseWheel(float zDelta);
|
||||
bool IsKeyDown(Qt::Key key) const;
|
||||
void UpdateCursorCapture(bool shouldCaptureCursor);
|
||||
|
||||
bool m_inRotateMode = false;
|
||||
bool m_inMoveMode = false;
|
||||
bool m_inOrbitMode = false;
|
||||
bool m_inZoomMode = false;
|
||||
int m_totalMouseMoveDelta = 0;
|
||||
float m_orbitDistance = 10.f;
|
||||
float m_moveSpeed = 1.f;
|
||||
AZ::Vector3 m_orbitTarget = {};
|
||||
unsigned int m_modifiers = {};
|
||||
AZStd::unordered_set<Qt::Key> m_pressedKeys;
|
||||
bool m_capturingCursor = false;
|
||||
};
|
||||
|
||||
} //namespace SandboxEditor
|
||||
@@ -1704,74 +1704,44 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework::
|
||||
return;
|
||||
}
|
||||
|
||||
if (SandboxEditor::UsingNewCameraSystem())
|
||||
const AZ::Aabb aabb = AZStd::accumulate(
|
||||
AZStd::begin(entityIds), AZStd::end(entityIds), AZ::Aabb::CreateNull(), [](AZ::Aabb acc, const AZ::EntityId entityId) {
|
||||
const AZ::Aabb aabb = AzFramework::CalculateEntityWorldBoundsUnion(AzToolsFramework::GetEntityById(entityId));
|
||||
acc.AddAabb(aabb);
|
||||
return acc;
|
||||
});
|
||||
|
||||
float radius;
|
||||
AZ::Vector3 center;
|
||||
aabb.GetAsSphere(center, radius);
|
||||
|
||||
// minimum center size is 40cm
|
||||
const float minSelectionRadius = 0.4f;
|
||||
const float selectionSize = AZ::GetMax(minSelectionRadius, radius);
|
||||
|
||||
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
|
||||
const int viewCount = GetIEditor()->GetViewManager()->GetViewCount(); // legacy call
|
||||
for (int viewIndex = 0; viewIndex < viewCount; ++viewIndex)
|
||||
{
|
||||
const AZ::Aabb aabb = AZStd::accumulate(
|
||||
AZStd::begin(entityIds), AZStd::end(entityIds), AZ::Aabb::CreateNull(), [](AZ::Aabb acc, const AZ::EntityId entityId) {
|
||||
const AZ::Aabb aabb = AzFramework::CalculateEntityWorldBoundsUnion(AzToolsFramework::GetEntityById(entityId));
|
||||
acc.AddAabb(aabb);
|
||||
return acc;
|
||||
});
|
||||
|
||||
float radius;
|
||||
AZ::Vector3 center;
|
||||
aabb.GetAsSphere(center, radius);
|
||||
|
||||
// minimum center size is 40cm
|
||||
const float minSelectionRadius = 0.4f;
|
||||
const float selectionSize = AZ::GetMax(minSelectionRadius, radius);
|
||||
|
||||
auto viewportContextManager = AZ::Interface<AZ::RPI::ViewportContextRequestsInterface>::Get();
|
||||
|
||||
const int viewCount = GetIEditor()->GetViewManager()->GetViewCount(); // legacy call
|
||||
for (int viewIndex = 0; viewIndex < viewCount; ++viewIndex)
|
||||
if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex))
|
||||
{
|
||||
if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex))
|
||||
{
|
||||
const AZ::Transform cameraTransform = viewportContext->GetCameraTransform();
|
||||
const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized();
|
||||
const AZ::Transform cameraTransform = viewportContext->GetCameraTransform();
|
||||
const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized();
|
||||
|
||||
// move camera 25% further back than required
|
||||
const float centerScale = 1.25f;
|
||||
// compute new camera transform
|
||||
const float fov = AzFramework::RetrieveFov(viewportContext->GetCameraProjectionMatrix());
|
||||
const float fovScale = (1.0f / AZStd::tan(fov * 0.5f));
|
||||
const float distanceToLookAt = selectionSize * fovScale * centerScale;
|
||||
const AZ::Transform nextCameraTransform =
|
||||
AZ::Transform::CreateLookAt(aabb.GetCenter() - (forward * distanceToLookAt), aabb.GetCenter());
|
||||
// move camera 25% further back than required
|
||||
const float centerScale = 1.25f;
|
||||
// compute new camera transform
|
||||
const float fov = AzFramework::RetrieveFov(viewportContext->GetCameraProjectionMatrix());
|
||||
const float fovScale = (1.0f / AZStd::tan(fov * 0.5f));
|
||||
const float distanceToLookAt = selectionSize * fovScale * centerScale;
|
||||
const AZ::Transform nextCameraTransform =
|
||||
AZ::Transform::CreateLookAt(aabb.GetCenter() - (forward * distanceToLookAt), aabb.GetCenter());
|
||||
|
||||
AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event(
|
||||
viewportContext->GetId(),
|
||||
&AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, nextCameraTransform,
|
||||
distanceToLookAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AABB selectionBounds;
|
||||
selectionBounds.Reset();
|
||||
bool entitiesAvailableForGoTo = false;
|
||||
|
||||
for (const AZ::EntityId& entityId : entityIds)
|
||||
{
|
||||
if (CollectEntityBoundingBoxesForZoom(entityId, selectionBounds))
|
||||
{
|
||||
entitiesAvailableForGoTo = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (entitiesAvailableForGoTo)
|
||||
{
|
||||
int numViews = GetIEditor()->GetViewManager()->GetViewCount();
|
||||
for (int viewIndex = 0; viewIndex < numViews; ++viewIndex)
|
||||
{
|
||||
CViewport* viewport = GetIEditor()->GetViewManager()->GetView(viewIndex);
|
||||
if (viewport)
|
||||
{
|
||||
viewport->CenterOnAABB(selectionBounds);
|
||||
}
|
||||
}
|
||||
AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event(
|
||||
viewportContext->GetId(),
|
||||
&AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, nextCameraTransform,
|
||||
distanceToLookAt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <QMouseEvent>
|
||||
|
||||
OutlinerTreeView::OutlinerTreeView(QWidget* pParent)
|
||||
: QTreeView(pParent)
|
||||
: AzQtComponents::StyledTreeView(pParent)
|
||||
, m_queuedMouseEvent(nullptr)
|
||||
, m_draggingUnselectedItem(false)
|
||||
{
|
||||
@@ -135,16 +135,12 @@ void OutlinerTreeView::startDrag(Qt::DropActions supportedActions)
|
||||
|
||||
if (!selectionModel()->isSelected(index))
|
||||
{
|
||||
startCustomDrag({ index }, supportedActions);
|
||||
StartCustomDrag({ index }, supportedActions);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!selectionModel()->selectedIndexes().empty())
|
||||
{
|
||||
startCustomDrag(selectionModel()->selectedIndexes(), supportedActions);
|
||||
return;
|
||||
}
|
||||
StyledTreeView::startDrag(supportedActions);
|
||||
}
|
||||
|
||||
void OutlinerTreeView::dragMoveEvent(QDragMoveEvent* event)
|
||||
@@ -336,14 +332,14 @@ void OutlinerTreeView::processQueuedMousePressedEvent(QMouseEvent* event)
|
||||
QTreeView::mousePressEvent(&mousePressedEvent);
|
||||
}
|
||||
|
||||
void OutlinerTreeView::startCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
void OutlinerTreeView::StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
{
|
||||
m_draggingUnselectedItem = true;
|
||||
|
||||
//sort by container entity depth and order in hierarchy for proper drag image and drop order
|
||||
QModelIndexList indexListSorted = indexList;
|
||||
AZStd::unordered_map<AZ::EntityId, AZStd::list<AZ::u64>> locations;
|
||||
for (auto index : indexListSorted)
|
||||
for (const auto& index : indexListSorted)
|
||||
{
|
||||
AZ::EntityId entityId(index.data(OutlinerListModel::EntityIdRole).value<AZ::u64>());
|
||||
AzToolsFramework::GetEntityLocationInHierarchy(entityId, locations[entityId]);
|
||||
@@ -356,74 +352,7 @@ void OutlinerTreeView::startCustomDrag(const QModelIndexList& indexList, Qt::Dro
|
||||
return AZStd::lexicographical_compare(locationsE1.begin(), locationsE1.end(), locationsE2.begin(), locationsE2.end());
|
||||
});
|
||||
|
||||
//get the data for the unselected item(s)
|
||||
QMimeData* mimeData = model()->mimeData(indexListSorted);
|
||||
if (mimeData)
|
||||
{
|
||||
//initiate drag/drop for the item
|
||||
QDrag* drag = new QDrag(this);
|
||||
drag->setPixmap(QPixmap::fromImage(createDragImage(indexListSorted)));
|
||||
drag->setMimeData(mimeData);
|
||||
Qt::DropAction defDropAction = Qt::IgnoreAction;
|
||||
if (defaultDropAction() != Qt::IgnoreAction && (supportedActions & defaultDropAction()))
|
||||
{
|
||||
defDropAction = defaultDropAction();
|
||||
}
|
||||
else if (supportedActions & Qt::CopyAction && dragDropMode() != QAbstractItemView::InternalMove)
|
||||
{
|
||||
defDropAction = Qt::CopyAction;
|
||||
}
|
||||
drag->exec(supportedActions, defDropAction);
|
||||
}
|
||||
}
|
||||
|
||||
QImage OutlinerTreeView::createDragImage(const QModelIndexList& indexList)
|
||||
{
|
||||
//generate a drag image of the item icon and text, normally done internally, and inaccessible
|
||||
QRect rect(0, 0, 0, 0);
|
||||
for (auto index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QRect itemRect = visualRect(index);
|
||||
rect.setHeight(rect.height() + itemRect.height());
|
||||
rect.setWidth(AZStd::GetMax(rect.width(), itemRect.width()));
|
||||
}
|
||||
|
||||
QImage dragImage(rect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
|
||||
QPainter dragPainter(&dragImage);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
dragPainter.fillRect(dragImage.rect(), Qt::transparent);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||
dragPainter.setOpacity(0.35f);
|
||||
dragPainter.fillRect(rect, QColor("#222222"));
|
||||
dragPainter.setOpacity(1.0f);
|
||||
|
||||
int imageY = 0;
|
||||
for (auto index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QRect itemRect = visualRect(index);
|
||||
dragPainter.drawPixmap(QPoint(0, imageY),
|
||||
model()->data(index, Qt::DecorationRole).value<QIcon>().pixmap(QSize(16, 16)));
|
||||
dragPainter.setPen(
|
||||
model()->data(index, Qt::ForegroundRole).value<QBrush>().color());
|
||||
dragPainter.setFont(
|
||||
font());
|
||||
dragPainter.drawText(QRect(20, imageY, rect.width() - 20, rect.height()),
|
||||
model()->data(index, Qt::DisplayRole).value<QString>());
|
||||
imageY += itemRect.height();
|
||||
}
|
||||
|
||||
dragPainter.end();
|
||||
return dragImage;
|
||||
StyledTreeView::StartCustomDrag(indexListSorted, supportedActions);
|
||||
}
|
||||
|
||||
#include <UI/Outliner/moc_OutlinerTreeView.cpp>
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
|
||||
#include <QBasicTimer>
|
||||
#include <QEvent>
|
||||
#include <QTreeView>
|
||||
|
||||
#include <AzQtComponents/Components/Widgets/TreeView.h>
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
@@ -31,7 +32,7 @@ class OutlinerTreeViewModel;
|
||||
//! allow for dragging and dropping of entities from the outliner into the property editor
|
||||
//! of other entities. If the selection updates instantly, this would never be possible.
|
||||
class OutlinerTreeView
|
||||
: public QTreeView
|
||||
: public AzQtComponents::StyledTreeView
|
||||
{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
@@ -66,9 +67,7 @@ private:
|
||||
|
||||
void processQueuedMousePressedEvent(QMouseEvent* event);
|
||||
|
||||
void startCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions);
|
||||
|
||||
QImage createDragImage(const QModelIndexList& indexList);
|
||||
void StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions) override;
|
||||
|
||||
void DrawLayerUI(QPainter* painter, const QRect& rect, const QModelIndex& index) const;
|
||||
|
||||
|
||||
@@ -172,8 +172,7 @@ void CViewportTitleDlg::SetupCameraDropdownMenu()
|
||||
cameraSpeedActionWidget->setDefaultWidget(cameraSpeedContainer);
|
||||
|
||||
// Save off the move speed here since setting up the combo box can cause it to update values in the background.
|
||||
const float cameraMoveSpeed = SandboxEditor::UsingNewCameraSystem() ? SandboxEditor::CameraTranslateSpeed() : gSettings.cameraMoveSpeed;
|
||||
|
||||
const float cameraMoveSpeed = SandboxEditor::CameraTranslateSpeed();
|
||||
// Populate the presets in the ComboBox
|
||||
for (float presetValue : m_speedPresetValues)
|
||||
{
|
||||
@@ -947,21 +946,13 @@ void CViewportTitleDlg::OnSpeedComboBoxEnter()
|
||||
|
||||
void CViewportTitleDlg::OnUpdateMoveSpeedText(const QString& text)
|
||||
{
|
||||
if (SandboxEditor::UsingNewCameraSystem())
|
||||
{
|
||||
SandboxEditor::SetCameraTranslateSpeed(aznumeric_cast<float>(Round(text.toDouble(), m_speedStep)));
|
||||
}
|
||||
else
|
||||
{
|
||||
gSettings.cameraMoveSpeed = aznumeric_cast<float>(Round(text.toDouble(), m_speedStep));
|
||||
}
|
||||
SandboxEditor::SetCameraTranslateSpeed(aznumeric_cast<float>(Round(text.toDouble(), m_speedStep)));
|
||||
}
|
||||
|
||||
void CViewportTitleDlg::CheckForCameraSpeedUpdate()
|
||||
{
|
||||
if (const float currentCameraMoveSpeed =
|
||||
SandboxEditor::UsingNewCameraSystem() ? SandboxEditor::CameraTranslateSpeed() : gSettings.cameraMoveSpeed;
|
||||
currentCameraMoveSpeed != m_prevMoveSpeed && !m_cameraSpeed->lineEdit()->hasFocus())
|
||||
const float currentCameraMoveSpeed = SandboxEditor::CameraTranslateSpeed();
|
||||
if (currentCameraMoveSpeed != m_prevMoveSpeed && !m_cameraSpeed->lineEdit()->hasFocus())
|
||||
{
|
||||
m_prevMoveSpeed = currentCameraMoveSpeed;
|
||||
SetSpeedComboBox(currentCameraMoveSpeed);
|
||||
|
||||
@@ -799,8 +799,6 @@ set(FILES
|
||||
EditorViewportCamera.h
|
||||
ViewportManipulatorController.cpp
|
||||
ViewportManipulatorController.h
|
||||
LegacyViewportCameraController.cpp
|
||||
LegacyViewportCameraController.h
|
||||
TopRendererWnd.cpp
|
||||
TopRendererWnd.h
|
||||
ViewManager.cpp
|
||||
|
||||
@@ -10,6 +10,17 @@
|
||||
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
|
||||
void OnVsyncIntervalChanged(uint32_t const& interval)
|
||||
{
|
||||
AzFramework::WindowNotificationBus::Broadcast(
|
||||
&AzFramework::WindowNotificationBus::Events::OnVsyncIntervalChanged, AZ::GetClamp(interval, 0u, 4u));
|
||||
}
|
||||
|
||||
// NOTE: On change, broadcasts the new requested vsync interval to all windows.
|
||||
// The value of the vsync interval is constrained between 0 and 4
|
||||
// Vsync intervals greater than 1 are not currently supported on the Vulkan RHI (see #2061 for discussion)
|
||||
AZ_CVAR(uint32_t, vsync_interval, 1, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -122,6 +133,16 @@ namespace AzFramework
|
||||
return m_pimpl->GetDpiScaleFactor();
|
||||
}
|
||||
|
||||
uint32_t NativeWindow::GetDisplayRefreshRate() const
|
||||
{
|
||||
return m_pimpl->GetDisplayRefreshRate();
|
||||
}
|
||||
|
||||
uint32_t NativeWindow::GetSyncInterval() const
|
||||
{
|
||||
return vsync_interval;
|
||||
}
|
||||
|
||||
/*static*/ bool NativeWindow::GetFullScreenStateOfDefaultWindow()
|
||||
{
|
||||
NativeWindowHandle defaultWindowHandle = nullptr;
|
||||
@@ -240,4 +261,10 @@ namespace AzFramework
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
uint32_t NativeWindow::Implementation::GetDisplayRefreshRate() const
|
||||
{
|
||||
// Default to 60
|
||||
return 60;
|
||||
}
|
||||
|
||||
} // namespace AzFramework
|
||||
|
||||
@@ -130,6 +130,8 @@ namespace AzFramework
|
||||
bool CanToggleFullScreenState() const override;
|
||||
void ToggleFullScreenState() override;
|
||||
float GetDpiScaleFactor() const override;
|
||||
uint32_t GetSyncInterval() const override;
|
||||
uint32_t GetDisplayRefreshRate() const override;
|
||||
|
||||
//! Get the full screen state of the default window.
|
||||
//! \return True if the default window is currently in full screen, false otherwise.
|
||||
@@ -172,6 +174,7 @@ namespace AzFramework
|
||||
virtual void SetFullScreenState(bool fullScreenState);
|
||||
virtual bool CanToggleFullScreenState() const;
|
||||
virtual float GetDpiScaleFactor() const;
|
||||
virtual uint32_t GetDisplayRefreshRate() const;
|
||||
|
||||
protected:
|
||||
uint32_t m_width = 0;
|
||||
|
||||
@@ -74,6 +74,12 @@ namespace AzFramework
|
||||
//! to a "standard" value of 96, the default for Windows in a DPI unaware setting. This can
|
||||
//! be used to scale user interface elements to ensure legibility on high density displays.
|
||||
virtual float GetDpiScaleFactor() const = 0;
|
||||
|
||||
//! Returns the sync interval which tells the drivers the number of v-blanks to synchronize with
|
||||
virtual uint32_t GetSyncInterval() const = 0;
|
||||
|
||||
//! Returns the refresh rate of the main display
|
||||
virtual uint32_t GetDisplayRefreshRate() const = 0;
|
||||
};
|
||||
using WindowRequestBus = AZ::EBus<WindowRequests>;
|
||||
|
||||
@@ -101,6 +107,9 @@ namespace AzFramework
|
||||
|
||||
//! This is called when vsync interval is changed.
|
||||
virtual void OnVsyncIntervalChanged(uint32_t interval) { AZ_UNUSED(interval); };
|
||||
|
||||
//! This is called if the main display's refresh rate changes
|
||||
virtual void OnRefreshRateChanged([[maybe_unused]] uint32_t refreshRate) {}
|
||||
};
|
||||
using WindowNotificationBus = AZ::EBus<WindowNotifications>;
|
||||
|
||||
|
||||
+6
-1
@@ -25,7 +25,7 @@ namespace AzFramework
|
||||
const WindowGeometry& geometry,
|
||||
const WindowStyleMasks& styleMasks) override;
|
||||
NativeWindowHandle GetWindowHandle() const override;
|
||||
|
||||
uint32_t GetDisplayRefreshRate() const override;
|
||||
private:
|
||||
ANativeWindow* m_nativeWindow = nullptr;
|
||||
};
|
||||
@@ -55,4 +55,9 @@ namespace AzFramework
|
||||
return reinterpret_cast<NativeWindowHandle>(m_nativeWindow);
|
||||
}
|
||||
|
||||
uint32_t NativeWindowImpl_Android::GetDisplayRefreshRate() const
|
||||
{
|
||||
// Using 60 for now until proper support is added
|
||||
return 60;
|
||||
}
|
||||
} // namespace AzFramework
|
||||
|
||||
@@ -23,6 +23,7 @@ namespace AzFramework
|
||||
const WindowGeometry& geometry,
|
||||
const WindowStyleMasks& styleMasks) override;
|
||||
NativeWindowHandle GetWindowHandle() const override;
|
||||
uint32_t GetDisplayRefreshRate() const override;
|
||||
};
|
||||
|
||||
NativeWindow::Implementation* NativeWindow::Implementation::Create()
|
||||
@@ -44,4 +45,9 @@ namespace AzFramework
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
uint32_t NativeWindowImpl_Linux::GetDisplayRefreshRate() const
|
||||
{
|
||||
//Using 60 for now until proper support is added
|
||||
return 60;
|
||||
}
|
||||
} // namespace AzFramework
|
||||
|
||||
@@ -34,12 +34,14 @@ namespace AzFramework
|
||||
bool GetFullScreenState() const override;
|
||||
void SetFullScreenState(bool fullScreenState) override;
|
||||
bool CanToggleFullScreenState() const override { return true; }
|
||||
uint32_t GetMainDisplayRefreshRate() const override;
|
||||
|
||||
private:
|
||||
static NSWindowStyleMask ConvertToNSWindowStyleMask(const WindowStyleMasks& styleMasks);
|
||||
|
||||
NSWindow* m_nativeWindow;
|
||||
NSString* m_windowTitle;
|
||||
uint32_t m_mainDisplayRefreshRate = 0;
|
||||
};
|
||||
|
||||
NativeWindow::Implementation* NativeWindow::Implementation::Create()
|
||||
@@ -76,6 +78,17 @@ namespace AzFramework
|
||||
// Make the window active
|
||||
[m_nativeWindow makeKeyAndOrderFront:nil];
|
||||
m_nativeWindow.title = m_windowTitle;
|
||||
|
||||
CGDirectDisplayID display = CGMainDisplayID();
|
||||
CGDisplayModeRef currentMode = CGDisplayCopyDisplayMode(display);
|
||||
m_mainDisplayRefreshRate = CGDisplayModeGetRefreshRate(currentMode);
|
||||
|
||||
// Assume 60hz if 0 is returned.
|
||||
// This can happen on OSX. In future we can hopefully use maximumFramesPerSecond which wont have this issue
|
||||
if (m_mainDisplayRefreshRate == 0)
|
||||
{
|
||||
m_mainDisplayRefreshRate = 60;
|
||||
}
|
||||
}
|
||||
|
||||
NativeWindowHandle NativeWindowImpl_Darwin::GetWindowHandle() const
|
||||
@@ -128,4 +141,9 @@ namespace AzFramework
|
||||
const NSWindowStyleMask defaultMask = NSWindowStyleMaskResizable | NSWindowStyleMaskTitled | NSWindowStyleMaskClosable | NSWindowStyleMaskMiniaturizable;
|
||||
return nativeMask ? nativeMask : defaultMask;
|
||||
}
|
||||
|
||||
uint32_t NativeWindowImpl_Darwin::GetMainDisplayRefreshRate() const
|
||||
{
|
||||
return m_mainDisplayRefreshRate;
|
||||
}
|
||||
} // namespace AzFramework
|
||||
|
||||
+3
-1
@@ -117,9 +117,11 @@ namespace AzFramework
|
||||
, m_hasFocus(false)
|
||||
, m_hasTextEntryStarted(false)
|
||||
{
|
||||
static const char* s_keyboardCountEnvironmentVarName = "InputDeviceKeyboardInstanceCount";
|
||||
s_instanceCount = AZ::Environment::FindVariable<int>(s_keyboardCountEnvironmentVarName);
|
||||
if (!s_instanceCount)
|
||||
{
|
||||
s_instanceCount = AZ::Environment::CreateVariable<int>("InputDeviceKeyboardInstanceCount", 1);
|
||||
s_instanceCount = AZ::Environment::CreateVariable<int>(s_keyboardCountEnvironmentVarName, 1);
|
||||
|
||||
// Register for raw keyboard input
|
||||
RAWINPUTDEVICE rawInputDevice;
|
||||
|
||||
+3
-1
@@ -138,9 +138,11 @@ namespace AzFramework
|
||||
{
|
||||
memset(&m_lastClientRect, 0, sizeof(m_lastClientRect));
|
||||
|
||||
static const char* s_mouseCountEnvironmentVarName = "InputDeviceMouseInstanceCount";
|
||||
s_instanceCount = AZ::Environment::FindVariable<int>(s_mouseCountEnvironmentVarName);
|
||||
if (!s_instanceCount)
|
||||
{
|
||||
s_instanceCount = AZ::Environment::CreateVariable<int>("InputDeviceMouseInstanceCount", 1);
|
||||
s_instanceCount = AZ::Environment::CreateVariable<int>(s_mouseCountEnvironmentVarName, 1);
|
||||
|
||||
// Register for raw mouse input
|
||||
RAWINPUTDEVICE rawInputDevice;
|
||||
|
||||
+20
@@ -37,6 +37,7 @@ namespace AzFramework
|
||||
void SetFullScreenState(bool fullScreenState) override;
|
||||
bool CanToggleFullScreenState() const override { return true; }
|
||||
float GetDpiScaleFactor() const override;
|
||||
uint32_t GetDisplayRefreshRate() const override;
|
||||
|
||||
private:
|
||||
static DWORD ConvertToWin32WindowStyleMask(const WindowStyleMasks& styleMasks);
|
||||
@@ -56,6 +57,7 @@ namespace AzFramework
|
||||
|
||||
using GetDpiForWindowType = UINT(HWND hwnd);
|
||||
GetDpiForWindowType* m_getDpiFunction = nullptr;
|
||||
uint32_t m_mainDisplayRefreshRate = 0;
|
||||
};
|
||||
|
||||
const wchar_t* NativeWindowImpl_Win32::s_defaultClassName = L"O3DEWin32Class";
|
||||
@@ -144,6 +146,10 @@ namespace AzFramework
|
||||
{
|
||||
SetWindowLongPtr(m_win32Handle, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(this));
|
||||
}
|
||||
|
||||
DEVMODE DisplayConfig;
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &DisplayConfig);
|
||||
m_mainDisplayRefreshRate = DisplayConfig.dmDisplayFrequency;
|
||||
}
|
||||
|
||||
void NativeWindowImpl_Win32::Activate()
|
||||
@@ -263,6 +269,15 @@ namespace AzFramework
|
||||
WindowNotificationBus::Event(nativeWindowImpl->GetWindowHandle(), &WindowNotificationBus::Events::OnDpiScaleFactorChanged, newScaleFactor);
|
||||
break;
|
||||
}
|
||||
case WM_WINDOWPOSCHANGED:
|
||||
{
|
||||
DEVMODE DisplayConfig;
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &DisplayConfig);
|
||||
uint32_t refreshRate = DisplayConfig.dmDisplayFrequency;
|
||||
WindowNotificationBus::Event(
|
||||
nativeWindowImpl->GetWindowHandle(), &WindowNotificationBus::Events::OnRefreshRateChanged, refreshRate);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
break;
|
||||
@@ -367,6 +382,11 @@ namespace AzFramework
|
||||
return aznumeric_cast<float>(dotsPerInch) / aznumeric_cast<float>(defaultDotsPerInch);
|
||||
}
|
||||
|
||||
uint32_t NativeWindowImpl_Win32::GetDisplayRefreshRate() const
|
||||
{
|
||||
return m_mainDisplayRefreshRate;
|
||||
}
|
||||
|
||||
void NativeWindowImpl_Win32::EnterBorderlessWindowFullScreen()
|
||||
{
|
||||
if (m_isInBorderlessWindowFullScreenState)
|
||||
|
||||
@@ -27,9 +27,11 @@ namespace AzFramework
|
||||
const WindowGeometry& geometry,
|
||||
const WindowStyleMasks& styleMasks) override;
|
||||
NativeWindowHandle GetWindowHandle() const override;
|
||||
|
||||
uint32_t GetMainDisplayRefreshRate() const override;
|
||||
|
||||
private:
|
||||
UIWindow* m_nativeWindow;
|
||||
uint32_t m_mainDisplayRefreshRate = 0;
|
||||
};
|
||||
|
||||
NativeWindow::Implementation* NativeWindow::Implementation::Create()
|
||||
@@ -56,6 +58,7 @@ namespace AzFramework
|
||||
|
||||
m_width = geometry.m_width;
|
||||
m_height = geometry.m_height;
|
||||
m_mainDisplayRefreshRate = [[UIScreen mainScreen] maximumFramesPerSecond];
|
||||
}
|
||||
|
||||
NativeWindowHandle NativeWindowImpl_Ios::GetWindowHandle() const
|
||||
@@ -63,5 +66,9 @@ namespace AzFramework
|
||||
return m_nativeWindow;
|
||||
}
|
||||
|
||||
uint32_t NativeWindowImpl_Ios::GetMainDisplayRefreshRate() const
|
||||
{
|
||||
return m_mainDisplayRefreshRate;
|
||||
}
|
||||
} // namespace AzFramework
|
||||
|
||||
|
||||
@@ -8,10 +8,13 @@
|
||||
|
||||
#include <AzQtComponents/Components/Widgets/TreeView.h>
|
||||
|
||||
#include <QDrag>
|
||||
#include <QEvent>
|
||||
#include <QSettings>
|
||||
#include <QPainter>
|
||||
|
||||
#include <AzCore/std/algorithm.h>
|
||||
|
||||
#include <AzQtComponents/Components/Style.h>
|
||||
#include <AzQtComponents/Components/StyleManager.h>
|
||||
#include <AzQtComponents/Components/ConfigHelpers.h>
|
||||
@@ -252,5 +255,109 @@ namespace AzQtComponents
|
||||
return qobject_cast<QTreeView*>(widget) && !qobject_cast<TableView*>(widget);
|
||||
}
|
||||
|
||||
StyledTreeView::StyledTreeView(QWidget* parent)
|
||||
: QTreeView(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void StyledTreeView::startDrag(Qt::DropActions supportedActions)
|
||||
{
|
||||
if (!selectionModel()->selectedIndexes().empty())
|
||||
{
|
||||
StartCustomDrag(selectionModel()->selectedIndexes(), supportedActions);
|
||||
}
|
||||
}
|
||||
|
||||
void StyledTreeView::StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
{
|
||||
StartCustomDragInternal(this, indexList, supportedActions);
|
||||
}
|
||||
|
||||
void StyledTreeView::StartCustomDragInternal(QAbstractItemView* itemView, const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
{
|
||||
QMimeData* mimeData = itemView->model()->mimeData(indexList);
|
||||
if (mimeData)
|
||||
{
|
||||
QDrag* drag = new QDrag(itemView);
|
||||
drag->setPixmap(QPixmap::fromImage(CreateDragImage(itemView, indexList)));
|
||||
drag->setMimeData(mimeData);
|
||||
|
||||
Qt::DropAction defDropAction = Qt::IgnoreAction;
|
||||
if (itemView->defaultDropAction() != Qt::IgnoreAction && (supportedActions & itemView->defaultDropAction()))
|
||||
{
|
||||
defDropAction = itemView->defaultDropAction();
|
||||
}
|
||||
else if (supportedActions & Qt::CopyAction && itemView->dragDropMode() != QAbstractItemView::InternalMove)
|
||||
{
|
||||
defDropAction = Qt::CopyAction;
|
||||
}
|
||||
|
||||
drag->exec(supportedActions, defDropAction);
|
||||
}
|
||||
}
|
||||
|
||||
QImage StyledTreeView::CreateDragImage(QAbstractItemView* itemView, const QModelIndexList& indexList)
|
||||
{
|
||||
// Generate a drag image of the item icon and text, normally done internally, and inaccessible
|
||||
QRect rect(0, 0, 0, 0);
|
||||
for (const auto& index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QRect itemRect = itemView->visualRect(index);
|
||||
rect.setHeight(rect.height() + itemRect.height());
|
||||
rect.setWidth(AZStd::GetMax(rect.width(), itemRect.width()));
|
||||
}
|
||||
|
||||
QImage dragImage(rect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
|
||||
QPainter dragPainter(&dragImage);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
dragPainter.fillRect(dragImage.rect(), Qt::transparent);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||
dragPainter.setOpacity(0.35f);
|
||||
dragPainter.fillRect(rect, QColor("#222222"));
|
||||
dragPainter.setOpacity(1.0f);
|
||||
|
||||
int imageY = 0;
|
||||
for (const auto& index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QRect itemRect = itemView->visualRect(index);
|
||||
dragPainter.drawPixmap(QPoint(0, imageY),
|
||||
itemView->model()->data(index, Qt::DecorationRole).value<QIcon>().pixmap(QSize(16, 16)));
|
||||
dragPainter.setPen(
|
||||
itemView->model()->data(index, Qt::ForegroundRole).value<QBrush>().color());
|
||||
dragPainter.setFont(
|
||||
itemView->font());
|
||||
dragPainter.drawText(QRect(20, imageY, rect.width() - 20, rect.height()),
|
||||
itemView->model()->data(index, Qt::DisplayRole).value<QString>());
|
||||
imageY += itemRect.height();
|
||||
}
|
||||
|
||||
dragPainter.end();
|
||||
return dragImage;
|
||||
}
|
||||
|
||||
StyledTreeWidget::StyledTreeWidget(QWidget* parent)
|
||||
: QTreeWidget(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void StyledTreeWidget::startDrag(Qt::DropActions supportedActions)
|
||||
{
|
||||
if (!selectionModel()->selectedIndexes().empty())
|
||||
{
|
||||
StyledTreeView::StartCustomDragInternal(this, selectionModel()->selectedIndexes(), supportedActions);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace AzQtComponents
|
||||
#include <Components/Widgets/moc_TreeView.cpp>
|
||||
|
||||
@@ -9,8 +9,11 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(Q_MOC_RUN)
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzQtComponents/AzQtComponentsAPI.h>
|
||||
#include <AzQtComponents/Components/Widgets/TableView.h>
|
||||
|
||||
#include <QTreeWidget>
|
||||
#endif
|
||||
|
||||
namespace AzQtComponents
|
||||
@@ -68,4 +71,46 @@ namespace AzQtComponents
|
||||
void updateEditorGeometry(QWidget* editor, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
|
||||
};
|
||||
|
||||
//! For most of the custom QTreeView styling, we override in AzQtComponents::Style class,
|
||||
//! but there are some cases (e.g. drag/drop) that can only be overriden by an actual
|
||||
//! subclass of the QTreeView
|
||||
class AZ_QT_COMPONENTS_API StyledTreeView
|
||||
: public QTreeView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(StyledTreeView, AZ::SystemAllocator, 0);
|
||||
|
||||
explicit StyledTreeView(QWidget* parent = nullptr);
|
||||
|
||||
//! NOTE: QTreeWidget derives from QTreeView, but because we need a custom dervied class
|
||||
//! of QTreeView, then we can't inherit our custom drag methods in our custom derived
|
||||
//! class of QTreeWidget, so these functions are made static so they can be shared
|
||||
static void StartCustomDragInternal(QAbstractItemView* itemView, const QModelIndexList& indexList, Qt::DropActions supportedActions);
|
||||
static QImage CreateDragImage(QAbstractItemView* itemView, const QModelIndexList& indexList);
|
||||
|
||||
protected:
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
|
||||
virtual void StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions);
|
||||
};
|
||||
|
||||
//! For most of the custom QTreeWidget styling, we override in AzQtComponents::Style class,
|
||||
//! but there are some cases (e.g. drag/drop) that can only be overriden by an actual
|
||||
//! subclass of the QTreeWidget.
|
||||
class AZ_QT_COMPONENTS_API StyledTreeWidget
|
||||
: public QTreeWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(StyledTreeWidget, AZ::SystemAllocator, 0);
|
||||
|
||||
explicit StyledTreeWidget(QWidget* parent = nullptr);
|
||||
|
||||
protected:
|
||||
void startDrag(Qt::DropActions supportedActions) override;
|
||||
};
|
||||
|
||||
} // namespace AzQtComponents
|
||||
|
||||
+6
-78
@@ -27,7 +27,7 @@
|
||||
namespace AzToolsFramework
|
||||
{
|
||||
EntityOutlinerTreeView::EntityOutlinerTreeView(QWidget* pParent)
|
||||
: QTreeView(pParent)
|
||||
: AzQtComponents::StyledTreeView(pParent)
|
||||
, m_queuedMouseEvent(nullptr)
|
||||
, m_draggingUnselectedItem(false)
|
||||
{
|
||||
@@ -144,16 +144,12 @@ namespace AzToolsFramework
|
||||
|
||||
if (!selectionModel()->isSelected(index))
|
||||
{
|
||||
startCustomDrag({ index }, supportedActions);
|
||||
StartCustomDrag({ index }, supportedActions);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (!selectionModel()->selectedIndexes().empty())
|
||||
{
|
||||
startCustomDrag(selectionModel()->selectedIndexes(), supportedActions);
|
||||
return;
|
||||
}
|
||||
StyledTreeView::startDrag(supportedActions);
|
||||
}
|
||||
|
||||
void EntityOutlinerTreeView::dragMoveEvent(QDragMoveEvent* event)
|
||||
@@ -243,14 +239,14 @@ namespace AzToolsFramework
|
||||
QTreeView::mousePressEvent(&mousePressedEvent);
|
||||
}
|
||||
|
||||
void EntityOutlinerTreeView::startCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
void EntityOutlinerTreeView::StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions)
|
||||
{
|
||||
m_draggingUnselectedItem = true;
|
||||
|
||||
//sort by container entity depth and order in hierarchy for proper drag image and drop order
|
||||
QModelIndexList indexListSorted = indexList;
|
||||
AZStd::unordered_map<AZ::EntityId, AZStd::list<AZ::u64>> locations;
|
||||
for (auto index : indexListSorted)
|
||||
for (const auto& index : indexListSorted)
|
||||
{
|
||||
AZ::EntityId entityId(index.data(EntityOutlinerListModel::EntityIdRole).value<AZ::u64>());
|
||||
AzToolsFramework::GetEntityLocationInHierarchy(entityId, locations[entityId]);
|
||||
@@ -263,76 +259,8 @@ namespace AzToolsFramework
|
||||
return AZStd::lexicographical_compare(locationsE1.begin(), locationsE1.end(), locationsE2.begin(), locationsE2.end());
|
||||
});
|
||||
|
||||
//get the data for the unselected item(s)
|
||||
QMimeData* mimeData = model()->mimeData(indexListSorted);
|
||||
if (mimeData)
|
||||
{
|
||||
//initiate drag/drop for the item
|
||||
QDrag* drag = new QDrag(this);
|
||||
drag->setPixmap(QPixmap::fromImage(createDragImage(indexListSorted)));
|
||||
drag->setMimeData(mimeData);
|
||||
Qt::DropAction defDropAction = Qt::IgnoreAction;
|
||||
if (defaultDropAction() != Qt::IgnoreAction && (supportedActions & defaultDropAction()))
|
||||
{
|
||||
defDropAction = defaultDropAction();
|
||||
}
|
||||
else if (supportedActions & Qt::CopyAction && dragDropMode() != QAbstractItemView::InternalMove)
|
||||
{
|
||||
defDropAction = Qt::CopyAction;
|
||||
}
|
||||
drag->exec(supportedActions, defDropAction);
|
||||
}
|
||||
StyledTreeView::StartCustomDrag(indexListSorted, supportedActions);
|
||||
}
|
||||
|
||||
QImage EntityOutlinerTreeView::createDragImage(const QModelIndexList& indexList)
|
||||
{
|
||||
//generate a drag image of the item icon and text, normally done internally, and inaccessible
|
||||
QRect rect(0, 0, 0, 0);
|
||||
for (auto index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
QRect itemRect = visualRect(index);
|
||||
rect.setHeight(rect.height() + itemRect.height());
|
||||
rect.setWidth(AZStd::GetMax(rect.width(), itemRect.width()));
|
||||
}
|
||||
|
||||
QImage dragImage(rect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
|
||||
QPainter dragPainter(&dragImage);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_Source);
|
||||
dragPainter.fillRect(dragImage.rect(), Qt::transparent);
|
||||
dragPainter.setCompositionMode(QPainter::CompositionMode_SourceOver);
|
||||
dragPainter.setOpacity(0.35f);
|
||||
dragPainter.fillRect(rect, QColor("#222222"));
|
||||
dragPainter.setOpacity(1.0f);
|
||||
|
||||
int imageY = 0;
|
||||
for (auto index : indexList)
|
||||
{
|
||||
if (index.column() != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QRect itemRect = visualRect(index);
|
||||
dragPainter.drawPixmap(QPoint(0, imageY),
|
||||
model()->data(index, Qt::DecorationRole).value<QIcon>().pixmap(QSize(16, 16)));
|
||||
dragPainter.setPen(
|
||||
model()->data(index, Qt::ForegroundRole).value<QBrush>().color());
|
||||
dragPainter.setFont(
|
||||
font());
|
||||
dragPainter.drawText(QRect(20, imageY, rect.width() - 20, rect.height()),
|
||||
model()->data(index, Qt::DisplayRole).value<QString>());
|
||||
imageY += itemRect.height();
|
||||
}
|
||||
|
||||
dragPainter.end();
|
||||
return dragImage;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#include <UI/Outliner/moc_EntityOutlinerTreeView.cpp>
|
||||
|
||||
+4
-5
@@ -14,7 +14,8 @@
|
||||
|
||||
#include <QBasicTimer>
|
||||
#include <QEvent>
|
||||
#include <QTreeView>
|
||||
|
||||
#include <AzQtComponents/Components/Widgets/TreeView.h>
|
||||
#endif
|
||||
|
||||
#pragma once
|
||||
@@ -33,7 +34,7 @@ namespace AzToolsFramework
|
||||
//! allow for dragging and dropping of entities from the outliner into the property editor
|
||||
//! of other entities. If the selection updates instantly, this would never be possible.
|
||||
class EntityOutlinerTreeView
|
||||
: public QTreeView
|
||||
: public AzQtComponents::StyledTreeView
|
||||
{
|
||||
Q_OBJECT;
|
||||
public:
|
||||
@@ -68,9 +69,7 @@ namespace AzToolsFramework
|
||||
|
||||
void processQueuedMousePressedEvent(QMouseEvent* event);
|
||||
|
||||
void startCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions);
|
||||
|
||||
QImage createDragImage(const QModelIndexList& indexList);
|
||||
void StartCustomDrag(const QModelIndexList& indexList, Qt::DropActions supportedActions) override;
|
||||
|
||||
void PaintBranchBackground(QPainter* painter, const QRect& rect, const QModelIndex& index) const;
|
||||
|
||||
|
||||
@@ -121,12 +121,6 @@ namespace AzTestRunner
|
||||
{
|
||||
const char* cwd = AzTestRunner::get_current_working_directory();
|
||||
std::cout << "cwd = " << cwd << std::endl;
|
||||
|
||||
for (int i = 0; i < argc; i++)
|
||||
{
|
||||
std::cout << "arg[" << i << "] " << argv[i] << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "LIB: " << lib << std::endl;
|
||||
}
|
||||
|
||||
@@ -227,6 +221,12 @@ namespace AzTestRunner
|
||||
testMainFunction.reset();
|
||||
}
|
||||
|
||||
// Construct a retry command if the test fails
|
||||
if (result != 0)
|
||||
{
|
||||
std::cout << "Retry command: " << std::endl << argv[0] << " " << lib << " " << symbol << std::endl;
|
||||
}
|
||||
|
||||
// unload and reset the module here, because it needs to release resources that were used / activated in
|
||||
// system allocator / etc.
|
||||
module.reset();
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace O3DE::ProjectManager
|
||||
NewProjectSettingsScreen::NewProjectSettingsScreen(QWidget* parent)
|
||||
: ProjectSettingsScreen(parent)
|
||||
{
|
||||
const QString defaultName{ "NewProject" };
|
||||
const QString defaultName = GetDefaultProjectName();
|
||||
const QString defaultPath = QDir::toNativeSeparators(GetDefaultProjectPath() + "/" + defaultName);
|
||||
|
||||
m_projectName->lineEdit()->setText(defaultName);
|
||||
@@ -162,6 +162,17 @@ namespace O3DE::ProjectManager
|
||||
return defaultPath;
|
||||
}
|
||||
|
||||
QString NewProjectSettingsScreen::GetDefaultProjectName()
|
||||
{
|
||||
return "NewProject";
|
||||
}
|
||||
|
||||
QString NewProjectSettingsScreen::GetProjectAutoPath()
|
||||
{
|
||||
const QString projectName = m_projectName->lineEdit()->text();
|
||||
return QDir::toNativeSeparators(GetDefaultProjectPath() + "/" + projectName);
|
||||
}
|
||||
|
||||
ProjectManagerScreen NewProjectSettingsScreen::GetScreenEnum()
|
||||
{
|
||||
return ProjectManagerScreen::NewProjectSettings;
|
||||
@@ -260,4 +271,22 @@ namespace O3DE::ProjectManager
|
||||
m_projectTemplateButtonGroup->blockSignals(false);
|
||||
}
|
||||
}
|
||||
void NewProjectSettingsScreen::OnProjectNameUpdated()
|
||||
{
|
||||
if (ValidateProjectName() && !m_userChangedProjectPath)
|
||||
{
|
||||
m_projectPath->setText(GetProjectAutoPath());
|
||||
}
|
||||
}
|
||||
|
||||
void NewProjectSettingsScreen::OnProjectPathUpdated()
|
||||
{
|
||||
const QString defaultPath = QDir::toNativeSeparators(GetDefaultProjectPath() + "/" + GetDefaultProjectName());
|
||||
const QString autoPath = GetProjectAutoPath();
|
||||
const QString path = m_projectPath->lineEdit()->text();
|
||||
m_userChangedProjectPath = path != defaultPath && path != autoPath;
|
||||
|
||||
ValidateProjectPath();
|
||||
}
|
||||
|
||||
} // namespace O3DE::ProjectManager
|
||||
|
||||
@@ -40,8 +40,14 @@ namespace O3DE::ProjectManager
|
||||
signals:
|
||||
void OnTemplateSelectionChanged(int oldIndex, int newIndex);
|
||||
|
||||
protected:
|
||||
void OnProjectNameUpdated() override;
|
||||
void OnProjectPathUpdated() override;
|
||||
|
||||
private:
|
||||
QString GetDefaultProjectName();
|
||||
QString GetDefaultProjectPath();
|
||||
QString GetProjectAutoPath();
|
||||
QFrame* CreateTemplateDetails(int margin);
|
||||
void UpdateTemplateDetails(const ProjectTemplateInfo& templateInfo);
|
||||
|
||||
@@ -51,6 +57,7 @@ namespace O3DE::ProjectManager
|
||||
TagContainerWidget* m_templateIncludedGems;
|
||||
QVector<ProjectTemplateInfo> m_templates;
|
||||
int m_selectedTemplateIndex = -1;
|
||||
bool m_userChangedProjectPath = false;
|
||||
|
||||
inline constexpr static int s_spacerSize = 20;
|
||||
inline constexpr static int s_templateDetailsContentMargin = 20;
|
||||
|
||||
@@ -40,12 +40,11 @@ namespace O3DE::ProjectManager
|
||||
m_verticalLayout->setAlignment(Qt::AlignTop);
|
||||
|
||||
m_projectName = new FormLineEditWidget(tr("Project name"), "", this);
|
||||
connect(m_projectName->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::ValidateProjectName);
|
||||
connect(m_projectName->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::OnProjectNameUpdated);
|
||||
m_verticalLayout->addWidget(m_projectName);
|
||||
|
||||
m_projectPath = new FormFolderBrowseEditWidget(tr("Project Location"), "", this);
|
||||
m_projectPath->lineEdit()->setReadOnly(true);
|
||||
connect(m_projectPath->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::Validate);
|
||||
connect(m_projectPath->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::OnProjectPathUpdated);
|
||||
m_verticalLayout->addWidget(m_projectPath);
|
||||
|
||||
projectSettingsFrame->setLayout(m_verticalLayout);
|
||||
@@ -110,28 +109,36 @@ namespace O3DE::ProjectManager
|
||||
m_projectName->setErrorLabelVisible(!projectNameIsValid);
|
||||
return projectNameIsValid;
|
||||
}
|
||||
|
||||
bool ProjectSettingsScreen::ValidateProjectPath()
|
||||
{
|
||||
bool projectPathIsValid = true;
|
||||
if (m_projectPath->lineEdit()->text().isEmpty())
|
||||
QDir path(m_projectPath->lineEdit()->text());
|
||||
if (!path.isAbsolute())
|
||||
{
|
||||
projectPathIsValid = false;
|
||||
m_projectPath->setErrorLabelText(tr("Please provide a valid location."));
|
||||
m_projectPath->setErrorLabelText(tr("Please provide an absolute path for the project location."));
|
||||
}
|
||||
else
|
||||
else if (path.exists() && !path.isEmpty())
|
||||
{
|
||||
QDir path(m_projectPath->lineEdit()->text());
|
||||
if (path.exists() && !path.isEmpty())
|
||||
{
|
||||
projectPathIsValid = false;
|
||||
m_projectPath->setErrorLabelText(tr("This folder exists and isn't empty. Please choose a different location."));
|
||||
}
|
||||
projectPathIsValid = false;
|
||||
m_projectPath->setErrorLabelText(tr("This folder exists and isn't empty. Please choose a different location."));
|
||||
}
|
||||
|
||||
m_projectPath->setErrorLabelVisible(!projectPathIsValid);
|
||||
return projectPathIsValid;
|
||||
}
|
||||
|
||||
void ProjectSettingsScreen::OnProjectNameUpdated()
|
||||
{
|
||||
ValidateProjectName();
|
||||
}
|
||||
|
||||
void ProjectSettingsScreen::OnProjectPathUpdated()
|
||||
{
|
||||
Validate();
|
||||
}
|
||||
|
||||
bool ProjectSettingsScreen::Validate()
|
||||
{
|
||||
return ValidateProjectName() && ValidateProjectPath();
|
||||
|
||||
@@ -33,10 +33,13 @@ namespace O3DE::ProjectManager
|
||||
virtual bool Validate();
|
||||
|
||||
protected slots:
|
||||
virtual bool ValidateProjectName();
|
||||
virtual bool ValidateProjectPath();
|
||||
virtual void OnProjectNameUpdated();
|
||||
virtual void OnProjectPathUpdated();
|
||||
|
||||
protected:
|
||||
bool ValidateProjectName();
|
||||
virtual bool ValidateProjectPath();
|
||||
|
||||
QString GetDefaultProjectPath();
|
||||
|
||||
QHBoxLayout* m_horizontalLayout;
|
||||
|
||||
@@ -108,10 +108,11 @@ namespace O3DE::ProjectManager
|
||||
bool UpdateProjectSettingsScreen::ValidateProjectPath()
|
||||
{
|
||||
bool projectPathIsValid = true;
|
||||
if (m_projectPath->lineEdit()->text().isEmpty())
|
||||
QDir path(m_projectPath->lineEdit()->text());
|
||||
if (!path.isAbsolute())
|
||||
{
|
||||
projectPathIsValid = false;
|
||||
m_projectPath->setErrorLabelText(tr("Please provide a valid location."));
|
||||
m_projectPath->setErrorLabelText(tr("Please provide an absolute path for the project location."));
|
||||
}
|
||||
|
||||
m_projectPath->setErrorLabelVisible(!projectPathIsValid);
|
||||
|
||||
@@ -105,6 +105,8 @@ class ViewEditController(QObject):
|
||||
|
||||
def _create_new_config_file(self) -> None:
|
||||
configuration: Configuration = self._configuration_manager.configuration
|
||||
self._set_default_region(configuration)
|
||||
|
||||
try:
|
||||
new_config_file_path: str = file_utils.join_path(
|
||||
configuration.config_directory, constants.RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_NAME)
|
||||
@@ -117,6 +119,15 @@ class ViewEditController(QObject):
|
||||
|
||||
self._rescan_config_directory()
|
||||
|
||||
def _set_default_region(self, configuration: Configuration):
|
||||
default_region = configuration.region
|
||||
if not default_region or default_region == 'aws-global':
|
||||
self.set_notification_frame_text_sender.emit(
|
||||
notification_label_text.VIEW_EDIT_PAGE_CREATE_NEW_CONFIG_FILE_NO_DEFAULT_REGION_MESSAGE)
|
||||
logger.warning(notification_label_text.VIEW_EDIT_PAGE_CREATE_NEW_CONFIG_FILE_NO_DEFAULT_REGION_MESSAGE)
|
||||
|
||||
configuration.region = constants.RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_REGION
|
||||
|
||||
def _delete_table_row(self) -> None:
|
||||
indices: List[QModelIndex] = self._table_view.selectedIndexes()
|
||||
self._proxy_model.remove_resources(indices)
|
||||
|
||||
@@ -24,6 +24,7 @@ AWS_RESOURCE_REGIONS: List[str] = ["us-east-2", "us-east-1", "us-west-1", "us-we
|
||||
# Default client&server config file name
|
||||
RESOURCE_MAPPING_CONFIG_FILE_NAME_SUFFIX: str = "_aws_resource_mappings.json"
|
||||
RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_NAME: str = "default" + RESOURCE_MAPPING_CONFIG_FILE_NAME_SUFFIX
|
||||
RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_REGION: str = "us-east-1"
|
||||
|
||||
# View related constants
|
||||
SEARCH_TYPED_RESOURCES_VERSION: str = "Import AWS Resources"
|
||||
|
||||
@@ -5,6 +5,8 @@ For complete copyright and license terms please see the LICENSE at the root of t
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
"""
|
||||
|
||||
from model import constants
|
||||
|
||||
NOTIFICATION_LOADING_MESSAGE: str = "Loading..."
|
||||
|
||||
ERROR_PAGE_OK_TEXT: str = "OK"
|
||||
@@ -21,6 +23,12 @@ VIEW_EDIT_PAGE_RESCAN_TEXT: str = "Rescan"
|
||||
VIEW_EDIT_PAGE_CONFIG_FILES_PLACEHOLDER_TEXT: str = "Found {} config files"
|
||||
VIEW_EDIT_PAGE_SEARCH_PLACEHOLDER_TEXT: str = "Search by Key Name, Type, Name/ID, Account ID or Region"
|
||||
VIEW_EDIT_PAGE_IMPORT_RESOURCES_PLACEHOLDER_TEXT: str = "Import Additional Resources"
|
||||
VIEW_EDIT_PAGE_CREATE_NEW_CONFIG_FILE_NO_DEFAULT_REGION_MESSAGE: str = \
|
||||
f"Resource mapping file {constants.RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_NAME} is created"\
|
||||
f" with {constants.RESOURCE_MAPPING_DEFAULT_CONFIG_FILE_REGION} as the default region. "\
|
||||
f"See <a href=\"https://docs.o3de.org/docs/user-guide/gems/reference/aws/aws-core/configuring-credentials/\">"\
|
||||
f"<span style=\"color:#4A90E2;\">documentation</span></a> "\
|
||||
f"for configuring the AWS credentials and default region."
|
||||
|
||||
VIEW_EDIT_PAGE_SELECT_CONFIG_FILE_MESSAGE: str = "Please select the Config file you would like to view and modify..."
|
||||
VIEW_EDIT_PAGE_NO_CONFIG_FILE_FOUND_MESSAGE: str = \
|
||||
|
||||
+2
-1
@@ -482,6 +482,7 @@ class TestViewEditController(TestCase):
|
||||
mock_json_utils.create_empty_resource_mapping_file.assert_called_once()
|
||||
mock_file_utils.find_files_with_suffix_under_directory.assert_called_once()
|
||||
self._mocked_view_edit_page.set_config_files.assert_called_with(expected_config_files)
|
||||
self._test_view_edit_controller.set_notification_frame_text_sender.emit.assert_called_once()
|
||||
|
||||
@patch("controller.view_edit_controller.file_utils")
|
||||
@patch("controller.view_edit_controller.json_utils")
|
||||
@@ -496,7 +497,7 @@ class TestViewEditController(TestCase):
|
||||
mock_file_utils.join_path.assert_called_once()
|
||||
mock_json_utils.create_empty_resource_mapping_file.assert_called_once()
|
||||
mock_file_utils.find_files_with_suffix_under_directory.assert_not_called()
|
||||
self._test_view_edit_controller.set_notification_frame_text_sender.emit.assert_called_once()
|
||||
assert len(self._test_view_edit_controller.set_notification_frame_text_sender.emit.mock_calls) == 2
|
||||
|
||||
@patch("controller.view_edit_controller.file_utils")
|
||||
def test_page_rescan_button_post_notification_when_find_files_throw_exception(
|
||||
|
||||
@@ -42,4 +42,4 @@ namespace AWSGameLift
|
||||
};
|
||||
}// namespace AWSGameLift
|
||||
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_AWSGameLift_Client, AWSGameLift::AWSGameLiftClientModule)
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_AWSGameLift_Clients, AWSGameLift::AWSGameLiftClientModule)
|
||||
|
||||
@@ -42,4 +42,4 @@ namespace AWSGameLift
|
||||
};
|
||||
}// namespace AWSGameLift
|
||||
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_AWSGameLift_Server, AWSGameLift::AWSGameLiftServerModule)
|
||||
AZ_DECLARE_MODULE_CLASS(Gem_AWSGameLift_Servers, AWSGameLift::AWSGameLiftServerModule)
|
||||
|
||||
@@ -125,7 +125,6 @@ namespace AZ
|
||||
Format GetNearestSupportedFormat(Format requestedFormat, FormatCapabilities requestedCapabilities) const;
|
||||
|
||||
//! Small API to support getting supported/working swapchain formats for a window.
|
||||
//! [GFX TODO]ATOM-1125] [RHI] Device::GetValidSwapChainImageFormats()
|
||||
//! Returns the set of supported formats for swapchain images.
|
||||
virtual AZStd::vector<Format> GetValidSwapChainImageFormats(const WindowHandle& windowHandle) const;
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Aftermath
|
||||
#if defined(USE_NSIGHT_AFTERMATH)
|
||||
AZStd::vector<GFSDK_Aftermath_ContextHandle> cntxtHandles = static_cast<GpuCrashTracker*>(crashTracker)->GetContextHandles();
|
||||
GFSDK_Aftermath_ContextData* outContextData = new GFSDK_Aftermath_ContextData[cntxtHandles.size()];
|
||||
GFSDK_Aftermath_Result result = GFSDK_Aftermath_GetData(cntxtHandles.size(), cntxtHandles.data(), outContextData);
|
||||
GFSDK_Aftermath_Result result = GFSDK_Aftermath_GetData(static_cast<uint32_t>(cntxtHandles.size()), cntxtHandles.data(), outContextData);
|
||||
AssertOnError(result);
|
||||
for (int i = 0; i < cntxtHandles.size(); i++)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace Metal
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace Metal
|
||||
|
||||
@@ -77,7 +77,6 @@ namespace AZ
|
||||
|
||||
m_samplerCache = [[NSCache alloc]init];
|
||||
[m_samplerCache setName:@"SamplerCache"];
|
||||
|
||||
return RHI::ResultCode::Success;
|
||||
}
|
||||
|
||||
|
||||
@@ -74,21 +74,16 @@ namespace AZ
|
||||
AddSubView();
|
||||
}
|
||||
|
||||
m_refreshRate = Platform::GetRefreshRate();
|
||||
|
||||
//Assume 60hz if 0 is returned.
|
||||
//Internal OSX displays have 'flexible' refresh rates, with a max of 60Hz - but report 0hz
|
||||
if (m_refreshRate < 0.1f)
|
||||
{
|
||||
m_refreshRate = 60.0f;
|
||||
}
|
||||
|
||||
m_drawables.resize(descriptor.m_dimensions.m_imageCount);
|
||||
|
||||
if (nativeDimensions)
|
||||
{
|
||||
*nativeDimensions = descriptor.m_dimensions;
|
||||
}
|
||||
|
||||
AzFramework::WindowRequestBus::EventResult(
|
||||
m_refreshRate, m_nativeWindow, &AzFramework::WindowRequestBus::Events::GetDisplayRefreshRate);
|
||||
|
||||
return RHI::ResultCode::Success;
|
||||
}
|
||||
|
||||
@@ -160,7 +155,10 @@ namespace AZ
|
||||
const uint32_t currentImageIndex = GetCurrentImageIndex();
|
||||
|
||||
//Preset the drawable
|
||||
Platform::PresentInternal(m_mtlCommandBuffer, m_drawables[currentImageIndex], GetDescriptor().m_verticalSyncInterval, m_refreshRate);
|
||||
Platform::PresentInternal(
|
||||
m_mtlCommandBuffer,
|
||||
m_drawables[currentImageIndex], GetDescriptor().m_verticalSyncInterval,
|
||||
m_refreshRate);
|
||||
|
||||
[m_drawables[currentImageIndex] release];
|
||||
m_drawables[currentImageIndex] = nil;
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace AZ
|
||||
id<MTLDevice> m_mtlDevice = nil;
|
||||
NativeWindowType* m_nativeWindow = nullptr;
|
||||
AZStd::vector<id<CAMetalDrawable>> m_drawables;
|
||||
float m_refreshRate = 0.0f;
|
||||
uint32_t m_refreshRate = 0;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,35 @@ namespace AZ
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::MultiSampleReadOnly2D)].m_sampleCountFlag = VK_SAMPLE_COUNT_4_BIT;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::MultiSampleReadOnly2D)].m_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)] = {};
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_name = "NULL_DESCRIPTOR_GENERAL_ARRAY_2D";
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_sampleCountFlag = VK_SAMPLE_COUNT_1_BIT;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_usageFlagBits =VkImageUsageFlagBits(VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT);
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_arrayLayers = 1;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_imageCreateFlagBits = VkImageCreateFlagBits(0);
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralArray2D)].m_dimension = imageDimension;
|
||||
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)] = m_imageNullDescriptor.m_images[static_cast<uint32_t>(NullDescriptorManager::ImageTypes::GeneralArray2D)];
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_name = "NULL_DESCRIPTOR_READONLY_ARRAY_2D";
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_sampleCountFlag = VK_SAMPLE_COUNT_1_BIT;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_format = VK_FORMAT_R8G8B8A8_SRGB;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_usageFlagBits = VkImageUsageFlagBits(VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT);
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_arrayLayers = 1;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_imageCreateFlagBits = VkImageCreateFlagBits(0);
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::ReadOnlyArray2D)].m_dimension = imageDimension;
|
||||
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)] = m_imageNullDescriptor.m_images[static_cast<uint32_t>(NullDescriptorManager::ImageTypes::General2D)];
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_name = "NULL_DESCRIPTOR_STORAGE_ARRAY_2D";
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_sampleCountFlag = VK_SAMPLE_COUNT_1_BIT;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_format = VK_FORMAT_R32G32B32A32_UINT;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_usageFlagBits = VkImageUsageFlagBits(VK_IMAGE_USAGE_TRANSFER_DST_BIT | VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_STORAGE_BIT);
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_arrayLayers = 1;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_layout = VK_IMAGE_LAYOUT_GENERAL;
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::StorageArray2D)].m_dimension = 256;
|
||||
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralCube)] = m_imageNullDescriptor.m_images[static_cast<uint32_t>(NullDescriptorManager::ImageTypes::General2D)];
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralCube)].m_name = "NULL_DESCRIPTOR_GENERAL_CUBE";
|
||||
m_imageNullDescriptor.m_images[static_cast<uint32_t>(ImageTypes::GeneralCube)].m_arrayLayers = 6;
|
||||
@@ -243,6 +272,10 @@ namespace AZ
|
||||
{
|
||||
imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_3D;
|
||||
}
|
||||
else if (imageIndex >= static_cast<uint32_t>(ImageTypes::GeneralArray2D) && imageIndex <= static_cast<uint32_t>(ImageTypes::StorageArray2D))
|
||||
{
|
||||
imageViewCreateInfo.viewType = VK_IMAGE_VIEW_TYPE_2D_ARRAY;
|
||||
}
|
||||
|
||||
result = vkCreateImageView(device.GetNativeDevice(), &imageViewCreateInfo, nullptr, &m_imageNullDescriptor.m_images[imageIndex].m_view);
|
||||
RETURN_RESULT_IF_UNSUCCESSFUL(ConvertResult(result));
|
||||
@@ -366,7 +399,7 @@ namespace AZ
|
||||
|
||||
VkDescriptorImageInfo NullDescriptorManager::GetDescriptorImageInfo(RHI::ShaderInputImageType imageType, bool storageImage)
|
||||
{
|
||||
if (imageType == RHI::ShaderInputImageType::Image2D || imageType == RHI::ShaderInputImageType::Image2DArray)
|
||||
if (imageType == RHI::ShaderInputImageType::Image2D)
|
||||
{
|
||||
if (storageImage)
|
||||
{
|
||||
@@ -377,6 +410,17 @@ namespace AZ
|
||||
return GetImage(ImageTypes::ReadOnly2D);
|
||||
}
|
||||
}
|
||||
else if (imageType == RHI::ShaderInputImageType::Image2DArray)
|
||||
{
|
||||
if (storageImage)
|
||||
{
|
||||
return GetImage(ImageTypes::StorageArray2D);
|
||||
}
|
||||
else
|
||||
{
|
||||
return GetImage(ImageTypes::ReadOnlyArray2D);
|
||||
}
|
||||
}
|
||||
else if (imageType == RHI::ShaderInputImageType::Image2DMultisample)
|
||||
{
|
||||
if (storageImage)
|
||||
|
||||
@@ -30,6 +30,11 @@ namespace AZ
|
||||
MultiSampleGeneral2D,
|
||||
MultiSampleReadOnly2D,
|
||||
|
||||
// 2d image arrays
|
||||
GeneralArray2D,
|
||||
ReadOnlyArray2D,
|
||||
StorageArray2D,
|
||||
|
||||
// cube images
|
||||
GeneralCube,
|
||||
ReadOnlyCube,
|
||||
|
||||
@@ -17,19 +17,6 @@
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/Math/MathUtils.h>
|
||||
|
||||
|
||||
void OnVsyncIntervalChanged(uint32_t const& interval)
|
||||
{
|
||||
AzFramework::WindowNotificationBus::Broadcast(
|
||||
&AzFramework::WindowNotificationBus::Events::OnVsyncIntervalChanged,
|
||||
AZ::GetClamp(interval, 0u, 4u));
|
||||
}
|
||||
|
||||
// NOTE: On change, broadcasts the new requested vsync interval to all windows.
|
||||
// The value of the vsync interval is constrained between 0 and 4
|
||||
// Vsync intervals greater than 1 are not currently supported on the Vulkan RHI (see #2061 for discussion)
|
||||
AZ_CVAR(uint32_t, rpi_vsync_interval, 1, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace RPI
|
||||
@@ -158,9 +145,13 @@ namespace AZ
|
||||
|
||||
const RHI::WindowHandle windowHandle = RHI::WindowHandle(reinterpret_cast<uintptr_t>(m_windowHandle));
|
||||
|
||||
uint32_t syncInterval = 1;
|
||||
AzFramework::WindowRequestBus::EventResult(
|
||||
syncInterval, m_windowHandle, &AzFramework::WindowRequestBus::Events::GetSyncInterval);
|
||||
|
||||
RHI::SwapChainDescriptor descriptor;
|
||||
descriptor.m_window = windowHandle;
|
||||
descriptor.m_verticalSyncInterval = rpi_vsync_interval;
|
||||
descriptor.m_verticalSyncInterval = syncInterval;
|
||||
descriptor.m_dimensions.m_imageWidth = width;
|
||||
descriptor.m_dimensions.m_imageHeight = height;
|
||||
descriptor.m_dimensions.m_imageCount = 3;
|
||||
|
||||
+2
@@ -121,6 +121,8 @@ namespace AtomToolsFramework
|
||||
bool CanToggleFullScreenState() const override;
|
||||
void ToggleFullScreenState() override;
|
||||
float GetDpiScaleFactor() const override;
|
||||
uint32_t GetSyncInterval() const override;
|
||||
uint32_t GetDisplayRefreshRate() const;
|
||||
|
||||
protected:
|
||||
// AzFramework::InputChannelEventListener ...
|
||||
|
||||
+2
-3
@@ -16,8 +16,8 @@
|
||||
#include <AzQtComponents/Components/StyledDockWidget.h>
|
||||
#include <AzQtComponents/Components/Widgets/TabWidget.h>
|
||||
|
||||
#include <QLabel>
|
||||
#include <QMenuBar>
|
||||
#include <QStatusBar>
|
||||
#include <QToolBar>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
@@ -53,10 +53,9 @@ namespace AtomToolsFramework
|
||||
virtual void SelectNextTab();
|
||||
|
||||
AzQtComponents::FancyDocking* m_advancedDockManager = nullptr;
|
||||
QWidget* m_centralWidget = nullptr;
|
||||
QMenuBar* m_menuBar = nullptr;
|
||||
AzQtComponents::TabWidget* m_tabWidget = nullptr;
|
||||
QStatusBar* m_statusBar = nullptr;
|
||||
QLabel* m_statusMessage = nullptr;
|
||||
|
||||
AZStd::unordered_map<AZStd::string, AzQtComponents::StyledDockWidget*> m_dockWidgets;
|
||||
};
|
||||
|
||||
@@ -8,20 +8,23 @@
|
||||
|
||||
#include <AtomToolsFrameworkModule.h>
|
||||
#include <AtomToolsFrameworkSystemComponent.h>
|
||||
#include <Window/AtomToolsMainWindowSystemComponent.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
AtomToolsFrameworkModule::AtomToolsFrameworkModule()
|
||||
{
|
||||
m_descriptors.insert(m_descriptors.end(), {
|
||||
AtomToolsFrameworkSystemComponent::CreateDescriptor(),
|
||||
});
|
||||
AtomToolsFrameworkSystemComponent::CreateDescriptor(),
|
||||
AtomToolsMainWindowSystemComponent::CreateDescriptor(),
|
||||
});
|
||||
}
|
||||
|
||||
AZ::ComponentTypeList AtomToolsFrameworkModule::GetRequiredSystemComponents() const
|
||||
{
|
||||
return AZ::ComponentTypeList{
|
||||
azrtti_typeid<AtomToolsFrameworkSystemComponent>(),
|
||||
azrtti_typeid<AtomToolsMainWindowSystemComponent>(),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,4 +465,14 @@ namespace AtomToolsFramework
|
||||
{
|
||||
return aznumeric_cast<float>(devicePixelRatioF());
|
||||
}
|
||||
|
||||
uint32_t RenderViewportWidget::GetDisplayRefreshRate() const
|
||||
{
|
||||
return 60;
|
||||
}
|
||||
|
||||
uint32_t RenderViewportWidget::GetSyncInterval() const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
} //namespace AtomToolsFramework
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindow.h>
|
||||
#include <QStatusBar>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
@@ -21,11 +23,15 @@ namespace AtomToolsFramework
|
||||
setCorner(Qt::TopRightCorner, Qt::RightDockWidgetArea);
|
||||
setCorner(Qt::BottomRightCorner, Qt::RightDockWidgetArea);
|
||||
|
||||
m_statusBar = new QStatusBar(this);
|
||||
m_statusBar->setObjectName("StatusBar");
|
||||
statusBar()->addPermanentWidget(m_statusBar, 1);
|
||||
m_statusMessage = new QLabel(statusBar());
|
||||
statusBar()->addPermanentWidget(m_statusMessage, 1);
|
||||
|
||||
m_centralWidget = new QWidget(this);
|
||||
auto centralWidget = new QWidget(this);
|
||||
auto centralWidgetLayout = new QVBoxLayout(centralWidget);
|
||||
centralWidgetLayout->setMargin(0);
|
||||
centralWidgetLayout->setContentsMargins(0, 0, 0, 0);
|
||||
centralWidget->setLayout(centralWidgetLayout);
|
||||
setCentralWidget(centralWidget);
|
||||
|
||||
AtomToolsMainWindowRequestBus::Handler::BusConnect();
|
||||
}
|
||||
@@ -111,7 +117,7 @@ namespace AtomToolsFramework
|
||||
|
||||
void AtomToolsMainWindow::CreateTabBar()
|
||||
{
|
||||
m_tabWidget = new AzQtComponents::TabWidget(m_centralWidget);
|
||||
m_tabWidget = new AzQtComponents::TabWidget(centralWidget());
|
||||
m_tabWidget->setObjectName("TabWidget");
|
||||
m_tabWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Preferred);
|
||||
m_tabWidget->setContentsMargins(0, 0, 0, 0);
|
||||
@@ -131,6 +137,8 @@ namespace AtomToolsFramework
|
||||
{
|
||||
OpenTabContextMenu();
|
||||
});
|
||||
|
||||
centralWidget()->layout()->addWidget(m_tabWidget);
|
||||
}
|
||||
|
||||
void AtomToolsMainWindow::AddTabForDocumentId(
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* 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 <AtomToolsFramework/Window/AtomToolsMainWindowFactoryRequestBus.h>
|
||||
#include <AtomToolsFramework/Window/AtomToolsMainWindowRequestBus.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/Serialization/EditContext.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <Window/AtomToolsMainWindowSystemComponent.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
void AtomToolsMainWindowSystemComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serialize->Class<AtomToolsMainWindowSystemComponent, AZ::Component>()
|
||||
->Version(0);
|
||||
}
|
||||
|
||||
if (AZ::BehaviorContext* behaviorContext = azrtti_cast<AZ::BehaviorContext*>(context))
|
||||
{
|
||||
behaviorContext->EBus<AtomToolsMainWindowFactoryRequestBus>("AtomToolsMainWindowFactoryRequestBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "atomtools")
|
||||
->Event("CreateMainWindow", &AtomToolsMainWindowFactoryRequestBus::Events::CreateMainWindow)
|
||||
->Event("DestroyMainWindow", &AtomToolsMainWindowFactoryRequestBus::Events::DestroyMainWindow)
|
||||
;
|
||||
|
||||
behaviorContext->EBus<AtomToolsMainWindowRequestBus>("AtomToolsMainWindowRequestBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "atomtools")
|
||||
->Event("ActivateWindow", &AtomToolsMainWindowRequestBus::Events::ActivateWindow)
|
||||
->Event("SetDockWidgetVisible", &AtomToolsMainWindowRequestBus::Events::SetDockWidgetVisible)
|
||||
->Event("IsDockWidgetVisible", &AtomToolsMainWindowRequestBus::Events::IsDockWidgetVisible)
|
||||
->Event("GetDockWidgetNames", &AtomToolsMainWindowRequestBus::Events::GetDockWidgetNames)
|
||||
->Event("ResizeViewportRenderTarget", &AtomToolsMainWindowRequestBus::Events::ResizeViewportRenderTarget)
|
||||
->Event("LockViewportRenderTargetSize", &AtomToolsMainWindowRequestBus::Events::LockViewportRenderTargetSize)
|
||||
->Event("UnlockViewportRenderTargetSize", &AtomToolsMainWindowRequestBus::Events::UnlockViewportRenderTargetSize)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
void AtomToolsMainWindowSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
|
||||
{
|
||||
provided.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService"));
|
||||
}
|
||||
|
||||
void AtomToolsMainWindowSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
|
||||
{
|
||||
incompatible.push_back(AZ_CRC_CE("AtomToolsMainWindowSystemService"));
|
||||
}
|
||||
|
||||
void AtomToolsMainWindowSystemComponent::Init()
|
||||
{
|
||||
}
|
||||
|
||||
void AtomToolsMainWindowSystemComponent::Activate()
|
||||
{
|
||||
}
|
||||
|
||||
void AtomToolsMainWindowSystemComponent::Deactivate()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace AtomToolsFramework
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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/Component/Component.h>
|
||||
|
||||
namespace AtomToolsFramework
|
||||
{
|
||||
//! AtomToolsMainWindowSystemComponent is used for initialization and registration of other classes.
|
||||
class AtomToolsMainWindowSystemComponent
|
||||
: public AZ::Component
|
||||
{
|
||||
public:
|
||||
AZ_COMPONENT(AtomToolsMainWindowSystemComponent, "{6E42380B-4ECD-47CF-B904-E16AB4E87D0D}");
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
|
||||
static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
|
||||
|
||||
private:
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// AZ::Component interface implementation
|
||||
void Init() override;
|
||||
void Activate() override;
|
||||
void Deactivate() override;
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user