Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flamenco-worker-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
flamenco-worker-python
Commits
3ef9175c
Commit
3ef9175c
authored
6 years ago
by
Sybren A. Stüvel
Browse files
Options
Downloads
Patches
Plain Diff
Windows compatibility fixes
parent
0e94bb02
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flamenco_worker/commands.py
+7
-2
7 additions, 2 deletions
flamenco_worker/commands.py
tests/abstract_worker_test.py
+10
-11
10 additions, 11 deletions
tests/abstract_worker_test.py
with
17 additions
and
13 deletions
flamenco_worker/commands.py
+
7
−
2
View file @
3ef9175c
...
...
@@ -920,6 +920,10 @@ class MergeProgressiveRendersCommand(AbstractSubprocessCommand):
if
'"'
in
output
:
return
'
Double quotes are not allowed in filenames: %r
'
%
output
settings
[
'
input1
'
]
=
Path
(
input1
).
as_posix
()
settings
[
'
input2
'
]
=
Path
(
input2
).
as_posix
()
settings
[
'
output
'
]
=
Path
(
output
).
as_posix
()
_
,
err
=
self
.
_setting
(
settings
,
'
weight1
'
,
True
,
int
)
if
err
:
return
err
...
...
@@ -937,7 +941,7 @@ class MergeProgressiveRendersCommand(AbstractSubprocessCommand):
'
--enable-autoexec
'
,
'
-noaudio
'
,
'
--background
'
,
str
(
blendpath
),
blendpath
.
as_posix
(
),
]
# set up node properties and render settings.
...
...
@@ -948,7 +952,7 @@ class MergeProgressiveRendersCommand(AbstractSubprocessCommand):
tmppath
=
Path
(
tmpdir
)
assert
tmppath
.
exists
()
settings
[
'
tmpdir
'
]
=
tmp
dir
settings
[
'
tmpdir
'
]
=
tmp
path
.
as_posix
()
cmd
+=
[
'
--python-expr
'
,
MERGE_EXR_PYTHON
%
settings
]
...
...
@@ -968,6 +972,7 @@ class MergeProgressiveRendersCommand(AbstractSubprocessCommand):
self
.
_log
.
info
(
'
Moving %s to %s
'
,
src
,
dst
)
assert
src
.
exists
()
assert
src
.
is_file
()
assert
not
dst
.
exists
()
or
dst
.
is_file
()
assert
dst
.
exists
()
or
dst
.
parent
.
exists
()
...
...
This diff is collapsed.
Click to expand it.
tests/abstract_worker_test.py
+
10
−
11
View file @
3ef9175c
import
logging
import
os
import
pathlib
import
platform
import
shutil
import
unittest
class
AbstractWorkerTest
(
unittest
.
TestCase
):
@classmethod
def
setUpClass
(
cls
):
import
logging
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
format
=
'
%(asctime)-15s %(levelname)8s %(name)s %(message)s
'
,
)
def
find_blender_cmd
(
self
):
import
os
import
platform
def
find_blender_cmd
(
self
)
->
str
:
if
platform
.
system
()
==
'
Windows
'
:
blender
=
'
blender.exe
'
else
:
blender
=
'
blender
'
for
path
in
os
.
getenv
(
'
PATH
'
).
split
(
os
.
path
.
pathsep
):
full_path
=
path
+
os
.
sep
+
blender
if
os
.
path
.
exists
(
full_path
):
return
full_path
found
=
shutil
.
which
(
blender
)
if
found
is
None
:
self
.
fail
(
f
'
Unable to find
{
blender
!r}
executable on $PATH
'
)
self
.
fail
(
'
Unable to find
"
blender
"
executable on $PATH
'
)
return
pathlib
.
Path
(
found
).
as_posix
(
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment