Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Pignataro <info@oscurart.com.ar>2018-03-22 02:20:42 +0300
committerEugenio Pignataro <info@oscurart.com.ar>2018-03-22 02:20:42 +0300
commit3231e35600f674e3dcc74c4aa91a8e853774f7d9 (patch)
tree974e9e3dad7b13c5067e1aae19cc795db2293f25 /oscurart_tools
parenteaacbf59e13a2519f924d47579289bc7a7422a82 (diff)
Fix: Tokens
Diffstat (limited to 'oscurart_tools')
-rw-r--r--oscurart_tools/oscurart_render.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/oscurart_tools/oscurart_render.py b/oscurart_tools/oscurart_render.py
index 4e36338e..60edd822 100644
--- a/oscurart_tools/oscurart_render.py
+++ b/oscurart_tools/oscurart_render.py
@@ -78,8 +78,8 @@ def defRenderAll(frametype, scenes):
# os.path.dirname(renpath), filename, scene.name, layer.name, "%s_%s_%s" %
# (filename, scene.name, layer.name))
tokens = {
- "$Scene":bpy.context.scene.name,
- "$File":bpy.path.display_name(bpy.data.filepath),
+ "$Scene":scene.name,
+ "$File":os.path.basename(bpy.data.filepath).split(".")[0],
"$Layer":layer.name}
scene.render.filepath = renpath.replace("$Scene",tokens["$Scene"]).replace("$File",tokens["$File"]).replace("$Layer",tokens["$Layer"])
@@ -217,7 +217,14 @@ def defoscBatchMaker(TYPE, BIN):
SHFILE = os.path.join(
bpy.data.filepath.rpartition(SYSBAR)[0],
FILENAME + EXTSYS)
-
+
+ renpath = bpy.context.scene.render.filepath
+ tokens = {
+ "$Scene":bpy.context.scene.name,
+ "$File":os.path.basename(bpy.data.filepath).split(".")[0],
+ "$Layer":bpy.context.scene.render.layers.active.name}
+
+ rfp = bpy.context.scene.render.filepath.replace("$Scene",tokens["$Scene"]).replace("$File",tokens["$File"]).replace("$Layer",tokens["$Layer"])
with open(SHFILE, "w") as FILE:
# assign permission in linux
if EXTSYS == ".sh":
@@ -228,12 +235,12 @@ def defoscBatchMaker(TYPE, BIN):
"** Oscurart Batch maker can not modify the permissions.")
if not BIN:
FILE.writelines("%s%s%s -b %s -x 1 -o %s -P %s%s.py -s %s -e %s -a" %
- (QUOTES, BINDIR, QUOTES, bpy.data.filepath, bpy.context.scene.render.filepath,
+ (QUOTES, BINDIR, QUOTES, bpy.data.filepath, rfp,
bpy.data.filepath.rpartition(SYSBAR)[0] + SYSBAR, TYPE,
str(bpy.context.scene.frame_start), str(bpy.context.scene.frame_end)))
else:
FILE.writelines("%s -b %s -x 1 -o %s -P %s%s.py -s %s -e %s -a" %
- ("blender", bpy.data.filepath, bpy.context.scene.render.filepath,
+ ("blender", bpy.data.filepath, rfp,
bpy.data.filepath.rpartition(SYSBAR)[0] + SYSBAR, TYPE,
str(bpy.context.scene.frame_start), str(bpy.context.scene.frame_end)))