tjvr / kurt

Python library for reading/writing MIT's Scratch file format.
https://kurt.tjvr.org
GNU General Public License v3.0
86 stars 24 forks source link

How to support custom Scratch 2.0 blocks #38

Closed raulperula closed 7 years ago

raulperula commented 7 years ago

Hi,

I am working on a Scratch translator to Python based on Kurt focused on robotics. In my case, it is an Open Source project that translates a Scratch program to a ROS (or ICE) robotic program.

https://github.com/JdeRobot/colab-gsoc2017-RaulPerula

I have made an Extension for Scratch 2.0 but Kurt is not able to load the Scratch program giving an error telling that the blocks are unrecognized. I have tried with other known Extensions such as Wedo or Makeblock and it happens the same.

Could you help me about how to include the Extensions? I really appreciate some help.

tjvr commented 7 years ago

You're right, Kurt doesn't support ScratchX yet. Rather than fixing that, in your case, I would register your custom blocks with Kurt via the plugin API; I think you want to modify the scratch2 plugin to do this. Then Kurt won't complain about the extra blocks, and as a bonus it will only work with your extension specifically :-)

raulperula commented 7 years ago

Ok, I am going to analyze the "scratch20" plugin to try to include that new functionality.

Thank you for your help.

tjvr commented 7 years ago

You're welcome :-)

tjvr commented 7 years ago

Renaming & closing this, since extension support is already tracked in #23.