本文整理汇总了Python中EditorWindow.EditorWindow类的典型用法代码示例。如果您正苦于以下问题:Python EditorWindow类的具体用法?Python EditorWindow怎么用?Python EditorWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了EditorWindow类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _close
def _close(self):
"Extend EditorWindow._close(), shut down debugger and execution server"
self.close_debugger()
if use_subprocess:
self.interp.kill_subprocess()
# Restore std streams
sys.stdout = self.save_stdout
sys.stderr = self.save_stderr
sys.stdin = self.save_stdin
# Break cycles
self.interp = None
self.console = None
self.flist.pyshell = None
self.history = None
EditorWindow._close(self)
示例2: __init__
def __init__(self, *args):
self.breakpoints = []
EditorWindow.__init__(self, *args)
self.text.bind("<<set-breakpoint-here>>", self.set_breakpoint_here)
self.text.bind("<<clear-breakpoint-here>>", self.clear_breakpoint_here)
self.text.bind("<<open-python-shell>>", self.flist.open_shell)
self.breakpointPath = os.path.join(idleConf.GetUserCfgDir(),
'breakpoints.lst')
# whenever a file is changed, restore breakpoints
if self.io.filename: self.restore_file_breaks()
def filename_changed_hook(old_hook=self.io.filename_change_hook,
self=self):
self.restore_file_breaks()
old_hook()
self.io.set_filename_change_hook(filename_changed_hook)
示例3: _create
def _create(self):
"""Creates the basic model class for the simple keyframe editor. Characters are always forced to left stance."""
app = wx.GetApp()
try:
self._controller = app.getController(0)
except IndexError:
return
self._character = self._controller.getCharacter()
handlesSide = []
handlesFront = []
self._handles = []
handlesSide.append( self._addHandle( 'SWING_Shoulder', 2, 'SWING_Elbow', minValue = -3.14, maxValue = 3.14 ) )
handlesSide.append( self._addHandle( 'STANCE_Shoulder', 2, 'STANCE_Elbow', minValue = -3.14, maxValue = 3.14 ) )
handlesSide.append( self._addHandle( 'SWING_Elbow', 0, reverseOppositeJoint = True, minValue = -2.8, maxValue = 0 ) )
handlesSide.append( self._addHandle( 'STANCE_Elbow', 0, type = 'reverseCircular', reverseOppositeJoint = True,minValue = 0, maxValue = 2.8 ) )
handlesSide.append( self._addHandle( 'SWING_Ankle', 0, 'SWING_ToeJoint' ) )
handlesSide.append( self._addHandle( 'STANCE_Ankle', 0, 'STANCE_ToeJoint' ) )
handlesSide.append( self._addHandle( 'pelvis_lowerback', 2, 'lowerback_torso', minValue = -1.2, maxValue = 1.2 ) )
handlesSide.append( self._addHandle( 'lowerback_torso', 2, 'torso_head', minValue = -1.2, maxValue = 1.2 ) )
handlesSide.append( self._addHandle( 'torso_head', 2, minValue = -1.2, maxValue = 1.2 ) )
handlesFront.append( self._addHandle( 'SWING_Shoulder', 1, 'SWING_Elbow', type = 'reverseCircular', reverseOppositeJoint = True, minValue = -2, maxValue = 2 ) )
handlesFront.append( self._addHandle( 'STANCE_Shoulder', 1, 'STANCE_Elbow', type = 'reverseCircular', reverseOppositeJoint = True, minValue = -2, maxValue = 2 ) )
handlesFront.append( self._addHandle( 'SWING_Shoulder', 0, type = 'reversePerpendicular', minValue = -3.3, maxValue = 3.3 ) )
handlesFront.append( self._addHandle( 'STANCE_Shoulder', 0, type = 'perpendicular', minValue = -3.3, maxValue = 3.3 ) )
handlesFront.append( self._addHandle( 'pelvis_lowerback', 1, 'lowerback_torso', reverseOppositeJoint = True, minValue = -1.2, maxValue = 1.2 ) )
handlesFront.append( self._addHandle( 'lowerback_torso', 1, 'torso_head', reverseOppositeJoint = True, minValue = -1.2, maxValue = 1.2 ) )
handlesFront.append( self._addHandle( 'torso_head', 1, reverseOppositeJoint = True, minValue = -1.2, maxValue = 1.2 ) )
stanceKneeHandle = Handle( self._controller, 'STANCE_Knee', 0, minValue = 0.1, maxValue = 2.2 )
self._handles.append( stanceKneeHandle )
swingFootHandleSagittal = BaseHandle( self._controller.getSwingFootTrajectoryDeltaSagittal() )
swingFootHandleCoronal = BaseHandle( self._controller.getSwingFootTrajectoryDeltaCoronal() )
swingFootHandleHeight = BaseHandle( self._controller.getSwingFootTrajectoryDeltaHeight() )
self._handles.append( swingFootHandleSagittal )
self._handles.append( swingFootHandleCoronal )
self._handles.append( swingFootHandleHeight )
self._editors = []
self._times = [ i / float(self._nbEditors-1) for i in range(self._nbEditors) ]
for handle in self._handles:
handle.forceKeyframesAt([0,1],self._times)
for handle in self._handles:
handle.enforceSymmetry()
stanceFootToSwingFootTrajectory = Trajectory3dv()
stanceFootToSwingFootTrajectory.addKnot(0,Vector3d(-0.2,0,-0.4))
stanceFootToSwingFootTrajectory.addKnot(0.5,Vector3d(-0.2,0.125,0))
stanceFootToSwingFootTrajectory.addKnot(1,Vector3d(-0.2,0,0.4))
glCanvasSize = wx.GetApp().getGLCanvas().GetSize()
minWidth = glCanvasSize.x / self._nbEditors - 50
minHeight = glCanvasSize.y / 2
for i, time in enumerate(self._times) :
posableCharacter = PosableCharacter(PyUtils.copy(self._character), self._controller)
if i == 0 or i == self._nbEditors-1:
checkBoxVisible = False
else :
checkBoxVisible = True
editor = EditorWindow( self._container,
posableCharacter = posableCharacter,
handlesSide = handlesSide,
handlesFront = handlesFront,
stanceKneeHandle = stanceKneeHandle,
swingFootHandleSagittal = swingFootHandleSagittal,
swingFootHandleCoronal = swingFootHandleCoronal,
swingFootHandleHeight = swingFootHandleHeight,
time = time,
controller = self._controller,
stanceFootToSwingFootTrajectory = stanceFootToSwingFootTrajectory,
minWidth = minWidth, minHeight = minHeight,
checkBoxVisible = checkBoxVisible )
functor = SetKeyframeVisibilityFunctor(self,i)
editor.addCheckBoxCallback( functor.execute )
self._sizer.add(editor, 0, GLUtils.GLUI_EXPAND )
self._editors.append(editor)
self._container.getParent().layout()
示例4: close2
def close2(self):
return EditorWindow.close(self)
示例5: __init__
def __init__(self, *args):
EditorWindow.__init__(self, *args)
self.text.bind("<<goto-file-line>>", self.goto_file_line)
示例6: __init__
def __init__(self, *args):
EditorWindow.__init__(self, start_page=OutputPage, *args)
self.remove_tab_controls()