JacquesLucke / blender_vscode

Visual Studio Code extension for Blender development.
MIT License
557 stars 76 forks source link

crash when reloading addon with popup is open #33

Closed TheRealSyler closed 5 years ago

TheRealSyler commented 5 years ago

i don't think that this is a big problem but i thought ill report it anyways so when i create a popup like the one below and start blender trough vscode open the popup (important leave it open) and then reload the addon, click the ok button in the popup then blender crashes this behavior seems to pretty consistent.

import bpy

from cycles.ui import CYCLES_RENDER_PT_sampling, CYCLES_RENDER_PT_sampling_advanced
#from space_properties import PROPERTIES_PT_navigation_bar

class SM_Properties_Popup(bpy.types.Operator):
    bl_idname = 'sop.sm_properties_popup'
    bl_description = 'test'
    bl_label = 'Properties'

    bl_options = {'UNDO'}

    panels: dict = {}
    label: bool = True

    @classmethod
    def poll(cls, context): 
        return True #PROPERTIES_PT_navigation_bar.poll(context)

    def invoke(self, context, event):

        return context.window_manager.invoke_props_dialog(self, width=300)

    def execute(self, context):
        return {'FINISHED'}

    def draw(self, context):
        layout = self.layout

        #PROPERTIES_PT_navigation_bar.draw(self, context)

        CYCLES_RENDER_PT_sampling.draw(self, context)
        layout.label(text="Advanced")
        CYCLES_RENDER_PT_sampling_advanced.draw(self, context)
JacquesLucke commented 5 years ago

Thanks for the report. This issue is probably not very easy to solve. Also it is most likely a bug in Blender and not in the extension.