Skip to content

Commit

Permalink
Merge pull request #4944 from nortikin/proposal_4943_text_scale_facto…
Browse files Browse the repository at this point in the history
…r_to_viewer_index_plus

Proposal #4943:
  • Loading branch information
satabol authored Jul 5, 2023
2 parents 3faacee + 0058e8f commit bd35b62
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions nodes/viz/viewer_idx28.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ def make_color_prop(name, col):
name="Edges", description="Display edge indices", update=updateNode)
display_face_index: BoolProperty(
name="Faces", description="Display face indices", update=updateNode)


text_scale: FloatProperty(
name='text_scale', description='', min=0.1,
default=1.0, update=updateNode)

bg_edges_col: make_color_prop("bg_edges", (.2, .2, .2, 1.0))
bg_faces_col: make_color_prop("bg_faces", (.2, .2, .2, 1.0))
Expand Down Expand Up @@ -161,6 +166,7 @@ def draw_buttons_ext(self, context, layout):
colx.prop(self, colprop, text="")

layout.row().prop(self, 'draw_obj_idx', text="Draw Object Index", toggle=True)
layout.row().prop(self, 'text_scale', text="Text Scale")


def get_face_extras(self, geom):
Expand Down Expand Up @@ -305,6 +311,7 @@ def process(self):
return

config = self.get_settings_dict()
config["scale"] = config["scale"] * self.text_scale
geom = self.get_geometry()

draw_data = {
Expand Down

0 comments on commit bd35b62

Please sign in to comment.