properties module

The properties module introduces the description of dynamic attributes.

class substance_painter.properties.Property(handle: _substance_painter.data_tweak.PythonTweak) substance_painter.properties.Property

Read only access to a property data.

Parameters: handle (_substance_painter.data_tweak.PythonTweak)

value() -> bool | int | Tuple[int, int] | Tuple[int, int, int] | Tuple[int, int, int, int] | float | Tuple[float, float] | Tuple[float, float, float] | Color | Tuple[Color, float] | Tuple[float, float, float, float] | str substance_painter.properties.Property.value

Get the current property value.

Returns: the current value.

Return type: PropertyValue

name() -> str substance_painter.properties.Property.name

Get the property name.

Returns: The property name.

Return type: str

short_name() -> str substance_painter.properties.Property.short_name

Get the shortened property name.

Returns: The property short name.

Return type: str

label() -> str substance_painter.properties.Property.label

Get the property label.

Returns: The property label.

Return type: str

widget_type() -> str substance_painter.properties.Property.widget_type

Get the widget type that should be used to edit the property.

Returns:

One of: ‘Slider’, ‘Angle’, ‘Color’, ‘Togglebutton’,
‘Combobox’, ‘RandomSeed’, ‘File’, ‘FileList’, ‘LineEdit’,
‘Resource’, ‘TextEdit’.

Return type: str

enum_values() -> Dict[str, int] substance_painter.properties.Property.enum_values

The possible enum values with corresponding text for ‘Combobox’
widget type.

Returns: Enum label to enum value dictionary.

Return type: Dict[str, int]

enum_value(enum_label: str) -> int substance_painter.properties.Property.enum_value

Get the enum value for the given enum label for ‘Combobox’
widget type.

Parameters: enum_label (str) – A valid enum label.

Returns: The enum value for the corresponding label.

Return type: Dict[str, int]

properties() -> Dict[str, Any] substance_painter.properties.Property.properties

Get a json object that describes all available meta properties of this
property. For example: value range, editor step, possible values, tooltip, etc.

Returns: A json object.

Return type: Dict[str, Any]

recommendation-more-help
substance-3d-dev-help-painter-python-guide