-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefaults.py
158 lines (143 loc) · 5.24 KB
/
defaults.py
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
'''
Copyright (C) 2020-2023 Orange Turbine
https://orangeturbine.com
This file is part of Scattershot, created by Jonathan Lampel.
All code distributed with this add-on is open source as described below.
Scattershot is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, see <https://www.gnu.org/licenses/>.
'''
package_name = __package__
file_types = {
'PNG': 'png',
'JPEG': 'jpg',
'OPEN_EXR': 'exr',
'BMP': 'bmp',
'TIFF': 'tif',
'TARGA': 'tga'
}
section_labels = ["Transformation", "Cell Randomization", "Texture Randomization", "Transparency"]
# Including any of the following words between separaters [' ', '-', '_'] will add the texture to the corresponding PBR channel
texture_names = {
'Albedo': ['albedo', 'base_color', 'basecolor', 'base_col', 'base', 'color', 'diffuse', 'diff', 'col', 'c', 'd'],
'AO': ['ao', 'ambient_occlusion', 'ambient occlusion', 'occlusion', 'occ', 'ambientocclusion'],
'Metalness': ['metal', 'metallic', 'metalness', 'm', 'met', 'mt', 'ml'],
'Roughness': ['roughness', 'rough', 'r', 'rgh', 'rh'],
'Glossiness': ['gloss', 'glossiness', 'gl', 'gls', 'g'],
'Specular': ['spec', 'specular', 'sp', 'spc', 'refl', 'reflection', 'r', 's'],
'Emission': ['emit', 'emission', 'emissive', 'glow', 'glw', 'em', 'e'],
'Alpha': ['alpha', 'transparent', 'transparency', 'opacity', 'a'],
'Bump': ['bmp', 'bump', 'b'],
'Normal': ['normal', 'nrm', 'n', 'nrlm', 'nor', 'normalgl'],
'Displacement': ['d', 'dp', 'disp', 'displacement', 'height', 'h']
}
# Texture types that should only have their value adjusted and not their hue or saturation
data_channels = ['AO', 'Metallic', 'Specular', 'Roughness', 'Glossiness', 'Alpha', 'Bump', 'Displacement']
# Texture types that should be output at a higher bit depth
detail_channels = ['Bump', 'Displacement', 'Normal']
# Some custom builds of blender use other color spaces
data_color_spaces = ['Non-Color', 'Linear', 'Linear BT.709', 'Generic Data', 'Data']
default_view_transforms = ['Standard', 'Display Native']
# Defaults for the operators. Do not add or remove any of these.
scatter = {
'projection_method': 'uv', # uv or tri-planar
'texture_interpolation': 'Closest', # Closest or Cubic
'layering': 'simple', # coordinates, simple, blended, simple_alpha, layered, or overlapping
'use_pbr': True,
'use_edge_blur': True,
'use_edge_warp': True,
'use_texture_warp': False,
'use_random_col': True,
'use_noise_col': False,
'use_manage_col': True
}
unscatter = {
'interpolation': 'Linear', # Linear, Closest, Cubic, or Smart
'projection': 'FLAT', # FLAT, BOX, SPHERE, or TUBE
'extension': 'REPEAT', # REPEAT, CLIP, or EXTEND
}
noise_blend = {
'mix_by': 'common_name', # order, name, common_name, or first
}
# Default values for the scatter node inputs on creation.
# You can add or remove any settings that you find on a scatter node
layering = {
'common': {
'Tri-Planar Blending': 0.15,
'Random Cell Hue': 0.1,
'Random Cell Saturation': 0.1,
'Random Cell Value': 0.1,
'Random Texture Rotation': 1,
'Random Texture Scale': 0.25,
'Edge Warp': 0.5,
'Edge Warp Scale': 1,
'Edge Warp Detail': 3,
'Texture Warp': 0.5,
'Cell Blending': 0.25
},
'coordinates': {
'Cell Scale': 2,
'Random Cell Shape': 1,
'Random Texture Location X': 1,
'Random Texture Location Y': 1,
},
'simple': {
'Cell Scale': 2,
'Random Cell Shape': 1,
'Random Texture Location X': 1,
'Random Texture Location Y': 1,
},
'blended': {
'Mix Noise Scale': 1,
'Mix Noise Detail': 6,
'Mix Noise Roughness': 0.75,
'Mix Noise Blending': 0.25,
'Cell Scale': 2,
'Random Cell Shape': 1,
'Random Texture Location X': 1,
'Random Texture Location Y': 1,
},
'simple_alpha': {
'Texture Scale': 2,
'Random Cell Shape': 1,
},
'layered': {
'Texture Scale': 2,
'Random Cell Shape': 1,
'Edge Warp': 0,
},
'overlapping': {
'Texture Scale': 2,
'Random Texture Location': 0.5
},
}
# Node names
node_tree_names = {
"tri-planar": ".tri-planar_mapping",
"uv_normal_map": ".uv_normal_map",
"tri-planar_normal_map": ".tri-planar_normal_map",
"scatter_vectors": "Scatter Vectors",
"vector_default": ".vector_default",
"scatter": "Scatter Images",
"scatter_overlapping": "Scatter Overlapping",
"randomize_cell_hsv": ".randomize_cell_hsv",
"randomize_noise_hsv": ".noise_randomize_hsv",
"randomize_cell_value": ".randomize_cell_value",
"randomize_noise_value": ".noise_randomize_value",
"scatter_coordinates": ".scatter_coordinates",
"scatter_source": ".scatter_source",
"scatter_source_empty": ".scatter_source_empty",
"scatter_layered": "Scatter Layered"
}
prev_node_tree_names = {
"scatter_source": "Scatter Source",
"scatter_source_empty": "Scatter Source Empty",
}