lib
export_outputs_by_sd_graph(instance_name, target_graph, output_dir, extension, selected_map_identifiers)
Modified and referenced from exportSDGraphOutputs in Substance Designer Python API. Export the textures from the output nodes of the specified SD Graphs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance_name | Instance | instance name | required |
target_graph | SDGraph | target SD Graph | required |
output_dir | str | output directory | required |
extension | str | extension | required |
selected_map_identifiers | set | list of maps targeted to be exported | required |
Returns:
Name | Type | Description |
---|---|---|
bool | Shows if the maps are successfully exported |
Source code in client/ayon_substancedesigner/api/lib.py
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 |
|
get_colorspace_data(raw_colorspace=False)
Get Colorspace data of the output map Args: raw_colorspace (bool, optional): Use raw colorspace data. Defaults to False.
Returns:
Name | Type | Description |
---|---|---|
str | colorspace name |
Source code in client/ayon_substancedesigner/api/lib.py
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
|
get_current_graph_name()
Get the name of the current SD graph
Returns:
Name | Type | Description |
---|---|---|
str | current SD graph name |
Source code in client/ayon_substancedesigner/api/lib.py
49 50 51 52 53 54 55 56 57 58 59 60 |
|
get_map_identifiers_by_graph(target_graph_name)
Get map identifiers of the target SD graph
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_graph_name | str | target SD graph name | required |
Returns:
Name | Type | Description |
---|---|---|
set | all map identifiers |
Source code in client/ayon_substancedesigner/api/lib.py
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
|
get_output_maps_from_graphs()
Get Output Maps from Substance Designer graphs by package
Returns:
Name | Type | Description |
---|---|---|
set | name of the output maps from substance designer graphs |
Source code in client/ayon_substancedesigner/api/lib.py
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
|
get_package_from_current_graph()
Get Package from the current graph.
Returns:
Type | Description |
---|---|
sd.api.sdpackage.SDPackage: A package with SDResource |
Source code in client/ayon_substancedesigner/api/lib.py
36 37 38 39 40 41 42 43 44 45 46 |
|
get_sd_graph_by_name(graph_name)
Get SD graph base on its name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
graph_name | str | SD graph name | required |
Returns:
Type | Description |
---|---|
sd.api.sdgraph.SDGraph: SD Graph |
Source code in client/ayon_substancedesigner/api/lib.py
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
|
get_sd_graphs_by_package()
Get Substance Designer Graphs by package
Returns:
Name | Type | Description |
---|---|---|
list | name of Substance Designer Graphs |
Source code in client/ayon_substancedesigner/api/lib.py
63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
package_manager()
Get Package Manager of Substance Designer
Returns:
Type | Description |
---|---|
sd.api.sdpackagemgr.SDPackageMgr: Package Manager |
Source code in client/ayon_substancedesigner/api/lib.py
12 13 14 15 16 17 18 19 20 |
|
parsing_sd_data(target_package, metadata_type, is_dictionary=True)
Parse and convert Subsatnce Designer SDValue data to dictionary
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_package | SDPackage | target SD Package | required |
metadata_type | str | Ayon metadata type | required |
Returns:
Type | Description |
---|---|
dict/list: metadata dict |
Source code in client/ayon_substancedesigner/api/lib.py
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
qt_ui_manager()
Get Qt Python UI Manager of Substance Designer
Returns:
Type | Description |
---|---|
sd.api.qtforpythonuimgrwrapper.QtForPythonUIMgrWrapper: Qt Python UI Manager |
Source code in client/ayon_substancedesigner/api/lib.py
23 24 25 26 27 28 29 30 31 32 33 |
|
set_sd_metadata(metadata_type, metadata)
Set AYON-related metadata in Substance Painter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metadata_type | str | AYON metadata key | required |
metadata | dict / list | AYON-related metadata | required |
Source code in client/ayon_substancedesigner/api/lib.py
117 118 119 120 121 122 123 124 125 126 127 128 129 |
|