Campbell Barton
3ca76ae0e8
Cleanup: remove "<pep8 compliant>" from headers
...
It can be assumed that all scripts comply with basic pep8 formatting
regarding white-space, indentation etc.
Also remove note in best practices page & update `tests/python/pep8.py`.
If we want to exclude some scripts from make format,
this can be done by adding them to `ignore_files` in:
source/tools/utils_maintenance/autopep8_format_paths.py
Or using `# nopep8` for to ignore for individual lines.
Ref T98554
2022-06-02 20:16:20 +10:00
Campbell Barton
1c6b66c9cf
PyDoc: replace in-lined enum references with links where possible
...
Avoid in-lining large enums such as icons and event types, linking
to them instead.
This mitigates T76453, where long enums took a lot of space in the docs,
this was a problem with `UILayout` where each icon argument would list
all icons. [0] worked around the issue using CSS to scroll the list.
However this has the draw-back where some items are clipped in a way
that's not obvious, see: T87008.
The reason this isn't a complete solution is that Python defined enums
aren't written into their own pages which can be linked to, although
currently there are no large Python enums included in the API docs.
All in-lined enums are now under 20 items.
[0]: 1e8f266591
2022-05-31 14:19:06 +10:00
Campbell Barton
1e882b8657
PyDoc: quiet output and minor cleanup
...
Suppress printing unnecessary output when generating docs.
2022-05-23 12:37:28 +10:00
Campbell Barton
47b0ca85cd
Fix float representation for Python API docs
...
float_as_string(1000000) resulted in 1e+06.0 which isn't valid notation.
2022-05-23 12:35:37 +10:00
Campbell Barton
136a06285f
Fix T88792: WindowManager.clipboard missing in Python API docs
...
Support RNA types using the Py/C-API PyGetSetDef defined properties.
Currently `WindowManager.clipboard` is the only instance of this.
2022-05-18 21:43:38 +10:00
Campbell Barton
775f0d76d5
Fix missing C/Python methods in API docs
...
The following methods weren't included in API docs.
- BlendDataLibraries.load
- BlendDataLibraries.write
- Text.region_as_string
- Text.region_from_string
2022-04-19 13:08:48 +10:00
Campbell Barton
c434782e3a
File headers: SPDX License migration
...
Use a shorter/simpler license convention, stops the header taking so
much space.
Follow the SPDX license specification: https://spdx.org/licenses
- C/C++/objc/objc++
- Python
- Shell Scripts
- CMake, GNUmakefile
While most of the source tree has been included
- `./extern/` was left out.
- `./intern/cycles` & `./intern/atomic` are also excluded because they
use different header conventions.
doc/license/SPDX-license-identifiers.txt has been added to list SPDX all
used identifiers.
See P2788 for the script that automated these edits.
Reviewed By: brecht, mont29, sergey
Ref D14069
2022-02-11 09:14:36 +11:00
Campbell Barton
bd79691599
Cleanup: unused variables
2021-03-06 19:00:18 +11:00
Campbell Barton
dbdb8a3355
Cleanup: line length, single quote enums, invalid URL
2020-05-29 12:45:46 +10:00
Campbell Barton
dc726fed82
PyAPI: add class and module attributes to rna_info.InfoStructRNA
...
Module access is needed for documentation generation to exclude
non built-in modules.
This also fixes a bug creating references to non built-in types.
2019-11-16 02:39:51 +11:00
Campbell Barton
c8c3e7d284
Cleanup: trailing space, remove tabs, pep8
2019-09-10 06:17:59 +10:00
Campbell Barton
41b289be30
Cleanup: unused imports
2019-03-15 19:45:21 +11:00
Campbell Barton
7894d6c6f1
Cleanup: line length
2019-01-30 09:06:44 +11:00
Campbell Barton
48b0695806
Cleanup: unused vars, imports
2018-11-26 09:27:25 +11:00
Campbell Barton
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
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
Bastien Montagne
f54f680a26
Fix T52842: Incorrect description for bpy.types.MeshTextureFace.uv
...
Tweak rna_info module to generate valid info also for multi-dimensional arrays.
2017-09-20 16:40:11 +02:00
Bastien Montagne
c4bbf1e4b0
Fix rna_info.py module, broken by recent changes in bpy.types presumably.
...
Hope fix is OK, seems to work with API generation script at least.
2017-09-20 16:40:11 +02:00
Campbell Barton
3789ab4166
PyAPI: fix rna_info for changes in type access
2017-09-04 16:39:13 +10:00
Campbell Barton
ca983d1825
Cleanup: pep8
2016-07-30 09:00:41 +10:00
Campbell Barton
bf010c4a15
Cleanup: pep8
2015-06-07 17:28:02 +10:00
Campbell Barton
8a231185aa
Doc: minor fixes
...
- check for class/static methods assumed nonzero args.
- subclass references and set-flag items are now sorted.
- use 'order' for Py operator mix-ins,
so operator settings don't show in random order.
2015-05-12 18:23:24 +10:00
Campbell Barton
85f6fc501c
Fix T42943: Crash with multiple calls to rna_info.BuildRNAInfo()
...
Thanks to @nesse for the fix
2014-12-18 14:31:33 +01:00
Campbell Barton
1ea47c9af9
Code Cleanup: style, spelling and pep8 edits
2013-11-20 03:40:10 +11:00
Campbell Barton
b21b24573d
lots of operator descriptions were incorrectly copy/pasted.
...
update some descriptions, others were removed and operators tagged as internal.
add a script to detect duplicate operator descriptions.
2013-09-30 05:50:41 +00:00
Campbell Barton
dc4cded2c2
fix for missing attribute is_argument_optional when generating docs.
...
also use __slots__ for classes.
2013-09-18 04:32:29 +00:00
Bastien Montagne
71e5e90fb7
Followup to r59536: make "is_argument_optional" available to py, and use it in API doc generation.
...
Thanks Campbell for the much better name suggestion!
2013-08-26 21:39:06 +00:00
Campbell Barton
279a2a1916
fix rna_info, python method to C function wasn't being tested for. (broke changelog generator)
2013-05-09 02:50:59 +00:00
Campbell Barton
9fa36b12cc
style cleanup: pep8
2012-10-08 08:28:05 +00:00
Bastien Montagne
63810ffcef
Style edit (mostly), use """ for docstrings (not ''').
...
Should also fix the broken py ops tips...
2012-07-03 09:02:41 +00:00
Campbell Barton
98e6912480
style cleanup
2012-06-19 22:17:19 +00:00
Campbell Barton
fda2045150
correct spelling errors in comments
2011-10-17 06:58:07 +00:00
Campbell Barton
e2818f1b92
- include enum names and descriptions in sphinx generated documentation
...
- add descriptions for operator bl_options
2011-09-15 16:15:24 +00:00
Campbell Barton
22d2764d50
use static sets rather then tuples, python optimizes this case.
...
minor change to lightmap unpack collecting unique meshes.
2011-08-08 05:21:37 +00:00
Campbell Barton
0c03fa78c1
fix [ #26601 ] Python error when use of autocomplete
...
Was a naming collision with 'keys' python method, reserve keys/items/values/get for python.
Updated animsys_update.py for shapekey data paths.
renamed:
Particle.hair --> hair_keys
Particle.keys --> particle_keys
Key.keys --> key_blocks
EnumProperty.items --> enum_items
KeyMap.items --> keymap_items
noted:
http://wiki.blender.org/index.php/Dev:2.5/Py/API/Updates#Since_2.56a
2011-03-25 02:12:44 +00:00
Campbell Barton
1b80538fea
fix [ #25688 ] undocumted functions in pyapi
...
expose collection function docs.
2011-03-22 04:28:51 +00:00
Campbell Barton
2d1ef275f2
bpy.types.libraries.load sphinx doc & examples (doc system needed some updates).
...
http://www.blender.org/documentation/blender_python_api_2_56_3/bpy.types.BlendDataLibraries.html#bpy.types.BlendDataLibraries.load
2011-03-14 10:31:50 +00:00
Campbell Barton
430bb75749
enum-flag arguments were incorrectly documented.
2011-02-16 10:19:14 +00:00
Luca Bonavita
99bd5f2f3b
== rna info ==
...
changing from __repr__ to __str__ after discussing with campbell
was annyoing me when testing things, huge printouts :)
2010-10-15 13:09:38 +00:00
Campbell Barton
aaf328dc78
remove redundant []'s for list comprehension's, py2.4+ supports this.
2010-09-19 07:07:14 +00:00
Campbell Barton
868fdd80a2
use is rather then == when comparing against None.
2010-09-18 10:43:32 +00:00
Campbell Barton
115b256738
ran through pep8 checker
2010-09-07 15:17:42 +00:00
Campbell Barton
8e388a8f49
fixes for recent renaming
2010-08-19 14:43:52 +00:00
Campbell Barton
55ed0f0507
more rna renaming.
2010-08-18 08:26:18 +00:00
Campbell Barton
7da5d9faec
rna renaming, still only adjusting properties that wont be animated (at least its very unlikely).
2010-08-18 07:14:10 +00:00
Campbell Barton
b278279c95
document rna functions that have the no_self flag set as classmethods
2010-08-17 14:32:14 +00:00
Campbell Barton
5f7045f7af
- rna_info.py now outputs array length with types eg. float[16].
...
- corrected rna property name Controller.states -> state (pointed out by Dalai).
- rna_cleaner_merge script now only merges comment and new name.
2010-08-17 02:42:30 +00:00
Campbell Barton
41531e4fb6
include rna parent class names in renaming list
2010-08-10 06:27:29 +00:00
Campbell Barton
5daf9354d2
change some references to .B.blend, .Blog to new names
2010-07-15 11:51:43 +00:00
Campbell Barton
3580d6229a
- text3d was missing menu items for toggling bold/underline/italic/smallcaps.
...
- made smallcaps use a temp flag so caps can still have the smallcaps flag.
- utility function for getting the char from a font. find_vfont_char(), was inline in ~5 places.
- removed CU_STYLE mix of flags only used in one place, not needed. removed 'style' from rna too.
- fix for some warnings.
2010-07-13 23:51:21 +00:00