1
$\begingroup$

I'm new to Blender and have come across a couple of YouTube tutorials on using PySide2 in Blender. I've followed the tutorials but have found that whenever I connect PySide buttons to functions that create objects, Blender immediately crashes with an exception. Has anyone else encountered this? The easiest way to reproduce this problem is to install PySide2 in blender (https://www.youtube.com/watch?v=LbPJt9upyXs), edit the PySide2 example add-on file found at:

C:\Program Files\Blender Foundation\Blender 2.82\2.82\scripts\addons\camtools\camController.py

....and change....

def create_new_camera(self):
    bpy.ops.object.camera_add()
    self.load_camera()

...to:

def create_new_camera(self):
    bpy.ops.mesh.primitive_cube_add()
    bpy.ops.object.camera_add()
    self.load_camera()

Now load blender, enable the addon (its in the Generic category and is called Pyside2_setup) and press N (if you are in Blender 2.78 keyboard shortcuts). Click on 'VFX Pipeline' and then click on Cam Controller, followed by 'Create a camera'. Blender should immediately crash.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.