PlayAnim: use the same GPU backend as Blender
Since the animation player doesn't read the user preferences, pass the GPU backend as an argument.
This commit is contained in:
@@ -140,6 +140,15 @@ class PlayRenderedAnim(Operator):
|
||||
frame_start = scene.frame_start
|
||||
frame_end = scene.frame_end
|
||||
if preset == 'INTERNAL':
|
||||
# Use the current GPU backend for the player.
|
||||
import gpu
|
||||
gpu_backend = gpu.platform.backend_type_get()
|
||||
if gpu_backend not in {'NONE', 'UNKNOWN'}:
|
||||
cmd.extend([
|
||||
"--gpu-backend", gpu_backend.lower(),
|
||||
])
|
||||
del gpu, gpu_backend
|
||||
|
||||
opts = [
|
||||
"-a",
|
||||
"-f", str(rd.fps), str(rd.fps_base),
|
||||
|
||||
Reference in New Issue
Block a user