Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
andydandy74 committed Oct 10, 2024
1 parent 1afdd0a commit a4ea8cb
Show file tree
Hide file tree
Showing 3 changed files with 468 additions and 652 deletions.
52 changes: 28 additions & 24 deletions nodes/3.x/Color.ByName.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -18,35 +18,35 @@
"Inputs": [
{
"Id": "9402ef12c1984118b8e6dd2b32ab1b20",
"Name": "a",
"Description": "The alpha value.\n\nint\nDefault value : 255",
"Name": "alpha",
"Description": "Alpha-Wert (zwischen 0 und 255 (inklusiv))\n\nint\nVorgabewert : 255",
"UsingDefaultValue": true,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "351a01d0a6c6466a936501ac30660f12",
"Name": "r",
"Description": "The red value.\n\nint\nDefault value : 0",
"Name": "red",
"Description": "Rot-Wert für RGB-Farbmodell (zwischen 0 und 255 (inklusiv))\n\nint\nVorgabewert : 0",
"UsingDefaultValue": true,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "73a7646f43e540d3afad3119e94af2d3",
"Name": "g",
"Description": "The green value.\n\nint\nDefault value : 0",
"Name": "green",
"Description": "Grün-Wert für RGB-Farbmodell (zwischen 0 und 255 (inklusiv))\n\nint\nVorgabewert : 0",
"UsingDefaultValue": true,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
},
{
"Id": "27e3ca6c34e6488e9de0be2db5cc8e98",
"Name": "b",
"Description": "The blue value.\n\nint\nDefault value : 0",
"Name": "blue",
"Description": "Blau-Wert für RGB-Farbmodell (zwischen 0 und 255 (inklusiv))\n\nint\nVorgabewert : 0",
"UsingDefaultValue": true,
"Level": 2,
"UseLevels": false,
Expand All @@ -57,15 +57,15 @@
{
"Id": "b76e72b6ab294b8490ae4e035e3cf3c6",
"Name": "color",
"Description": "Color.",
"Description": "Farbe erstellt über ARGB",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Auto",
"Description": "Construct a color by alpha, red, green, and blue components.\n\nColor.ByARGB (a: int = 255, r: int = 0, g: int = 0, b: int = 0): Color"
"Description": "Farbe durch Alpha-, Rot-, Grün- und Blau-Komponenten erstellen\n\nColor.ByARGB (alpha: int = 255, red: int = 0, green: int = 0, blue: int = 0): Color"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",
Expand All @@ -77,15 +77,15 @@
{
"Id": "338f9b0da4a74880a4ca38896d4e3882",
"Name": "",
"Description": "Value of expression at line 1",
"Description": "Wert des Ausdrucks in Zeile 1",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "Allows for DesignScript code to be authored directly"
"Description": "Ermöglicht die direkte Erstellung von DesignScript-Code."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",
Expand All @@ -107,7 +107,7 @@
{
"Id": "413ec4c566d94afabdf22b8447263364",
"Name": "",
"Description": "Value of expression at line 1",
"Description": "Wert des Ausdrucks in Zeile 1",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -116,7 +116,7 @@
{
"Id": "fdb66e18670141b4bb4da635f7715733",
"Name": "",
"Description": "Value of expression at line 2",
"Description": "Wert des Ausdrucks in Zeile 2",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
Expand All @@ -125,20 +125,21 @@
{
"Id": "7c94be0b0d9440fc851c920778989851",
"Name": "",
"Description": "Value of expression at line 3",
"Description": "Wert des Ausdrucks in Zeile 3",
"UsingDefaultValue": false,
"Level": 2,
"UseLevels": false,
"KeepListStructure": false
}
],
"Replication": "Disabled",
"Description": "Allows for DesignScript code to be authored directly"
"Description": "Ermöglicht die direkte Erstellung von DesignScript-Code."
},
{
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('System.Drawing')\r\nimport System.Drawing\r\n\r\ndef ColorByName(str):\r\n\tsyscol = System.Drawing.Color.FromName(str)\r\n\treturn syscol.R,syscol.G,syscol.B\r\n\t\r\n\r\nif isinstance(IN[0], list): OUT = map(list, zip(*[ColorByName(x) for x in IN[0]]))\r\nelse: OUT = ColorByName(IN[0])",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "125cf76209234621a253696f2fc42b9b",
"Inputs": [
Expand All @@ -164,7 +165,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
Expand All @@ -190,7 +191,7 @@
}
],
"Replication": "Disabled",
"Description": "A function parameter, use with custom nodes.\r\n\r\nYou can specify the type and default value for parameter. E.g.,\r\n\r\ninput : var[]..[]\r\nvalue : bool = false"
"Description": "Ein Funktionsparameter zur Verwendung mit benutzerdefinierten Blöcken.\r\n\r\nSie können den Typ und den Vorgabewert für den Parameter angeben, z. B.\r\n\r\ninput : var[]..[]\r\nvalue : bool = false"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore",
Expand All @@ -211,7 +212,7 @@
],
"Outputs": [],
"Replication": "Disabled",
"Description": "A function output, use with custom nodes"
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
}
],
"Connectors": [
Expand Down Expand Up @@ -252,17 +253,20 @@
}
],
"Dependencies": [],
"NodeLibraryDependencies": [],
"Author": "None provided",
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": false,
"IsVisibleInDynamoLibrary": true,
"Version": "2.0.3.8810",
"Version": "2.12.1.8246",
"RunType": "Manual",
"RunPeriod": "1000"
},
"Camera": {
"Name": "Background Preview",
"Name": "Hintergrundvorschau",
"EyeX": -17.0,
"EyeY": 24.0,
"EyeZ": 50.0,
Expand Down Expand Up @@ -336,8 +340,8 @@
}
],
"Annotations": [],
"X": 0.0,
"Y": 0.0,
"Zoom": 1.0
"X": 10.268504999999891,
"Y": 156.50772164688428,
"Zoom": 0.70823125000000009
}
}
14 changes: 9 additions & 5 deletions nodes/3.x/Color.Name.dyf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",
"NodeType": "PythonScriptNode",
"Code": "import clr\r\nclr.AddReference('System.Drawing')\r\nimport System.Drawing\r\n\r\ndef GetColorName(color):\r\n\tif hasattr(color, \"Red\"):\r\n\t\tif color.Red == 0 and color.Green == 0 and color.Blue == 0: return \"Black\"\r\n\t\telse:\r\n\t\t\tlookup = [x for x in knowncols if x.R == color.Red and x.G == color.Green and x.B == color.Blue]\r\n\t\t\tif len(lookup) > 0: return lookup[0].Name\r\n\t\t\telse: return None\r\n\telse: return None\r\n\r\nknowncols = [System.Drawing.Color.FromKnownColor(x) for x in System.Enum.GetValues(System.Drawing.KnownColor)]\r\nif isinstance(IN[0], list): OUT = [GetColorName(x) for x in IN[0]]\r\nelse: OUT = GetColorName(IN[0])",
"Engine": "CPython3",
"VariableInputPorts": true,
"Id": "b07c70eee20f4c32a1bd0f983d4cf239",
"Inputs": [
Expand All @@ -44,7 +45,7 @@
}
],
"Replication": "Disabled",
"Description": "Runs an embedded IronPython script."
"Description": "Führt ein eingebettetes Python-Skript aus."
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Symbol, DynamoCore",
Expand All @@ -70,7 +71,7 @@
}
],
"Replication": "Disabled",
"Description": "A function parameter, use with custom nodes.\r\n\r\nYou can specify the type and default value for parameter. E.g.,\r\n\r\ninput : var[]..[]\r\nvalue : bool = false"
"Description": "Ein Funktionsparameter zur Verwendung mit benutzerdefinierten Blöcken.\r\n\r\nSie können den Typ und den Vorgabewert für den Parameter angeben, z. B.\r\n\r\ninput : var[]..[]\r\nvalue : bool = false"
},
{
"ConcreteType": "Dynamo.Graph.Nodes.CustomNodes.Output, DynamoCore",
Expand All @@ -91,7 +92,7 @@
],
"Outputs": [],
"Replication": "Disabled",
"Description": "A function output, use with custom nodes"
"Description": "Eine Funktionsausgabe zur Verwendung mit benutzerdefinierten Blöcken"
}
],
"Connectors": [
Expand All @@ -107,17 +108,20 @@
}
],
"Dependencies": [],
"NodeLibraryDependencies": [],
"Author": "None provided",
"Bindings": [],
"View": {
"Dynamo": {
"ScaleFactor": 1.0,
"HasRunWithoutCrash": false,
"IsVisibleInDynamoLibrary": true,
"Version": "2.0.3.8810",
"Version": "2.12.1.8246",
"RunType": "Manual",
"RunPeriod": "1000"
},
"Camera": {
"Name": "Background Preview",
"Name": "Hintergrundvorschau",
"EyeX": -17.0,
"EyeY": 24.0,
"EyeZ": 50.0,
Expand Down
Loading

0 comments on commit a4ea8cb

Please sign in to comment.