NetworkArtist
- class compas_blender.artists.NetworkArtist(*args, **kwargs)[source]
Bases:
compas_blender.artists.artist.BlenderArtist
,compas.artists.networkartist.NetworkArtist
Artist for COMPAS network objects.
- Parameters
network (
compas.datastructures.Network
) – A COMPAS network.collection (str or
bpy.types.Collection
) – The name of the collection the object belongs to.nodes (list of int, optional) – A list of node identifiers. Default is
None
, in which case all nodes are drawn.edges (list, optional) – A list of edge keys (as uv pairs) identifying which edges to draw. The default is
None
, in which case all edges are drawn.nodecolor (rgb-tuple or dict of rgb-tuples, optional) – The color specification for the nodes.
edgecolor (rgb-tuple or dict of rgb-tuples, optional) – The color specification for the edges.
show_nodes (bool, optional)
show_edges (bool, optional)
- Attributes
nodecollection (
bpy.types.Collection
) – The collection containing the nodes.edgecollection (
bpy.types.Collection
) – The collection containing the edges.nodelabelcollection (
bpy.types.Collection
) – The collection containing the node labels.edgelabelcollection (
bpy.types.Collection
) – The collection containing the edge labels.
Methods
build
(item, **kwargs)Build an artist corresponding to the item type.
build_as
(item, artist_type, **kwargs)clear
()Delete all objects created by the artist.
draw
([nodes, edges, nodecolor, edgecolor])Draw the network.
draw_collection
(collection)draw_edgelabels
([text, color])Draw labels for a selection of edges.
draw_edges
([edges, color])Draw a selection of edges.
draw_nodelabels
([text, color])Draw labels for a selection nodes.
draw_nodes
([nodes, color])Draw a selection of nodes.
get_artist_cls
(data, **kwargs)redraw
()register
(item_type, artist_type)