[Bf-python] Updating a panel

Matt Ebb matt at mke3.net
Sun Sep 16 13:59:06 CEST 2012


I don't know if there's a good way to do this. :(

Being abale to send notifiers would be great, but i don't think it's
possible. I have a situation like this where I want the UI to be
refreshed after completing a file system scan in a separate thread.
The dodgy method I use is to set a property that I know triggers a
notifier to itself (eg. mat.diffuse_color = mat.diffuse_color). Seems
to do the job...

On Sun, Sep 16, 2012 at 8:58 PM, jerome <jerome.le.chat at free.fr> wrote:
> Le 15/09/2012 21:55, Nicholas Bishop a écrit :
>> I'm writing a script that displays a panel in the scene properties.
>> The panel is populated with information obtained from a server via a
>> socket. I'm using an operator and event_timer_add() to periodically
>> poll the socket for updates. I can see with print() that this is
>> working correctly, but I can't find how to signal my bpy panel to
>> update itself -- I don't see an equivalent to WM_event_add_notifier()
>> in bpy.
>>
>> I'm very new to Blender's Python API, any help is appreciated.
>>
>> Thanks,
>> -Nicholas
>> _______________________________________________
>> Bf-python mailing list
>> Bf-python at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-python
>>
> hi,
> I would try to use a modal hooked to the 3d view, since panels are
> updated by user inputs in the 3d view,
> you could trigger something from here I guess.
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python



More information about the Bf-python mailing list