A Visual Programming Language and a new GUI for Blender, your thoughts

I am flirting with the idea of creating a visual programming language . Morphic is a GUI that attracted me alot because its very customisable by the user.

My goal is to make the user more able to do coding without knowing he is doing coding. A middle ground of ease of use and power.

Morphic itself is tied to the concept of visual programming, first invented back in 1970s by the self programming language, self was the first language to introduce OOP . Essentially every Object has a morphic counterpart so its easy this way to synthesize code structures but also the GUIs themeselves are super flexible , embedable , modifiable by the user and the coder. In sort its feels more natural.

if you want to see a fine mordern Morphic implementation that I take alot inspiration from , its name is “blocky” and in the following link you will find alot of impressive video demos.

http://blocky.io/

I have found a python port of Morphic and I am now in the processs of porting it to blender and bgl.

Its still unusuable cause it is heavily reliant on pygame and I need to change several things to make it run in BGL. But when I finished the porting , a new GUI will be available for blender that will be far more flexible than the standard GUI, which I think people will find very useful if they want their own addons not to be dependant on the standard GUI and the restrictions it introduces.

So my question is how you feel about this, what you think the things that could make addon developement easier and more fun ?

Lets use this thread to discuss the future of blender python and general python developement and how we can make it even easier, more direct and better for the average user and coder.

wow, amazing project, if the two system can live together it will be great. great idea!!!

Agree. Good luck.

Hi kilon,
It would be nice to be able to see blocky working, SBCL does, blocky, downloaded but now???
If you did it, please instructions in small steps :wink:

but this mean a total rebuild of blender or simply a external python module??

PKHG you can join me and the original author in #blocky at freenode. Installation can be abit tricky, in macos I was not sucessful running this cause the lisp library responsible for communicating with SDL has some bugs. Sbcl has some problems on 64 bit platforms too. It just relys on SDL only, so you will need to have quicklisp installed too which is easy enough. I got it working on my 32 bit linux with sbcl with no issues.

no no no nothing that radical and there would be no benefit. The standard GUI stays, I just offer users and python coders another GUI which is by nature more customisable. To redo the whole GUI of blender as it is in Morpheas (the name I have given to the GUI part of my Ephestos project) is beyond the scope of my addon.

But of course the user would be able to create his own GUIs that will map to blender functionality, so recreating the entire blender gui will be possible as an option but I will leave that to the end user and not something I will do. I will only give to the user the means to do that with ease.

Morpheas will use BGL so it will draw on top of window areas (3d View / Text Editor /Node Editor /Image Editor etc) and wont mix with the standard GUI. So those two will be kept seperate.

My goal is not to replace but to offer another option which will be more flexible. I love addons, they are a cleaner approach than branches and patches. Plus I dont want to touch C or C++ , my love is python :wink:

But as I said this thread is for listening to opinions and ideas people may have, secret desire and any crazy thought. Dont be shy. Share it , you never know.

yeah add-ons are a good way to expan programs possibilities(without make the program to heavy or complicated), but i think if an add-ons or patches implement function that somehow are useful or just make the orginal function better, they should be integrated in the program it self and you’r project i think is great for implementation, and can expand a lot blender capacity.

kilon: will try to reach you at blocky (or blender*) tomorrow. quicklisp is running … :wink:

oh yeah most definitely this addon if people find it really useful , cause lets face it talking and doing is two different things, will definitely push it to be included in trunk. My other addon Gyes which makes random materials and texture is already included in contrib which mean its included with your blender as long as you enable “testing” and search for it and activate it.

So yeah its no hard to include this with blender and make it part of blender as an addon. But these things are a result of a process a) Collect good ideas –> b) make ideas into actual usable code –> c) people try your code —> d) people like your code bust ask you to improve it in some areas —> e) people like it so much that you feel its should be included in trunk and part of blender —> f) addon is included in trunk

We are still in stage a)

Technically speaking an addon can be a million times more powerful and bigger than blender itself , its perfectly possible because the embeded python intepreter is a full python capable of using any python library. People think as addon as nothing more than plugins for blender but that is not true, blender addons are full python programms and since python as a language can be used for advanced coding of huge apps easily its possible to implement rest of blender from now on as nothing more than an addon.

