8a61ea7296
Cleanup: add trailing commas
...
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
1a208f0326
Cleanup: indentation, naming
...
Use rna naming conventions for unit-settings callbacks.
2019-01-02 17:07:47 +11:00
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
5921656655
Merge branch 'master' into blender2.8
2018-12-20 12:24:37 +11:00
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
2dee1772e1
Py Docs: documentation for draw_handler_add/remove
2018-12-18 12:31:37 +01:00
a5a86f3921
Cleanup: python doc-strings
...
Indentation & trailing space.
2018-11-14 09:26:53 +11:00
72369c638d
Cleanup: python doc-strings
...
Indentation & trailing space.
2018-11-14 09:05:07 +11:00
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
46587b3ccb
PyAPI: support for Python paint cursors
2018-10-25 15:31:02 +11:00
e4c53d9163
Missing from last commit
2018-09-20 14:57:01 +10:00
e228574417
PyAPI: correct term for class property warning
2018-09-20 14:55:07 +10:00
6b433f4eb3
Merge branch 'master' into blender2.8
2018-09-19 18:20:50 +02:00
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
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
77d70c7f1d
Merge branch 'master' into blender2.8
2018-07-16 15:16:00 +02:00
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
5ebebcfbff
WM: rename manipulator to gizmo internally
2018-07-14 23:49:00 +02:00
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
55354d734e
Merge branch 'master' into blender2.8
2018-07-12 08:31:19 +02:00
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
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
36a9436d80
Merge branch 'master' into blender2.8
2018-07-01 16:22:06 +02:00
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
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
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
f91e9529da
Merge branch 'master' into blender2.8
2018-05-05 09:57:45 +02:00
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
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
a2c0a382cd
Merge branch 'master' into blender2.8
2018-04-03 14:19:51 +02:00
692aeb6fe0
Cleanup: newlines left in messages
2018-04-02 15:46:31 +02:00
89fdd88906
Merge branch 'master' into blender2.8
2018-04-02 15:18:10 +02:00
017c731cf3
Logging: use for Python API
...
Adds categories "bpy.context" & "bpy.rna"
2018-04-02 13:13:57 +02:00
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
df1c88b652
Merge branch 'master' into blender2.8
2018-02-15 14:15:55 +01:00
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
873a87c7e8
Merge branch 'master' into blender2.8
2018-01-16 14:56:03 +11:00
e428ea3e00
Cleanup: indentation
2018-01-16 11:40:43 +11:00
129196dc32
Merge branch 'master' into blender2.8
2018-01-15 15:59:59 +11:00
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
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
28048f75ce
Merge branch 'master' into blender2.8
2017-11-29 21:32:16 +11:00
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
ec2bbc90e7
Merge branch 'master' into blender2.8
2017-10-18 17:09:41 +11:00
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
7d7741d25f
Merge branch 'master' into blender2.8
2017-09-11 16:52:53 +10:00
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
a133b74709
Merge branch 'master' into blender2.8
2017-09-08 03:18:39 +10:00
60020f57d7
Correct function name in argument parsing
2017-09-08 00:59:27 +10:00
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