@@ -1931,7 +1931,8 @@ def Slice_Triggered(self, action, clip_ids, trans_ids, playhead_position=0):
1931
1931
self .waveform_cache [right_clip .id ] = self .waveform_cache .get (clip_id , '[]' )
1932
1932
1933
1933
# Pass audio to javascript timeline (and render)
1934
- self .run_js (JS_SCOPE_SELECTOR + ".setAudioData('{}',{});" .format (right_clip .id , self .waveform_cache .get (right_clip .id )))
1934
+ self .run_js (JS_SCOPE_SELECTOR + ".setAudioData('{}',{});"
1935
+ .format (right_clip .id , self .waveform_cache .get (right_clip .id )))
1935
1936
1936
1937
# Save changes
1937
1938
self .update_clip_data (clip .data , only_basic_props = False , ignore_reader = True )
@@ -2883,7 +2884,8 @@ def callback(self, data, callback_data):
2883
2884
self .run_js (JS_SCOPE_SELECTOR + ".startManualMove('{}', '{}');" .format (self .item_type , self .item_id ))
2884
2885
2885
2886
# Find position from javascript
2886
- self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});" .format (event_position .x (), event_position .y ()), partial (callback , self , data ))
2887
+ self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});"
2888
+ .format (event_position .x (), event_position .y ()), partial (callback , self , data ))
2887
2889
2888
2890
# Resize timeline
2889
2891
@pyqtSlot (float )
@@ -2936,7 +2938,9 @@ def callback(self, file_ids, callback_data):
2936
2938
self .run_js (JS_SCOPE_SELECTOR + ".startManualMove('{}','{}');" .format (self .item_type , self .item_id ))
2937
2939
2938
2940
# Find position from javascript
2939
- self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});" .format (event_position .x (), event_position .y ()), partial (callback , self , file_ids ))
2941
+ self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});"
2942
+ .format (event_position .x (), event_position .y ()),
2943
+ partial (callback , self , file_ids ))
2940
2944
2941
2945
# Add Effect
2942
2946
def addEffect (self , effect_names , event_position ):
@@ -2952,7 +2956,11 @@ def callback(self, effect_names, callback_data):
2952
2956
# Loop through clips on the closest layer
2953
2957
possible_clips = Clip .filter (layer = js_nearest_track )
2954
2958
for clip in possible_clips :
2955
- if js_position == 0 or (clip .data ["position" ] <= js_position <= clip .data ["position" ] + (clip .data ["end" ] - clip .data ["start" ])):
2959
+ if js_position == 0 or (
2960
+ clip .data ["position" ]
2961
+ <= js_position
2962
+ <= clip .data ["position" ] + (clip .data ["end" ] - clip .data ["start" ])
2963
+ ):
2956
2964
log .info ("Applying effect to clip" )
2957
2965
log .info (clip )
2958
2966
@@ -2970,7 +2978,8 @@ def callback(self, effect_names, callback_data):
2970
2978
self .update_clip_data (clip .data , only_basic_props = False , ignore_reader = True )
2971
2979
2972
2980
# Find position from javascript
2973
- self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});" .format (event_position .x (), event_position .y ()), partial (callback , self , effect_names ))
2981
+ self .run_js (JS_SCOPE_SELECTOR + ".getJavaScriptPosition({}, {});"
2982
+ .format (event_position .x (), event_position .y ()), partial (callback , self , effect_names ))
2974
2983
2975
2984
# Without defining this method, the 'copy' action doesn't show with cursor
2976
2985
def dragMoveEvent (self , event ):
0 commit comments