Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Embed Python blender code
#1
I have got a legacy Python with blender code:

import bpy
import bmesh

....

def debug(is_debug):
    if is_debug:
        bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
        time.sleep(2)

...

bpy.context.scene.objects.active = SG
bpy.ops.object.mode_set(mode='TILE')
... and so on ...

I saw few example of how to embed Python code into a VC++ app, but they are only few simple Python calls:

Py_Initialize();
...
obj = PyRun_String(expr, Py_eval_input, main_dict, NULL); 
...
Py_Finalize();
Is there any chance to use python blender code embedded into a VC++ app, with python window embed into a VC++ window ? Or is impossible ?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Embed Matplotlib Graph to Tkinter? dimidgen 0 182 Mar-04-2024, 07:40 PM
Last Post: dimidgen
  Blender scripting the_jl_zone 0 431 Jul-10-2023, 08:48 PM
Last Post: the_jl_zone
  Interactive plots that can be embed in web page mouse9095 1 571 Jun-12-2023, 04:51 PM
Last Post: deanhystad
  embed python script in C programm gucio321 0 580 Feb-11-2023, 10:47 AM
Last Post: gucio321
  best way to embed passwords into scripts mikey6785 3 2,185 Aug-31-2022, 08:22 AM
Last Post: DeaD_EyE
  Blender 2.49b not showing button when I run script on ubuntu like it does in windows? Vido 0 2,637 Dec-13-2019, 05:56 PM
Last Post: Vido
  How to embed mp3 file with Pyinstaller panoss 2 5,882 Apr-01-2019, 01:13 PM
Last Post: yleongtyl
  Embed and extend Python in c++ without users installing Python BenKaya 2 3,240 Jan-25-2018, 12:43 PM
Last Post: BenKaya
  Blender .MLX import script modifications help LadyAnn 1 2,698 Dec-05-2017, 04:09 AM
Last Post: LadyAnn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020