- The common name in computer science are 'getters' and 'setters', so by
adding these names to the documentation (while 'get' and 'set are still
also mentioned) we improve findability. Having 'Getters/Setters' as a
title also makes it clearer that this example is not just about
getting or setting the property value.
- Added a little prefix to each printed value, so that print statement,
expected output, and real output can be matched easier.
The old example had two downsides:
- It promoted a blocking UI design, where the user is shown a popup
before actually executing the operator.
- It didn't show how to actually use the property values.
The new code avoids these mistakes. The properties are also shown in the
redo panel in the 3D view.
Note that I also changed the bl_idname, as this is an example about
properties, not about dialogue boxes, and changed the class name to use
the standard operator naming convention.
I also extended the example to include a panel that sets multiple
properties of the operator, since I see questions about this relatively
frequently.
It has been deprecated since at least macOS 10.9 and fully removed in 10.12.
I am unsure if we should remove it only in 2.8. But you cannot build blender with it supported when using a modern xcode version anyway so I would tend towards just removing it also for 2.79 if that ever happens.
Reviewers: mont29, dfelinto, juicyfruit, brecht
Reviewed By: mont29, brecht
Subscribers: Blendify, brecht
Maniphest Tasks: T52807
Differential Revision: https://developer.blender.org/D2333
This is a minor update add more information on how Blender handles modal
operators. The existing docs provide a good overview, but might not be
as helpful to those unfamiliar with modal programming. This patch also
corrects a few small grammar issues.
Hi Guys,
as one of my clients needs the possibility to have custom menu entries in the general right click menu (all over Blender: in the node editor, properties, toolbars,..) I talked with Campbell about expanding our hard coded menu a bit. This is the outcome. As I only need those two, I support currently a button_prop and a button_pointer.
{F540397}
I tested the changes with a custom script where I added a custom entry and executed an operator on click - it seems to work exactly how it's intended to. The script: {F540435}
As I'm not too experienced in rna stuff I would really appreciate any review.
Thanks very much Campbell for his open ears & help on this issue!
Reviewers: campbellbarton, mont29
Reviewed By: campbellbarton, mont29
Subscribers: sybren, mont29
Tags: #addons
Differential Revision: https://developer.blender.org/D2612
- for rc/release: /api/2.79c/, zip file named blender_python_reference_2.79c_release.zip
- for dev: /api/master/, zip file named blender_python_reference_2_79_4.zip