Skip to main content
added 1 character in body
Source Link
Timaroberts
  • 12.5k
  • 6
  • 42
  • 74

isIs there a way to format how the value of Float/Int properties are shown in python blender GUI?

enter image description here

rightRight now it's always the same 'text' + 'value' (+ 'unit' if specified in the prop options).

butBut what if I want to display

f"text {value} text" 

orOr even better, format the value with thousands separators?

f" text {value:,} text"

is there a way to format how the value of Float/Int properties are shown in python blender GUI?

enter image description here

right now it's always the same 'text' + 'value' (+ 'unit' if specified in the prop options)

but what if I want to display

f"text {value} text" 

or even better, format the value with thousands separators?

f" text {value:,} text"

Is there a way to format how the value of Float/Int properties are shown in python blender GUI?

enter image description here

Right now it's always the same 'text' + 'value' (+ 'unit' if specified in the prop options).

But what if I want to display

f"text {value} text" 

Or even better, format the value with thousands separators?

f" text {value:,} text"
Source Link
Fox
  • 2.1k
  • 22
  • 49

Format IntProperty/FloatProperty in GUI layout.prop?

is there a way to format how the value of Float/Int properties are shown in python blender GUI?

enter image description here

right now it's always the same 'text' + 'value' (+ 'unit' if specified in the prop options)

but what if I want to display

f"text {value} text" 

or even better, format the value with thousands separators?

f" text {value:,} text"