diff --git a/.github/scripts/check_file_version.ps1 b/.github/scripts/check_file_version.ps1
index a9c8a313824..816a480c007 100644
--- a/.github/scripts/check_file_version.ps1
+++ b/.github/scripts/check_file_version.ps1
@@ -68,7 +68,12 @@ $excludedFiles = @(
"TuneUp.dll",
"TuneUp.resources.dll",
"Units.dll",
- "Webview2Loader.dll"
+ "Webview2Loader.dll",
+ "DSPythonNet3.dll",
+ "DSPythonNet3.resources.dll",
+ "DSPythonNet3Extension.dll",
+ "DSPythonNet3Empty.dll",
+ "DSPythonNet3Wheels.dll"
)
$noVersion = @()
$wrongVersion = @()
diff --git a/doc/distrib/Samples/en-US/Core/Core_Math.dyn b/doc/distrib/Samples/en-US/Core/Core_Math.dyn
index c76ac7f8529..a0a4005d8bb 100644
--- a/doc/distrib/Samples/en-US/Core/Core_Math.dyn
+++ b/doc/distrib/Samples/en-US/Core/Core_Math.dyn
@@ -2015,7 +2015,7 @@
{
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"Code": "import clr\r\nclr.AddReference('ProtoGeometry')\r\nfrom Autodesk.DesignScript.Geometry import *\r\n\r\nimport math\r\n\r\n# The inputs to this node will be stored as a list in the IN variable.\r\namp = IN[0] # single value\r\nx = IN[1] # list\r\ny = IN[2] # list (expect same length as x)\r\nc = IN[3] # single value\r\n\r\n# Declare an empty array of z-values\r\nz = []\r\n\r\n# Solve the equation for each x and y value\r\nfor index in range(len(x)):\r\n\tsum = math.pow(x[index],2) + math.pow(y[index],2) + math.pow(c,2)\r\n\tnum1 = math.sqrt(sum)\r\n\tnum2 = math.sin(num1)\r\n\tzVal = amp * num2 / num1\r\n\t\r\n\t# Append the answer to the list of z values\r\n\tz.append(zVal)\r\n\r\n# Assign the z-values to the OUT variable\r\nOUT = z",
- "Engine": "CPython3",
+ "Engine": "PythonNet3",
"VariableInputPorts": true,
"Id": "7024be7096c74f46a832ce5749bba59a",
"NodeType": "PythonScriptNode",
diff --git a/doc/distrib/Samples/en-US/Core/Core_Python.dyn b/doc/distrib/Samples/en-US/Core/Core_Python.dyn
index 53e7d1ca6a3..25f8f970260 100644
--- a/doc/distrib/Samples/en-US/Core/Core_Python.dyn
+++ b/doc/distrib/Samples/en-US/Core/Core_Python.dyn
@@ -12,7 +12,7 @@
{
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"Code": "# Python script to find add or subtract a series of numbers. \r\n\r\n# Boiler-plate import statments included out-of-the-box\r\nimport clr\r\nclr.AddReference('ProtoGeometry')\r\nfrom Autodesk.DesignScript.Geometry import *\r\n\r\n# The inputs to this node will be stored as a list in the IN variable.\r\nsign = IN[0] # -1 for subtract all, 0 for do nothing, 1 for add all\r\nnums = IN[1] # List of numbers to subtract or add\r\n\r\npartials = [] # Empty array to contain partial sums or differences\r\nresult = 0 # Initialize the sum or difference to 0\r\n\r\n# Loop through each item and add it or subtract it from the result.\r\nfor index in range(len(nums)):\r\n\tif sign > 0:\r\n\t\tresult = result + nums[index]\r\n\t\tpartials.append(result)\r\n\telif sign == 0:\r\n\t\tpartials.append(result)\r\n\t\tcontinue\r\n\telse:\r\n\t\tresult = result - nums[index]\r\n\t\tpartials.append(result)\r\n\r\n# Assign the output to the OUT variable\r\n#OUT = results # Use this to output only the result.\r\nOUT = []\r\nOUT.append(result)\r\nOUT.append(partials)",
- "Engine": "CPython3",
+ "Engine": "PythonNet3",
"VariableInputPorts": true,
"Id": "7183a2fe9a6a4eebb2233525a80ab2f2",
"NodeType": "PythonScriptNode",
@@ -82,8 +82,8 @@
"Outputs": [
{
"Id": "30ec0136279d47edacf06a1f0ae3d56a",
- "Name": "",
- "Description": "Value of expression at line 1",
+ "Name": "range",
+ "Description": "0..10",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -203,8 +203,8 @@
"Outputs": [
{
"Id": "08a98db6988e4ae3943f8c84d4ee8bd2",
- "Name": "",
- "Description": "Value of expression at line 1",
+ "Name": "integer",
+ "Description": "0",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -262,8 +262,8 @@
"Outputs": [
{
"Id": "e74a6d9e041f45498775d1e07a81e84b",
- "Name": "",
- "Description": "Value of expression at line 1",
+ "Name": "integer",
+ "Description": "1",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -277,7 +277,7 @@
{
"ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",
"WatchWidth": 35.0,
- "WatchHeight": 38.0,
+ "WatchHeight": 40.0,
"Id": "c44ca1114bbf48cc9b358b339af6c19e",
"NodeType": "ExtensionNode",
"Inputs": [
@@ -308,7 +308,7 @@
{
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"Code": "import clr\r\nclr.AddReference('ProtoGeometry')\r\nfrom Autodesk.DesignScript.Geometry import *\r\n#The inputs to this node will be stored as a list in the IN variable.\r\ndataEnteringNode = IN\r\n\r\np1 = Point.ByCoordinates(0, 0, 0);\r\np2 = Point.ByCoordinates(-10, -10, -10);\r\n\r\nl = Line.ByStartPointEndPoint(p1, p2);\r\n\r\npts = [\r\n\tPoint.ByCoordinates(0, 0, 0),\r\n\tPoint.ByCoordinates(10, 10, 0),\r\n\tPoint.ByCoordinates(20, 0, 0),\r\n\tPoint.ByCoordinates(30, 10, 0),\r\n\tPoint.ByCoordinates(40, 0, 0) ]\r\n\t\r\nspline = NurbsCurve.ByPoints(pts)\r\n\r\nsurf = spline.Extrude(Vector.ByCoordinates(0, 0, 1), 10)\r\n\r\n#Assign your output to the OUT variable\r\nOUT = [l, spline, surf]",
- "Engine": "CPython3",
+ "Engine": "PythonNet3",
"VariableInputPorts": true,
"Id": "9094d23b33384e5caf7b7d08e547cc25",
"NodeType": "PythonScriptNode",
@@ -345,8 +345,8 @@
"Outputs": [
{
"Id": "59d88e24f9a74bff9929b2d9143d29c8",
- "Name": "",
- "Description": "Value of expression at line 1",
+ "Name": "function",
+ "Description": "DesignScript.Builtin.Get.ValueAtIndex(output, 0)",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -354,8 +354,8 @@
},
{
"Id": "0ab66368430d41f2a3854c7b4ff9da7a",
- "Name": "",
- "Description": "Value of expression at line 2",
+ "Name": "function",
+ "Description": "DesignScript.Builtin.Get.ValueAtIndex(output, 1)",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -363,8 +363,8 @@
},
{
"Id": "6a006dc2cf674e36a423c6ef2d9aba6c",
- "Name": "",
- "Description": "Value of expression at line 3",
+ "Name": "function",
+ "Description": "DesignScript.Builtin.Get.ValueAtIndex(output, 2)",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
@@ -378,7 +378,7 @@
{
"ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",
"WatchWidth": 72.0,
- "WatchHeight": 38.0,
+ "WatchHeight": 40.0,
"Id": "df5d88d2dfc542d4b5dd2ded5c79980c",
"NodeType": "ExtensionNode",
"Inputs": [
@@ -409,7 +409,7 @@
{
"ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",
"WatchWidth": 420.0,
- "WatchHeight": 38.0,
+ "WatchHeight": 40.0,
"Id": "516af1443b9d45b39f0f4864055cf9e0",
"NodeType": "ExtensionNode",
"Inputs": [
@@ -440,7 +440,7 @@
{
"ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",
"WatchWidth": 185.0,
- "WatchHeight": 38.0,
+ "WatchHeight": 40.0,
"Id": "6d21b7b3707342ed892734d225a90f1a",
"NodeType": "ExtensionNode",
"Inputs": [
@@ -575,7 +575,7 @@
"ScaleFactor": 1.0,
"HasRunWithoutCrash": true,
"IsVisibleInDynamoLibrary": true,
- "Version": "3.1.0.3411",
+ "Version": "4.1.0.2940",
"RunType": "Automatic",
"RunPeriod": "100"
},
@@ -752,6 +752,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"fb28178df0ca4db085105202c26f64cf",
"041d63bf18384c6bb45dfa9a7a549434"
@@ -760,12 +762,16 @@
"Left": 2553.5609806193347,
"Top": 976.9425675710149,
"Width": 551.0,
- "Height": 371.0,
+ "Height": 365.0,
"FontSize": 36.0,
"GroupStyleId": "883066aa-1fe2-44a4-9bd1-c3df86bfe9f6",
"InitialTop": 1049.942567571015,
- "InitialHeight": 328.1724999999998,
+ "InitialHeight": 206.3298163756981,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFFFB8D8"
},
{
@@ -775,20 +781,26 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"9e561a4f9f864d4eac53e30110ffb406",
"921d119036464fc2a9854b4693a6c026"
],
"HasNestedGroups": false,
"Left": 2554.1053173739324,
- "Top": 593.2415815324191,
+ "Top": 593.241581532419,
"Width": 368.0,
- "Height": 349.9999999999999,
+ "Height": 350.0,
"FontSize": 36.0,
"GroupStyleId": "883066aa-1fe2-44a4-9bd1-c3df86bfe9f6",
- "InitialTop": 709.2415815324191,
- "InitialHeight": 264.0,
+ "InitialTop": 709.241581532419,
+ "InitialHeight": 246.9999999999999,
"TextblockHeight": 106.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFD4B6DB"
},
{
@@ -798,6 +810,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"3316bcb825c946cbbb71e61d1f449192"
],
@@ -809,8 +823,12 @@
"FontSize": 36.0,
"GroupStyleId": "bc688959-ce34-4bf5-90f8-6ddd23f80989",
"InitialTop": 251.23676596959353,
- "InitialHeight": 252.0,
+ "InitialHeight": 145.0,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFA4E1FF"
},
{
@@ -820,6 +838,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"7183a2fe9a6a4eebb2233525a80ab2f2",
"fc54c00a15034189a61233646c89b0da"
@@ -828,12 +848,16 @@
"Left": 3189.4043760349814,
"Top": 612.8175817692282,
"Width": 320.0,
- "Height": 365.0,
+ "Height": 363.0,
"FontSize": 36.0,
"GroupStyleId": "4d68be4a-a04d-4945-9dd5-cdf61079d790",
"InitialTop": 685.8175817692282,
- "InitialHeight": 322.0,
+ "InitialHeight": 275.0,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFB9F9E1"
},
{
@@ -843,6 +867,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"ecc8630fa9b040619046b47ce8ba4f2c",
"e14a495391154344ac65e7243e4975e3",
@@ -853,12 +879,16 @@
"Left": 3625.709690623294,
"Top": 993.83718375424,
"Width": 874.0000000000005,
- "Height": 429.0,
+ "Height": 423.0,
"FontSize": 36.0,
"GroupStyleId": "07655dc1-2d65-4fed-8d6a-37235d3e3a8d",
"InitialTop": 1066.83718375424,
- "InitialHeight": 386.0,
+ "InitialHeight": 236.82750000000033,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFFFC999"
},
{
@@ -868,6 +898,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"b1be50edf93c4d9cb7c455d97e820672",
"340d812d39634fffbb4ecfadea6b01ca",
@@ -882,8 +914,12 @@
"FontSize": 36.0,
"GroupStyleId": "07655dc1-2d65-4fed-8d6a-37235d3e3a8d",
"InitialTop": 738.4577717319397,
- "InitialHeight": 319.90632856924196,
+ "InitialHeight": 236.8275000000001,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFFFC999"
},
{
@@ -893,6 +929,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"ee76b77e33f840539f33dc43aa97fd98"
],
@@ -904,8 +942,12 @@
"FontSize": 36.0,
"GroupStyleId": "00000000-0000-0000-0000-000000000000",
"InitialTop": 797.6599239566941,
- "InitialHeight": 123.0,
+ "InitialHeight": 145.0,
"TextblockHeight": 193.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFA4E1FF"
},
{
@@ -915,20 +957,26 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"9094d23b33384e5caf7b7d08e547cc25",
"8d0cb3fc32db4220b727887b354d2867"
],
"HasNestedGroups": false,
- "Left": 3228.8878662633592,
+ "Left": 3233.3878662633592,
"Top": 1618.4499139083607,
"Width": 320.0,
"Height": 378.0,
"FontSize": 36.0,
"GroupStyleId": "4d68be4a-a04d-4945-9dd5-cdf61079d790",
"InitialTop": 1734.4499139083607,
- "InitialHeight": 292.0,
+ "InitialHeight": 275.0,
"TextblockHeight": 106.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFB9F9E1"
},
{
@@ -938,6 +986,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [
"b643c0d143e443709bdf07f448fb8195",
"df5d88d2dfc542d4b5dd2ded5c79980c",
@@ -949,12 +999,16 @@
"Left": 3619.9228883935357,
"Top": 1665.0310553505428,
"Width": 840.0,
- "Height": 511.0,
+ "Height": 507.0,
"FontSize": 36.0,
"GroupStyleId": "07655dc1-2d65-4fed-8d6a-37235d3e3a8d",
"InitialTop": 1738.0310553505428,
- "InitialHeight": 468.0,
+ "InitialHeight": 447.0,
"TextblockHeight": 63.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFFFC999"
},
{
@@ -964,10 +1018,12 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 2636.6053173739324,
- "Top": 717.2415815324191,
+ "Top": 717.241581532419,
"Width": 0.0,
"Height": 0.0,
"FontSize": 36.0,
@@ -975,6 +1031,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "9e561a4f9f864d4eac53e30110ffb406"
},
@@ -985,6 +1045,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 2591.0609806193347,
@@ -996,6 +1058,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "fb28178df0ca4db085105202c26f64cf"
},
@@ -1006,6 +1072,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 4214.354598893615,
@@ -1017,6 +1085,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "c44ca1114bbf48cc9b358b339af6c19e"
},
@@ -1027,6 +1099,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 4267.709690623295,
@@ -1038,6 +1112,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "ecc8630fa9b040619046b47ce8ba4f2c"
},
@@ -1048,6 +1126,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 2197.297776501844,
@@ -1059,6 +1139,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676"
},
{
@@ -1068,6 +1152,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 3199.4043760349814,
@@ -1079,6 +1165,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "7183a2fe9a6a4eebb2233525a80ab2f2"
},
@@ -1089,6 +1179,8 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
"Left": 2195.9549681080157,
@@ -1100,6 +1192,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676"
},
{
@@ -1109,9 +1205,11 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
- "Left": 3655.4228883935357,
+ "Left": 3668.4228883935357,
"Top": 1807.5135553505434,
"Width": 0.0,
"Height": 0.0,
@@ -1120,6 +1218,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "b643c0d143e443709bdf07f448fb8195"
},
@@ -1130,9 +1232,11 @@
"IsExpanded": true,
"WidthAdjustment": 0.0,
"HeightAdjustment": 0.0,
+ "UserSetWidth": 0.0,
+ "UserSetHeight": 0.0,
"Nodes": [],
"HasNestedGroups": false,
- "Left": 3238.8878662633592,
+ "Left": 3243.3878662633592,
"Top": 1742.4499139083607,
"Width": 0.0,
"Height": 0.0,
@@ -1141,6 +1245,10 @@
"InitialTop": 0.0,
"InitialHeight": 0.0,
"TextblockHeight": 0.0,
+ "IsOptionalInPortsCollapsed": false,
+ "IsUnconnectedOutPortsCollapsed": false,
+ "HasToggledOptionalInPorts": false,
+ "HasToggledUnconnectedOutPorts": false,
"Background": "#FFC1D676",
"PinnedNode": "9094d23b33384e5caf7b7d08e547cc25"
}
diff --git a/extern/Python/Python.Included.SciPy.dll b/extern/Python/Python.Included.SciPy.dll
deleted file mode 100644
index 799c574aac8..00000000000
Binary files a/extern/Python/Python.Included.SciPy.dll and /dev/null differ
diff --git a/extern/Python/Python.Included.dll b/extern/Python/Python.Included.dll
deleted file mode 100644
index 8628b60312b..00000000000
Binary files a/extern/Python/Python.Included.dll and /dev/null differ
diff --git a/extern/Python/Python.Runtime.dll b/extern/Python/Python.Runtime.dll
deleted file mode 100644
index bd9c125b7f8..00000000000
Binary files a/extern/Python/Python.Runtime.dll and /dev/null differ
diff --git a/src/Dynamo.All.sln b/src/Dynamo.All.sln
index 5ea0a8170cd..c8bfd2a9c47 100644
--- a/src/Dynamo.All.sln
+++ b/src/Dynamo.All.sln
@@ -79,8 +79,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DynamoFeatureFlags", "Tools
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analysis", "Libraries\Analysis\Analysis.csproj", "{76686ED6-E759-4772-81C2-768740BE13FA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSCPython", "Libraries\DSCPython\DSCPython.csproj", "{F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryColor", "Libraries\GeometryColor\GeometryColor.csproj", "{A50C198C-DA6E-4081-BC53-0F44D287F207}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryUI", "Libraries\GeometryUI\GeometryUI.csproj", "{E674F1A1-BE83-475A-9CC9-F55CADBEC448}"
@@ -305,10 +303,6 @@ Global
{76686ED6-E759-4772-81C2-768740BE13FA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{76686ED6-E759-4772-81C2-768740BE13FA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{76686ED6-E759-4772-81C2-768740BE13FA}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Any CPU.Build.0 = Release|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -569,7 +563,6 @@ Global
{C0D6DEE5-5532-4345-9C66-4C00D7FDB8BE} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{94CF053D-BB66-4FC7-883B-48F072701BA9} = {D114C59C-CF66-4CC2-980F-9301FB4EA4E1}
{76686ED6-E759-4772-81C2-768740BE13FA} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{A50C198C-DA6E-4081-BC53-0F44D287F207} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{E674F1A1-BE83-475A-9CC9-F55CADBEC448} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{8872CA17-C10D-43B9-8393-5C5A57065EB0} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
diff --git a/src/DynamoCore.sln b/src/DynamoCore.sln
index 554bc3cbed2..f4e34fc424e 100644
--- a/src/DynamoCore.sln
+++ b/src/DynamoCore.sln
@@ -77,8 +77,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssemblyInfoGenerator", "As
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Analysis", "Libraries\Analysis\Analysis.csproj", "{76686ED6-E759-4772-81C2-768740BE13FA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DSCPython", "Libraries\DSCPython\DSCPython.csproj", "{F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryColor", "Libraries\GeometryColor\GeometryColor.csproj", "{A50C198C-DA6E-4081-BC53-0F44D287F207}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GeometryUI", "Libraries\GeometryUI\GeometryUI.csproj", "{E674F1A1-BE83-475A-9CC9-F55CADBEC448}"
@@ -385,18 +383,6 @@ Global
{76686ED6-E759-4772-81C2-768740BE13FA}.Release|NET_Linux.Build.0 = Release|NET_Linux
{76686ED6-E759-4772-81C2-768740BE13FA}.Release|Publish_Linux.ActiveCfg = Release|Publish_Linux
{76686ED6-E759-4772-81C2-768740BE13FA}.Release|Publish_Linux.Build.0 = Release|Publish_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|NET_Linux.ActiveCfg = Debug|NET_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|NET_Linux.Build.0 = Debug|NET_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Publish_Linux.ActiveCfg = Debug|Publish_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Debug|Publish_Linux.Build.0 = Debug|Publish_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Any CPU.Build.0 = Release|Any CPU
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|NET_Linux.ActiveCfg = Release|NET_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|NET_Linux.Build.0 = Release|NET_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Publish_Linux.ActiveCfg = Release|Publish_Linux
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479}.Release|Publish_Linux.Build.0 = Release|Publish_Linux
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A50C198C-DA6E-4081-BC53-0F44D287F207}.Debug|NET_Linux.ActiveCfg = Debug|NET_Linux
@@ -623,7 +609,6 @@ Global
{47533B7C-0E1A-44A4-8511-B438645F052A} = {88D45B00-E564-41DB-B57C-9509646CAA49}
{C0D6DEE5-5532-4345-9C66-4C00D7FDB8BE} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{76686ED6-E759-4772-81C2-768740BE13FA} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
- {F1541C2D-80A9-4FE7-8D9E-75A8B9FF3479} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{A50C198C-DA6E-4081-BC53-0F44D287F207} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{E674F1A1-BE83-475A-9CC9-F55CADBEC448} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
{8872CA17-C10D-43B9-8393-5C5A57065EB0} = {FA7BE306-A3B0-45FA-9D87-0C69E6932C13}
diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs
index c6bb024a1ba..eec7f3304fa 100644
--- a/src/DynamoCore/Configuration/PreferenceSettings.cs
+++ b/src/DynamoCore/Configuration/PreferenceSettings.cs
@@ -707,6 +707,17 @@ public string PythonTemplateFilePath
///
public bool ShowTabsAndSpacesInScriptEditor { get; set; }
+ ///
+ /// Controls whether Dynamo shows upgrade notifications for legacy CPython nodes
+ /// when opening a graph. These notices appear when a graph contains CPython-engine
+ /// Python nodes that are automatically upgraded to PythonNet3:
+ /// • toast on graph open
+ /// • save/close confirmation dialog
+ /// • banner inside the Python Script Editor
+ /// NOTE: This setting is not related to the historical IronPython2 → CPython3 migration.
+ ///
+ public bool HideCPython3Notifications { get; set; } = false;
+
///
/// This defines if user wants to see the enabled node Auto Complete feature for port interaction.
///
diff --git a/src/DynamoCore/DynamoCore.csproj b/src/DynamoCore/DynamoCore.csproj
index ea46878e9ff..c4a78649a14 100644
--- a/src/DynamoCore/DynamoCore.csproj
+++ b/src/DynamoCore/DynamoCore.csproj
@@ -40,7 +40,8 @@
-
+
+
@@ -224,6 +225,28 @@
+
+
+
+ $(OutputPath)Built-In Packages\packages\PythonNet3Engine\
+ $(DestRoot)bin\
+ $(DestRoot)extra\
+ $(PkgDynamoVisualProgramming_PythonEngine_PythonNet3)
+ $(PkgRoot)\lib\
+ $(PkgRoot)\content\manifest\pkg.json
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
index 353d161ebff..74cf5cbca45 100644
--- a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
+++ b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs
@@ -304,6 +304,11 @@ internal int CurrentPasteOffset
private Dictionary externalFilesDictionary = new Dictionary();
private readonly string customNodeExtension = ".dyf";
+ ///
+ /// Flag to indicate whether the CPython notification has been shown once.
+ ///
+ internal bool HasShownCPythonNotification;
+
///
/// Whether or not to delay graph execution.
/// 64-bit read operations are already atomic so no need to lock here
@@ -1384,6 +1389,14 @@ internal set
WorkspaceEvents.OnWorkspaceSettingsChanged(scaleFactor);
}
}
+
+ ///
+ /// Flag indicating whether the “Python Engine Change” notice should be shown
+ /// on save/close. Runtime-only (not serialized) and reset on workspace switch.
+ ///
+ [JsonIgnore]
+ public bool ShowCPythonNotifications { get; internal set; }
+
#endregion
#region constructors
diff --git a/src/DynamoCoreWpf/Properties/Resources.Designer.cs b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
index e447fa504f7..f744a38937d 100644
--- a/src/DynamoCoreWpf/Properties/Resources.Designer.cs
+++ b/src/DynamoCoreWpf/Properties/Resources.Designer.cs
@@ -1004,6 +1004,34 @@ public static string CopyToClipboardTooltip {
return ResourceManager.GetString("CopyToClipboardTooltip", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Python Engine Change.
+ ///
+ public static string CPython3EngineNotificationMessageBoxHeader {
+ get {
+ return ResourceManager.GetString("CPython3EngineNotificationMessageBoxHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to This graph includes CPython nodes, which are no longer supported in Dynamo 4.0. Saving will convert them to PythonNet3, the new default engine.
+ ///To open this graph in Dynamo 3.3–3.6.x: Install the PythonNet package from the Package Manager..
+ ///
+ public static string CPython3EngineNotificationMessageBoxText {
+ get {
+ return ResourceManager.GetString("CPython3EngineNotificationMessageBoxText", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to https://dynamobim.org/pythonnet3-a-new-dynamo-python-to-fix-everything/.
+ ///
+ public static string CPython3EngineUpgradeLearnMoreUri {
+ get {
+ return ResourceManager.GetString("CPython3EngineUpgradeLearnMoreUri", resourceCulture);
+ }
+ }
///
/// Looks up a localized string similar to Copy.
@@ -4462,6 +4490,15 @@ public static string MessageAlreadyInstallDynamo {
return ResourceManager.GetString("MessageAlreadyInstallDynamo", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Don't show this again.
+ ///
+ public static string MessageBoxDontShowAgainLabel {
+ get {
+ return ResourceManager.GetString("MessageBoxDontShowAgainLabel", resourceCulture);
+ }
+ }
///
/// Looks up a localized string similar to Are you sure you want to delete {0} ? This will delete the packages root directory.
@@ -8315,6 +8352,24 @@ public static string PreferencesViewHideOutportsDescription {
}
}
+ ///
+ /// Looks up a localized string similar to Hide Python Engine change notifications.
+ ///
+ public static string PreferencesViewHidePythonEngineChangeNotifications {
+ get {
+ return ResourceManager.GetString("PreferencesViewHidePythonEngineChangeNotifications", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to CPython is no longer supported in Dynamo 4.0 or above and will be converted to the new default engine PythonNet3. Disable the toggle to hide all notifications about engine changes..
+ ///
+ public static string PreferencesViewHidePythonEngineChangeNotificationsTooltip {
+ get {
+ return ResourceManager.GetString("PreferencesViewHidePythonEngineChangeNotificationsTooltip", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to When toggled on, file names of exported images include date and time of export..
///
@@ -9619,20 +9674,20 @@ public static string ResetChangesWarningPopupMessage {
}
///
- /// Looks up a localized string similar to Reset CPython.
+ /// Looks up a localized string similar to Reset PythonNet3.
///
- public static string ResetCPythonButtonText {
+ public static string ResetPythonNet3ButtonText {
get {
- return ResourceManager.GetString("ResetCPythonButtonText", resourceCulture);
+ return ResourceManager.GetString("ResetPythonNet3ButtonText", resourceCulture);
}
}
///
- /// Looks up a localized string similar to Resets CPython environment by reloading modules..
+ /// Looks up a localized string similar to Resets PythonNet3 environment by reloading modules..
///
- public static string ResetCPythonButtonToolTip {
+ public static string ResetPythonNet3ButtonToolTip {
get {
- return ResourceManager.GetString("ResetCPythonButtonToolTip", resourceCulture);
+ return ResourceManager.GetString("ResetPythonNet3ButtonToolTip", resourceCulture);
}
}
diff --git a/src/DynamoCoreWpf/Properties/Resources.en-US.resx b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
index 8ef1e123ab6..c21bd5d286b 100644
--- a/src/DynamoCoreWpf/Properties/Resources.en-US.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.en-US.resx
@@ -2594,11 +2594,11 @@ Do you wish to uninstall {1}? Restart {2} to complete the uninstall and try down
Add Style
-
- Reset CPython
+
+ Reset PythonNet3
-
- Resets CPython environment by reloading modules.
+
+ Resets PythonNet3 environment by reloading modules.
Cancel and Show Issues
@@ -4213,10 +4213,29 @@ To make this file into a new template, save it to a different folder, then move
Hide unconnected output ports by default
+
+ Hide Python Engine change notifications
+
+
+ CPython is no longer supported in Dynamo 4.0 or above and will be converted to the new default engine PythonNet3. Disable the toggle to hide all notifications about engine changes.
+
+
+ Don't show this again
+
+
+ Python Engine Change
+
+
+ This graph includes CPython nodes, which are no longer supported in Dynamo 4.0. Saving will convert them to PythonNet3, the new default engine.
+To open this graph in Dynamo 3.3–3.6.x: Install the PythonNet package from the Package Manager.
+
+
+ https://dynamobim.org/pythonnet3-a-new-dynamo-python-to-fix-everything/
+
Connected to the internet.
Not connected to the internet.
-
\ No newline at end of file
+
diff --git a/src/DynamoCoreWpf/Properties/Resources.resx b/src/DynamoCoreWpf/Properties/Resources.resx
index 967bf8ec0f8..87bdc34dac8 100644
--- a/src/DynamoCoreWpf/Properties/Resources.resx
+++ b/src/DynamoCoreWpf/Properties/Resources.resx
@@ -2889,11 +2889,11 @@ Do you wish to uninstall {1}? Restart {2} to complete the uninstall and try down
Add Style
-
- Reset CPython
+
+ Reset PythonNet3
-
- Resets CPython environment by reloading modules.
+
+ Resets PythonNet3 environment by reloading modules.
Cancel and Show Issues
@@ -4200,10 +4200,29 @@ To make this file into a new template, save it to a different folder, then move
Hide unconnected output ports by default
+
+ Hide Python Engine change notifications
+
+
+ CPython is no longer supported in Dynamo 4.0 or above and will be converted to the new default engine PythonNet3. Disable the toggle to hide all notifications about engine changes.
+
+
+ Don't show this again
+
+
+ Python Engine Change
+
+
+ This graph includes CPython nodes, which are no longer supported in Dynamo 4.0. Saving will convert them to PythonNet3, the new default engine.
+To open this graph in Dynamo 3.3–3.6.x: Install the PythonNet package from the Package Manager.
+
+
+ https://dynamobim.org/pythonnet3-a-new-dynamo-python-to-fix-everything/
+
Connected to the internet.
Not connected to the internet.
-
\ No newline at end of file
+
diff --git a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
index 86bed3d319b..a09cee1419c 100644
--- a/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
+++ b/src/DynamoCoreWpf/PublicAPI.Unshipped.txt
@@ -2171,6 +2171,7 @@ Dynamo.ViewModels.DynamoViewModel.PublishNewPackageCommand.get -> Dynamo.UI.Comm
Dynamo.ViewModels.DynamoViewModel.PublishNewPackageCommand.set -> void
Dynamo.ViewModels.DynamoViewModel.PublishSelectedNodesCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.PublishSelectedNodesCommand.set -> void
+Dynamo.ViewModels.DynamoViewModel.PythonEngineUpgradeToastRequested -> System.Action
Dynamo.ViewModels.DynamoViewModel.RecentFiles.get -> System.Collections.ObjectModel.ObservableCollection
Dynamo.ViewModels.DynamoViewModel.RecentFiles.set -> void
Dynamo.ViewModels.DynamoViewModel.RedoCommand.get -> Dynamo.UI.Commands.DelegateCommand
@@ -2209,6 +2210,7 @@ Dynamo.ViewModels.DynamoViewModel.ScaleFactorLog.set -> void
Dynamo.ViewModels.DynamoViewModel.SelectAll(object parameter) -> void
Dynamo.ViewModels.DynamoViewModel.SelectAllCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.SelectAllCommand.set -> void
+Dynamo.ViewModels.DynamoViewModel.ShowPythonEngineUpgradeCanvasToast(string message, bool stayOpen = true) -> void
Dynamo.ViewModels.DynamoViewModel.ShowGraphPropertiesCommand.get -> Dynamo.UI.Commands.DelegateCommand
Dynamo.ViewModels.DynamoViewModel.ShowGraphPropertiesCommand.set -> void
Dynamo.ViewModels.DynamoViewModel.UnpinAllPreviewBubbles(object parameter) -> void
@@ -2872,6 +2874,8 @@ Dynamo.ViewModels.PreferencesViewModel.Filters.get -> System.Collections.ObjectM
Dynamo.ViewModels.PreferencesViewModel.GroupStyleFontSizeList.get -> System.Collections.ObjectModel.ObservableCollection
Dynamo.ViewModels.PreferencesViewModel.GroupStyleFontSizeList.set -> void
Dynamo.ViewModels.PreferencesViewModel.HideAutocompleteMethodOptions.get -> bool
+Dynamo.ViewModels.PreferencesViewModel.HideCPythonNotificationIsChecked.get -> bool
+Dynamo.ViewModels.PreferencesViewModel.HideCPythonNotificationIsChecked.set -> void
Dynamo.ViewModels.PreferencesViewModel.HideNodesBelowSpecificConfidenceLevelIsChecked.get -> bool
Dynamo.ViewModels.PreferencesViewModel.HideNodesBelowSpecificConfidenceLevelIsChecked.set -> void
Dynamo.ViewModels.PreferencesViewModel.HostGenericScaleUnits.get -> string
@@ -4310,8 +4314,18 @@ Dynamo.Wpf.Views.GuidedTour.RatingControl.RatingControl() -> void
Dynamo.Wpf.Views.GuidedTour.RatingControl.Value.get -> int
Dynamo.Wpf.Views.GuidedTour.RatingControl.Value.set -> void
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HeaderContent.get -> string
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HeaderContent.set -> void
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HyperlinkText.get -> string
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HyperlinkText.set -> void
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HyperlinkUri.get -> System.Uri
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.HyperlinkUri.set -> void
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.InitializeComponent() -> void
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.RealTimeInfoWindow() -> void
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.ShowHeader.get -> bool
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.ShowHeader.set -> void
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.ShowHyperlink.get -> bool
+Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.ShowHyperlink.set -> void
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.TextContent.get -> string
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.TextContent.set -> void
Dynamo.Wpf.Views.GuidedTour.RealTimeInfoWindow.UpdateLocation() -> void
@@ -4525,6 +4539,7 @@ static Dynamo.UI.Prompts.DynamoMessageBox.Show(string messageBoxText, string cap
static Dynamo.UI.Prompts.DynamoMessageBox.Show(System.Windows.Window owner, string messageBoxText, string caption, bool showRichTextBox, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon) -> System.Windows.MessageBoxResult
static Dynamo.UI.Prompts.DynamoMessageBox.Show(System.Windows.Window owner, string messageBoxText, string caption, System.Collections.Generic.Dictionary flags, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon) -> System.Windows.MessageBoxResult
static Dynamo.UI.Prompts.DynamoMessageBox.Show(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Windows.MessageBoxImage icon) -> System.Windows.MessageBoxResult
+static Dynamo.UI.Prompts.DynamoMessageBox.ShowWithCheckbox(System.Windows.Window owner, string messageBoxText, string caption, System.Windows.MessageBoxButton button, System.Collections.Generic.IEnumerable buttonNames, System.Windows.MessageBoxImage icon, string checkboxText, out bool isChecked) -> System.Windows.MessageBoxResult
static Dynamo.UI.SharedDictionaryManager.ConnectorsDictionary.get -> System.Windows.ResourceDictionary
static Dynamo.UI.SharedDictionaryManager.ConnectorsDictionaryUri.get -> System.Uri
static Dynamo.UI.SharedDictionaryManager.DataTemplatesDictionary.get -> System.Windows.ResourceDictionary
@@ -4670,6 +4685,9 @@ static Dynamo.Wpf.Properties.Resources.ConverterMessageTransformOrigin.get -> st
static Dynamo.Wpf.Properties.Resources.ConverterMessageZoom.get -> string
static Dynamo.Wpf.Properties.Resources.CopyToClipboardTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.CopyToClipboardFailedMessage.get -> string
+static Dynamo.Wpf.Properties.Resources.CPython3EngineNotificationMessageBoxHeader.get -> string
+static Dynamo.Wpf.Properties.Resources.CPython3EngineNotificationMessageBoxText.get -> string
+static Dynamo.Wpf.Properties.Resources.CPython3EngineUpgradeLearnMoreUri.get -> string
static Dynamo.Wpf.Properties.Resources.CrashPromptDialogCopyButton.get -> string
static Dynamo.Wpf.Properties.Resources.CrashPromptDialogCrashMessage.get -> string
static Dynamo.Wpf.Properties.Resources.CrashPromptDialogDetailButton.get -> string
@@ -5055,6 +5073,7 @@ static Dynamo.Wpf.Properties.Resources.LogoutMenuItemText.get -> string
static Dynamo.Wpf.Properties.Resources.MajorVersionNonNegative.get -> string
static Dynamo.Wpf.Properties.Resources.Manual.get -> string
static Dynamo.Wpf.Properties.Resources.MessageAlreadyInstallDynamo.get -> string
+static Dynamo.Wpf.Properties.Resources.MessageBoxDontShowAgainLabel.get -> string
static Dynamo.Wpf.Properties.Resources.MessageConfirmToDeletePackage.get -> string
static Dynamo.Wpf.Properties.Resources.MessageConfirmToInstallPackage.get -> string
static Dynamo.Wpf.Properties.Resources.MessageConfirmToInstallPackageToFolder.get -> string
@@ -5477,6 +5496,8 @@ static Dynamo.Wpf.Properties.Resources.PreferencesViewGeneralTab.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewGroupStylesHeader.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewHideInportsDescription.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewHideOutportsDescription.get -> string
+static Dynamo.Wpf.Properties.Resources.PreferencesViewHidePythonEngineChangeNotifications.get -> string
+static Dynamo.Wpf.Properties.Resources.PreferencesViewHidePythonEngineChangeNotificationsTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewIncludeTimestampExportPathTooltip.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewLanguageLabel.get -> string
static Dynamo.Wpf.Properties.Resources.PreferencesViewLanguageSwitchHelp.get -> string
@@ -5622,8 +5643,8 @@ static Dynamo.Wpf.Properties.Resources.RenderingMemoryOutageSummary.get -> strin
static Dynamo.Wpf.Properties.Resources.RerunButton.get -> string
static Dynamo.Wpf.Properties.Resources.RerunButtonToolTip.get -> string
static Dynamo.Wpf.Properties.Resources.ResetChangesWarningPopupMessage.get -> string
-static Dynamo.Wpf.Properties.Resources.ResetCPythonButtonText.get -> string
-static Dynamo.Wpf.Properties.Resources.ResetCPythonButtonToolTip.get -> string
+static Dynamo.Wpf.Properties.Resources.ResetPythonNet3ButtonText.get -> string
+static Dynamo.Wpf.Properties.Resources.ResetPythonNet3ButtonToolTip.get -> string
static Dynamo.Wpf.Properties.Resources.ResourceManager.get -> System.Resources.ResourceManager
static Dynamo.Wpf.Properties.Resources.RunBlockedMessage.get -> string
static Dynamo.Wpf.Properties.Resources.RunCompletedMessage.get -> string
diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
index ae1f1066f33..432264daeed 100644
--- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
+++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
@@ -543,8 +543,20 @@ private void Popup_StepClosed(string name, Step.StepTypes stepType)
///
/// The target content to display.
/// boolean indicates if the popup will stay open until user dismiss it.
+ /// The header text to display.
+ /// boolean indicates if the header will be shown.
+ /// boolean indicates if the hyperlink will be shown.
+ /// The hyperlink text to display.
+ /// The hyperlink uri to navigate to.
/// TODO: Make this API out of guide manager to a more generic place
- internal void CreateRealTimeInfoWindow(string content, bool stayOpen = false)
+ internal void CreateRealTimeInfoWindow(
+ string content,
+ bool stayOpen = false,
+ bool showHeader = false,
+ string headerText = "",
+ bool showHyperlink = false,
+ string hyperlinkText = "",
+ Uri hyperlinkUri = null)
{
//Search a UIElement with the Name "statusBarPanel" inside the Dynamo VisualTree
UIElement hostUIElement = GuideUtilities.FindChild(mainRootElement, "statusBarPanel");
@@ -559,7 +571,12 @@ internal void CreateRealTimeInfoWindow(string content, bool stayOpen = false)
HorizontalOffset = ExitTourHorizontalOffset,
Placement = PlacementMode.Left,
TextContent = content,
- StaysOpen = stayOpen
+ StaysOpen = stayOpen,
+ ShowHeader = showHeader,
+ HeaderContent = headerText,
+ ShowHyperlink = showHyperlink,
+ HyperlinkText = hyperlinkText,
+ HyperlinkUri = hyperlinkUri
};
if (hostUIElement != null)
diff --git a/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml b/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml
index 0db9776a66c..8554cfb8fe6 100644
--- a/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml
+++ b/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml
@@ -49,6 +49,7 @@
+
@@ -171,9 +172,26 @@
Style="{StaticResource CustomRichTextBoxStyle}">
+
+
+
+
+
+
diff --git a/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs b/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs
index 4b6d7ec11bc..7fede876648 100644
--- a/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs
+++ b/src/DynamoCoreWpf/UI/Prompts/DynamoMessageBox.xaml.cs
@@ -25,6 +25,7 @@ public partial class DynamoMessageBox : INotifyPropertyChanged
private string bodyText;
private MessageBoxButton messageBoxButton;
private MessageBoxImage messageBoxImage;
+ private bool extraCheckBoxChecked;
#endregion
#region Public Properties
@@ -160,6 +161,47 @@ public static MessageBoxResult Show(string messageBoxText, string caption, Messa
return dynamoMessageBox.CustomDialogResult;
}
+ ///
+ /// Displays a dialog to the user and returns their choice as a MessageBoxResult.
+ ///
+ public static MessageBoxResult ShowWithCheckbox(
+ Window owner,
+ string messageBoxText,
+ string caption,
+ MessageBoxButton button,
+ IEnumerable buttonNames,
+ MessageBoxImage icon,
+ string checkboxText,
+ out bool isChecked)
+ {
+ var dynamoMessageBox = new DynamoMessageBox
+ {
+ BodyText = messageBoxText,
+ TitleText = caption,
+ MessageBoxButton = button,
+ MessageBoxImage = icon,
+ };
+
+ SetOwnerWindow(owner, dynamoMessageBox);
+ dynamoMessageBox.ConfigureButtons(button, buttonNames);
+
+ if (string.IsNullOrWhiteSpace(checkboxText))
+ {
+ dynamoMessageBox.ExtraCheckPanel.Visibility = Visibility.Collapsed;
+ }
+ else
+ {
+ dynamoMessageBox.ExtraCheckPanel.Visibility = Visibility.Visible;
+ dynamoMessageBox.ExtraCheckBoxLabel.Content = checkboxText;
+ dynamoMessageBox.ExtraCheckBox.IsChecked = false;
+ }
+
+ dynamoMessageBox.ShowDialog();
+
+ // Capture the checkbox state
+ isChecked = (dynamoMessageBox.ExtraCheckBox?.IsChecked) ?? false;
+ return dynamoMessageBox.CustomDialogResult;
+ }
///
/// Displays a dialog to the user and returns their choice as a MessageBoxResult.
diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
index 2ced470065f..09c98cb5ec2 100644
--- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs
@@ -1157,6 +1157,23 @@ internal void OnNodeViewReady(object nodeView)
}
}
+ ///
+ /// Raised by to ask listeners (e.g., Python migration UX)
+ /// whether a Python engine changed notice should be shown to the user.
+ ///
+ internal event EventHandler RequestPythonEngineChangeNotice;
+
+ ///
+ /// Raises and returns whether any subscriber
+ /// requested to cancel showing the Python engine changed notice.
+ ///
+ internal bool RaiseRequestPythonEngineChangeNotice()
+ {
+ var args = new CancelEventArgs();
+ RequestPythonEngineChangeNotice?.Invoke(this, args);
+ return args.Cancel;
+ }
+
///
/// Returns whether the IDSDK is initialized or not for Dynamo Sandbox, in host environment defaults to true.
/// If showWarning is true, a warning message will be shown to the user if the IDSDK is not initialized.
@@ -2430,6 +2447,20 @@ private void model_RequestNotification(string notification, bool stayOpen = fals
model?.Logger?.Log(notification);
}
+ ///
+ /// Raised when a toast should be shown to inform about a CPython to PythonNet3 engine upgrade
+ ///
+ public event Action PythonEngineUpgradeToastRequested;
+
+ ///
+ /// Requests the UI to show a Python-engine-upgrade toast on the canvas.
+ /// This is UI-agnostic; the View decides when/where to render.
+ ///
+ public void ShowPythonEngineUpgradeCanvasToast(string message, bool stayOpen = true)
+ {
+ PythonEngineUpgradeToastRequested?.Invoke(message, stayOpen);
+ }
+
///
/// Present the open dialog and open the workspace that is selected.
/// - If template is selected, opens the template folder
@@ -3090,8 +3121,17 @@ x is CodeBlockNodeModel ||
public void ShowSaveDialogIfNeededAndSaveResult(object parameter)
{
var vm = this;
+ var currentWorkspace = vm.Model.CurrentWorkspace;
+
+ // First-time CPython notice when saving a *new, unsaved* Home workspace
+ if (currentWorkspace.ShowCPythonNotifications
+ && !currentWorkspace.HasShownCPythonNotification)
+ {
+ var cancel = RaiseRequestPythonEngineChangeNotice();
+ if (cancel) return;
+ }
- if (string.IsNullOrEmpty(vm.Model.CurrentWorkspace.FileName) || vm.Model.CurrentWorkspace.IsTemplate)
+ if (string.IsNullOrEmpty(currentWorkspace.FileName) || currentWorkspace.IsTemplate)
{
if (CanShowSaveDialogAndSaveResult(parameter))
{
diff --git a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
index 11d7f629527..978b0650b0e 100644
--- a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
+++ b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs
@@ -1077,6 +1077,19 @@ public bool ShowWhitespaceIsChecked
}
}
+ ///
+ /// Controls the IsChecked property in the "Hide CPython notifications" toggle button
+ ///
+ public bool HideCPythonNotificationIsChecked
+ {
+ get => preferenceSettings.HideCPython3Notifications;
+ set
+ {
+ preferenceSettings.HideCPython3Notifications = value;
+ RaisePropertyChanged(nameof(HideCPythonNotificationIsChecked));
+ }
+ }
+
///
/// Controls the IsChecked property in the "Notification Center" toggle button
///
@@ -1887,6 +1900,9 @@ private void Model_PropertyChanged(object sender, PropertyChangedEventArgs e)
case nameof(ShowWhitespaceIsChecked):
description = Res.ResourceManager.GetString(nameof(Res.PreferencesViewShowWhitespaceInPythonEditor), System.Globalization.CultureInfo.InvariantCulture);
goto default;
+ case nameof(HideCPythonNotificationIsChecked):
+ description = Res.ResourceManager.GetString(nameof(Res.PreferencesViewHidePythonEngineChangeNotifications), System.Globalization.CultureInfo.InvariantCulture);
+ goto default;
case nameof(NodeAutocompleteIsChecked):
description = Res.ResourceManager.GetString(nameof(Res.PreferencesViewEnableNodeAutoComplete), System.Globalization.CultureInfo.InvariantCulture);
goto default;
diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
index 61025670836..4e36902a1d5 100644
--- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
@@ -30,6 +30,7 @@
using Dynamo.Selection;
using Dynamo.Services;
using Dynamo.UI.Controls;
+using Dynamo.UI.Prompts;
using Dynamo.Utilities;
using Dynamo.ViewModels;
using Dynamo.Views;
@@ -484,6 +485,23 @@ private void OnWorkspaceSaving(WorkspaceModel workspace, Graph.SaveContext saveC
dynamoViewModel?.CheckOnlineAccess();
}
+ private void OnPythonEngineUpgradeToastRequested(string msg, bool stayOpen)
+ {
+ Dispatcher.BeginInvoke(
+ System.Windows.Threading.DispatcherPriority.ContextIdle,
+ new Action(() =>
+ {
+ dynamoViewModel.MainGuideManager?.CreateRealTimeInfoWindow(
+ msg,
+ stayOpen,
+ showHeader: true,
+ headerText: Res.CPython3EngineNotificationMessageBoxHeader,
+ showHyperlink: true,
+ hyperlinkText: Res.LearnMore,
+ hyperlinkUri: new Uri(Res.CPython3EngineUpgradeLearnMoreUri));
+ }));
+ }
+
///
/// Adds an extension control or if it already exists it makes sure it is focused.
/// The control may be added as a window or a tab in the extension bar depending on settings.
@@ -1417,6 +1435,11 @@ private void DynamoView_Loaded(object sender, EventArgs e)
// Initialize Guide Manager as a member on Dynamo ViewModel so other than guided tour,
// other part of application can also leverage it.
dynamoViewModel.MainGuideManager = new GuidesManager(_this, dynamoViewModel);
+
+ // Subscribes to Python-engine-upgrade toast requests from the ViewModel and
+ // forwards them to GuidesManager on the UI thread
+ dynamoViewModel.PythonEngineUpgradeToastRequested += OnPythonEngineUpgradeToastRequested;
+
GuideFlowEvents.GuidedTourStart += GuideFlowEvents_GuidedTourStart;
_timer.Stop();
dynamoViewModel.Model.Logger.Log(String.Format(Wpf.Properties.Resources.MessageLoadingTime,
@@ -1462,6 +1485,8 @@ private void DynamoView_Loaded(object sender, EventArgs e)
dynamoViewModel.RequestUserSaveWorkflow += DynamoViewModelRequestUserSaveWorkflow;
+ dynamoViewModel.RequestPythonEngineChangeNotice += DynamoViewModel_RequestPythonEngineChangeNotice;
+
dynamoViewModel.Model.ClipBoard.CollectionChanged += ClipBoard_CollectionChanged;
//ABOUT WINDOW
@@ -1724,6 +1749,18 @@ private void DynamoViewModelRequestUserSaveWorkflow(object sender, WorkspaceSave
}
}
+ // Show the one-time Python Engine Change notification for the workspace
+ var ws = dynamoViewModel.Model.CurrentWorkspace;
+ if (!ws.HasShownCPythonNotification && ws.ShowCPythonNotifications)
+ {
+ var cancelFirstDialogBox = ShowPythonEngineChangeNoticeAndMarkIfProceed();
+ if (cancelFirstDialogBox)
+ {
+ e.Success = false;
+ return;
+ }
+ }
+
var buttons = e.AllowCancel ? MessageBoxButton.YesNoCancel : MessageBoxButton.YesNo;
var result = MessageBoxService.Show(this, dialogText,
Dynamo.Wpf.Properties.Resources.UnsavedChangesMessageBoxTitle,
@@ -1748,6 +1785,46 @@ private void DynamoViewModelRequestUserSaveWorkflow(object sender, WorkspaceSave
}
}
+ private void DynamoViewModel_RequestPythonEngineChangeNotice(object sender, CancelEventArgs e)
+ {
+ e.Cancel = ShowPythonEngineChangeNoticeAndMarkIfProceed();
+ }
+
+ private bool ShowPythonEngineChangeNoticeAndMarkIfProceed()
+ {
+ var ws = dynamoViewModel.Model.CurrentWorkspace;
+ if (!(ws is HomeWorkspaceModel) && !(string.IsNullOrEmpty(ws?.FileName)) && ws.HasShownCPythonNotification) return false;
+
+ bool dontShowAgain;
+
+ var result = DynamoMessageBox.ShowWithCheckbox(
+ owner: this,
+ messageBoxText: Res.CPython3EngineNotificationMessageBoxText,
+ caption: Res.CPython3EngineNotificationMessageBoxHeader,
+ button: MessageBoxButton.YesNo,
+ buttonNames: new[] { Res.GenericTaskDialogOptionOK, Res.LearnMore },
+ icon: MessageBoxImage.Information,
+ checkboxText: Res.MessageBoxDontShowAgainLabel,
+ isChecked: out dontShowAgain);
+
+ // Update preference to not show again if checked
+ dynamoViewModel.Model.PreferenceSettings.HideCPython3Notifications = dontShowAgain;
+
+ // First button (Yes) is "OK"
+ if (result == MessageBoxResult.Yes)
+ {
+ ws.HasShownCPythonNotification = true;
+ return false;
+ }
+ // Second button (No) is "Learn more"
+ else if (result == MessageBoxResult.No)
+ {
+ Process.Start(new ProcessStartInfo(Res.CPython3EngineUpgradeLearnMoreUri) { UseShellExecute = true });
+ return true;
+ }
+ return false;
+ }
+
private void Selection_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
dynamoViewModel.CopyCommand.RaiseCanExecuteChanged();
diff --git a/src/DynamoCoreWpf/Views/GuidedTour/RealTimeInfoWindow.xaml b/src/DynamoCoreWpf/Views/GuidedTour/RealTimeInfoWindow.xaml
index 17e9801107a..c042f383223 100644
--- a/src/DynamoCoreWpf/Views/GuidedTour/RealTimeInfoWindow.xaml
+++ b/src/DynamoCoreWpf/Views/GuidedTour/RealTimeInfoWindow.xaml
@@ -69,16 +69,40 @@
StrokeThickness="2"/>
-
+
+
+
+
+
+
+
+
+