Layer ===== .. py:module:: rhino3dm .. py:class:: Layer .. py:method:: Layer() Layer constructor .. py:attribute:: PathSeparator .. py:attribute:: Name str: Gets or sets the name of this layer. .. py:attribute:: FullPath str: Gets the full path to this layer. The full path includes nesting information. .. py:attribute:: Id Guid: Gets or sets the ID of this layer object. You typically do not need to assign a custom ID. .. py:attribute:: Index .. py:attribute:: ParentLayerId Guid: Gets the ID of the parent layer. Layers can be organized in a hierarchical structure, in which case this returns the parent layer ID. If the layer has no parent, Guid.Empty will be returned. .. py:attribute:: IgesLevel int: Gets or sets the IGES level for this layer. .. py:attribute:: Color System.Drawing.Color: Gets or sets the display color for this layer. .. py:attribute:: PlotColor System.Drawing.Color: Gets or sets the plot color for this layer. .. py:attribute:: PlotWeight float: Gets or sets the weight of the plotting pen in millimeters. A weight of 0.0 indicates the "default" pen weight should be used. A weight of -1.0 indicates the layer should not be printed. .. py:attribute:: LinetypeIndex int: Gets or sets the line-type index for this layer. .. py:attribute:: RenderMaterialIndex int: Gets or sets the index of render material for objects on this layer that have MaterialSource() == MaterialFromLayer. A material index of -1 indicates no material has been assigned and the material created by the default Material constructor should be used. .. py:attribute:: Visible .. py:attribute:: Locked .. py:attribute:: Expanded .. py:method:: HasPerViewportSettings(viewportId) Verifies that a layer has per viewport settings. :param Guid viewportId: If not Guid.Empty, then checks for settings for that specific viewport. \ If Guid.Empty, then checks for any viewport settings. :return: True if the layer has per viewport settings, False otherwise. :rtype: bool .. py:method:: DeletePerViewportSettings(viewportId) Deletes per viewport layer settings. :param Guid viewportId: If not Guid.Empty, then the settings for that viewport are deleted. \ If Guid.Empty, then all per viewport settings are deleted. :rtype: void .. py:method:: PerViewportColor(viewportId) Gets the display color for this layer. :param Guid viewportId: If not Guid.Empty, then the setting applies only to the viewport with the specified id. :return: The display color. :rtype: System.Drawing.Color .. py:method:: SetPerViewportColor(viewportId, color) Sets the display color for this layer. :param Guid viewportId: If not Guid.Empty, then the setting applies only to the viewport with the specified id. :param System.Drawing.Color color: The display color. :rtype: void .. py:method:: DeletePerViewportColor(viewportId) Remove any per viewport layer color setting so the layer's overall setting will be used for all viewports. :param Guid viewportId: If not Guid.Empty, then the setting for this viewport will be deleted. \ If Guid.Empty, the all per viewport layer color settings will be removed. :rtype: void .. py:method:: GetPersistentVisibility() The global persistent visibility setting is used for layers whose visibility can be changed by a "parent" object. A common case is when a layer is a child layer (ParentId is not nil). In this case, when a parent layer is turned off, then child layers are also turned off. The persistent visibility setting determines what happens when the parent is turned on again. :rtype: bool .. py:method:: SetPersistentVisibility(persistentVisibility) Set the global persistent visibility setting for this layer. :rtype: void .. py:method:: UnsetPersistentVisibility() Remove any explicit persistent visibility setting from this layer :rtype: void .. py:method:: GetPersistentLocking() The persistent locking setting is used for layers that can be locked by a "parent" object. A common case is when a layer is a child layer (Layer.ParentI is not nil). In this case, when a parent layer is locked, then child layers are also locked. The persistent locking setting determines what happens when the parent is unlocked again. :rtype: bool .. py:method:: SetPersistentLocking(persistentLocking) Set the persistent locking setting for this layer :rtype: void .. py:method:: UnsetPersistentLocking() Remove any explicitly persistent locking settings from this layer :rtype: void