Reconfigured Script_Ignore removal

Previously it wouldn't remove collections within other collections, now it will.
pull/3/head
Torrin Leonard 2021-10-26 22:25:31 -04:00
rodzic 76301b97fa
commit 8085a46224
6 zmienionych plików z 14 dodań i 17 usunięć

BIN
.DS_Store vendored

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -47,7 +47,7 @@ while i < Number_Of_Possible_Batches:
batchDictionaryObject = json.dumps(batchDictionary, indent=1, ensure_ascii=True)
with open(batch_path + ("Batch{}.json".format(i+1)), "w") as outfile:
with open(batch_path + slash + ("Batch{}.json".format(i+1)), "w") as outfile:
outfile.write(batchDictionaryObject)
i += 1
@ -60,5 +60,5 @@ incompleteBatch["hierarchy"] = hierarchy
incompleteBatch = json.dumps(incompleteBatch, indent=1, ensure_ascii=True)
with open(batch_path + ("Batch{}.json".format(i+1)), "w") as outfile2:
with open(batch_path + slash + ("Batch{}.json".format(i+1)), "w") as outfile2:
outfile2.write(incompleteBatch)

Wyświetl plik

@ -27,19 +27,20 @@ def returnData():
for i in bpy.data.collections:
listAllCollections.append(i.name)
exclude = bpy.data.collections["Script_Ignore"]
scriptIgnore = bpy.data.collections["Script_Ignore"]
listAllCollections.remove(scriptIgnore.name)
inScriptIgnore = list(exclude.children)
def allScriptIgnore(collection):
for coll in list(collection.children):
print(coll.name)
print("")
listAllCollections.remove(coll.name)
listColl = list(coll.children)
inScriptIgnoreName = []
if len(listColl) > 0:
allScriptIgnore(coll)
for i in inScriptIgnore:
inScriptIgnoreName.append(i.name)
for i in inScriptIgnoreName:
listAllCollections.remove(i)
listAllCollections.remove(exclude.name)
allScriptIgnore(scriptIgnore)
exclude = ["_","1","2","3","4","5","6","7","8","9","0"]
attributeCollections = copy.deepcopy(listAllCollections)
@ -176,8 +177,6 @@ def send_To_Record_JSON():
print("")
print("If you want the number of NFT DNA sequences to be higher, please add more variants or attributes to your .blend file")
print("")
print("༼ ºل͟º ༼ ºل͟º ༼ ºل͟º ༽ ºل͟º ༽ ºل͟º ༽")
print("")
send_To_Record_JSON()

Wyświetl plik

@ -72,7 +72,7 @@ def render_and_save_NFTs():
bpy.data.collections[collection].hide_render = False
bpy.data.collections[collection].hide_viewport = False
bpy.context.scene.render.filepath = images_path + "/{}.jpeg".format(name)
bpy.context.scene.render.filepath = images_path + slash + "{}.jpeg".format(name)
bpy.ops.render.render(write_still=True)
print("Completed {} render. Time: ".format(name) + "%.4f seconds" % (time.time() - time_start))
x += 1

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -9,8 +9,6 @@ if platform.system() == mac:
elif platform.system() == windows:
slash = '\\'
numNFTs = 96 # Not yet in code - does nothing
nftsPerBatch = 5 # Number of NFTs per batch
renderBatch = 1 # The number of the batch to render in PNG-Generator
imageName = "ThisCozyPlace" # The name of the NFT image produces by PNG-Generator