Internalizing and writing/reading custom class parameter - Grasshopper2024-03-28T19:25:44Zhttps://www.grasshopper3d.com/forum/topics/internalizing-and-writing-reading-custom-class-parameter?feed=yes&xn_auth=noThanks for reply.
ok, yes i d…tag:www.grasshopper3d.com,2014-04-02:2985220:Comment:10374812014-04-02T22:33:32.439ZSteve Lewishttps://www.grasshopper3d.com/profile/TrevorStephenLewis
<p>Thanks for reply.</p>
<p>ok, yes i do sometimes internalize those parameters I need by reading and writing the value to the component on save and open. Seems like I may be ok then.</p>
<p></p>
<p>yes we will have to re-write for GH2, i guess the question is how much we have to re-write!!!!</p>
<p></p>
<p>Probably too early, but, do you forsee GH2 be open to 3rd party developers to the same extent as GH1? Off the top of your head, do you have a map of when you might start exposing GH through…</p>
<p>Thanks for reply.</p>
<p>ok, yes i do sometimes internalize those parameters I need by reading and writing the value to the component on save and open. Seems like I may be ok then.</p>
<p></p>
<p>yes we will have to re-write for GH2, i guess the question is how much we have to re-write!!!!</p>
<p></p>
<p>Probably too early, but, do you forsee GH2 be open to 3rd party developers to the same extent as GH1? Off the top of your head, do you have a map of when you might start exposing GH through an SDK?</p> You will have to rewrite no m…tag:www.grasshopper3d.com,2014-03-27:2985220:Comment:10340762014-03-27T20:04:12.512ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>You will have to rewrite no matter what. GH2 SDK will not be compatible with GH1 SDK. Not even remotely.</p>
<p></p>
<p>However how you implement your specific type of goo is up to you. You're free to lie about whether or not you successfully serialized your goo. If the data is never written to begin with (for example because it only ever is generated as the output of a component) then the problem will never arise.</p>
<p></p>
<p>But note that it is always possible to force goo to get stored…</p>
<p>You will have to rewrite no matter what. GH2 SDK will not be compatible with GH1 SDK. Not even remotely.</p>
<p></p>
<p>However how you implement your specific type of goo is up to you. You're free to lie about whether or not you successfully serialized your goo. If the data is never written to begin with (for example because it only ever is generated as the output of a component) then the problem will never arise.</p>
<p></p>
<p>But note that it is always possible to force goo to get stored in the file by internalising a parameter. How and when you choose to inform a user that this cannot be done with your specific type of goo is up to you.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p> What if some of the custom cu…tag:www.grasshopper3d.com,2014-03-27:2985220:Comment:10341712014-03-27T19:12:11.532ZSteve Lewishttps://www.grasshopper3d.com/profile/TrevorStephenLewis
<p>What if some of the custom custom classes we have written for GH1.0 inherit the IGH_GOO interface but aren't necessarily fully <span>deserializable? This will be a significant break if I have to re-write all these classes. A lot of these classes obtain properties through volatile data and don't need to be deserialized.....</span></p>
<p>What if some of the custom custom classes we have written for GH1.0 inherit the IGH_GOO interface but aren't necessarily fully <span>deserializable? This will be a significant break if I have to re-write all these classes. A lot of these classes obtain properties through volatile data and don't need to be deserialized.....</span></p> Thanks for the jargon post. G…tag:www.grasshopper3d.com,2014-03-14:2985220:Comment:10257062014-03-14T11:13:46.375ZKaiko Kivihttps://www.grasshopper3d.com/profile/KaikoKivi
<p>Thanks for the jargon post. Guess I had a "Rubber Ducking" moment here.</p>
<p>But I still didn't find out why it was impossible to SetPersistentParam with the data in the parameter class. Maybe irrelevant now.</p>
<p></p>
<p>Can you guess, if there are any limits to the data that can be internalised like this. I currently tested it with about 1500 items that each serialize two GH_Structures with average 10 paths. The gh file went from 250kb to 3250kb. Besides some data not serializing…</p>
<p>Thanks for the jargon post. Guess I had a "Rubber Ducking" moment here.</p>
<p>But I still didn't find out why it was impossible to SetPersistentParam with the data in the parameter class. Maybe irrelevant now.</p>
<p></p>
<p>Can you guess, if there are any limits to the data that can be internalised like this. I currently tested it with about 1500 items that each serialize two GH_Structures with average 10 paths. The gh file went from 250kb to 3250kb. Besides some data not serializing properly (Trimmed Surfaces. I can bypass this in the definition for now), had no scaling problems so far. Would I have to be careful somehow when scaling this data?</p> Magic indeed. In GH2 all IGH_…tag:www.grasshopper3d.com,2014-03-14:2985220:Comment:10255802014-03-14T09:29:56.157ZDavid Ruttenhttps://www.grasshopper3d.com/profile/DavidRutten
<p>Magic indeed. In GH2 all IGH_Goo (which will be called IGoo then, I'm removing all <a href="http://blog.codinghorror.com/new-programming-jargon/" target="_blank">smurf naming</a> from Grasshopper) must be deserializable, making this stuff more robust and easier to find.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p>
<p>Magic indeed. In GH2 all IGH_Goo (which will be called IGoo then, I'm removing all <a href="http://blog.codinghorror.com/new-programming-jargon/" target="_blank">smurf naming</a> from Grasshopper) must be deserializable, making this stuff more robust and easier to find.</p>
<p></p>
<p>--</p>
<p>David Rutten</p>
<p>david@mcneel.com</p> Seems that I found the answer…tag:www.grasshopper3d.com,2014-03-13:2985220:Comment:10256192014-03-13T21:45:05.989ZKaiko Kivihttps://www.grasshopper3d.com/profile/KaikoKivi
Seems that I found the answer.<br/>
It is the MyItemGoo that has to derive the interface from GH_ISerializable and implement the Read and Write on the data of the single MyItem it containes. The rest is up to Grasshopper to know where, when and how to store and sort the data of any of these items.<br/>
Magic.
Seems that I found the answer.<br/>
It is the MyItemGoo that has to derive the interface from GH_ISerializable and implement the Read and Write on the data of the single MyItem it containes. The rest is up to Grasshopper to know where, when and how to store and sort the data of any of these items.<br/>
Magic.