Thats the point of my project Ephestos , thats is why I want to make programming visual because doing so , anything will be possible because already with python anything is possible. People dont see that, people dont see how much potential there is inside the addon architecture, if we can make people see and provide them a platform that will find easy to use and more user friendly than coder friendly we will have a big chance that blender development will boost to a great degree and python development in general.

Again I am interested to hear your opinion on this.

If you cloned the repo or download the zip with the source code in contains an install text file with instructions. If you follow the instructions and it fails the best person to talk to is “dto” in #blocky he is the original author , I am not writing code for him cause I am not that good with lisp but I am helping him with solving some issues and testing. I don’t exclude the possibiity that I might contributing to blocky in the future if my Lisp coding becomes better. He is usually in during night european hours but you may find him in mornings too. But most likely when I log in irc you will find me there too. Suffice to say we have very interest discussions on the subject of visual programming and he has deep knowledge on this matter.

But as I said what you see in those videos will be what Ephestos will be all about so I will definitely be copying loads of ideas from Blocky cause lets face it , it rocks !

I’m curious, what is so difficult about integrating with the current Blender UI and how how does this specifically fix the issue? I have only scanned over the general process of adding new buttons and controls to the Blender UI but it looked fairly straight forward.

The main problem I see with adoption of a system like this is that an addon author will face is this question, “I have to figure out how to get some controls on the screen. How do I do that?”

They will then do a quick search and find:

  • You can do with with Python (which I presume they already know) and the built-in API.

OR

  • There is another addon that you can install (is it bundeled with my build? How many people will have builds that it is bundeled with?)
  • It does not use Python, so I have to learn a new language.
  • It uses some visual programming technique, so I have to possibly learn a new coding paradigm.

Your main problem is that unless it is built-in to Blender or becomes a “standard” add-on for 99% of the builds that people use, then nobody will write Addons with it. The risk of you addon not running on a system will be too high to risk.

