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": [
|
"source": [
|
||||||
"# Blender Render Script for Colab\n",
|
"# 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. "
|
"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",
|
" raise TypeError(\"No! Please run this in \" + formatting.font.bold + 'Google CoLab' + formatting.clear + '. ')\n",
|
||||||
"\n",
|
"\n",
|
||||||
"def install(what, isCritical = False):\n",
|
"def install(what, isCritical = False):\n",
|
||||||
" info.status('Installing ' + what + ' and all its dependencies…')\n",
|
" if what == \"required\":\n",
|
||||||
" try:\n",
|
" install(\"blender\", True)\n",
|
||||||
" if what == \"blender\": \n",
|
" install(\"libboost-all-dev\")\n",
|
||||||
" if os.system('apt install blender libboost-all-dev libgl1-mesa-dev -y') > 0: \n",
|
" install(\"libgl1-mesa-dev\")\n",
|
||||||
" if os.system('apt-get install blender libboost-all-dev libgl1-mesa-dev -y') > 0: raise\n",
|
" else:\n",
|
||||||
" except:\n",
|
" info.status('Installing ' + what + '…')\n",
|
||||||
" errorMsg = ('Either ' + what + ' and/or its dependencies could not get installed. ')\n",
|
" try:\n",
|
||||||
" if isCritical: \n",
|
" if os.system('apt install ' + what + ' -y') > 0: \n",
|
||||||
" raise SystemError(errorMsg + 'Unfortunately, this module is required. ')\n",
|
" if os.system('apt-get install ' + what + ' -y') > 0: \n",
|
||||||
" else:\n",
|
" if os.system('apt install --fix-broken ' + what + ' -y'): raise\n",
|
||||||
" info.err(errorMsg)\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",
|
"\n",
|
||||||
"def main():\n",
|
"def main():\n",
|
||||||
" check_compatibility()\n",
|
" check_compatibility()\n",
|
||||||
" install(\"blender\", True)\n",
|
" install(\"required\")\n",
|
||||||
"\n",
|
"\n",
|
||||||
"main()"
|
"main()"
|
||||||
]
|
]
|
||||||
|
@ -658,6 +666,9 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"source": [
|
"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"
|
"!blender -b $filename -noaudio -o ./test_ -E $renderer -x 1"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue