Model.morphconnstodoms#
- Model.morphconnstodoms(collection, retain_handles, create_type)#
This function will create a general domain for each of the connectors on the
collection. Each general domain will contain all of the elements of the associated connector regardless of their type.- Parameters:
collection (Collection) – The collection containing the input connector entities.
retain_handles (int) –
0 - Do not retain handles
1 - Retain handles
create_type (int) –
0 - Create as normal general domain
1 - Create as independent domain
2 - Create as secondary domain
3 - Create as main domain
4 - Create as cluster domain
If
create_type=0is specified, the domain is created as a general domain, which means that no handles will be created for it and it will not share the same behavior as any 1D domains in the model. If one of the other options is selected, the general domain will have handles created for it in the same way that handles are created for 1D domains of the selected type. The general domain will also have the same behavior as 1D domains of the selected type (independent, main, secondary, cluster).
Example#
Create cluster type domains for all connectors in the model#import hm import hm.entities as ent model = hm.Model() model.morphconnstodoms( collection=hm.Collection(model, ent.Connector), retain_handles=0, create_type=4 )