formZ SDK | 5.0 API Reference | Project | Modeling | Rendering | Render Materials

fz_rmtl_iface_pview_refresh

Description

This function is intended to be only called from the fuim template code of a Surface Style Representation plugin.
It forces the preview in the Surface Style Parameters dialog to be re-rendered, if a parameter of the surface style representation has changed. Ususally this mechanism is automated. However, certain custom items and button hits in the template created by the surface style representation may not trigger this automated re-render. In this case, calling this api function will do the job. Note, that the re-render does not occur in this function. It simply marks the preview as dirty. In the next dialog refresh event cycle, the surface style parameters are compared to the previously stored parameters, and if one has changed. the preview is re-rendered. An example for the use of this function would be in the action FZ_FUIM_ACTN_HIT in the item function associated with a button which, when hit, changes a parameter of the surface style.

Plugin Prototype

fzrt_error_td fz_rmtl_iface_pview_refresh(

fz_fuim_tmpl_ptr

fuim_tmpl )

Parameters

fuim_tmpl [Input]

pointer to fuim template.

Returns

Error codes.

Availability

6.1.0.0

Plugin Example

short my_srep_item_button_func(fz_fuim_tmpl_ptr fuim_tmpl, fzrt_int action, short item_id, void *func_data, fz_fuim_type_td *rv_data) { short rv = FALSE;
switch (action) { case FZ_FUIM_ACTN_HIT :
... // some code that changes a surface style parameter
// FORCE THE REFRESH OF THE PREVIEW fz_rmtl_iface_pview_refresh(fuim_tmpl); rv = TRUE; break;
} return(rv); }

Function Set

fz_rmtl_fset


Defined in

fz_rmtl_api.h