当前位置: 首页>>代码示例>>Python>>正文


Python EditorWindow.EditorWindow类代码示例

本文整理汇总了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)
开发者ID:AkshayJoshi,项目名称:python,代码行数:15,代码来源:PyShell.py

示例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)
开发者ID:AkshayJoshi,项目名称:python,代码行数:16,代码来源:PyShell.py

示例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()            
开发者ID:MontyThibault,项目名称:cartwheel-3d-Research-Modifications,代码行数:90,代码来源:Model.py

示例4: close2

 def close2(self):
     return EditorWindow.close(self)
开发者ID:AkshayJoshi,项目名称:python,代码行数:2,代码来源:PyShell.py

示例5: __init__

 def __init__(self, *args):
     EditorWindow.__init__(self, *args)
     self.text.bind("<<goto-file-line>>", self.goto_file_line)
开发者ID:Emma920,项目名称:visual,代码行数:3,代码来源:OutputWindow.py

示例6: __init__

 def __init__(self, *args):
     EditorWindow.__init__(self, start_page=OutputPage, *args)
     self.remove_tab_controls()
开发者ID:8848,项目名称:Pymol-script-repo,代码行数:3,代码来源:OutputWindow.py


注:本文中的EditorWindow.EditorWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。