preparation for blend build processing
This commit is contained in:
parent
7950da78d8
commit
003e885cf7
2 changed files with 24 additions and 0 deletions
4
core/blender-fbx-export.py
Normal file
4
core/blender-fbx-export.py
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import bpy
|
||||
import sys
|
||||
|
||||
bpy.ops.export_scene.fbx(filepath='D:\\Program Files\\exported.fbx', axis_forward='-Z', axis_up='Y')
|
||||
|
|
@ -21,6 +21,26 @@ dependencies {
|
|||
testImplementation "org.junit.platform:junit-platform-runner:1.5.2"
|
||||
}
|
||||
|
||||
task buildResources {
|
||||
def sourcePath = project.file("resources")
|
||||
def targetPath = project.file("build/resources/main/")
|
||||
|
||||
fileTree(dir: sourcePath).each { sourceFile ->
|
||||
if (sourceFile.getName().endsWith(".blend")) {
|
||||
println "Exporting: ${sourceFile}"
|
||||
|
||||
def targetFile = new File(
|
||||
sourceFile.getAbsolutePath().replace(sourcePath.absolutePath, targetPath.absolutePath))
|
||||
println " - Output: ${targetFile}"
|
||||
|
||||
// exec {
|
||||
// executable "sh"
|
||||
// args "-c", "blender.exe --background '${sourceFile}' --python 'blender-fbx-export.py'"
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue