Model.morphhandlecreatenodes#

Model.morphhandlecreatenodes(collectionnode, dcollectionhandle, domain, name)#

Creates handles at nodes on collection on domain.

Parameters:
  • collectionnode (Collection) – The collection containing the node entities to create the handle entities.

  • dcollectionhandle (Collection) – The collection containing the handle entities. The collection may be empty.

  • domain (Entity) – The entity domain.

  • name (hwString) – Name of handle(s) to be created.

Examples#

Create handles on the specified domain at the nodes on the mark with dependencies on the handles on the collection#
import hm
import hm.entities as ent

model = hm.Model()

model.morphhandlecreatenodes(
    collectionnode=hm.CollectionByInteractiveSelection(model, ent.Node),
    dcollectionhandle=hm.Collection(model, ent.Handle, populate=False),
    domain=ent.Domain(model, 1),
    name="bob",
)

Note

The name does not need to be unique since this function will create a unique name for each new handle by adding numbers after the name.