Discussion:
[Bf-python] Menu events?
Gert De Roost
2013-08-24 22:57:48 UTC
Permalink
Maybe the Python event system could be expanded to also send MENU events
when user makes some choice via a menu, the event.value could then be the
menu item chosen. I could use this for my preselection highlighting addon
: this addon needs to recalculate selection lists/ screen coordinate lists
when the user makes certain changes to the mesh.


Gert De Roost
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20130825/c1c855cb/attachment.htm
Campbell Barton
2013-08-27 21:52:52 UTC
Permalink
This is unlikely to be supported,
Blender 2.4x had event values and callback functions but now Blender
relies on operators for this.

don't know the details but pre-selection highlight sounds like
something our API wouldn't handle well.
(this kind of stuff is best written in C).
Post by Gert De Roost
Maybe the Python event system could be expanded to also send MENU events
when user makes some choice via a menu, the event.value could then be the
this addon needs to recalculate selection lists/ screen coordinate lists
when the user makes certain changes to the mesh.
Gert De Roost
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
--
- Campbell
Gert De Roost
2013-08-27 22:06:33 UTC
Permalink
I must admit I had to jump through quite some hoops to get this working
(the API is safer for one-off tools, not for something like this), but I
got it working quite well now although slow on heavy/subsurfed meshes.

If anyone would wonder, its at: http://www.ewocprojects.be/presel.html

Theres a thread at BlenderArtists forum also, for those who wanna report
bugs... (its development is still ongoing)


And Id love to program this in C at some time but I heard chances are small
it would ever get included with Blender trunk...
Post by Campbell Barton
This is unlikely to be supported,
Blender 2.4x had event values and callback functions but now Blender
relies on operators for this.
don't know the details but pre-selection highlight sounds like
something our API wouldn't handle well.
(this kind of stuff is best written in C).
Post by Gert De Roost
Maybe the Python event system could be expanded to also send MENU events
when user makes some choice via a menu, the event.value could then be the
menu item chosen. I could use this for my preselection highlighting
this addon needs to recalculate selection lists/ screen coordinate lists
when the user makes certain changes to the mesh.
Gert De Roost
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
--
- Campbell
_______________________________________________
Bf-python mailing list
Bf-python at blender.org
http://lists.blender.org/mailman/listinfo/bf-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-python/attachments/20130828/b752373c/attachment.htm
Loading...