Announcement

Collapse
No announcement yet.

MAXScript output size glitches

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MAXScript output size glitches

    Hi all

    I'm setting the max outputsize for the common render dialog, but I'm having a hard time for the settings to take effect
    I've tried various things

    just before setting the outputsize:
    Code:
    renderSceneDialog.close()
    after setting outputsize
    Code:
    renderSceneDialog.update()
    When I do this with buttons, it mostly works
    When I do it with spinners, it only works sometimes?!?

    Code:
        on spnWidth changed val do
        (
            renderSceneDialog.close()
            renderWidth = spnWidth.value
        )
    
        on spnWidth buttondown  do
        (
            renderSceneDialog.close()
            renderWidth = spnWidth.value
        )
        
        on spnWidth buttonup  do
        (
            renderSceneDialog.close()
            renderWidth = spnWidth.value
        )
    I do the same for the height, but no matter if the dialog is open, closed or updated I get glitches
    Kind Regards,
    Morne

  • #2
    Hmm - spinner updates might be a nasty one - they're constantly updating so your dialog is caught in a hell of open and close as you drag over the spinner - might be better to have an overall apply button for the ui so it's a single command rather than a constant bombardment of them?

    Comment


    • #3
      Try using the 'entered' event to trigger the update:
      Code:
      (
      	rollout rSize "Render Size" width:140 height:65
      	(
      		on rSize open do
      		(
      			rSize.rWidth_sp.value = renderWidth
      			rSize.rHeight_sp.value = renderHeight
      		)
      		
      		spinner rWidth_sp " Width:" pos:[35,10]  width:80 range:[1,10000,0] type:#integer
      		spinner rHeight_sp " Height:" pos:[35,35]  width:80 range:[1,10000,0] type:#integer
      		
      		on rWidth_sp entered do
      		(
      			renderSceneDialog.close()
      			renderWidth = rWidth_sp.value
      		)
      		on rHeight_sp entered do
      		(
      			renderSceneDialog.close()
      			renderHeight = rHeight_sp.value
      		)
      	)
      	createDialog rSize
      )
      John is right though, it can be difficult to get the right value if the user 'spins' to enter a value. A plain textBox would be an alternative if you can't get it working reliably.
      Dan Brew

      Comment


      • #4
        Hmmm thanks John and Dan

        That gave me an Idea. Instead of updating the output "realtime", I'm just going to do it at the end when the user click a button. Will also be a lot less code
        Kind Regards,
        Morne

        Comment


        • #5
          Yeah, it's not as if renderwidth is something you'd be scrubbing up and down to try and find the right spot either - most people have an exact idea of what they want and punch it in right away.

          Comment

          Working...
          X