@garciadelcastillo wrote:
Hi there!
High-level question: is there any way to access
GH_Goo
types in C# Script components before they get converted to other types on inputs via theScriptVariable
?Description: Probably a silly question, but I am blanking out. I am writing a C# Script component (must be so, cannot be a compiled one) and I want to access the history of transforms for a Transform object using
GH_Transform.CompoundTransforms
(as I guess the native Split component does). If the input type is set to Transform, then I lose that history as a I get the flat 4x4 matrix without the history. If I use a genericobject
:private void RunScript(System.Object T, ref object X) { Print(T.ToString()); GH_Transform xform = T as GH_Transform; if (xform == null) { Print("null"); } else { Print(xform.ToString()); } }
…it stringifies to a Transform, but the cast fails:
My guess here is that the object gets “flattened” to aTransform
as it enters the C# Script, before being further “flattened” to anobject
? Is there any way to access the originalGH_Transform
at this point?Thanks!
Posts: 7
Participants: 4