Campbell Barton
333cdbb410
Cleanup: comment blocks
2019-04-18 07:59:28 +02:00
Campbell Barton
41d4a19865
ClangFormat: format '#if 0' code in source/
2019-04-17 08:24:14 +02:00
Campbell Barton
e12c08e8d1
ClangFormat: apply to source, most of intern
...
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton
58233e980e
Cleanup: avoid adjacent C-style comments
...
Causes clang-format to give different results on a second run.
2019-04-16 17:50:17 +02:00
Campbell Barton
a358f6bb69
Cleanup: use STR_ELEM macro
2019-04-10 09:36:06 +02:00
Campbell Barton
25ec4b437f
Cleanup: style, use braces for the Python API
2019-03-30 07:14:28 +11:00
Campbell Barton
69a77a1b83
Fix class registration ignoring info/warnings
...
Only errors were displayed in the console.
2019-03-27 14:03:40 +11:00
Campbell Barton
8f817de0cb
Cleanup: use plural names for Main lists
...
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.
Names now mostly follow RNA.
Some exceptions:
- Use 'nodetrees' instead of 'nodegroups'
since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
since 'gpencil' is a common abbreviation in the C code.
Other exceptions:
- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
Campbell Barton
7a5854f4ce
Cleanup: quiet undeclared variable warning
...
Move bpy_context_module declaration to bpy_rna.h.
2019-02-23 19:20:20 +11:00
Campbell Barton
de13d0a80c
doxygen: add newline after \file
...
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
Campbell Barton
eef4077f18
Cleanup: remove redundant doxygen \file argument
...
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
Campbell Barton
ff2dd59d4a
PyAPI: use _PyObject_LookupAttr
...
Unlike PyObject_GetAttr, this avoids setting the attribute error
only to clear it - under some conditions.
2019-02-04 23:35:23 +11:00
Campbell Barton
744f633986
Cleanup: trailing commas
...
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton
65ec7ec524
Cleanup: remove redundant, invalid info from headers
...
BF-admins agree to remove header information that isn't useful,
to reduce noise.
- BEGIN/END license blocks
Developers should add non license comments as separate comment blocks.
No need for separator text.
- Contributors
This is often invalid, outdated or misleading
especially when splitting files.
It's more useful to git-blame to find out who has developed the code.
See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
Campbell Barton
8a61ea7296
Cleanup: add trailing commas
...
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Campbell Barton
1a208f0326
Cleanup: indentation, naming
...
Use rna naming conventions for unit-settings callbacks.
2019-01-02 17:07:47 +11:00
Campbell Barton
09f46ef6fa
PyRNA: enum no longer returns first item when the value isn't found
...
This hides errors & makes it confusing to debug mistakes
when the enum items aren't correct.
Return an empty string instead.
2019-01-02 16:39:45 +11:00
Campbell Barton
5921656655
Merge branch 'master' into blender2.8
2018-12-20 12:24:37 +11:00
Campbell Barton
306bc5fd1a
PyAPI: don't truncate enums in exception messages
...
Not necessary and confusing when only some of the items are displayed.
See: T59044
2018-12-20 12:20:34 +11:00
Jacques Lucke
2dee1772e1
Py Docs: documentation for draw_handler_add/remove
2018-12-18 12:31:37 +01:00
Campbell Barton
a5a86f3921
Cleanup: python doc-strings
...
Indentation & trailing space.
2018-11-14 09:26:53 +11:00
Campbell Barton
72369c638d
Cleanup: python doc-strings
...
Indentation & trailing space.
2018-11-14 09:05:07 +11:00
Campbell Barton
f711c44b8d
PyAPI: Support for 'None' string args from Python
...
This is needed because some RNA functions differentiate a NULL 'char *'
argument from an empty string.
Previously a NULL argument could be passed when the C definition
defined the default as NULL and the argument wasn't passed
which is a fairly hidden way of handling things.
Now strings use `PROP_NEVER_NULL` by default
which can be cleared for function arguments that allow None -> NULL.
2018-10-30 16:17:46 +11:00
Campbell Barton
46587b3ccb
PyAPI: support for Python paint cursors
2018-10-25 15:31:02 +11:00
Campbell Barton
e4c53d9163
Missing from last commit
2018-09-20 14:57:01 +10:00
Campbell Barton
e228574417
PyAPI: correct term for class property warning
2018-09-20 14:55:07 +10:00
Brecht Van Lommel
6b433f4eb3
Merge branch 'master' into blender2.8
2018-09-19 18:20:50 +02:00
Brecht Van Lommel
a4f2ebc78d
Spelling fixes in comments and descriptions, patch by luzpaz.
...
Differential Revision: https://developer.blender.org/D3700
2018-09-19 18:18:05 +02:00
Campbell Barton
039b11f349
PyRNA: all optional args now must be keyword args
...
In some cases the RNA API should be updated to make arguments use the
'required' flag, instead of adjusting Python scripts.
See T47811
2018-08-28 13:55:11 +10:00
Philipp Oeser
77d70c7f1d
Merge branch 'master' into blender2.8
2018-07-16 15:16:00 +02:00
Philipp Oeser
43f0af734e
Fix T55944: fbx export error with smoothing face
...
ddee0931b8 added PROP_RAW_BOOLEAN case for foreach_set, but missed
foreach_get
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D3534
2018-07-16 15:03:21 +02:00
Campbell Barton
5ebebcfbff
WM: rename manipulator to gizmo internally
2018-07-14 23:49:00 +02:00
Campbell Barton
415018778c
PyAPI: show line, not call-stack for field warning
...
Was too noisy and hard to tell warnings from exceptions.
2018-07-12 15:22:55 +02:00
Campbell Barton
55354d734e
Merge branch 'master' into blender2.8
2018-07-12 08:31:19 +02:00
Campbell Barton
1db47a2ccd
Fix PyRNA class registration w/ Python 3.7
...
In Python3.7 this now raises an error.
2018-07-12 08:30:39 +02:00
Campbell Barton
09aa799e53
PyAPI: Use annotations for RNA definitions
...
- Logical use of fields since they define type information.
- Avoids using ordered-dict metaclass.
Properties using regular assignments will print a warning and load,
however the order is undefined.
2018-07-11 22:18:09 +02:00
Campbell Barton
36a9436d80
Merge branch 'master' into blender2.8
2018-07-01 16:22:06 +02:00
Campbell Barton
ddee0931b8
RNA: use bool for boolean RNA types
...
We were using int's for bool arguments in BKE,
just to avoid having wrapper functions.
2018-07-01 15:57:59 +02:00
Bastien Montagne
646412004b
Merge branch 'master' into blender2.8
...
Conflicts:
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_space.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/intern/bpy_rna_anim.c
source/blender/python/intern/gpu_offscreen.c
2018-06-22 12:46:16 +02:00
Bastien Montagne
cbf5c738d6
Cleanup: get rid of last G.main's in bpy area.
...
Essentially 'validating' them as G_MAIN, and adding some asserts in
dubious places, that handled IDs are actually in G_MAIN.
2018-06-22 11:37:47 +02:00
Campbell Barton
f91e9529da
Merge branch 'master' into blender2.8
2018-05-05 09:57:45 +02:00
Campbell Barton
d83681807e
PyAPI: add pop method to RNA struct types
...
This fits in with existing dict style access.
2018-05-05 09:53:30 +02:00
Bastien Montagne
1913322402
Add generic bpy API to check if a property is overridable, and to set overridable status of custom props.
2018-04-17 18:07:08 +02:00
Campbell Barton
a2c0a382cd
Merge branch 'master' into blender2.8
2018-04-03 14:19:51 +02:00
Campbell Barton
692aeb6fe0
Cleanup: newlines left in messages
2018-04-02 15:46:31 +02:00
Campbell Barton
89fdd88906
Merge branch 'master' into blender2.8
2018-04-02 15:18:10 +02:00
Campbell Barton
017c731cf3
Logging: use for Python API
...
Adds categories "bpy.context" & "bpy.rna"
2018-04-02 13:13:57 +02:00
Campbell Barton
d937d06c02
WorkSpace: UI filtering for add-ons
...
Allows for each workspace to have it's own add-ons on display.
Filtering for: Panels, Menus, Keymaps & Manipulators.
Automatically applies to add-ons at the moment.
Access from workspace, toggled off by default
once enabled, add-ons can be white-listed.
See D3076
2018-03-01 01:31:07 +11:00
Sergey Sharybin
df1c88b652
Merge branch 'master' into blender2.8
2018-02-15 14:15:55 +01: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