in fact, i totally agree with you (post#2)

wow, amazing project, if the two system can live together it will be great. great idea!!!

Thanks for voicing your concerns and sceptism that is the reaction I expect from the average user and coder.

I am excited about this project but I am also very skeptical, brainstorming is good and having a dream, but there are always real problems to deal with in practice and I am sure I will face a lot of them. That is why I am here, to discuss my ideas with you not to agree with me but to disagree with me, to tell me what YOU as user need from a project like Ephestos.

exactly fairly straighforward if you are a coder , what happens if you are not ?

What happens if you want to design your own gui lets say adding custom nodes, or maybe image previews, how about video playing, what about animations , scrolling of multiline text , hyperlinks to websites , Grid view of a database and many many more ?

Why not integrating inside the existing GUI ? Easy answer , because its C code and I dont want to write or mess with C code. Also the user will not want too, C is ugly hard and easy to create problems. My goal in the end that Ephestos itself is created with Ephestos and that any user will be able to use Ephestos to modify Ephestos.

The main problem I see with adoption of a system like this is that an addon author will face is this question, “I have to figure out how to get some controls on the screen. How do I do that?”

My idea I have is on board documentation, everything your mouse hover on top of automatically display in specific part of the window context sensitive documentation. No huge documentation just a few paragraph explain all you need to know. Minimalism is my goal here. No need to read reference pdf and watch video tutorials , learn as you use . Also I want to go with concepts that feel natural and dont require learning new skills. Its an idea I would love to explore. Its theoretical but then thats its appeal.

They will then do a quick search and find:

  • You can do with with Python (which I presume they already know) and the built-in API.

I dont presume that they know or that they want to do any form of coding. How many users dont create addons ? I would say the vast majority. This is the crowd I want to appeal the most. If existing python coder find my project unnecessary thats tough but not a big deal cause they already have the means to create great addons. But many users dont want to invest the time to real learn how to programm. Or spend days and week learn new things just to make a quick , basic easy addon.

  • There is another addon that you can install (is it bundeled with my build? How many people will have builds that it is bundeled with?)

Installation is not an issue as I said it can be included with blender , you wont have to move a hand. But before maturing enough to have it in trunk there will be a installation procedure, but even a child can install an addon, you just paste a folder in your addons folder and activate it in your addons browser.

  • It does not use Python, so I have to learn a new language.

Maybe I should clarify that, it wont just use python , it will be python.

The same way blocky IS Lisp.

Make clear here this NOT a new , great , amazing programming language. Its a visualisation of a an existing language, in case of blocky Lisp in case of Ephestos Python.

  • It uses some visual programming technique, so I have to possibly learn a new coding paradigm.

Again see above anything you know about python is applicable inside Ephestos , functions , objects , OOP , lists , dictionaries etc . I am looking to the possibility of expanding the syntax of python to implement even custom made syntax introduced by the user but that is a very low priority. Ephestos will generate python modules and of course import and visualise existing python modules.

This part of Ephestos will be called Proteas, I call it the second age cause I will work on it after Morpheas is mature enough. For the time being Morpheas which is the pure GUI side is my main focus.

Your main problem is that unless it is built-in to Blender or becomes a “standard” add-on for 99% of the builds that people use, then nobody will write Addons with it. The risk of you addon not running on a system will be too high to risk.

As i said Proteas will be python , so any existing addon will be a valid proteas programm. Full python compliance is the goal. And frankly since the addon is written in python that is not much of a problem.

The ultimate gol is to make Ephestos so easy , fun and capable of doing anything you can do with Blender python that will make no sense not to prefer it , unless of course your like more the text based traditional approach and find visual programming more unnatural. Afterall we cant all fit in a specific logic , can we ?

Can I achieve that goal ? Difficult question, but then where is the harm in trying. I am sure that I will benefit users to an extent with this project even in the worse case scenario.

I would like to apologize if I have not clarify things earlier but I want this thread to be a discussion and not an official thread for my project. I will open such thread when I have something usable to share.

Hi, Kilon, the idea is really great and mindblowing.After all that explanation I see that this is the idea tha we were discussing some time ago abut the node based scripting, but from your stand point of view, which is fine for me! I think that people just dont understand how such an addon can easily help everyone to make their own addons, despite the fact that they cant code with python and how this can help to Blender to grow in enormously fast way.
The bender coders are, how much? maybe 50-100 people, but blender users are about 100 000 if we say that everyone that is signed in Blenderartists actually uses Blender! and Im sure that everyone that uses it in some point of his work has a need for some function that is not implemented yet. With a visual system for coding you can actually give the opportunity to everyone that is not a coder to make their own addons and share them with the community, which is like unleashing the beast - if every user makes just 1 addon this year there will be no better software out there no more in the end of the year!(of course this will be not the case in reality, but you get my point)
I dont know how many people here actually realize that the biggest power of blender is the open source and community! And I dont think that the coders realize that not everyone is able to learn Python - despite its simplicity, most users are not coders and have serious difficulties with the easiest concepts in it.
So Im sure that this project is the most important project for Blender EVER!I support it with both hands, I wish to test it when the time comes, and when it is ready I will make tutorials on it so every user can use it and make his majic and contribute to the community!
Anyways, I think that you should open a thread about this on some more public place, where the other users can see it, not just coders, cause actually the other users will be more interested in its implementation than coders - coders already know python, so for them this is not priority, I suppose
And, correct me if Im wrong, but I red some things about cython on your blog some time ago and how it is much faster and its easy to embed, so, maybe you should consider the idea to use it to make things much faster?
Greetings for the great idea, I will follow your progress with interest!

I just played with Scratch and big brother of it: BYOP… if something like that is possible in Blender (and kilon thinks so, and a little bit me too) it would be fantastic!
To get an idea at all see the picture, under ‘Scripts’ would be the coding.
You drag from the left ‘so to say Lego-block of code’ and fit them together …
with BYOP and or Scratch a child can do so …

Attachments


Thanks, its funny you mention the node scripting thread, I google search for my thread and sent me to that thread. I was not aware that , that thread existed and I have only heard of Softimage ICE did not put to much attention to it and then I found this video and was blown away

My problem with node based approach I think its great and user friendly for simple thing but once you start buidling complex structures all these cables can end up in a beautiful spaghetti effect. So I think a block based approach is better and it allows for some real coding. But yeah I think ICE is a very good example why this is actually a very good idea.

One problem there is with visual programming languages and programming languages in general is that the locked you down a specific platform. And if that platform is new it does not have alot of libraries or even functionality. Take a look at ICE , its great amazing but once you want to do something outside the ICE scope , something that is not implemented or not part of its functionality you out of lack.

My goal is to make Ephestos fully compliant with python , that will have 2 benefits

  1. Peopel will learn python with a much smoother learning curve and the Blender Python API

  2. Like blender python Ephestos will be able not only to use all cpython 3 libraries, which are ton of them but also even import code from standard python modules even existing blender addon and visualise that code.This is a very important goal of mine that I think it could make a huge diffirence in cutting down rewrites.

Its not that coders dont see the potential of such a tool, I think softimage ICE leaves no room of doubt of how useful and essential that can be. But there are 2 issues

  1. Coder feel that real problems need real programmers. For example I am not a real coder and there is no way I would edit any way the cycles engines or the bmesh structure as it is very advanced concept for me and my free time. But of course there are tons upon tons of issue where any user could takle. Lets say reorganisation of the GUI , implementing rather simple functionalities etc

  2. We all have dreams yet making them reality is a whole new thing. What happened to that guy wanting to bring ICE to blender . Poof after 2 - 3 posts he disappeared. So yes It great to talk the talk but its even better to walk the walk.

  3. Blender developer are a little afraid of opening the pandora box and letting in thousands of developers , that could create a mess, take a look at how many non maintained addons there are for blender that seem to brake here and then. Its an issue but I think the same community can do the clean up as well. A clean up can be even more important than bringing in new features

Yeap I will definetly open a thread for my project when i have something to share and yes cython can play a huge part in speeding things up for addons it can be easily integrated I think.

PKHG thanks for that info yes that pictures shows alot about what I think it should implemented. Bare in mind though that currently I am concetrating on the GUI part itself (Morpheas) and not the visual code (Proteas) . Need the first to do the second. So I will keep you posted for my progress , dont hesitate to ask me, or share your opinion, I am very excited reading every post and idea.

For those that still dont get it , here are some demo videos from Scratch and Build Your Own Blocks , 2 project that will influence a lot my project

Yeah, ICE is pretty amazing, but the block approach seems better! about the pandora box thing - I just pointed that out as an example - in the real world it shoudnt be that drastic, but the option to have the ability for the user to make his own operator is very good and just opens blender even more! About the maintaining and bug tracking youre right, but, you know, we dont live in a perfect world, so there will always be outdated addons and so on, but I think that the positives are more than negatives! and of course we will always need a core of serious coders to tackle the serious problems… blah blah blah:)
This scratch looks super cool, for sure, I hope you succeed in making something similar… by the way, how do you see this project in time?It seems very difficult for a one man(in my oppinion) deffinetly you will need several months for this, yeah?

