Author Topic: WM PDK 2.3 Build Status on Device  (Read 1987 times)

0 Members and 1 Guest are viewing this topic.

CKlosters

  • World Machine Veteran
  • ***
  • Posts: 20
    • View Profile
WM PDK 2.3 Build Status on Device
« on: January 31, 2013, 10:20:17 AM »
There used to be a pstate member variable on the device to check what render state was being used by WM
I can't find it anymore in the 2.3 PDK. Can I still access that, or has it been replaced with a get function?

I used it to check if an export node was valid for rendering something to disk based on a build (in the Activate function).
In Preview mode, the export was skipped. Otherwise it would continue to the output function.

Is there any replacement for that?

Or is there a better way to render something to disk based on a normal build? The default file export seems to do it (save the file every time the world machine is being build).

Hope someone can help!

Coen

Remnant

  • Author
  • World Machine Guru
  • *****
  • Posts: 2311
    • View Profile
    • http://www.world-machine.com/
Re: WM PDK 2.3 Build Status on Device
« Reply #1 on: January 31, 2013, 12:59:57 PM »
Hi there,

In 2.3 the pstate has been changed slightly and moved to the BuildContext and renamed to be more clear -- now you can simply check the "export_outputs" member in the context provided to your activate function. If this is true, it is a final build and you should export your results.
-- Stephen Schmitt
- Creator of World Machine

CKlosters

  • World Machine Veteran
  • ***
  • Posts: 20
    • View Profile
Re: WM PDK 2.3 Build Status on Device
« Reply #2 on: February 01, 2013, 01:56:40 AM »
Thanks Remnant,

that was exactly the answer I was looking for. Almost there porting all our plugins to 2.3.
Have to say it was easier than expected. Most name changes make sense and I'm glad you decided to use smart pointers.

Cheers Coen