Coding in Blender

Hi. I'm new in Blender and I want to know how to manage events in Blender. Thanks in advance.


Regards

  • adrian replied

    You start with a header 'Coding in Blender' you mention 'manage events in blender', I'm not sure what you mean.

    Do you mean 'How to write a script to complete actions in Blender?'

    Check out Creating a Voxelize Script - CG Cookie to start with 

    when writing your own script use Blender 2.92.0 Python API Documentation — Blender Python API for a resource.

  • flamenco replied

    Hi Adrian. Thanks for your reply. Well I mean writing scripts in order to set variables in a game, making the objects I create as draggable objects,  Create functions and loops that works depending on actions as clicking a button and that kind of things. Thanks in advance.

    Regards

  • Jonathan Lampel replied

    While you can absolutely write scripts that contain functions and loops to do all sorts of cool stuff in Blender, it's important to note that it's not a game engine and does not play by the same rules  that you might expect if you're coming from Unity or Unreal.  Because there is no gameplay mode, the concept of events doesn't really apply. 

  • flamenco replied

    Hi Jonathan. Thanks for your reply. I'm comming from Flash. I'm wandering if it would be possible to create a game and compile it in Blender. Thanks in advance.

    Regards

  • Jonathan Lampel replied

    It used to be possible in previous versions of Blender (you can look up BGE), but in 2.8+ that ability has been removed. 

  • flamenco replied

    Hi Jonathan. So, in this case. What options do I have to create a programm with Blender? Thanks in advance


    Regards :)

  • spikeyxxx replied

    fflamenco there is a modern fork of the Blender Game Engine. Maybe that is interesting for you:

    https://upbge.org/

    I haven't tried it myself though.

  • Jonathan Lampel replied

    Yeah, that's about it. Blender isn't really for creating programs but for the 3D content that goes into any program. What is it that you would like to make? It may be that you'd be better served working in Unreal or Unity, or even just coding something yourself. 

  • flamenco replied

    Thanks Jonathan. Yes. I think I'm going to use my own coding in JS to work with the elements created in Blender.  Any idea about the starting point? Does anybody know how to start with it? Thanks in advance.


    Regards:)

  • Jonathan Lampel replied

    You may want to look Three.JS if you're wanting to work in Javascript: Creating a scene – three.js docs (threejs.org) 

    I haven't used it myself, but it's a good standard for 3D on the web.