clean up comments, add set type action in disabled form
Signed-off-by: carlitosan <82187351+carlitosan@users.noreply.github.com>
This commit is contained in:
@@ -328,7 +328,6 @@ namespace GraphCanvas
|
||||
|
||||
bool DataSlotComponent::CanConvertToReference([[maybe_unused]] bool isNewSlot) const
|
||||
{
|
||||
// #sc_user_slot_variable_ux make sure this can be converted to reference, or created as one
|
||||
bool canToggleReference = false;
|
||||
|
||||
if (m_canConvertSlotTypes && DataSlotUtils::IsValueDataSlotType(m_dataSlotType) && !HasConnections())
|
||||
|
||||
@@ -667,7 +667,6 @@ namespace ScriptCanvasEditor
|
||||
}
|
||||
|
||||
// Now that the slot has a valid type/name, we can actually promote it to a variable
|
||||
// #sc_user_slot_variable_ux add a value indicating that the slot is new
|
||||
if (PromoteToVariableAction(endpoint, true))
|
||||
{
|
||||
ScriptCanvas::GraphVariable* variable = slot->GetVariable();
|
||||
@@ -2191,7 +2190,6 @@ namespace ScriptCanvasEditor
|
||||
|
||||
bool Graph::PromoteToVariableAction(const GraphCanvas::Endpoint& endpoint, bool isNewSlot)
|
||||
{
|
||||
// #sc_user_slot_variable_ux make the fix here...rework is user added or something
|
||||
ScriptCanvas::Endpoint scriptCanvasEndpoint = ConvertToScriptCanvasEndpoint(endpoint);
|
||||
|
||||
auto activeNode = FindNode(scriptCanvasEndpoint.GetNodeId());
|
||||
@@ -2283,7 +2281,6 @@ namespace ScriptCanvasEditor
|
||||
|
||||
AZ::Outcome<ScriptCanvas::VariableId, AZStd::string> addOutcome;
|
||||
|
||||
// #sc_user_slot_variable_ux re-use the activeDatum, send the pointer (actually, all of the source slot information, and make a special conversion)
|
||||
ScriptCanvas::GraphVariableManagerRequestBus::EventResult(addOutcome, GetScriptCanvasId(), &ScriptCanvas::GraphVariableManagerRequests::AddVariable, variableName, variableDatum, true);
|
||||
|
||||
if (addOutcome.IsSuccess())
|
||||
|
||||
@@ -3874,8 +3874,12 @@ namespace ScriptCanvasEditor
|
||||
contextMenu.AddMenuAction(aznew ExposeSlotMenuAction(&contextMenu));
|
||||
contextMenu.AddMenuAction(aznew CreateAzEventHandlerSlotMenuAction(&contextMenu));
|
||||
|
||||
// disabling until references can be changed
|
||||
// contextMenu.AddMenuAction(aznew SetDataSlotTypeMenuAction(&contextMenu));
|
||||
auto setSlotTypeAction = aznew SetDataSlotTypeMenuAction(&contextMenu);
|
||||
// Changing slot type is disabled temporarily because now that that user data slots are correctly coordinated with their reference
|
||||
// variables, their type cannot be changed. The next change will allow all variables to change their type post creation, and then
|
||||
// that will allow this action to be enabled.
|
||||
setSlotTypeAction->setEnabled(false);
|
||||
contextMenu.AddMenuAction(setSlotTypeAction);
|
||||
|
||||
return HandleContextMenu(contextMenu, slotId, screenPoint, scenePoint);
|
||||
}
|
||||
|
||||
@@ -462,7 +462,6 @@ namespace ScriptCanvas
|
||||
|
||||
bool Slot::CanConvertToReference(bool isNewSlot) const
|
||||
{
|
||||
// #sc_user_slot_variable_ux make sure this can be converted to reference, or created as one
|
||||
return (!m_isUserAdded || isNewSlot) && CanConvertTypes() && !m_isVariableReference && !m_node->HasConnectedNodes((*this));
|
||||
}
|
||||
|
||||
|
||||
@@ -237,7 +237,7 @@ namespace ScriptCanvas
|
||||
|
||||
if (auto datum = variablePair.second.GetDatum())
|
||||
{
|
||||
// #sc_user_slot_variable_ux consider getting all variables from the UX variable manager, or from the ACM and looking them up in the variable manager for ordering
|
||||
// #functions2 slot<->variable consider getting all variables from the UX variable manager, or from the ACM and looking them up in the variable manager for ordering
|
||||
m_sourceVariableByDatum.insert(AZStd::make_pair(datum, &variablePair.second));
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ namespace ScriptCanvas
|
||||
auto datum = sourceVariable->GetDatum();
|
||||
AZ_Assert(datum != nullptr, "the datum must be valid");
|
||||
|
||||
// #sc_user_slot_variable_ux check to verify if it is a member variable
|
||||
// #functions2 slot<->variable check to verify if it is a member variable
|
||||
auto variable = sourceVariable->GetScope() == VariableFlags::Scope::Graph
|
||||
? AddMemberVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId())
|
||||
: AddVariable(*datum, sourceVariable->GetVariableName(), sourceVariable->GetVariableId());
|
||||
@@ -1670,7 +1670,7 @@ namespace ScriptCanvas
|
||||
|
||||
if (returnValue.second->m_source->m_sourceSlotId == slot->GetId())
|
||||
{
|
||||
// #sc_user_slot_variable_ux determine if the root or the function call should be passed in here...the slot/node lead to the user call on the thread, but it may not even be created yet
|
||||
// #functions2 slot<->variable determine if the root or the function call should be passed in here...the slot/node lead to the user call on the thread, but it may not even be created yet
|
||||
return AZStd::make_pair(root, returnValue.second->m_source);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,6 @@ namespace ScriptCanvas
|
||||
return AZ::Success(newId);
|
||||
}
|
||||
|
||||
// #sc_user_slot_variable_ux add this to the graph, using the old datum
|
||||
AZ::Outcome<VariableId, AZStd::string> GraphVariableManagerComponent::AddVariable(AZStd::string_view name, const Datum& value, bool functionScope)
|
||||
{
|
||||
if (FindVariable(name))
|
||||
|
||||
Reference in New Issue
Block a user