compas-dev / compas_view2

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

v120_camera: TypeError: slider() got an unexpected keyword argument 'title' #128

Closed nizartaha closed 2 years ago

nizartaha commented 2 years ago

Describe the bug

i installed compas_view2 in a new environment: conda create -n compas_view2 python=3.7 compas compas_view2 then i run example: v120_camera.py from compas_view2/scripts/

Traceback (most recent call last):
  File "c:/Users/Documents/Projects/compas_view2/scripts/v120_camera.py", line 10, in <module>
    @viewer.slider(title="Rotate camera Z", minval=-180, maxval=180, step=1)
TypeError: slider() got an unexpected keyword argument 'title'

if i remove title= from all of the lines for example @viewer.slider("Rotate camera Z", minval=-180, maxval=180, step=1) the viewer starts but when i use the sliders i get a different errors:

Traceback (most recent call last):
  File "c:/Users/Documents/Projects/compas_view2/scripts/v120_camera.py", line 48, in slide
    viewer.view.camera.position.z = value
AttributeError: 'tuple' object has no attribute 'z'
Traceback (most recent call last):
  File "c:/Users/Documents/Projects/compas_view2/scripts/v120_camera.py", line 12, in slide
    viewer.view.camera.rotation.z = radians(value)
AttributeError: 'Camera' object has no attribute 'rotation'

To Reproduce

run example: v120_camera.py from compas_view2/scripts/

nizartaha commented 2 years ago

solved by updating compas_view2 to 0.5.0