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
Campbell Barton
873a87c7e8
Merge branch 'master' into blender2.8
2018-01-16 14:56:03 +11:00
Campbell Barton
e428ea3e00
Cleanup: indentation
2018-01-16 11:40:43 +11:00
Campbell Barton
129196dc32
Merge branch 'master' into blender2.8
2018-01-15 15:59:59 +11:00
Campbell Barton
ec52e64a5d
RNA: Add RNA_property_string_set_bytes
...
This is needed to set values that contain zero bytes
(where the length isn't fixed).
2018-01-15 15:59:10 +11:00
Campbell Barton
dd4e0cd3e3
DNA/RNA: add 'py_instance' for ID types
...
Avoid creating new Python instances
every time a scene, object, mesh .. etc are accessed.
Also resolves crashes T28724, T53530
although it's only valid for ID types, not modifiers vertices etc.
Back-ported from blender2.8 branch.
2017-12-11 18:37:54 +11:00
Campbell Barton
28048f75ce
Merge branch 'master' into blender2.8
2017-11-29 21:32:16 +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
ec2bbc90e7
Merge branch 'master' into blender2.8
2017-10-18 17:09:41 +11:00
Campbell Barton
ab7ebf2b10
Cleanup: Use const for RNA EnumPropertyItem args
...
Practically all access to enum data is read-only.
2017-10-18 16:04:07 +11:00
Campbell Barton
7d7741d25f
Merge branch 'master' into blender2.8
2017-09-11 16:52:53 +10:00
Campbell Barton
11a9434c2d
Resolve T52687: Add node label shows as 'Unknown'
...
Add type access method, need to extend to other types
for now just get node UI working properly again.
2017-09-09 22:56:58 +10:00
Campbell Barton
a133b74709
Merge branch 'master' into blender2.8
2017-09-08 03:18:39 +10:00
Campbell Barton
60020f57d7
Correct function name in argument parsing
2017-09-08 00:59:27 +10:00
Campbell Barton
e44bf43f6c
PyAPI: add function to get an RNA subclass
...
This is inconvenient in regular Python, add a class-method
to perform the operation, eg:
bpy.types.Node.bl_rna_find_subclass("CustomNodeType")
2017-09-08 00:02:09 +10:00
Campbell Barton
c843e84892
Merge branch 'master' into blender2.8
2017-09-01 02:30:48 +10:00
Campbell Barton
636baa598a
RNA: Limit which classes struct-map contains
...
Only add subclasses of: Menu, Panel, Header, UIList, Operator
This helps avoid unnecessary naming collisions,
See T52599 for details
2017-08-31 23:49:50 +10:00
Campbell Barton
7497488149
Merge branch 'master' into blender2.8
2017-08-20 15:50:15 +10:00
Campbell Barton
46cf33bf01
PyAPI: Make use of PyC_LongAs... API
...
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
2017-08-20 15:49:10 +10:00
Campbell Barton
2ff9c8a3bc
PyAPI: avoid redundant PyLong_AsLong call
...
Assigning to an RNA array converted from Python to C twice.
2017-08-20 15:30:14 +10:00
Campbell Barton
2332051419
Merge branch 'master' into blender2.8
2017-08-19 21:54:05 +10:00
Campbell Barton
4e468ceb71
PyAPI: Fix memory leak w/ empty, allocated enums
2017-08-18 18:29:27 +10:00