Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix tabobject #184

Merged
merged 4 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Restructured `SceneObjects` to accepct `item` as kwargs.
* Fixed `compas_viewer.components.slider` step attribute.
* Fixed `renderer.view` distorted init

* Fixed in a `tabobject`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please leave a blank line

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and put a period at the end of every sentence

### Removed

## [1.1.5] 2024-05-15
Expand Down
5 changes: 3 additions & 2 deletions scripts/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
from compas.geometry import Box
from compas.geometry import Translation
from compas_viewer import Viewer
from compas_viewer.scene import Tag

box1 = Box.from_width_height_depth(5, 1, 1)
box2 = Box.from_width_height_depth(1, 5, 1)

t = Tag("EN", (0, 0, 0), height=50)
viewer = Viewer()

# Simple list of objects
group1 = viewer.scene.add([box1, box2])
group1 = viewer.scene.add([box1, box2, t])


# with kwargs for each object
Expand Down
13 changes: 13 additions & 0 deletions scripts/tag.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

from compas.geometry import Box
from compas_viewer import Viewer
from compas_viewer.scene import Tag

box1 = Box.from_width_height_depth(5, 1, 1)
box2 = Box.from_width_height_depth(1, 5, 1)
t = Tag("EN", (5, 1, 1), height=50)
viewer = Viewer()

# Simple list of objects
group1 = viewer.scene.add([box1, box2, t])
viewer.show()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By putting back the missing file here, tagobject file can be fixed

Binary file not shown.
1 change: 1 addition & 0 deletions src/compas_viewer/scene/tagobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def make_buffers(self):
}

def make_text_texture(self):
print(self.geometry.font)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the hotfix?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahh no there was a missing file, I will remove this print line

face = Face(self.geometry.font)
# the size is specified in 1/64 pixel
face.set_char_size(64 * 48)
Expand Down
Loading