mirror of
https://github.com/buzz-lightsnack-2007/BlendererOnline.git
synced 2024-08-14 23:57:22 +00:00
Fixed upload feature.
This commit is contained in:
parent
24daffb5fc
commit
bfb1fc3583
1 changed files with 18 additions and 5 deletions
|
@ -61,23 +61,36 @@
|
||||||
" try: from google.colab import files\n",
|
" try: from google.colab import files\n",
|
||||||
" except: raise TypeError(\"No! Please run this in \" + formatting.font.bold + 'Google CoLab' + formatting.clear + '. ')\n",
|
" except: raise TypeError(\"No! Please run this in \" + formatting.font.bold + 'Google CoLab' + formatting.clear + '. ')\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"def getExtension(fileName): \n",
|
||||||
|
" import os\n",
|
||||||
|
" fileName_split = os.path.splitext(fileName)\n",
|
||||||
|
"\n",
|
||||||
|
" return fileName_split[1].lower()\n",
|
||||||
|
"\n",
|
||||||
"def UploadBlendFile(): # Make sure that the file is actually a Blender file. \n",
|
"def UploadBlendFile(): # Make sure that the file is actually a Blender file. \n",
|
||||||
" check_compatibility()\n",
|
" check_compatibility()\n",
|
||||||
" \n",
|
"\n",
|
||||||
" from google.colab import files\n",
|
" import pathlib; from google.colab import files\n",
|
||||||
" uploaded_file = files.upload()\n",
|
" uploaded_file = files.upload()\n",
|
||||||
" \n",
|
" \n",
|
||||||
" return uploaded_file\n",
|
" return uploaded_file\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"\n",
|
||||||
"class configuration: \n",
|
"class configuration: \n",
|
||||||
" #@markdown ### Input\n",
|
" #@markdown ### Input\n",
|
||||||
|
" \n",
|
||||||
|
" upload_new = False #@param [True, False]\n",
|
||||||
" #@markdown Run this cell to upload the Blender file. \n",
|
" #@markdown Run this cell to upload the Blender file. \n",
|
||||||
|
" if upload_new == True: blendFile = UploadBlendFile()\n",
|
||||||
"\n",
|
"\n",
|
||||||
" blendFile = UploadBlendFile()\n",
|
" blend_fileName = '' #@param {type: \"string\"}\n",
|
||||||
"\n",
|
"\n",
|
||||||
" #@markdown ### Animation Processing\n",
|
" if getExtension(blend_fileName) != '.blend': blend_fileName = (str(blend_fileName) + '.blend')\n",
|
||||||
|
"\n",
|
||||||
|
" #@markdown ### Processing\n",
|
||||||
" renderer = \"CYCLES\" #@param [\"CYCLES\", \"BLENDER_EEVEE\", \"BLENDER_WORKBENCH\"]\n",
|
" renderer = \"CYCLES\" #@param [\"CYCLES\", \"BLENDER_EEVEE\", \"BLENDER_WORKBENCH\"]\n",
|
||||||
" frame = 1 #@param {type: \"number\"}\n"
|
" frame_start = 1 #@param {type: \"number\"}\n",
|
||||||
|
" frame_end = 1 #@param {type: \"number\"}\n"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue