formZ SDK | 5.0 API Reference | Project | File Formats | Structured File Translator | Data Model
Description
Adds an entry to a style table. This will check the surface style name for a matching entry. If one is found, its id will be returned. Otherwise a new entry will be created and the new entry's id will be returned. This function will also add new surface styles to the project's surface style palette
Plugin Prototype
fzrt_error_td fz_ffmt_data_model_styletab_add(
fzrt_int | windex, |
styletab, | |
filetab, | |
char * | name, |
double | ambient, |
double | diffuse, |
double | specular, |
double | spec_expo, |
double | refl, |
double | transp, |
double | refr, |
spec_col, | |
diff_col, | |
double | bmp_amp, |
fzrt_int | color, |
fzrt_int | trans, |
fzrt_int | bump, |
fzrt_int * | id ) |
Parameters
windex [Input]
project window index
styletab [Input]
The style table.
filetab [Input]
The texture file table.
name [Input]
surface style name.
ambient [Input]
ambient reflection factor.
diffuse [Input]
diffuse reflection factor.
specular [Input]
specular reflection factor.
spec_expo [Input]
specular reflection exponent.
refl [Input]
reflectivity factor.
transp [Input]
transparency factor.
refr [Input]
index of refraction.
spec_col [Input]
specular color.
diff_col [Input]
plain surface color.
bmp_amp [Input]
bump map amplitude.
color [Input]
Texture file table entry id of the color texture map. 0 If no color texture.
trans [Input]
Texture file table entry id of the transparency texture map. 0 If no transparency texture.
bump [Input]
Texture file table entry id of the bump texture map. 0 If no bump texture.
id [Result]
The id of the created style table entry.
Returns
FZRT_NOERR on success. An error otherwise.
Availability
5.0.0.0
Function Set
Defined in