Fix texture and final render stages.
This commit is contained in:
parent
1c015a450d
commit
7c154c2ef6
18 changed files with 58 additions and 19 deletions
|
@ -1,5 +1,6 @@
|
|||
import os
|
||||
import sys
|
||||
import ast
|
||||
import random
|
||||
import json
|
||||
import product_gen.generate_product
|
||||
|
@ -17,17 +18,18 @@ if __name__ == "__main__":
|
|||
if not os.path.exists(os.getcwd() + "/" + output):
|
||||
os.makedirs(os.getcwd() + "/" + output)
|
||||
|
||||
height = float(shape_params["height"])
|
||||
radius = float(shape_params["radius"])
|
||||
shape_parameters = {}
|
||||
shape_parameters["shape"] = shape
|
||||
shape_parameters["output"] = output
|
||||
shape_parameters["height"] = float(shape_params["height"])
|
||||
shape_parameters["radius"] = float(shape_params["radius"])
|
||||
shape_parameters["fixture_radius"] = float(shape_params["fixture_radius"])
|
||||
shape_parameters["division_offsets"] = [float(x) for x in shape_params["division_offsets"]]
|
||||
shape_parameters["style"] = shape_params["style"]
|
||||
shape_parameters["division_patterns"] = shape_params["division_patterns"]
|
||||
shape_parameters["division_radii"] = [float(x) for x in shape_params["division_radii"]]
|
||||
|
||||
colors = [(0.1, 0.1, 0.1),
|
||||
(0.68, 0.68, 0.68),
|
||||
(0.033, 0.065, 0.376),
|
||||
(0.019, 0.202, 0.032)]
|
||||
color = random.choice(colors)
|
||||
product_gen.generate_product.generate(shape, height, radius, color, output)
|
||||
product_gen.generate_product.generate(shape_parameters, output)
|
||||
|
||||
shape_parameters = shape_params
|
||||
shape_parameters["color"] = color
|
||||
with open(os.getcwd() + "/" + output + "/"+ output + '.json', 'w') as outfile:
|
||||
json.dump(shape_parameters, outfile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue