kopia lustrzana https://github.com/torrinworx/Blend_My_NFTs
Small changes to print statements
rodzic
417c8f0ebc
commit
8a2e74b41c
|
@ -28,10 +28,10 @@ if config.runPreview:
|
|||
config.nftName = "TestImages"
|
||||
|
||||
def sortRarityWeights(hierarchy, listOptionVariant, DNAList):
|
||||
'''
|
||||
"""
|
||||
Sorts through DataDictionary and appropriately weights each variant based on their rarity percentage set in Blender
|
||||
("rarity" in DNA_Generator). Then
|
||||
'''
|
||||
"""
|
||||
|
||||
DNASet = set()
|
||||
|
||||
|
@ -80,5 +80,6 @@ def sortRarityWeights(hierarchy, listOptionVariant, DNAList):
|
|||
DNAListRare = list(DNASet)
|
||||
return DNAListRare
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sortRarityWeights()
|
||||
|
|
|
@ -8,8 +8,6 @@
|
|||
import bpy
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import json
|
||||
import importlib
|
||||
|
||||
dir = os.path.dirname(bpy.data.filepath)
|
||||
|
@ -24,23 +22,20 @@ importlib.reload(config)
|
|||
def returnCardanoMetaData(name, description, NFT_DNA, NFT_Variants):
|
||||
metaDataDictCardano = {"721": {
|
||||
"<policy_id>": {
|
||||
"<asset_name>": {
|
||||
name: {
|
||||
"name": name,
|
||||
"image": "",
|
||||
"mediaType": "",
|
||||
"description": description,
|
||||
"files": [{
|
||||
"name": "",
|
||||
"mediaType": "",
|
||||
"src": "",
|
||||
"NFT_Variants": NFT_Variants,
|
||||
"NFT_DNA": NFT_DNA
|
||||
}]
|
||||
|
||||
}
|
||||
},
|
||||
"version": "1.0"
|
||||
}}
|
||||
|
||||
for i in NFT_Variants:
|
||||
metaDataDictCardano["721"]["<policy_id>"][name][i] = NFT_Variants[i]
|
||||
|
||||
return metaDataDictCardano
|
||||
|
||||
def returnSolanaMetaData(name, description, NFT_DNA, NFT_Variants):
|
||||
|
@ -92,6 +87,7 @@ def returnErc721MetaData(name, description, NFT_DNA, NFT_Variants):
|
|||
|
||||
return metaDataDictErc721
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
returnSolanaMetaData()
|
||||
returnCardanoMetaData()
|
||||
|
|
|
@ -3,12 +3,9 @@
|
|||
|
||||
import bpy
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
import copy
|
||||
import time
|
||||
import json
|
||||
import shutil
|
||||
import importlib
|
||||
|
||||
dir = os.path.dirname(bpy.data.filepath)
|
||||
|
@ -23,6 +20,7 @@ importlib.reload(metaData)
|
|||
|
||||
removeList = [".gitignore", ".DS_Store"]
|
||||
|
||||
|
||||
def getNFType():
|
||||
images = False
|
||||
animations = False
|
||||
|
@ -45,9 +43,9 @@ def getNFType():
|
|||
return images, animations, models, metaData
|
||||
|
||||
def getMetaDataDirty(completeMetaDataPath, i):
|
||||
'''
|
||||
"""
|
||||
Retrieves a given batches data determined by renderBatch in config.py
|
||||
'''
|
||||
"""
|
||||
|
||||
file_name = os.path.join(completeMetaDataPath, i)
|
||||
metaDataDirty = json.load(open(file_name))
|
||||
|
@ -215,9 +213,10 @@ def reformatNFTCollection():
|
|||
|
||||
dataCount += 1
|
||||
|
||||
print("All NFT files stored and sorted to the Complete_Collection folder in {}".format(config.save_path))
|
||||
print(f"All NFT files stored and sorted to the Complete_Collection folder in {config.save_path}")
|
||||
|
||||
renameMetaData(completeCollPath, completeMetaDataPath)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
reformatNFTCollection()
|
||||
|
|
|
@ -45,7 +45,8 @@ def checkIfBatchDup():
|
|||
return duplicates
|
||||
|
||||
def checkDups():
|
||||
print("NFTRecord.json contains " + str(checkIfBatchDup()) + " duplicate NFT DNA.")
|
||||
print(f"NFTRecord.json contains {checkIfBatchDup()} duplicate NFT DNA.")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
checkDups()
|
||||
|
|
|
@ -73,7 +73,8 @@ def printImportant():
|
|||
if not config.enable3DModels:
|
||||
RenderTest.imageRenderTest()
|
||||
if config.enable3DModels:
|
||||
print( bcolors.WARNING + "Cannot run Render Test when enable3DModels = True" + bcolors.RESET)
|
||||
print(f"{bcolors.WARNING} Cannot run Render Test when enable3DModels = True {bcolors.RESET}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
printImportant()
|
||||
|
|
|
@ -81,7 +81,7 @@ def getRealRarity():
|
|||
|
||||
print(completeData)
|
||||
|
||||
print(bcolors.OK + "Rarity Checker is active. These are the percentages for each variant per attribute you set in your .blend file:" + bcolors.RESET)
|
||||
print(f"{bcolors.OK} Rarity Checker is active. These are the percentages for each variant per attribute you set in your .blend file:{bcolors.RESET}")
|
||||
|
||||
for i in completeData:
|
||||
print(i + ":")
|
||||
|
@ -93,9 +93,10 @@ def getRealRarity():
|
|||
with open(os.path.join(config.save_path, "RarityData.json"), 'w') as outfile:
|
||||
outfile.write(jsonMetaData + '\n')
|
||||
path = os.path.join(config.save_path, "RarityData.json")
|
||||
print(bcolors.OK + f"Rarity Data has been saved to {path}." + bcolors.RESET)
|
||||
print(f"{bcolors.OK}Rarity Data has been saved to {path}. {bcolors.RESET}")
|
||||
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
getRealRarity()
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
# This file determines the settings of your NFT collection. Please read the README.md file to understand how to run this
|
||||
# program.
|
||||
|
||||
nftName = 'Test' # The name of the NFT image produces by PNG-Generator
|
||||
nftName = '' # The name of the NFT image produces by PNG-Generator
|
||||
|
||||
maxNFTs = 10 # The maximum number of NFTs you want to generate.
|
||||
nftsPerBatch = 10 # Number of NFTs per batch (Batches split maxNFTs into smaller manageable chunks)
|
||||
maxNFTs = 0 # The maximum number of NFTs you want to generate.
|
||||
nftsPerBatch = 0 # Number of NFTs per batch (Batches split maxNFTs into smaller manageable chunks)
|
||||
renderBatch = 1 # The batch number to render in Exporter.py
|
||||
|
||||
imageFileFormat = 'PNG' # Dictate the image extension when Blender renders the images
|
||||
imageFileFormat = '' # Dictate the image extension when Blender renders the images
|
||||
# Type the exact name provided below in the '' above:
|
||||
# JPEG - Exports the .jpeg format
|
||||
# PNG - Exports the .png format
|
||||
|
@ -35,7 +35,7 @@ modelFileFormat = '' # The file format of the objects you would like to export
|
|||
# for a complete list of object formats supported by Blender.
|
||||
|
||||
# The path to Blend_My_NFTs folder:
|
||||
save_path_mac = '/Users/torrinleonard/Desktop/ThisCozyStudio/Blend_My_NFTs'
|
||||
save_path_mac = ''
|
||||
save_path_linux = ''
|
||||
save_path_windows = r''
|
||||
# Place the path in the '', e.g: save_path_mac = '/Users/Path/to/Blend_My_NFTs'
|
||||
|
|
Ładowanie…
Reference in New Issue