From d9202e83c9f2a69f77eb3889a8097dd8aef0a1d9 Mon Sep 17 00:00:00 2001 From: batmanscode <29989939+batmanscode@users.noreply.github.com> Date: Sat, 20 Nov 2021 22:31:04 +0530 Subject: [PATCH 1/4] update `maxNFTs` default and comment * non zero default set * removed the part of the comment that says it doesn't work with `enable3DModels = True` since it does :D --- src/main/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/config.py b/src/main/config.py index 7722c49..bf59574 100644 --- a/src/main/config.py +++ b/src/main/config.py @@ -16,7 +16,7 @@ save_path_windows = r'' # Example mac: /Users/Path/to/Blend_My_NFTs # Example windows: C:\Users\Path\to\Blend_My_NFTs -maxNFTs = 0 # The maximum number of NFTs you want to generate - does not work with enable3DModels set to True. +maxNFTs = 100 # The maximum number of NFTs you want to generate. # 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. From 8e75413bd3d56e4c98666665697803f32725bd49 Mon Sep 17 00:00:00 2001 From: batmanscode <29989939+batmanscode@users.noreply.github.com> Date: Sat, 20 Nov 2021 22:36:30 +0530 Subject: [PATCH 2/4] Create Script_Ignore_Folder * got an error after it was removed so added it back --- 3D_Model_Input/Script_Ignore_Folder | 1 + 1 file changed, 1 insertion(+) create mode 100644 3D_Model_Input/Script_Ignore_Folder diff --git a/3D_Model_Input/Script_Ignore_Folder b/3D_Model_Input/Script_Ignore_Folder new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/3D_Model_Input/Script_Ignore_Folder @@ -0,0 +1 @@ + From 773090414acfdba40cb2263e1e73a1e4d3229362 Mon Sep 17 00:00:00 2001 From: batmanscode <29989939+batmanscode@users.noreply.github.com> Date: Sat, 20 Nov 2021 22:55:51 +0530 Subject: [PATCH 3/4] added an error message if `objectFormatExport` is not set properly --- src/main/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/config.py b/src/main/config.py index 7722c49..0da8eb9 100644 --- a/src/main/config.py +++ b/src/main/config.py @@ -36,6 +36,10 @@ objectFormatExport = '' # The file format of the objects you would like to expo # obj - The .obj file format *Exports both a .obj and a .mtl files for the same generated object # x3d - The .x3d file format +# error handling # +if objectFormatExport not in ['fbx', 'glb', 'obj', 'x3d']: + raise ValueError("Output format in `objectFormatExport` can only be 'fbx', 'glb', 'obj', 'x3d'.") + ### Select colour or material.### # Object generation options: enableGeneration = True # When set to true this applies the sets of colors listed below to the objects in the collections named below From 86ffea6aa26b3cbe6d67d269b093d67203c50016 Mon Sep 17 00:00:00 2001 From: Torrin Leonard <82110564+torrinworx@users.noreply.github.com> Date: Sat, 20 Nov 2021 17:40:45 -0500 Subject: [PATCH 4/4] Ensured error message only appears when enable3DModels is on --- src/main/config.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/config.py b/src/main/config.py index 131573c..5a56706 100644 --- a/src/main/config.py +++ b/src/main/config.py @@ -3,14 +3,14 @@ import platform # NFT configurations: nftsPerBatch = 0 # Number of NFTs per batch renderBatch = 0 # The batch number to render in PNG-Generator -imageName = '' # The name of the NFT image produces by PNG-Generator -imageFileFormat = '' # Dictate the image extension when Blender renders the images +imageName = 'TestImage' # The name of the NFT image produces by PNG-Generator +imageFileFormat = 'JPEG' # Dictate the image extension when Blender renders the images # Visit https://docs.blender.org/api/current/bpy.types.Image.html#bpy.types.Image.file_format # for a list of file formats supported by Blender. Enter the file extension exactly as specified in # the Blender API documentation above. # The path to Blend_My_NFTs folder: -save_path_mac = '/Users/Path/to/Blend_My_NFTs' +save_path_mac = '/Users/Path/To/Blend_My_NFTs' save_path_windows = r'' # Place the path in the '', e.g: save_path_mac = '/Users/Path/to/Blend_My_NFTs' # Example mac: /Users/Path/to/Blend_My_NFTs @@ -37,12 +37,13 @@ objectFormatExport = '' # The file format of the objects you would like to expo # x3d - The .x3d file format # error handling # -if objectFormatExport not in ['fbx', 'glb', 'obj', 'x3d']: + +if objectFormatExport not in ['fbx', 'glb', 'obj', 'x3d'] and enable3DModels: raise ValueError("Output format in `objectFormatExport` can only be 'fbx', 'glb', 'obj', 'x3d'.") ### Select colour or material.### # Object generation options: -enableGeneration = True # When set to true this applies the sets of colors listed below to the objects in the collections named below +enableGeneration = False # When set to true this applies the sets of colors listed below to the objects in the collections named below generationType = 'material' #You can either set 'color' or 'material' here. Type you set will correspond to following options. #generationType = 'material' mode is experimental. Be sure that you back-up your file.