Skip to content

Commit

Permalink
Changed input/output filenames, added timestamp to output file, chang…
Browse files Browse the repository at this point in the history
…ed input json msg
  • Loading branch information
ruaridhg committed Oct 12, 2023
1 parent 1797906 commit 3725a29
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@
],
"NodeGroup": "RandomRadiusBottom.001",
"Values NodeGroupRandomConeDepth.001": [
5.27284049987793,
5.622115135192871,
4.592142105102539,
5.135154724121094,
5.720201015472412
5.039954662322998,
4.538471221923828,
5.990565299987793,
4.148575782775879,
5.437981128692627
],
"Values NodeGroupRandomRadiusBottom.001": [
3.0457277297973633,
3.238621234893799,
5.29726505279541,
4.321393966674805,
4.665210247039795
4.7244648933410645,
5.087032794952393,
4.212539196014404,
4.907046318054199,
3.4142534732818604
],
"Geometry Nodes.001": "RandomSize.001",
"Values Geometry Nodes.001RandomSize": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def set_update_collection(self, value):
print("Initial values have already been set by .json")

else:
print("input_json is False")
print("Using default initial values for the bounds")
ini_min_max_values = (
bpy.context.scene.socket_type_to_ini_min_max[
type(sckt)
Expand Down
13 changes: 7 additions & 6 deletions randomiser/random_all/operators.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import datetime
import json
import pathlib
from random import seed

import bpy
Expand Down Expand Up @@ -357,11 +357,12 @@ def execute(self, context):
"materials": all_mat_dict,
}

path_to_file = (
pathlib.Path.home() / "tmp" / "transform_geom_mat_test.json"
)

path_to_file = "transform_geom_mat_test.json"
ct = datetime.datetime.now()
ts = ct.timestamp()
ts_str = str(ts)
file_ext = ".json"
path_to_file = "output_randomisations_per_frame" + ts_str
path_to_file = path_to_file + file_ext

with open(path_to_file, "w") as out_file_obj:
# convert the dictionary into text
Expand Down

0 comments on commit 3725a29

Please sign in to comment.