TOC PREV NEXT INDEX

OMget_obj_propOMget_obj_ipropOMget_obj_rpropOMget_obj_spropOMset_obj_propOMset_obj_ipropOMset_obj_rpropOMset_obj_sprop

Synopsis


OMobj_id _OMget_obj_prop (object_id,__property,__0 _);
int _OMget_obj_iprop (object_id, _property,__int _*ival);
int _OMget_obj_rprop (object_id, _property,__double__*rval);
int _OMget_obj_sprop (object_id, _property,__char _**sval, maxlen);
int _OMset_obj_iprop (object_id, _property,__int__ival);
int _OMset_obj_rprop (object_id, _property,__double _rval);
int _OMset_obj_sprop (object_id, _property,__const char _*sval);
OMobj_id__object_id;
OMobj_name _property;

Description

These routines get and set an object's property.OMget_obj_prop gets the id of a property. You can then call OMget_data_type to determine the property's data type, then OMget_obj_val and OMset_obj_val to get and set the property's value.Alternatively, you can call one of the other routines, which combine these operations for particular data types.
These routines...
get and set the value of...
OMget_obj_iprop OMset_obj_iprop
An integer property
OMget_obj_rprop OMset_obj_rprop
A floating-point property
OMget_obj_sprop OMset_obj_sprop
A character-string property

Arguments

object_id
The id of an object.
property
The name of a property.AVS/Express-supplied properties, such as NEx and struct_name, have predefined names. The Network Editor names are defined in avs/ne_om.h . The OM names are defined in avs/om_att.h and avs/om_type.h .Here are some commonly referenced property names and their data types. AVS/Express performs numeric data-type conversion, so, for example, you could refer to NE_name_NEheight in a call to OMget_obj_iprop even though it is defined to have a real value.
Property name
Data type
OM_prop_val_state
int
NE_name_NEdisplayMode
string
NE_name_NEx
real
NE_name_NEy
real
NE_name_NEwidth
real
NE_name_NEheight
real
ival rval
In one of the get routines, an output argument containing the property's value.In one of the set routines, an input argument specifying the property's new value.
sval
This value is passed to either OMget_str_val or OMset_str_val.If you are using OMget_obj_prob, sval is an output argument containing the string. AVS/Express either allocates space for the string or places the array in an address you specify:
If sval is...
then AVS/Express...
NULL
Allocates space for the string using malloc and returns the string's address in value. AVS/Express ignores the maxlen argument.After processing the string, you must free the space with the C library routine free (not ARRfree).
an address
Writes the string to the address pointed to by sval . The maxlen argument indicates the maximum number of characters to write.
If you are using OMset_obj_prob, sval is an input argument specifying the address of the new value.
maxlen
This parameter applies to OMget_obj_prob only. It is integer that is passed to OMget_str_val, and it indicates the maximum number of bytes to get. This argument is ignored if sval is a NULL pointer.

Returned value

The status code. See Status and Interuppt conrtrols in the Using AVS/Express manual

Examples


/* Get object var1_id's coordinates. */
OMobj_id _var1_id;
int status;
int var1_x, var1_y;
...
status = OMget_obj_iprop(var1_id, NE_name_NEx, &var1_x);
status = OMget_obj_iprop(var1_id, NE_name_NEy, &var1_y);

See Also

none.

TOC PREV NEXT INDEX