Browse Source

Show icons in insert node dialog.

builtin-nodes
Ben Niemann 3 years ago
parent
commit
c943386dee
  1. 3
      data/icons/CMakeLists.txt
  2. 69
      data/icons/node-type-builtin.svg
  3. 109
      data/icons/node-type-ladspa.svg
  4. 3
      data/icons/node-type-lv2.license
  5. 80
      data/icons/node-type-lv2.orig.svg
  6. 86
      data/icons/node-type-lv2.svg
  7. 1
      noisicaa/builtin_nodes/beat_track/node_description.py
  8. 1
      noisicaa/builtin_nodes/control_track/node_description.py
  9. 1
      noisicaa/builtin_nodes/custom_csound/node_description.py
  10. 1
      noisicaa/builtin_nodes/instrument/node_description.py
  11. 1
      noisicaa/builtin_nodes/midi_source/node_description.py
  12. 1
      noisicaa/builtin_nodes/mixer/node_description.py
  13. 1
      noisicaa/builtin_nodes/sample_track/node_description.py
  14. 1
      noisicaa/builtin_nodes/score_track/node_description.py
  15. 3
      noisicaa/node_db/node_description.proto
  16. 1
      noisicaa/node_db/private/csound_scanner.py
  17. 1
      noisicaa/node_db/private/ladspa_scanner.py
  18. 1
      noisicaa/node_db/private/lv2_scanner.py
  19. 7
      noisicaa/ui/graph/canvas.py

3
data/icons/CMakeLists.txt

