Skip to content

Float

Bases: Float

Source code in core/sock_float.py
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
class Float(generated.Float):

    SOCKET_TYPE = 'VALUE'

    def __init__(self,
        value   = None,
        name    : str = None,
        min     : float = -3.40282e+38,
        max     : float = 3.40282e+38,
        tip     : str = '',
        panel   : str = "",
        **props):
        """ > Float Input

        New Float input with subtype 'NONE'.

        Use methods Percentage, Factor, Angle, Time, TimeAbsolute, Distance, WaveLength, ColorTemperature or Frequency
        to create input sockets with a subtype.

        Parameters
        ----------
        value : object, default=0.0
            Default value

        name : str, default='Float'
            Input socket name

        min : float, default=-3.40282e+38
            Property min_value

        max : float, default=3.40282e+38
            Property max_value

        tip : str, default=''
            Property description

        panel : str, optional
            Panel name default="".

        props : dict
            properties


        Returns
        -------
        Float
        """
        super().__init__(value, name, min=min, max=max, tip=tip, panel=panel, **props)

    # ====================================================================================================
    # Methods

    # ----- Mix

    def mix(self, factor=None, other=None, clamp_factor=None):
        """ > Mix

        > Node Mix

        Parameters
        ----------
        factor : Float
            socket 'Factor' (Factor_Float)

        other : Socket
            socket 'B' (B_Float)

        clamp_factor : bool
            Node.clamp_factor

        Returns
        -------
        Socket
        """
        return Float(Node('Mix', {'Factor': factor, 'A': self, 'B': other}, clamp_factor=clamp_factor, data_type='FLOAT')._out)

    def color_ramp(self, stops=None, interpolation='LINEAR'):
        """ > Color Ramp

        > Node Color Ramp

        Parameters
        ----------

        stops : list[tuple[float, tuple]]
            Stops made of (float, color as tuple of floats)

        interpolation : {'EASE', 'CARDINAL', 'LINEAR', 'B_SPLINE', 'CONSTANT'}


        Returns
        -------
        Color
        """
        return ColorRamp(fac=self, stops=stops, interpolation=interpolation)._out

    # ====================================================================================================
    # Float curve

    def curve(self, factor=None, curve=None):
        """ > Node Float Curve

        A curve is defined by a list of 3-tuples (not list):

        - x (float) : x position
        - y (float) : y position
        - handle_type (str) : handle type in ('AUTO', 'AUTO_CLAMPED', 'VECTOR'), default='AUTO'

        Information
        -----------
        - Socket 'Value' : self

        Parameters
        ----------
        factor : Float
            socket 'Factor' (id: Factor)

        curve : list[tuple[float, float, str]]
            Curve points

        Returns
        -------
        Float
        """
        node = NodeCurves('Float Curve', named_sockets={'Value': self, 'Factor': factor})
        node.set_curves(curve)
        return node._out

    # ====================================================================================================
    # Operations

    # ----- Neg

    def __neg__(self):
        return self.multiply(-1)

    # ----- Abs

    def __abs__(self):
        return self.abs()

    # ----- Addition

    def __add__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(self).add(other)
        return self.add(other)

    def __radd__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).add(self)
        return self.add(other)

    def __iadd__(self, other):
        return self._jump(self.add(other))

    # ----- Subtraction

    def __sub__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(self).subtract(other)
        return self.subtract(other)

    def __rsub__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).subtract(self)
        return Float(other).subtract(self)

    def __isub__(self, other):
        return self._jump(self.subtract(other))

    # ----- Multiplication

    def __mul__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).scale(self)
        return self.multiply(other)

    def __rmul__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).scale(self)
        return self.multiply(other)

    def __imul__(self, other):
        return self._jump(self.multiply(other))

    # ----- Division

    def __truediv__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).divide(self)
        return self.divide(other)

    def __rtruediv__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).divide(self)
        return Float(other).divide(self)

    def __itruediv__(self, other):
        return self._jump(self.divide(other))

    # ----- Modulo

    def __mod__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(self).modulo(other)
        return self.modulo(other)

    def __rmod__(self, other):
        from .sock_vector import Vector
        if utils.is_vector_like(other):
            return Vector(other).modulo(self)
        return Float(other).modulo(self)

    def __imod__(self, other):
        return self._jump(self.modulo( other))

    # ----- Power

    def __pow__(self, other):
        return self.power(other)

    def __rpow__(self, other):
        return Float(other).power(self)

    def __ipow__(self, other):
        return self._jump(self.power(other))

    # ----- Operations

    def __round__(self):
        return self.round()

    def __trunc__(self):
        return self.trunc()

    def __floor__(self):
        return self.floor()

    def __ceil__(self):
        return self.ceil()

    # =============================================================================================================================
    # Comparison
    # __eq__ __ne__ __lt__ __gt__ __le__ __ge__

    def __ge__(self, other):
        return self.greater_equal(other)

    def __gt__(self, other):
        return self.greater_than(other)

    def __le__(self, other):
        return self.less_equal(other)

    def __lt__(self, other):
        return self.less_than(other)

    def __eq__(self, other):
        return self.equal(other)

    def __ne__(self, other):
        return self.not_equal(other)

    # ====================================================================================================
    # Output

    def out(self, name=None, **props):
        """ > Connect to output

        !!! important "Behavior"

            - Geometry Nodes : create a group output socket with the provided name
            - Shader : create a node AOV Output
        """
        if self._tree._btree.bl_idname == 'ShaderNodeTree' and not self._tree._is_group:
            if name is None:
                self._tree.set_thickness(self)
            else:
                self._tree.aov_output(name=name, value=self)
        else:
            super().out(name=name, **props)

    def thickness_out(self, target='ALL'):
        self._tree.set_thickness(self, target=target)

    # ====================================================================================================
    # Class test    
    # ====================================================================================================

    @classmethod
    def _class_test(cls):

        from geonodes import GeoNodes, Mesh, Layout, Float

        with GeoNodes("Float Test"):

            with Layout("Base"):
                a = Float(3.14)
                a += Float(name="Your entry")
                a *= Float(1., name="Mul (1 def)")

            with Layout("Named Attribute"):
                g = Mesh()
                g.points.A_Float = a

                b = Float("A Float") - a
                g.faces.store("Another float", b)

            with Layout("Grid Attribute"):
                vol = g.to_volume()
                vol.store_named_grid("Float A", a)

            vol.out()

_interface_socket property

Return the interface socket if exists

An interface socket exists when the socket a tree input or output socket or when it is the socket of a group

Returns:

Type Description
Interface Socket

_name property

Return the name or the label

Returns:

Type Description
str

default is ""

_panel_name property

Return the name of the panel

Returns:

Type Description
str

default is ""

is_grid property

bool property

Returns True if socket is a grid (inferred_structure_type == 'GRID').

node_color property writable

Node color

Returns:

Type Description
SysColor

node_label property writable

Node Label

Returns:

Type Description
str

