File size: 4,429 Bytes
985c397 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | # SPDX-License-Identifier: LGPL-2.1-or-later
from __future__ import annotations
from Base.Metadata import export, no_args, sequence_protocol
from Base.BaseClass import BaseClass
from typing import Final
@export(
Include="Mod/Material/App/Materials.h",
Namespace="Materials",
Constructor=True,
Delete=True,
)
@sequence_protocol(sq_length=True, sq_item=True, sq_contains=True, mp_subscript=True)
class Material(BaseClass):
"""
Material descriptions.
Author: David Carter (dcarter@davidcarter.ca)
Licence: LGPL
"""
LibraryName: Final[str] = ...
"""Material library name."""
LibraryRoot: Final[str] = ...
"""Material library path."""
LibraryIcon: Final[bytes] = ...
"""Material icon."""
Name: str = ...
"""Material name."""
Directory: str = ...
"""Material directory relative to the library root."""
UUID: Final[str] = ...
"""Unique material identifier. This is only valid after the material is saved."""
Description: str = ...
"""Description of the material."""
URL: str = ...
"""URL to a material reference."""
Reference: str = ...
"""Reference for material data."""
Parent: str = ...
"""Parent material UUID."""
AuthorAndLicense: Final[str] = ...
"""deprecated -- Author and license information."""
Author: str = ...
"""Author information."""
License: str = ...
"""License information."""
PhysicalModels: Final[list] = ...
"""List of implemented models."""
AppearanceModels: Final[list] = ...
"""List of implemented models."""
Tags: Final[list] = ...
"""List of searchable tags."""
Properties: Final[dict] = ...
"""deprecated -- Dictionary of all material properties."""
PhysicalProperties: Final[dict] = ...
"""deprecated -- Dictionary of material physical properties."""
AppearanceProperties: Final[dict] = ...
"""deprecated -- Dictionary of material appearance properties."""
LegacyProperties: Final[dict] = ...
"""deprecated -- Dictionary of material legacy properties."""
PropertyObjects: Final[dict] = ...
"""Dictionary of MaterialProperty objects."""
def addPhysicalModel(self) -> None:
"""Add the physical model with the given UUID"""
...
def removePhysicalModel(self) -> None:
"""Remove the physical model with the given UUID"""
...
def hasPhysicalModel(self) -> bool:
"""Check if the material implements the physical model with the given UUID"""
...
def addAppearanceModel(self) -> None:
"""Add the appearance model with the given UUID"""
...
def removeAppearanceModel(self) -> None:
"""Remove the appearance model with the given UUID"""
...
def hasAppearanceModel(self) -> bool:
"""Check if the material implements the appearance model with the given UUID"""
...
def isPhysicalModelComplete(self) -> bool:
"""Check if the material implements the physical model with the given UUID, and has values defined for each property"""
...
def isAppearanceModelComplete(self) -> bool:
"""Check if the material implements the appearance model with the given UUID, and has values defined for each property"""
...
def hasPhysicalProperty(self) -> bool:
"""Check if the material implements the physical property with the given name"""
...
def hasAppearanceProperty(self) -> bool:
"""Check if the material implements the appearance property with the given name"""
...
def hasLegacyProperties(self) -> bool:
"""Returns true of there are legacy properties"""
...
def getPhysicalValue(self) -> str:
"""Get the value associated with the property"""
...
def setPhysicalValue(self) -> None:
"""Set the value associated with the property"""
...
def getAppearanceValue(self) -> str:
"""Get the value associated with the property"""
...
def setAppearanceValue(self) -> None:
"""Set the value associated with the property"""
...
def setValue(self) -> None:
"""Set the value associated with the property"""
...
@no_args
def keys(self) -> list:
"""Property keys"""
...
@no_args
def values(self) -> list:
"""Property values"""
...
|