omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    160025 / SceneView crash

    Pythonista
    3
    5
    3210
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • momorprods
      momorprods last edited by

      Greetings,

      I have a critical issue with the SceneView on the newest beta. Here is a test script, it crashes Pythonista upon running. Is there something I'm missing ?

      # coding: utf-8
      import ui
      from scene import *
      import console
      
      class TestScene (Scene):
      	def draw(self):
      		# display hint --------
      		tint(1,1,1)
      		background(1, 1, 1)
      		
      		fill(1, 0, 0)
      		for touch in self.touches.values():
      			ellipse(touch.location.x - 25, touch.location.y-25,50,50)
      	
      class TestView (ui.View):
      	def __init__(self, width=1024, height=1024):
      		self.bg_color = 'white'
      
      w, h = ui.get_screen_size()
      canvas_size = max(w, h)
      
      sv = TestView(canvas_size, canvas_size)
      sv.name = 'Test'
      sv.present('fullscreen')
      
      adv2 = SceneView()
      adv2.scene = TestScene()
      adv2.paused=False 
      adv2.bounds = sv.bounds
      

      Thanks for any help on this issue.

      1 Reply Last reply Reply Quote 0
      • omz
        omz last edited by

        Thanks, I'll look into this. It seems that SceneView is somewhat buggy in the current beta – it won't be fixed in the next build (already uploaded), but I have it on my todo list.

        1 Reply Last reply Reply Quote 0
        • momorprods
          momorprods last edited by

          Thanks for your reply, keep up the good work !

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            import scene
            scene.SceneView().bounds = (0, 0, 100, 100)
            

            Will crash.

            1 Reply Last reply Reply Quote 0
            • momorprods
              momorprods last edited by

              Thanks for the fix, build 160032 works perfectly !

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Powered by NodeBB Forums | Contributors