Redrawing dialogs #47632

Closed
opened 2016-02-29 12:48:13 +01:00 by Aleksandr Zinovev · 11 comments

System Information
Kubuntu 15.10
Nvidia GeForce 9600 GT (driver: 340.96)

Blender Version
Broken: (2.77rc1)
Worked: (2.76b)

Short description of error
Redrawing dialogs doesn't work in blender 2.77rc1:
props_dialog.gif

import bpy

class WM_OT_my_props_dialog(bpy.types.Operator):
    bl_idname = "wm.my_props_dialog"
    bl_label = "Props Dialog"

    bool_prop = bpy.props.BoolProperty()
    str_prop = bpy.props.StringProperty()

    def check(self, context):
        return True

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

        layout.prop(self, "bool_prop", toggle=True)
        if self.bool_prop:
            layout.prop(self, "str_prop")

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

    def invoke(self, context, event):
        return context.window_manager.invoke_props_dialog(self)


if not hasattr(bpy.types, "WM_OT_my_props_dialog"):
    bpy.utils.register_class(WM_OT_my_props_dialog)

bpy.ops.wm.my_props_dialog('INVOKE_DEFAULT')

Exact steps for others to reproduce the error
Run the script in blender's text editor.

**System Information** Kubuntu 15.10 Nvidia GeForce 9600 GT (driver: 340.96) **Blender Version** Broken: (2.77rc1) Worked: (2.76b) **Short description of error** Redrawing dialogs doesn't work in blender 2.77rc1: ![props_dialog.gif](https://archive.blender.org/developer/F286415/props_dialog.gif) ``` import bpy class WM_OT_my_props_dialog(bpy.types.Operator): bl_idname = "wm.my_props_dialog" bl_label = "Props Dialog" bool_prop = bpy.props.BoolProperty() str_prop = bpy.props.StringProperty() def check(self, context): return True def draw(self, context): layout = self.layout layout.prop(self, "bool_prop", toggle=True) if self.bool_prop: layout.prop(self, "str_prop") def execute(self, context): return {'FINISHED'} def invoke(self, context, event): return context.window_manager.invoke_props_dialog(self) if not hasattr(bpy.types, "WM_OT_my_props_dialog"): bpy.utils.register_class(WM_OT_my_props_dialog) bpy.ops.wm.my_props_dialog('INVOKE_DEFAULT') ``` **Exact steps for others to reproduce the error** Run the script in blender's text editor.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @AleksandrZinovev-2

Added subscriber: @AleksandrZinovev-2
Campbell Barton self-assigned this 2016-02-29 14:43:38 +01:00
Member

Added subscriber: @JulianEisel

Added subscriber: @JulianEisel
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

Added subscriber: @masterxeon1001

Added subscriber: @masterxeon1001

yay. Its already been discovered.

yay. Its already been discovered.
Campbell Barton removed their assignment 2016-03-01 05:44:03 +01:00
Bastien Montagne was assigned by Campbell Barton 2016-03-01 05:44:03 +01:00

Added subscriber: @ideasman42

Added subscriber: @ideasman42

This is a regression caused by blender/blender@935e241fa6

Possible workaround for 2.77 release. P328

This is a regression caused by blender/blender@935e241fa6 Possible workaround for 2.77 release. [P328](https://archive.blender.org/developer/P328.txt)

Yep… knew that change could not 'just work'™… stupid UI code :(

Will revert and apply your patch @ideasman42, actually was my first fix, but I found it too much 'hackish' (since this case could happen in other places too, though quite unlikely).

Yep… knew that change could not 'just work'™… stupid UI code :( Will revert and apply your patch @ideasman42, actually was my first fix, but I found it too much 'hackish' (since this case could happen in other places too, though quite unlikely).

This issue was referenced by blender/blender@607d916f50

This issue was referenced by blender/blender@607d916f503a13d542cfa65c4ff505e913679df7

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
7 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#47632
No description provided.