Network support?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Network support?

Post by mmmaarten »

Hi,

Does anybody here knows if it's possible to have a script communicate via tcp/ip with some kind of watcher/loop to receive commands without holding the main thread to not block the UI?
Adults should play more often
Sandra2000
Posts: 1
Joined: Tue Aug 08, 2023 7:14 pm

Re: Network support?

Post by Sandra2000 »

Absolutely! Using a separate thread for TCP/IP communication is a common approach. It allows your script to receive commands without blocking the main UI thread, ensuring a smooth user experience. Feel free to explore multithreading techniques in your preferred programming language for this task. Good luck! 👍🌐
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: Network support?

Post by mmmaarten »

Sandra2000 wrote: Thu Aug 10, 2023 6:45 pm Absolutely! Using a separate thread for TCP/IP communication is a common approach. It allows your script to receive commands without blocking the main UI thread, ensuring a smooth user experience. Feel free to explore multithreading techniques in your preferred programming language for this task. Good luck! 👍🌐
Hi, thanks for your response. This is your first post and I don't know you; You have done this with lua in Moho? As a developer I understand that's a common approach, but this question is specific about Moho and I don't know nothing about the possibilities Moho offers and don't have the time to dive into API's and all that and learn lua at the moment (and don't want to, at least not the following months/year, because I focus on animation now). Does Moho have this module enabled and is Moho able to use a different thread or some handling?
Sandra2000 wrote: Thu Aug 10, 2023 6:45 pm Feel free to explore multithreading techniques in your preferred programming language for this task. Good luck! 👍🌐
I'm not sure if I follow you. So far I only found scripts for Moho created using Lua and I thought that was the only language that works inside Moho. Am I wrong? Do you mean it's possible to use other programming languages for scripts in Moho?

The reason I'm asking all of this is because for Blender I'm using X-pose Picker, that's a AnimSchool alike picker as an external tool to quickly select bones in the rig, making it way faster to find bones to animate and makes it possible to hide the rig inside blender making it all much cleaner in the interface.

It's here:
https://blendermarket.com/products/x-pose-picker

And here's a demo:


For this picker to work tho the standalone picker application connects to a Blender addon via internal network. This picker works UI-wise the same as the one provided by AnimSchool, but for Blender.

It would be nice if we could use the same picker application for Moho as well. But for that to work we need a script running from within Moho which receives commands via http from that picker and should be able to do things like selecting bones mainly. And for that to work we clearly need to have a way in Lua inside Moho to listen for these external commands, while not freezing Moho and let us keep working in Moho at the same time. But it might need more.

So far this is only a thought as I don't have time to create something like that myself and don't feel like it as I want to focus on animating as a clear choice. But the developer of X-pose picker might, because his goal is to target the picker to be compatible with several different software packages and I think it should include Moho. I already contacted him about this idea and he seems open to the idea, but he wasn't sure if it was possible in Moho's lua to have this http listener. That's why I asked.

Hope this makes sense!

So I'm curious on your answers to this and perhaps you have some links to information or examples about it (a script that's doing a connection perhaps?) that might help the developer of x-pose picker in case he's interested to create such a script so that people could use his (payed) tool for Moho too?

Thanks!
Adults should play more often
User avatar
SimplSam
Posts: 1048
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: Network support?

Post by SimplSam »

I am reasonably sure you are having a conversation with some AI chatbot.
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
mmmaarten
Posts: 271
Joined: Mon Sep 19, 2022 2:19 pm
Location: Utrecht, The Netherlands
Contact:

Re: Network support?

Post by mmmaarten »

SimplSam wrote: Thu Aug 10, 2023 8:13 pm I am reasonably sure you are having a conversation with some AI chatbot.
Haha, I didn't think about AI chatbot yet, but it felt quite weird indeed.
Adults should play more often
Post Reply