@ -31,6 +31,9 @@ install_files(
edit-beats.svg
edit-control-points.svg
edit-samples.svg
node-type-builtin.svg
node-type-ladspa.svg
node-type-lv2.svg
note-16th.svg
note-32th.svg
note-8th.svg

69
data/icons/node-type-builtin.svg

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="30"
id="svg2"
version="1.1"
viewBox="147 151 60 60"
width="30"
sodipodi:docname="node-type-builtin.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata3495">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1373"
id="namedview3493"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="15.55323"
inkscape:cy="15.50392"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer2" />
<defs
id="defs10" />
<g
id="layer2"
style="display:inline"
transform="translate(0,-637.6694)"
inkscape:groupmode="layer"
inkscape:label="Symbol">
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:91.03184509px;line-height:125%;font-family:Dyuthi;-inkscape-font-specification:'Dyuthi, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:9.10318494pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="144.21875"
y="846.13898"
id="text2179"><tspan
sodipodi:role="line"
id="tspan2177"
x="144.21875"
y="846.13898"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:91.03184509px;font-family:Dyuthi;-inkscape-font-specification:'Dyuthi, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;stroke-width:9.10318494pt">N</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

109
data/icons/node-type-ladspa.svg

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="30"
id="svg2"
version="1.1"
viewBox="147 151 60 60"
width="30"
sodipodi:docname="node-type-ladspa.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata3495">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1373"
id="namedview3493"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="10.006355"
inkscape:cy="14.56642"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer2" />
<defs
id="defs10" />
<g
id="layer2"
style="display:inline"
transform="translate(0,-637.6694)"
inkscape:groupmode="layer"
inkscape:label="Symbol">
<flowRoot
xml:space="preserve"
id="flowRoot1549"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.00000003pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
transform="matrix(2.701507,0,0,2.701507,135.14643,786.61524)"><flowRegion
id="flowRegion1551"><rect
id="rect1553"
width="23.8125"
height="22.75"
x="3.90625"
y="5.4375" /></flowRegion><flowPara
id="flowPara1555">LADSPA</flowPara><flowPara
id="flowPara1557" /></flowRoot> <g
aria-label="LAD"
transform="matrix(2.701507,0,0,2.701507,160.97959,803.49966)"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.00000003pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="flowRoot1559">
<path
d="M -4.4482422,4.4414062 V 3.9238281 h 0.9277344 v -6.25 h -0.9277344 v -0.5224609 h 2.8466797 v 0.5224609 H -2.5292969 V 3.8408203 H 0.80078125 V 2.6201172 H 1.4013672 v 1.821289 z"
id="path1590"
inkscape:connector-curvature="0" />
<path
d="M 3.6425781,1.7998047 H 6.3183594 L 4.9804687,-1.6669922 Z M 1.5820312,4.4414062 V 3.9238281 H 2.2216797 L 4.8193359,-2.8486328 H 5.6396484 L 8.2421875,3.9238281 H 8.9599609 V 4.4414062 H 6.3085937 V 3.9238281 H 7.1191406 L 6.5087891,2.3222656 H 3.4423828 L 2.8320313,3.9238281 h 0.8007812 v 0.5175781 z"
id="path1592"
inkscape:connector-curvature="0" />
<path
d="m 11.337891,3.9238281 h 0.908203 q 1.420898,0 2.177734,-0.8105468 0.761719,-0.8105469 0.761719,-2.3242188 0,-1.51367187 -0.756836,-2.3144531 -0.756836,-0.8007813 -2.182617,-0.8007813 H 11.337891 Z M 9.4189453,4.4414062 V 3.9238281 H 10.34668 v -6.25 H 9.4189453 v -0.5224609 h 2.9003907 q 1.884766,0 2.93457,0.9619141 1.054688,0.96191401 1.054688,2.6757812 0,1.71875 -1.054688,2.6855469 -1.054687,0.9667968 -2.93457,0.9667968 z"
id="path1594"
inkscape:connector-curvature="0" />
</g>
<g
aria-label="SPA"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:20px;line-height:125%;font-family:'DejaVu Serif';-inkscape-font-specification:'DejaVu Serif';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.00000006pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
id="text1577"
transform="matrix(1.3507535,0,0,1.3507535,-62.083371,-278.68272)">
<path
d="m 158.02051,828.34125 v -3.32031 l 1.12304,0.01 q 0.0488,1.66016 0.95704,2.46094 0.91796,0.79101 2.7832,0.79101 1.73828,0 2.64648,-0.68359 0.91797,-0.69336 0.91797,-2.01172 0,-1.05469 -0.55664,-1.62109 -0.54687,-0.56641 -2.32422,-1.10352 l -1.92383,-0.57617 q -2.08984,-0.63477 -2.94921,-1.58203 -0.84961,-0.94727 -0.84961,-2.59766 0,-1.85547 1.31836,-2.88086 1.31836,-1.02539 3.70117,-1.02539 1.01562,0 2.22656,0.22461 1.21094,0.21485 2.57813,0.63477 v 3.10547 h -1.10352 q -0.16602,-1.54297 -1.03516,-2.22657 -0.85937,-0.69336 -2.62695,-0.69336 -1.54297,0 -2.35352,0.63477 -0.80078,0.625 -0.80078,1.82617 0,1.04492 0.60547,1.64063 0.60547,0.5957 2.56836,1.18164 l 1.80664,0.53711 q 1.98242,0.5957 2.82227,1.52343 0.84961,0.91797 0.84961,2.47071 0,2.11914 -1.35742,3.19336 -1.35743,1.07422 -4.04297,1.07422 -1.20118,0 -2.45118,-0.24414 -1.24023,-0.24415 -2.52929,-0.74219 z"
style="stroke-width:2.00000006pt"
id="path1583"
inkscape:connector-curvature="0" />
<path
d="m 174.81738,821.6225 h 2.57813 q 1.45508,0 2.21679,-0.78125 0.76172,-0.79102 0.76172,-2.27539 0,-1.49414 -0.76172,-2.27539 -0.76171,-0.78125 -2.21679,-0.78125 h -2.57813 z m -3.83789,7.42187 v -1.03515 h 1.85547 v -12.5 h -1.85547 v -1.04493 h 6.89453 q 2.1875,0 3.4668,1.11329 1.2793,1.10351 1.2793,2.98828 0,1.875 -1.2793,2.98828 -1.2793,1.11328 -3.4668,1.11328 h -3.05664 v 5.3418 h 2.25586 v 1.03515 z"
style="stroke-width:2.00000006pt"
id="path1585"
inkscape:connector-curvature="0" />
<path
d="m 185.52051,823.76117 h 5.35156 l -2.67578,-6.93359 z m -4.1211,5.2832 v -1.03515 h 1.2793 l 5.19531,-13.54493 h 1.64063 l 5.20508,13.54493 h 1.43554 v 1.03515 h -5.30273 v -1.03515 h 1.62109 l -1.2207,-3.20313 h -6.13281 l -1.22071,3.20313 h 1.60157 v 1.03515 z"
style="stroke-width:2.00000006pt"
id="path1587"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.6 KiB

3
data/icons/node-type-lv2.license

@ -0,0 +1,3 @@
Source: http://lv2plug.in/git/cgit.cgi/lv2site.git/tree/content/images/logo.svg
Author: David Robillard <http://drobilla.net/>
Licence: https://opensource.org/licenses/ISC

80
data/icons/node-type-lv2.orig.svg

@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="svg2"
xml:space="preserve"
width="523.89148pt"
height="490.5pt"
viewBox="0 0 698.52205 654.00007"
sodipodi:docname="logo.svg"
inkscape:version="0.92.4 5da689c313, 2019-01-14"
inkscape:export-filename="/home/drobilla/Documents/lv2_flat_purple_padded.png"
inkscape:export-xdpi="68.776169"
inkscape:export-ydpi="68.776169"><metadata
id="metadata8"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs6" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="3816"
inkscape:window-height="2100"
id="namedview4"
showgrid="false"
showguides="false"
fit-margin-top="1"
fit-margin-right="1"
fit-margin-bottom="1"
fit-margin-left="1"
inkscape:zoom="0.70710678"
inkscape:cx="61.988138"
inkscape:cy="477.06434"
inkscape:window-x="12"
inkscape:window-y="48"
inkscape:window-maximized="0"
inkscape:current-layer="g10"
inkscape:pagecheckerboard="true"
units="pt" /><g
id="g10"
inkscape:groupmode="layer"
inkscape:label="ink_ext_XXXXXX"
transform="matrix(1.3333333,0,0,-1.3333333,-3439.8194,207.04495)"><path
inkscape:connector-curvature="0"
id="path5626"
style="opacity:1;vector-effect:none;fill:#546e00;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 2713.1145,150.03372 96,-352 h 192 l -34.91,-128 h -250.18 l -130.91,480 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" /><path
inkscape:connector-curvature="0"
id="path5632"
style="opacity:1;vector-effect:none;fill:#b4c342;fill-opacity:1;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 2713.1145,150.03372 96,-352 h 64 l 96,352 h -64 l -64,-234.668003 -64,234.668003 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" /><path
inkscape:connector-curvature="0"
id="path5636"
style="opacity:1;vector-effect:none;fill:#96ac00;fill-opacity:1;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 2873.1145,-201.96628 h 64 l 96,352 h -64 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" /><path
inkscape:connector-curvature="0"
id="path5640"
style="opacity:1;vector-effect:none;fill:#859900;fill-opacity:1;stroke:#ffffff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 2937.1145,-201.96628 h 64 l 96,352 h -64 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" /></g></svg>

After

Width:  |  Height:  |  Size: 3.7 KiB

86
data/icons/node-type-lv2.svg

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
height="30"
id="svg2"
version="1.1"
viewBox="147 151 60 60"
width="30"
sodipodi:docname="node-type-lv2.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata3495">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1373"
id="namedview3493"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="10.006355"
inkscape:cy="17.96332"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer2" />
<defs
id="defs10" />
<g
id="layer2"
style="display:inline"
transform="translate(0,-637.6694)"
inkscape:groupmode="layer"
inkscape:label="Symbol">
<path
inkscape:connector-curvature="0"
id="path5626"
style="opacity:1;vector-effect:none;fill:#546e00;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.63314772;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 163.49285,793.34349 10.13036,37.14466 h 20.26072 l -3.68386,13.50716 H 163.79992 L 149.9857,793.34349 Z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" />
<path
inkscape:connector-curvature="0"
id="path5632"
style="opacity:1;vector-effect:none;fill:#b4c342;fill-opacity:1;stroke:#ffffff;stroke-width:0.63314772;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 163.49285,793.34349 10.13036,37.14466 h 6.75357 l 10.13036,-37.14466 h -6.75357 L 177,818.10673 170.24642,793.34349 Z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" />
<path
inkscape:connector-curvature="0"
id="path5636"
style="opacity:1;vector-effect:none;fill:#96ac00;fill-opacity:1;stroke:#ffffff;stroke-width:0.63314772;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 180.37678,830.48815 h 6.75358 l 10.13036,-37.14466 h -6.75358 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" />
<path
inkscape:connector-curvature="0"
id="path5640"
style="opacity:1;vector-effect:none;fill:#859900;fill-opacity:1;stroke:#ffffff;stroke-width:0.63314772;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
d="m 187.13036,830.48815 h 6.75357 l 10.13036,-37.14466 h -6.75357 z"
inkscape:export-xdpi="73.139999"
inkscape:export-ydpi="73.139999" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

1
noisicaa/builtin_nodes/beat_track/node_description.py

@ -30,6 +30,7 @@ BeatTrackDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://beat-track',
),
builtin_icon = 'track-type-beat',
processor=node_db.ProcessorDescription(
type='builtin://pianoroll',
),

