示例#1
0
    def postTransition(self, slideshow):
        """Post transition.

        This method is called at the end of a transition.
        post: frontplate must be visible
        """
        slideshow.helper.rot = mat3(1)
        cmds.link(slideshow.frontplate, None)
        cmds.link(slideshow.backplate, None)
示例#2
0
    def preTransition(self, slideshow):
        """Prepare transition.

        This method is called at the beginning of a transition.
        """
        slideshow.backplate.rot = mat3().rotation(pi/2, vec3(0,1,0))
        slideshow.backplate.pos = vec3(2,0,-2)
        slideshow.helper.pos = vec3(0,0,-2)
        slideshow.helper.rot = mat3(1)
        
        cmds.link(slideshow.frontplate, slideshow.helper)
        cmds.link(slideshow.backplate, slideshow.helper)
示例#3
0
 def onKeyPress(self, e):
     # Page down or Enter?
     if e.keycode==281 or e.keycode==13:
         self.transition_start = getScene().timer().time
     # Page up
     elif e.keycode==280:
         pass
     # q (reset cam)
     elif e.key=="q":
         getScene().up = vec3(0,1,0)
         self.cam.pos = vec3(0,0,5.6)
         self.cam.target = vec3(0,0,0)
         self.cam.fov = 30
         cmds.link(self.cam)