e1900ddcfa
Cleanup: use '_' prefix for internal bpy.ops variables
...
Even though these weren't included in __dir__, they are still accessible
from `vars(bpy.ops)`, use '_' to hint they are private.
2020-10-08 17:55:17 +11:00
79840abf6d
PyAPI: use real modules for bpy.ops
...
Python 3.7x added support for module `__getattr__` & `__dir__`.
Make use of this for operator access,
previously these were module like classes.
No functional changes, this is mostly to use a type which is expected,
rather than faking the type with a class instance.
2020-10-08 17:45:50 +11:00
c78c425266
PyAPI: expose 'bl_options' for operators in bpy.ops
...
Useful for checking which operators are only for internal use.
2020-09-01 17:02:51 +10:00
646ef49e19
Cleanup: use percentage formatting
...
`str.format` and `f-string` use was minimal.
Prefer using a single style of string formatting
unless an alternative is more widely adopted.
2020-06-26 12:33:19 +10:00
0d719fcacb
Cleanup: spelling
2019-08-12 01:10:43 +10:00
33e8db94b1
Fix (unreported) missing updates in scripts/docs after scene.update() removal.
...
This should really have been done together with API changes, simple
usage of grep does the trick to catch most places needing updates.
2019-06-04 14:39:51 +02:00
7465a5db3b
Cleanup: unused args/vars/imports in modules
2019-05-09 13:11:36 +10:00
09aa446100
Merge branch 'master' into blender2.8
2018-09-13 20:15:18 +10:00
254067106e
PyAPI: remove operator methods that leak memory
2018-09-13 20:10:56 +10:00
ff432a410a
PyAPI: use brief description for operator repr
...
Only include description in docstring.
Also avoid using op_get_rna.
2018-09-13 19:59:15 +10:00
af1cf00003
Merge branch 'master' into blender2.8
2018-09-13 18:19:24 +10:00
a6fc718029
PyAPI: add API call to get an operators type
...
Getting the instance leaks memory and was only meant to be used for
generating docs.
2018-09-13 18:16:06 +10:00
00fc1d70a7
Merge branch 'master' into blender2.8
2018-07-03 06:58:34 +02:00
b66aa0b0a6
Cleanup: pep8
2018-07-03 06:48:44 +02:00
8c269d94f4
Limit updates to active view layer only
...
This is rather uncommon when operator will operate on a non-active view layer,
so there is no need to do full scene update.
This change solves lag first time using Extrude operator in edit mode.
2018-04-20 10:03:27 +02:00
f0f1c7995b
PyAPI: disallow assigning members to 'bpy.ops'
2014-12-18 13:52:31 +01:00
b2b1d8e290
Cleanup: remove redundant 'object' parent class
2014-10-28 18:42:06 +01:00
a2489e29f6
Code cleanup: style, unused import
2014-04-28 00:19:15 +10:00
ea610e655c
Style cleanup: C & pep8
2014-04-15 13:11:48 +10:00
0c6e74436f
Fix T39158: Help > Operator Cheat Sheet causes a python recursive loop.
...
Core issue exists since ages - the thing you get from bpy.types.YOUR_OT_operator is fuzzy, and may change,
due to the fact that both Operator and OperatorProperties share the same name...
Would be cool to get rid of this issue one day, but for now it's safer to use rna acessor...
This commit is to be backported to 2.70.
2014-03-13 17:37:19 +01:00
dea4bcdf67
PyAPI: bpy.ops was showing 'module' in autocomplete output
2014-02-19 13:41:41 +11:00
7c2e4e28ba
bpy.ops module/caller classes incorrectly had __keys__ rather then __slots__.
...
also added comments about texface drawing when theres no origindex.
2012-12-06 03:09:06 +00:00
63810ffcef
Style edit (mostly), use """ for docstrings (not ''').
...
Should also fix the broken py ops tips...
2012-07-03 09:02:41 +00:00
a09feb7386
option so operators can be executed with undo enabled (and redo).
2012-06-27 21:41:17 +00:00
98e6912480
style cleanup
2012-06-19 22:17:19 +00:00
f086201518
cmake & pep8 tidy up, also some style edits.
...
remove unneeded collection length function.
2011-11-08 01:32:34 +00:00
fda2045150
correct spelling errors in comments
2011-10-17 06:58:07 +00:00
f7737153e6
filter RNA classes for translation (removes over 1300 lines from messages.txt)
...
- omit operators tagged as INTERNAL
- omit classes for internal use: Event, Context, Property, Function, Window.
2011-10-05 03:39:22 +00:00
dbc9e36f72
make python3.3 compatible, __class__ is no longer in the class methods namespace.
2011-07-11 05:50:49 +00:00
7f3fe8a2df
pep8 cleanup
2011-01-01 07:20:34 +00:00
6f90a38a54
error in own recent commit
2010-11-22 23:41:00 +00:00
1d468c75e7
bugfix [ #24805 ] bpy operator runs in wrong order or is ignored at all
2010-11-22 17:21:18 +00:00
7689ac75ad
fix for error in recent commit.
2010-11-19 11:57:10 +00:00
23fbce5a5f
bugfix [ #22615 ] Opening a blend file in python (bpy.ops.wm.open_mainfile() (r29489)
...
[#22557 ] bpy.ops.wm.read_homefile() causes segfault (r29372)
2010-11-18 16:33:13 +00:00
64ff9d6de4
fix to allow [ #24009 ] to be fixed.
...
WM_operator_poll() could fail in cases WM_operator_name_call() would succeed because calling the operator would setup the context before calling poll.
this would result in python raising an invalid error or menu items being greyed out.
now python can also check with an operator context:
bpy.ops.object.editmode_toggle.poll('INVOKE_SCREEN')
2010-11-04 12:59:03 +00:00
8bb75bb5b6
bugfix [ #24155 ] Operator Cheat Sheet doesn't work properly
2010-10-06 22:29:34 +00:00
115b256738
ran through pep8 checker
2010-09-07 15:17:42 +00:00
7532bc2325
poll function for py api operator access
...
eg:
if bpy.ops.object.mode_set.poll():
...
2010-09-01 11:16:11 +00:00
29fc56b5bb
bugfix [ #21405 ] Error on loading of thumbnails from network renderer [27204]
2010-03-01 12:44:28 +00:00
97bdfe6f1b
pep8 cleanup + correction for external player operator return value.
2010-02-22 23:32:58 +00:00
65a4dafcff
fix for empty xyz axis text drawing ontop of everything.
2010-02-19 20:09:42 +00:00
081c1205a3
correct fsf address
2010-02-12 13:34:04 +00:00
c2b2ccde45
fix for python not being able to call operators with a executuon context.
2010-02-10 11:10:38 +00:00
95069f2909
pep8 changes
2010-01-31 14:46:28 +00:00
3150e4ee12
update tagged objects in the scene after calling each operator, this makes running a set of recorded operators work as expected.
2010-01-26 08:41:16 +00:00
c91a0f8adf
make exception a bit nicer (since wiki docs dont make much sense how it was before)
2010-01-25 18:09:46 +00:00
453945e9e3
remove python api cruft from custom operator registration
2009-12-30 22:51:44 +00:00
b00cddeb66
Macro registration using the normal rna registration methods (like operators).
...
bpy.types.register(MacroClass)
instead of
bpy.ops.add_macro(MacroClass)
The rest is unchanged.
Also remove some now unused code for the old registration methods (there's still some remaining).
2009-12-30 22:14:32 +00:00
bbe13e7823
* register operators like other classes
...
* operators now return sets (converted into flags)
* can't remove bpy_operator_wrap.c since macro's still use the custom register funcs
2009-12-24 19:50:43 +00:00
a1656300ba
script for automating pep8 checks.
...
On ubuntu/debian install these tools...
sudo apt-get install pylint pyflakes python-setuptools python-pip
sudo pip install pep8
then run from blenders source dir...
python release/test/pep8.py
This searches for the comments "# <pep8 compliant>" and "# <pep8-80 compliant>", running the checking tools on these scripts only.
* some minor pep8 corrections too.
2009-12-13 13:59:16 +00:00