Grasshopper

algorithmic modeling for Rhino

Hi, I have problem with preview override between my two same components. When I change value in Slider1 then component2 changes preview and shows data from component 1.
(comp 1 is preview disabled)


PD value is:

class GH_PointData : GH_Goo<PointData>, IGH_PreviewData...

class GH_ParamPointData : GH_Param<GH_PointData>, IGH_PreviewObject

 

and I duplicate input data before I change it. (same in PD)

DA.GetData("CD", ref CD);

GH_CellData CDd = (GH_CellData)CD.Duplicate();

 

Are there any rules how to prevent it?

 

Thanks

 

Views: 452

Replies to This Discussion

I think I solved it.
It was my elementary mistake in copy constructor in GH_PointData.

//copy constructor
public GH_PointData(GH_PointData instance)
{
this.Value = new PointData(instance.Value);
}

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service