Title 3d picture_frames_4.xml broken to open files images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenShot Video Editor |
New
|
Undecided
|
Unassigned |
Bug Description
Architecture : x86_64
model name : Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
Operating System & version: Linux 4.17.17-1-MANJARO #1 SMP PREEMPT Sat Aug 18 14:38:10 UTC 2018 GNU/Linux
Installation Method : pacman/yaourt
Version of Openshot installed : 2.4.2
MLT/melt version : 6.10.0
FFmpeg (i.e.libavcodec) version : n4.0.2
built with gcc 8.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdrm --enable-
libavutil 56. 14.100 / 56. 14.100
libavcodec 58. 18.100 / 58. 18.100
libavformat 58. 12.100 / 58. 12.100
libavdevice 58. 3.100 / 58. 3.100
libavfilter 7. 16.100 / 7. 16.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 1.100 / 5. 1.100
libswresample 3. 1.100 / 3. 1.100
libpostproc 55. 1.100 / 55. 1.100
Blender version : 2.79 (sub 0)
When i whant use title 3d blender_
I revolve problem with changing code from openshot interface file openshot_
I had function xml picture for use like this :
file picture_
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE openshot-effect>
<effect>
<title translatable=
<description translatable=
<icon>
<category>
<service>
<param name="file_name" type="text" title="File Name" description="">
<default>
</param>
<param name="project_
<values>
<value name="/
<value name="/
<value name="goodpictu
<value name="/
<value name="/
</values>
</param>
<param name="project_
<values>
<value name="" num=""/>
</values>
</param>
<param name="project_
<values>
<value name="" num=""/>
</values>
<default>
</param>
<param name="project_
<values>
<value name="" num=""/>
</values>
<default>
</param>
<param name="start_frame" type="spinner" title="Start Frame" description="">
<min>1</min>
<max>1</max>
<default>
</param>
<param name="end_frame" type="spinner" title="End Frame" description="">
<min>230</min>
<max>230</max>
<default>
</param>
<!-- SPEED -->
<param name="animation
<values>
<value name="Default" num="1"/>
<value name="2X" num="2"/>
<value name="3X" num="3"/>
<value name="4X" num="4"/>
<value name="5X" num="5"/>
</values>
<default>
</param>
</effect>
file picture_frames_4.py
# OpenShot Video Editor is a program that creates, modifies, and edits video files.
# Copyright (C) 2009 Jonathan Thomas
#
# This file is part of OpenShot Video Editor (http://
#
# OpenShot Video Editor is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# OpenShot Video Editor is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenShot Video Editor. If not, see <http://
# Import Blender's python API. This only works when the script is being
# run from the context of Blender. Blender contains it's own version of Python
# with this library pre-installed.
import bpy, os, sys
directory = os.path.
if not directory in sys.path:
sys.
from debug import print_error
from math import pi, radians
from PIL import Image
# Debug Info:
# ./blender -b test.blend -P demo.py
# -b = background mode
# -P = run a Python script within the context of the project file
# Init all of the variables needed by this script. Because Blender executes
# this script, OpenShot will inject a dictionary of the required parameters
# before this script is executed.
params = {
'title' : 'Oh Yeah! OpenShot!',
'width' : 1.0,
'color' : [0.8,0.8,0.8],
'alpha' : 1.0,
'fps' : 24,
}
def get_scale_
""" Calculate the correct scale parameters to display an image with the
correct height / width ratio in Blender. """
try :
img = Image.open(
except Exception as E:
raise ValueError(E)
img_width, img_height = img.size
height_ratio = 1.0
width_ratio = float(img_width) / float(img_height)
return (height_ratio, width_ratio)
#INJECT_PARAMS_HERE
# The remainder of this script will modify the current Blender .blend project
# file, and adjust the settings. The .blend file is specified in the XML file
# that defines this template in OpenShot.
#------
try:
# debug
#print(
# Split the picture information
picture1 = params[
if len(picture1) > 1:
picture2 = params[
if len(picture2) > 1:
picture3 = params[
if len(picture3) > 1:
picture4 = params[
if len(picture4) > 1:
# Modify picture paths
if len(picture1) > 1:
if picture1[3] == "image":
else:
if len(picture2) > 1:
if picture2[3] == "image":
else:
if len(picture3) > 1:
if picture3[3] == "image":
else:
if len(picture4) > 1:
if picture4[3] == "image":
else:
except Exception as E:
print_
print(
else:
# Set the render options. It is important that these are set
# to the same values as the current OpenShot project. These
# params are automatically set by OpenShot
bpy.
bpy.
#bpy.
try:
except:
bpy.
bpy.
bpy.
bpy.
bpy.
bpy.
bpy.
# Animation Speed (use Blender's time remapping to slow or speed up animation)
animation_speed = int(params[
new_length = int(params[
bpy.
bpy.
bpy.
if params[
finally:
# Render the current animation to the params[
bpy.
file picture_ frames_ 4.xml