formZ SDK | 4.0 Call Back Reference | Surface Style Representation

# fz_srep_cbak_list_tmaps

Description

Fils in a list of tmaps (tmap_ptr). This function is called to report to formz, how many texture maps (tmaps) are used by a Surface Style Representation, and which texture maps they are. The number of texture maps is returned in the parameter ntmaps. The tmap_list array is a pre allocated array of texture maps pointers. Note, that either parameter may be passed as NULL, and, if so, must be ignored. If the tmap_list parameter is passed in, the callback fucntion should assign the the tmap pointers to their local copies of the tmaps. For example :

Plugin Prototype

fzrt_error_td fz_srep_cbak_list_tmaps(

fzrt_int | windex,
fz_rmtl_ptr | rmtl,
void * | srep_data,
fzrt_int * | ntmaps,
fz_tmap_ptr * | tmap_list,
fz_string_td * | tmap_type_name,
fz_srep_tmap_type_enum * | tmap_type )

Parameters

windex [Input]

project window index

rmtl [Input]

the surface style to which the srep belongs

srep_data [Input]

The source Surface Style Representation data.

ntmaps [Result, Optional]

The number of texture maps used by this Surface Style Representation

tmap_list [Result, Optional]

If passed in as non NULL this is an array of texture maps. For each texture map, the file location and name must be set via the api call .

tmap_type_name [Result, Optional]

If passed in as non NULL this is an array of names. For each texture map, the name of the type of texture should be set. For example "Color Map" or "Bump Map". It is ok (although not encouraged) to not set the name, in which case formZ assumes a generic type (i.e. "Texture Map")

tmap_type [Result, Optional]

If passed in as non NULL this is an array of texture map types. This information is used, for example, to substitude an new texture map from the embedded tmap of the simple srep, if the linked texture map of this srep is not found

Returns

Error codes

Availability

7.0.0.0

Plugin Example

fz_tmap_ptr my_tmap;
fz_tmap_allocate(zone_ptr,&my_tmap);
for(i = 0; i < ntmaps; i++) { ... tmap_list[i] = my_tmap; ...
}
fz_tmap_free(zone_ptr,&my_tmap);

Function Set

fz_srep_cbak_fset

Defined in

fz_srep_api.h