Isotropix Forums

Updating Clarisse scene while in Tkinter GUI?

Clarisse Scripting related topics

Updating Clarisse scene while in Tkinter GUI?

Unread postby atnreg » Thu May 18, 2017 12:47 pm

Hi!

I have successfully managed to use Tkinter as GUI for Clarisse script but anything I change from those buttons will not update in Clarisse until I close the TKinter window. I have even tried to make new thread but without success.

So, could some Python/Clarisse guru tell me if that is even possible? :)

What I mean is that I can press a button in Tkinter GUI and that can manipulate some item in Clarisse but the change will not be seen until I close that Tkinter window.
Is it possible to somehow 'refresh' Clarisse items/scene while in Tkinter mainloop() and events?

This may be stupid question and totally impossible but I'm still quite new with Python so I really don't know :)
If that does not work, any tips/workarounds are very welcome!

Thank you very much!

Antti
Intel i7(6-core),32GB RAM,NVIDIA GTX690 (2GPU)+GTX Titan Black,Win10Pro 64bit
Clarisse 3.5,Blender,ZBrush 4R8,(3D-Coat,Lightwave+Octane...)
Clarisse since 2016-09-29 (Py 2017-01-04), Python since 2016-11-10
I do all 3D stuff for fun, no business
atnreg
 
Posts: 231
Joined: Mon Sep 19, 2016 5:20 pm
Location: Helsinki, Finland

Re: Updating Clarisse scene while in Tkinter GUI?

Unread postby bvaldes » Thu May 18, 2017 5:05 pm

Hi,

You can use this command:

python code

ix.application.check_for_events()

This function forces Clarisse to refresh. You have to set this function every time you click on a button.

Hope this help, cheers
Benoit VALDES
Isotropix
Clarisse QA
User avatar
bvaldes
 
Posts: 117
Joined: Mon Sep 26, 2016 11:44 am

Re: Updating Clarisse scene while in Tkinter GUI?

Unread postby atnreg » Thu May 18, 2017 5:36 pm

Thank you very much :)

It works in that the attributes in Clarisse change.
But Image View updates A BIT each time I press the button, then it stops updating until I press the button again.

Is there some way to ask from Clarisse if the render is still in progress and so keep calling the check_for_events() until it's done or the button is pressed again? :)

Antti
Intel i7(6-core),32GB RAM,NVIDIA GTX690 (2GPU)+GTX Titan Black,Win10Pro 64bit
Clarisse 3.5,Blender,ZBrush 4R8,(3D-Coat,Lightwave+Octane...)
Clarisse since 2016-09-29 (Py 2017-01-04), Python since 2016-11-10
I do all 3D stuff for fun, no business
atnreg
 
Posts: 231
Joined: Mon Sep 19, 2016 5:20 pm
Location: Helsinki, Finland


Return to Scripting