Skip to content

Commit ceefbf8

Browse files
committed
Fixed clip transform handler when attached to object
1 parent c25ffe8 commit ceefbf8

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/windows/process_effect.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,9 @@ def accept(self):
353353

354354
# Load processed data into effect
355355
self.effect = openshot.EffectInfo().CreateEffect(self.effect_name)
356-
print("effect {}".format(self.effect.Json()))
357-
# if self.effect_name == "Tracker":
358-
# self.effect.SetJson( '{"protobuf_data_path": "%s" , "BaseFPS": { "num": %d, "den": %d } }' % (protobufPath, fps["num"], fps["den"]) )
359-
# # self.effect.SetJson('\{\{ "protobuf_data_path": {} , "BaseFPS": \{\{ "num": {}, "den": {} \}\} \}\}'.format(protobufPath, fps["num"], fps["den"]))
360-
# else:
356+
361357
self.effect.SetJson( '{"protobuf_data_path": "%s"}' % protobufPath )
362358

363-
364-
print("effect {}".format(self.effect.Json()))
365359
self.effect.Id(ID)
366360

367361
# Accept dialog

src/windows/video_widget.py

+5
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ def paintEvent(self, event, *args):
211211

212212
# Determine scale of clip
213213
scale = self.transforming_clip.data['scale']
214+
215+
# Set scale as STRETCH if the clip is attached to an object
216+
if (raw_properties.get('attached_id').get('value') != 'None'):
217+
scale = openshot.SCALE_STRETCH
218+
214219
if scale == openshot.SCALE_FIT:
215220
source_size.scale(player_width, player_height, Qt.KeepAspectRatio)
216221

src/windows/views/properties_tableview.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
from functools import partial
3232
from operator import itemgetter
33-
from PyQt5.QtCore import Qt, QRectF, QRect, QPoint, QLocale, pyqtSignal, QTimer
33+
from PyQt5.QtCore import Qt, QRectF, QLocale, pyqtSignal, QTimer
3434
from PyQt5.QtGui import (
3535
QIcon, QColor, QBrush, QPen, QPalette, QPixmap,
3636
QPainter, QPainterPath, QLinearGradient, QFont, QFontInfo,

0 commit comments

Comments
 (0)