36
36
)
37
37
38
38
from classes import info , updates
39
+ from classes import openshot_rc # noqa
39
40
from classes .query import Clip , Transition , Effect
40
41
from classes .logger import log
41
42
from classes .app import get_app
@@ -301,9 +302,9 @@ def color_update(self, item, new_color, interpolation=-1, interpolation_details=
301
302
clip_updated = True
302
303
# Update point
303
304
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 ))
307
308
break
308
309
309
310
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=
316
317
point ["handle_right" ]["X" ] = interpolation_details [0 ]
317
318
point ["handle_right" ]["Y" ] = interpolation_details [1 ]
318
319
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 ))
323
324
324
325
elif interpolation > - 1 and point ["co" ]["X" ] == closest_point_x :
325
326
# 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=
331
332
point ["handle_left" ]["X" ] = interpolation_details [2 ]
332
333
point ["handle_left" ]["Y" ] = interpolation_details [3 ]
333
334
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 ))
338
339
339
340
# Create new point (if needed)
340
341
if not found_point :
341
342
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 )
343
344
c .data [property_key ][color ]["Points" ].append ({
344
345
'co' : {'X' : self .frame_number , 'Y' : new_value },
345
- 'interpolation' : 1 })
346
+ 'interpolation' : 1 ,
347
+ })
346
348
347
349
# Reduce # of clip properties we are saving (performance boost)
348
350
c .data = {property_key : c .data [property_key ]}
@@ -437,9 +439,9 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
437
439
# Update or delete point
438
440
if new_value is not None :
439
441
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 ))
443
445
else :
444
446
point_to_delete = point
445
447
break
@@ -454,10 +456,10 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
454
456
point ["handle_right" ]["X" ] = interpolation_details [0 ]
455
457
point ["handle_right" ]["Y" ] = interpolation_details [1 ]
456
458
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 ))
461
463
462
464
elif interpolation > - 1 and point ["co" ]["X" ] == closest_point_x :
463
465
# 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
469
471
point ["handle_left" ]["X" ] = interpolation_details [2 ]
470
472
point ["handle_left" ]["Y" ] = interpolation_details [3 ]
471
473
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 ))
476
478
477
479
# Delete point (if needed)
478
480
if point_to_delete :
@@ -483,7 +485,7 @@ def value_updated(self, item, interpolation=-1, value=None, interpolation_detail
483
485
# Create new point (if needed)
484
486
elif not found_point and new_value is not None :
485
487
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 )
487
489
c .data [property_key ]["Points" ].append ({
488
490
'co' : {'X' : self .frame_number , 'Y' : new_value },
489
491
'interpolation' : 1 })
0 commit comments