Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => [Max] Resolved Bugs => Topic started by: 3dwannab on 2017-01-19, 13:52:07

Title: Maxscript - Stopping render and restarting doesn't work
Post by: 3dwannab on 2017-01-19, 13:52:07
Code: [Select]
viewport.ResetAllViews() --resets to Max Standard
viewport.setGridVisibility #all false
max tool zoomextents all
viewport.activeViewportEx 2
actionMan.executeAction 0 "40406"  -- Views: Extended Views
viewport.activeViewportEx 3

fn stopCoronaIR_fn =
(
   if (classof renderers.current == CoronaRenderer) AND CoronaRenderer.CoronaFp.getRenderType() == 2 then -- docked type
   (
      CoronaRenderer.CoronaFp.stopRender()
      )
   )
stopCoronaIR_fn ()

CoronaRenderer.CoronaFp.startInteractiveDocked()

So the above code doesn't work in the second time of running. First will start. Second should stop and restart but it's not working and it seems to lock the listener also.


I want to easily stop the docked render and start it for the sake of a script I'm writing. I was hoping not to have to create a timer to do restart after I stop it. Reparsing doesn't work for my needs.


But this is just a hack for me to rename maps in the slate material editor while an IR renderer is working. Stop it, rename maps, restart it is what I thought needs to be done to rename them successfully.


Sometimes my script renames the SME nodes, sometimes not. This is definitely linked to IR being active.
Title: Re: Maxscript - Stopping render and restarting doesn't work
Post by: Ondra on 2017-04-01, 23:31:07
this should be fixed tranks to recent maxscript IR fixes. Can you try it just to be sure?
Title: Re: Maxscript - Stopping render and restarting doesn't work
Post by: 3dwannab on 2017-04-02, 00:41:52
Yip, case closed. :)
Title: Re: Maxscript - Stopping render and restarting doesn't work
Post by: 3dwannab on 2017-04-02, 01:50:25
Nope. Sorry about that.


Just keep evaulating this stripped down code:
Code: [Select]
CoronaRenderer.CoronaFp.stopRender()
CoronaRenderer.CoronaFp.startInteractiveDocked()


It's stop and starts the render. When it should in theory stop and start every time.


Here's another variation to test:
Code: [Select]
if CoronaRenderer.CoronaFp.stopRender() == 2 then CoronaRenderer.CoronaFp.startInteractiveDocked() else CoronaRenderer.CoronaFp.stopRender() ; CoronaRenderer.CoronaFp.startInteractiveDocked()
Title: Re: Maxscript - Stopping render and restarting doesn't work
Post by: Ondra on 2019-01-13, 15:49:50
Can you try it now? Now it should be definitely fixed ;) (corona v3)
Title: Re: Maxscript - Stopping render and restarting doesn't work
Post by: 3dwannab on 2019-05-03, 16:40:27
Sorry for been such a slow coach.


it does now. Work that is :)


(https://i.imgur.com/TA4uRQn.jpg)