Skip to content

Commit e6f88e0

Browse files
authored
Update due to changes in 'develop'
1 parent f1a356f commit e6f88e0

File tree

1 file changed

+27
-25
lines changed

1 file changed

+27
-25
lines changed

src/windows/models/properties_model.py

+27-25
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
)
3737

3838
from classes import info, updates
39+
from classes import openshot_rc # noqa
3940
from classes.query import Clip, Transition, Effect
4041
from classes.logger import log
4142
from classes.app import get_app
@@ -301,9 +302,9 @@ def color_update(self, item, new_color, interpolation=-1, interpolation_details=
301302
clip_updated = True
302303
# Update point
303304
point["co"]["Y"] = new_value
304-
log.info(
305-
"updating point: co.X = %s to value: %s"
306-
% (point["co"]["X"], float(new_value)))
305+
log.debug(
306+
"updating point: co.X = %d to value: %.3f",
307+
point["co"]["X"], float(new_value))
307308
break
308309

309310
elif interpolation > -1 and point["co"]["X"] == previous_point_x:
@@ -316,10 +317,10 @@ def color_update(self, item, new_color, interpolation=-1, interpolation_details=
316317
point["handle_right"]["X"] = interpolation_details[0]
317318
point["handle_right"]["Y"] = interpolation_details[1]
318319

319-
log.info(
320-
"updating interpolation mode point: co.X = %s to %s"
321-
% (point["co"]["X"], interpolation))
322-
log.info("use interpolation preset: %s" % str(interpolation_details))
320+
log.debug(
321+
"updating interpolation mode point: co.X = %d to %d",
322+
point["co"]["X"], interpolation)
323+
log.debug("use interpolation preset: %s", str(interpolation_details))
323324

324325
elif interpolation > -1 and point["co"]["X"] == closest_point_x:
325326
# Only update interpolation type (and the RIGHT side of the curve)
@@ -331,18 +332,19 @@ def color_update(self, item, new_color, interpolation=-1, interpolation_details=
331332
point["handle_left"]["X"] = interpolation_details[2]
332333
point["handle_left"]["Y"] = interpolation_details[3]
333334

334-
log.info(
335-
"updating interpolation mode point: co.X = %s to %s"
336-
% (point["co"]["X"], interpolation))
337-
log.info("use interpolation preset: %s" % str(interpolation_details))
335+
log.debug(
336+
"updating interpolation mode point: co.X = %d to %d",
337+
point["co"]["X"], interpolation)
338+
log.debug("use interpolation preset: %s", str(interpolation_details))
338339

339340
# Create new point (if needed)
340341
if not found_point:
341342
clip_updated = True
342-
log.info("Created new point at X=%s" % self.frame_number)
343+
log.debug("Created new point at X=%d", self.frame_number)
343344
c.data[property_key][color]["Points"].append({
344345
'co': {'X': self.frame_number, 'Y': new_value},
345-
'interpolation': 1})
346+
'interpolation': 1,
347+
})
346348

347349
# Reduce # of clip properties we are saving (performance boost)
348350
c.data = {property_key: c.data[property_key]}
@@ -437,9 +439,9 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
437439
# Update or delete point
438440
if new_value is not None:
439441
point["co"]["Y"] = float(new_value)
440-
log.info(
441-
"updating point: co.X = %s to value: %s"
442-
% (point["co"]["X"], float(new_value)))
442+
log.debug(
443+
"updating point: co.X = %d to value: %.3f",
444+
point["co"]["X"], float(new_value))
443445
else:
444446
point_to_delete = point
445447
break
@@ -454,10 +456,10 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
454456
point["handle_right"]["X"] = interpolation_details[0]
455457
point["handle_right"]["Y"] = interpolation_details[1]
456458

457-
log.info(
458-
"updating interpolation mode point: co.X = %s to %s"
459-
% (point["co"]["X"], interpolation))
460-
log.info("use interpolation preset: %s" % str(interpolation_details))
459+
log.debug(
460+
"updating interpolation mode point: co.X = %d to %d",
461+
point["co"]["X"], interpolation)
462+
log.debug("use interpolation preset: %s", str(interpolation_details))
461463

462464
elif interpolation > -1 and point["co"]["X"] == closest_point_x:
463465
# Only update interpolation type (and the RIGHT side of the curve)
@@ -469,10 +471,10 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
469471
point["handle_left"]["X"] = interpolation_details[2]
470472
point["handle_left"]["Y"] = interpolation_details[3]
471473

472-
log.info(
473-
"updating interpolation mode point: co.X = %s to %s"
474-
% (point["co"]["X"], interpolation))
475-
log.info("use interpolation preset: %s" % str(interpolation_details))
474+
log.debug(
475+
"updating interpolation mode point: co.X = %d to %d",
476+
point["co"]["X"], interpolation)
477+
log.debug("use interpolation preset: %s", str(interpolation_details))
476478

477479
# Delete point (if needed)
478480
if point_to_delete:
@@ -483,7 +485,7 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
483485
# Create new point (if needed)
484486
elif not found_point and new_value is not None:
485487
clip_updated = True
486-
log.info("Created new point at X=%s" % self.frame_number)
488+
log.debug("Created new point at X=%d", self.frame_number)
487489
c.data[property_key]["Points"].append({
488490
'co': {'X': self.frame_number, 'Y': new_value},
489491
'interpolation': 1})

0 commit comments

Comments
 (0)