14 Commits

Author SHA1 Message Date
Jedd Morgan ce33e7c454 Merge pull request #105 from specklesystems/jrm/core/2.16.0
Updated core and objects to 2.16.0
2023-10-31 12:18:13 +00:00
Jedd Morgan fb1e458970 Bumped version connector package semver 2023-10-31 12:17:15 +00:00
Jedd Morgan 2755a9abd7 Fix compiler errors for 2.16 core/objects bump 2023-10-31 12:15:13 +00:00
Jedd Morgan ee9795e39f Bump Core + Objects 2023-10-31 11:52:47 +00:00
Jedd Morgan 999e6ae4ea Merge pull request #103 from specklesystems/jrm/update-docs
Updated SpeckleReceiver.cs
2023-09-26 22:46:37 +01:00
Jedd Morgan 8df96eeca4 Updated SpeckleReceiver.cs 2023-09-26 22:45:44 +01:00
Jedd Morgan 6aa92d4c57 Merge pull request #102 from specklesystems/doc-comments
Update SpeckleReceiver.cs
2023-09-26 22:18:41 +01:00
Jedd Morgan 030cb277b8 Update SpeckleReceiver.cs 2023-09-26 22:18:28 +01:00
Jedd Morgan 5ee498afce Update SpeckleReceiver.cs 2023-09-26 22:17:28 +01:00
Jedd Morgan 0bb1591624 Merge pull request #99 from specklesystems/jrm/unity/speckle-properties-example
Added manual speckle properties example
2023-09-12 14:01:18 +01:00
Jedd Morgan 5dd889c898 Update package.json 2023-09-12 13:59:30 +01:00
Jedd Morgan 9c7d1deb0a Added speckle properties example 2023-09-12 13:56:18 +01:00
Jedd Morgan 106d4c8e73 Merge pull request #98 from specklesystems/jrm/converter/convert-speckle-properties-on-instances
Attach Speckle Properties to instances
2023-08-31 15:41:22 +01:00
Jedd Morgan 7c8f70c0c0 Attach Speckle Properties to instances 2023-08-31 15:40:08 +01:00
19 changed files with 329 additions and 65 deletions
@@ -0,0 +1,62 @@
using System.Collections;
using System.Collections.Generic;
using Objects.Converter.Unity;
using Speckle.ConnectorUnity.Utils;
using Speckle.ConnectorUnity.Wrappers;
using Speckle.Core.Api;
using Speckle.Core.Credentials;
using Speckle.Core.Models;
using Speckle.Core.Transports;
using UnityEngine;
/// <summary>
/// Example script for grabbing speckle properties for a specific object "on-the-fly"
/// </summary>
/// <remarks>
/// see discussion https://speckle.community/t/reloading-assemblies-takes-too-long/6708
/// </remarks>
[AddComponentMenu("Speckle/Extras/" + nameof(AttachSpecklePropertiesExample))]
public class AttachSpecklePropertiesExample : MonoBehaviour
{
public string streamId;
public string objectId;
public virtual void Start()
{
Client speckleClient = new(AccountManager.GetDefaultAccount());
StartCoroutine(AttachSpeckleProperties(speckleClient, streamId, objectId));
}
public IEnumerator AttachSpeckleProperties(
Client speckleClient,
string streamId,
string objectId
)
{
//Fetch the object from Speckle
ServerTransport remoteTransport = new(speckleClient.Account, streamId);
Utils.WaitForTask<Base> operation =
new(async () => await Operations.Receive(objectId, remoteTransport));
//yield until task completes
yield return operation;
Base speckleObject = operation.Result;
//Do something with the properties. e.g. attach SpeckleProperties component
DoSomething(speckleObject);
}
protected virtual void DoSomething(Base speckleObject)
{
//GetProperties will filter "useful" properties
Dictionary<string, object> properties = ConverterUnity.GetProperties(
speckleObject,
typeof(SpeckleObject)
);
var sd = this.gameObject.AddComponent<SpeckleProperties>();
sd.Data = properties;
sd.SpeckleType = speckleObject.GetType();
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b5627857f30c8994c87469d287b2d115
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+19 -3
View File
@@ -1,4 +1,20 @@
{
"name": "Speckle.Extra",
"references":[ "GUID:eed1b8b83e2c0074d9e5de2348e3ff72", "GUID:e6adfdc4e436206479f48eafc82f32b5", "GUID:d274441ecc3eb3f43b093eec1503d681", "GUID:50d889142fdf9de4b8501c6eaa4b3225" ]
}
"name": "Speckle.Extra",
"rootNamespace": "",
"references": [
"GUID:eed1b8b83e2c0074d9e5de2348e3ff72",
"GUID:e6adfdc4e436206479f48eafc82f32b5",
"GUID:d274441ecc3eb3f43b093eec1503d681",
"GUID:50d889142fdf9de4b8501c6eaa4b3225",
"GUID:7383cd71541a2aa48a7baf23f74b4d5f"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}
@@ -21,7 +21,7 @@ namespace Speckle.ConnectorUnity
/// that handles conversions and subscriptions for you
/// </summary>
[RequireComponent(typeof(RecursiveConverter))]
[Obsolete]
[Obsolete("See " + nameof(SpeckleReceiver))]
public class Receiver : MonoBehaviour
{
public string StreamId;
@@ -21,7 +21,7 @@ namespace Speckle.ConnectorUnity
/// that handles conversions for you
/// </summary>
[RequireComponent(typeof(RecursiveConverter)), ExecuteAlways]
[Obsolete]
[Obsolete("See " + nameof(SpeckleSender))]
public class Sender : MonoBehaviour
{
private ServerTransport transport;
@@ -6,7 +6,8 @@
"GUID:eed1b8b83e2c0074d9e5de2348e3ff72",
"GUID:13aec21e8e96f864bafd00df49f225fc",
"GUID:d274441ecc3eb3f43b093eec1503d681",
"GUID:50d889142fdf9de4b8501c6eaa4b3225"
"GUID:50d889142fdf9de4b8501c6eaa4b3225",
"GUID:7383cd71541a2aa48a7baf23f74b4d5f"
],
"includePlatforms": [],
"excludePlatforms": [],
@@ -77,16 +77,13 @@ namespace Speckle.ConnectorUnity.Components
return true;
}
/// <summary>
/// Receive the selected <see cref="Commit"/> object, and converts ToNative as children of <paramref name="parent"/>
/// </summary>
/// <param name="parent">Optional parent <see cref="Transform"/> for the created root <see cref="GameObject"/>s</param>
/// <param name="predicate">A filter function to allow for selectively excluding certain objects from being converted</param>
/// <remarks>function does not throw, instead calls <see cref="OnErrorAction"/>, and calls <see cref="OnComplete"/> upon completion</remarks>
/// <seealso cref="ReceiveAsync(System.Threading.CancellationToken)"/>
/// <seealso cref="RecursiveConverter.RecursivelyConvertToNative_Enumerable"/>
/// <inheritdoc cref="ReceiveAndConvert_Async"/>
/// <example>
/// This function is designed to run as a coroutine i.e.
/// <c>StartCoroutine(mySpeckleReceiver.ReceiveAndConvert_Routine());</c>
/// </example>
public IEnumerator ReceiveAndConvert_Routine(
Transform? parent,
Transform? parent = null,
Predicate<TraversalContext>? predicate = null
)
{
@@ -130,9 +127,16 @@ namespace Speckle.ConnectorUnity.Components
FinishOperation();
}
/// <inheritdoc cref="ReceiveAndConvert_Routine"/>
/// <summary>
/// Receive the selected <see cref="Commit"/> object, and converts ToNative as children of <paramref name="parent"/>
/// </summary>
/// <param name="parent">Optional parent <see cref="Transform"/> for the created root <see cref="GameObject"/>s</param>
/// <param name="predicate">A filter function to allow for selectively excluding certain objects from being converted</param>
/// <remarks>function does not throw, instead calls <see cref="OnErrorAction"/>, and calls <see cref="OnComplete"/> upon completion</remarks>
/// <seealso cref="ReceiveAsync(System.Threading.CancellationToken)"/>
/// <seealso cref="RecursiveConverter.RecursivelyConvertToNative_Enumerable"/>
public async void ReceiveAndConvert_Async(
Transform? parent,
Transform? parent = null,
Predicate<TraversalContext>? predicate = null
)
{
@@ -185,6 +189,13 @@ namespace Speckle.ConnectorUnity.Components
return result;
}
/// <summary>
/// Gets the current selection
/// </summary>
/// <param name="client">The selected Account's Client</param>
/// <param name="stream">The selected <see cref="Stream"/></param>
/// <param name="commit">The selected <see cref="Commit"/></param>
/// <exception cref="InvalidOperationException">Selection was not complete or invalid</exception>
public void ValidateSelection(out Client client, out Stream stream, out Commit commit)
{
Client? selectedClient = Account.Client;
@@ -237,7 +248,7 @@ namespace Speckle.ConnectorUnity.Components
/// <param name="onTotalChildrenCountKnown"></param>
/// <param name="cancellationToken"></param>
/// <exception cref="Exception">Throws various types of exceptions to indicate faliure</exception>
/// <returns></returns>
/// <returns>The requested Speckle object</returns>
public static async Task<Base> ReceiveAsync(
Client client,
string streamId,
@@ -301,7 +312,7 @@ namespace Speckle.ConnectorUnity.Components
{ "hostPlatform", Application.platform.ToString() },
{
"isMultiplayer",
commit != null && commit.authorId != client.Account.userInfo.id
commit?.authorId != null && commit?.authorId != client.Account?.userInfo?.id
},
}
);
@@ -163,9 +163,24 @@ namespace Objects.Converter.Unity
return go;
}
public Dictionary<string, object?> GetProperties(Base o) => GetProperties(o, typeof(Base));
/// <summary>Gets all properties of <paramref name="o"/> except ignored ones. <br/>
/// Ignored properties include properties of <see cref="Base"/>
/// And some hardcoded ones that are likely to be converted (such as material, elements, and name)
/// </summary>
/// <param name="o">The speckle object to grab properties from</param>
/// <returns>The properties</returns>
/// <remarks>If you don't want to filter any properties, simply use <see cref="Base.GetMembers"/></remarks>
public static Dictionary<string, object?> GetProperties(Base o) =>
GetProperties(o, typeof(Base));
public Dictionary<string, object?> GetProperties(Base o, Type excludeType)
/// <summary>
/// Gets all properties of <paramref name="o"/> except ignored ones.<br/>
/// Ignored properties include properties of <paramref name="excludeType"/>
/// And some hardcoded ones that are likely to be converted (such as material, elements, and name)
/// </summary>
/// <inheritdoc cref="GetProperties(Base)"/>
/// <param name="excludeType">A <see cref="Type"/> whose properties should be ignored</param>
public static Dictionary<string, object?> GetProperties(Base o, Type excludeType)
{
var excludeProps = new HashSet<string>(
excludeType
@@ -178,8 +193,14 @@ namespace Objects.Converter.Unity
excludeProps.Add(alias);
}
excludeProps.Add("@Materials");
excludeProps.Add("@Views");
excludeProps.Add("renderMaterial");
excludeProps.Add("typedDefinition");
excludeProps.Add("definition");
excludeProps.Add("geometry");
excludeProps.Add("elements");
excludeProps.Add("transform");
excludeProps.Add("name");
//excludeProps.Add("tag");
excludeProps.Add("physicsLayer");
@@ -294,6 +315,9 @@ namespace Objects.Converter.Unity
: defName;
native.name = instanceName;
AttachSpeckleProperties(native, instance.GetType(), () => GetProperties(instance));
return native;
}
@@ -333,25 +357,25 @@ namespace Objects.Converter.Unity
return new Matrix4x4
{
// Left (X -> X)
[0, 0] = smatrix.M11,
[2, 0] = smatrix.M21,
[1, 0] = smatrix.M31,
[3, 0] = 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] = smatrix.M12,
[2, 2] = smatrix.M22,
[1, 2] = smatrix.M32,
[3, 2] = 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] = smatrix.M13,
[2, 1] = smatrix.M23,
[1, 1] = smatrix.M33,
[3, 1] = 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] = smatrix.M44,
[3, 3] = (float)smatrix.M44,
};
}
@@ -156,7 +156,7 @@ namespace Objects.Converter.Unity
}
}
public IList<string> DisplayValuePropertyAliases { get; set; } =
public static IList<string> DisplayValuePropertyAliases { get; set; } =
new[] { "displayValue", "@displayValue", "displayMesh", "@displayMesh" };
public GameObject? DisplayValueToNative(Base @object)
@@ -202,6 +202,18 @@ namespace Objects.Converter.Unity
return objects.Select(x => ConvertToNative(x)).ToList();
}
public object ConvertToNativeDisplayable(Base @object)
{
throw new NotImplementedException(
$"{nameof(ConvertToNativeDisplayable)} is not implemented by this converter, use {nameof(ConvertToNative)} instead"
);
}
public bool CanConvertToNativeDisplayable(Base @object)
{
throw new NotImplementedException();
}
public bool CanConvertToSpeckle(object @object)
{
switch (@object)
@@ -25,7 +25,8 @@
"Serilog.Sinks.Console": "4.1.0",
"Serilog.Sinks.Seq": "5.2.2",
"SerilogTimings": "3.0.1",
"Speckle.Newtonsoft.Json": "13.0.2"
"Speckle.Newtonsoft.Json": "13.0.2",
"System.DoubleNumerics": "3.1.3"
},
"runtime": {
"SpeckleCore2.dll": {}
@@ -444,6 +445,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",
@@ -863,6 +875,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,
@@ -774,15 +774,25 @@
</member>
<member name="M:Speckle.Core.Api.Operations.Serialize(Speckle.Core.Models.Base)">
<summary>
Serializes a given object. Note: if you want to save and persist an object to a Speckle Transport or Server, please use any of the "Send" methods. See <see cref="!:Send(Base, System.Collections.Generic.List&lt;Speckle.Core.Transports.ITransport&gt;, bool, System.Action&lt;System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;&gt;(System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;), Action&lt;string, Exception&gt;)"/>.
Serializes a given object.
<remarks>
if you want to save and persist an object to a Speckle Transport or Server,
please use any of the "Send" methods.
See <see cref="M:Speckle.Core.Api.Operations.Send(Speckle.Core.Models.Base,System.Collections.Generic.List{Speckle.Core.Transports.ITransport},System.Boolean,System.Action{System.Collections.Concurrent.ConcurrentDictionary{System.String,System.Int32}},System.Action{System.String,System.Exception},System.Boolean,Speckle.Core.Api.SerializerVersion)"/>
</remarks>
</summary>
<param name="object"></param>
<returns>A json string representation of the object.</returns>
</member>
<member name="M:Speckle.Core.Api.Operations.Serialize(Speckle.Core.Models.Base,System.Threading.CancellationToken,Speckle.Core.Api.SerializerVersion)">
<summary>
Serializes a given object. Note: if you want to save and persist an object to Speckle Transport or Server, please use any of the "Send" methods. See <see cref="!:Send(Base, System.Collections.Generic.List&lt;Speckle.Core.Transports.ITransport&gt;, bool, System.Action&lt;System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;&gt;(System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;), Action&lt;string, Exception&gt;)"/>.
Serializes a given object.
</summary>
<remarks>
If you want to save and persist an object to Speckle Transport or Server,
please use any of the "Send" methods.
<see cref="M:Speckle.Core.Api.Operations.Send(Speckle.Core.Models.Base,System.Collections.Generic.List{Speckle.Core.Transports.ITransport},System.Boolean,System.Action{System.Collections.Concurrent.ConcurrentDictionary{System.String,System.Int32}},System.Action{System.String,System.Exception},System.Boolean,Speckle.Core.Api.SerializerVersion)"/>
</remarks>
<param name="object"></param>
<param name="cancellationToken">Propagates notification that operations should be canceled.</param>
<returns>A json string representation of the object.</returns>
@@ -803,15 +813,24 @@
</member>
<member name="M:Speckle.Core.Api.Operations.Deserialize(System.String)">
<summary>
Deserializes a given object. Note: if you want to pull an object from a Speckle Transport or Server, please use any of the <see cref="!:Receive(string, Transports.ITransport, Transports.ITransport, System.Action&lt;System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;&gt;(System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;))"/>.
Deserializes a given object.
</summary>
<remarks>
Note: if you want to pull an object from a Speckle Transport or Server,
please use any of the <see cref="M:Speckle.Core.Api.Operations.Receive(System.String,Speckle.Core.Transports.ITransport,Speckle.Core.Transports.ITransport,System.Action{System.Collections.Concurrent.ConcurrentDictionary{System.String,System.Int32}},System.Action{System.String,System.Exception},System.Action{System.Int32},System.Boolean,Speckle.Core.Api.SerializerVersion)"/>
</remarks>
<param name="object">The json string representation of a speckle object that you want to deserialise.</param>
<returns></returns>
</member>
<member name="M:Speckle.Core.Api.Operations.Deserialize(System.String,System.Threading.CancellationToken,Speckle.Core.Api.SerializerVersion)">
<summary>
Deserializes a given object. Note: if you want to pull an object from a Speckle Transport or Server, please use any of the <see cref="!:Receive(string, Transports.ITransport, Transports.ITransport, System.Action&lt;System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;&gt;(System.Collections.Concurrent.ConcurrentDictionary&lt;string,int&gt;))"/>.
Deserializes a given object.
</summary>
<remarks>
Note: if you want to pull an object from a Speckle Transport or Server,
please use any of the
<see cref="M:Speckle.Core.Api.Operations.Receive(System.String,Speckle.Core.Transports.ITransport,Speckle.Core.Transports.ITransport,System.Action{System.Collections.Concurrent.ConcurrentDictionary{System.String,System.Int32}},System.Action{System.String,System.Exception},System.Action{System.Int32},System.Boolean,Speckle.Core.Api.SerializerVersion)"/>.
</remarks>
<param name="object">The json string representation of a speckle object that you want to deserialise.</param>
<param name="cancellationToken">Propagates notification that operations should be canceled.</param>
<returns></returns>
@@ -880,7 +899,8 @@
<summary>
Gets all the accounts present in this environment.
</summary>
<returns></returns>
<remarks>This function does have potential side effects. Any invalid accounts found while enumerating will be removed</remarks>
<returns>Un-enumerated enumerable of accounts</returns>
</member>
<member name="M:Speckle.Core.Credentials.AccountManager.GetLocalAccounts">
<summary>
@@ -1137,6 +1157,11 @@
Exception thrown when an object was desirably skipped
</summary>
</member>
<member name="T:Speckle.Core.Kits.ConversionNotReadyException">
<summary>
Exception thrown when an object was not ready to be baked into the document (i.e. the element's host doesn't exist yet)
</summary>
</member>
<member name="P:Speckle.Core.Kits.ISpeckleConverter.Report">
<summary>
Keeps track of the conversion process
@@ -1182,6 +1207,23 @@
<param name="objects"></param>
<returns></returns>
</member>
<member name="M:Speckle.Core.Kits.ISpeckleConverter.ConvertToNativeDisplayable(Speckle.Core.Models.Base)">
<summary>
Converts a given speckle objects as a generic native object.
This should assume <see cref="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNativeDisplayable(Speckle.Core.Models.Base)"/> has been called and returned True,
or call it within this method's implementation to ensure non-displayable objects are gracefully handled.
</summary>
<remarks>
This method should not try to convert an object to it's native representation (i.e Speckle Wall -> Wall),
but rather use the 'displayValue' of that wall to create a geometrically correct representation of that object
in the native application.
An object may be able to be converted both with <see cref="M:Speckle.Core.Kits.ISpeckleConverter.ConvertToNative(Speckle.Core.Models.Base)"/> and <see cref="M:Speckle.Core.Kits.ISpeckleConverter.ConvertToNativeDisplayable(Speckle.Core.Models.Base)"/>.
In this case, deciding which to use is dependent on each connector developer.
Preferably, <see cref="M:Speckle.Core.Kits.ISpeckleConverter.ConvertToNativeDisplayable(Speckle.Core.Models.Base)"/> should be used as a fallback to the <see cref="M:Speckle.Core.Kits.ISpeckleConverter.ConvertToNative(Speckle.Core.Models.Base)"/> logic.
</remarks>
<param name="object">Speckle object to convert</param>
<returns>The native object that resulted after converting the input <paramref name="object"/></returns>
</member>
<member name="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNative(Speckle.Core.Models.Base)">
<summary>
Checks if it can convert a Speckle object to a native one
@@ -1189,6 +1231,20 @@
<param name="object">Speckle object to convert</param>
<returns></returns>
</member>
<member name="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNativeDisplayable(Speckle.Core.Models.Base)">
<summary>
Checks to verify if a given object is: 1) displayable and 2) can be supported for conversion to the native application.
An object is considered "displayable" if it has a 'displayValue' property (defined in its class or dynamically attached to it, detached or not).
</summary>
<remarks>
An object may return "True" for both <see cref="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNative(Speckle.Core.Models.Base)"/> and <see cref="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNativeDisplayable(Speckle.Core.Models.Base)"/>
In this case, deciding which to use is dependent on each connector developer.
Preferably, <see cref="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNativeDisplayable(Speckle.Core.Models.Base)"/> should be used as a fallback to the <see cref="M:Speckle.Core.Kits.ISpeckleConverter.CanConvertToNative(Speckle.Core.Models.Base)"/> logic.
Objects found in the 'displayValue' property are assumed to be universally convertible by all converters and the viewer, but are not guaranteed to be so.
</remarks>
<param name="object">Speckle object to convert</param>
<returns>True if the object is "displayable" and the converter supports native conversion of the given speckle object in particular.</returns>
</member>
<member name="M:Speckle.Core.Kits.ISpeckleConverter.GetServicedApplications">
<summary>
Returns a list of applications serviced by this converter
@@ -1650,7 +1706,7 @@
<summary>
Abstract Builder class for a root commit <see cref="T:Speckle.Core.Models.Base"/> object.
</summary>
<typeparam name="TNativeObjectData">The native object data type needed as input for building <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos"/></typeparam>
<typeparam name="TNativeObjectData">The native object data type needed as input for building <see cref="!:_parentInfos"/></typeparam>
<remarks>
It is designed to be inherited by a host app specific implementation,
to give connectors flexibility in constructing their objects.
@@ -1663,12 +1719,12 @@
<member name="F:Speckle.Core.Models.CommitObjectBuilder`1.converted">
<summary>app id -> base</summary>
</member>
<member name="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos">
<summary>Base -> Tuple{Parent App Id, propName} ordered by priority</summary>
<member name="F:Speckle.Core.Models.CommitObjectBuilder`1._nestingInstructions">
<summary>Base -> NestingInstructions ordered by priority</summary>
</member>
<member name="M:Speckle.Core.Models.CommitObjectBuilder`1.IncludeObject(Speckle.Core.Models.Base,`0)">
<summary>
Given the parameters, builds connector specific <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos"/>
Given the parameters, builds connector specific <see cref="!:_parentInfos"/>
to be applied when <see cref="M:Speckle.Core.Models.CommitObjectBuilder`1.BuildCommitObject(Speckle.Core.Models.Base)"/> is called.
</summary>
<param name="conversionResult"></param>
@@ -1684,7 +1740,7 @@
</remarks>
<param name="rootCommitObject"></param>
</member>
<member name="M:Speckle.Core.Models.CommitObjectBuilder`1.SetRelationship(Speckle.Core.Models.Base,System.ValueTuple{System.String,System.String}[])">
<member name="M:Speckle.Core.Models.CommitObjectBuilder`1.SetRelationship(Speckle.Core.Models.Base,System.Collections.Generic.IList{Speckle.Core.Models.NestingInstructions})">
<summary>
Sets information on how a given object should be nested in the commit tree.
<paramref name="parentInfo"/> encodes the order in which we should try and nest the given <paramref name="conversionResult"/>
@@ -1704,18 +1760,18 @@
<member name="M:Speckle.Core.Models.CommitObjectBuilder`1.ApplyRelationship(Speckle.Core.Models.Base,Speckle.Core.Models.Base)">
<summary>
Will attempt to find and nest the <paramref name="current"/> object
under the first valid parent according to the <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos"/> <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1.converted"/> dictionary.
under the first valid parent according to the <see cref="!:_parentInfos"/> <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1.converted"/> dictionary.
</summary>
<remarks>
A parent is considered valid if
1. Is non null
2. Is in the <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1.converted"/> dictionary
3. Has (or can dynamically accept) a <see cref="T:System.Collections.IList"/> typed property with the propName specified by the <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos"/> item
3. Has (or can dynamically accept) a <see cref="T:System.Collections.IList"/> typed property with the propName specified by the <see cref="!:_parentInfos"/> item
4. Said <see cref="T:System.Collections.IList"/> can accept the <see cref="!:current"/> object's type
</remarks>
<param name="current"></param>
<param name="rootCommitObject"></param>
<exception cref="T:System.InvalidOperationException">Thrown when no valid parent was found for <see cref="!:current"/> given <see cref="F:Speckle.Core.Models.CommitObjectBuilder`1._parentInfos"/></exception>
<exception cref="T:System.InvalidOperationException">Thrown when no valid parent was found for <see cref="!:current"/> given <see cref="!:_parentInfos"/></exception>
</member>
<member name="T:Speckle.Core.Models.DynamicBase">
<summary>
@@ -1885,6 +1941,15 @@
<param name="value">Value to set</param>
</member>
<!-- Badly formed XML comment ignored for member "M:Speckle.Core.Models.Extensions.BaseExtensions.GetDetachedPropName(Speckle.Core.Models.Base,System.String)" -->
<member name="M:Speckle.Core.Models.Extensions.BaseExtensions.IsDisplayableObject(Speckle.Core.Models.Base)">
<summary>
Checks if an object "is displayable" i.e. has a displayValue property that is a list of base.
This is to mirror the selection logic of our viewer package, where any "displayable object" will become
a single selectable entity.
</summary>
<param name="speckleObject">The Base object to check.</param>
<returns>True if the object is displayable, false otherwise.</returns>
</member>
<member name="T:Speckle.Core.Models.Abstract">
<summary>
Wrapper around other, third party, classes that are not coming from a speckle kit.
@@ -2105,14 +2170,20 @@
<param name="membersToTraverse">Function returning the members that should be traversed for objects where this rule holds <see langword = "true"/></param>
<returns>Traversal rule in a usable state</returns>
</member>
<member name="M:Speckle.Core.Models.Utilities.hashString(System.String,Speckle.Core.Models.Utilities.HashingFuctions)">
<member name="T:Speckle.Core.Models.NestingInstructions">
<summary>
Wrapper method around hashing functions. Defaults to md5.
Container for a reference to a parent's applicationId and an Action to
execute in order to nest the child on the parent
</summary>
</member>
<member name="M:Speckle.Core.Models.Utilities.HashString(System.String,Speckle.Core.Models.Utilities.HashingFunctions)">
<summary>
Wrapper method around hashing functions..
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:Speckle.Core.Models.Utilities.GetApplicationProps(System.Object,System.Type,System.Boolean,System.Collections.Generic.List{System.String})">
<member name="M:Speckle.Core.Models.Utilities.GetApplicationProps(System.Object,System.Type,System.Boolean,System.Collections.Generic.IReadOnlyList{System.String})">
<summary>
Retrieves the simple type properties of an object
</summary>
@@ -2152,7 +2223,7 @@
<member name="M:Speckle.Core.Serialisation.BaseObjectDeserializerV2.Deserialize(System.String)">
<param name="rootObjectJson">The JSON string of the object to be deserialized <see cref="T:Speckle.Core.Models.Base"/></param>
<returns>A <see cref="T:Speckle.Core.Models.Base"/> typed object deserialized from the <paramref name="rootObjectJson"/></returns>
<exception cref="T:System.InvalidOperationException">Thrown when <see cref="F:Speckle.Core.Serialisation.BaseObjectDeserializerV2.Busy"/></exception>
<exception cref="T:System.InvalidOperationException">Thrown when <see cref="F:Speckle.Core.Serialisation.BaseObjectDeserializerV2._busy"/></exception>
<exception cref="T:System.ArgumentException">Thrown when <paramref name="rootObjectJson"/> deserializes to a type other than <see cref="T:Speckle.Core.Models.Base"/></exception>
</member>
<!-- Badly formed XML comment ignored for member "T:Speckle.Core.Serialisation.BaseObjectSerializer" -->
@@ -2278,11 +2349,9 @@
<returns></returns>
</member>
<member name="M:Speckle.Core.Transports.ITransport.GetObject(System.String)">
<summary>
Gets an object.
</summary>
<param name="id">The object's hash.</param>
<returns></returns>
<returns>The serialized object data, or <see langword="null"/> if the transport cannot find the object</returns>
<exception cref="T:System.OperationCanceledException"></exception>
</member>
<member name="M:Speckle.Core.Transports.ITransport.CopyObjectAndChildren(System.String,Speckle.Core.Transports.ITransport,System.Action{System.Int32})">
<summary>
@@ -2296,7 +2365,7 @@
<exception cref="T:System.ArgumentException">The provided arguments are not valid</exception>
<exception cref="T:System.OperationCanceledException"></exception>
</member>
<member name="M:Speckle.Core.Transports.ITransport.HasObjects(System.Collections.Generic.List{System.String})">
<member name="M:Speckle.Core.Transports.ITransport.HasObjects(System.Collections.Generic.IReadOnlyList{System.String})">
<summary>
Checks if objects are present in the transport
</summary>
@@ -2329,7 +2398,7 @@
Callback when sending batches. Parameters: object count, total bytes sent
</summary>
</member>
<member name="F:Speckle.Core.Transports.SQLiteTransport.WriteTimer">
<member name="F:Speckle.Core.Transports.SQLiteTransport._writeTimer">
<summary>
Timer that ensures queue is consumed if less than MAX_TRANSACTION_SIZE objects are being sent.
</summary>
@@ -2369,7 +2438,7 @@
<summary>
Adds an object to the saving queue.
</summary>
<param name="hash"></param>
<param name="id"></param>
<param name="serializedObject"></param>
</member>
<member name="M:Speckle.Core.Transports.SQLiteTransport.SaveObjectSync(System.String,System.String)">
@@ -2383,7 +2452,7 @@
<summary>
Gets an object.
</summary>
<param name="hash"></param>
<param name="id"></param>
<returns></returns>
</member>
<member name="M:Speckle.Core.Transports.Utilities.WaitUntil(System.Func{System.Boolean},System.Int32,System.Int32)">
@@ -0,0 +1,33 @@
fileFormatVersion: 2
guid: a85708f21043b0c458a3a77c0e09e4b8
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
defineConstraints: []
isPreloaded: 0
isOverridable: 1
isExplicitlyReferenced: 0
validateReferences: 1
platformData:
- first:
Any:
second:
enabled: 1
settings: {}
- first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
- first:
Windows Store Apps: WindowsStoreApps
second:
enabled: 0
settings:
CPU: AnyCPU
userData:
assetBundleName:
assetBundleVariant:
@@ -180,6 +180,12 @@
<param name="baseGeometries">A list of base classes to represent the direct shape (only mesh and brep are allowed, anything else will be ignored.)</param>
<param name="parameters">Optional Parameters for this instance.</param>
</member>
<member name="T:Objects.BuiltElements.Revit.RevitFamilyCategory">
<summary>
FamilyDocuments can only be assigned these categories
This is a subset of the list above which was manually retrieved from Revit's UI
</summary>
</member>
<member name="P:Objects.BuiltElements.Revit.FreeformElement.baseGeometry">
<summary>
DEPRECATED. Sets the geometry contained in the FreeformElement. This field has been deprecated in favor of `baseGeometries`
@@ -2154,7 +2160,7 @@
<param name="units"></param>
<exception cref="T:Speckle.Core.Logging.SpeckleException"></exception>
</member>
<member name="M:Objects.Other.Transform.#ctor(System.Numerics.Matrix4x4,System.String)">
<member name="M:Objects.Other.Transform.#ctor(System.DoubleNumerics.Matrix4x4,System.String)">
<summary>
Construct a transform from a 4x4 matrix and translation units
</summary>
@@ -2184,7 +2190,7 @@
Units for translation
</summary>
</member>
<member name="M:Objects.Other.Transform.Decompose(System.Numerics.Vector3@,System.Numerics.Quaternion@,System.Numerics.Vector4@)">
<member name="M:Objects.Other.Transform.Decompose(System.DoubleNumerics.Vector3@,System.DoubleNumerics.Quaternion@,System.DoubleNumerics.Vector4@)">
<summary>
Decomposes matrix into its scaling, rotation, and translation components
</summary>
@@ -1,6 +1,6 @@
{
"name": "systems.speckle.speckle-unity",
"version": "2.15.1",
"version": "2.16.0",
"displayName": "Speckle Unity Connector",
"description": "AEC Interoperability for Unity through Speckle",
"unity": "2021.1",
@@ -21,4 +21,4 @@
"email": "hello@speckle.systems",
"url": "https://speckle.systems"
}
}
}