Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4148

Equivalent rs.MatchObjectAttributes in RhinoCommon?

$
0
0

What is the simplest way of copying all attributes from one object to another with RhinoCommon ?

I tried the following (with Python), but it seems not to produce any change:

import Rhino

go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select first object")
go.Get()
object1 = go.Object(0).Object()

go = Rhino.Input.Custom.GetObject()
go.SetCommandPrompt("Select second object")
go.DisablePreSelect()
go.Get()
object2 = go.Object(0).Object()

object1.Attributes = object2.Attributes.Duplicate()

3 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4148

Trending Articles