kopia lustrzana https://github.com/torrinworx/Blend_My_NFTs
Fixing issue where meta data wasn't in json format
Renamed enableMeteData Renamed NFT_Image_Output to NFT_Outputpull/29/head
rodzic
46e015bfc0
commit
c1b03d4cdd
|
@ -1,6 +1,6 @@
|
|||
# Purpose:
|
||||
# This file takes a given Batch created by DNA_Generator.py and tells blender to render the image or export a 3D model to
|
||||
# the NFT_Image_Output folder.
|
||||
# the NFT_Output folder.
|
||||
|
||||
import bpy
|
||||
import os
|
||||
|
@ -171,14 +171,14 @@ def render_and_save_NFTs():
|
|||
check_existing=True,
|
||||
use_selection=True)
|
||||
|
||||
if config.enableMeteData:
|
||||
if config.enableMetaData:
|
||||
metaData.returnMetaData(config.metaDataType, metaDataDict, name, a, dnaDictionary)
|
||||
|
||||
if not os.path.exists(metaDataFolder):
|
||||
os.mkdir(metaDataFolder)
|
||||
|
||||
jsonMetaData = json.dumps(metaDataDict, indent=1, ensure_ascii=True)
|
||||
with open(os.path.join(metaDataFolder, name + "_Data"), 'w') as outfile:
|
||||
with open(os.path.join(metaDataFolder, name + "_Data.json"), 'w') as outfile:
|
||||
outfile.write(jsonMetaData + '\n')
|
||||
|
||||
print("Completed {} render in ".format(name) + "%.4f seconds" % (time.time() - time_start_2))
|
||||
|
|
|
@ -27,9 +27,9 @@ save_path_windows = r''
|
|||
# Example mac: /Users/Path/to/Blend_My_NFTs
|
||||
# Example windows: C:\Users\Path\to\Blend_My_NFTs
|
||||
|
||||
maxNFTs = 10 # The maximum number of NFTs you want to generate.
|
||||
nftsPerBatch = 10 # Number of NFTs per batch
|
||||
renderBatch = 1 # The batch number to render in Exporter.py
|
||||
maxNFTs = 0 # The maximum number of NFTs you want to generate.
|
||||
nftsPerBatch = 0 # Number of NFTs per batch
|
||||
renderBatch = 0 # The batch number to render in Exporter.py
|
||||
|
||||
# Set to True to generate images or 3D models depending on your settings below when main.py is run in Blender. Only works
|
||||
# if you have already generated NFTRecord.json and all batches.
|
||||
|
@ -72,7 +72,7 @@ if generationType == 'material': # Do not change this line.
|
|||
colorList = {"Cube_1_33": materialList1, "Sphere_2_0": materialList2}
|
||||
|
||||
# Meta Data generation
|
||||
enableMeteData = True # Set to True to turn on meta data, set to False to turn off meta data generation.
|
||||
enableMetaData = True # Set to True to turn on meta data, set to False to turn off meta data generation.
|
||||
|
||||
metaDataType = 'DEFAULT' # Select the format of the generated Meta Data for your NFTs blockchain.
|
||||
# DEFAULT - The default setting; exports variants, dna, number, name, and rarity of each NFT to a dictionary (Not a blockchain standard)
|
||||
|
@ -112,7 +112,7 @@ elif platform.system() == windows:
|
|||
|
||||
# Paths to folders
|
||||
batch_save_path = save_path + slash + 'Batch_Json_files' # The output path for batches generated by Batch_Sorter.py
|
||||
images_save_path = save_path + slash + 'NFT_Image_Output' # The output path for images generated by Exporter.py
|
||||
images_save_path = save_path + slash + 'NFT_Output' # The output path for images generated by Exporter.py
|
||||
modelAssetPath = save_path + slash + "3D_Model_Input" # The input path for 3D models
|
||||
model_save_path = save_path + slash + "3D_Model_Output" # The output path for 3D models generated by Model_Generator.py
|
||||
model_Script_Ignore_Path = modelAssetPath + slash + "Script_Ignore_Folder" # The path to the Script_Ignore_Folder for 3D models
|
||||
|
|
Ładowanie…
Reference in New Issue