Skip to content

Properties

Bananenbrot edited this page Jun 27, 2023 · 13 revisions

Properties Syntax

The syntax is simple, write over the variable you want to add a new comment with the syntax:

#STB-Input-{Space}-{Datatype}[-{Sort}]

#STB

Symbolizes the Add-on name Sctip To Button.

Input

Defined that this comment is registered as an input.

Space

  • Panel
    To show the property in the "Properties" Panel
  • Dialog
    To show the property in a popup window when the button is pressed

Datatype

INFO: changes in Properties don't save the script to the disk

[Sort]

(only for Type: Input)
[column, row]
See Sort Properties for further instruction

Examples

#STB-Input-Panel-String
MyString = "This is my text"
#STB-Input-Panel-Int
MyInt = 3
#STB-Input-Panel-Float
MyFloat = 7.8 
#STB-Input-Panel-Bool
MyBool = True
#STB-Input-Panel-Enum
MyEnum = ["dog",["dog", "cat", "bird"]]
#STB-Input-Panel-IntVector
MyIntVector = [7, 1, 30]
#STB-Input-Panel-FloatVector
MyFloatVector = [10.0, 2.0, 3.0]
#STB-Input-Panel-BoolVector
MyBoolVector = [True, False, False, True]
#STB-Input-Panel-List
MyList = ['HI', 10, ('select',['select', 'remove', 'move']), True]
#STB-Input-Panel-Object
MyObject =  bpy.data.objects['Cube']
Clone this wiki locally