The ObjectAttributes type exposes the following members.
The color used to display an object is specified in one of three ways. If ColorSource is ON::color_from_layer, then the object's layer ON_Layer::Color() is used. If ColorSource is ON::color_from_object, then value of m_color is used. If ColorSource is ON::color_from_material, then the diffuse color of the object's render material is used. See ON_3dmObjectAttributes::MaterialSource() to determine where to get the definition of the object's render material.
Display order used to force objects to be drawn on top or behind each other. Larger numbers draw on top of smaller numbers.
0 = draw object in standard depth buffered order
<0 = draw object behind "normal" draw order objects
>0 = draw object on top of "normal" draw order objects
number of groups object belongs to.
A mapping from any plugin source is associated with these attributes Need to do this here to respond correctly to ModifyObjectAttributes event
Gets true if this class has any custom information attached to it through UserData.(Inherited from CommonObject.)
Use this query to determine if an object is part of an instance definition.
Tests an object to see if it is valid.(Inherited from CommonObject.)
Gets or sets an associated layer index.
Layer definitions in an OpenNURBS model are stored in a layer table. The layer table is conceptually an array of ON_Layer classes. Every OpenNURBS object in a model is on some layer. The object's layer is specified by zero based indicies into the ON_Layer array.
Gets or sets the linetype index.
Linetype definitions in an OpenNURBS model are stored in a linetype table. The linetype table is conceptually an array of ON_Linetype classes. Every OpenNURBS object in a model references some linetype. The object's linetype is specified by zero based indicies into the ON_Linetype array.
Index 0 is reserved for continuous linetype (no pattern).
The Linetype used to display an object is specified in one of two ways. If LinetypeSource is ON::linetype_from_layer, then the object's layer ON_Layer::Linetype() is used. If LinetypeSource is ON::linetype_from_object, then value of m_linetype is used.
Gets or sets the material index.
If you want something simple and fast, set the index of the rendering material.
If you are developing a high quality plug-in renderer, and a user is assigning a custom render material to this object, then add rendering material information to the MaterialRefs dictionary. Note to developers: As soon as the MaterialRefs dictionary contains items rendering material queries slow down. Do not populate the MaterialRefs dictionary when setting the MaterialIndex will take care of your needs.
Determines if the simple material should come from the object or from it's layer. High quality rendering plug-ins should use m_rendering_attributes.
An object must be in one of three modes: normal, locked or hidden. If an object is in normal mode, then the object's layer controls visibility and selectability. If an object is locked, then the object's layer controls visibility by the object cannot be selected. If the object is hidden, it is not visible and it cannot be selected.
Gets or sets an object optional text name.
More than one object in a model can have the same name and some objects may have no name.
If ON::color_from_object == ColorSource, then color is the object's display color.
Used to indicate an object has a decoration (like an arrowhead on a curve)
Every object has a Guid (globally unique identifier, also known as UUID, or universally unique identifier). The default value is Guid.Empty.
When an object is added to a model, the value is checked. If the value is Guid.Empty, a new Guid is created. If the value is not null but it is already used by another object in the model, a new Guid is created. If the value is not Guid.Empty and it is not used by another object in the model, then that value persists. When an object is updated, by a move for example, the value of ObjectId persists.
This value is the same as the one returned by object.Id.
If plot_color_from_object == PlotColorSource, then PlotColor is the object's plotting color.
The color used to plot an object on paper is specified in one of three ways. If PlotColorSource is ON::plot_color_from_layer, then the object's layer ON_Layer::PlotColor() is used. If PlotColorSource is ON::plot_color_from_object, then value of PlotColor() is used.
Plot weight in millimeters. =0.0 means use the default width <0.0 means don't plot (visible for screen display, but does not show on plot)
Starting with V4, objects can be in either model space or page space. If an object is in page space, then ViewportId is not nil and identifies the page it is on.
List of custom information that is attached to this class.(Inherited from CommonObject.)
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use sharable set of information.(Inherited from CommonObject.)
If ViewportId is nil, the object is active in all viewports. If ViewportId is not nil, then this object is only active in a specific view. This field is primarily used to assign page space objects to a specific page, but it can also be used to restrict model space to a specific view.
When a surface object is displayed in wireframe, this controls how many isoparametric wires are used. value number of isoparametric wires -1 boundary wires (off) 0 boundary and knot wires 1 boundary and knot wires and, if there are no interior knots, a single interior wire. N>=2 boundary and knot wires and (N+1) interior wires.