compas-dev / compas_view2

Standalone viewer for COMPAS
https://compas.dev/compas_view2/
MIT License
6 stars 8 forks source link

Access property of viewer object #135

Open nizartaha opened 2 years ago

nizartaha commented 2 years ago

How do i access a property of a viewer object to update it? for example, i could update pt cloud points with pointcloudobj._data = pt_cloud.points . how do i access the colors (or pointsize) and update them?

  pt_cloud, colors = load_point_cloud()
  pointcloudobj._data = pt_cloud.points
  # pointcloudobj._data['color'] = colors  # does not work
  pointcloudobj.update()
  viewer.view.update()

i have compas_view2 0.5.0 Thanks

nizartaha commented 2 years ago

I could find the solution in bufferobject init definition here: src/compas_view2/objects/bufferobject.py . its pointcloudobj.pointcolors = colors i will close the issue , but compas_view2 would need eventually better Documentation