Angle(value=0.0, name='Angle', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Angle Input

New Float input with subtype 'ANGLE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Angle`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
@classmethod
def Angle(cls,
    value: object = 0.0,
    name: str = 'Angle',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Angle Input

    New Float input with subtype 'ANGLE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Angle`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='ANGLE')

ColorTemperature(value=0.0, name='ColorTemperature', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

ColorTemperature Input

New Float input with subtype 'COLOR_TEMPERATURE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`ColorTemperature`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
@classmethod
def ColorTemperature(cls,
    value: object = 0.0,
    name: str = 'ColorTemperature',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > ColorTemperature Input

    New Float input with subtype 'COLOR_TEMPERATURE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`ColorTemperature`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='COLOR_TEMPERATURE')

Constant(value, user_label='') classmethod

Create an input socket from a constant Node.

Parameters:

Name Type Description Default
value Any

constant default value default=None.

required
user_label str

socket name (used to rename nodes if not None) default="".

''
Source code in core/socket_class.py
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
@classmethod
def Constant(cls, value: None, user_label: str = ""):
    """ Create an input socket from a constant Node.

    Parameters
    ----------
    value : Any, optional
        constant default value default=None.

    user_label : str, optional
        socket name (used to rename nodes if not None) default="".

    """

    # ---------------------------------------------------------------------------
    # Ensure array
    # ---------------------------------------------------------------------------

    def get_shaped(v, *shapes):
        r = np.ravel(v)
        shape = np.shape(r)
        if shape in shapes:
            return tuple(r)

        if shape == (1,):
            return tuple(np.resize(r, shapes[0]))

        raise NodeError(
            f"The value <{v}> can't be transformed in a valid initial value for {SocketType(cls.SOCKET_TYPE).class_name}."
        )

    # ---------------------------------------------------------------------------
    # Does the array contain sockets
    # ---------------------------------------------------------------------------

    def has_sockets(a):
        for v in a:
            if SocketType.get_bsocket(v) is not None:
                return True
        return False

    # ---------------------------------------------------------------------------
    # Default value
    # ---------------------------------------------------------------------------

    socket_type = SocketType(cls.SOCKET_TYPE)
    if cls.SOCKET_TYPE not in ['RGBA', 'VECTOR', 'ROTATION', 'MATRIX']:
        def_val = socket_type.get_default_from_value(value)

    # ---------------------------------------------------------------------------
    # Depending on the socket type
    # ---------------------------------------------------------------------------

    if cls.SOCKET_TYPE == 'BOOLEAN':
        return Node('Boolean', boolean=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'BUNDLE':
        return Node("Combine Bundle")._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'CLOSURE':
        socket = ZoneNode.Closure().closure
        socket._use_layout = False
        return socket._ul(user_label)

    elif cls.SOCKET_TYPE == 'COLLECTION':
        return Node('Collection', collection=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'RGBA':

        if value is None:
            a = (0, 0, 0, 1)
        elif isinstance(value, str):
            #a = colors.to_color(value)
            a = SysColor(value).rgba
        else:
            a = get_shaped(value, (4,), (3,))

        if has_sockets(a):
            if Tree.is_geonodes():
                node = Node('Combine Color', {0: a[0], 1: a[1], 2:a[2]})
                if len(a) == 4:
                    node.alpha = a[3]
                return node._out._ul(user_label)
            else:
                return Node('Combine Color', {0: a[0], 1: a[1], 2:a[2]})._out._ul(user_label)

        else:
            def_val = SocketType('COLOR').get_default_from_value(a)
            if Tree.is_geonodes():
                return Node('Color', value=def_val)._out._ul(user_label)

            else:
                socket = Node('Color')._out
                socket._bsocket.default_value = def_val
                return socket._ul(user_label)

    elif cls.SOCKET_TYPE == 'IMAGE':
        return Node('Image', image=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'INT':
        return Node('Integer', integer=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MATERIAL':
        return Node('Material', material=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MATRIX':

        if value is None:
            a = (1, 0, 0, 0,   0, 1, 0, 0,   0, 0, 1, 0,   0, 0, 0, 1)
        else:
            a = get_shaped(value, (16,))

        return Node('Combine Matrix', named_sockets = {i: a[i] for i in range(16)})._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'MENU':
        return Node('Menu Switch')._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'OBJECT':
        return Node('Object', object=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'FONT':
        return cls.NewInput("Font", value)

    elif cls.SOCKET_TYPE == 'ROTATION':

        if value is None:
            a = (0, 0, 0)
        else:
            a = get_shaped(value, (3,))

        if has_sockets(a):
            return Node('Combine XYZ', x=a[0], y=a[1], z=a[2])._out.to_rotation()._ul(user_label)
        else:
            return Node('Rotation', rotation_euler=a)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'STRING':
        return Node('String', string=def_val)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'VALUE':
        node = Node('Value')
        node._bnode.outputs[0].default_value = def_val
        return node._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'VECTOR':

        if value is None:
            a = (0, 0, 0)
        else:
            a = get_shaped(value, (3,))

        if has_sockets(a):
            return Node('Combine XYZ', x=a[0], y=a[1], z=a[2])._out._ul(user_label)
        else:
            return Node('Vector', vector=a)._out._ul(user_label)

    elif cls.SOCKET_TYPE == 'GEOMETRY':
        raise NodeError(f"There is no node to create a Geometry. Use explicit constructors such as 'Mesh.Cube()', 'Curve.Spiral()' or 'Cloud.Points().")

    else:
        assert False, f"Shouldn't happen {socket_type}"

Distance(value=0.0, name='Distance', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Distance Input

New Float input with subtype 'DISTANCE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Distance`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
@classmethod
def Distance(cls,
    value: object = 0.0,
    name: str = 'Distance',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Distance Input

    New Float input with subtype 'DISTANCE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Distance`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='DISTANCE')

Empty(value=None) classmethod

Create an empty socket.

An empty socket is used temporarily as an input for nodes with dynamic sockets:

Parameters:

Name Type Description Default
value Any

default value default=None.

None
Source code in core/socket_class.py
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
@classmethod
def Empty(cls, value = None):
    """ Create an empty socket.

    An empty socket is used temporarily as an input for nodes with dynamic sockets:

    Parameters
    ----------
    value : Any, optional
        default value default=None.

    """
    socket = cls(constants.EMPTY_SOCKET)
    socket._bsocket = SocketType(cls.SOCKET_TYPE).get_default_from_value(value)
    return socket

Factor(value=0.0, name='Factor', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Factor Input

New Float input with subtype 'FACTOR'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Factor`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
@classmethod
def Factor(cls,
    value: object = 0.0,
    name: str = 'Factor',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Factor Input

    New Float input with subtype 'FACTOR'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Factor`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='FACTOR')

Frequency(value=0.0, name='Frequency', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Frequency Input

New Float input with subtype 'FREQUENCY'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Frequency`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
@classmethod
def Frequency(cls,
    value: object = 0.0,
    name: str = 'Frequency',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Frequency Input

    New Float input with subtype 'FREQUENCY'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Frequency`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='FREQUENCY')

Gabor(vector=None, scale=None, frequency=None, anisotropy=None, orientation=None, gabor_type='2D') classmethod

Node Gabor Texture

Parameters:

Name Type Description Default
vector Vector

socket 'Vector' (id: Vector)

None
scale Float

socket 'Scale' (id: Scale)

None
frequency Float

socket 'Frequency' (id: Frequency)

None
anisotropy Float

socket 'Anisotropy' (id: Anisotropy)

None
orientation Float

socket 'Orientation' (id: Orientation 2D)

None
gabor_type Literal['2D', '3D']

parameter gabor_type

'2D'

Returns:

Type Description
Float
Source code in core/generated/float.py
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
@classmethod
def Gabor(cls,
                vector: Vector = None,
                scale: Float = None,
                frequency: Float = None,
                anisotropy: Float = None,
                orientation: Float = None,
                gabor_type: Literal['2D', '3D'] = '2D'):
    """ > Node Gabor Texture

    Parameters
    ----------
    vector : Vector, optional
        socket 'Vector' (id: Vector)

    scale : Float, optional
        socket 'Scale' (id: Scale)

    frequency : Float, optional
        socket 'Frequency' (id: Frequency)

    anisotropy : Float, optional
        socket 'Anisotropy' (id: Anisotropy)

    orientation : Float, optional
        socket 'Orientation' (id: Orientation 2D)

    gabor_type : Literal['2D', '3D']
        parameter `gabor_type`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('Gabor Texture', 'gabor_type', gabor_type, 'Gabor', ('2D', '3D'))
    node = Node('Gabor Texture', {'Vector': vector, 'Scale': scale, 'Frequency': frequency, 'Anisotropy': anisotropy, 'Orientation 2D': orientation}, gabor_type=gabor_type)
    return cls(node._out)

IndexSwitch(*values, index=None, default_index=0) classmethod

Node Index Switch

with GeoNodes("IndexSwitch demo"):

    # Create some geometries
    geo    = Geometry()
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()
    cone   = Mesh.Cone()

    # Pick in this list
    pick_geo = Geometry.IndexSwitch(geo, cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

    # Plug the result to the output
    pick_geo.out()

Parameters:

Name Type Description Default
*values Any

List of Sockets to select into

()
index Integer

socket 'Index' (Index) default=None.

None
default_index int

default idex default=0.

0

Returns:

Type Description
Socket
Source code in core/socket_class.py
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
@classmethod
def IndexSwitch(cls, *values, index = None, default_index: int = 0):
    """ > Node Index Switch

    ``` python
    with GeoNodes("IndexSwitch demo"):

        # Create some geometries
        geo    = Geometry()
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()
        cone   = Mesh.Cone()

        # Pick in this list
        pick_geo = Geometry.IndexSwitch(geo, cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

        # Plug the result to the output
        pick_geo.out()
    ```

    Parameters
    ----------
    *values : Any
        List of Sockets to select into

    index : Integer, optional
        socket 'Index' (Index) default=None.

    default_index : int, optional
        default idex default=0.


    Returns
    -------
    Socket
    """
    #return IndexSwitchNode(*values, index=index, data_type=cls.input_type())._out
    return MenuNode('Index Switch', 
                    {str(i): value for i, value in enumerate(values)}, 
                    data_type=cls.SOCKET_TYPE, 
                    Index=index,
                    default_menu = default_index)._out

Input(name, panel='', halt=True) classmethod

Get an exist input socket from its name and panel.

Note

The "input" socket here is an "output" socket of the current input node

To create a input socket use NewInput.

If the 'name' argument is None, the first socket of the proper type is returned.

Raises:

Type Description
- NodeError if socket is not found and halt is requested

Parameters:

Name Type Description Default
name str | None

socket name

required
panel str

panel name default="".

''
halt bool

raises an error if not found default=True.

True

Returns:

Type Description
Socket
Source code in core/socket_class.py
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
@classmethod
def Input(cls, name: str, panel: str = "", halt: bool = True):
    """ Get an exist input socket from its name and panel.

    !!! note
        The "input" socket here is an "output" socket of the current input node

    To create a input socket use NewInput.

    If the 'name' argument is None, the first socket of the proper type is returned.

    Raises
    ------
    - NodeError if socket is not found and halt is requested

    Parameters
    ----------
    name : str | None
        socket name

    panel : str, optional
        panel name default="".

    halt : bool, optional
        raises an error if not found default=True.


    Returns
    -------
    Socket
    """
    in_node = Tree.current_tree().get_input_node()

    include = None if name is None else [name]
    bsockets = in_node.get_sockets('OUTPUT', include=include, panel=panel)

    for _, bsock in bsockets:
        if SocketType(bsock).type == cls.SOCKET_TYPE: # and utils.snake_case(sock_name) == utils.snake_case(name):
            return cls(bsock._bsocket)._ul(name)

    if halt:
        sname = "" if name is None else f" named '{name}'"
        raise NodeError(
            f"There is no {SocketType(cls.SOCKET_TYPE).class_name} input socket{sname}.\n"
            f"Available sockets are : {[bsock[0] for bsock in in_node.get_sockets('OUTPUT')]}.")

    return None

Mass(value=0.0, name='Mass', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Mass Input

New Float input with subtype 'MASS'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Mass`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
@classmethod
def Mass(cls,
    value: object = 0.0,
    name: str = 'Mass',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Mass Input

    New Float input with subtype 'MASS'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Mass`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='MASS')

MenuSwitch(named_sockets={}, default_menu=None, **sockets) classmethod

Node Menu Switch

The items of the Menu Switch node are provided in the 'items' dict.

Parameters:

Name Type Description Default
named_sockets dict

sockets to create default={}.

{}
default_menu str

default menu value default=None.

None
sockets dict

items

{}

Returns:

Type Description
Socket
Source code in core/socket_class.py
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
@classmethod
def MenuSwitch(cls, 
               named_sockets    : dict = {},
               default_menu     : str = None,
               **sockets):
    """ > Node Menu Switch

    The items of the Menu Switch node are provided in the 'items' dict.

    Parameters
    ----------
    named_sockets : dict, optional
        sockets to create default={}.

    default_menu : str, optional
        default menu value default=None.

    sockets : dict
        items


    Returns
    -------
    Socket
    """
    node = MenuNode('Menu Switch',
            named_sockets = named_sockets,
            data_type = SocketType(cls.SOCKET_TYPE).type,
            default_menu = default_menu,
            **sockets)

    return cls(node._out)

Named(name=None) classmethod

Node Named Attribute

Fixed values

Kind Name Value
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
name String

socket 'Name' (id: Name)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
@classmethod
def Named(cls, name: String = None):
    """ > Node Named Attribute

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    name : String, optional
        socket 'Name' (id: Name)


    Returns
    -------
    Float
    """
    node = Node('Named Attribute', {'Name': name}, data_type='FLOAT')
    return cls(node._out)

NamedAttribute(name=None) classmethod

Node Named Attribute

Fixed values

Kind Name Value
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
name String

socket 'Name' (id: Name)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
@classmethod
def NamedAttribute(cls, name: String = None):
    """ > Node Named Attribute

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    name : String, optional
        socket 'Name' (id: Name)


    Returns
    -------
    Float
    """
    node = Node('Named Attribute', {'Name': name}, data_type='FLOAT')
    return cls(node._out)

NewInput(name, value=None, tip='', panel='', **props) classmethod

Create an new input socket

Note

The "input" socket here is an "output" socket of the current input node

To get an existing input socket use Input.

Raises:

Type Description
- NodeError if socket is not found

Parameters:

Name Type Description Default
name str

socket name

required
value Any

default_value default=None.

None
tip str

description default="".

''
panel str: None

panel name

''

Returns:

Type Description
Socket
Source code in core/socket_class.py
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
@classmethod
def NewInput(cls,
        name: str, 
        value       = None, 
        tip: str    = "", 
        panel: str  = "", 
        **props):
    """ Create an new input socket

    !!! note
        The "input" socket here is an "output" socket of the current input node

    To get an existing input socket use Input.

    Raises
    ------
    - NodeError if socket is not found

    Parameters
    ----------
    name : str
        socket name

    value : Any, optional
        default_value default=None.

    tip : str, optional
        description default="".

    panel : str: None
        panel name


    Returns
    -------
    Socket
    """
    if value is None:
        defval = None
    else:
        defval = SocketType(cls.SOCKET_TYPE).get_default_from_value(value)
        new_props = {**props}

        if 'default' in new_props:
            new_props['default'] = defval

        elif 'default_value' in new_props:
            new_props['default_value'] = defval

        else:
            if 'default' not in constants.SOCKETS[cls.SOCKET_TYPE]['props']:
                raise NodeError(f"The {SocketType(cls.SOCKET_TYPE).class_name} socket doesn't accept a default value. Value argument <{value}> is invalid.")

            new_props['default_value'] = defval

        props = new_props

    return cls(Tree.current_tree().create_input_socket(
        SocketType(cls.SOCKET_TYPE).socket_id,
        name         = name,
        tip          = tip,
        panel        = panel,
        **props))

Noise(vector=None, scale=None, detail=None, roughness=None, lacunarity=None, distortion=None, noise_dimensions='3D', noise_type='FBM', normalize=True) classmethod

Node Noise Texture

Parameters:

Name Type Description Default
vector Vector

socket 'Vector' (id: Vector)

None
scale Float

socket 'Scale' (id: Scale)

None
detail Float

socket 'Detail' (id: Detail)

None
roughness Float

socket 'Roughness' (id: Roughness)

None
lacunarity Float

socket 'Lacunarity' (id: Lacunarity)

None
distortion Float

socket 'Distortion' (id: Distortion)

None
noise_dimensions Literal['1D', '2D', '3D', '4D']

parameter noise_dimensions

'3D'
noise_type Literal['Multifractal', 'Ridged Multifractal', 'Hybrid Multifractal', 'fBM', 'Hetero Terrain']

parameter noise_type

'FBM'
normalize bool

parameter normalize

True

Returns:

Type Description
Float
Source code in core/generated/float.py
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
@classmethod
def Noise(cls,
                vector: Vector = None,
                scale: Float = None,
                detail: Float = None,
                roughness: Float = None,
                lacunarity: Float = None,
                distortion: Float = None,
                noise_dimensions: Literal['1D', '2D', '3D', '4D'] = '3D',
                noise_type: Literal['MULTIFRACTAL', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL', 'FBM', 'HETERO_TERRAIN'] = 'FBM',
                normalize = True):
    """ > Node Noise Texture

    Parameters
    ----------
    vector : Vector, optional
        socket 'Vector' (id: Vector)

    scale : Float, optional
        socket 'Scale' (id: Scale)

    detail : Float, optional
        socket 'Detail' (id: Detail)

    roughness : Float, optional
        socket 'Roughness' (id: Roughness)

    lacunarity : Float, optional
        socket 'Lacunarity' (id: Lacunarity)

    distortion : Float, optional
        socket 'Distortion' (id: Distortion)

    noise_dimensions : Literal['1D', '2D', '3D', '4D']
        parameter `noise_dimensions`

    noise_type : Literal['Multifractal', 'Ridged Multifractal', 'Hybrid Multifractal', 'fBM', 'Hetero Terrain']
        parameter `noise_type`

    normalize : bool
        parameter `normalize`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('Noise Texture', 'noise_dimensions', noise_dimensions, 'Noise', ('1D', '2D', '3D', '4D'))
    utils.check_enum_arg('Noise Texture', 'noise_type', noise_type, 'Noise', ('MULTIFRACTAL', 'RIDGED_MULTIFRACTAL', 'HYBRID_MULTIFRACTAL', 'FBM', 'HETERO_TERRAIN'))
    node = Node('Noise Texture', {'Vector': vector, 'Scale': scale, 'Detail': detail, 'Roughness': roughness, 'Lacunarity': lacunarity, 'Distortion': distortion}, noise_dimensions=noise_dimensions, noise_type=noise_type, normalize=normalize)
    return cls(node._out)

Percentage(value=0.0, name='Percentage', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Percentage Input

New Float input with subtype 'PERCENTAGE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Percentage`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
@classmethod
def Percentage(cls,
    value: object = 0.0,
    name: str = 'Percentage',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Percentage Input

    New Float input with subtype 'PERCENTAGE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Percentage`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='PERCENTAGE')

Random(min=None, max=None, id=None, seed=None) classmethod

Node Random Value

Fixed values

Kind Name Value
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
min Float

socket 'Min' (id: Min_001)

None
max Float

socket 'Max' (id: Max_001)

None
id Integer

socket 'ID' (id: ID)

None
seed Integer

socket 'Seed' (id: Seed)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
@classmethod
def Random(cls,
                min: Float = None,
                max: Float = None,
                id: Integer = None,
                seed: Integer = None):
    """ > Node Random Value

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    min : Float, optional
        socket 'Min' (id: Min_001)

    max : Float, optional
        socket 'Max' (id: Max_001)

    id : Integer, optional
        socket 'ID' (id: ID)

    seed : Integer, optional
        socket 'Seed' (id: Seed)


    Returns
    -------
    Float
    """
    node = Node('Random Value', {'Min_001': min, 'Max_001': max, 'ID': id, 'Seed': seed}, data_type='FLOAT')
    return cls(node._out)

Switch(condition=None, false=None, true=None) classmethod

Node Switch

with GeoNodes("Switch demo"):

    # Two possible geometries
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()

    # Select
    geo = Geometry.Switch(Boolean(True, "Use Sphere"), cube, sphere)

    # To group output
    geo.out()

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
false

socket 'False' (False)

None
true

socket 'True' (True)

None

Returns:

Type Description
Socket
Source code in core/socket_class.py
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
@classmethod
def Switch(cls, condition=None, false=None, true=None):
    """ > Node Switch

    ``` python
    with GeoNodes("Switch demo"):

        # Two possible geometries
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()

        # Select
        geo = Geometry.Switch(Boolean(True, "Use Sphere"), cube, sphere)

        # To group output
        geo.out()
    ```

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    false
        socket 'False' (False)

    true
        socket 'True' (True)


    Returns
    -------
    Socket
    """
    input_type = SocketType(cls.SOCKET_TYPE).items_type
    return Node('Switch', {'Switch': condition, 'False': false, 'True': true}, input_type=input_type)._out

Time(value=0.0, name='Time', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Time Input

New Float input with subtype 'TIME'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Time`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
@classmethod
def Time(cls,
    value: object = 0.0,
    name: str = 'Time',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Time Input

    New Float input with subtype 'TIME'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Time`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='TIME')

TimeAbsolute(value=0.0, name='TimeAbsolute', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

TimeAbsolute Input

New Float input with subtype 'TIME_ABSOLUTE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`TimeAbsolute`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
@classmethod
def TimeAbsolute(cls,
    value: object = 0.0,
    name: str = 'TimeAbsolute',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > TimeAbsolute Input

    New Float input with subtype 'TIME_ABSOLUTE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`TimeAbsolute`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='TIME_ABSOLUTE')

Voronoi(vector=None, scale=None, detail=None, roughness=None, lacunarity=None, randomness=None, distance='EUCLIDEAN', feature='F1', normalize=False, voronoi_dimensions='3D') classmethod

Node Voronoi Texture

Parameters:

Name Type Description Default
vector Vector

socket 'Vector' (id: Vector)

None
scale Float

socket 'Scale' (id: Scale)

None
detail Float

socket 'Detail' (id: Detail)

None
roughness Float

socket 'Roughness' (id: Roughness)

None
lacunarity Float

socket 'Lacunarity' (id: Lacunarity)

None
randomness Float

socket 'Randomness' (id: Randomness)

None
distance Literal['Euclidean', 'Manhattan', 'Chebychev', 'Minkowski']

parameter distance

'EUCLIDEAN'
feature Literal['F1', 'F2', 'Smooth F1', 'Distance to Edge', 'N-Sphere Radius']

parameter feature

'F1'
normalize bool

parameter normalize

False
voronoi_dimensions Literal['1D', '2D', '3D', '4D']

parameter voronoi_dimensions

'3D'

Returns:

Type Description
Float
Source code in core/generated/float.py
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
@classmethod
def Voronoi(cls,
                vector: Vector = None,
                scale: Float = None,
                detail: Float = None,
                roughness: Float = None,
                lacunarity: Float = None,
                randomness: Float = None,
                distance: Literal['EUCLIDEAN', 'MANHATTAN', 'CHEBYCHEV', 'MINKOWSKI'] = 'EUCLIDEAN',
                feature: Literal['F1', 'F2', 'SMOOTH_F1', 'DISTANCE_TO_EDGE', 'N_SPHERE_RADIUS'] = 'F1',
                normalize = False,
                voronoi_dimensions: Literal['1D', '2D', '3D', '4D'] = '3D'):
    """ > Node Voronoi Texture

    Parameters
    ----------
    vector : Vector, optional
        socket 'Vector' (id: Vector)

    scale : Float, optional
        socket 'Scale' (id: Scale)

    detail : Float, optional
        socket 'Detail' (id: Detail)

    roughness : Float, optional
        socket 'Roughness' (id: Roughness)

    lacunarity : Float, optional
        socket 'Lacunarity' (id: Lacunarity)

    randomness : Float, optional
        socket 'Randomness' (id: Randomness)

    distance : Literal['Euclidean', 'Manhattan', 'Chebychev', 'Minkowski']
        parameter `distance`

    feature : Literal['F1', 'F2', 'Smooth F1', 'Distance to Edge', 'N-Sphere Radius']
        parameter `feature`

    normalize : bool
        parameter `normalize`

    voronoi_dimensions : Literal['1D', '2D', '3D', '4D']
        parameter `voronoi_dimensions`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('Voronoi Texture', 'distance', distance, 'Voronoi', ('EUCLIDEAN', 'MANHATTAN', 'CHEBYCHEV', 'MINKOWSKI'))
    utils.check_enum_arg('Voronoi Texture', 'feature', feature, 'Voronoi', ('F1', 'F2', 'SMOOTH_F1', 'DISTANCE_TO_EDGE', 'N_SPHERE_RADIUS'))
    utils.check_enum_arg('Voronoi Texture', 'voronoi_dimensions', voronoi_dimensions, 'Voronoi', ('1D', '2D', '3D', '4D'))
    node = Node('Voronoi Texture', {'Vector': vector, 'Scale': scale, 'Detail': detail, 'Roughness': roughness, 'Lacunarity': lacunarity, 'Randomness': randomness}, distance=distance, feature=feature, normalize=normalize, voronoi_dimensions=voronoi_dimensions)
    return cls(node._out)

Wavelength(value=0.0, name='Wavelength', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO') classmethod

Wavelength Input

New Float input with subtype 'WAVELENGTH'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Wavelength`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`

Returns:

Type Description
Float
Source code in core/generated/float.py
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
@classmethod
def Wavelength(cls,
    value: object = 0.0,
    name: str = 'Wavelength',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
     ):
    """ > Wavelength Input

    New Float input with subtype 'WAVELENGTH'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Wavelength`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')


    Returns
    -------
    Float
    """
    return cls(value=value, name=name, min=min, max=max, tip=tip, panel=panel,
        optional_label=optional_label, hide_value=hide_value, hide_in_modifier=hide_in_modifier,
        default_attribute=default_attribute, shape=shape, subtype='WAVELENGTH')

WhiteNoise(vector=None, noise_dimensions='3D') classmethod

Node White Noise Texture

Parameters:

Name Type Description Default
vector Vector

socket 'Vector' (id: Vector)

None
noise_dimensions Literal['1D', '2D', '3D', '4D']

parameter noise_dimensions

'3D'

Returns:

Type Description
Float
Source code in core/generated/float.py
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
@classmethod
def WhiteNoise(cls,
                vector: Vector = None,
                noise_dimensions: Literal['1D', '2D', '3D', '4D'] = '3D'):
    """ > Node White Noise Texture

    Parameters
    ----------
    vector : Vector, optional
        socket 'Vector' (id: Vector)

    noise_dimensions : Literal['1D', '2D', '3D', '4D']
        parameter `noise_dimensions`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('White Noise Texture', 'noise_dimensions', noise_dimensions, 'WhiteNoise', ('1D', '2D', '3D', '4D'))
    node = Node('White Noise Texture', {'Vector': vector}, noise_dimensions=noise_dimensions)
    return cls(node._out)

__init__(value=None, name=None, min=-3.40282e+38, max=3.40282e+38, tip='', panel='', **props)

Float Input

New Float input with subtype 'NONE'.

Use methods Percentage, Factor, Angle, Time, TimeAbsolute, Distance, WaveLength, ColorTemperature or Frequency to create input sockets with a subtype.

Parameters:

Name Type Description Default
value object

Default value

0.0
name str

Input socket name

'Float'
min float

Property min_value

-3.40282e+38
max float

Property max_value

3.40282e+38
tip str

Property description

''
panel str

Panel name default="".

''
props dict

properties

{}

Returns:

Type Description
Float
Source code in core/sock_float.py
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
def __init__(self,
    value   = None,
    name    : str = None,
    min     : float = -3.40282e+38,
    max     : float = 3.40282e+38,
    tip     : str = '',
    panel   : str = "",
    **props):
    """ > Float Input

    New Float input with subtype 'NONE'.

    Use methods Percentage, Factor, Angle, Time, TimeAbsolute, Distance, WaveLength, ColorTemperature or Frequency
    to create input sockets with a subtype.

    Parameters
    ----------
    value : object, default=0.0
        Default value

    name : str, default='Float'
        Input socket name

    min : float, default=-3.40282e+38
        Property min_value

    max : float, default=3.40282e+38
        Property max_value

    tip : str, default=''
        Property description

    panel : str, optional
        Panel name default="".

    props : dict
        properties


    Returns
    -------
    Float
    """
    super().__init__(value, name, min=min, max=max, tip=tip, panel=panel, **props)

_create_input_socket(value=0.0, name='Float', min=-3.40282e+38, max=3.40282e+38, tip='', panel='', optional_label=False, hide_value=False, hide_in_modifier=False, default_attribute='', shape='AUTO', subtype='NONE') classmethod

Float Input

New Float input with subtype 'NONE'.

Parameters:

Name Type Description Default
value object

Default value

`0.0`
name str

Input socket name

`Float`
min float

Property min_value

`-3.40282e+38`
max float

Property max_value

`3.40282e+38`
tip str

Property description

`''`
panel str

Panel name

``
optional_label bool

Property optional_label

`False`
hide_value bool

Property hide_value

`False`
hide_in_modifier bool

Property hide_in_modifier

`False`
default_attribute str

Property default_attribute_name

`''`
shape str

Property structure_type in ('AUTO', 'SINGLE')

`'AUTO'`
subtype str

Socket sub type in ('NONE', 'PERCENTAGE', 'FACTOR', 'MASS', 'ANGLE', 'TIME', 'TIME_ABSOLUTE', 'DISTANCE', 'WAVELENGTH', 'COLOR_TEMPERATURE', 'FREQUENCY')

`NONE`

Returns:

Type Description
Float
Source code in core/generated/float.py
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
@classmethod
def _create_input_socket(cls,
    value: object = 0.0,
    name: str = 'Float',
    min: float = -3.40282e+38,
    max: float = 3.40282e+38,
    tip: str = '',
    panel: str = "",
    optional_label: bool = False,
    hide_value: bool = False,
    hide_in_modifier: bool = False,
    default_attribute: str = '',
    shape: Literal['AUTO', 'SINGLE'] = 'AUTO',
    subtype: str = 'NONE',
     ):
    """ > Float Input

    New Float input with subtype 'NONE'.

    Parameters
    ----------
    value : object, default=`0.0`
        Default value

    name : str, default=`Float`
        Input socket name

    min : float, default=`-3.40282e+38`
        Property min_value

    max : float, default=`3.40282e+38`
        Property max_value

    tip : str, default=`''`
        Property description

    panel : str, default=``
        Panel name

    optional_label : bool, default=`False`
        Property optional_label

    hide_value : bool, default=`False`
        Property hide_value

    hide_in_modifier : bool, default=`False`
        Property hide_in_modifier

    default_attribute : str, default=`''`
        Property default_attribute_name

    shape : str, default=`'AUTO'`
        Property structure_type in ('AUTO', 'SINGLE')

    subtype : str, default=`NONE`
        Socket sub type in ('NONE', 'PERCENTAGE', 'FACTOR', 'MASS', 'ANGLE', 'TIME', 'TIME_ABSOLUTE', 'DISTANCE', 'WAVELENGTH', 'COLOR_TEMPERATURE', 'FREQUENCY')


    Returns
    -------
    Float
    """
    from ..treeclass import Tree

    defval = utils.python_value_for_socket(value, cls.SOCKET_TYPE)

    return Tree.current_tree().create_input_socket('NodeSocketFloat', default_value = defval, name=name,
        min=min, max=max, tip=tip, panel=panel, optional_label=optional_label, hide_value=hide_value,
        hide_in_modifier=hide_in_modifier, default_attribute=default_attribute, shape=shape,
        subtype=subtype)

_get_bsocket_from_input(name=None)

Get the availble input socket if any.

The socket is get a an OUTPUT socket of the current input.

Parameters:

Name Type Description Default
name str

name filter default=None.

None

Returns:

Type Description
Socket

or None if not found

Source code in core/socket_class.py
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
def _get_bsocket_from_input(self, name: str = None) -> bpy.types.NodeSocket:
    """ Get the availble input socket if any.

    The socket is get a an OUTPUT socket of the current input.

    Parameters
    ----------
    name : str, optional
        name filter default=None.


    Returns
    -------
    Socket
        or None if not found

    """
    in_node = self._tree.get_input_node()

    include = None if name is None else [name]

    bsockets = in_node.get_sockets('OUTPUT', include=include)
    for _, bsock in bsockets:
        if SocketType(bsock).type == self.SOCKET_TYPE:
            return bsock._bsocket
    else:
        return None

_jump(socket, reset=True)

Change the wrapped output socket

When changing the socket, the description is copied to the new socket. The node color, if any, is also propagated.

Parameters:

Name Type Description Default
socket NodeSocket

the new output socket to jump to

required
reset bool

reset the cache default=True.

True

Returns:

Type Description
self
Source code in core/socket_class.py
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
def _jump(self, socket: bpy.types.NodeSocket, reset: bool = True):
    """ Change the wrapped output socket

    When changing the socket, the description is copied to the new socket.
    The node color, if any, is also propagated.

    Parameters
    ----------
    socket : bpy.types.NodeSocket
        the new output socket to jump to

    reset : bool, optional
        reset the cache default=True.


    Returns
    -------
    self
    """

    # Keep user label stored in socket description
    user_label = self.user_label

    bsocket = utils.get_bsocket(socket)
    if bsocket is None:
        raise NodeError(f"Socket error: Impossible to jump to socket {socket}")

    self._bsocket = bsocket
    if reset:
        self._reset()

    # Restore user label
    self.user_label = user_label


    return self

_lc(label=None, color=None)

Set node label and color.

This method returns self to be chained to as socket:

with GeoNodes("Node label and color"):
    Geometry().out()

    a = Float(10)._lc("Var a")
    b = Float(10)._lc("Var b")
    c = (a + b)._lc("a + b", (1, 0, 0))

Parameters:

Name Type Description Default
label str

node label default=None.

None
color SysColor

node color default=None.

None

Returns:

Type Description
self
Source code in core/socket_class.py
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
def _lc(self, label: str = None, color: SysColor = None):
    """ Set node label and color.

    This method returns self to be chained to as socket:

    ``` python
    with GeoNodes("Node label and color"):
        Geometry().out()

        a = Float(10)._lc("Var a")
        b = Float(10)._lc("Var b")
        c = (a + b)._lc("a + b", (1, 0, 0))
    ```

    Parameters
    ----------
    label : str, optional
        node label default=None.

    color : SysColor, optional
        node color default=None.


    Returns
    -------
    self
    """

    if self.node._bnode.bl_idname == 'NodeGroupInput':
        return self

    self.node_label = label
    self.node_color = color
    self.user_label = label

    return self

_ul(label)

Set the user label

Parameters:

Name Type Description Default
label str

the label to append

required

Returns:

Type Description
self
Source code in core/socket_class.py
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
def _ul(self, label : str):
    """ Set the user label

    Parameters
    ----------
    label : str
        the label to append


    Returns
    -------
    self
    """
    self.user_label = label
    return self

abs(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ABSOLUTE'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
def abs(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `operation` | `'ABSOLUTE'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='ABSOLUTE', use_clamp=use_clamp)
    return node._out

acos(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ARCCOSINE'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
def acos(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Socket    | Value       | `self`        |
    | Parameter | `operation` | `'ARCCOSINE'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='ARCCOSINE', use_clamp=use_clamp)
    return node._out

add(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ADD'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
def add(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value   |
    | --------- | ----------- | ------- |
    | Socket    | Value       | `self`  |
    | Parameter | `operation` | `'ADD'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='ADD', use_clamp=use_clamp)
    return node._out

add_method(name=None, jump=False, ret_class=None, **fixed)

Add the current tree as a method of the Socket class.

Important

The socket instance must be an input socket of the Tree. This input plays the role of self argument.

with GeoNodes("Translate"):
    geo = Geometry()
    v = Vector(0, "Translation)
    geo.transform(translation=v)

    geo.add_method(jump=True)

Once the modifier completed, it can be called as a method of geometry geo.translate(translation=(1, 2, 3))

Parameters:

Name Type Description Default
name str

replace the default name which is the snake case version of the group name default=None.

None
ret_class type

transtype the default node output default=None.

None
jump bool

the calling socket jumps to the node outpus after the call default=False.

False
ret_class type

transtype the result with this class if not None default=None.

None
Source code in core/socket_class.py
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
def add_method(self, name: str = None, jump: bool = False, ret_class: type = None, **fixed):
    """ Add the current tree as a method of the Socket class.

    !!! important

        The socket instance must be an input socket of the Tree. This input plays the role of
        self argument.

    ``` python
    with GeoNodes("Translate"):
        geo = Geometry()
        v = Vector(0, "Translation)
        geo.transform(translation=v)

        geo.add_method(jump=True)
    ```

    Once the modifier completed, it can be called as a method of geometry ```geo.translate(translation=(1, 2, 3))```

    Parameters
    ----------
    name : str, optional
        replace the default name which is the snake case version of the group name default=None.

    ret_class : type, optional
        transtype the default node output default=None.

    jump : bool, optional
        the calling socket jumps to the node outpus after the call default=False.

    ret_class : type, optional
        transtype the result with this class if not None default=None.

    """

    if self.node._bnode.bl_idname != 'NodeGroupInput':
        raise NodeError(
            f"'add_method' can be called only from a 'Group Input' socket. "
            "This socket is used a 'self' argument when calling the method of {type(self).__name__}.")

    tree = Tree.current_tree()

    # ---------------------------------------------------------------------------
    # Method Body
    # ---------------------------------------------------------------------------

    socket_rank = self.node._outputs.get_socket_rank(self)
    socket_name = utils.snake_case(self._bsocket.name)


    def call(self_, *args, **kwargs):
        node = Group(tree._btree.name)
        if socket_rank >= len(args):
            new_args = args
            new_kwargs = {socket_name: self_, **kwargs}
        else:
            new_args = args[:socket_rank] + (self_,) + args[socket_rank:]
            new_kwargs = kwargs

        res = node.method_call(*new_args, ret_class=ret_class, **new_kwargs, **fixed)

        if jump:
            return self_._jump(res)
        else:
            return res

    # ---------------------------------------------------------------------------
    # Add the method to the class
    # ---------------------------------------------------------------------------

    if name is None:
        name = tree._btree.name[len(tree._prefix):].strip()
        name = utils.snake_case(name)

    class_ = type(self)
    if name in dir(class_):
        print(f"CAUTION: the method '{name}' (implementing group '{tree._btree.name}') already exists in class {class_}.")

    setattr(class_, name, call)

advect_grid(velocity=None, time_step=None, integration_scheme=None, limiter=None)

Node Advect Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
velocity Vector

socket 'Velocity' (id: Velocity)

None
time_step Float

socket 'Time Step' (id: Time Step)

None
integration_scheme menu='Runge-Kutta 3'

('Semi-Lagrangian', 'Midpoint', 'Runge-Kutta 3', 'Runge-Kutta 4', 'MacCormack', 'BFECC')

None
limiter menu='Clamp'

('None', 'Clamp', 'Revert')

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
def advect_grid(self,
                velocity: Vector = None,
                time_step: Float = None,
                integration_scheme: Literal['Semi-Lagrangian', 'Midpoint', 'Runge-Kutta 3', 'Runge-Kutta 4', 'MacCormack', 'BFECC'] = None,
                limiter: Literal['None', 'Clamp', 'Revert'] = None):
    """ > Node Advect Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    velocity : Vector, optional
        socket 'Velocity' (id: Velocity)

    time_step : Float, optional
        socket 'Time Step' (id: Time Step)

    integration_scheme : menu='Runge-Kutta 3', optional
        ('Semi-Lagrangian', 'Midpoint', 'Runge-Kutta 3', 'Runge-Kutta 4', 'MacCormack', 'BFECC')

    limiter : menu='Clamp', optional
        ('None', 'Clamp', 'Revert')


    Returns
    -------
    Float
    """
    node = Node('Advect Grid', {'Grid': self, 'Velocity': velocity, 'Time Step': time_step, 'Integration Scheme': integration_scheme, 'Limiter': limiter}, data_type='FLOAT')
    return node._out

arctangent(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ARCTANGENT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
def arctangent(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | Value       | `self`         |
    | Parameter | `operation` | `'ARCTANGENT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='ARCTANGENT', use_clamp=use_clamp)
    return node._out

asin(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ARCSINE'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
def asin(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'ARCSINE'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='ARCSINE', use_clamp=use_clamp)
    return node._out

atan2(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ARCTAN2'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
def atan2(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'ARCTAN2'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='ARCTAN2', use_clamp=use_clamp)
    return node._out

bevel(normal=None, samples=4)

Node Bevel

Fixed values

Kind Name Value
Socket Radius self

Parameters:

Name Type Description Default
normal Vector

socket 'Normal' (id: Normal)

None
samples int

parameter samples

4

Returns:

Type Description
Vector
Source code in core/generated/float.py
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
def bevel(self, normal: Vector = None, samples = 4):
    """ > Node Bevel

    **Fixed values**

    | Kind   | Name   | Value  |
    | ------ | ------ | ------ |
    | Socket | Radius | `self` |

    Parameters
    ----------
    normal : Vector, optional
        socket 'Normal' (id: Normal)

    samples : int
        parameter `samples`


    Returns
    -------
    Vector
    """
    node = Node('Bevel', {'Radius': self, 'Normal': normal}, samples=samples)
    return node._out

blur(iterations=None, weight=None)

Node Blur Attribute

Fixed values

Kind Name Value
Socket Value self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
iterations Integer

socket 'Iterations' (id: Iterations)

None
weight Float

socket 'Weight' (id: Weight)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
def blur(self, iterations: Integer = None, weight: Float = None):
    """ > Node Blur Attribute

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)

    weight : Float, optional
        socket 'Weight' (id: Weight)


    Returns
    -------
    Float
    """
    node = Node('Blur Attribute', {'Value': self, 'Iterations': iterations, 'Weight': weight}, data_type='FLOAT')
    return node._out

bump(distance=None, filter_width=None, height=None, normal=None, invert=False)

Node Bump

Fixed values

Kind Name Value
Socket Strength self

Parameters:

Name Type Description Default
distance Float

socket 'Distance' (id: Distance)

None
filter_width Float

socket 'Filter Width' (id: Filter Width)

None
height Float

socket 'Height' (id: Height)

None
normal Vector

socket 'Normal' (id: Normal)

None
invert bool

parameter invert

False

Returns:

Type Description
Vector
Source code in core/generated/float.py
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
def bump(self,
                distance: Float = None,
                filter_width: Float = None,
                height: Float = None,
                normal: Vector = None,
                invert = False):
    """ > Node Bump

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Strength | `self` |

    Parameters
    ----------
    distance : Float, optional
        socket 'Distance' (id: Distance)

    filter_width : Float, optional
        socket 'Filter Width' (id: Filter Width)

    height : Float, optional
        socket 'Height' (id: Height)

    normal : Vector, optional
        socket 'Normal' (id: Normal)

    invert : bool
        parameter `invert`


    Returns
    -------
    Vector
    """
    node = Node('Bump', {'Strength': self, 'Distance': distance, 'Filter Width': filter_width, 'Height': height, 'Normal': normal}, invert=invert)
    return node._out

ceil(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'CEIL'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
def ceil(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'CEIL'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='CEIL', use_clamp=use_clamp)
    return node._out

clamp(min=None, max=None, clamp_type='MINMAX')

Node Clamp

Fixed values

Kind Name Value
Socket Value self

Parameters:

Name Type Description Default
min Float

socket 'Min' (id: Min)

None
max Float

socket 'Max' (id: Max)

None
clamp_type Literal['Min Max', 'Range']

parameter clamp_type

'MINMAX'

Returns:

Type Description
Float
Source code in core/generated/float.py
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
def clamp(self,
                min: Float = None,
                max: Float = None,
                clamp_type: Literal['MINMAX', 'RANGE'] = 'MINMAX'):
    """ > Node Clamp

    **Fixed values**

    | Kind   | Name  | Value  |
    | ------ | ----- | ------ |
    | Socket | Value | `self` |

    Parameters
    ----------
    min : Float, optional
        socket 'Min' (id: Min)

    max : Float, optional
        socket 'Max' (id: Max)

    clamp_type : Literal['Min Max', 'Range']
        parameter `clamp_type`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('Clamp', 'clamp_type', clamp_type, 'clamp', ('MINMAX', 'RANGE'))
    node = Node('Clamp', {'Value': self, 'Min': min, 'Max': max}, clamp_type=clamp_type)
    return node._out

clamp_minmax(min=None, max=None)

Node Clamp

Fixed values

Kind Name Value
Socket Value self
Parameter clamp_type 'MINMAX'

Parameters:

Name Type Description Default
min Float

socket 'Min' (id: Min)

None
max Float

socket 'Max' (id: Max)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
def clamp_minmax(self, min: Float = None, max: Float = None):
    """ > Node Clamp

    **Fixed values**

    | Kind      | Name         | Value      |
    | --------- | ------------ | ---------- |
    | Socket    | Value        | `self`     |
    | Parameter | `clamp_type` | `'MINMAX'` |

    Parameters
    ----------
    min : Float, optional
        socket 'Min' (id: Min)

    max : Float, optional
        socket 'Max' (id: Max)


    Returns
    -------
    Float
    """
    node = Node('Clamp', {'Value': self, 'Min': min, 'Max': max}, clamp_type='MINMAX')
    return node._out

clamp_range(min=None, max=None)

Node Clamp

Fixed values

Kind Name Value
Socket Value self
Parameter clamp_type 'RANGE'

Parameters:

Name Type Description Default
min Float

socket 'Min' (id: Min)

None
max Float

socket 'Max' (id: Max)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
def clamp_range(self, min: Float = None, max: Float = None):
    """ > Node Clamp

    **Fixed values**

    | Kind      | Name         | Value     |
    | --------- | ------------ | --------- |
    | Socket    | Value        | `self`    |
    | Parameter | `clamp_type` | `'RANGE'` |

    Parameters
    ----------
    min : Float, optional
        socket 'Min' (id: Min)

    max : Float, optional
        socket 'Max' (id: Max)


    Returns
    -------
    Float
    """
    node = Node('Clamp', {'Value': self, 'Min': min, 'Max': max}, clamp_type='RANGE')
    return node._out

clip_grid(min_x=None, min_y=None, min_z=None, max_x=None, max_y=None, max_z=None)

Node Clip Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
min_x Integer

socket 'Min X' (id: Min X)

None
min_y Integer

socket 'Min Y' (id: Min Y)

None
min_z Integer

socket 'Min Z' (id: Min Z)

None
max_x Integer

socket 'Max X' (id: Max X)

None
max_y Integer

socket 'Max Y' (id: Max Y)

None
max_z Integer

socket 'Max Z' (id: Max Z)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
def clip_grid(self,
                min_x: Integer = None,
                min_y: Integer = None,
                min_z: Integer = None,
                max_x: Integer = None,
                max_y: Integer = None,
                max_z: Integer = None):
    """ > Node Clip Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    min_x : Integer, optional
        socket 'Min X' (id: Min X)

    min_y : Integer, optional
        socket 'Min Y' (id: Min Y)

    min_z : Integer, optional
        socket 'Min Z' (id: Min Z)

    max_x : Integer, optional
        socket 'Max X' (id: Max X)

    max_y : Integer, optional
        socket 'Max Y' (id: Max Y)

    max_z : Integer, optional
        socket 'Max Z' (id: Max Z)


    Returns
    -------
    Float
    """
    node = Node('Clip Grid', {'Grid': self, 'Min X': min_x, 'Min Y': min_y, 'Min Z': min_z, 'Max X': max_x, 'Max Y': max_y, 'Max Z': max_z}, data_type='FLOAT')
    return node._out

color_ramp(stops=None, interpolation='LINEAR')

Color Ramp

Node Color Ramp

Parameters:

Name Type Description Default
stops list[tuple[float, tuple]]

Stops made of (float, color as tuple of floats)

None
interpolation (EASE, CARDINAL, LINEAR, B_SPLINE, CONSTANT)
'EASE'

Returns:

Type Description
Color
Source code in core/sock_float.py
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
def color_ramp(self, stops=None, interpolation='LINEAR'):
    """ > Color Ramp

    > Node Color Ramp

    Parameters
    ----------

    stops : list[tuple[float, tuple]]
        Stops made of (float, color as tuple of floats)

    interpolation : {'EASE', 'CARDINAL', 'LINEAR', 'B_SPLINE', 'CONSTANT'}


    Returns
    -------
    Color
    """
    return ColorRamp(fac=self, stops=stops, interpolation=interpolation)._out

combine_color(green=None, blue=None, mode='RGB')

Node Combine Color

Fixed values

Kind Name Value
Socket Red self

Parameters:

Name Type Description Default
green Float

socket 'Green' (id: Green)

None
blue Float

socket 'Blue' (id: Blue)

None
mode Literal['RGB', 'HSV', 'HSL']

parameter mode

'RGB'

Returns:

Type Description
Color
Source code in core/generated/float.py
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
def combine_color(self,
                green: Float = None,
                blue: Float = None,
                mode: Literal['RGB', 'HSV', 'HSL'] = 'RGB'):
    """ > Node Combine Color

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Red  | `self` |

    Parameters
    ----------
    green : Float, optional
        socket 'Green' (id: Green)

    blue : Float, optional
        socket 'Blue' (id: Blue)

    mode : Literal['RGB', 'HSV', 'HSL']
        parameter `mode`


    Returns
    -------
    Color
    """
    utils.check_enum_arg('Combine Color', 'mode', mode, 'combine_color', ('RGB', 'HSV', 'HSL'))
    node = Node('Combine Color', {'Red': self, 'Green': green, 'Blue': blue}, mode=mode)
    return node._out

combine_color_HSL(saturation=None, lightness=None)

Node Combine Color

Fixed values

Kind Name Value
Socket Hue self
Parameter mode 'HSL'

Parameters:

Name Type Description Default
saturation Float

socket 'Saturation' (id: Green)

None
lightness Float

socket 'Lightness' (id: Blue)

None

Returns:

Type Description
Color
Source code in core/generated/float.py
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
def combine_color_HSL(self, saturation: Float = None, lightness: Float = None):
    """ > Node Combine Color

    **Fixed values**

    | Kind      | Name   | Value   |
    | --------- | ------ | ------- |
    | Socket    | Hue    | `self`  |
    | Parameter | `mode` | `'HSL'` |

    Parameters
    ----------
    saturation : Float, optional
        socket 'Saturation' (id: Green)

    lightness : Float, optional
        socket 'Lightness' (id: Blue)


    Returns
    -------
    Color
    """
    node = Node('Combine Color', {'Red': self, 'Green': saturation, 'Blue': lightness}, mode='HSL')
    return node._out

combine_color_HSV(saturation=None, value=None)

Node Combine Color

Fixed values

Kind Name Value
Socket Hue self
Parameter mode 'HSV'

Parameters:

Name Type Description Default
saturation Float

socket 'Saturation' (id: Green)

None
value Float

socket 'Value' (id: Blue)

None

Returns:

Type Description
Color
Source code in core/generated/float.py
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
def combine_color_HSV(self, saturation: Float = None, value: Float = None):
    """ > Node Combine Color

    **Fixed values**

    | Kind      | Name   | Value   |
    | --------- | ------ | ------- |
    | Socket    | Hue    | `self`  |
    | Parameter | `mode` | `'HSV'` |

    Parameters
    ----------
    saturation : Float, optional
        socket 'Saturation' (id: Green)

    value : Float, optional
        socket 'Value' (id: Blue)


    Returns
    -------
    Color
    """
    node = Node('Combine Color', {'Red': self, 'Green': saturation, 'Blue': value}, mode='HSV')
    return node._out

combine_color_RGB(green=None, blue=None)

Node Combine Color

Fixed values

Kind Name Value
Socket Red self
Parameter mode 'RGB'

Parameters:

Name Type Description Default
green Float

socket 'Green' (id: Green)

None
blue Float

socket 'Blue' (id: Blue)

None

Returns:

Type Description
Color
Source code in core/generated/float.py
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
def combine_color_RGB(self, green: Float = None, blue: Float = None):
    """ > Node Combine Color

    **Fixed values**

    | Kind      | Name   | Value   |
    | --------- | ------ | ------- |
    | Socket    | Red    | `self`  |
    | Parameter | `mode` | `'RGB'` |

    Parameters
    ----------
    green : Float, optional
        socket 'Green' (id: Green)

    blue : Float, optional
        socket 'Blue' (id: Blue)


    Returns
    -------
    Color
    """
    node = Node('Combine Color', {'Red': self, 'Green': green, 'Blue': blue}, mode='RGB')
    return node._out

compare(value=None, epsilon=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'COMPARE'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
epsilon Float

socket 'Epsilon' (id: Value_002)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
def compare(self, value: Float = None, epsilon: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'COMPARE'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    epsilon : Float, optional
        socket 'Epsilon' (id: Value_002)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value, 'Value_002': epsilon}, operation='COMPARE', use_clamp=use_clamp)
    return node._out

cos(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'COSINE'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
def cos(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value      |
    | --------- | ----------- | ---------- |
    | Socket    | Value       | `self`     |
    | Parameter | `operation` | `'COSINE'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='COSINE', use_clamp=use_clamp)
    return node._out

cosh(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'COSH'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
def cosh(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'COSH'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='COSH', use_clamp=use_clamp)
    return node._out

curve(factor=None, curve=None)

Node Float Curve

A curve is defined by a list of 3-tuples (not list):

  • x (float) : x position
  • y (float) : y position
  • handle_type (str) : handle type in ('AUTO', 'AUTO_CLAMPED', 'VECTOR'), default='AUTO'
Information
  • Socket 'Value' : self

Parameters:

Name Type Description Default
factor Float

socket 'Factor' (id: Factor)

None
curve list[tuple[float, float, str]]

Curve points

None

Returns:

Type Description
Float
Source code in core/sock_float.py
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
def curve(self, factor=None, curve=None):
    """ > Node Float Curve

    A curve is defined by a list of 3-tuples (not list):

    - x (float) : x position
    - y (float) : y position
    - handle_type (str) : handle type in ('AUTO', 'AUTO_CLAMPED', 'VECTOR'), default='AUTO'

    Information
    -----------
    - Socket 'Value' : self

    Parameters
    ----------
    factor : Float
        socket 'Factor' (id: Factor)

    curve : list[tuple[float, float, str]]
        Curve points

    Returns
    -------
    Float
    """
    node = NodeCurves('Float Curve', named_sockets={'Value': self, 'Factor': factor})
    node.set_curves(curve)
    return node._out

degrees(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Radians self
Parameter operation 'DEGREES'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
def degrees(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Radians     | `self`      |
    | Parameter | `operation` | `'DEGREES'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='DEGREES', use_clamp=use_clamp)
    return node._out

dial_gizmo(*value, position=None, up=None, screen_space=None, radius=None, color_id='PRIMARY')

Node Dial Gizmo

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value)

()
position Vector

socket 'Position' (id: Position)

None
up Vector

socket 'Up' (id: Up)

None
screen_space Boolean

socket 'Screen Space' (id: Screen Space)

None
radius Float

socket 'Radius' (id: Radius)

None
color_id Literal['Primary', 'Secondary', 'X', 'Y', 'Z']

parameter color_id

'PRIMARY'

Returns:

Type Description
Geometry
Source code in core/generated/float.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
def dial_gizmo(self,
                *value: Float,
                position: Vector = None,
                up: Vector = None,
                screen_space: Boolean = None,
                radius: Float = None,
                color_id: Literal['PRIMARY', 'SECONDARY', 'X', 'Y', 'Z'] = 'PRIMARY'):
    """ > Node Dial Gizmo

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value)

    position : Vector, optional
        socket 'Position' (id: Position)

    up : Vector, optional
        socket 'Up' (id: Up)

    screen_space : Boolean, optional
        socket 'Screen Space' (id: Screen Space)

    radius : Float, optional
        socket 'Radius' (id: Radius)

    color_id : Literal['Primary', 'Secondary', 'X', 'Y', 'Z']
        parameter `color_id`


    Returns
    -------
    Geometry
    """
    utils.check_enum_arg('Dial Gizmo', 'color_id', color_id, 'dial_gizmo', ('PRIMARY', 'SECONDARY', 'X', 'Y', 'Z'))
    node = Node('Dial Gizmo', {'Value': [self] + list(value), 'Position': position, 'Up': up, 'Screen Space': screen_space, 'Radius': radius}, color_id=color_id)
    return node._out

displacement(midlevel=None, scale=None, normal=None, space='OBJECT')

Node Displacement

Fixed values

Kind Name Value
Socket Height self

Parameters:

Name Type Description Default
midlevel Float

socket 'Midlevel' (id: Midlevel)

None
scale Float

socket 'Scale' (id: Scale)

None
normal Vector

socket 'Normal' (id: Normal)

None
space Literal['Object Space', 'World Space']

parameter space

'OBJECT'

Returns:

Type Description
Vector
Source code in core/generated/float.py
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
def displacement(self,
                midlevel: Float = None,
                scale: Float = None,
                normal: Vector = None,
                space: Literal['OBJECT', 'WORLD'] = 'OBJECT'):
    """ > Node Displacement

    **Fixed values**

    | Kind   | Name   | Value  |
    | ------ | ------ | ------ |
    | Socket | Height | `self` |

    Parameters
    ----------
    midlevel : Float, optional
        socket 'Midlevel' (id: Midlevel)

    scale : Float, optional
        socket 'Scale' (id: Scale)

    normal : Vector, optional
        socket 'Normal' (id: Normal)

    space : Literal['Object Space', 'World Space']
        parameter `space`


    Returns
    -------
    Vector
    """
    utils.check_enum_arg('Displacement', 'space', space, 'displacement', ('OBJECT', 'WORLD'))
    node = Node('Displacement', {'Height': self, 'Midlevel': midlevel, 'Scale': scale, 'Normal': normal}, space=space)
    return node._out

distribute_points_in_grid(density=None, seed=None, mode='DENSITY_RANDOM')

Node Distribute Points in Grid

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
seed Integer

socket 'Seed' (id: Seed)

None
mode Literal['Random', 'Grid']

parameter mode

'DENSITY_RANDOM'

Returns:

Type Description
Cloud
Source code in core/generated/float.py
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
def distribute_points_in_grid(self,
                density: Float = None,
                seed: Integer = None,
                mode: Literal['DENSITY_RANDOM', 'DENSITY_GRID'] = 'DENSITY_RANDOM'):
    """ > Node Distribute Points in Grid

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    seed : Integer, optional
        socket 'Seed' (id: Seed)

    mode : Literal['Random', 'Grid']
        parameter `mode`


    Returns
    -------
    Cloud
    """
    utils.check_enum_arg('Distribute Points in Grid', 'mode', mode, 'distribute_points_in_grid', ('DENSITY_RANDOM', 'DENSITY_GRID'))
    node = Node('Distribute Points in Grid', {'Grid': self, 'Density': density, 'Seed': seed}, mode=mode)
    return node._out

distribute_points_in_grid_density_grid(spacing=None, threshold=None)

Node Distribute Points in Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter mode 'DENSITY_GRID'

Parameters:

Name Type Description Default
spacing Vector

socket 'Spacing' (id: Spacing)

None
threshold Float

socket 'Threshold' (id: Threshold)

None

Returns:

Type Description
Cloud
Source code in core/generated/float.py
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
def distribute_points_in_grid_density_grid(self, spacing: Vector = None, threshold: Float = None):
    """ > Node Distribute Points in Grid

    **Fixed values**

    | Kind      | Name   | Value            |
    | --------- | ------ | ---------------- |
    | Socket    | Grid   | `self`           |
    | Parameter | `mode` | `'DENSITY_GRID'` |

    Parameters
    ----------
    spacing : Vector, optional
        socket 'Spacing' (id: Spacing)

    threshold : Float, optional
        socket 'Threshold' (id: Threshold)


    Returns
    -------
    Cloud
    """
    node = Node('Distribute Points in Grid', {'Grid': self, 'Spacing': spacing, 'Threshold': threshold}, mode='DENSITY_GRID')
    return node._out

distribute_points_in_grid_density_random(density=None, seed=None)

Node Distribute Points in Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter mode 'DENSITY_RANDOM'

Parameters:

Name Type Description Default
density Float

socket 'Density' (id: Density)

None
seed Integer

socket 'Seed' (id: Seed)

None

Returns:

Type Description
Cloud
Source code in core/generated/float.py
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
def distribute_points_in_grid_density_random(self, density: Float = None, seed: Integer = None):
    """ > Node Distribute Points in Grid

    **Fixed values**

    | Kind      | Name   | Value              |
    | --------- | ------ | ------------------ |
    | Socket    | Grid   | `self`             |
    | Parameter | `mode` | `'DENSITY_RANDOM'` |

    Parameters
    ----------
    density : Float, optional
        socket 'Density' (id: Density)

    seed : Integer, optional
        socket 'Seed' (id: Seed)


    Returns
    -------
    Cloud
    """
    node = Node('Distribute Points in Grid', {'Grid': self, 'Density': density, 'Seed': seed}, mode='DENSITY_RANDOM')
    return node._out

divide(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'DIVIDE'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
def divide(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value      |
    | --------- | ----------- | ---------- |
    | Socket    | Value       | `self`     |
    | Parameter | `operation` | `'DIVIDE'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='DIVIDE', use_clamp=use_clamp)
    return node._out

enable_output(enable=None)

Node Enable Output

Fixed values

Kind Name Value
Socket Value self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
enable Boolean

socket 'Enable' (id: Enable)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
def enable_output(self, enable: Boolean = None):
    """ > Node Enable Output

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    enable : Boolean, optional
        socket 'Enable' (id: Enable)


    Returns
    -------
    Float
    """
    node = Node('Enable Output', {'Enable': enable, 'Value': self}, data_type='FLOAT')
    return node._out

equal(b=None, epsilon=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'EQUAL'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None
epsilon Float

socket 'Epsilon' (id: Epsilon)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
def equal(self, b: Float = None, epsilon: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | A           | `self`      |
    | Parameter | `data_type` | `'FLOAT'`   |
    | Parameter | `mode`      | `'ELEMENT'` |
    | Parameter | `operation` | `'EQUAL'`   |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)

    epsilon : Float, optional
        socket 'Epsilon' (id: Epsilon)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b, 'Epsilon': epsilon}, data_type='FLOAT', mode='ELEMENT', operation='EQUAL')
    return node._out

exp(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'EXPONENT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
def exp(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `operation` | `'EXPONENT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='EXPONENT', use_clamp=use_clamp)
    return node._out

field_to_grid(named_sockets={}, **sockets)

Node Field to Grid

Fixed values

Kind Name Value
Socket Topology self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
named_sockets dict

Sockets created with string names

{}
sockets dict

Socket created with python name attributes

{}

Returns:

Type Description
None
Source code in core/generated/float.py
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
def field_to_grid(self, named_sockets: dict = {}, **sockets):
    """ > Node Field to Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Topology    | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    named_sockets : dict, default={}
        Sockets created with string names

    sockets : dict, default={}
        Socket created with python name attributes

    Returns
    -------
    None
    """
    node = Node('Field to Grid', {'Topology': self, **named_sockets}, data_type='FLOAT', **sockets)
    return node._out

floor(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'FLOOR'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
def floor(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `operation` | `'FLOOR'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='FLOOR', use_clamp=use_clamp)
    return node._out

floored_modulo(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'FLOORED_MODULO'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
def floored_modulo(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value              |
    | --------- | ----------- | ------------------ |
    | Socket    | Value       | `self`             |
    | Parameter | `operation` | `'FLOORED_MODULO'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='FLOORED_MODULO', use_clamp=use_clamp)
    return node._out

fract(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'FRACT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
def fract(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `operation` | `'FRACT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='FRACT', use_clamp=use_clamp)
    return node._out

frame()

Node Scene Time

Returns:

Type Description
frame
Source code in core/generated/float.py
492
493
494
495
496
497
498
499
500
501
@utils.classproperty
def frame(cls):
    """ > Node Scene Time

    Returns
    -------
    frame
    """
    node = Node('Scene Time', )
    return node.frame

fresnel(normal=None)

Node Fresnel

Fixed values

Kind Name Value
Socket IOR self

Parameters:

Name Type Description Default
normal Vector

socket 'Normal' (id: Normal)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
def fresnel(self, normal: Vector = None):
    """ > Node Fresnel

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | IOR  | `self` |

    Parameters
    ----------
    normal : Vector, optional
        socket 'Normal' (id: Normal)


    Returns
    -------
    Float
    """
    node = Node('Fresnel', {'IOR': self, 'Normal': normal})
    return node._out

greater_equal(b=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'GREATER_EQUAL'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
def greater_equal(self, b: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value             |
    | --------- | ----------- | ----------------- |
    | Socket    | A           | `self`            |
    | Parameter | `data_type` | `'FLOAT'`         |
    | Parameter | `mode`      | `'ELEMENT'`       |
    | Parameter | `operation` | `'GREATER_EQUAL'` |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b}, data_type='FLOAT', mode='ELEMENT', operation='GREATER_EQUAL')
    return node._out

greater_than(b=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'GREATER_THAN'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
def greater_than(self, b: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value            |
    | --------- | ----------- | ---------------- |
    | Socket    | A           | `self`           |
    | Parameter | `data_type` | `'FLOAT'`        |
    | Parameter | `mode`      | `'ELEMENT'`      |
    | Parameter | `operation` | `'GREATER_THAN'` |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b}, data_type='FLOAT', mode='ELEMENT', operation='GREATER_THAN')
    return node._out

grid_dilate_erode(connectivity=None, tiles=None, steps=None)

Node Grid Dilate & Erode

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
connectivity menu='Face'

('Face', 'Edge', 'Vertex')

None
tiles menu='Preserve'

('Ignore', 'Expand', 'Preserve')

None
steps Integer

socket 'Steps' (id: Steps)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
def grid_dilate_erode(self,
                connectivity: Literal['Face', 'Edge', 'Vertex'] = None,
                tiles: Literal['Ignore', 'Expand', 'Preserve'] = None,
                steps: Integer = None):
    """ > Node Grid Dilate & Erode

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    connectivity : menu='Face', optional
        ('Face', 'Edge', 'Vertex')

    tiles : menu='Preserve', optional
        ('Ignore', 'Expand', 'Preserve')

    steps : Integer, optional
        socket 'Steps' (id: Steps)


    Returns
    -------
    Float
    """
    node = Node('Grid Dilate & Erode', {'Grid': self, 'Connectivity': connectivity, 'Tiles': tiles, 'Steps': steps}, data_type='FLOAT')
    return node._out

grid_gradient()

Node Grid Gradient

Fixed values

Kind Name Value
Socket Grid self

Returns:

Type Description
Vector
Source code in core/generated/float.py
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
def grid_gradient(self):
    """ > Node Grid Gradient

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Returns
    -------
    Vector
    """
    node = Node('Grid Gradient', {'Grid': self})
    return node._out

grid_info()

Node Grid Info

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Returns:

Type Description
Matrix

peer sockets: background_value_ (Float)

Source code in core/generated/float.py
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
def grid_info(self):
    """ > Node Grid Info

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Returns
    -------
    Matrix
        peer sockets: background_value_ (Float)

    """
    node = Node('Grid Info', {'Grid': self}, data_type='FLOAT')
    return node._out

grid_laplacian()

Node Grid Laplacian

Fixed values

Kind Name Value
Socket Grid self

Returns:

Type Description
Float
Source code in core/generated/float.py
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
def grid_laplacian(self):
    """ > Node Grid Laplacian

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Returns
    -------
    Float
    """
    node = Node('Grid Laplacian', {'Grid': self})
    return node._out

grid_mean(width=None, iterations=None)

Node Grid Mean

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
width Integer

socket 'Width' (id: Width)

None
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
def grid_mean(self, width: Integer = None, iterations: Integer = None):
    """ > Node Grid Mean

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    width : Integer, optional
        socket 'Width' (id: Width)

    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('Grid Mean', {'Grid': self, 'Width': width, 'Iterations': iterations}, data_type='FLOAT')
    return node._out

grid_median(width=None, iterations=None)

Node Grid Median

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
width Integer

socket 'Width' (id: Width)

None
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
def grid_median(self, width: Integer = None, iterations: Integer = None):
    """ > Node Grid Median

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    width : Integer, optional
        socket 'Width' (id: Width)

    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('Grid Median', {'Grid': self, 'Width': width, 'Iterations': iterations}, data_type='FLOAT')
    return node._out

grid_to_mesh(threshold=None, adaptivity=None)

Node Grid to Mesh

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
threshold Float

socket 'Threshold' (id: Threshold)

None
adaptivity Float

socket 'Adaptivity' (id: Adaptivity)

None

Returns:

Type Description
Mesh
Source code in core/generated/float.py
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
def grid_to_mesh(self, threshold: Float = None, adaptivity: Float = None):
    """ > Node Grid to Mesh

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    threshold : Float, optional
        socket 'Threshold' (id: Threshold)

    adaptivity : Float, optional
        socket 'Adaptivity' (id: Adaptivity)


    Returns
    -------
    Mesh
    """
    node = Node('Grid to Mesh', {'Grid': self, 'Threshold': threshold, 'Adaptivity': adaptivity})
    return node._out

grid_to_points()

Node Grid to Points

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Returns:

Type Description
Cloud

peer sockets: value_ (Float), x_ (Integer), y_ (Integer), z_ (Integer), is_tile_ (Boolean), extent_ (Integer)

Source code in core/generated/float.py
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
def grid_to_points(self):
    """ > Node Grid to Points

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Returns
    -------
    Cloud
        peer sockets: value_ (Float), x_ (Integer), y_ (Integer), z_ (Integer), is_tile_ (Boolean), extent_ (Integer)

    """
    node = Node('Grid to Points', {'Grid': self}, data_type='FLOAT')
    return node._out

hash_value(seed=None)

Node Hash Value

Fixed values

Kind Name Value
Socket Value self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
seed Integer

socket 'Seed' (id: Seed)

None

Returns:

Type Description
Integer
Source code in core/generated/float.py
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
def hash_value(self, seed: Integer = None):
    """ > Node Hash Value

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    seed : Integer, optional
        socket 'Seed' (id: Seed)


    Returns
    -------
    Integer
    """
    node = Node('Hash Value', {'Value': self, 'Seed': seed}, data_type='FLOAT')
    return node._out

hue_saturation_value(saturation=None, value=None, color=None, factor=None)

Node Hue/Saturation/Value

Fixed values

Kind Name Value
Socket Hue self

Parameters:

Name Type Description Default
saturation Float

socket 'Saturation' (id: Saturation)

None
value Float

socket 'Value' (id: Value)

None
color Color

socket 'Color' (id: Color)

None
factor Float

socket 'Factor' (id: Fac)

None

Returns:

Type Description
Color
Source code in core/generated/float.py
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
def hue_saturation_value(self,
                saturation: Float = None,
                value: Float = None,
                color: Color = None,
                factor: Float = None):
    """ > Node Hue/Saturation/Value

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Hue  | `self` |

    Parameters
    ----------
    saturation : Float, optional
        socket 'Saturation' (id: Saturation)

    value : Float, optional
        socket 'Value' (id: Value)

    color : Color, optional
        socket 'Color' (id: Color)

    factor : Float, optional
        socket 'Factor' (id: Fac)


    Returns
    -------
    Color
    """
    node = Node('Hue/Saturation/Value', {'Hue': self, 'Saturation': saturation, 'Value': value, 'Color': color, 'Fac': factor})
    return node._out

index_switch(*values, index=None, default_index=0)

Node Index Switch

with GeoNodes("index_switch demo") as tree:

    # Create some geometries
    geo    = Geometry()
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()
    cone   = Mesh.Cone()

    # Pick in this list
    pick_geo = geo.index_switch(cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

    # Plug the result to the output
    pick_geo.out()

Parameters:

Name Type Description Default
*values Any

List of Sockets to select into

()
index Integer

socket 'Index' (Index)

None
default_index int

default idex

0

Returns:

Type Description
Socket
Source code in core/socket_class.py
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
def index_switch(self, *values, index = None, default_index: int = 0):
    """ > Node Index Switch

    ``` python
    with GeoNodes("index_switch demo") as tree:

        # Create some geometries
        geo    = Geometry()
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()
        cone   = Mesh.Cone()

        # Pick in this list
        pick_geo = geo.index_switch(cube, sphere, cone, index=tree.new_input("Geometry index", default_value=2))

        # Plug the result to the output
        pick_geo.out()
    ```

    Parameters
    ----------
    *values : Any
        List of Sockets to select into

    index : Integer, optional
        socket 'Index' (Index)

    default_index : int, default=0
        default idex

    Returns
    -------
    Socket
    """
    return self.IndexSwitch(self, *values, index=index, default_index=default_index)

inverse_sqrt(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'INVERSE_SQRT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
def inverse_sqrt(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value            |
    | --------- | ----------- | ---------------- |
    | Socket    | Value       | `self`           |
    | Parameter | `operation` | `'INVERSE_SQRT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='INVERSE_SQRT', use_clamp=use_clamp)
    return node._out

layer_weight(normal=None)

Node Layer Weight

Fixed values

Kind Name Value
Socket Blend self

Parameters:

Name Type Description Default
normal Vector

socket 'Normal' (id: Normal)

None

Returns:

Type Description
Float

peer sockets: facing_ (Float)

Source code in core/generated/float.py
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
def layer_weight(self, normal: Vector = None):
    """ > Node Layer Weight

    **Fixed values**

    | Kind   | Name  | Value  |
    | ------ | ----- | ------ |
    | Socket | Blend | `self` |

    Parameters
    ----------
    normal : Vector, optional
        socket 'Normal' (id: Normal)


    Returns
    -------
    Float
        peer sockets: facing_ (Float)

    """
    node = Node('Layer Weight', {'Blend': self, 'Normal': normal})
    return node._out

less_equal(b=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'LESS_EQUAL'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
def less_equal(self, b: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | A           | `self`         |
    | Parameter | `data_type` | `'FLOAT'`      |
    | Parameter | `mode`      | `'ELEMENT'`    |
    | Parameter | `operation` | `'LESS_EQUAL'` |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b}, data_type='FLOAT', mode='ELEMENT', operation='LESS_EQUAL')
    return node._out

less_than(b=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'LESS_THAN'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
def less_than(self, b: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Socket    | A           | `self`        |
    | Parameter | `data_type` | `'FLOAT'`     |
    | Parameter | `mode`      | `'ELEMENT'`   |
    | Parameter | `operation` | `'LESS_THAN'` |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b}, data_type='FLOAT', mode='ELEMENT', operation='LESS_THAN')
    return node._out

light_falloff(smooth=None)

Node Light Falloff

Fixed values

Kind Name Value
Socket Strength self

Parameters:

Name Type Description Default
smooth Float

socket 'Smooth' (id: Smooth)

None

Returns:

Type Description
Float

peer sockets: linear_ (Float), constant_ (Float)

Source code in core/generated/float.py
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
def light_falloff(self, smooth: Float = None):
    """ > Node Light Falloff

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Strength | `self` |

    Parameters
    ----------
    smooth : Float, optional
        socket 'Smooth' (id: Smooth)


    Returns
    -------
    Float
        peer sockets: linear_ (Float), constant_ (Float)

    """
    node = Node('Light Falloff', {'Strength': self, 'Smooth': smooth})
    return node._out

linear_gizmo(*value, position=None, direction=None, color_id='PRIMARY', draw_style='ARROW')

Node Linear Gizmo

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value)

()
position Vector

socket 'Position' (id: Position)

None
direction Vector

socket 'Direction' (id: Direction)

None
color_id Literal['Primary', 'Secondary', 'X', 'Y', 'Z']

parameter color_id

'PRIMARY'
draw_style Literal['Arrow', 'Cross', 'Box']

parameter draw_style

'ARROW'

Returns:

Type Description
Geometry
Source code in core/generated/float.py
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
def linear_gizmo(self,
                *value: Float,
                position: Vector = None,
                direction: Vector = None,
                color_id: Literal['PRIMARY', 'SECONDARY', 'X', 'Y', 'Z'] = 'PRIMARY',
                draw_style: Literal['ARROW', 'CROSS', 'BOX'] = 'ARROW'):
    """ > Node Linear Gizmo

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value)

    position : Vector, optional
        socket 'Position' (id: Position)

    direction : Vector, optional
        socket 'Direction' (id: Direction)

    color_id : Literal['Primary', 'Secondary', 'X', 'Y', 'Z']
        parameter `color_id`

    draw_style : Literal['Arrow', 'Cross', 'Box']
        parameter `draw_style`


    Returns
    -------
    Geometry
    """
    utils.check_enum_arg('Linear Gizmo', 'color_id', color_id, 'linear_gizmo', ('PRIMARY', 'SECONDARY', 'X', 'Y', 'Z'))
    utils.check_enum_arg('Linear Gizmo', 'draw_style', draw_style, 'linear_gizmo', ('ARROW', 'CROSS', 'BOX'))
    node = Node('Linear Gizmo', {'Value': [self] + list(value), 'Position': position, 'Direction': direction}, color_id=color_id, draw_style=draw_style)
    return node._out

Link input sockets of the node

Allow to chain input sockets linking.

Source code in core/socket_class.py
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
def link_inputs(self,
    from_node   : Node = None,
    from_panel  : str = "",
    *,
    include     : list =  None,
    exclude     : list  = [],
    panel       : str = "",
    ):
    """ Link input sockets of the node

    Allow to chain input sockets linking.
    """
    self.node.link_inputs(from_node, from_panel=from_panel, include=include, exclude=exclude, panel=panel)
    return self

Link panel input sockets of the node

Allow to chain input sockets linking.

Source code in core/socket_class.py
1021
1022
1023
1024
1025
1026
1027
def link_panel(self, panel: str, from_node : Node = None):
    """ Link panel input sockets of the node

    Allow to chain input sockets linking.
    """
    self.node.link_panel(panel, from_node=from_node)
    return self

log(base=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'LOGARITHM'

Parameters:

Name Type Description Default
base Float

socket 'Base' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
def log(self, base: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Socket    | Value       | `self`        |
    | Parameter | `operation` | `'LOGARITHM'` |

    Parameters
    ----------
    base : Float, optional
        socket 'Base' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': base}, operation='LOGARITHM', use_clamp=use_clamp)
    return node._out

map_range(from_min=None, from_max=None, to_min=None, to_max=None, clamp=True, interpolation_type='LINEAR')

Node Map Range

Fixed values

Kind Name Value
Socket Value self
Parameter data_type from from_min type

Parameters:

Name Type Description Default
from_min Float | Vector

socket 'From Min' (id: From Min)

None
from_max Float | Vector

socket 'From Max' (id: From Max)

None
to_min Float | Vector

socket 'To Min' (id: To Min)

None
to_max Float | Vector

socket 'To Max' (id: To Max)

None
clamp bool

parameter clamp

True
interpolation_type Literal['Linear', 'Stepped Linear', 'Smooth Step', 'Smoother Step']

parameter interpolation_type

'LINEAR'

Returns:

Type Description
Float
Source code in core/generated/float.py
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
def map_range(self,
                from_min: Float | Vector = None,
                from_max: Float | Vector = None,
                to_min: Float | Vector = None,
                to_max: Float | Vector = None,
                clamp = True,
                interpolation_type: Literal['LINEAR', 'STEPPED', 'SMOOTHSTEP', 'SMOOTHERSTEP'] = 'LINEAR'):
    """ > Node Map Range

    **Fixed values**

    | Kind      | Name        | Value                |
    | --------- | ----------- | -------------------- |
    | Socket    | Value       | `self`               |
    | Parameter | `data_type` | from `from_min` type |

    Parameters
    ----------
    from_min : Float | Vector, optional
        socket 'From Min' (id: From Min)

    from_max : Float | Vector, optional
        socket 'From Max' (id: From Max)

    to_min : Float | Vector, optional
        socket 'To Min' (id: To Min)

    to_max : Float | Vector, optional
        socket 'To Max' (id: To Max)

    clamp : bool
        parameter `clamp`

    interpolation_type : Literal['Linear', 'Stepped Linear', 'Smooth Step', 'Smoother Step']
        parameter `interpolation_type`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('Map Range', 'interpolation_type', interpolation_type, 'map_range', ('LINEAR', 'STEPPED', 'SMOOTHSTEP', 'SMOOTHERSTEP'))
    data_type = SocketType.get_data_type_for_node(from_min, 'ShaderNodeMapRange')
    node = Node('Map Range', {'Value': self, 'From Min': from_min, 'From Max': from_max, 'To Min': to_min, 'To Max': to_max}, clamp=clamp, data_type=data_type, interpolation_type=interpolation_type)
    return node._out

map_range_linear(from_min=None, from_max=None, to_min=None, to_max=None, clamp=True)

Node Map Range

Fixed values

Kind Name Value
Socket Value self
Parameter data_type from from_min type
Parameter interpolation_type 'LINEAR'

Parameters:

Name Type Description Default
from_min Float | Vector

socket 'From Min' (id: From Min)

None
from_max Float | Vector

socket 'From Max' (id: From Max)

None
to_min Float | Vector

socket 'To Min' (id: To Min)

None
to_max Float | Vector

socket 'To Max' (id: To Max)

None
clamp bool

parameter clamp

True

Returns:

Type Description
Float
Source code in core/generated/float.py
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
def map_range_linear(self,
                from_min: Float | Vector = None,
                from_max: Float | Vector = None,
                to_min: Float | Vector = None,
                to_max: Float | Vector = None,
                clamp = True):
    """ > Node Map Range

    **Fixed values**

    | Kind      | Name                 | Value                |
    | --------- | -------------------- | -------------------- |
    | Socket    | Value                | `self`               |
    | Parameter | `data_type`          | from `from_min` type |
    | Parameter | `interpolation_type` | `'LINEAR'`           |

    Parameters
    ----------
    from_min : Float | Vector, optional
        socket 'From Min' (id: From Min)

    from_max : Float | Vector, optional
        socket 'From Max' (id: From Max)

    to_min : Float | Vector, optional
        socket 'To Min' (id: To Min)

    to_max : Float | Vector, optional
        socket 'To Max' (id: To Max)

    clamp : bool
        parameter `clamp`


    Returns
    -------
    Float
    """
    data_type = SocketType.get_data_type_for_node(from_min, 'ShaderNodeMapRange')
    node = Node('Map Range', {'Value': self, 'From Min': from_min, 'From Max': from_max, 'To Min': to_min, 'To Max': to_max}, clamp=clamp, data_type=data_type, interpolation_type='LINEAR')
    return node._out

map_range_smooth_step(from_min=None, from_max=None, to_min=None, to_max=None, clamp=True)

Node Map Range

Fixed values

Kind Name Value
Socket Value self
Parameter data_type from from_min type
Parameter interpolation_type 'SMOOTHSTEP'

Parameters:

Name Type Description Default
from_min Float | Vector

socket 'From Min' (id: From Min)

None
from_max Float | Vector

socket 'From Max' (id: From Max)

None
to_min Float | Vector

socket 'To Min' (id: To Min)

None
to_max Float | Vector

socket 'To Max' (id: To Max)

None
clamp bool

parameter clamp

True

Returns:

Type Description
Float
Source code in core/generated/float.py
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
def map_range_smooth_step(self,
                from_min: Float | Vector = None,
                from_max: Float | Vector = None,
                to_min: Float | Vector = None,
                to_max: Float | Vector = None,
                clamp = True):
    """ > Node Map Range

    **Fixed values**

    | Kind      | Name                 | Value                |
    | --------- | -------------------- | -------------------- |
    | Socket    | Value                | `self`               |
    | Parameter | `data_type`          | from `from_min` type |
    | Parameter | `interpolation_type` | `'SMOOTHSTEP'`       |

    Parameters
    ----------
    from_min : Float | Vector, optional
        socket 'From Min' (id: From Min)

    from_max : Float | Vector, optional
        socket 'From Max' (id: From Max)

    to_min : Float | Vector, optional
        socket 'To Min' (id: To Min)

    to_max : Float | Vector, optional
        socket 'To Max' (id: To Max)

    clamp : bool
        parameter `clamp`


    Returns
    -------
    Float
    """
    data_type = SocketType.get_data_type_for_node(from_min, 'ShaderNodeMapRange')
    node = Node('Map Range', {'Value': self, 'From Min': from_min, 'From Max': from_max, 'To Min': to_min, 'To Max': to_max}, clamp=clamp, data_type=data_type, interpolation_type='SMOOTHSTEP')
    return node._out

map_range_smoother_step(from_min=None, from_max=None, to_min=None, to_max=None, clamp=True)

Node Map Range

Fixed values

Kind Name Value
Socket Value self
Parameter data_type from from_min type
Parameter interpolation_type 'SMOOTHERSTEP'

Parameters:

Name Type Description Default
from_min Float | Vector

socket 'From Min' (id: From Min)

None
from_max Float | Vector

socket 'From Max' (id: From Max)

None
to_min Float | Vector

socket 'To Min' (id: To Min)

None
to_max Float | Vector

socket 'To Max' (id: To Max)

None
clamp bool

parameter clamp

True

Returns:

Type Description
Float
Source code in core/generated/float.py
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
def map_range_smoother_step(self,
                from_min: Float | Vector = None,
                from_max: Float | Vector = None,
                to_min: Float | Vector = None,
                to_max: Float | Vector = None,
                clamp = True):
    """ > Node Map Range

    **Fixed values**

    | Kind      | Name                 | Value                |
    | --------- | -------------------- | -------------------- |
    | Socket    | Value                | `self`               |
    | Parameter | `data_type`          | from `from_min` type |
    | Parameter | `interpolation_type` | `'SMOOTHERSTEP'`     |

    Parameters
    ----------
    from_min : Float | Vector, optional
        socket 'From Min' (id: From Min)

    from_max : Float | Vector, optional
        socket 'From Max' (id: From Max)

    to_min : Float | Vector, optional
        socket 'To Min' (id: To Min)

    to_max : Float | Vector, optional
        socket 'To Max' (id: To Max)

    clamp : bool
        parameter `clamp`


    Returns
    -------
    Float
    """
    data_type = SocketType.get_data_type_for_node(from_min, 'ShaderNodeMapRange')
    node = Node('Map Range', {'Value': self, 'From Min': from_min, 'From Max': from_max, 'To Min': to_min, 'To Max': to_max}, clamp=clamp, data_type=data_type, interpolation_type='SMOOTHERSTEP')
    return node._out

map_range_stepped(from_min=None, from_max=None, to_min=None, to_max=None, steps=None, clamp=True)

Node Map Range

Fixed values

Kind Name Value
Socket Value self
Parameter data_type from from_min type
Parameter interpolation_type 'STEPPED'

Parameters:

Name Type Description Default
from_min Float | Vector

socket 'From Min' (id: From Min)

None
from_max Float | Vector

socket 'From Max' (id: From Max)

None
to_min Float | Vector

socket 'To Min' (id: To Min)

None
to_max Float | Vector

socket 'To Max' (id: To Max)

None
steps Float

socket 'Steps' (id: Steps)

None
clamp bool

parameter clamp

True

Returns:

Type Description
Float
Source code in core/generated/float.py
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
def map_range_stepped(self,
                from_min: Float | Vector = None,
                from_max: Float | Vector = None,
                to_min: Float | Vector = None,
                to_max: Float | Vector = None,
                steps: Float = None,
                clamp = True):
    """ > Node Map Range

    **Fixed values**

    | Kind      | Name                 | Value                |
    | --------- | -------------------- | -------------------- |
    | Socket    | Value                | `self`               |
    | Parameter | `data_type`          | from `from_min` type |
    | Parameter | `interpolation_type` | `'STEPPED'`          |

    Parameters
    ----------
    from_min : Float | Vector, optional
        socket 'From Min' (id: From Min)

    from_max : Float | Vector, optional
        socket 'From Max' (id: From Max)

    to_min : Float | Vector, optional
        socket 'To Min' (id: To Min)

    to_max : Float | Vector, optional
        socket 'To Max' (id: To Max)

    steps : Float, optional
        socket 'Steps' (id: Steps)

    clamp : bool
        parameter `clamp`


    Returns
    -------
    Float
    """
    data_type = SocketType.get_data_type_for_node(from_min, 'ShaderNodeMapRange')
    node = Node('Map Range', {'Value': self, 'From Min': from_min, 'From Max': from_max, 'To Min': to_min, 'To Max': to_max, 'Steps': steps}, clamp=clamp, data_type=data_type, interpolation_type='STEPPED')
    return node._out

max(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'MAXIMUM'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
def max(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'MAXIMUM'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='MAXIMUM', use_clamp=use_clamp)
    return node._out

menu_switch(self_name='Self', named_sockets={}, default_menu=None, **sockets)

Node Menu Switch

[&NO_JUMP]

Self is connected to the first menu item with the name provided as argument.

The items of the Menu Switch node are provided in the 'items' dict. An group input socket named after the 'name' argument is linked to menu selector.

Parameters:

Name Type Description Default
named_sockets dict

sockets to create default={}.

{}
default_menu str

default menu value default=None.

None
sockets dict

items

{}

Returns:

Type Description
Socket
Source code in core/socket_class.py
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
def menu_switch(self,
            self_name       : str = 'Self', 
            named_sockets   : dict = {},
            default_menu    : str = None,
            **sockets):
    """ > Node Menu Switch

    [&NO_JUMP]

    Self is connected to the first menu item with the name provided as argument.

    The items of the Menu Switch node are provided in the 'items' dict.
    An group input socket named after the 'name' argument is linked to menu selector.

    Parameters
    ----------
    named_sockets : dict, optional
        sockets to create default={}.

    default_menu : str, optional
        default menu value default=None.

    sockets : dict
        items


    Returns
    -------
    Socket
    """        
    return self.MenuSwitch(named_sockets = {self_name: self, **named_sockets}, default_menu=default_menu, **sockets)

mgreater_than(threshold=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'GREATER_THAN'

Parameters:

Name Type Description Default
threshold Float

socket 'Threshold' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
def mgreater_than(self, threshold: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value            |
    | --------- | ----------- | ---------------- |
    | Socket    | Value       | `self`           |
    | Parameter | `operation` | `'GREATER_THAN'` |

    Parameters
    ----------
    threshold : Float, optional
        socket 'Threshold' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': threshold}, operation='GREATER_THAN', use_clamp=use_clamp)
    return node._out

min(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'MINIMUM'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
def min(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'MINIMUM'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='MINIMUM', use_clamp=use_clamp)
    return node._out

mix(factor=None, other=None, clamp_factor=None)

Mix

Node Mix

Parameters:

Name Type Description Default
factor Float

socket 'Factor' (Factor_Float)

None
other Socket

socket 'B' (B_Float)

None
clamp_factor bool

Node.clamp_factor

None

Returns:

Type Description
Socket
Source code in core/sock_float.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
def mix(self, factor=None, other=None, clamp_factor=None):
    """ > Mix

    > Node Mix

    Parameters
    ----------
    factor : Float
        socket 'Factor' (Factor_Float)

    other : Socket
        socket 'B' (B_Float)

    clamp_factor : bool
        Node.clamp_factor

    Returns
    -------
    Socket
    """
    return Float(Node('Mix', {'Factor': factor, 'A': self, 'B': other}, clamp_factor=clamp_factor, data_type='FLOAT')._out)

mless_than(threshold=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'LESS_THAN'

Parameters:

Name Type Description Default
threshold Float

socket 'Threshold' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
def mless_than(self, threshold: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Socket    | Value       | `self`        |
    | Parameter | `operation` | `'LESS_THAN'` |

    Parameters
    ----------
    threshold : Float, optional
        socket 'Threshold' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': threshold}, operation='LESS_THAN', use_clamp=use_clamp)
    return node._out

modulo(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'MODULO'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
def modulo(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value      |
    | --------- | ----------- | ---------- |
    | Socket    | Value       | `self`     |
    | Parameter | `operation` | `'MODULO'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='MODULO', use_clamp=use_clamp)
    return node._out

multiply(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'MULTIPLY'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
def multiply(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `operation` | `'MULTIPLY'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='MULTIPLY', use_clamp=use_clamp)
    return node._out

multiply_add(multiplier=None, addend=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'MULTIPLY_ADD'

Parameters:

Name Type Description Default
multiplier Float

socket 'Multiplier' (id: Value_001)

None
addend Float

socket 'Addend' (id: Value_002)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
def multiply_add(self, multiplier: Float = None, addend: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value            |
    | --------- | ----------- | ---------------- |
    | Socket    | Value       | `self`           |
    | Parameter | `operation` | `'MULTIPLY_ADD'` |

    Parameters
    ----------
    multiplier : Float, optional
        socket 'Multiplier' (id: Value_001)

    addend : Float, optional
        socket 'Addend' (id: Value_002)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': multiplier, 'Value_002': addend}, operation='MULTIPLY_ADD', use_clamp=use_clamp)
    return node._out

normal_map(color=None, base='DISPLACED', convention='OPENGL', space='TANGENT', uv_map='')

Node Normal Map

Fixed values

Kind Name Value
Socket Strength self

Parameters:

Name Type Description Default
color Color

socket 'Color' (id: Color)

None
base Literal['Original Base', 'Displaced Base']

parameter base

'DISPLACED'
convention Literal['OpenGL', 'DirectX']

parameter convention

'OPENGL'
space Literal['Tangent Space', 'Object Space', 'World Space', 'Blender Object Space', 'Blender World Space']

parameter space

'TANGENT'
uv_map str

parameter uv_map

''

Returns:

Type Description
Vector
Source code in core/generated/float.py
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
def normal_map(self,
                color: Color = None,
                base: Literal['ORIGINAL', 'DISPLACED'] = 'DISPLACED',
                convention: Literal['OPENGL', 'DIRECTX'] = 'OPENGL',
                space: Literal['TANGENT', 'OBJECT', 'WORLD', 'BLENDER_OBJECT', 'BLENDER_WORLD'] = 'TANGENT',
                uv_map = ''):
    """ > Node Normal Map

    **Fixed values**

    | Kind   | Name     | Value  |
    | ------ | -------- | ------ |
    | Socket | Strength | `self` |

    Parameters
    ----------
    color : Color, optional
        socket 'Color' (id: Color)

    base : Literal['Original Base', 'Displaced Base']
        parameter `base`

    convention : Literal['OpenGL', 'DirectX']
        parameter `convention`

    space : Literal['Tangent Space', 'Object Space', 'World Space', 'Blender Object Space', 'Blender World Space']
        parameter `space`

    uv_map : str
        parameter `uv_map`


    Returns
    -------
    Vector
    """
    utils.check_enum_arg('Normal Map', 'base', base, 'normal_map', ('ORIGINAL', 'DISPLACED'))
    utils.check_enum_arg('Normal Map', 'convention', convention, 'normal_map', ('OPENGL', 'DIRECTX'))
    utils.check_enum_arg('Normal Map', 'space', space, 'normal_map', ('TANGENT', 'OBJECT', 'WORLD', 'BLENDER_OBJECT', 'BLENDER_WORLD'))
    node = Node('Normal Map', {'Strength': self, 'Color': color}, base=base, convention=convention, space=space, uv_map=uv_map)
    return node._out

not_equal(b=None, epsilon=None)

Node Compare

Fixed values

Kind Name Value
Socket A self
Parameter data_type 'FLOAT'
Parameter mode 'ELEMENT'
Parameter operation 'NOT_EQUAL'

Parameters:

Name Type Description Default
b Float

socket 'B' (id: B)

None
epsilon Float

socket 'Epsilon' (id: Epsilon)

None

Returns:

Type Description
Boolean
Source code in core/generated/float.py
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
def not_equal(self, b: Float = None, epsilon: Float = None):
    """ > Node Compare

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Socket    | A           | `self`        |
    | Parameter | `data_type` | `'FLOAT'`     |
    | Parameter | `mode`      | `'ELEMENT'`   |
    | Parameter | `operation` | `'NOT_EQUAL'` |

    Parameters
    ----------
    b : Float, optional
        socket 'B' (id: B)

    epsilon : Float, optional
        socket 'Epsilon' (id: Epsilon)


    Returns
    -------
    Boolean
    """
    node = Node('Compare', {'A': self, 'B': b, 'Epsilon': epsilon}, data_type='FLOAT', mode='ELEMENT', operation='NOT_EQUAL')
    return node._out

out(name=None, **props)

Connect to output

Behavior

  • Geometry Nodes : create a group output socket with the provided name
  • Shader : create a node AOV Output
Source code in core/sock_float.py
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
def out(self, name=None, **props):
    """ > Connect to output

    !!! important "Behavior"

        - Geometry Nodes : create a group output socket with the provided name
        - Shader : create a node AOV Output
    """
    if self._tree._btree.bl_idname == 'ShaderNodeTree' and not self._tree._is_group:
        if name is None:
            self._tree.set_thickness(self)
        else:
            self._tree.aov_output(name=name, value=self)
    else:
        super().out(name=name, **props)

pingpong(scale=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'PINGPONG'

Parameters:

Name Type Description Default
scale Float

socket 'Scale' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
def pingpong(self, scale: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `operation` | `'PINGPONG'` |

    Parameters
    ----------
    scale : Float, optional
        socket 'Scale' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': scale}, operation='PINGPONG', use_clamp=use_clamp)
    return node._out

power(exponent=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Base self
Parameter operation 'POWER'

Parameters:

Name Type Description Default
exponent Float

socket 'Exponent' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
def power(self, exponent: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Base        | `self`    |
    | Parameter | `operation` | `'POWER'` |

    Parameters
    ----------
    exponent : Float, optional
        socket 'Exponent' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': exponent}, operation='POWER', use_clamp=use_clamp)
    return node._out

prune_grid(mode=None, threshold=None)

Node Prune Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
mode menu='Threshold'

('Inactive', 'Threshold', 'SDF')

None
threshold Float

socket 'Threshold' (id: Threshold)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
def prune_grid(self,
                mode: Literal['Inactive', 'Threshold', 'SDF'] = None,
                threshold: Float = None):
    """ > Node Prune Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    mode : menu='Threshold', optional
        ('Inactive', 'Threshold', 'SDF')

    threshold : Float, optional
        socket 'Threshold' (id: Threshold)


    Returns
    -------
    Float
    """
    node = Node('Prune Grid', {'Grid': self, 'Mode': mode, 'Threshold': threshold}, data_type='FLOAT')
    return node._out

radians(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Degrees self
Parameter operation 'RADIANS'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
def radians(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Degrees     | `self`      |
    | Parameter | `operation` | `'RADIANS'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='RADIANS', use_clamp=use_clamp)
    return node._out

repeat(iterations=1, named_sockets={}, **sockets)

Repeat zone

Parameters:

Name Type Description Default
iterations Integer

iteration socket

1
named_sockets dict

named sockets

{}
sockets dict

other sockets

{}

Returns:

Type Description
ZoneIterator
Source code in core/socket_class.py
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
def repeat(self, iterations=1, named_sockets: dict={}, **sockets):
    """ Repeat zone

    Parameters
    ----------
    iterations : Integer, default=1
        iteration socket

    named_sockets : dict, default={}
        named sockets

    sockets : dict, optional
        other sockets


    Returns
    -------
    ZoneIterator
    """
    class_name = type(self).__name__
    node = ZoneNode("Repeat", named_sockets={class_name: self, **named_sockets}, Iterations=iterations, **sockets)
    return ZoneIterator(self, node)

round(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'ROUND'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
def round(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `operation` | `'ROUND'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='ROUND', use_clamp=use_clamp)
    return node._out

sample_grid(position=None, interpolation=None)

Node Sample Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
position Vector

socket 'Position' (id: Position)

None
interpolation menu='Trilinear'

('Nearest Neighbor', 'Trilinear', 'Triquadratic')

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
def sample_grid(self,
                position: Vector = None,
                interpolation: Literal['Nearest Neighbor', 'Trilinear', 'Triquadratic'] = None):
    """ > Node Sample Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    position : Vector, optional
        socket 'Position' (id: Position)

    interpolation : menu='Trilinear', optional
        ('Nearest Neighbor', 'Trilinear', 'Triquadratic')


    Returns
    -------
    Float
    """
    node = Node('Sample Grid', {'Grid': self, 'Position': position, 'Interpolation': interpolation}, data_type='FLOAT')
    return node._out

sample_grid_index(x=None, y=None, z=None)

Node Sample Grid Index

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
x Integer

socket 'X' (id: X)

None
y Integer

socket 'Y' (id: Y)

None
z Integer

socket 'Z' (id: Z)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
def sample_grid_index(self, x: Integer = None, y: Integer = None, z: Integer = None):
    """ > Node Sample Grid Index

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    x : Integer, optional
        socket 'X' (id: X)

    y : Integer, optional
        socket 'Y' (id: Y)

    z : Integer, optional
        socket 'Z' (id: Z)


    Returns
    -------
    Float
    """
    node = Node('Sample Grid Index', {'Grid': self, 'X': x, 'Y': y, 'Z': z}, data_type='FLOAT')
    return node._out

scene_time()

Node Scene Time

Returns:

Type Description
Float

peer sockets: frame_ (Float)

Source code in core/generated/float.py
468
469
470
471
472
473
474
475
476
477
478
479
@utils.classproperty
def scene_time(cls):
    """ > Node Scene Time

    Returns
    -------
    Float
        peer sockets: frame_ (Float)

    """
    node = Node('Scene Time', )
    return node._out

sdf_difference(*grid_2)

Node SDF Grid Boolean

Fixed values

Kind Name Value
Socket Grid 1 self
Parameter operation 'DIFFERENCE'

Parameters:

Name Type Description Default
grid_2 Float

socket 'Grid 2' (id: Grid 2)

()

Returns:

Type Description
Float
Source code in core/generated/float.py
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
def sdf_difference(self, *grid_2: Float):
    """ > Node SDF Grid Boolean

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | Grid 1      | `self`         |
    | Parameter | `operation` | `'DIFFERENCE'` |

    Parameters
    ----------
    grid_2 : Float, optional
        socket 'Grid 2' (id: Grid 2)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Boolean', {'Grid 1': self, 'Grid 2': list(grid_2)}, operation='DIFFERENCE')
    return node._out

sdf_grid_boolean(*grid_2, operation='DIFFERENCE')

Node SDF Grid Boolean

Fixed values

Kind Name Value
Socket Grid 1 self

Parameters:

Name Type Description Default
grid_2 Float

socket 'Grid 2' (id: Grid 2)

()
operation Literal['Intersect', 'Union', 'Difference']

parameter operation

'DIFFERENCE'

Returns:

Type Description
Float
Source code in core/generated/float.py
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
def sdf_grid_boolean(self,
                *grid_2: Float,
                operation: Literal['INTERSECT', 'UNION', 'DIFFERENCE'] = 'DIFFERENCE'):
    """ > Node SDF Grid Boolean

    **Fixed values**

    | Kind   | Name   | Value  |
    | ------ | ------ | ------ |
    | Socket | Grid 1 | `self` |

    Parameters
    ----------
    grid_2 : Float, optional
        socket 'Grid 2' (id: Grid 2)

    operation : Literal['Intersect', 'Union', 'Difference']
        parameter `operation`


    Returns
    -------
    Float
    """
    utils.check_enum_arg('SDF Grid Boolean', 'operation', operation, 'sdf_grid_boolean', ('INTERSECT', 'UNION', 'DIFFERENCE'))
    node = Node('SDF Grid Boolean', {'Grid 1': self, 'Grid 2': list(grid_2)}, operation=operation)
    return node._out

sdf_grid_fillet(iterations=None)

Node SDF Grid Fillet

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
def sdf_grid_fillet(self, iterations: Integer = None):
    """ > Node SDF Grid Fillet

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Fillet', {'Grid': self, 'Iterations': iterations})
    return node._out

sdf_grid_laplacian(iterations=None)

Node SDF Grid Laplacian

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
def sdf_grid_laplacian(self, iterations: Integer = None):
    """ > Node SDF Grid Laplacian

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Laplacian', {'Grid': self, 'Iterations': iterations})
    return node._out

sdf_grid_mean(width=None, iterations=None)

Node SDF Grid Mean

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
width Integer

socket 'Width' (id: Width)

None
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
def sdf_grid_mean(self, width: Integer = None, iterations: Integer = None):
    """ > Node SDF Grid Mean

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    width : Integer, optional
        socket 'Width' (id: Width)

    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Mean', {'Grid': self, 'Width': width, 'Iterations': iterations})
    return node._out

sdf_grid_mean_curvature(iterations=None)

Node SDF Grid Mean Curvature

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
def sdf_grid_mean_curvature(self, iterations: Integer = None):
    """ > Node SDF Grid Mean Curvature

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Mean Curvature', {'Grid': self, 'Iterations': iterations})
    return node._out

sdf_grid_median(width=None, iterations=None)

Node SDF Grid Median

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
width Integer

socket 'Width' (id: Width)

None
iterations Integer

socket 'Iterations' (id: Iterations)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
def sdf_grid_median(self, width: Integer = None, iterations: Integer = None):
    """ > Node SDF Grid Median

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    width : Integer, optional
        socket 'Width' (id: Width)

    iterations : Integer, optional
        socket 'Iterations' (id: Iterations)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Median', {'Grid': self, 'Width': width, 'Iterations': iterations})
    return node._out

sdf_grid_offset(distance=None)

Node SDF Grid Offset

Fixed values

Kind Name Value
Socket Grid self

Parameters:

Name Type Description Default
distance Float

socket 'Distance' (id: Distance)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
def sdf_grid_offset(self, distance: Float = None):
    """ > Node SDF Grid Offset

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Grid | `self` |

    Parameters
    ----------
    distance : Float, optional
        socket 'Distance' (id: Distance)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Offset', {'Grid': self, 'Distance': distance})
    return node._out

sdf_intersect(*grid)

Node SDF Grid Boolean

Fixed values

Kind Name Value
Parameter operation 'INTERSECT'

Parameters:

Name Type Description Default
grid Float

socket 'Grid' (id: Grid 2)

()

Returns:

Type Description
Float
Source code in core/generated/float.py
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
def sdf_intersect(self, *grid: Float):
    """ > Node SDF Grid Boolean

    **Fixed values**

    | Kind      | Name        | Value         |
    | --------- | ----------- | ------------- |
    | Parameter | `operation` | `'INTERSECT'` |

    Parameters
    ----------
    grid : Float, optional
        socket 'Grid' (id: Grid 2)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Boolean', {'Grid 2': [self] + list(grid)}, operation='INTERSECT')
    return node._out

sdf_union(*grid)

Node SDF Grid Boolean

Fixed values

Kind Name Value
Parameter operation 'UNION'

Parameters:

Name Type Description Default
grid Float

socket 'Grid' (id: Grid 2)

()

Returns:

Type Description
Float
Source code in core/generated/float.py
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
def sdf_union(self, *grid: Float):
    """ > Node SDF Grid Boolean

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Parameter | `operation` | `'UNION'` |

    Parameters
    ----------
    grid : Float, optional
        socket 'Grid' (id: Grid 2)


    Returns
    -------
    Float
    """
    node = Node('SDF Grid Boolean', {'Grid 2': [self] + list(grid)}, operation='UNION')
    return node._out

seconds()

Node Scene Time

Returns:

Type Description
seconds
Source code in core/generated/float.py
481
482
483
484
485
486
487
488
489
490
@utils.classproperty
def seconds(cls):
    """ > Node Scene Time

    Returns
    -------
    seconds
    """
    node = Node('Scene Time', )
    return node.seconds

set_grid_background(background=None, update_inactive=None)

Node Set Grid Background

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
background Float

socket 'Background' (id: Background)

None
update_inactive Boolean

socket 'Update Inactive' (id: Update Inactive)

None

Returns:

Type Description
Float
Source code in core/generated/float.py
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
def set_grid_background(self, background: Float = None, update_inactive: Boolean = None):
    """ > Node Set Grid Background

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    background : Float, optional
        socket 'Background' (id: Background)

    update_inactive : Boolean, optional
        socket 'Update Inactive' (id: Update Inactive)


    Returns
    -------
    Float
    """
    node = Node('Set Grid Background', {'Grid': self, 'Background': background, 'Update Inactive': update_inactive}, data_type='FLOAT')
    return node._out

set_grid_transform(transform=None)

Node Set Grid Transform

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
transform Matrix

socket 'Transform' (id: Transform)

None

Returns:

Type Description
Boolean

peer sockets: grid_ (Float)

Source code in core/generated/float.py
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
def set_grid_transform(self, transform: Matrix = None):
    """ > Node Set Grid Transform

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    transform : Matrix, optional
        socket 'Transform' (id: Transform)


    Returns
    -------
    Boolean
        peer sockets: grid_ (Float)

    """
    node = Node('Set Grid Transform', {'Grid': self, 'Transform': transform}, data_type='FLOAT')
    return node._out

sign(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SIGN'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
def sign(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'SIGN'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='SIGN', use_clamp=use_clamp)
    return node._out

simulation(named_sockets={}, **sockets)

Simulation zone

Parameters:

Name Type Description Default
named_sockets dict

named sockets

{}
sockets dict

other sockets

{}

Returns:

Type Description
ZoneIterator
Source code in core/socket_class.py
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
def simulation(self, named_sockets: dict={}, **sockets):
    """ Simulation zone

    Parameters
    ----------
    named_sockets : dict, default={}
        named sockets

    sockets : dict, optional
        other sockets

    Returns
    -------
    ZoneIterator
    """
    class_name = type(self).__name__
    node = ZoneNode("Simulation", named_sockets={class_name: self, **named_sockets}, **sockets)
    return ZoneIterator(self, node)

sin(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SINE'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
def sin(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'SINE'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='SINE', use_clamp=use_clamp)
    return node._out

sinh(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SINH'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
def sinh(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'SINH'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='SINH', use_clamp=use_clamp)
    return node._out

smooth_max(value=None, distance=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SMOOTH_MAX'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
distance Float

socket 'Distance' (id: Value_002)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
def smooth_max(self, value: Float = None, distance: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | Value       | `self`         |
    | Parameter | `operation` | `'SMOOTH_MAX'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    distance : Float, optional
        socket 'Distance' (id: Value_002)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value, 'Value_002': distance}, operation='SMOOTH_MAX', use_clamp=use_clamp)
    return node._out

smooth_min(value=None, distance=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SMOOTH_MIN'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
distance Float

socket 'Distance' (id: Value_002)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
def smooth_min(self, value: Float = None, distance: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value          |
    | --------- | ----------- | -------------- |
    | Socket    | Value       | `self`         |
    | Parameter | `operation` | `'SMOOTH_MIN'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    distance : Float, optional
        socket 'Distance' (id: Value_002)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value, 'Value_002': distance}, operation='SMOOTH_MIN', use_clamp=use_clamp)
    return node._out

snap(increment=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SNAP'

Parameters:

Name Type Description Default
increment Float

socket 'Increment' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
def snap(self, increment: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'SNAP'` |

    Parameters
    ----------
    increment : Float, optional
        socket 'Increment' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': increment}, operation='SNAP', use_clamp=use_clamp)
    return node._out

sqrt(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SQRT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
def sqrt(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'SQRT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='SQRT', use_clamp=use_clamp)
    return node._out

subtract(value=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'SUBTRACT'

Parameters:

Name Type Description Default
value Float

socket 'Value' (id: Value_001)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
def subtract(self, value: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value        |
    | --------- | ----------- | ------------ |
    | Socket    | Value       | `self`       |
    | Parameter | `operation` | `'SUBTRACT'` |

    Parameters
    ----------
    value : Float, optional
        socket 'Value' (id: Value_001)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': value}, operation='SUBTRACT', use_clamp=use_clamp)
    return node._out

switch(condition=None, true=None)

Node Switch

Self is connected to 'false' socket.

Note

switch returns self if global constant SWITCH_JUMP = True (default) set SWITCH_JUMP = False for legacy behavior

with GeoNodes("Switch demo"):

    from geonodes.core import constants
    # Legacy behavior (default is True)
    constants.SWITCH_JUMP = False

    choice = Boolean(True, "Use Sphere")

    # Two possible geometries
    cube   = Mesh.Cube()
    sphere = Mesh.IcoSphere()

    # Select
    # Legacy behavior: cube is unchanged otherwise cube
    geo = cube.switch(choice, sphere)

    # To group output
    geo.out()
Information
  • Socket 'False' : self

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
true

socket 'True' (True)

None

Returns:

Type Description
Socket(self)
Source code in core/socket_class.py
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
def switch(self, condition=None, true=None):
    """ > Node Switch

    Self is connected to 'false' socket.

    !!! note
        switch returns self if global constant SWITCH_JUMP = True (default)
        set SWITCH_JUMP = False for legacy behavior

    ``` python
    with GeoNodes("Switch demo"):

        from geonodes.core import constants
        # Legacy behavior (default is True)
        constants.SWITCH_JUMP = False

        choice = Boolean(True, "Use Sphere")

        # Two possible geometries
        cube   = Mesh.Cube()
        sphere = Mesh.IcoSphere()

        # Select
        # Legacy behavior: cube is unchanged otherwise cube
        geo = cube.switch(choice, sphere)

        # To group output
        geo.out()
    ```

    Information
    -----------
    - Socket 'False' : self

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    true
        socket 'True' (True)


    Returns
    -------
    Socket (self)
    """
    res = self.Switch(condition=condition, false=self, true=true)
    if constants.SWITCH_JUMP:
        return self._jump(res)
    else:
        return res

switch_false(condition=None, false=None)

Node Switch

[&JUMP]

Self is connected to 'true' socket.

Important

This methods behaves the inverse of switch : self is connected to "True" socket and the argument to "False", socket

Note

This method is mainly provided to cover the case when 'False' socket is None

with GeoNodes("Switch demo"):

    geo = Geometry()

    show_geometry = Boolean(False, "Merge with Cube")

    cube = Mesh.Cube()

    geo += cube.switch_false(show_geometry)

    # Is equivalent to
    geo += Geometry.Switch(show_geometry, None, cube)

    # To group output
    geo.out()

Note

This method let self socket unchanged. To set self socket to the result

Information
  • Socket 'True' : self

Parameters:

Name Type Description Default
condition Boolean

socket 'Switch' (Switch)

None
false

socket 'False' (False)

None

Returns:

Type Description
Socket
Source code in core/socket_class.py
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
def switch_false(self, condition=None, false=None):
    """ > Node Switch

    [&JUMP]

    Self is connected to 'true' socket.

    !!! important
        This methods behaves the inverse of switch : self is connected to "True" socket and  the argument to "False", socket

    !!! note
        This method is mainly provided to cover the case when 'False' socket is None

    ``` python
    with GeoNodes("Switch demo"):

        geo = Geometry()

        show_geometry = Boolean(False, "Merge with Cube")

        cube = Mesh.Cube()

        geo += cube.switch_false(show_geometry)

        # Is equivalent to
        geo += Geometry.Switch(show_geometry, None, cube)

        # To group output
        geo.out()
    ```

    !!! note
        This method let self socket unchanged. To set self socket to the result

    Information
    -----------
    - Socket 'True' : self

    Parameters
    ----------
    condition : Boolean
        socket 'Switch' (Switch)

    false
        socket 'False' (False)


    Returns
    -------
    Socket
    """
    res = self.Switch(condition=condition, false=false, true=self)
    if constants.SWITCH_JUMP:
        return self._jump(res)
    else:
        return res

tan(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'TANGENT'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
def tan(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value       |
    | --------- | ----------- | ----------- |
    | Socket    | Value       | `self`      |
    | Parameter | `operation` | `'TANGENT'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='TANGENT', use_clamp=use_clamp)
    return node._out

tanh(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'TANH'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
def tanh(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'TANH'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='TANH', use_clamp=use_clamp)
    return node._out

to_integer(rounding_mode='ROUND')

Node Float to Integer

Fixed values

Kind Name Value
Socket Float self

Parameters:

Name Type Description Default
rounding_mode Literal['Round', 'Floor', 'Ceiling', 'Truncate']

parameter rounding_mode

'ROUND'

Returns:

Type Description
Integer
Source code in core/generated/float.py
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
def to_integer(self,
                rounding_mode: Literal['ROUND', 'FLOOR', 'CEILING', 'TRUNCATE'] = 'ROUND'):
    """ > Node Float to Integer

    **Fixed values**

    | Kind   | Name  | Value  |
    | ------ | ----- | ------ |
    | Socket | Float | `self` |

    Parameters
    ----------
    rounding_mode : Literal['Round', 'Floor', 'Ceiling', 'Truncate']
        parameter `rounding_mode`


    Returns
    -------
    Integer
    """
    utils.check_enum_arg('Float to Integer', 'rounding_mode', rounding_mode, 'to_integer', ('ROUND', 'FLOOR', 'CEILING', 'TRUNCATE'))
    node = Node('Float to Integer', {'Float': self}, rounding_mode=rounding_mode)
    return node._out

to_string(decimals=None)

Node Value to String

Fixed values

Kind Name Value
Socket Value self
Parameter data_type 'FLOAT'

Parameters:

Name Type Description Default
decimals Integer

socket 'Decimals' (id: Decimals)

None

Returns:

Type Description
String
Source code in core/generated/float.py
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
def to_string(self, decimals: Integer = None):
    """ > Node Value to String

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Parameters
    ----------
    decimals : Integer, optional
        socket 'Decimals' (id: Decimals)


    Returns
    -------
    String
    """
    node = Node('Value to String', {'Value': self, 'Decimals': decimals}, data_type='FLOAT')
    return node._out

trunc(use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'TRUNC'

Parameters:

Name Type Description Default
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
def trunc(self, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Value       | `self`    |
    | Parameter | `operation` | `'TRUNC'` |

    Parameters
    ----------
    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self}, operation='TRUNC', use_clamp=use_clamp)
    return node._out

voxel_index() classmethod

Node Voxel Index

Returns:

Type Description
Integer

peer sockets: y_ (Integer), z_ (Integer), is_tile_ (Boolean), extent_x_ (Integer), extent_y_ (Integer), extent_z_ (Integer)

Source code in core/generated/float.py
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
@classmethod
def voxel_index(cls):
    """ > Node Voxel Index

    Returns
    -------
    Integer
        peer sockets: y_ (Integer), z_ (Integer), is_tile_ (Boolean), extent_x_ (Integer), extent_y_ (Integer), extent_z_ (Integer)

    """
    node = Node('Voxel Index', )
    return node._out

voxelize_grid()

Node Voxelize Grid

Fixed values

Kind Name Value
Socket Grid self
Parameter data_type 'FLOAT'

Returns:

Type Description
Float
Source code in core/generated/float.py
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
def voxelize_grid(self):
    """ > Node Voxelize Grid

    **Fixed values**

    | Kind      | Name        | Value     |
    | --------- | ----------- | --------- |
    | Socket    | Grid        | `self`    |
    | Parameter | `data_type` | `'FLOAT'` |

    Returns
    -------
    Float
    """
    node = Node('Voxelize Grid', {'Grid': self}, data_type='FLOAT')
    return node._out

wavelength()

Node Wavelength

Fixed values

Kind Name Value
Socket Wavelength self

Returns:

Type Description
Color
Source code in core/generated/float.py
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
def wavelength(self):
    """ > Node Wavelength

    **Fixed values**

    | Kind   | Name       | Value  |
    | ------ | ---------- | ------ |
    | Socket | Wavelength | `self` |

    Returns
    -------
    Color
    """
    node = Node('Wavelength', {'Wavelength': self})
    return node._out

wireframe(use_pixel_size=False)

Node Wireframe

Fixed values

Kind Name Value
Socket Size self

Parameters:

Name Type Description Default
use_pixel_size bool

parameter use_pixel_size

False

Returns:

Type Description
Float
Source code in core/generated/float.py
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
def wireframe(self, use_pixel_size = False):
    """ > Node Wireframe

    **Fixed values**

    | Kind   | Name | Value  |
    | ------ | ---- | ------ |
    | Socket | Size | `self` |

    Parameters
    ----------
    use_pixel_size : bool
        parameter `use_pixel_size`


    Returns
    -------
    Float
    """
    node = Node('Wireframe', {'Size': self}, use_pixel_size=use_pixel_size)
    return node._out

wrap(max=None, min=None, use_clamp=False)

Node Math

Fixed values

Kind Name Value
Socket Value self
Parameter operation 'WRAP'

Parameters:

Name Type Description Default
max Float

socket 'Max' (id: Value_001)

None
min Float

socket 'Min' (id: Value_002)

None
use_clamp bool

parameter use_clamp

False

Returns:

Type Description
Float
Source code in core/generated/float.py
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
def wrap(self, max: Float = None, min: Float = None, use_clamp = False):
    """ > Node Math

    **Fixed values**

    | Kind      | Name        | Value    |
    | --------- | ----------- | -------- |
    | Socket    | Value       | `self`   |
    | Parameter | `operation` | `'WRAP'` |

    Parameters
    ----------
    max : Float, optional
        socket 'Max' (id: Value_001)

    min : Float, optional
        socket 'Min' (id: Value_002)

    use_clamp : bool
        parameter `use_clamp`


    Returns
    -------
    Float
    """
    node = Node('Math', {'Value': self, 'Value_001': max, 'Value_002': min}, operation='WRAP', use_clamp=use_clamp)
    return node._out