Age | Commit message (Collapse) | Author |
|
This patch adds support to export and import grease pencil in several formats.
Inlude:
* Export SVG
* Export PDF (always from camera view)
* Import SVG
The import and export only support solid colors and not gradients or textures.
Requires libharu and pugixml.
For importing SVG, the NanoSVG lib is used, but this does not require installation (just a .h file embedded in the project folder)
Example of PDF export: https://youtu.be/BMm0KeMJsI4
Reviewed By: #grease_pencil, HooglyBoogly
Maniphest Tasks: T83190, T79875, T83191, T83192
Differential Revision: https://developer.blender.org/D10482
|
|
|
|
Minor manual tweak to prevent wrapping an array into columns.
|
|
|
|
|
|
Reduces `BPyPropStore` size by one pointer.
|
|
This adds CoreAudio as audio backend on macOS.
CoreAudio is the standard audio API on macOS.
Ref T86590
|
|
This adds WASAPI as audio backend on Windows.
WASAPI is the modern standard audio API on
Windows introduced with Windows Vista.
Ref T86590
|
|
This adds PulseAudio as audio backend on Linux.
PulseAudio is the main audio engine used on most,
if not all, Linux distributions today.
Ref T86590
|
|
|
|
|
|
Callbacks used in `bpy.props` didn't hold a references to the functions
they used.
While this has been the case since early 2.5x it didn't cause any
problems as long as the class held a reference.
With Python 3.10 or when using `from __future__ import annotations`,
the annotations are no longer owned by the class once evaluated.
Resolve this by holding a reference in the module, which now supports
traverse & clear callbacks so the objects are visible to Python's
garbage collector.
Also refactor storage of Python data, moving from an array into a struct.
|
|
|
|
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
|
|
This allows adding ID tags when linking/loading data.
This is needed to implement loading non 'G.main' ID data-blocks,
see D10612.
|
|
|
|
|
|
The `MAX_LIBARRAY` define was an annoying doublon to the `INDEX_ID_MAX` enum value
now defined in `DNA_ID.h`, and it is no more useful.
And comments were somewhat outdated. Also added an explanation about
chosen order for the `INDEX_ID_<IDTYPE>` order.
|
|
Replace static methods with regular methods.
Now the 'Main' value is taken from the collection.
Needed to support multiple 'Main' instances in Python, see T86183.
|
|
Previously only static methods were supported.
Now C/API functions added to collections can receive a 'self' argument.
|
|
In this case, there is no benefit to using Py_CLEAR
as the value will never be NULL and can't be used later on.
|
|
All tracked objects need a matching un-track,
also remove redundant Py_XDECREF call.
|
|
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.
|
|
This API function can now purge recursively in a single call, and choose
to ignore (not purge) local or linked IDs.
Default behavior (with not argument) remains unchanged, so no API
breackage here.
|
|
This reverts commit d3a96e5022e121426c8926d0507effe4e9b4005f.
|
|
|
|
There are fewer python callbacks than `ARegionType`s.
This also broke GTests's `bf_blenderloader_tests`.
|
|
When closing the blender, while the callbacks are removed, the
reference count of the object used as `customdata` is not decremented.
This commit adds two functions that correctly release the
python `draw_callbacks` before releasing all `draw_callbacks`.
Differential Revision: https://developer.blender.org/D10478
|
|
Even though this might change, rigify, animation-nodes & translation
extraction depend on being able to extract this information.
|
|
Reference counting error in dc61a63e3f1bb3773677fb009fd787af7bd5c727
|
|
Regression from cafd6b519c5f5c4b67d0dfe3d453cd4223b38716.
D10494 by @ysano with edits.
|
|
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
|
|
While not needed for Blender, Animation Nodes uses this information,
expose this information for scripts to access that need it.
|
|
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.
|
|
Use Python 3.8's API for setting the initial configuration.
This replaces a mix of our logic and direct calls to the Python API
and has no user visible changes.
Using the Python API makes the logic easier to follow and provides
utilities such as `PyConfig_SetBytesArgv`
that wasn't available in previous releases.
Note that this uses Python's utf8/wchar_t conversions,
which used to cause problems (see T31506).
Since `Py_UTF8Mode` was set, the systems locale isn't used for decoding,
allowing us to use Python's utility functions that call
`Py_DecodeLocale` internally.
Ref D10382
|
|
This removes Python version checks needed to build with 3.8+ and 3.7x.
Ref D10381
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D10237
|
|
Removes two unused --debug-gpu command line flags (unused as in, does nothing):
* `--debug-gpumem`: Unused since c08d84748804, the info is now available in
the status-bar if enabled in the Preferences. Initially added in
fec317de8d57.
* `--debug-gpu-shaders`: Unused since 216d78687d2b, double checked with
Clément, he says it's not that useful nowadays. Initially added in
fec317de8d57.
Addresses T83954 and T83953.
Differential Revision: https://developer.blender.org/D10244
Reviewed by: Clément Foucault
|
|
|
|
|