mirror of
https://github.com/buzz-lightsnack-2007/BlendererOnline.git
synced 2024-08-14 23:57:22 +00:00
Simplified.
This commit is contained in:
parent
7a0a1c4441
commit
24daffb5fc
1 changed files with 23 additions and 12 deletions
|
@ -18,6 +18,8 @@
|
|||
},
|
||||
"source": [
|
||||
"# Blender Render Script for Colab\n",
|
||||
"_Uses some codes of [BlenderRender](https://urlzs.com/4hkfp) by [aniquetahir](https://urlzs.com/ToHpE)._\n",
|
||||
"\n",
|
||||
"Render Blender files online, for free. "
|
||||
]
|
||||
},
|
||||
|
@ -151,21 +153,27 @@
|
|||
" raise TypeError(\"No! Please run this in \" + formatting.font.bold + 'Google CoLab' + formatting.clear + '. ')\n",
|
||||
"\n",
|
||||
"def install(what, isCritical = False):\n",
|
||||
" info.status('Installing ' + what + ' and all its dependencies…')\n",
|
||||
" try:\n",
|
||||
" if what == \"blender\": \n",
|
||||
" if os.system('apt install blender libboost-all-dev libgl1-mesa-dev -y') > 0: \n",
|
||||
" if os.system('apt-get install blender libboost-all-dev libgl1-mesa-dev -y') > 0: raise\n",
|
||||
" except:\n",
|
||||
" errorMsg = ('Either ' + what + ' and/or its dependencies could not get installed. ')\n",
|
||||
" if isCritical: \n",
|
||||
" raise SystemError(errorMsg + 'Unfortunately, this module is required. ')\n",
|
||||
" if what == \"required\":\n",
|
||||
" install(\"blender\", True)\n",
|
||||
" install(\"libboost-all-dev\")\n",
|
||||
" install(\"libgl1-mesa-dev\")\n",
|
||||
" else:\n",
|
||||
" info.err(errorMsg)\n",
|
||||
" info.status('Installing ' + what + '…')\n",
|
||||
" try:\n",
|
||||
" if os.system('apt install ' + what + ' -y') > 0: \n",
|
||||
" if os.system('apt-get install ' + what + ' -y') > 0: \n",
|
||||
" if os.system('apt install --fix-broken ' + what + ' -y'): raise\n",
|
||||
" except:\n",
|
||||
" errorMsg = (what + ' could not get installed. ')\n",
|
||||
" if isCritical: raise SystemError(errorMsg + 'Unfortunately, this module is required. ')\n",
|
||||
" else: info.err(errorMsg)\n",
|
||||
" else: \n",
|
||||
" os.system('apt clean && apt autoremove -y')\n",
|
||||
" info.success('Installed '+ what + '.')\n",
|
||||
"\n",
|
||||
"def main():\n",
|
||||
" check_compatibility()\n",
|
||||
" install(\"blender\", True)\n",
|
||||
" install(\"required\")\n",
|
||||
"\n",
|
||||
"main()"
|
||||
]
|
||||
|
@ -658,6 +666,9 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"# Command line arguments from here: https://urlzs.com/MiUkt\n",
|
||||
"# Some explanation here: https://urlzs.com/au5z7\n",
|
||||
"\n",
|
||||
"!blender -b $filename -noaudio -o ./test_ -E $renderer -x 1"
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue