Skip to content

Commit

Permalink
Revert "receive only Typed primitive properties from non-native apps"
Browse files Browse the repository at this point in the history
This reverts commit 9754ac5.
  • Loading branch information
KatKatKateryna committed Jun 20, 2024
1 parent 9a33f40 commit 46caeaf
Showing 1 changed file with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,15 @@ public List<FieldDescription> GetFieldsFromSpeckleLayer(VectorLayer target)
foreach (var baseObj in target)
{
// get all members by default, but only Dynamic ones from the basic geometry
Dictionary<string, object?> members = baseObj.GetMembers(DynamicBaseMemberType.Instance);
Dictionary<string, object?> members = new();
if (baseObj.speckle_type.StartsWith("Objects.Geometry"))
{
members = baseObj.GetMembers(DynamicBaseMemberType.Dynamic);
}
else
{
members = baseObj.GetMembers(DynamicBaseMemberType.All);
}

foreach (KeyValuePair<string, object?> field in members)
{
Expand Down Expand Up @@ -143,9 +151,6 @@ List<string> fieldAdded
{
if (field.Value is Base attributeBase)
{
// ignore all properties of Base type, until we find a common approach for host apps to send them
return;
/*
// only traverse Base if it's Rhino userStrings, or Revit parameter, or Base containing Revit parameters
if (field.Key == "parameters")
{
Expand Down Expand Up @@ -189,10 +194,7 @@ attributField.Value is Objects.BuiltElements.Revit.Parameter
{
// for now, ignore all other properties of Base type
}
*/
}
// also ignore lists before we find a strategy for hostApps to send properties in a common way
/*
else if (field.Value is IList attributeList)
{
int count = 0;
Expand All @@ -204,7 +206,6 @@ attributField.Value is Objects.BuiltElements.Revit.Parameter
count += 1;
}
}
*/
else
{
TryAddField(field, function, fieldsAndFunctions, fieldAdded);
Expand Down

0 comments on commit 46caeaf

Please sign in to comment.