Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CR_ListProduct node #124

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add CR_ListProduct node #124

wants to merge 3 commits into from

Conversation

WeeBull
Copy link

@WeeBull WeeBull commented Feb 11, 2024

This PR creates a node that will take two lists, and run the python function product() on them then unzip the resulting list of tuples into two lists. The purpose is to get two lists which when consumed together go through all the combinations of the two original lists. This is very useful for generating XY-Plots in a single queued job on absolutely anything when used along side the CR_TextList, CR_IntegerRangeList, CR_FloatRangeList & CR_ImageGrid node. The span output gives the X dimension of the plot so that that can drive the max_columns input of the image grid.

An example crossing the checkpoint and CFG

Also fixed a couple of issues.

  1. CR_Textlist had been recently updated to take a loops parameter, but it had no widget. Broke the node, so added the widget.
  2. CR_SelectFont failed with a FileNotFound exception on my system as no truetype directory existed under /usr/share/fonts. Used the standard library glob() function to search for .ttf files from the /usr/share/fonts level instead.

On my system (Arch Linux) `/usr/share/fonts` existed, but had no
`truetype` directory under it. This will now find all `.ttf` files
under the fonts directory.
@WeeBull
Copy link
Author

WeeBull commented Feb 11, 2024

Looks like my change to CR_SelectFont is also fixed in #123, #111 and #117, and the loops problem is being discussed in #121 and #116.

Don't care if you take my changes on those or do something better. I was just fixing them for me whilst I was in the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant