snnib.blender.operators

operators used within the [blender](https://www.blender.org/) UI

  • defines and registers various operators that can be used to generate a SNNIB network

Exceptions

Classes
  • SNNIB_OT_build_snn – operator to build a SNNIB network

  • SNNIB_OT_make_template_neuron – operator to generate a template neuron

  • SNNIB_OT_init_geo_nodes – operator to initialize the geo nodes node trees needed in SNNIB

  • SNNIB_OT_init_shader_nodes – operator to initialize the shader nodes node trees needed in SNNIB

Functions

Other Objects

Functions

register()

unregister()

Classes

SNNIB_OT_build_snn(*args, **kwargs)

operator to build a SNN with the current user settings

SNNIB_OT_init_geo_nodes(*args, **kwargs)

initializes all geometry nodes node trees needed for the add-on to work

SNNIB_OT_init_shader_nodes(*args, **kwargs)

initializes all shader nodes node trees needed for the add-on to work

SNNIB_OT_make_template_neuron(*args, **kwargs)

operator to create a template neuron

class snnib.blender.operators.SNNIB_OT_build_snn(*args: Any, **kwargs: Any)[source]

operator to build a SNN with the current user settings

  • see self.execute()

Attributes

Inferred Attributes

Methods
  • execute()

Dependencies
  • bpy

  • logging

execute(context)[source]

builds the SNNIB network

  • called whenever the respective button is clicked

  • will
    • read the input specified in the UI panel
      • network_container

      • template_neuron

      • network_file

    • initialize a network.Network

    • setup the container

    • draw the neurons

    • draw the synapses

Parameters
  • context
    • the current context

    • not used

Raises

Returns
  • {‘FINISHED’}

class snnib.blender.operators.SNNIB_OT_init_geo_nodes(*args: Any, **kwargs: Any)[source]

initializes all geometry nodes node trees needed for the add-on to work

  • see self.execute()

Attributes

Inferred Attributes

Methods
  • execute()

Dependencies
  • bpy

  • logging

execute(context)[source]

creates geo nodes node trees needed for SNNIB

  • will also register the shader nodes
    • geo nodes use the shader nodes internally

Parameters
  • context
    • the current context

    • not used

Raises

Returns
  • {‘FINISHED’}

class snnib.blender.operators.SNNIB_OT_init_shader_nodes(*args: Any, **kwargs: Any)[source]

initializes all shader nodes node trees needed for the add-on to work

  • see self.execute()

Attributes

Inferred Attributes

Methods
  • execute()

Dependencies
  • bpy

  • logging

execute(context)[source]

creates shader nodes node trees needed for SNNIB

Parameters
  • context
    • the current context

    • not used

Raises

Returns
  • {‘FINISHED’}

class snnib.blender.operators.SNNIB_OT_make_template_neuron(*args: Any, **kwargs: Any)[source]

operator to create a template neuron

  • see self.execute()

Attributes

Inferred Attributes

Methods
  • execute()

Dependencies
  • bpy

  • logging

execute(context)[source]

creates template neuron

Parameters
  • context
    • the current context

    • not used

Raises

Returns
  • {‘FINISHED’}