1
noisicaa/builtin_nodes/control_track/node_description.py

@ -30,6 +30,7 @@ ControlTrackDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://control-track',
),
builtin_icon = 'track-type-control',
processor=node_db.ProcessorDescription(
type='builtin://cv-generator',
),

1
noisicaa/builtin_nodes/custom_csound/node_description.py

@ -33,4 +33,5 @@ CustomCSoundDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://custom-csound',
),
builtin_icon = 'node-type-builtin',
)

1
noisicaa/builtin_nodes/instrument/node_description.py

@ -30,6 +30,7 @@ InstrumentDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://instrument',
),
builtin_icon = 'node-type-builtin',
processor=node_db.ProcessorDescription(
type='builtin://instrument',
),

1
noisicaa/builtin_nodes/midi_source/node_description.py

@ -30,6 +30,7 @@ MidiSourceDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://midi-source',
),
builtin_icon = 'node-type-builtin',
processor=node_db.ProcessorDescription(
type='builtin://midi-source',
),

1
noisicaa/builtin_nodes/mixer/node_description.py

@ -30,6 +30,7 @@ MixerDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://mixer',
),
builtin_icon = 'node-type-builtin',
processor=node_db.ProcessorDescription(
type='builtin://mixer',
),

1
noisicaa/builtin_nodes/sample_track/node_description.py

