2.17.1 (#110)
* Bump core to 2.17.0-rc * feat!(selection): selection now indexes based on ID (#107) * bump package version (#108) * Bumped core to 2.17.1 * Account id to include hash of server info
This commit is contained in:
Родитель
ce33e7c454
Коммит
edeec70993
|
@ -902,18 +902,18 @@ MonoBehaviour:
|
|||
- rid: 1485638386691080198
|
||||
type: {class: AccountSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 1
|
||||
selectedId:
|
||||
- rid: 1485638386691080199
|
||||
type: {class: StreamSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
<StreamsLimit>k__BackingField: 50
|
||||
<AccountSelection>k__BackingField:
|
||||
rid: 1485638386691080198
|
||||
- rid: 1485638386691080200
|
||||
type: {class: BranchSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
<BranchesLimit>k__BackingField: 100
|
||||
<CommitsLimit>k__BackingField: 0
|
||||
<StreamSelection>k__BackingField:
|
||||
|
@ -972,18 +972,18 @@ MonoBehaviour:
|
|||
- rid: 1485638386691080194
|
||||
type: {class: AccountSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
- rid: 1485638386691080195
|
||||
type: {class: StreamSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
<StreamsLimit>k__BackingField: 50
|
||||
<AccountSelection>k__BackingField:
|
||||
rid: 1485638386691080194
|
||||
- rid: 1485638386691080196
|
||||
type: {class: BranchSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
<BranchesLimit>k__BackingField: 100
|
||||
<CommitsLimit>k__BackingField: 25
|
||||
<StreamSelection>k__BackingField:
|
||||
|
@ -991,7 +991,7 @@ MonoBehaviour:
|
|||
- rid: 1485638386691080197
|
||||
type: {class: CommitSelection, ns: Speckle.ConnectorUnity.Wrappers.Selection, asm: Speckle.ConnectorUnity.Wrappers}
|
||||
data:
|
||||
selectedIndex: 0
|
||||
selectedId:
|
||||
<BranchSelection>k__BackingField:
|
||||
rid: 1485638386691080196
|
||||
--- !u!114 &161249246
|
||||
|
@ -1162,6 +1162,18 @@ Transform:
|
|||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &300223686
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b3354e8208862c341940152f5340d41a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &310693430
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1770,18 +1782,6 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 641375517}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &701880765
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b3354e8208862c341940152f5340d41a, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &712628247
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -2643,6 +2643,19 @@ Rigidbody:
|
|||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!114 &1242741158
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a4a29c776298714c88f406ad39c6095, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
matchByName: 1
|
||||
--- !u!1 &1279250012
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3059,8 +3072,8 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
nativeCaches:
|
||||
- {fileID: 1923150226}
|
||||
- {fileID: 701880765}
|
||||
- {fileID: 1242741158}
|
||||
- {fileID: 300223686}
|
||||
--- !u!1 &1464556211
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4057,19 +4070,6 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1903798475}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1923150226
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 2a4a29c776298714c88f406ad39c6095, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
matchByName: 1
|
||||
--- !u!1 &2014586909
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using NUnit.Framework;
|
||||
|
@ -9,7 +7,6 @@ using Speckle.ConnectorUnity.Wrappers;
|
|||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Models;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
namespace Speckle.ConnectorUnity.Tests
|
||||
{
|
||||
|
@ -25,7 +22,7 @@ namespace Speckle.ConnectorUnity.Tests
|
|||
{
|
||||
return Task.Run(async () => await Helpers.Receive(stream)).Result;
|
||||
}
|
||||
|
||||
|
||||
[Test, TestCaseSource(nameof(TestCases))]
|
||||
public void ToNative_Passes(string stream)
|
||||
{
|
||||
|
@ -37,14 +34,13 @@ namespace Speckle.ConnectorUnity.Tests
|
|||
Assert.That(results, HasSomeComponent<SpeckleProperties>());
|
||||
}
|
||||
|
||||
private static Constraint HasSomeComponent<T>() where T : Component
|
||||
private static Constraint HasSomeComponent<T>()
|
||||
where T : Component
|
||||
{
|
||||
return Has.Some.Matches<ConversionResult>(
|
||||
x =>
|
||||
{
|
||||
return x.WasSuccessful(out var success, out _)
|
||||
&& success.GetComponent<T>();
|
||||
});
|
||||
return Has.Some.Matches<ConversionResult>(x =>
|
||||
{
|
||||
return x.WasSuccessful(out var success, out _) && success.GetComponent<T>();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -46,18 +46,18 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.sysroot": {
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.5",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.sysroot.linux-x86_64": {
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.4",
|
||||
"depth": 1,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.sysroot": "2.0.3"
|
||||
"com.unity.sysroot": "2.0.5"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Speckle.ConnectorUnity.Components.Editor
|
|||
[CustomEditor(typeof(SpeckleReceiver))]
|
||||
public class SpeckleReceiverEditor : UnityEditor.Editor
|
||||
{
|
||||
private static bool _generateAssets = false;
|
||||
private static bool _generateAssets;
|
||||
private bool _foldOutStatus = true;
|
||||
private Texture2D? _previewImage;
|
||||
|
||||
|
|
|
@ -79,12 +79,6 @@ namespace Speckle.ConnectorUnity.NativeCache.Editor
|
|||
return _readCache.TrySaveObject(speckleObject, nativeObject);
|
||||
}
|
||||
|
||||
public override void BeginWrite()
|
||||
{
|
||||
base.BeginWrite();
|
||||
//AssetDatabase.StartAssetEditing();
|
||||
}
|
||||
|
||||
public override void FinishWrite()
|
||||
{
|
||||
if (!isWriting)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#nullable enable
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using UnityEditor;
|
||||
|
@ -49,8 +50,8 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
("Description", s => s.description),
|
||||
("Is Public", s => s.isPublic.ToString()),
|
||||
("Role", s => s.role),
|
||||
("Created at", s => s.createdAt.ToString()),
|
||||
("Updated at", s => s.updatedAt.ToString()),
|
||||
("Created at", s => s.createdAt.ToString(CultureInfo.InvariantCulture)),
|
||||
("Updated at", s => s.updatedAt.ToString(CultureInfo.InvariantCulture)),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +71,11 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
$"<{nameof(BranchSelection.CommitsLimit)}>k__BackingField",
|
||||
};
|
||||
|
||||
details = new (string, Func<Branch, string>)[] { ("Description", s => s.description), };
|
||||
details = new (string, Func<Branch, string>)[]
|
||||
{
|
||||
("Model Id", s => s.id),
|
||||
("Description", s => s.description),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,7 +90,7 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
{
|
||||
("Commit Id", s => s.id),
|
||||
("Author Name", s => s.authorName),
|
||||
("Created At", s => s.createdAt.ToString()),
|
||||
("Created At", s => s.createdAt.ToString(CultureInfo.InvariantCulture)),
|
||||
("Source Application", s => s.sourceApplication),
|
||||
("Reference Object Id", s => s.referencedObject),
|
||||
};
|
||||
|
@ -108,9 +113,9 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
|
||||
protected (string, Func<TOption, string>)[] details = { };
|
||||
|
||||
private string[] GetFormattedOptions(TOption[] options)
|
||||
private string[] GetFormattedOptions(IReadOnlyList<TOption> options)
|
||||
{
|
||||
int optionsCount = options.Length;
|
||||
int optionsCount = options.Count;
|
||||
string[] choices = new string[optionsCount];
|
||||
for (int i = 0; i < optionsCount; i++)
|
||||
{
|
||||
|
@ -182,10 +187,10 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
var provider = ScriptableObject.CreateInstance<StringListSearchProvider>();
|
||||
provider.Title = typeof(TOption).Name;
|
||||
provider.listItems = GetFormattedOptions(t.Options);
|
||||
;
|
||||
|
||||
provider.onSetIndexCallback = o =>
|
||||
{
|
||||
t.SelectedIndex = o;
|
||||
t.Selected = t.Options[o];
|
||||
};
|
||||
SearchWindow.Open(new SearchWindowContext(windowPos), provider);
|
||||
}
|
||||
|
@ -260,7 +265,7 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
public List<SearchTreeEntry> CreateSearchTree(SearchWindowContext context)
|
||||
{
|
||||
List<SearchTreeEntry> searchList =
|
||||
new(listItems.Length + 1) { new SearchTreeGroupEntry(new GUIContent(Title), 0) };
|
||||
new(listItems.Length + 1) { new SearchTreeGroupEntry(new GUIContent(Title)) };
|
||||
|
||||
for (int i = 0; i < listItems.Length; i++)
|
||||
{
|
||||
|
@ -275,9 +280,9 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection.Editor
|
|||
return searchList;
|
||||
}
|
||||
|
||||
public bool OnSelectEntry(SearchTreeEntry SearchTreeEntry, SearchWindowContext context)
|
||||
public bool OnSelectEntry(SearchTreeEntry searchTreeEntry, SearchWindowContext context)
|
||||
{
|
||||
onSetIndexCallback?.Invoke((int)SearchTreeEntry.userData);
|
||||
onSetIndexCallback?.Invoke((int)searchTreeEntry.userData);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -18,25 +18,26 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
{
|
||||
private static readonly string[] SpeckleTypeOptionStrings;
|
||||
private static readonly Type[] SpeckleTypeOptions;
|
||||
|
||||
|
||||
private static HashSet<string> ArrayFoldoutState = new();
|
||||
private static bool instancePropFoldoutState = true;
|
||||
private static bool dynamicPropFoldoutState = true;
|
||||
private static bool isEditMode = false;
|
||||
private static bool isEditMode;
|
||||
|
||||
static SpecklePropertiesEditor()
|
||||
{
|
||||
var options = typeof(Mesh).Assembly
|
||||
.GetTypes()
|
||||
.Where(x => x.IsSubclassOf(typeof(Base)) && !x.IsAbstract).ToList();
|
||||
.Where(x => x.IsSubclassOf(typeof(Base)) && !x.IsAbstract)
|
||||
.ToList();
|
||||
|
||||
var strings = options
|
||||
.Where(x => x.FullName != null)
|
||||
.Select(x => x.FullName!.Replace('.', '/'));
|
||||
|
||||
var manualTypes = new [] { typeof(Base), typeof(Collection)};
|
||||
var manualStrings = new []{ nameof(Base), nameof(Collection)};
|
||||
|
||||
|
||||
var manualTypes = new[] { typeof(Base), typeof(Collection) };
|
||||
var manualStrings = new[] { nameof(Base), nameof(Collection) };
|
||||
|
||||
//Manually Add `Base`
|
||||
SpeckleTypeOptions = options.Concat(manualTypes).ToArray();
|
||||
SpeckleTypeOptionStrings = strings.Concat(manualStrings).ToArray();
|
||||
|
@ -45,64 +46,82 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
}
|
||||
|
||||
private static GUILayoutOption[] propLayoutOptions = { GUILayout.ExpandWidth(true) };
|
||||
|
||||
|
||||
public override void OnInspectorGUI()
|
||||
{
|
||||
SpeckleProperties properties = (SpeckleProperties)target;
|
||||
|
||||
//Edit Mode
|
||||
isEditMode = EditorGUILayout.ToggleLeft("Enable Inspector Edit Mode (experimental)", isEditMode);
|
||||
isEditMode = EditorGUILayout.ToggleLeft(
|
||||
"Enable Inspector Edit Mode (experimental)",
|
||||
isEditMode
|
||||
);
|
||||
|
||||
if (isEditMode)
|
||||
{
|
||||
GUILayout.Label(
|
||||
"Modifying properties through the inspector is experimental and can lead to invalid objects, proceed at your own risk!",
|
||||
EditorStyles.helpBox);
|
||||
EditorStyles.helpBox
|
||||
);
|
||||
GUILayout.Space(10);
|
||||
}
|
||||
GUI.enabled = isEditMode;
|
||||
|
||||
|
||||
// SpeckleType
|
||||
GUILayout.Label("Speckle Type: ", EditorStyles.boldLabel );
|
||||
|
||||
GUILayout.Label("Speckle Type: ", EditorStyles.boldLabel);
|
||||
|
||||
var oldIndex = Array.IndexOf(SpeckleTypeOptions, properties.SpeckleType);
|
||||
var speckleTypeSelectedIndex = EditorGUILayout.Popup(oldIndex, SpeckleTypeOptionStrings);
|
||||
|
||||
if(oldIndex != speckleTypeSelectedIndex && speckleTypeSelectedIndex >= 0)
|
||||
var speckleTypeSelectedIndex = EditorGUILayout.Popup(
|
||||
oldIndex,
|
||||
SpeckleTypeOptionStrings
|
||||
);
|
||||
|
||||
if (oldIndex != speckleTypeSelectedIndex && speckleTypeSelectedIndex >= 0)
|
||||
{
|
||||
properties.SpeckleType = SpeckleTypeOptions[speckleTypeSelectedIndex];
|
||||
}
|
||||
|
||||
|
||||
// Instance Properties
|
||||
var InstancePropertyNames = DynamicBase.GetInstanceMembersNames(properties.SpeckleType);
|
||||
instancePropFoldoutState = EditorGUILayout.Foldout(instancePropFoldoutState, "Instance Properties: ", EditorStyles.foldoutHeader);
|
||||
var instancePropertyNames =
|
||||
(IReadOnlyCollection<string>)
|
||||
DynamicBase.GetInstanceMembersNames(properties.SpeckleType);
|
||||
instancePropFoldoutState = EditorGUILayout.Foldout(
|
||||
instancePropFoldoutState,
|
||||
"Instance Properties: ",
|
||||
EditorStyles.foldoutHeader
|
||||
);
|
||||
if (instancePropFoldoutState)
|
||||
{
|
||||
foreach (var propName in InstancePropertyNames)
|
||||
foreach (var propName in instancePropertyNames)
|
||||
{
|
||||
if (!properties.Data.TryGetValue(propName, out object? existingValue)) continue;
|
||||
|
||||
if (!properties.Data.TryGetValue(propName, out object? existingValue))
|
||||
continue;
|
||||
|
||||
var newValue = CreateField(existingValue, propName, propLayoutOptions);
|
||||
if(newValue != existingValue)
|
||||
if (newValue != existingValue)
|
||||
properties.Data[propName] = newValue;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GUILayout.Space(10);
|
||||
dynamicPropFoldoutState = EditorGUILayout.Foldout(dynamicPropFoldoutState, "Dynamic Properties:", EditorStyles.foldoutHeader);
|
||||
dynamicPropFoldoutState = EditorGUILayout.Foldout(
|
||||
dynamicPropFoldoutState,
|
||||
"Dynamic Properties:",
|
||||
EditorStyles.foldoutHeader
|
||||
);
|
||||
if (dynamicPropFoldoutState)
|
||||
{
|
||||
var ignoreSet = InstancePropertyNames.ToImmutableHashSet();
|
||||
var ignoreSet = instancePropertyNames.ToImmutableHashSet();
|
||||
foreach (var kvp in properties.Data)
|
||||
{
|
||||
if (ignoreSet.Contains(kvp.Key)) continue;
|
||||
|
||||
if (ignoreSet.Contains(kvp.Key))
|
||||
continue;
|
||||
|
||||
var existingValue = kvp.Value;
|
||||
var newValue = CreateField(existingValue, kvp.Key, propLayoutOptions);
|
||||
if(newValue != existingValue)
|
||||
if (newValue != existingValue)
|
||||
properties.Data[kvp.Key] = newValue;
|
||||
|
||||
|
||||
GUILayout.Space(10);
|
||||
}
|
||||
}
|
||||
|
@ -118,13 +137,18 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
_ => CreateFieldPrimitive(v, propName, options),
|
||||
};
|
||||
|
||||
if (ret != null) return ret;
|
||||
|
||||
EditorGUILayout.TextField(propName, v == null? "NULL" : v.ToString());
|
||||
if (ret != null)
|
||||
return ret;
|
||||
|
||||
EditorGUILayout.TextField(propName, v == null ? "NULL" : v.ToString());
|
||||
return v;
|
||||
}
|
||||
|
||||
private static object? CreateFieldPrimitive(object? v, string propName, params GUILayoutOption[] options)
|
||||
|
||||
private static object? CreateFieldPrimitive(
|
||||
object? v,
|
||||
string propName,
|
||||
params GUILayoutOption[] options
|
||||
)
|
||||
{
|
||||
return v switch
|
||||
{
|
||||
|
@ -135,11 +159,19 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
string s => EditorGUILayout.TextField(propName, s, options),
|
||||
bool b => EditorGUILayout.Toggle(propName, b, options),
|
||||
Enum e => EditorGUILayout.EnumPopup(propName, e, options),
|
||||
Point p => PointToVector3(EditorGUILayout.Vector3Field(propName, new Vector3((float)p.x, (float)p.z, (float)p.z), options), p),
|
||||
Point p
|
||||
=> PointToVector3(
|
||||
EditorGUILayout.Vector3Field(
|
||||
propName,
|
||||
new Vector3((float)p.x, (float)p.z, (float)p.z),
|
||||
options
|
||||
),
|
||||
p
|
||||
),
|
||||
_ => null,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
private static Point PointToVector3(Vector3 vector, Point p)
|
||||
{
|
||||
p.x = vector.x;
|
||||
|
@ -147,10 +179,13 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
p.z = vector.z;
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
private IList ArrayField(string propName, IList list, params GUILayoutOption[] options)
|
||||
{
|
||||
bool isExpanded = EditorGUILayout.Foldout(ArrayFoldoutState.Contains(propName), propName);
|
||||
bool isExpanded = EditorGUILayout.Foldout(
|
||||
ArrayFoldoutState.Contains(propName),
|
||||
propName
|
||||
);
|
||||
if (isExpanded)
|
||||
{
|
||||
ArrayFoldoutState.Add(propName);
|
||||
|
@ -158,10 +193,13 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
{
|
||||
object? item = list[i];
|
||||
var r = CreateFieldPrimitive(item, i.ToString(), options);
|
||||
|
||||
|
||||
if (r == null)
|
||||
{
|
||||
EditorGUILayout.TextField(i.ToString(), item == null? "NULL" : item.ToString());
|
||||
EditorGUILayout.TextField(
|
||||
i.ToString(),
|
||||
item == null ? "NULL" : item.ToString()
|
||||
);
|
||||
continue;
|
||||
}
|
||||
//Update list item
|
||||
|
@ -175,6 +213,5 @@ namespace Speckle.ConnectorUnity.Wrappers.Editor
|
|||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -327,7 +327,6 @@ namespace Speckle.ConnectorUnity.Components
|
|||
{
|
||||
await client
|
||||
.CommitReceived(
|
||||
cancellationToken,
|
||||
new CommitReceivedInput
|
||||
{
|
||||
streamId = streamId,
|
||||
|
@ -336,7 +335,8 @@ namespace Speckle.ConnectorUnity.Components
|
|||
sourceApplication = HostApplications.Unity.GetVersion(
|
||||
CoreUtils.GetHostAppVersion()
|
||||
)
|
||||
}
|
||||
},
|
||||
cancellationToken
|
||||
)
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ namespace Speckle.ConnectorUnity.Components
|
|||
Branch.Initialise();
|
||||
Commit.Initialise();
|
||||
Commit.OnSelectionChange = () => OnCommitSelectionChange?.Invoke(Commit.Selected);
|
||||
if (Account.Options is not { Length: > 0 } || forceRefresh)
|
||||
if (Account.Options is not { Count: > 0 } || forceRefresh)
|
||||
Account.RefreshOptions();
|
||||
}
|
||||
|
||||
|
@ -540,7 +540,7 @@ namespace Speckle.ConnectorUnity.Components
|
|||
|
||||
#region Deprecated members
|
||||
|
||||
[Obsolete("use " + nameof(ReceiveAndConvertRoutine), true)]
|
||||
[Obsolete("use " + nameof(ReceiveAndConvert_Routine), true)]
|
||||
public IEnumerator ReceiveAndConvertRoutine(
|
||||
SpeckleReceiver speckleReceiver,
|
||||
string rootObjectName,
|
||||
|
|
|
@ -141,7 +141,6 @@ namespace Speckle.ConnectorUnity.Components
|
|||
)
|
||||
{
|
||||
string commitId = await client.CommitCreate(
|
||||
cancellationToken,
|
||||
new CommitCreateInput
|
||||
{
|
||||
streamId = streamId,
|
||||
|
@ -152,7 +151,8 @@ namespace Speckle.ConnectorUnity.Components
|
|||
CoreUtils.GetHostAppVersion()
|
||||
),
|
||||
totalChildrenCount = (int)data.totalChildrenCount,
|
||||
}
|
||||
},
|
||||
cancellationToken
|
||||
);
|
||||
|
||||
return commitId;
|
||||
|
@ -230,7 +230,7 @@ namespace Speckle.ConnectorUnity.Components
|
|||
Stream.Initialise();
|
||||
Branch.Initialise();
|
||||
Branch.OnSelectionChange = () => OnBranchSelectionChange?.Invoke(Branch.Selected);
|
||||
if (Account.Options is not { Length: > 0 } || forceRefresh)
|
||||
if (Account.Options is not { Count: > 0 } || forceRefresh)
|
||||
Account.RefreshOptions();
|
||||
}
|
||||
|
||||
|
|
|
@ -47,21 +47,27 @@ namespace Objects.Converter.Unity
|
|||
|
||||
public Vector3 VectorFromPoint(Point p) => VectorByCoordinates(p.x, p.y, p.z, p.units);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="arr"></param>
|
||||
/// <param name="arr">flat list of x,y,z values</param>
|
||||
/// <param name="units"></param>
|
||||
/// <returns></returns>
|
||||
public Vector3[] ArrayToPoints(IList<double> arr, string units)
|
||||
/// <exception cref="ArgumentException">Length of <paramref name="arr"/> must be a multiple of 3</exception>
|
||||
public Vector3[] ArrayToPoints(IReadOnlyList<double> arr, string units)
|
||||
{
|
||||
if (arr.Count % 3 != 0)
|
||||
throw new Exception("Array malformed: length not a multiple of 3");
|
||||
{
|
||||
throw new ArgumentException(
|
||||
"Array malformed: length not a multiple of 3",
|
||||
nameof(arr)
|
||||
);
|
||||
}
|
||||
|
||||
Vector3[] points = new Vector3[arr.Count / 3];
|
||||
var f = GetConversionFactor(units);
|
||||
double f = GetConversionFactor(units);
|
||||
|
||||
for (int i = 2, k = 0; i < arr.Count; i += 3)
|
||||
{
|
||||
points[k++] = VectorByCoordinates(arr[i - 2], arr[i - 1], arr[i], f);
|
||||
}
|
||||
|
||||
return points;
|
||||
}
|
||||
|
@ -70,13 +76,7 @@ namespace Objects.Converter.Unity
|
|||
|
||||
#region ToSpeckle
|
||||
|
||||
//TODO: more of these
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("", true)]
|
||||
public virtual Point PointToSpeckle(Vector3 p)
|
||||
{
|
||||
//switch y and z
|
||||
|
@ -117,7 +117,7 @@ namespace Objects.Converter.Unity
|
|||
{
|
||||
Vector3 newPt = VectorByCoordinates(point.x, point.y, point.z, point.units);
|
||||
|
||||
var go = NewPointBasedGameObject(new Vector3[] { newPt, newPt }, point.speckle_type);
|
||||
var go = NewPointBasedGameObject(new[] { newPt, newPt }, point.speckle_type);
|
||||
return go;
|
||||
}
|
||||
|
||||
|
@ -352,30 +352,30 @@ namespace Objects.Converter.Unity
|
|||
public Matrix4x4 TransformToNativeMatrix(STransform speckleTransform)
|
||||
{
|
||||
var sf = GetConversionFactor(speckleTransform.units);
|
||||
var smatrix = speckleTransform.matrix;
|
||||
var sMatrix = speckleTransform.matrix;
|
||||
|
||||
return new Matrix4x4
|
||||
{
|
||||
// Left (X -> X)
|
||||
[0, 0] = (float)smatrix.M11,
|
||||
[2, 0] = (float)smatrix.M21,
|
||||
[1, 0] = (float)smatrix.M31,
|
||||
[3, 0] = (float)smatrix.M41,
|
||||
[0, 0] = (float)sMatrix.M11,
|
||||
[2, 0] = (float)sMatrix.M21,
|
||||
[1, 0] = (float)sMatrix.M31,
|
||||
[3, 0] = (float)sMatrix.M41,
|
||||
//Up (Z -> Y)
|
||||
[0, 2] = (float)smatrix.M12,
|
||||
[2, 2] = (float)smatrix.M22,
|
||||
[1, 2] = (float)smatrix.M32,
|
||||
[3, 2] = (float)smatrix.M42,
|
||||
[0, 2] = (float)sMatrix.M12,
|
||||
[2, 2] = (float)sMatrix.M22,
|
||||
[1, 2] = (float)sMatrix.M32,
|
||||
[3, 2] = (float)sMatrix.M42,
|
||||
//Forwards (Y -> Z)
|
||||
[0, 1] = (float)smatrix.M13,
|
||||
[2, 1] = (float)smatrix.M23,
|
||||
[1, 1] = (float)smatrix.M33,
|
||||
[3, 1] = (float)smatrix.M43,
|
||||
[0, 1] = (float)sMatrix.M13,
|
||||
[2, 1] = (float)sMatrix.M23,
|
||||
[1, 1] = (float)sMatrix.M33,
|
||||
[3, 1] = (float)sMatrix.M43,
|
||||
//Translation
|
||||
[0, 3] = (float)(smatrix.M14 * sf),
|
||||
[2, 3] = (float)(smatrix.M24 * sf),
|
||||
[1, 3] = (float)(smatrix.M34 * sf),
|
||||
[3, 3] = (float)smatrix.M44,
|
||||
[0, 3] = (float)(sMatrix.M14 * sf),
|
||||
[2, 3] = (float)(sMatrix.M24 * sf),
|
||||
[1, 3] = (float)(sMatrix.M34 * sf),
|
||||
[3, 3] = (float)sMatrix.M44,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -16,383 +16,173 @@
|
|||
https://www.apollographql.com/docs/apollo-server/v2/data/errors/#forbidden
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetActivity(System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String,System.Int32)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetActivity(System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the activity of a stream
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the activity from</param>
|
||||
<param name="after">Only show activity after this DateTime</param>
|
||||
<param name="before">Only show activity before this DateTime</param>
|
||||
<param name="cursor">Time to filter the activity with</param>
|
||||
<param name="actionType">Time to filter the activity with</param>
|
||||
<param name="limit">Max number of activity items to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetActivity(System.Threading.CancellationToken,System.String,System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.Nullable{System.DateTime},System.String,System.Int32)">
|
||||
<summary>
|
||||
Gets the activity of a stream
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="id">Id of the stream to get the activity from</param>
|
||||
<param name="after">Only show activity after this DateTime</param>
|
||||
<param name="before">Only show activity before this DateTime</param>
|
||||
<param name="cursor">Time to filter the activity with</param>
|
||||
<param name="actionType">Time to filter the activity with</param>
|
||||
<param name="limit">Max number of commits to get</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetBranches(System.String,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Get branches from a given stream
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the branches from</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<param name="commitsLimit">Max number of commits to retrieve</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetBranches(System.Threading.CancellationToken,System.String,System.Int32,System.Int32)">
|
||||
<summary>
|
||||
Get branches from a given stream
|
||||
</summary>
|
||||
<param name="limit">Max number of activity items to get</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetBranchesWithLimitRetry(System.String,System.Int32)">
|
||||
<summary>
|
||||
Get branches from a given stream, first with a max of 500 and then with a max of 100.
|
||||
This ensures that if the server API is limiting to 100 branches, that any failure will try again at the lower value.
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the branches from</param>
|
||||
<param name="commitsLimit">Max number of commits to retrieve</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetBranches(System.String,System.Int32,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Get branches from a given stream
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the branches from</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<param name="commitsLimit">Max number of commits to retrieve</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchCreate(Speckle.Core.Api.BranchCreateInput)">
|
||||
<summary>
|
||||
Creates a branch on a stream.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchCreate(System.Threading.CancellationToken,Speckle.Core.Api.BranchCreateInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.BranchCreate(Speckle.Core.Api.BranchCreateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Creates a branch on a stream.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>The branch id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchGet(System.String,System.String,System.Int32)">
|
||||
<member name="M:Speckle.Core.Api.Client.BranchGet(System.String,System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given branch from a stream.
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the branch from</param>
|
||||
<param name="branchName">Name of the branch to get</param>
|
||||
<returns></returns>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>The requested branch</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchGet(System.Threading.CancellationToken,System.String,System.String,System.Int32)">
|
||||
<member name="M:Speckle.Core.Api.Client.ModelGet(System.String,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given branch from a stream.
|
||||
Gets a given model from a project.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId">Id of the stream to get the branch from</param>
|
||||
<param name="branchName">Name of the branch to get</param>
|
||||
<param name="projectId">Id of the project to get the model from</param>
|
||||
<param name="modelId">Id of the model</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchUpdate(Speckle.Core.Api.BranchUpdateInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.BranchUpdate(Speckle.Core.Api.BranchUpdateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Updates a branch.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchUpdate(System.Threading.CancellationToken,Speckle.Core.Api.BranchUpdateInput)">
|
||||
<summary>
|
||||
Updates a branch.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchDelete(Speckle.Core.Api.BranchDeleteInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.BranchDelete(Speckle.Core.Api.BranchDeleteInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Deletes a stream.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.BranchDelete(System.Threading.CancellationToken,Speckle.Core.Api.BranchDeleteInput)">
|
||||
<summary>
|
||||
Deletes a stream.
|
||||
</summary>
|
||||
<param name="branchInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetComments(System.String,System.Int32,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetComments(System.String,System.Int32,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the comments on a Stream
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the comments from</param>
|
||||
<param name="limit">The number of comments to get</param>
|
||||
<param name="cursor">Time to filter the comments with</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetComments(System.Threading.CancellationToken,System.String,System.Int32,System.String)">
|
||||
<summary>
|
||||
Gets the comments on a Stream
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId">Id of the stream to get the comments from</param>
|
||||
<param name="limit">The number of comments to get</param>
|
||||
<param name="cursor">Time to filter the comments with</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommentScreenshot(System.String,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommentScreenshot(System.String,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the screenshot of a Comment
|
||||
Gets the screenshot of a Comment
|
||||
</summary>
|
||||
<param name="id">Id of the comment</param>
|
||||
<param name="streamId">Id of the stream to get the comment from</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommentScreenshot(System.Threading.CancellationToken,System.String,System.String)">
|
||||
<summary>
|
||||
Gets the screenshot of a Comment
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="id">Id of the comment</param>
|
||||
<param name="streamId">Id of the stream to get the comment from</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitGet(System.String,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.CommitGet(System.String,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given commit from a stream.
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the commit from</param>
|
||||
<param name="commitId">Id of the commit to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitGet(System.Threading.CancellationToken,System.String,System.String)">
|
||||
<summary>
|
||||
Gets a given commit from a stream.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId">Id of the stream to get the commit from</param>
|
||||
<param name="commitId">Id of the commit to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommits(System.String,System.Int32)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommits(System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the latest commits from a stream
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the commits from</param>
|
||||
<param name="limit">Max number of commits to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetCommits(System.Threading.CancellationToken,System.String,System.Int32)">
|
||||
<summary>
|
||||
Gets the latest commits from a stream
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId">Id of the stream to get the commits from</param>
|
||||
<param name="limit">Max number of commits to get</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:System.Exception"></exception>
|
||||
<returns>The requested commits</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitCreate(Speckle.Core.Api.CommitCreateInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.CommitCreate(Speckle.Core.Api.CommitCreateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Creates a commit on a branch.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<returns>The commit id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitCreate(System.Threading.CancellationToken,Speckle.Core.Api.CommitCreateInput)">
|
||||
<inheritdoc cref="M:Speckle.Core.Api.Client.CommitCreate(Speckle.Core.Api.CommitCreateInput)"/>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitUpdate(Speckle.Core.Api.CommitUpdateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Updates a commit.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitUpdate(Speckle.Core.Api.CommitUpdateInput)">
|
||||
<summary>
|
||||
Updates a commit.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitUpdate(System.Threading.CancellationToken,Speckle.Core.Api.CommitUpdateInput)">
|
||||
<summary>
|
||||
Updates a commit.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitDelete(Speckle.Core.Api.CommitDeleteInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.CommitDelete(Speckle.Core.Api.CommitDeleteInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Deletes a commit.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitDelete(System.Threading.CancellationToken,Speckle.Core.Api.CommitDeleteInput)">
|
||||
<summary>
|
||||
Deletes a commit.
|
||||
</summary>
|
||||
<param name="commitInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitReceived(Speckle.Core.Api.CommitReceivedInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.CommitReceived(Speckle.Core.Api.CommitReceivedInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Sends a commitReceived mutation, affirming a commit has been received.
|
||||
</summary>
|
||||
<remarks>Used for read receipts</remarks>
|
||||
<param name="commitReceivedInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.CommitReceived(System.Threading.CancellationToken,Speckle.Core.Api.CommitReceivedInput)">
|
||||
<inheritdoc cref="M:Speckle.Core.Api.Client.CommitReceived(Speckle.Core.Api.CommitReceivedInput)"/>
|
||||
<param name="cancellationToken"></param>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectGet(System.String,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectGet(System.String,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given object from a stream.
|
||||
Gets data about the requested Speckle object from a stream.
|
||||
</summary>
|
||||
<param name="streamId">Id of the stream to get the object from</param>
|
||||
<param name="objectId">Id of the object to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectGet(System.Threading.CancellationToken,System.String,System.String)">
|
||||
<summary>
|
||||
Gets a given object from a stream.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId">Id of the stream to get the object from</param>
|
||||
<param name="objectId">Id of the object to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectCountGet(System.String,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectCountGet(System.String,System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given object from a stream.
|
||||
</summary>
|
||||
<param name="streamId"></param>
|
||||
<param name="objectId"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ObjectCountGet(System.Threading.CancellationToken,System.String,System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client._CheckStreamInvitesSupported(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a given object from a stream.
|
||||
Checks if Speckle Server version is at least v2.6.4 meaning stream invites are supported.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamId"></param>
|
||||
<param name="objectId"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.GetServerVersion(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the version of the current server. Useful for guarding against unsupported api calls on newer or older servers.
|
||||
</summary>
|
||||
<param name="cancellationToken">[Optional] defaults to an empty cancellation token</param>
|
||||
<returns><see cref="T:Speckle.Core.Api.Version"/> object excluding any strings (eg "2.7.2-alpha.6995" becomes "2.7.2.6995")</returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.IsStreamAccessible(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Cheks if a stream exists by id.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGet(System.String,System.Int32)">
|
||||
<summary>
|
||||
Gets a stream by id including basic branch info (id, name, description, and total commit count).
|
||||
For detailed commit and branch info, use StreamGetCommits and StreamGetBranches respectively.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGet(System.Threading.CancellationToken,System.String,System.Int32)">
|
||||
<summary>
|
||||
Gets a stream by id including basic branch info (id, name, description, and total commit count).
|
||||
For detailed commit and branch info, use StreamGetCommits and StreamGetBranches respectively.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamsGet(System.Int32)">
|
||||
<summary>
|
||||
Gets all streams for the current user
|
||||
</summary>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamsGet(System.Threading.CancellationToken,System.Int32)">
|
||||
<summary>
|
||||
Gets all streams for the current user
|
||||
</summary>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.FavoriteStreamsGet(System.Threading.CancellationToken,System.Int32)">
|
||||
<summary>
|
||||
Gets all favorite streams for the current user
|
||||
</summary>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamSearch(System.String,System.Int32)">
|
||||
<summary>
|
||||
Searches the user's streams by name, description, and ID
|
||||
</summary>
|
||||
<param name="query">String query to search for</param>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamSearch(System.Threading.CancellationToken,System.String,System.Int32)">
|
||||
<summary>
|
||||
Searches the user's streams by name, description, and ID
|
||||
</summary>
|
||||
<param name="query">String query to search for</param>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamCreate(Speckle.Core.Api.StreamCreateInput)">
|
||||
<summary>
|
||||
Creates a stream.
|
||||
</summary>
|
||||
<param name="streamInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamCreate(System.Threading.CancellationToken,Speckle.Core.Api.StreamCreateInput)">
|
||||
<summary>
|
||||
Creates a stream.
|
||||
</summary>
|
||||
<param name="streamInput"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamUpdate(Speckle.Core.Api.StreamUpdateInput)">
|
||||
<summary>
|
||||
Updates a stream.
|
||||
</summary>
|
||||
<param name="streamInput">Note: the id field needs to be a valid stream id.</param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamUpdate(System.Threading.CancellationToken,Speckle.Core.Api.StreamUpdateInput)">
|
||||
<summary>
|
||||
Updates a stream.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="streamInput">Note: the id field needs to be a valid stream id.</param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamDelete(System.String)">
|
||||
<summary>
|
||||
Deletes a stream.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to be deleted</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamDelete(System.Threading.CancellationToken,System.String)">
|
||||
<summary>
|
||||
Deletes a stream.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="id">Id of the stream to be deleted</param>
|
||||
<returns></returns>
|
||||
<returns>true if invites are supported</returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException">if Speckle Server version is less than v2.6.4</exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGrantPermission(Speckle.Core.Api.StreamPermissionInput)">
|
||||
<summary>
|
||||
|
@ -409,19 +199,87 @@
|
|||
<param name="permissionInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamRevokePermission(Speckle.Core.Api.StreamRevokePermissionInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.GetServerVersion(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Revokes permissions of a user on a given stream.
|
||||
Gets the version of the current server. Useful for guarding against unsupported api calls on newer or older servers.
|
||||
</summary>
|
||||
<param name="permissionInput"></param>
|
||||
<param name="cancellationToken">[Optional] defaults to an empty cancellation token</param>
|
||||
<returns><see cref="T:Speckle.Core.Api.Version"/> object excluding any strings (eg "2.7.2-alpha.6995" becomes "2.7.2.6995")</returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.IsStreamAccessible(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Checks if a stream exists by id.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamRevokePermission(System.Threading.CancellationToken,Speckle.Core.Api.StreamRevokePermissionInput)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGet(System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets a stream by id including basic branch info (id, name, description, and total commit count).
|
||||
For detailed commit and branch info, use <see cref="M:Speckle.Core.Api.Client.StreamGetCommits(System.String,System.Int32,System.Threading.CancellationToken)"/> and <see cref="M:Speckle.Core.Api.Client.StreamGetBranches(System.String,System.Int32,System.Int32,System.Threading.CancellationToken)"/> respectively.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamsGet(System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets all streams for the current user
|
||||
</summary>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.FavoriteStreamsGet(System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets all favorite streams for the current user
|
||||
</summary>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamSearch(System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Searches the user's streams by name, description, and ID
|
||||
</summary>
|
||||
<param name="query">String query to search for</param>
|
||||
<param name="limit">Max number of streams to return</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamCreate(Speckle.Core.Api.StreamCreateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Creates a stream.
|
||||
</summary>
|
||||
<param name="streamInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamUpdate(Speckle.Core.Api.StreamUpdateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Updates a stream.
|
||||
</summary>
|
||||
<param name="streamInput">Note: the id field needs to be a valid stream id.</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>The stream's id.</returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamDelete(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Deletes a stream.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to be deleted</param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamRevokePermission(Speckle.Core.Api.StreamRevokePermissionInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Revokes permissions of a user on a given stream.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="permissionInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamUpdatePermission(Speckle.Core.Api.StreamPermissionInput,System.Threading.CancellationToken)">
|
||||
|
@ -433,36 +291,21 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetPendingCollaborators(System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetPendingCollaborators(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the pending collaborators of a stream by id.
|
||||
Requires the user to be an owner of the stream.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamGetPendingCollaborators(System.Threading.CancellationToken,System.String)">
|
||||
<summary>
|
||||
Gets the pending collaborators of a stream by id.
|
||||
Requires the user to be an owner of the stream.
|
||||
</summary>
|
||||
<param name="id">Id of the stream to get</param>
|
||||
<param name="branchesLimit">Max number of branches to retrieve</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamInviteCreate(Speckle.Core.Api.StreamInviteCreateInput)">
|
||||
<summary>
|
||||
Sends an email invite to join a stream and assigns them a collaborator role.
|
||||
</summary>
|
||||
<param name="streamCreateInput"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamInviteCreate(System.Threading.CancellationToken,Speckle.Core.Api.StreamInviteCreateInput)">
|
||||
<summary>
|
||||
Sends an email invite to join a stream and assigns them a collaborator role.
|
||||
</summary>
|
||||
<param name="streamId"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamInviteCreate(Speckle.Core.Api.StreamInviteCreateInput,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Sends an email invite to join a stream and assigns them a collaborator role.
|
||||
</summary>
|
||||
<param name="inviteCreateInput"></param>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamInviteCancel(System.String,System.String,System.Threading.CancellationToken)">
|
||||
|
@ -474,14 +317,6 @@
|
|||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client._CheckStreamInvitesSupported(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Checks if Speckle Server version is at least v2.6.4 meaning stream invites are supported.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns>true if invites are supported</returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException">if Speckle Server version is less than v2.6.4</exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.StreamInviteUse(System.String,System.String,System.Boolean,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Accept or decline a stream invite.
|
||||
|
@ -493,45 +328,22 @@
|
|||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ActiveUserGet">
|
||||
<summary>
|
||||
Gets the currently active user profile.
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.ActiveUserGet(System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Gets the currently active user profile.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.OtherUserGet(System.String)">
|
||||
<member name="M:Speckle.Core.Api.Client.OtherUserGet(System.String,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Get another user's profile by its user id.
|
||||
</summary>
|
||||
<param name="id">Id of the user you are looking for</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.OtherUserGet(System.Threading.CancellationToken,System.String)">
|
||||
<summary>
|
||||
Get another user's profile by its user id.
|
||||
</summary>
|
||||
<param name="cancellationToken"></param>
|
||||
<param name="id">Id of the user you are looking for</param>
|
||||
<returns></returns>
|
||||
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.UserSearch(System.String,System.Int32)">
|
||||
<summary>
|
||||
Searches for a user on the server.
|
||||
</summary>
|
||||
<param name="query">String to search for. Must be at least 3 characters</param>
|
||||
<param name="limit">Max number of users to return</param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:Speckle.Core.Api.Client.UserSearch(System.Threading.CancellationToken,System.String,System.Int32)">
|
||||
<member name="M:Speckle.Core.Api.Client.UserSearch(System.String,System.Int32,System.Threading.CancellationToken)">
|
||||
<summary>
|
||||
Searches for a user on the server.
|
||||
</summary>
|
||||
|
@ -601,17 +413,17 @@
|
|||
</member>
|
||||
<member name="P:Speckle.Core.Api.Stream.branch">
|
||||
<summary>
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.BranchGet(System.Threading.CancellationToken,System.String,System.String,System.Int32)"/>.
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.BranchGet(System.String,System.String,System.Int32,System.Threading.CancellationToken)"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Speckle.Core.Api.Stream.commit">
|
||||
<summary>
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.CommitGet(System.Threading.CancellationToken,System.String,System.String)"/>.
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.CommitGet(System.String,System.String,System.Threading.CancellationToken)"/>.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Speckle.Core.Api.Stream.commits">
|
||||
<summary>
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.StreamGetCommits(System.Threading.CancellationToken,System.String,System.Int32)"/>
|
||||
Set only in the case that you've requested this through <see cref="M:Speckle.Core.Api.Client.StreamGetCommits(System.String,System.Int32,System.Threading.CancellationToken)"/>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Api.ActiveUserData">
|
||||
|
@ -849,6 +661,15 @@
|
|||
<param name="dictionary"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Api.ServerLimits">
|
||||
<summary>
|
||||
Defines the limits for specific API calls on the Speckle Server.
|
||||
These are magic numbers! Should be aligned with server always.
|
||||
</summary>
|
||||
<remarks>
|
||||
⚠️ Not all limits are reflected here!
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Credentials.AccountManager">
|
||||
<summary>
|
||||
Manage accounts locally for desktop applications.
|
||||
|
@ -1145,17 +966,51 @@
|
|||
</member>
|
||||
<member name="T:Speckle.Core.Kits.ConversionException">
|
||||
<summary>
|
||||
Exception thrown when conversion of an object fails
|
||||
Exception thrown when conversion of an object was not successful
|
||||
</summary>
|
||||
<remarks>
|
||||
Ideally this exception contains a meaningful message, and reference to the object that failed to be converted.
|
||||
This exception can be used for both ToSpeckle and ToNative conversion
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Kits.ConversionNotSupportedException">
|
||||
<summary>
|
||||
Exception used when an object could not be converted, because we don't support a specific conversion.
|
||||
</summary>
|
||||
<remarks>
|
||||
This Exception should be thrown as part of a pre-emptive check in conversions (not as part reactive error handling)
|
||||
and usage (throwing) should not be dependent on external state:
|
||||
i.e. given the same object and converter state, the outcome (exception throw or not) should be the same.
|
||||
</remarks>
|
||||
<example>
|
||||
It can be used for:
|
||||
<ul>
|
||||
<li> objects who's <see cref="T:System.Type"/> we don't support (e.g. <c>"Walls are not supported"</c>)</li>
|
||||
<li> objects with a property who's value we don't support (e.g. <c>"Beams with shape type of Circular are not supported"</c>)</li>
|
||||
<li> complex object requirements (e.g. <c>"We don't support walls with zero width and no displayValue"</c>)</li>
|
||||
</ul>
|
||||
It should <b>NOT</b> be used for:
|
||||
<ul>
|
||||
<li> Invalid Speckle Objects (e.g. <c>"We don't support walls with null lines"</c>)</li>
|
||||
<li> Objects that we have already converted, and therefore now skip (e.g. <c>"A Wall with the same name was already converted"</c>)</li>
|
||||
<li> Reactive error handling (e.g. "Failed to convert wall, I guess it wasn't supported")</li>
|
||||
</ul>
|
||||
</example>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Kits.ConversionSkippedException">
|
||||
<summary>
|
||||
Exception thrown when an object was desirably skipped
|
||||
Exception thrown when an object was desirably skipped<br/>
|
||||
</summary>
|
||||
<remarks>
|
||||
<b>Avoid throwing this exception Type!</b><br/>
|
||||
As it introduces some bad patterns for exception handling.
|
||||
<br/>
|
||||
Namely, it encodes how the exception WILL be handled, Not simply what HAS happened.
|
||||
Exceptions shouldn't care how they are handled.
|
||||
<br/>
|
||||
We were also misusing this exception in Revit, to correct for ambiguity in the way certain objects should be traversed,
|
||||
by selectively skipping objects that were already converted by other means.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="T:Speckle.Core.Kits.ConversionNotReadyException">
|
||||
<summary>
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace Speckle.ConnectorUnity.NativeCache
|
|||
[ExecuteAlways]
|
||||
public abstract class AbstractNativeCache : ScriptableObject
|
||||
{
|
||||
protected bool isWriting = false;
|
||||
protected bool isWriting;
|
||||
public abstract bool TryGetObject<T>(
|
||||
Base speckleObject,
|
||||
[NotNullWhen(true)] out T? nativeObject
|
||||
|
|
|
@ -429,6 +429,17 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"System.DoubleNumerics/3.1.3": {
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "2.0.3"
|
||||
},
|
||||
"runtime": {
|
||||
"lib/netstandard1.3/System.DoubleNumerics.dll": {
|
||||
"assemblyVersion": "1.0.0.0",
|
||||
"fileVersion": "1.0.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"System.Memory/4.5.4": {
|
||||
"dependencies": {
|
||||
"System.Buffers": "4.5.1",
|
||||
|
@ -848,6 +859,13 @@
|
|||
"path": "system.collections.immutable/5.0.0",
|
||||
"hashPath": "system.collections.immutable.5.0.0.nupkg.sha512"
|
||||
},
|
||||
"System.DoubleNumerics/3.1.3": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
"sha512": "sha512-KRKEM/L3KBodjA9VOg3EifFVWUY6EOqaMB05UvPEDm7Zeby/kZW+4kdWUEPzW6xtkwf46p661L9NrbeeQhtLzw==",
|
||||
"path": "system.doublenumerics/3.1.3",
|
||||
"hashPath": "system.doublenumerics.3.1.3.nupkg.sha512"
|
||||
},
|
||||
"System.Memory/4.5.4": {
|
||||
"type": "package",
|
||||
"serviceable": true,
|
||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -359,6 +359,112 @@
|
|||
Retrieves the elements for this link
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Objects.BuiltElements.RebarGroup`1">
|
||||
<summary>
|
||||
A reinforcement bar group comprised of reinforcing bars of the same type and shape.
|
||||
</summary>
|
||||
<remarks>
|
||||
This class is not suitable for freeform rebar, which can have multiple shapes.
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.shape">
|
||||
<summary>
|
||||
The shape of the rebar group
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.number">
|
||||
<summary>
|
||||
The number of rebars in the rebar group
|
||||
</summary>
|
||||
<remarks>
|
||||
Excluded end bars are not included in the count
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.hasFirstBar">
|
||||
<summary>
|
||||
Indicates if rebar set includes the first bar
|
||||
</summary>
|
||||
<remarks>
|
||||
Only applicable to stirrup (transverse) rebar
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.hasLastBar">
|
||||
<summary>
|
||||
Indicates if rebar set includes the last bar
|
||||
</summary>
|
||||
<remarks>
|
||||
Only applicable to stirrup (transverse) rebar
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.startHook">
|
||||
<summary>
|
||||
The start hook of bars in the rebar group
|
||||
</summary>
|
||||
<remarks>
|
||||
Null indicates no start hook
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.endHook">
|
||||
<summary>
|
||||
The end hook of bars in the rebar group
|
||||
</summary>
|
||||
<remarks>
|
||||
Null indicates no end hook
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.displayValue">
|
||||
<summary>
|
||||
The display representation of the rebar group as centerline curves
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarGroup`1.volume">
|
||||
<summary>
|
||||
The total volume of the rebar group.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:Objects.BuiltElements.RebarShape">
|
||||
<summary>
|
||||
The shape describing the geometry and geometry parameters of a reinforcing bar
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarShape.name">
|
||||
<summary>
|
||||
The name of the rebar shape
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarShape.rebarType">
|
||||
<summary>
|
||||
The type of the rebar shape
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarShape.curves">
|
||||
<summary>
|
||||
The curves of the rebar shape
|
||||
</summary>
|
||||
<remarks>
|
||||
Typically suppresses hooks and bend radius
|
||||
</remarks>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarShape.barDiameter">
|
||||
<summary>
|
||||
The diameter of the rebar bar
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarHook.angle">
|
||||
<summary>
|
||||
The angle of the hook in radians.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarHook.length">
|
||||
<summary>
|
||||
The length of the hook.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Objects.BuiltElements.RebarHook.radius">
|
||||
<summary>
|
||||
The radius of the bend of the hook.
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:Objects.BuiltElements.Room.#ctor(System.String,System.String,Objects.BuiltElements.Level,Objects.Geometry.Point)">
|
||||
<summary>
|
||||
SchemaBuilder constructor for a Room
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Logging;
|
||||
|
||||
namespace Speckle.ConnectorUnity
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Linq;
|
||||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Credentials;
|
||||
using Speckle.Core.Helpers;
|
||||
using UnityEngine;
|
||||
|
||||
#nullable enable
|
||||
|
@ -24,7 +25,13 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
}
|
||||
}
|
||||
|
||||
protected override string? KeyFunction(Account? value) => value?.id;
|
||||
protected override string? KeyFunction(Account? value)
|
||||
{
|
||||
if (value is null)
|
||||
return null;
|
||||
|
||||
return value.id + Crypt.Hash(value.serverInfo.url ?? "");
|
||||
}
|
||||
|
||||
public override void RefreshOptions()
|
||||
{
|
||||
|
|
|
@ -9,8 +9,12 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
[Serializable]
|
||||
public sealed class BranchSelection : OptionSelection<Branch>
|
||||
{
|
||||
[field: SerializeField, Range(1, 100), Tooltip("Number of branches to request")]
|
||||
public int BranchesLimit { get; set; } = 100;
|
||||
[field:
|
||||
SerializeField,
|
||||
Range(1, ServerLimits.BRANCH_GET_LIMIT),
|
||||
Tooltip("Number of branches to request")
|
||||
]
|
||||
public int BranchesLimit { get; set; } = ServerLimits.OLD_BRANCH_GET_LIMIT;
|
||||
|
||||
[field: SerializeField, Range(1, 100), Tooltip("Number of commits to request")]
|
||||
public int CommitsLimit { get; set; } = 25;
|
||||
|
@ -30,14 +34,14 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
StreamSelection.OnSelectionChange = RefreshOptions;
|
||||
}
|
||||
|
||||
protected override string? KeyFunction(Branch? value) => value?.name;
|
||||
protected override string? KeyFunction(Branch? value) => value?.id;
|
||||
|
||||
public override void RefreshOptions()
|
||||
{
|
||||
Stream? stream = StreamSelection.Selected;
|
||||
if (stream == null)
|
||||
return;
|
||||
IList<Branch> branches;
|
||||
IReadOnlyList<Branch> branches;
|
||||
try
|
||||
{
|
||||
branches = Client!
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
|
||||
public override void RefreshOptions()
|
||||
{
|
||||
Branch? branch = BranchSelection!.Selected;
|
||||
Branch? branch = BranchSelection.Selected;
|
||||
if (branch == null)
|
||||
return;
|
||||
List<Commit> commits = branch.commits.items;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
/// <summary>
|
||||
/// Reusable <see langword="abstract"/> serializable type that abstracts
|
||||
/// the fetching of <typeparamref name="TOption"/> objects.
|
||||
/// And exposes an <see cref="Array"/> of <see cref="Options"/>
|
||||
/// And exposes an list of <see cref="Options"/>
|
||||
/// with serialised selection.
|
||||
/// </summary>
|
||||
/// <typeparam name="TOption"></typeparam>
|
||||
|
@ -18,32 +18,42 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
public abstract class OptionSelection<TOption>
|
||||
where TOption : class
|
||||
{
|
||||
[SerializeField]
|
||||
private int selectedIndex = -1;
|
||||
public IReadOnlyList<TOption> Options { get; protected set; } = Array.Empty<TOption>();
|
||||
|
||||
public int SelectedIndex
|
||||
{
|
||||
get => selectedIndex;
|
||||
set
|
||||
{
|
||||
selectedIndex = value;
|
||||
OnSelectionChange?.Invoke();
|
||||
}
|
||||
}
|
||||
private Dictionary<string, int>? _indexMap;
|
||||
|
||||
[SerializeField]
|
||||
private string? selectedId;
|
||||
|
||||
public TOption? Selected
|
||||
{
|
||||
get
|
||||
{
|
||||
if (Options is null)
|
||||
if (selectedId == null)
|
||||
return null;
|
||||
if (SelectedIndex < 0 || SelectedIndex >= Options.Length)
|
||||
return null;
|
||||
return Options[SelectedIndex];
|
||||
|
||||
TryGetOption(selectedId, out var value);
|
||||
return value;
|
||||
}
|
||||
set
|
||||
{
|
||||
selectedId = KeyFunction(value);
|
||||
OnSelectionChange?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
public TOption[] Options { get; protected set; } = Array.Empty<TOption>();
|
||||
public bool TryGetOption(string key, [NotNullWhen(true)] out TOption? value)
|
||||
{
|
||||
if (_indexMap is not null && _indexMap.TryGetValue(key, out int index))
|
||||
{
|
||||
value = Options[index];
|
||||
return true;
|
||||
}
|
||||
|
||||
value = null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public Action? OnSelectionChange { get; set; }
|
||||
|
||||
public abstract Client? Client { get; }
|
||||
|
@ -53,36 +63,38 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
|
||||
public abstract void RefreshOptions();
|
||||
|
||||
protected void GenerateOptions(IList<TOption> source, Func<TOption, int, bool> isDefault)
|
||||
protected void GenerateOptions(
|
||||
IReadOnlyCollection<TOption?> source,
|
||||
Func<TOption, int, bool> isDefault
|
||||
)
|
||||
{
|
||||
List<TOption> optionsToAdd = new(source.Count);
|
||||
int defaultOption = -1;
|
||||
Dictionary<string, int> indexMap = new(source.Count);
|
||||
string? defaultOption = null;
|
||||
int index = 0;
|
||||
foreach (TOption? a in source)
|
||||
{
|
||||
if (a == null)
|
||||
continue;
|
||||
|
||||
var key = KeyFunction(a);
|
||||
optionsToAdd.Add(a);
|
||||
indexMap.Add(key, index);
|
||||
|
||||
if (isDefault(a, index))
|
||||
defaultOption = index;
|
||||
defaultOption = key;
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
TOption? currentSelected = Selected;
|
||||
bool selectionOutOfRange = SelectedIndex < 0 || SelectedIndex >= optionsToAdd.Count;
|
||||
if (
|
||||
selectionOutOfRange
|
||||
|| (
|
||||
currentSelected != null
|
||||
&& KeyFunction(currentSelected) != KeyFunction(optionsToAdd[SelectedIndex])
|
||||
)
|
||||
)
|
||||
string? currentSelected = KeyFunction(Selected);
|
||||
if (currentSelected is null || !indexMap.ContainsKey(currentSelected))
|
||||
{
|
||||
selectedIndex = defaultOption;
|
||||
selectedId = defaultOption;
|
||||
}
|
||||
|
||||
Options = optionsToAdd.ToArray();
|
||||
//Debug.Log($"{this.GetType()} updated");
|
||||
Options = optionsToAdd;
|
||||
_indexMap = indexMap;
|
||||
OnSelectionChange?.Invoke();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace Speckle.ConnectorUnity.Wrappers.Selection
|
|||
{
|
||||
if (Client == null)
|
||||
return;
|
||||
IList<Stream> streams;
|
||||
IReadOnlyList<Stream> streams;
|
||||
try
|
||||
{
|
||||
streams = Client.StreamsGet(StreamsLimit).GetAwaiter().GetResult();
|
||||
|
|
|
@ -5,7 +5,6 @@ using System.Collections.Specialized;
|
|||
using Speckle.Core.Api;
|
||||
using Speckle.Core.Models;
|
||||
using Speckle.Core.Serialisation;
|
||||
using Speckle.Newtonsoft.Json;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Speckle.ConnectorUnity.Wrappers
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "systems.speckle.speckle-unity",
|
||||
"version": "2.16.0",
|
||||
"version": "2.17.1",
|
||||
"displayName": "Speckle Unity Connector",
|
||||
"description": "AEC Interoperability for Unity through Speckle",
|
||||
"unity": "2021.1",
|
||||
|
|
Загрузка…
Ссылка в новой задаче