-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
97 additions
and
77 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
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,50 @@ | ||
""" | ||
Jovi_Spout - http://www.github.com/Amorano/Jovi_Spout | ||
Core | ||
""" | ||
|
||
from .. import JOVBaseNode | ||
|
||
# ============================================================================== | ||
# === CORE NODES === | ||
# ============================================================================== | ||
|
||
class JOVImageNode(JOVBaseNode): | ||
RETURN_TYPES = ("IMAGE", "IMAGE", "MASK") | ||
RETURN_NAMES = ("RGBA", "RGB", "MASK") | ||
|
||
@classmethod | ||
def INPUT_TYPES(cls) -> dict: | ||
d = super().INPUT_TYPES() | ||
d = deep_merge(d, { | ||
"outputs": { | ||
0: ("IMAGE", {"tooltip":"Full channel [RGBA] image. If there is an alpha, the image will be masked out with it when using this output."}), | ||
1: ("IMAGE", {"tooltip":"Three channel [RGB] image. There will be no alpha."}), | ||
2: ("MASK", {"tooltip":"Single channel mask output."}), | ||
} | ||
}) | ||
return d | ||
|
||
# ============================================================================== | ||
# === SUPPORT === | ||
# ============================================================================== | ||
|
||
def deep_merge(d1: dict, d2: dict) -> dict: | ||
""" | ||
Deep merge multiple dictionaries recursively. | ||
Args: | ||
*dicts: Variable number of dictionaries to be merged. | ||
Returns: | ||
dict: Merged dictionary. | ||
""" | ||
for key in d2: | ||
if key in d1: | ||
if isinstance(d1[key], dict) and isinstance(d2[key], dict): | ||
deep_merge(d1[key], d2[key]) | ||
else: | ||
d1[key] = d2[key] | ||
else: | ||
d1[key] = d2[key] | ||
return d1 |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"SPOUT READER (JOV_SP) \ud83d\udcfa": "Capture frames from Spout streams", | ||
"SPOUT WRITER (JOV_SP) \ud83c\udfa5": "Sends frame(s) to a specified Spout receiver application for real-time video sharing" | ||
"SPOUT READER (JOV_SPOUT)": "Capture frames from Spout streams", | ||
"SPOUT WRITER (JOV_SPOUT)": "Sends frame(s) to a specified Spout receiver application for real-time video sharing" | ||
} |
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