I am glad you like the idea, its true all approaches have downsides. About the schedule, currently I port pymorphic as it is , which offer very basic GUI , its made for pygame and its around 3000 lines of code so it will take me around 2-3 months to have a port of it. Then I will work till the end of the year for a more mature version , still only GUI stuff. Next year will takle visual coding (Proteas) while still developing the GUI side (Morpheas) and then after 2-3 years will start dealing with the sound and music part (Orpheas) which will be GUI front end for supercollider ( http://supercollider.sourceforge.net/ )from inside blender , so you can use blender as an audio and music production tool too.

I estimate that version 1 of Ephestos will not take more than 10 - 12 years . But of course the project will be highly usable from the first year, so its going to be a slow gradual process , I am not in any particular hurry, and I find it hard to believe that someone will steal my thunder any time soon :wink:

I have been dreaming making something like this all my life so it will certainly be a fun chalange. But no worries as I said in 2-3 months will open the thread and we will do this together step by step , me the coding, you guys the testing part and of course advice / opinion / direction.

Doing the first thing first is ok (the GUI) … but with respect to looking at is it possible at all I have a proposal:
Look at the (new) operator_mesh_add.py (template)
You already have an idea to make all this stuff easy available for a not python knowing person?

If I look at Scratch (maybe Panther!) … you need building blocks, be able to create NEW building blocks , build a project out of several
‘parts’ … etc. and all visible in Blender?

Proposal: use e.g. a Squeak based something (Byop, or probably: Panther?!) which has already most things you will probably need
BUT make something upon it: namely export after creation visually the needed Python code for Blender?

A one-man-project (thinking in needed 10th ?? of years) , so sorry, I have dought. Meaning: be a project leader ??!!!

Yes I do, the idea is to create something like a wizard interface that not only it allows you to generate a gui but tie the part of the gui to blender python operators and properties. In short create guis that can control Blender with no need for coding. This will allow users to customise the gui to their preference. For example they could hide original GUI, and use Morpheas to create 10-20 buttons of the thing they really need and maybe use shortcuts for everything else. Of Morpheas will be accessible for addon developer too as a python library.

If I look at Scratch (maybe Panther!) … you need building blocks, be able to create NEW building blocks , build a project out of several
‘parts’ … etc. and all visible in Blender?

Proteas which will be the visual code stuff, is further down the road. It does not worry me currently but yeas it could be a hybrid between block based Scratch / Blocky and node based Softimage ICE. I need to test these concept and I will let it to people to decide on that again after they test my code. So its definetly a no few month concept as I said it will be a slow gradual process of testing and then more testing and then more testing until we have something that non coder feel comfortable with.

Proposal: use e.g. a Squeak based something (Byop, or probably: Panther?!) which has already most things you will probably need
BUT make something upon it: namely export after creation visually the needed Python code for Blender?

yeap Proteas will generate python modules, everything you do will be exported to py modules and addons so you wont need Ephestos to run addons generated with Ephestos. Again that will take time to make reality.

A one-man-project (thinking in needed 10th ?? of years) , so sorry, I have dought. Meaning: be a project leader ??!!!

As I said this something I was dreaming from the day one I started doing programming in 1988, its not an idea that just popped up but I was trying to find some good implementations to copy from and feel comfortable with my coding. Having more developers is always welcomed , maybe in time more people join in, but I can do this alone if I want to . I dont feel that Ephestos is needed NOW or it will not be useful in 10 years, and working alone has the advantage that I can work at my own pace and in my own way, so no complaints there. But that does not mean I dont ask around for existing source code, the code I am porting now is not mine for example and I will certainly “cheat” with using other open source code and of course my project will be open source too.

How many years it has been for ngons to come to blender ? I remember using ngons in 3D Studio MAX back in 2000. Its not as easy as it seems to find people willing to code big ambitious project for no money at all. I am not making Ephestos just for community, the idea is to use it for art work for myself to customise blender to my specific needs, so yes I definetly think it worth 10-20 even 100 years.

Kilon, from my side let me say I’ve hoped since a few years that a project like this one took place in Blender.
I know is maybe premature to talk about a project but at least I hope that the brainstorming you began with this thread will help to keep the topic live…

To this aim, I want to point you to a couple of other interesting projects which may be of inspiration:

  • grasshopper (http://www.grasshopper3d.com/), a Rhino plugin which has become very popular to designer and architects above all.
    The node structure in grasshopper reminds somehow the node editor in Blender and ICE. I believe such a way of generating geometry comes with the additional benefit to easily allow precision modelling and thus should sound even more attractive to architects in the blender community.I think grasshopper is a great example of how the parametric modelling capabilities of Blender may be enhanced through visual programming.

  • nodebox(http://beta.nodebox.net/ and http://nodebox.net/code/index.php/Home) which I would define a “processing-like” project but limited to 2D. The most interesting thing, I believe, is the opengl BSD licensed python implementation (http://www.cityinabottle.org/nodebox/).

Did you already know about these two projects?