Skip to content

Commit

Permalink
Merge pull request #5094 from nortikin/fix_5093_Add_index_field_to_Nu…
Browse files Browse the repository at this point in the history
…mber-List_Input

fix 5093 Add index field to Number->List Input
  • Loading branch information
satabol authored Mar 25, 2024
2 parents 30f65d9 + bb066ff commit 0a08f33
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions nodes/number/list_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,19 @@ def draw_buttons(self, context, layout):
col = layout.column(align=False)
for i in range(self.v_int):
row = col.row(align=True)
split = row.split(factor=0.08)
row1 = split.column().row(align=True)
row1.alignment = 'RIGHT'
row1.label(text=f"{i}.")
row2 = split.column().row(align=True)
for j in range(3):
row.prop(self, 'vector_list', index=i*3+j, text='XYZ'[j])
row2.prop(self, 'vector_list', index=i*3+j, text='XYZ'[j])
elif self.mode == 'int_list':
col = layout.column(align=True)
listinput_drawI(self,col)
else:
col = layout.column(align=True)
listinput_drawF(self,col)

def draw_buttons_3dpanel(self, layout, in_menu=None):
if not in_menu:
menu = layout.row(align=True).operator('node.popup_3d_menu', text=f'Show: "{self.label or self.name}"')
Expand Down

0 comments on commit 0a08f33

Please sign in to comment.