Brecht Van Lommel
4da2acae3a
Spelling fixes in comments and descriptions, patch by luzpaz.
...
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
Campbell Barton
7719c11006
Cleanup: strip trailing space in Python module
2018-06-04 08:54:40 +02:00
Campbell Barton
ccdacf1c9b
Cleanup: use '_len' instead of '_size' w/ BLI API
...
- When returning the number of items in a collection use BLI_*_len()
- Keep _size() for size in bytes.
- Keep _count() for data structures that don't store length
(hint this isn't a simple getter).
See P611 to apply instead of manually resolving conflicts.
2018-02-15 23:39:08 +11:00
Campbell Barton
e32cfb0743
Cleanup: rename bpy_util -> bpy_capi_utils
...
This is for internal CAPI use only, avoid confusion w/ bpy.utils module.
2017-11-29 21:11:29 +11:00
Campbell Barton
ffb190244c
Fix setting the operator name in Py operator API
2017-10-05 10:50:51 +11:00
Campbell Barton
8001854083
Cleanup: style
2016-07-23 18:52:18 +10:00
Campbell Barton
f1253f5d2b
Fix T48717: Modal operators called from Py omit reports from the UI
2016-06-27 17:09:52 +10:00
Campbell Barton
676d790d29
Cleanup: use rna_enum_ prefix for RNA enums
...
Definitions could shadow local vars.
2015-11-23 17:40:09 +11:00
Campbell Barton
cff288cf3a
Use PyC_ParseBool to parse bools
...
This could cause problems since they could be any int,
then passed directly to internal functions that assume bools.
2015-08-04 18:49:42 +10:00
Campbell Barton
2fd3b9ad84
PyAPI: Use separate writes for operator reports
...
This allows us to temp override the stdout and extract individual reports
2015-07-12 22:26:14 +10:00
Campbell Barton
13dc766148
PyAPI: bpy.ops enum error was cut short
2015-03-16 10:16:16 +11:00
Campbell Barton
9fd569a654
PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
...
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
Campbell Barton
cb7afe5e41
WM: unneeded alloc the operator-type iterator
2014-10-28 15:41:05 +01:00
Campbell Barton
dfd9bfd3a8
Spelling
2014-08-13 08:38:16 +10:00
Campbell Barton
e73d0f57a3
Code cleanup: use 'const' for arrays (python)
2014-04-27 00:25:15 +10:00
Campbell Barton
02f90c0001
User Interface: don't show macro args in tooltips
...
was often making much too big strings to show in a tip.
2013-11-26 09:00:24 +11:00
Bastien Montagne
ad34a5cc1b
Fix [ #34675 ] *AFTER 2.69* Info view shows duplicate operators with incorrect values of args
...
Refactored a bit WM api to generate operator's pystring, now it can also handle correctly macro operators. Thanks to Campbell for the review!
2013-11-06 20:56:18 +00:00
Campbell Barton
a9fb183901
rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()
...
was renamed fairly recently but other similar iterators not negated
like this, would prefer to keep it as it was
2013-05-08 12:58:11 +00:00
Antony Riakiotakis
53b7bc8f1f
Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It is
...
always used in that context so we can at least avoid reverting it twice
:p.
2013-03-06 20:55:04 +00:00
Campbell Barton
1bf5832dfb
code cleanup: warnings and use stdbool for bpy* funcs.
2013-01-07 05:26:12 +00:00
Campbell Barton
1939baa47d
style cleanup
2012-08-22 16:44:32 +00:00
Campbell Barton
32cf7fcdb1
code cleanup: spelling
2012-07-16 23:23:33 +00:00
Campbell Barton
a09feb7386
option so operators can be executed with undo enabled (and redo).
2012-06-27 21:41:17 +00:00
Campbell Barton
2d2d36fe3b
code cleanup:
...
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
Campbell Barton
abf551b1a5
style cleanup: py api
2012-03-26 20:41:54 +00:00
Campbell Barton
4f19c1a995
spelling cleanup
2012-03-18 07:38:51 +00:00
Campbell Barton
4f7bdc59d3
style cleanup: spelling.
...
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
Campbell Barton
31d2ee9bf7
style cleanup, brackets in else/if, some indentation.
2012-03-06 18:40:15 +00:00
Campbell Barton
e17fd46c71
formatting edits only to use more consisted style
2011-12-26 12:26:11 +00:00
Campbell Barton
d52a811052
minor bpy api edits
...
- strict check for rna properties
- formatting edits (120 line width)
- use PyDoc_STRVAR macros for getset docstrings
2011-11-26 15:18:30 +00:00
Campbell Barton
2b939904ab
documentation - brief descriptions for bpy api files.
2011-11-05 08:21:12 +00:00
Campbell Barton
665f602f15
python string conversion
...
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly
- use const char
2011-11-03 14:09:18 +00:00
Campbell Barton
4a04f72069
remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-23 17:52:20 +00:00
Campbell Barton
2bd9519e39
BLI_ghash.h was including BLI_blenlib.h, remove from ghash header and include in each file
2011-10-20 13:50:24 +00:00
Campbell Barton
276e5f7095
formatting edits & remove debug print.
2011-10-13 01:29:08 +00:00
Campbell Barton
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
Campbell Barton
566da26173
file-selector: when converting operator arguments to the file selector, wasnt making paths absolute (abs paths are made relative when converting the other way).
2011-08-26 01:32:07 +00:00
Campbell Barton
9436769cd4
error when a python operator gave an incorrect return value was near useless, re-raise a more comprehensive error which includes the operator name.
2011-08-25 17:54:30 +00:00
Campbell Barton
a7663cc377
use ghash for operator and menu types, was doing string lookup in the operator list (containing over 1000 items) for each button draw.
...
gives small speedup for UI drawing and overall startup time.
2011-08-11 06:06:17 +00:00
Campbell Barton
3a82a690ab
ifdef out support for for python owning and freeing BPy_StructRNA because this is only used for doc generation and it makes _every_ blender/python instance 4 bytes bigger - vertex/bezier point/object/scene/group etc.
2011-08-05 16:29:38 +00:00
Campbell Barton
e5e6f91856
fix [ #28114 ] Render Crash
...
existing check for driver to use GIL was not thread safe and could cause, details in the report.
This bug was caused by a check to avoid hanging, a fix for [#27683 ] that worked in 2.4x because the UI didn't use python to draw while rendering.
Apply a different fix for [#27683 ], when calling an operator, call PyEval_SaveThread(), then PyEval_RestoreThread() so the GIL can be aquired by threads started by the operator - in this case bake starting a thread that evaluates drivers.
2011-08-04 01:56:36 +00:00
Campbell Barton
89a166d0de
remove some duplicate declarations
2011-05-10 14:48:06 +00:00
Campbell Barton
f86565c90e
whitespace edits for bpy api, split some really long lines.
2011-04-30 13:58:31 +00:00
Campbell Barton
2299d674f4
operators called from python were not getting their reports back into python errors.
...
eg:
- console calls operator
- operator calls report
- report went into header rather them back into the console as an error.
2011-03-22 02:38:39 +00:00
Campbell Barton
790e47768a
fix for crash when running WM_OT_read_factory_settings() from a script and then importing.
2011-03-20 07:23:17 +00:00
Campbell Barton
cadc1218c8
C, style changes (mostly white space edits), no functional change.
2011-03-19 11:12:48 +00:00
Campbell Barton
90d42e114c
py/rna: BPy_reports_to_error() now takes the exception type as an argument and returns -1 as an error value
2011-03-12 15:18:08 +00:00
Campbell Barton
e2304a4dbb
move anim functions out of bpy_rna.c, its getting too big.
2011-03-02 04:51:43 +00:00
Nathan Letwory
5a760e22fc
doxygen: blender/python tagged.
2011-02-27 20:10:08 +00:00
Campbell Barton
d17df68c24
- clear some warnings
...
- rename layout.operator_enums -> operator_enum (since we have operator_menu_enum, only called in 4 places)
2011-02-18 06:07:41 +00:00