Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-02-10Cleanup: Rename `BKE_library_override_` functions to `BKE_lib_override_library_`Bastien Montagne
pqrt of T72604.
2020-02-10Cleanup/refactor: Rename `BKE_library` files to `BKE_lib`.Bastien Montagne
Note that `BKE_library.h`/`library.c` were renamed to `BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here. Part of T72604.
2020-01-31Merge branch 'blender-v2.82-release'Brecht Van Lommel
2020-01-31USD: Include USD library version in System InfoSybren A. Stüvel
Pixar recently released USD 20.02 [1]. I think it's important for people to be able to figure out which version of the USD library is used in Blender. [1] https://github.com/PixarAnimationStudios/USD/releases/tag/v20.02 This commit exposes the USD library information via `bpy.app.usd`, and includes that info in the `system-info.txt` saved via Help → Save System Info. Reviewed by: brecht Differential Revision: https://developer.blender.org/D6724
2020-01-27Document that tessellate_polygon() doesn't handle degenerate geometrySybren A. Stüvel
This 'fixes' T68554: 'API mathutils.geometry.tessellate_polygon returns bad results sometimes' by documenting the limitations of the current implementation. I've also added a unit test for the function, so that any change in this behaviour will get noticed. No functional changes.
2020-01-23CMake: Refactor external dependencies handlingSergey Sharybin
This is a more correct fix to the issue Brecht was fixing in D6600. While the fix in that patch worked fine for linking it broke ASAN runtime under some circumstances. For example, `make full debug developer` would compile, but trying to start blender will cause assert failure in ASAN (related on check that ASAN is not running already). Top-level idea: leave it to CMake to keep track of dependency graph. The root of the issue comes to the fact that target like "blender" is configured to use a lot of static libraries coming from Blender sources and to use external static libraries. There is nothing which ensures order between blender's and external libraries. Only order of blender libraries is guaranteed. It was possible that due to a cycle or other circumstances some of blender libraries would have been passed to linker after libraries it uses, causing linker errors. For example, this order will likely fail: libbf_blenfont.a libfreetype6.a libbf_blenfont.a This change makes it so blender libraries are explicitly provided their dependencies to an external libraries, which allows CMake to ensure they are always linked against them. General rule here: if bf_foo depends on an external library it is to be provided to LIBS for bf_foo. For example, if bf_blenkernel depends on opensubdiv then LIBS in blenkernel's CMakeLists.txt is to include OPENSUBDIB_LIBRARIES. The change is made based on searching for used include folders such as OPENSUBDIV_INCLUDE_DIRS and adding corresponding libraries to LIBS ion that CMakeLists.txt. Transitive dependencies are not simplified by this approach, but I am not aware of any downside of this: CMake should be smart enough to simplify them on its side. And even if not, this shouldn't affect linking time. Benefit of not relying on transitive dependencies is that build system is more robust towards future changes. For example, if bf_intern_opensubiv is no longer depends on OPENSUBDIV_LIBRARIES and all such code is moved to bf_blenkernel this will not break linking. The not-so-trivial part is change to blender_add_lib (and its version in Cycles). The complexity is caused by libraries being provided as a single list argument which doesn't allow to use different release and debug libraries on Windows. The idea is: - Have every library prefixed as "optimized" or "debug" if separation is needed (non-prefixed libraries will be considered "generic"). - Loop through libraries passed to function and do simple parsing which will look for "optimized" and "debug" words and specify following library to corresponding category. This isn't something particularly great. Alternative would be to use target_link_libraries() directly, which sounds like more code but which is more explicit and allows to have more flexibility and control comparing to wrapper approach. Tested the following configurations on Linux, macOS and Windows: - make full debug developer - make full release developer - make lite debug developer - make lite release developer NOTE: Linux libraries needs to be compiled with D6641 applied, otherwise, depending on configuration, it's possible to run into duplicated zlib symbols error. Differential Revision: https://developer.blender.org/D6642
2020-01-16Python: disable environment variables by defaultCampbell Barton
This avoids the problem where Blender doesn't start because the PYTHONPATH points to an incompatible Python version, see T72807. Previously we chose to assume people who set the PYTHONPATH know what they're doing, however users may have set this for non Blender projects. So it's not obvious that this is the cause of Blender not to launch on their system. To use Python's environment vars, pass the argument: --python-use-system-env Note that this only impacts Python run-time environment variables documented in `python --help`, Access from `os.environ` remains.
2020-01-07Edit Mesh: pass in Mesh instead of BMEditMesh to EDBM_update_genericCampbell Barton
This avoids a list lookup in Main (recently added), passing in a mesh instead of an edit-mesh, since the mesh links to the edit-mesh.
2019-12-20Cleanup: remove redundant 'char *' castsCampbell Barton
2019-12-17PyAPI: disable threading hack when fluid is disabledCampbell Barton
2019-12-16Mantaflow [Part 6]: Updates in /blender/sourceSebastián Barschkis
A collection of smaller changes that are required in the /blender/source files. A lot of them are also due to variable renaming. Reviewed By: sergey Maniphest Tasks: T59995 Differential Revision: https://developer.blender.org/D3855
2019-12-13USD: Introducing a simple USD ExporterSybren A. Stüvel
This commit introduces the first version of an exporter to Pixar's Universal Scene Description (USD) format. Reviewed By: sergey, LazyDodo Differential Revision: https://developer.blender.org/D6287 - The USD libraries are built by `make deps`, but not yet built by install_deps.sh. - Only experimental support for instancing; by default all duplicated objects are made real in the USD file. This is fine for exporting a linked-in posed character, not so much for thousands of pebbles etc. - The way materials and UV coordinates and Normals are exported is going to change soon. - This patch contains LazyDodo's fixes for building on Windows in D5359. == Meshes == USD seems to support neither per-material nor per-face-group double-sidedness, so we just use the flag from the first non-empty material slot. If there is no material we default to double-sidedness. Each UV map is stored on the mesh in a separate primvar. Materials can refer to these UV maps, but this is not yet exported by Blender. The primvar name is the same as the UV Map name. This is to allow the standard name "st" for texture coordinates by naming the UV Map as such, without having to guess which UV Map is the "standard" one. Face-varying mesh normals are written to USD. When the mesh has custom loop normals those are written. Otherwise the poly flag `ME_SMOOTH` is inspected to determine the normals. The UV maps and mesh normals take up a significant amount of space, so exporting them is optional. They're still enabled by default, though. For comparison: a shot of Spring (03_035_A) is 1.2 GiB when exported with UVs and normals, and 262 MiB without. We probably have room for optimisation of written UVs and normals. The mesh subdivision scheme isn't using the default value 'Catmull Clark', but uses 'None', indicating we're exporting a polygonal mesh. This is necessary for USD to understand our normals; otherwise the mesh is always rendered smooth. In the future we may want to expose this choice of subdivision scheme to the user, or auto-detect it when we actually support exporting pre-subdivision meshes. A possible optimisation could be to inspect whether all polygons are smooth or flat, and mark the USD mesh as such. This can be added when needed. == Animation == Mesh and transform animation are now written when passing `animation=True` to the export operator. There is no inspection of whether an object is actually animated or not; USD can handle deduplication of static values for us. The administration of which timecode to use for the export is left to the file-format-specific concrete subclasses of `AbstractHierarchyIterator`; the abstract iterator itself doesn't know anything about the passage of time. This will allow subclasses for the frame-based USD format and time-based Alembic format. == Support for simple preview materials == Very simple versions of the materials are now exported, using only the viewport diffuse RGB, metallic, and roughness. When there are multiple materials, the mesh faces are stored as geometry subset and each material is assigned to the appropriate subset. If there is only one material this is skipped. The first material if any) is always applied to the mesh itself (regardless of the existence of geometry subsets), because the Hydra viewport doesn't support materials on subsets. See https://github.com/PixarAnimationStudios/USD/issues/542 for more info. Note that the geometry subsets are not yet time-sampled, so it may break when an animated mesh changes topology. Materials are exported as a flat list under a top-level '/_materials' namespace. This inhibits instancing of the objects using those materials, so this is subject to change. == Hair == Only the parent strands are exported, and only with a constant colour. No UV coordinates, no information about the normals. == Camera == Only perspective cameras are supported for now. == Particles == Particles are only written when they are alive, which means that they are always visible (there is currently no code that deals with marking them as invisible outside their lifespan). Particle-system-instanced objects are exported by suffixing the object name with the particle's persistent ID, giving each particle XForm a unique name. == Instancing/referencing == This exporter has experimental support for instancing/referencing. Dupli-object meshes are now written to USD as references to the original mesh. This is still very limited in correctness, as there are issues referencing to materials from a referenced mesh. I am still committing this, as it gives us a place to start when continuing the quest for proper instancing in USD. == Lights == USD does not directly support spot lights, so those aren't exported yet. It's possible to add this in the future via the UsdLuxShapingAPI. The units used for the light intensity are also still a bit of a mystery. == Fluid vertex velocities == Currently only fluid simulations (not meshes in general) have explicit vertex velocities. This is the most important case for exporting velocities, though, as the baked mesh changes topology all the time, and thus computing the velocities at import time in a post-processing step is hard. == The Building Process == - USD is built as monolithic library, instead of 25 smaller libraries. We were linking all of them as 'whole archive' anyway, so this doesn't affect the final file size. It does, however, make life easier with respect to linking order, and handling upstream changes. - The JSON files required by USD are installed into datafiles/usd; they are required on every platform. Set the `PXR_PATH_DEBUG` to any value to have the USD library print the paths it uses to find those files. - USD is patched so that it finds the aforementioned JSON files in a path that we pass to it from Blender. - USD is patched to have a `PXR_BUILD_USD_TOOLS` CMake option to disable building the tools in its `bin` directory. This is sent as a pull request at https://github.com/PixarAnimationStudios/USD/pull/1048
2019-12-11PyAPI: add utility functions get the size from an evaluated stringCampbell Barton
Allows including null bytes in the resulting string.
2019-11-28Fix (unreported) broken python resgistrable classes checks logic.Bastien Montagne
Logic for registering and checking properties of registrable classes was broken, allowing to ignore some errors. Recent fix rBeb798de101a `broke` the result of the pyapi_idprop_datablock test, because previously that test would fail (i.e. suceed, as it is an 'expected to break test') for a reason it was not designed to check. This is the problem with that kind of tests - you cannot really check that they are failing on the expected reason(s)...
2019-11-27Fix T71865: Separating mesh parts breaks shape keysCampbell Barton
This was an old bug which could be caused by saving after separating. Changes from 79b703bb635e made this fail reliably. Update shape key indices when they may be used again later.
2019-11-26PyAPI: add Quaternion.make_compatibleCampbell Barton
2019-11-26Fix T71806: BMElem.copy_from(other) failedCampbell Barton
Don't modify the Python reference when copying custom-data.
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-11-20Cleanup: commentsCampbell Barton
2019-11-20Fix T71680: _PyObject_LookupAttr memory leakCampbell Barton
2019-11-15Merge branch 'blender-v2.81-release'Campbell Barton
2019-11-15Docs: correct indent for to_swing_twist docstringCampbell Barton
2019-11-07Merge branch 'blender-v2.81-release'Bastien Montagne
2019-11-07Cleanup: remove debugging prints for bpy.msgbusCampbell Barton
2019-11-06Mathutils: expose the utility to find the closest point of a triangle.Alexander Gavrilov
This computation is complex and useful enough to expose the existing C math utility used by BVH nearest to Python. Otherwise this requires the use of intersect_point_tri and multiple intersect_point_line calls with some added vector math. Differential Revision: https://developer.blender.org/D6200
2019-10-22Merge branch 'blender-v2.81-release'Campbell Barton
2019-10-22Cleanup: remove BLI_dynstr use in py_capi_utilsCampbell Barton
Needed for standalone mathutils module.
2019-10-17Cleanup: spellingCampbell Barton
Also remove historic bftgl reference.
2019-10-16PyAPI: use public API's for module & builtin accessCampbell Barton
D6038 by @Dormouse
2019-10-16Cleanup: define PY_SSIZE_T_CLEAN for PythonCampbell Barton
Silence deprecation warnings running with Python 3.8.
2019-10-16Cleanup: warnings building with Python 3.8Campbell Barton
2019-10-16Fix for building with Python 3.8Campbell Barton
2019-10-10Cleanup: clang-format, spellingCampbell Barton
2019-10-09PyAPI: drop Vector requirement for tessellate_polygonCampbell Barton
Use mathutils_array_parse which converts any sequence of numbers.
2019-10-09PyAPI: avoid normal calculation for tessellate_polygonCampbell Barton
Use fixed normal for 2D input, no need to calculate it.
2019-10-07Fix T70537: Documentation: bpygpu_offscreen_draw_view3d_doc not up to dateUlysse Martin
2019-10-04Fix T70481: Segfault printing 'private data' evaluated IDs.Bastien Montagne
This commit solves the bug itself (code was broken when real_id owner of the private data ID could not be found), and generates a more sensible representation for all evaluated IDs, makes no sense to display them as being part of `bpy.data....`!
2019-10-01Fix ImBuf.load failure showing filename as garbage bytesColin Basnett
Differential Revision: https://developer.blender.org/D5879
2019-09-30Cleanup: use PyC_StringEnum to path access functionsCampbell Barton
This gives better error messages, simplify code.
2019-09-30ImBuf Py API: implement resize method argumentCampbell Barton
2019-09-30PyC API: utility to parse a string as an RNA like enumCampbell Barton
More convenient than comparing strings, with the advantage that errors don't need to repeat expected values.
2019-09-30Cleanup: spellingCampbell Barton
2019-09-25Added missing documentation for `options` parameter in `keyframe_insert()`Sybren A. Stüvel
The RNA docstring of `keyframe_insert()` didn't mention the `options` parameter in the function signature. No functional changes.
2019-09-25LibOverride: Fix 'overridable' flag desapearing when setting IDProp from py ↵Bastien Montagne
code. Do not see any reason not to copy over the flag of the old, existing IDProp to the new one when assigning (e.g. `C.object['prop'] = 0.5` would nuke that IDProp flag).
2019-09-25Cleanup: remove override's 'static' references in some py API docs strings.Bastien Montagne
2019-09-23Fix T70177: Crash when calling to_track_quat() without argumentsJacques Lucke
2019-09-23ImBuf: add planes, channels attributesCampbell Barton
D5857 by @cmbasnett
2019-09-22Mathutils: expose the swing + twist Quaternion decomposition to Python.Alexander Gavrilov
This decomposition is useful in rigging, and involves a math trick.
2019-09-19Fix T70060: Add bgl wrapper for glVertexAttribIPointerJacques Lucke
2019-09-16Revert "PyAPI: expose OperatorType.modal_keymap"Campbell Barton
This reverts commit b53ee963b16d817a6367bd7c73b866036868b2e2. Full support for defining modal enums and access through events is more involved, revert for now.