-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- black -> Ruff - wip nodes (Curve, FilterZ, Plot Batch Floats)
- Loading branch information
Showing
11 changed files
with
617 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""MTB Nodes module.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import json | ||
|
||
|
||
def deserialize_curve(curve): | ||
if isinstance(curve, str): | ||
curve = json.loads(curve) | ||
return curve | ||
|
||
|
||
def serialize_curve(curve): | ||
if not isinstance(curve, str): | ||
curve = json.dumps(curve) | ||
return curve | ||
|
||
|
||
class MTB_Curve: | ||
"""A basic FLOAT_CURVE input node.""" | ||
|
||
@classmethod | ||
def INPUT_TYPES(cls): | ||
return { | ||
"required": { | ||
"curve": ("FLOAT_CURVE",), | ||
}, | ||
} | ||
|
||
RETURN_TYPES = ("FLOAT_CURVE",) | ||
FUNCTION = "do_curve" | ||
|
||
CATEGORY = "mtb/curve" | ||
|
||
def do_curve(self, curve): | ||
return (curve,) | ||
|
||
|
||
__nodes__ = [MTB_Curve] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.