• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to listen for BakingProcessEnded event?

Explorer ,
Jul 17, 2023 Jul 17, 2023

Copy link to clipboard

Copied

Hi, 

Sorry if this is an easy question, but how do I listen for 'BakingProcessEnded' from Event.Py in my own python script? 

From the documentation I havent been able to deduce what I actually need to add to get a function to run when that even is triggered. 

Could someone break this down for me please? 

Thanks! 
Graeme

TOPICS
Scripting

Views

165

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Jul 17, 2023 Jul 17, 2023

In your python script:

import substance_painter.event as spevent

def do_stuff(*args):
    # do stuff here

spevent.DISPATCHER.connect_strong(
    spevent.BakingProcessEnded, do_stuff
)

Votes

Translate

Translate
Community Beginner ,
Jul 17, 2023 Jul 17, 2023

Copy link to clipboard

Copied

In your python script:

import substance_painter.event as spevent

def do_stuff(*args):
    # do stuff here

spevent.DISPATCHER.connect_strong(
    spevent.BakingProcessEnded, do_stuff
)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 18, 2023 Jul 18, 2023

Copy link to clipboard

Copied

LATEST

Amazing, thank you so much! 

As it turned out, I nearly had it correct - but I had a third variable after "do stuff" where I thought I had to write "any" or the status that I wanted to watch for. 

I really appreciate your help! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources