[Bf-interface] Permission to add python accessible functions to query available UI operations.

Dave B daveb68prg at gmail.com
Thu Dec 8 20:55:41 CET 2016


Summary
=======
I would like to add new methods accessible from python that would query the
state of the UI.  The first method I researched would be similar to the
function pyop_dir, but instead calling it with a context, calling poll on
the operators, and then returning only applicable operators plus additional
information such as description, help link, ...

The reason is I would like to be able to create a "learning" tool that has
the minimum impact on the Blender source code base (both python and C) that
would allow a new user (or an experienced user) to execute a command that
will query the UI for available operations based on the current goal and
context and provide every way to access those operations (i.e. short cut
keys, headers, popup menus, and panels).

The learning tool would support both course work and goal driven operations
by maintaining both a filter and a hierarchy of operations.  The
hierarchies would leverage the UI best practice (IMO) of no container
containing more than 7 child items.  I believe this would allow humans to
navigate the system prior to having memorized all of the commands, all of
the shortcut keys, and locations to execute a command from that an
efficient user would already know.  I have not used many addons, but I
believe this would also "reveal" buttons only available in panels that are
not currently visible.  Based on either an objective, such as mesh editing,
or a training course that introduces new features in a controlled manner,
the available and applicable commands would be filtered to show the
smallest applicable set in the proper hierarchy to allow the new user to
discover and recall the short cut keys and access methods for the goal they
are trying to accomplish.  Once an operation was selected, the tool will
show you the help page, the access methods, related online videos
(submitted by the authors), and the users personal assessment of their
understanding of the function so in learning sessions they can focus on
full mastery of a section of the system.

Reasoning
========
When I started trying to learn blender, I found that it was non obvious to
me how to get started.  I purchased some on line courses.  In walking
through those, they got me started and I started to learn specific parts of
the UI and I could "re-execute" the steps of what the instructor made but
always felt like there was much more to the tools and anytime I needed
something slighting different, I was lost.  I also found that having to
scrub through 20 minutes of video to find out how they did something was
not very cost effective.  Perhaps it is my bad memory.  I then started
reading the Blender Manual page by page.  This has been the most useful so
far.  I was getting pretty good at modeling, but still found that by
watching you tube videos I would see something that I either forgot from
the manual or misinterpreted in my read and trial.  I also have found that
some of the short cut keys are missing from the menus and the only way to
identify those is to manually go through user preferences and find those
commands and see what shortcut keys are associated with them.  I did submit
two bug reports related to these.

I don't like to learn a tool by watching others work and duplicating what
they did never knowing if I know the most efficient way to accomplish
something or all of the tools as my disposal.  I am looking to create the
sort of tool that would allow me (or any new user) to break Blender into
its components, learn one section at a time and know I am using it in the
most efficient manner possible.  As new features come out in subsequent
releases OR I start using new add-ins, this tool becomes essential again.


Limitation of Changes
================
Based on the code bases I have written over the years I would be very
hesitant to allow a developer I know little about to make these types of
changes to my code base.  My objective will be to introduce the fewest
lines of new code that follows the current practices.  Outside of the code
that exposes these functions to python, it will never run unless the user
has initiated it via a python command.  This should minimize the possible
side effects of this code.  I have included a summary of my qualifications
below to hopefully give you a little more comfort.

I have analyzed the C source code and checked every place the ability to
iterate over operators is accessed and determine that this is not currently
exposed to python in a way that I could accomplish my objective.

Qualifications
==========
1991-1996 Senior Programmer for Computer Design Inc.'s Design Concept 3D.
NURBS based modeler written in C and using GL4.
1996
1997-1998 Worked with 3D CAD systems writitng addins for an inspection
facilit.  Whatever language the CAD environment was exposing
1999-2003 Developed Laboratory tops manufacturing systems (2d and 3d) using
VB5, C++, OpenGL,
2004 to present have been employed full time as a developer for a 3
different companies and developed a variety of .NET client applications and
servers in large code bases.  Have dabbled in web technologies.

Thank you for your consideration.

Dave Ball
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-interface/attachments/20161208/a088991e/attachment.htm 


More information about the Bf-interface mailing list