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-09-20Cleanup: rename 3D view ray calculation functionsCampbell Barton
Using near far and optionally clipping planes is involved and not needed in many cases. Rename so a simpler version of this function can be added.
2018-06-11Cleanup: Moar G.main removal of Hell.Bastien Montagne
This commit actually adds some G.main... but at much, much higher level than the ones it removes, so should still be better ;)
2018-05-06Object Snap: add object & matrix to view ray castCampbell Barton
Some snap functions already exposed this.
2018-05-03BKE bvhtree: Add `tree_type` parameter to `bvhtree_from_mesh_get`.Germano
This will allow greater control of the bvhtrees that are obtained, and helps identify problems. It is also an additional step to unify the functions.
2018-05-01Refactoring: bvhutils: Use a function that gets the bvhtree through an ↵Germano
identifier type. Reviewed By: @campbellbarton Differential Revision: https://developer.blender.org/D3192
2018-03-13Cleanup: doxygen commentsCampbell Barton
2018-01-10Cleanup: comment block alignmentCampbell Barton
2017-11-30Transform: Use single flag with more meaningful name to prevent snapping to ↵Sergey Sharybin
a dependent object The idea of this flag was to prevent snapping onto an object which depends on currently modifying ones. Using single flag makes more sense here, and also makes it possible to replace some ob->recalc based magic with depsgraph query to set those flags.
2017-11-30Transform: Remove some legacy code about snapping in particle edit modeSergey Sharybin
It looks stupid to first force some flag being set and then have workaround to ignore that flag in snapping code. Let's just not set the flag in the first place. The only useful situation where such snapping was usable is to move roots of disconnected hair, which still works just fine. However, there might be some other hidden corner case where this workaround was needed.
2017-10-17Cleanup: use 'e' prefix for enum typedefsCampbell Barton
Convention was only followed loosely, apply to DNA where changes aren't likely to conflict. (Skipped ModifierType for eg).
2017-09-19transform_snap_object: simplify IGNORE_BEHIND_RAYmano-wii
`depth_get` is called in most of the time. So not worth going through so many conditions
2017-08-16Fix T52414: Blender 2.79 crash on object duplication via menu.Bastien Montagne
Caused by own recent changes in handling of verts/edges/etc. arrays storage for raycasting (rBe324172d9ca6690e8). Issue was actually even weirder - there is absolutely no reason at all to release DM here, those finaldm are stored in Object or EditMesh structs and handled by general update system, other code shall never try to release them!
2017-08-11Fix transform snap code using 'allocated' flags to get verts/edges/etc. ↵Bastien Montagne
arrays again from DM. This was... horribly wrong, CDDM will often *not* need to allocate anything to return arrays of mesh items! Just check whether array pointer is NULL. Also, remove `DM_get_looptri_array`, that one is useless currently, `dm->getLoopTriArray` will always return cached array (computing it if needed).
2017-08-11Cleanup: whitespaceCampbell Barton
2017-07-24Revert "ransform: fix unreported bug: geometry hidden by clipping border ↵mano-wii
(alt + b) is not bypassed in snap to faces" This reverts commit 7f09b55d01c248a741e967af597b7519f095983b.
2017-07-24ransform: fix unreported bug: geometry hidden by clipping border (alt + b) ↵mano-wii
is not bypassed in snap to faces The geometry behind the farther clip_plane is not bypassed
2017-07-22Transform: remove unused argumentmano-wii
2017-07-21Another solution to bug T38358 and relatedmano-wii
Moving the ray_start_local to the new position does not lose as much precision as moving the ray_org_local to the corresponding position. The problem of inaccuracy is within the functions: `bvhtree_ray_cast_data_precalc` and` fast_ray_nearest_hit`. And not directly in the values of the rays.
2017-07-18Transform: avoid possible uninitialized varCampbell Barton
2017-07-14Snap System: Fixed index of objects used to make `snap to volume`mano-wii
*note: make a complete test scene
2017-07-14Snap System: Use function that does the interactor instead of Macromano-wii
Macro makes debugging difficult. And in that case I was escaping from the style used in Blender
2017-07-14Snap System: missing changemano-wii
2017-07-14Snap System: fix rename `ob` to `obj`mano-wii
This would bring problems with dupli objects
2017-07-14Snap System: Replace creation and destruction of the object list by a Macromano-wii
The macro got a little strange, but it's better than using the MEM_mallocN inside a loop, or repeat the lines
2017-07-13Snap System: remove unused functionmano-wii
2017-07-12Cleanup: unused varsCampbell Barton
2017-07-11Fix [T51595]: Snap to edge does not work with high zoom levelmano-wii
That problem occurs because of the imprecision of `short int` (16 bits). The 3d coordinates are converted to 2d, and when they are off the screen, their values can exceed 32767! (max short int value) One quick solution is to use float instead of short The snap code is actually a little tricky. I want to make some arithmetic simplifications in it
2017-07-11Style (remove characters that caused "a binary file")mano-wii
2017-07-11Snap System: Separate raycast functions from nearest2d functionsmano-wii
The only similarity between these functions is that both serve to snap. However their codes are totally different from one another. So by separating these functions, it: - removes the need to put several conditions; - simplifies and - optimizes the code
2017-06-19Cleanup: doxygen commentsCampbell Barton
Also remove duplicate & mismatching comments from grease-pencil header. Keep comments close to implementation to avoid getting out of sync.
2017-04-01Cleanup: styleCampbell Barton
2017-03-11Cleanup: code style & cmakeCampbell Barton
2017-02-26Fix unreported bug: Ensure you have the correct array directory even after ↵Germano Cavalcante
the `dm->release(dm)`
2017-02-14`BKE_boundbox_ensure_minimum_dimensions` is no longer necessaryGermano Cavalcante
The bug T46099 no longer applies since the addition of `dist_squared_to_projected_aabb_simple` Has also been added comments that relates to an occlusion bug with the ruler. I'll investigate this.
2017-02-14transform_snap_object: Remove `do_bb` parameter. It is always trueGermano Cavalcante
2017-02-06fix T50602: Avoid crash when executing ↵Germano Cavalcante
`transform_snap_context_project_view3d_mixed` with `dist_px` NULL
2017-02-05fix T50592: Scene.raycast not workingGermano Cavalcante
Ray_start and ray_normal values were being ignored
2017-02-04Fix (unreported) crash in new snap code.Bastien Montagne
Looks like `object_map` and `mem_arena` may be NULL sometimes... Also, cleaned up function pointers declaration of Nearest2dUserData, those were warning out in gcc. Please, *always* use typdef defined prototypes for function pointers, it is sooooo much cleaner and clearer that way. And easy to convert from compatible functions too.
2017-02-04Snap System: Use callbaks to differentiate how referenced vertives of ↵Germano Cavalcante
DerivedMeshs and Bmeshs Before it was informed the type of object in the `userdata`, and a same function ran between the types to obtain the coordinates of the vertices
2017-02-04Remove flag: `SNAP_OBJECT_USE_CACHE` from snap_contextGermano Cavalcante
Since the cache is created in one way or another, this flag is not really making a difference More details here: D2496
2017-02-01Snap System: BVH: Ignore calculations, in parent nodes, used only in ↵Germano Cavalcante
perspective view Strangely this change does not affect the performance very much. Suzanne subdividide 6x (ortho view): Before:0.00013983 After :0.00013920 But it makes it easier to read the code
2017-01-31Snap System: Invert the test order of the elements to snap (useful for ruler)Germano Cavalcante
When the function that tests snap on multiple elements starts from the face and ends at the vertex, the transition between elements becomes much smoother.
2017-01-31Fix variable shadow and avoid calculating same value twiceSergey Sharybin
2017-01-31Fix bug not reported: Ruler/Protractor: Snap to vertices and edges was not ↵Germano Cavalcante
considering the depth variation Taking advantage of the area, the depth is decreased 0.01 BU to each loop to give priority to elements in order: Vertice > Edge > Face. This increases the threshold and improves the snap to multiple elements
2017-01-31Snap System: Return depth by snapping to edges and vertices, because the ↵Germano Cavalcante
Ruler only works right this way The Ruler snaps to the element with the lowest depth.
2017-01-31Use the same solution to test the pixel distance to the AABB, with BoundBoxGermano Cavalcante
The previous solution took arbitrary values to determine if the mouse was near or not to the Bound Box (it simply scaled the Bound Box). Now the same function that detected the distance from the BVHTree nodes to the mouse is used in the Bound Box
2017-01-30Cleanup: Unused function and and variables in snap codeSergey Sharybin
Please doublecheck ED_transform_snap_object_project_ray_ex() is really valid, it's weird to have extra arguments here unused.
2017-01-30Snap System: BVH: ignore AABBs behind rayGermano Cavalcante
This provides a slight improvement in performance in specific cases, such as when the observer is inside a high poly object and executes snap to edge or vertex
2017-01-30Fix unreported bug: parameter ray_start repeatedGermano Cavalcante
The bug would only be seen in terms of performance
2017-01-30Solve compilation error: Field has incomplete type 'enum eViewProj'Germano Cavalcante
Error reported by @tomjpsun Patch D2491