• Welcome to World Machine Community. Please login or sign up.
September 17, 2019, 05:45:56 am


Read the Development Diary for an inside look at World Machine's progress!

problem storing preview state in custom output node

Started by CKlosters, August 22, 2012, 02:42:30 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



I'm building a new export operator that can write out either tiled or single images.
All works fine except the preview.

I'm calling: StoreOutputContents(output_set, output, P_PREVIEW); at the end of my activate function.
This works well the the moment the node is connected for the first time,
but after I change one of my parameters on the node itself and press OK, the node status turns red.
It doesn't enter the activate code block at that point. By changing any of the settings on nodes that lead up to the export, the status turns yellow (which is okay).
Also, by changing any of the parameters on the node, the data temporarely cooks. It's only when I press OK, that my node 'errors' (turns red)
Is there any reason for this behaviour or am I doing something wrong?


Is there someone that can help me out with this problem?
Managed to get the node export both RGB images and height maps (regular and tiled) but am unable to get the preview right.

The activate call looks like this:

bool GFileOut::Activate(BuildContext &context)
HField *output = NULL;

output = HF(RetrieveData(0, context));
if (!output)
return false;

OutputSet output_set(output);
if (context.pstate != P_PREVIEW && GEX_EXPORT_NODE)
GFileOut::EXPORT_STATUS = true;
doOutput(output_set, OUTPUT_NORMAL);

// Store our output content
if (output_set.num() > 0)
StoreOutputContents(output_set, output, context.pstate);

return true;

I assume the isExporting call has nothing to do with the preview?

Any help would be appreciated!

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S save/post or ALT+P preview