forked from bartvdbraak/blender
clear some pep8 warnings
This commit is contained in:
parent
6e66bfe110
commit
80de1162ee
@ -348,7 +348,7 @@ def smpte_from_seconds(time, fps=None):
|
|||||||
hours = minutes = seconds = frames = 0
|
hours = minutes = seconds = frames = 0
|
||||||
|
|
||||||
if time < 0:
|
if time < 0:
|
||||||
time = -time
|
time = - time
|
||||||
neg = "-"
|
neg = "-"
|
||||||
else:
|
else:
|
||||||
neg = ""
|
neg = ""
|
||||||
@ -361,7 +361,7 @@ def smpte_from_seconds(time, fps=None):
|
|||||||
time = time % 60.0
|
time = time % 60.0
|
||||||
|
|
||||||
seconds = int(time)
|
seconds = int(time)
|
||||||
frames= int(round(math.floor( ((time - seconds) * fps))))
|
frames= int(round(math.floor(((time - seconds) * fps))))
|
||||||
|
|
||||||
return "%s%02d:%02d:%02d:%02d" % (neg, hours, minutes, seconds, frames)
|
return "%s%02d:%02d:%02d:%02d" % (neg, hours, minutes, seconds, frames)
|
||||||
|
|
||||||
@ -380,4 +380,3 @@ def smpte_from_frame(frame, fps=None, fps_base=None):
|
|||||||
fps_base = _bpy.context.scene.render.fps_base
|
fps_base = _bpy.context.scene.render.fps_base
|
||||||
|
|
||||||
return smpte_from_seconds((frame * fps_base) / fps, fps)
|
return smpte_from_seconds((frame * fps_base) / fps, fps)
|
||||||
|
|
@ -22,6 +22,7 @@ import bpy
|
|||||||
|
|
||||||
from bpy.props import *
|
from bpy.props import *
|
||||||
|
|
||||||
|
|
||||||
class SequencerCrossfadeSounds(bpy.types.Operator):
|
class SequencerCrossfadeSounds(bpy.types.Operator):
|
||||||
'''Do crossfading volume animation of two selected sound strips.'''
|
'''Do crossfading volume animation of two selected sound strips.'''
|
||||||
|
|
||||||
@ -97,7 +98,7 @@ class SequencerCutMulticam(bpy.types.Operator):
|
|||||||
s.selected = True
|
s.selected = True
|
||||||
|
|
||||||
cfra = context.scene.frame_current
|
cfra = context.scene.frame_current
|
||||||
bpy.ops.sequencer.cut(frame=cfra,type='HARD',side='RIGHT')
|
bpy.ops.sequencer.cut(frame=cfra, type='HARD', side='RIGHT')
|
||||||
for s in context.scene.sequence_editor.sequences_all:
|
for s in context.scene.sequence_editor.sequences_all:
|
||||||
if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
|
if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
|
||||||
context.scene.sequence_editor.active_strip = s
|
context.scene.sequence_editor.active_strip = s
|
||||||
@ -105,6 +106,7 @@ class SequencerCutMulticam(bpy.types.Operator):
|
|||||||
context.scene.sequence_editor.active_strip.multicam_source = camera
|
context.scene.sequence_editor.active_strip.multicam_source = camera
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
|
class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
|
||||||
'''Deinterlace all selected movie sources.'''
|
'''Deinterlace all selected movie sources.'''
|
||||||
|
|
||||||
@ -126,7 +128,6 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
|
|||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
register = bpy.types.register
|
register = bpy.types.register
|
||||||
|
|
||||||
|
@ -23,6 +23,8 @@ import bpy
|
|||||||
narrowui = bpy.context.user_preferences.view.properties_width_check
|
narrowui = bpy.context.user_preferences.view.properties_width_check
|
||||||
|
|
||||||
#cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc
|
#cachetype can be 'PSYS' 'HAIR' 'SMOKE' etc
|
||||||
|
|
||||||
|
|
||||||
def point_cache_ui(self, context, cache, enabled, cachetype):
|
def point_cache_ui(self, context, cache, enabled, cachetype):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
@ -103,6 +105,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
|
|||||||
col.operator("ptcache.free_bake_all", text="Free All Bakes")
|
col.operator("ptcache.free_bake_all", text="Free All Bakes")
|
||||||
col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
|
col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
|
||||||
|
|
||||||
|
|
||||||
def effector_weights_ui(self, context, weights):
|
def effector_weights_ui(self, context, weights):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
# <pep8 compliant>
|
# <pep8 compliant>
|
||||||
import bpy
|
import bpy
|
||||||
|
|
||||||
|
|
||||||
def act_strip(context):
|
def act_strip(context):
|
||||||
try:
|
try:
|
||||||
return context.scene.sequence_editor.active_strip
|
return context.scene.sequence_editor.active_strip
|
||||||
|
Loading…
Reference in New Issue
Block a user