Skip to content

Commit

Permalink
Updating example.
Browse files Browse the repository at this point in the history
  • Loading branch information
kaanaksit committed Jan 25, 2020
1 parent 890762b commit 8f5d00b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions odak/visualize/blender/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
from subprocess import Popen, PIPE
from .wrapper import *

def init(headless=False):
def init(headless=False,blend_fn=''):
"""
Definition to start a blender server. This has been tested with a Blender 2.8. Blender server runs on port 8082 on your local machine.
Parameters
----------
headless : bool
To set blender to headless mode set it to True.
blend_fn : str
Filename.
Returns
----------
Expand All @@ -32,14 +34,16 @@ def init(headless=False):
cmd = [
'blender',
'-P',
server_fn
server_fn,
blend_fn
]
elif headless == True:
cmd = [
'blender',
'-b',
'-P',
server_fn
server_fn,
blend_fn
]
proc,outs,errs = tools.shell_command(cmd,check=False)
time.sleep(2)
Expand Down
Binary file modified recordings/example.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8f5d00b

Please sign in to comment.