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.

Attributes

edgecollection

edgelabelcollection

nodecollection

nodelabelcollection

Inherited Attributes

AVAILABLE_CONTEXTS

CONTEXT

ITEM_ARTIST

collection

default_edgecolor

default_edgewidth

default_nodecolor

default_nodesize

edge_color

edge_text

edge_width

edges

network

node_color

node_size

node_text

node_xyz

nodes

Methods

clear_edgelabels

clear_edges

clear_nodelabels

clear_nodes

draw

Draw the network.

draw_edgelabels

Draw labels for a selection of edges.

draw_edges

Draw a selection of edges.

draw_nodelabels

Draw labels for a selection nodes.

draw_nodes

Draw a selection of nodes.

Inherited Methods

build

Build an artist corresponding to the item type.

build_as

clear

draw_collection

redraw

register