Hi Malcolm,
Would it be possible to expose a native textport printing method in the C++ API? Calling Python from C++ for this purpose is a bit heavy-handed, and a direct method would be a great improvement.
Thanks,
Colas
Hi Malcolm,
Would it be possible to expose a native textport printing method in the C++ API? Calling Python from C++ for this purpose is a bit heavy-handed, and a direct method would be a great improvement.
Thanks,
Colas
I’m not sure we’d want to make that directly possible. The textport is meant to interact with Python. Having a lot of C++ nodes printing into it, without the user having a way to control that, seems like it could get out of hand.
What is the end goal here, is this for debugging messages for the user?
Hi Malcolm,
There are times when a message is either too long for the info pane, or it’s just a one-time update that doesn’t really fit there or in the info data. In those cases, i think it makes sense to handle it by printing to the textport.
Cheers,
Colas
Can you give some examples? What are the kinds of messages these nodes need to print to the textport that other nodes in TD are able to do without that feature?
For example, I have some nodes that require licensing, which I sell on this website (https://tdplugins.shop/). Originally, I wanted to allow users to check out and activate the license directly from the node, but I couldn’t find a good way to communicate errors like a wrong password or a failed connection to the license server.
This information isn’t really related to the node’s state; it’s a one-time action. Personally, I don’t think using the Info Pane makes sense for this, because to me, the Info Pane should reflect the continuous state of the node. Using an Info DAT isn’t ideal either, because it’s not straightforward for a user to have to add an Info DAT just to see a licensing connection error.
I do think the info pane is the correct spot to show licensing state though. For built-in nodes that did/do require external licenses, that’s where we reported that. So they’d start in an error state and state a license is required. If the user has tried to activate via a node-based interface, you can also report that as the state saying the key/login etc was invalid.
Hi Malcom,
Thank you for your input if you think it make sense to use the info pane for this kind of information i will do that ![]()
Cheers,
Colas