compas-dev / compas_view2

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

Texts do not work #97

Closed ricardoavelino closed 1 year ago

ricardoavelino commented 3 years ago

I can not add texts to the viewer.

The script v120_texts.py is not working here.

Error message:

Traceback (most recent call last): File "/Users/mricardo/anaconda3/envs/view2/lib/python3.8/site-packages/compas_view2/views/view.py", line 180, in paintGL self.paint() File "/Users/mricardo/anaconda3/envs/view2/lib/python3.8/site-packages/compas_view2/views/view120.py", line 123, in paint self.shader_grid.bind() AttributeError: 'View120' object has no attribute 'shader_grid'

https://github.com/compas-dev/compas_view2/blob/87297196be8e2d1081d934682325b41658d090da/scripts/v120_texts.py#L14

lottilotte commented 2 years ago

was the same for me, I think the solution was to install the released version instead if I remember correctly....

kurt-rhee commented 2 years ago

I also have this issue, I currently have compas version 1.17.0 and compas_view2 version 0.8.0.

I don't get any error, but texts do not show up in my scene. I have tried adding them both individually and through Collection.

    # --- add tracker labels ---
    viewer.add(
        Collection(tracker_ids)
    )

    # example of a Text object that I am trying to add
    tracker_ids[0].text = N01-1
    tracker_ids[0].position = Vector(1107102.183, 253570.281, 65.037)
    tracker_ids[0].height = 1000

I have also tried adding the text

ZacZhangzhuo commented 1 year ago

I also have this issue, I currently have compas version 1.17.0 and compas_view2 version 0.8.0.

I don't get any error, but texts do not show up in my scene. I have tried adding them both individually and through Collection.

    # --- add tracker labels ---
    viewer.add(
        Collection(tracker_ids)
    )

    # example of a Text object that I am trying to add
    tracker_ids[0].text = N01-1
    tracker_ids[0].position = Vector(1107102.183, 253570.281, 65.037)
    tracker_ids[0].height = 1000

I have also tried adding the text

Currently, the text sprite doesn't work inside the Collection. Similar to #164

ZacZhangzhuo commented 1 year ago

Close due to long inactive. Let me know if the problem remains. :)