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
2018-06-20Cleanup: remove some useless Derivedmesh struct declarations.Bastien Montagne
2018-06-11Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_mesh.h source/blender/blenkernel/intern/mesh_convert.c source/blender/editors/interface/interface_eyedropper_color.c source/blender/editors/object/object_add.c source/blender/editors/space_image/image_ops.c source/blender/makesrna/intern/rna_image.c source/blender/windowmanager/intern/wm_draw.c
2018-06-11Cleanup: remove moar ugly G.main usages...Bastien Montagne
BKE_image was an ugly nest, could fix all but the ones from compositor, so moved ugly G.main there, at least we know where the Evil is that way ;)
2018-06-06Renamed BKE_nomain_mesh_xxx → BKE_mesh_nomain_xxxSybren A. Stüvel
This maintains the `BKE_mesh_` prefix for the mesh-related BKE functions.
2018-06-06Modifiers: ported curve_calc_modifiers_post() internals from DerivedMesh → ↵Sybren A. Stüvel
Mesh The function still returns a DerivedMesh, but internally it uses Mesh now.
2018-06-05Moved function declarations from BKE_mesh.h → BKE_mesh_runtime.hSybren A. Stüvel
2018-06-01Modifiers: ported applying modifier from DerivedMesh → MeshSybren A. Stüvel
2018-06-01Mesh: Replace DM for mesh -> curve conversionCampbell Barton
2018-05-30Fix Cycles viewport render stuck with curve objects.Brecht Van Lommel
We should solve this better by making the depsgraph convert all curves to meshes, for now ensure we don't to depsgraph tags during export.
2018-05-29Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_material.h source/blender/blenkernel/BKE_mesh.h source/blender/blenkernel/intern/library_remap.c source/blender/blenkernel/intern/material.c source/blender/editors/object/object_relations.c source/blender/editors/render/render_preview.c source/blender/makesrna/intern/rna_object.c
2018-05-29Cleanup: Get rid of G.main in BKE_material.Bastien Montagne
Note that in some cases, this only moves the G.main case to somne other places - in particular, RNA getters/setters are becoming annoying here...
2018-05-17Modifiers: ported Collision DerivedMesh → MeshSybren A. Stüvel
2018-05-16Particle System: ported most DerivedMesh → MeshSybren A. Stüvel
There are a few places where DerivedMesh is still used, most notably when calling the (not yet ported) cloth simulation. There is also still the use of Object.derivedDeform and Object.derivedFinal. Those places are marked with a TODO. Some functions in the editors module were copied to accept Mesh. Those already had 'mesh' in the name; the copies are suffixed with '__real_mesh' for easy renaming later when the DM-based functionality is removed.
2018-05-16Add BKE_mesh_is_validMai Lavelle
Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more closely. Will be used in port of `mesh_calc_modifiers` from `DerivedMesh` to `Mesh`.
2018-05-11Bmesh: Clear possible geometry saved at runtime when converting bmesh to mesh.Germano
2018-05-09Fix T55015: Crash on selection after recent BVH changesDalai Felinto
Runtime data should always be initialized to NULL on read-time.
2018-05-08Cleanup: mesh_runtime namingCampbell Barton
- BKE_mesh_get_looptri_num -> BKE_mesh_runtime_looptri_len - BKE_mesh_runtime_recalc_looptri -> BKE_mesh_runtime_looptri_recalc - BKE_mesh_get_looptri_array -> BKE_mesh_runtime_looptri_ensure
2018-05-08Cleanup: move mesh conversion into own functionCampbell Barton
2018-05-08Cleanup: consistent BKE_mesh namingCampbell Barton
2018-05-08Cleanup: use bool for BKE_mesh_new_from_objectCampbell Barton
2018-05-08Cleanup: rename variablesCampbell Barton
DerivedMesh had some odd conventions, remove from BKE_mesh.
2018-05-08Cleanup: use 'nomain' when not in library dataCampbell Barton
Rename only.
2018-05-08Cleanup: whitespace, duplicate includesCampbell Barton
2018-05-08Ported Mesh Deform modifierSybren A. Stüvel
This modifier still has issues that are not related to this port: - While editing the deformation mesh, the deformed mesh doesn't update. This update only happens after exiting edit mode, making editing cumbersome. - Binding doesn't work yet. It works fine when binding in master and loading pre-bound in 2.8. This was also an issue before this port, and will be investigated separately.
2018-05-08looptri + bvhtree support for MeshSybren A. Stüvel
2018-05-08Rename BKE_bmesh_to_mesh to BKE_bmesh_to_mesh_nomain.Bastien Montagne
Let's be clear about functions generating datablocks outside of Main database.
2018-05-08BKE_mesh_new → BKE_mesh_new_nomainSybren A. Stüvel
Including 'nomain' in the name explicitifies that the returned mesh is NOT stored in any library.
2018-05-08Added BKE_mesh_ensure_normals()Sybren A. Stüvel
This calls BKE_mesh_calc_normals() only if the mesh vertex normals are marked as dirty.
2018-05-08Added BKE_mesh_new()Sybren A. Stüvel
This function creates a Mesh struct with a number of vertices/edges/etc. It allocates the minimal number of CD layers needed. Currently not yet used, but will be soon in the upcoming BKE_new_mesh_from_curve_displist().
2018-05-02Renamed 1st parameter of BKE_bmesh_to_mesh from `me` to `be`Sybren A. Stüvel
It's a BMesh, it shouldn't be called `me`
2018-05-02Modifiers: ported Bevel modifier DerivedMesh → MeshSybren A. Stüvel
This introduces `BKE_mesh_to_bmesh_ex()`, which exposes all of the `BMeshFromMeshParams` parameters to the caller. This is required to enable the `calc_face_normal` flag, which is required for the Bevel modifier. This also introduces `BKE_bmesh_to_mesh()`, which allocates a new `Mesh`, converts the `BMesh` to it, and returns it. The returned mesh is owned by the caller.
2018-05-01Modifiers: Mirror DerivedMesh → MeshSybren A. Stüvel
2018-05-01Modifiers: Simple Deform & Build, DerivedMesh → MeshSybren A. Stüvel
This commit introduces `EditMeshData`. The fields in this struct are extracted from `EditDerivedBMesh` into their own struct `EditMeshData`, which can then also be used by the `Mesh` struct. This allows passing deformed vertices efficiently to the draw routines. The modifier code constructs a new Mesh instead of writing to ob->data; even when ob->data is a CoW copy, it can still be used by different objects and thus shouldn't be modified by a modifier.
2018-04-30Fix T54901: Crash renaming UV layerCampbell Barton
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-04-13Python API: remove preview/render resolution settings from API functions.Brecht Van Lommel
For correct results these must have been set already when the depsgraph was created and evaluated, so all dependencies have appropriate resolutions too. For particle we no longer backup and restore the viewport particles to avoid overwriting them during render, as copy-on-write solves this for us. Even without COW particles seem to work ok. This also removes the particle simplification options based on camera. This was never used much and only available in Blender Internal. Differential Revision: https://developer.blender.org/D3148
2018-03-02Merge branch 'master' into blender2.8Campbell Barton
2018-03-01Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.Bastien Montagne
This merges changes in internals, runtime-only of existing custom normals code, which make sense as of themselves, and will make diff of soc branch easier/lighter to review. In the details, it mostly changes two things: * Now, smooth fans (aka MLoopNorSpaceArray) can store either loop indices, or pointers to BMLoop themselves. This makes sense since in BMesh, it's relatively easy to get index from a BMElement, but nearly impracticable to go the other way around. * First change enforces another, now we cannot rely anymore on `loops` being NULL in MLoopNorSpace to detect single-loop fans, so we instead store that info in a new flag. Again, these are expected to be totally non-functional changes.
2018-02-22Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/bmesh/intern/bmesh_mesh.c
2018-02-22Fix (unreported) meshes changing shading when creating empty clnors data.Bastien Montagne
When you were using autosmooth to generate some custom normals, and created empty custom loop normal data, you would go back to an 'all smooth' shading, cancelling some sharp edges generated by the mesh's smooth threshold. Now we will first tag such edges as sharp, such that shading remains the same. This is not crucial in current master, but it is for clnors editing gsoc branch!
2018-02-21Merge branch 'master' into blender2.8Sergey Sharybin
2018-02-20Cleanup: split normals: use different varnames for angle and its cosine.Bastien Montagne
Using same name for two different things is not the best idea ever...
2017-08-22Cleanup: naming for mesh dirty flagsCampbell Barton
- NOCHECK -> ALL - ALL -> MAYBE_ALL Where 'MAYBE_ALL' checks to see if the mesh has changed. This is clearer that `BKE_MESH_BATCH_DIRTY_ALL` is dirty and going to be updated without any guess-work.
2017-08-21Merge branch 'master' into blender2.8Campbell Barton
2017-08-21Fix T52434: Restore mesh center of mass calculationCampbell Barton
The new method while improved for solid objects doesn't work for non-manifold meshes, keep both.
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2017-07-20RNA: face-map accessCampbell Barton
Currently RNA doesn't give us a good way of accessing singleton layers, for now expose as a layer list (skin & paint-pask do this too). Noted in T47811 that this should be changed.