Age | Commit message (Collapse) | Author |
|
|
|
|
|
This shows the text as part of the assertion message.
|
|
This adds id_properties_clear() and id_properties_ensure() functions
to RNA structs. This is meant as an initial change based on discussion
in review of D9697. However, they may be useful in other situations.
The change requires refactoring the internal idproperties callback to
return a pointer to the IDProperty pointer, which actually turns out
to be quite a nice cleanup.
An id_properties attribute could be added in the future potentially.
Differential Revision: https://developer.blender.org/D11908
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
|
|
This patch fixes many minor spelling mistakes, all in comments or
console output. Mostly contractions like can't, won't, don't, its/it's,
etc.
Differential Revision: https://developer.blender.org/D11663
Reviewed by Harley Acheson
|
|
- Matches changes in Python 3.x dictionary methods.
- Iterating now raises a run-time error if the property-group changes
size during iteration.
- IDPropertyGroup.iteritems() has been removed.
- IDPropertyGroup View & Iterator types have been added.
- Some set functionality from dict_keys/values/items aren't yet
supported (isdisjoint method and boolean set style operations).
Proposed as part of T85675.
|
|
When popping ID-property groups/arrays,
ID-property was removed but not freed.
Now the value is converted to a native Python type and freed.
|
|
Remove custom properties from `__dir__` method result since these
can't be accessed using `__getattr__`.
Introduced in the 2.5x Python API update.
|
|
When using `bpy.data.actions[action_name, "nonexistant-library"]`,
use the term `filepath` instead of `name` in the error message.
Also increase the size to match the file path length.
Ref D10253
|
|
|
|
This is no longer needed for MSVC-2017.
|
|
This adds support for creating a `BlendFile` (internally called `Main`),
which is limited to a context.
Temporary data can now be created which can then use
`.libraries.load()` the same as with `bpy.data`.
To prevent errors caused by mixing the temporary ID's with data in
`bpy.data` they are tagged as temporary so they can't be assigned
to properties, however they can be passed as arguments to functions.
Reviewed By: mont29, sybren
Ref D10612
|
|
|
|
|
|
Previously only static methods were supported.
Now C/API functions added to collections can receive a 'self' argument.
|
|
By default objects are no longer GC tracked, this removes some overhead
although it's not significant in my own testing.
- Only enable GC for StructRNA when 'WITH_PYTHON_SAFETY' is on.
- Only track StructRNA when their 'reference' is set.
- Add missing NULL check when 'WITH_PYTHON_SAFETY' is on
and objects new objects be created.
|
|
Don't assign the BPy_StructRNA a value which can be 'None',
instead, set it to NULL.
|
|
Reference counting error in dc61a63e3f1bb3773677fb009fd787af7bd5c727
|
|
Support Python 3.10a5 or 3.9x with support explicitly enabled.
- Enable Python's postponed annotations for Blender's RNA classes
types registered on startup.
- Using postponed annotations has implications for how they are defined,
since they must evaluate in the modules name-space instead of the
classes name-space. See changes to annotations in `release/scripts`.
- Use `from __future__ import annotations` at the top of the module
to ensure the script will run with Python 3.10.
- Old logic is kept since it could be used if PEP-649 is supported.
Resolves T83626
Ref D10474
|
|
This is needed to support Python 3.10's Postponed annotation evaluation.
It also simplifies type checking.
|
|
|
|
C/Python defined types were accessible but not exposed in dir(bpy.types)
|
|
This is needed to support `typing.get_type_hints`,
which expects each classes module to have a module '__dict__'.
|
|
This was added to assist upgrading scripts to Blender 2.8x,
now 2.9x is released there is no need to keep this block.
|
|
Replace deprecated _PyUnicode_AsString{AndSize} usage.
T83626 still needs to be resolved before 3.10 is usable.
|
|
This removes Python version checks needed to build with 3.8+ and 3.7x.
Ref D10381
|
|
|
|
Comment blocks not conforming to convention.
|
|
|
|
|
|
While `tp_print` was deprecated, Python 3.8+ uses this for
'tp_vectorcall_offset' which wasn't stated in the comment from
efd71aad4f22ec0073d80b8dd296015d3f395aa8.
Instead of suppressing clang-tidy, use preprocessor a check since
this properly represents the difference between Python versions.
|
|
|
|
Ths variable was initialized for false, while it was expected to be
true.
|
|
|
|
This exposes the use_ghost argument to RNA_property_is_set_ex.
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required.
Differential Revision: https://developer.blender.org/D9250
Reviewed by Campbell Barton
|
|
Matching BPY_context_set.
|
|
The context was stored both in __py_context & bpy_context_module.
This avoids duplicate functions to update them too.
|
|
|
|
In 3.8 and older the class held a reference to methods,
this is no longer the case in 3.9.
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Define enum `eContextResult` and use its values for returns, instead of
just returning 1, 0, or -1 (and always having some comment that explains
what -1 means).
This also cleans up the mixup between returning `0` and `false`, and `1`
and `true`. An inconsistency was discovered during this cleanup, and
marked with `TODO(sybren)`. It's not fixed here, as it would consititute
a functional change.
The enum isn't used everywhere, as enums in C and C++ can have different
storage sizes. To prevent issues, callback functions are still declared
as returning`int`. To at least make things easier to understand for
humans, I marked those with `int /*eContextResult*/`.
This is a followup of D9090, and is intended to unify how context
callbacks return values. This will make it easier to extend the approach
in D9090 to those functions.
No functional changes.
Differential Revision: https://developer.blender.org/D9095
|
|
|
|
See
https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#info-field-lists
|
|
Following the most widely used convention for including todo's in
the code, that is: `TODO(name):`, `FIXME(name)` ... etc.
|
|
Printing an evaluated view layer would show:
Evaluated Scene 'Scene'
- Now __repr__ uses the __str__ fallback for evaluated data,
as done in other situations where we can't create a string that
would evaluate to the data.
- __str__ now shows when the data is evaluated.
- __str__ always includes the memory address
(which was previously only shown for structs without a name).
|