Commit Graph

4 Commits

Author SHA1 Message Date
Jacques Lucke 3a7af37e28 Python API Docs: fix some examples 2019-06-06 17:13:02 +02:00
Campbell Barton dd1132416e Docs: update examples for 2.8x
Use fields for properties
2019-03-22 00:07:06 +11:00
Sybren A. Stüvel b76471c1f9 Fix T54286: bpy.props operator example misses property access
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.
2018-03-14 11:31:14 +01:00
Campbell Barton 251d27110b examples for bpy.props 2011-02-18 14:27:18 +00:00