@ -33,6 +33,7 @@ SampleTrackDescription = node_db.NodeDescription(
processor=node_db.ProcessorDescription(
type='builtin://sample-script',
),
builtin_icon = 'track-type-sample',
ports=[
node_db.PortDescription(
name='out:left',

1
noisicaa/builtin_nodes/score_track/node_description.py

@ -30,6 +30,7 @@ ScoreTrackDescription = node_db.NodeDescription(
node_ui=node_db.NodeUIDescription(
type='builtin://score-track',
),
builtin_icon = 'track-type-score',
processor=node_db.ProcessorDescription(
type='builtin://pianoroll',
),

3
noisicaa/node_db/node_description.proto

@ -141,6 +141,9 @@ message NodeDescription {
repeated PortDescription ports = 8;
optional NodeUIDescription node_ui = 9;
oneof icon {
string builtin_icon = 10;
}
optional ProcessorDescription processor = 100;

1
noisicaa/node_db/private/csound_scanner.py

@ -55,6 +55,7 @@ class CSoundScanner(scanner.Scanner):
desc.uri = uri
desc.supported = True
desc.node_ui.type = 'builtin://plugin'
desc.builtin_icon = 'node-type-builtin'
desc.type = node_db.NodeDescription.PROCESSOR
desc.processor.type = 'builtin://csound'

1
noisicaa/node_db/private/ladspa_scanner.py

@ -62,6 +62,7 @@ class LadspaScanner(scanner.Scanner):
desc.display_name = descriptor.name
desc.type = node_db.NodeDescription.PLUGIN
desc.node_ui.type = 'builtin://plugin'
desc.builtin_icon = 'node-type-ladspa'
desc.processor.type = 'builtin://plugin'
desc.plugin.type = node_db.PluginDescription.LADSPA
desc.has_ui = False

1
noisicaa/node_db/private/lv2_scanner.py

@ -56,6 +56,7 @@ class LV2Scanner(scanner.Scanner):
desc.supported = True
desc.type = node_db.NodeDescription.PLUGIN
desc.node_ui.type = 'builtin://plugin'
desc.builtin_icon = 'node-type-lv2'
desc.processor.type = 'builtin://plugin'
desc.plugin.type = node_db.PluginDescription.LV2
desc.display_name = str(plugin.get_name())

7
noisicaa/ui/graph/canvas.py

@ -21,6 +21,7 @@
# @end:license
import logging
import os.path
from typing import cast, Any, Optional, Iterator, Callable, Type, List, Dict, Set
from PyQt5.QtCore import Qt
@ -28,6 +29,7 @@ from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from noisicaa import constants
from noisicaa import model
from noisicaa import music
from noisicaa import node_db
@ -116,6 +118,11 @@ class SelectNodeWidget(ui_base.ProjectMixin, QtWidgets.QWidget):
list_item = QtWidgets.QListWidgetItem()
list_item.setText(node_desc.display_name)
list_item.setData(Qt.UserRole, uri)
if node_desc.WhichOneof('icon') == 'builtin_icon':
list_item.setIcon(QtGui.QIcon(os.path.join(
constants.DATA_DIR, 'icons', '%s.svg' % node_desc.builtin_icon)))
self.__list.addItem(list_item)
self.__filter = NodeFilter(self.__list, self)

Loading…
Cancel
Save