@@ -19,23 +19,22 @@ abstract class ComponentIOMarshal
1919
2020 sealed class NewComponentIOMarshal : ComponentIOMarshal
2121 {
22- private readonly ZuiPythonComponent _component ;
23-
24- private readonly GrasshopperDocument _document ;
25- private readonly CustomTable _objectTable ;
22+ private readonly ZuiPythonComponent m_component ;
23+ private readonly CustomTable m_objectTable ;
24+ private readonly GrasshopperDocument m_document ;
2625
2726 public NewComponentIOMarshal ( GrasshopperDocument document , ZuiPythonComponent component )
2827 {
29- _document = document ;
30- _objectTable = _document . Objects ;
31- _component = component ;
28+ m_document = document ;
29+ m_objectTable = m_document . Objects ;
30+ m_component = component ;
3231 }
3332
3433 #region Inputs
3534
3635 public override object GetInput ( IGH_DataAccess DA , int i )
3736 {
38- var input = ( Param_ScriptVariable ) _component . Params . Input [ i ] ;
37+ var input = ( Param_ScriptVariable ) m_component . Params . Input [ i ] ;
3938 bool addIntoGhDoc = input . TypeHint is GhDocGuidHint ;
4039
4140 object o ;
@@ -76,7 +75,7 @@ private object GetListFromParameter(IGH_DataAccess DA, int index, bool addIntoGh
7675 {
7776 List < IGH_Goo > list2 = new List < IGH_Goo > ( ) ;
7877 DA . GetDataList ( index , list2 ) ;
79- IGH_TypeHint typeHint = ( ( Param_ScriptVariable ) _component . Params . Input [ index ] ) . TypeHint ;
78+ IGH_TypeHint typeHint = ( ( Param_ScriptVariable ) m_component . Params . Input [ index ] ) . TypeHint ;
8079 var t = Type . GetType ( "IronPython.Runtime.List,IronPython" ) ;
8180 IList list = Activator . CreateInstance ( t ) as IList ;
8281
@@ -97,7 +96,7 @@ private object GetTreeFromParameter(IGH_DataAccess DA, int index, bool addIntoGh
9796 {
9897 GH_Structure < IGH_Goo > structure ;
9998 DA . GetDataTree ( index , out structure ) ;
100- IGH_TypeHint typeHint = ( ( Param_ScriptVariable ) _component . Params . Input [ index ] ) . TypeHint ;
99+ IGH_TypeHint typeHint = ( ( Param_ScriptVariable ) m_component . Params . Input [ index ] ) . TypeHint ;
101100 var tree = new DataTree < object > ( ) ;
102101
103102 for ( int i = 0 ; i < structure . PathCount ; i ++ )
@@ -120,7 +119,7 @@ private object GetTreeFromParameter(IGH_DataAccess DA, int index, bool addIntoGh
120119
121120 private object TypeCast ( IGH_Goo data , int index )
122121 {
123- Param_ScriptVariable variable = ( Param_ScriptVariable ) _component . Params . Input [ index ] ;
122+ Param_ScriptVariable variable = ( Param_ScriptVariable ) m_component . Params . Input [ index ] ;
124123 return this . TypeCast ( data , variable . TypeHint ) ;
125124 }
126125
@@ -146,11 +145,11 @@ public void DocumentSingle(ref object input, bool addIntoGhDoc)
146145 {
147146 if ( input is GeometryBase )
148147 {
149- input = _objectTable . __InternalAdd ( input as dynamic ) ;
148+ input = m_objectTable . __InternalAdd ( input as dynamic ) ;
150149 }
151150 else if ( input is Point3d )
152151 {
153- input = _objectTable . AddPoint ( ( Point3d ) input ) ;
152+ input = m_objectTable . AddPoint ( ( Point3d ) input ) ;
154153 }
155154 }
156155 }
@@ -186,8 +185,9 @@ public override void SetOutput(object o, IGH_DataAccess DA, int index)
186185 {
187186 o = ( this as dynamic ) . GeometryTree ( o as dynamic ) ;
188187 }
189- catch
188+ catch ( Exception ex )
190189 {
190+ Rhino . Runtime . HostUtils . ExceptionReport ( ex ) ;
191191 }
192192 DA . SetDataTree ( index , o as IGH_DataTree ) ;
193193 }
@@ -211,7 +211,7 @@ private void GeometrySingle(ref object input)
211211 {
212212 if ( input is Guid )
213213 {
214- AttributedGeometry a = _objectTable . Find ( ( Guid ) input ) ;
214+ AttributedGeometry a = m_objectTable . Find ( ( Guid ) input ) ;
215215 input = a . Geometry ;
216216 }
217217 }
@@ -423,8 +423,9 @@ public override void SetOutput(object o, IGH_DataAccess DA, int index)
423423 {
424424 o = ( this as dynamic ) . GeometryTree ( o as dynamic ) ;
425425 }
426- catch
426+ catch ( Exception ex )
427427 {
428+ Rhino . Runtime . HostUtils . ExceptionReport ( ex ) ;
428429 }
429430 }
430431 DA . SetDataTree ( index , o as IGH_DataTree ) ;
0 commit comments