Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 50d69a0f0e | |||
| 5e93f23d06 |
@@ -13,9 +13,9 @@
|
||||
},
|
||||
"GrasshopperAsyncComponent": {
|
||||
"type": "Direct",
|
||||
"requested": "[2.0.1, )",
|
||||
"resolved": "2.0.1",
|
||||
"contentHash": "K/LyJbYscXIdV07tPhsZgyUdwzf7vsXJBraVik6ge35T9lLYrriG5Dy9XF8ox7Q2ko5y5aTzh768+vYCdDkL5g==",
|
||||
"requested": "[2.0.3, )",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "AZvHP96WhYZWftVi7J3J65LiZmXO3hGS6W4AntMMb099gkrLqeiBKC2DOYD6YM9cOyQqly3S5knbUL2yr0jc4Q==",
|
||||
"dependencies": {
|
||||
"PolySharp": "1.14.1"
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
},
|
||||
"GrasshopperAsyncComponent": {
|
||||
"type": "Direct",
|
||||
"requested": "[2.0.1, )",
|
||||
"resolved": "2.0.1",
|
||||
"contentHash": "K/LyJbYscXIdV07tPhsZgyUdwzf7vsXJBraVik6ge35T9lLYrriG5Dy9XF8ox7Q2ko5y5aTzh768+vYCdDkL5g==",
|
||||
"requested": "[2.0.3, )",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "AZvHP96WhYZWftVi7J3J65LiZmXO3hGS6W4AntMMb099gkrLqeiBKC2DOYD6YM9cOyQqly3S5knbUL2yr0jc4Q==",
|
||||
"dependencies": {
|
||||
"PolySharp": "1.14.1"
|
||||
}
|
||||
|
||||
+2
-9
@@ -84,9 +84,6 @@ public class SpeckleBlockDefinitionPassthrough : GH_Component
|
||||
return;
|
||||
}
|
||||
|
||||
// keep track of mutation
|
||||
bool mutated = false;
|
||||
|
||||
// process the definition
|
||||
// deep copy so we don't mutate the object
|
||||
SpeckleBlockDefinitionWrapperGoo result = inputDefinition != null ? new(inputDefinition.Value.DeepCopy()) : new();
|
||||
@@ -109,7 +106,6 @@ public class SpeckleBlockDefinitionPassthrough : GH_Component
|
||||
|
||||
result.Value.Objects = processedObjects;
|
||||
result.Value.InstanceDefinitionProxy.objects = processedObjects.Select(o => o.ApplicationId!).ToList(); // TODO: this could also be set at the same time as `Objects` on the definition wrapper.
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// process name
|
||||
@@ -122,13 +118,10 @@ public class SpeckleBlockDefinitionPassthrough : GH_Component
|
||||
}
|
||||
|
||||
result.Value.Name = inputName;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// process application Id. Use a new appId if mutated, or if this is a new object
|
||||
result.Value.ApplicationId = mutated
|
||||
? Guid.NewGuid().ToString()
|
||||
: result.Value.ApplicationId ?? Guid.NewGuid().ToString();
|
||||
// no need to process application Id.
|
||||
// New definitions should have a new appID generated in the new() constructor, and we want to preserve old appID otherwise for changetracking.
|
||||
|
||||
// set outputs
|
||||
da.SetData(0, result);
|
||||
|
||||
+3
-13
@@ -151,12 +151,8 @@ public class SpeckleBlockInstancePassthrough : GH_Component
|
||||
SpeckleMaterialWrapperGoo? inputMaterial = null;
|
||||
da.GetData(6, ref inputMaterial);
|
||||
|
||||
// keep track of mutation
|
||||
// poc: we should not mark mutations on color or material, as this shouldn't affect the appId of the object, and will allow original display values to stay intact on send.
|
||||
bool mutated = false;
|
||||
|
||||
// process the instance
|
||||
// deep copy so we don't mutate the object
|
||||
// deep copy so we don't mutate the incoming object
|
||||
SpeckleBlockInstanceWrapperGoo result =
|
||||
inputInstance != null ? new((SpeckleBlockInstanceWrapper)inputInstance.Value.DeepCopy()) : new();
|
||||
|
||||
@@ -164,7 +160,6 @@ public class SpeckleBlockInstancePassthrough : GH_Component
|
||||
if (inputDefinition != null)
|
||||
{
|
||||
result.Value.Definition = inputDefinition.Value;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// Process transform
|
||||
@@ -174,7 +169,6 @@ public class SpeckleBlockInstancePassthrough : GH_Component
|
||||
if (extractedTransform.HasValue)
|
||||
{
|
||||
result.Value.Transform = extractedTransform.Value;
|
||||
mutated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -190,14 +184,12 @@ public class SpeckleBlockInstancePassthrough : GH_Component
|
||||
if (inputName != null)
|
||||
{
|
||||
result.Value.Name = inputName;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// Process properties
|
||||
if (inputProperties != null)
|
||||
{
|
||||
result.Value.Properties = inputProperties;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// process color (no mutation)
|
||||
@@ -212,10 +204,8 @@ public class SpeckleBlockInstancePassthrough : GH_Component
|
||||
result.Value.Material = inputMaterial.Value;
|
||||
}
|
||||
|
||||
// Generate new ApplicationId if mutated
|
||||
result.Value.ApplicationId = mutated
|
||||
? Guid.NewGuid().ToString()
|
||||
: result.Value.ApplicationId ?? Guid.NewGuid().ToString();
|
||||
// no need to process application id.
|
||||
// new appids are generated if this is a new object, otherwise the input object appID should be preserved for change tracking.
|
||||
|
||||
// Set outputs
|
||||
da.SetData(0, result);
|
||||
|
||||
+2
-10
@@ -155,10 +155,6 @@ public class SpeckleObjectPassthrough : GH_Component
|
||||
SpeckleMaterialWrapperGoo? inputMaterial = null;
|
||||
da.GetData(5, ref inputMaterial);
|
||||
|
||||
// keep track of mutation
|
||||
// poc: we should not mark mutations on color or material, as this shouldn't affect the appId of the object, and will allow original display values to stay intact on send.
|
||||
bool mutated = false;
|
||||
|
||||
// process geometry
|
||||
// deep copy so we don't mutate the input geo which may be speckle objects
|
||||
if (inputGeometry != null)
|
||||
@@ -189,8 +185,6 @@ public class SpeckleObjectPassthrough : GH_Component
|
||||
result.Base = mutatingGeo.Base;
|
||||
result.GeometryBase = mutatingGeo.GeometryBase;
|
||||
}
|
||||
|
||||
mutated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -206,14 +200,12 @@ public class SpeckleObjectPassthrough : GH_Component
|
||||
if (inputName != null)
|
||||
{
|
||||
result!.Name = inputName;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// process properties
|
||||
if (inputProperties != null)
|
||||
{
|
||||
result!.Properties = inputProperties;
|
||||
mutated = true;
|
||||
}
|
||||
|
||||
// process color (no mutation)
|
||||
@@ -228,8 +220,8 @@ public class SpeckleObjectPassthrough : GH_Component
|
||||
result!.Material = inputMaterial.Value;
|
||||
}
|
||||
|
||||
// process application Id. Use a new appId if mutated, or if this is a new object
|
||||
result!.ApplicationId = mutated ? Guid.NewGuid().ToString() : result!.ApplicationId ?? Guid.NewGuid().ToString();
|
||||
// no need to process application Id.
|
||||
// New definitions should have a new appID generated in the new() constructor, and we want to preserve old appID otherwise for changetracking.
|
||||
|
||||
// get the path
|
||||
string path =
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
"speckle.connectors.grasshopper7": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"GrasshopperAsyncComponent": "[2.0.1, )",
|
||||
"GrasshopperAsyncComponent": "[2.0.3, )",
|
||||
"Speckle.Connectors.Common": "[1.0.0, )",
|
||||
"Speckle.Converters.Rhino7": "[1.0.0, )",
|
||||
"System.Resources.Extensions": "[9.0.4, )"
|
||||
@@ -353,9 +353,9 @@
|
||||
},
|
||||
"GrasshopperAsyncComponent": {
|
||||
"type": "CentralTransitive",
|
||||
"requested": "[2.0.1, )",
|
||||
"resolved": "2.0.1",
|
||||
"contentHash": "K/LyJbYscXIdV07tPhsZgyUdwzf7vsXJBraVik6ge35T9lLYrriG5Dy9XF8ox7Q2ko5y5aTzh768+vYCdDkL5g==",
|
||||
"requested": "[2.0.3, )",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "AZvHP96WhYZWftVi7J3J65LiZmXO3hGS6W4AntMMb099gkrLqeiBKC2DOYD6YM9cOyQqly3S5knbUL2yr0jc4Q==",
|
||||
"dependencies": {
|
||||
"PolySharp": "1.14.1"
|
||||
}
|
||||
|
||||
@@ -328,7 +328,7 @@
|
||||
"speckle.connectors.grasshopper8": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"GrasshopperAsyncComponent": "[2.0.1, )",
|
||||
"GrasshopperAsyncComponent": "[2.0.3, )",
|
||||
"Speckle.Connectors.Common": "[1.0.0, )",
|
||||
"Speckle.Converters.Rhino8": "[1.0.0, )",
|
||||
"System.Resources.Extensions": "[9.0.4, )"
|
||||
@@ -353,9 +353,9 @@
|
||||
},
|
||||
"GrasshopperAsyncComponent": {
|
||||
"type": "CentralTransitive",
|
||||
"requested": "[2.0.1, )",
|
||||
"resolved": "2.0.1",
|
||||
"contentHash": "K/LyJbYscXIdV07tPhsZgyUdwzf7vsXJBraVik6ge35T9lLYrriG5Dy9XF8ox7Q2ko5y5aTzh768+vYCdDkL5g==",
|
||||
"requested": "[2.0.3, )",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "AZvHP96WhYZWftVi7J3J65LiZmXO3hGS6W4AntMMb099gkrLqeiBKC2DOYD6YM9cOyQqly3S5knbUL2yr0jc4Q==",
|
||||
"dependencies": {
|
||||
"PolySharp": "1.14.1"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<PackageVersion Include="Esri.ArcGISPro.Extensions30" Version="3.2.0.49743" />
|
||||
<PackageVersion Include="FluentAssertions" Version="6.12.1" />
|
||||
<PackageVersion Include="Glob" Version="1.1.9" />
|
||||
<PackageVersion Include="GrasshopperAsyncComponent" Version="2.0.1" />
|
||||
<PackageVersion Include="GrasshopperAsyncComponent" Version="2.0.3" />
|
||||
<PackageVersion Include="ILRepack.FullAuto" Version="1.6.0" />
|
||||
<PackageVersion Include="JetBrains.Profiler.SelfApi" Version="2.5.12" />
|
||||
<PackageVersion Include="LibTessDotNet" Version="1.1.15" />
|
||||
|
||||
Reference in New Issue
Block a user