Matches, or copies, the attributes of a source object to a target object or an array of target objects. If the source object is not specified, the attributes of the target object(s) will be reset to Rhino's default object attributes.
rhinoscriptsyntax.MatchObjectAttributes(target_ids, source_id=None)
rhinoscript.object.MatchObjectAttributes(target_ids, source_id=None)
target_ids |
Required. String, Guid or List of Guids. The identifier(s) of the target object(s). |
source_id |
Optional. String or Guid. The identifier of the source object. If the source object is not specified, the attributes of the target object(s) will be reset to Rhino's default object attributes. |
Number |
The number of objects whose attributes were modified if successful. |
import rhinoscriptsyntax as rs
targets = rs.GetObjects("Select objects")
if targets:
source = rs.GetObject("Select object to match")
if source: rs.MatchObjectAttributes( targets, source )