fix error
parent
4721380344
commit
29debe4cb4
|
@ -85,6 +85,7 @@ def pdf_render(fp, multi_page=False):
|
||||||
|
|
||||||
fp.parent.mkdir(parents=True, exist_ok=True) # mode=0o777
|
fp.parent.mkdir(parents=True, exist_ok=True) # mode=0o777
|
||||||
|
|
||||||
|
## Single pdf
|
||||||
if multi_page:
|
if multi_page:
|
||||||
## In case of sequence path:
|
## In case of sequence path:
|
||||||
## Remove padding separator (or add scene range: "0100-0230" ?)
|
## Remove padding separator (or add scene range: "0100-0230" ?)
|
||||||
|
@ -214,7 +215,7 @@ def swf_render(fp):
|
||||||
'-s', f'framerate={bpy.context.scene.render.fps}',
|
'-s', f'framerate={bpy.context.scene.render.fps}',
|
||||||
# -z, # use zlib
|
# -z, # use zlib
|
||||||
str(pdf_fp),
|
str(pdf_fp),
|
||||||
# '-o', # no need to put output flag
|
# '-o', # seems like there is no need to add output flag
|
||||||
str(swf_fp)
|
str(swf_fp)
|
||||||
]
|
]
|
||||||
subprocess.call(cmd)
|
subprocess.call(cmd)
|
||||||
|
@ -233,7 +234,6 @@ class GPEXP_OT_export_as_pdf(bpy.types.Operator):
|
||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# multi_page : bpy.props.BoolProperty(name='multi page pdf', default=False)
|
|
||||||
export_type : bpy.props.StringProperty(name='Export Type', default='pdf_sequence')
|
export_type : bpy.props.StringProperty(name='Export Type', default='pdf_sequence')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -388,7 +388,7 @@ class GPEXP_OT_export_as_pdf(bpy.types.Operator):
|
||||||
pdf_render(fp, multi_page=False)
|
pdf_render(fp, multi_page=False)
|
||||||
elif self.export_type == 'pdf':
|
elif self.export_type == 'pdf':
|
||||||
## TODO: change fp to parent and adapt in pdf render ?
|
## TODO: change fp to parent and adapt in pdf render ?
|
||||||
pdf_render(fp, multi_page=self.multi_page)
|
pdf_render(fp, multi_page=True)
|
||||||
elif self.export_type == 'swf':
|
elif self.export_type == 'swf':
|
||||||
swf_render(fp)
|
swf_render(fp)
|
||||||
|
|
||||||
|
@ -424,4 +424,4 @@ def register():
|
||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
for cls in reversed(classes):
|
for cls in reversed(classes):
|
||||||
bpy.utils.unregister_class(cls)
|
bpy.utils.unregister_class(cls)
|
||||||
|
|
Loading…
Reference in New Issue