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
2017-03-083D View: new nethod of opengl selectionCampbell Barton
Intended to replace legacy GL_SELECT, without the limitations of sample queries which can't access depth information. This commit adds VIEW3D_SELECT_PICK_NEAREST and VIEW3D_SELECT_PICK_ALL which access the depth buffers to detect whats under the pointer, so initial selection is always the closest item. The performance of this method depends a lot on the OpenGL implementations glReadPixels. Since reading depth can be slow, buffers are cached for object picking so selecting re-uses depth data, performing 1 draw instead of 3 (for 24, 18, 10 px regions, picking with many items under the pointer). Occlusion queries draw twice when picking nearest, so worst case 6x draw calls per selection. Even with these improvements occlusion queries is faster on AMD hardware. Depth selection is disabled by default, toggle option under select method. May enable by default if this works well on different hardware. Reviewed as D2543
2017-03-08Rename BLI_rct*_init_pt_size -> radiusCampbell Barton
2017-03-05BLI_rect: add init from point functionsCampbell Barton
Initialize a rectangle from point+size.
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
2016-06-03Cleanup & simplify snapping functionsGermano Cavalcante
- the name of the enumerator `SNAP_NOT_OBEDIT` was changed to `SNAP_NOT_ACTIVE`. - the parameter `snap_to_flag` was moved to outside `SnapObjectParams`. - the member `use_object_edit` was renamed to `use_object_edit_cage`. - added the arg `params` in `ED_transform_snap_object_project_ray`. - simplifications in the loop of the function `snapObjectsRay`.
2016-05-11Cleanup: only use r_ prefix for return argsCampbell Barton
2016-05-11Transform Volume rewrite/refactorGermano Cavalcante
Take advantage of the efficiency provided by the snap_context. Also fixes errors: - volume snap fails based on view angle (T48394). - multiple instances of dupli-objects break volume calculation.
2016-05-10Correct armature-sketch snap context useCampbell Barton
Use scene snap mode. Also allow passing NULL ray-depth which falls back to BVH_RAYCAST_DIST_MAX.
2016-05-05Transform/Snap: EditMesh/BKE_bvhutils API improvementsGermano Cavalcante
Separate the creation of trees from EditMesh from the creation of trees from DerivedMesh. This was meant to simplify the API, but didn't work out so well. `bvhtree_from_mesh_*` actually is working as `bvhtree_from_derivedmesh_*`. This is inconsistent with the trees created from EditMesh. Since for create them does not use the DerivedMesh. In such cases the dm is being used only to cache the tree in the struct DerivedMesh. What is immediately released once bvhtree is being used in functions that change(tag) the DM cleaning the cache. - Use a filter function so users of SnapObjectContext can define how edit-mesh elements are handled. - Remove em_evil. - bvhtree of EditMesh is now really cached in the snap functions. - Code becomes organized and easier to maintain. This is an important patch for future improvements in snapping functions.
2016-04-22Transform Snap: initial snap context refactorCampbell Barton
This introduces a snap-context that can be re-used for casting rays into the scene (by operators such as walk-mode, ruler and transform code). This can be used to cache data between calls too.
2015-12-02Cleanup: transform snap argumentsCampbell Barton
This was getting very hard to follow, - mixing input/output args. - mixing arg order between functions. - arg names (mode, snap_mode) rename to (snap_to, snap_select)
2015-11-23Cleanup: shadowing (editors)Campbell Barton
2015-09-20Cleanup: Use new vector transform functionsJulian Eisel
2015-02-17etch-a-ton: fix crash selecting strokesCampbell Barton
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2014-11-28Cleanup: unused headersCampbell Barton
2014-11-16Cleanup: use BLI_listbase_*** prefix for count,sort,sort_rCampbell Barton
2014-10-30Math Lib: add transpose_m3_m3, m3_m4, m4_m4Campbell Barton
2014-10-29Cleanup: warnings, typosCampbell Barton
2014-09-24Cleanup: const correctness for BLI_sortlistCampbell Barton
2014-07-23Occlusion Query based selection.Antony Riakiotakis
This patch creates an interface for selection mechanisms in opengl. This makes it possible to switch between occlusion query based or select rendermode based selection transparently. This is really useful on graphics drivers that do not accelerate the select rendermode path (some ATI cards are notorious for this, and the new path is used by default there), since occlusion queries are always hardware accelerated due to their use in games. The option can be found under system - selection. Auto just enables occlusion queries for ATI users while the rest of the options enforce one of the two methods always. There is just one known change, previous code enforced nearest bone to always get selected, even when mouse selecting near the same position, I couldn't replicate the behaviour though. patch by me with edits and review by Campbell. Thanks!
2014-06-18Revert "Fix flickering when transform snapping in edit mode and cursor is"Antony Riakiotakis
Looks like the cleanest way to handle this is to no do bounding box collision for edit mode at all. But this is easy to enforce This reverts commit 7b5fe4f316234022a0ab761b694cd459ce98db2d. Conflicts: source/blender/editors/transform/transform_snap.c
2014-06-12Fix flickering when transform snapping in edit mode and cursor isAntony Riakiotakis
slightly outside the mesh. Reported by Thomas Beck on irc. Issue here is that the mesh bounding box changes as we are transforming the vertices. Solution is to collide against the initial bounding box. Unfortunately the snapping functions are made in a way that a lot of code needed to be tweaked here, but the change should be straightforward and harmless (famous last words, I know). Ideally we might want to even increase the size of the bounding box a little (as seen in screen space) to allow snapping even in cases where, cursor is slightly outside the bounding box, but since this is not so straightforward to do for all cases, at least for me, leaving this as a TODO.
2014-04-07Code cleanup: project gpencil in float coords & delete outdated commentsCampbell Barton
2014-02-15Code cleanup: remove more string encoded menu functionsCampbell Barton
2014-02-11Fix T38547: crash in skeleton sketching.Brecht Van Lommel
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2013-10-31remove return argument from wmOperatorType->cancel, was only ever returning ↵Campbell Barton
OPERATOR_CANCELLED.
2013-05-08rename BLI_ghashIterator_notDone() -> BLI_ghashIterator_done()Campbell Barton
was renamed fairly recently but other similar iterators not negated like this, would prefer to keep it as it was
2013-04-23fix [#35007] clipping border errorCampbell Barton
add clip option to ED_view3d_win_to_ray(), ED_view3d_win_to_segment()
2013-04-03use floats for transform snapping distance comparisonsCampbell Barton
2013-03-14use BLI_strncpy_rlen() rather then BLI_snprintf() when no formatting is needed.Campbell Barton
also replace sprintf with strcpy when no formatting is done.
2013-03-13code cleanup: use const events for modal and invoke operators.Campbell Barton
2013-03-09code cleanup: move runtime var zfac out of RegionView3D. rename initgrabz() ↵Campbell Barton
-> ED_view3d_calc_zfac() and have it return the zfac to use.
2013-03-07use bool for rna funcs.Campbell Barton
2013-03-07Change !BLI_ghashIterator_isDone to BLI_ghashIterator_notDone. It isAntony Riakiotakis
always used in that context so we can at least avoid reverting it twice :p.
2013-02-28code cleanup: includesCampbell Barton
2012-12-11define the size of matrix args for both rows/cols.Campbell Barton
2012-11-09style cleanup: indentationCampbell Barton
2012-10-27use min/max inline functions where MIN2/MAX2 were doing type conversion.Campbell Barton
2012-10-07style cleanup: line length,Campbell Barton
rename V3D_PROJ_RET_SUCCESS -> V3D_PROJ_RET_OK
2012-10-05replace ED_view3d_project_float with ED_view3d_project_float_globalCampbell Barton
2012-10-04refactor ED_view3d_project_short & ED_view3d_project_short_noclip,Campbell Barton
This is apart of a code cleanup to make ED_view3d_project_short/ED_view3d_project_int/ED_view3d_project_float interchangeable. Currently they work very differently in a way thats quite confusing (and cause of bugs in blender that remain uncorrected) - fixes coming. There are also cases where ED_view3d_project_short is used, then the values are converted from shorts into int's after because ED_view3d_project_int() behaves differently, will unify behavior of these functions after this commit. - rather then clip/noclip versions, pass flags (for bound-box clip, window clip). - rather then store the invalid clip-value, return success (or error value clip_near, clip_bb, clip_win, overflow). - remove local copies of project functions from drawobject.c: view3d_project_short_clip, view3d_project_short_noclip, view3d_project_short_clip_persmat. add functions: - ED_view3d_project_short_global() global space projection - ED_view3d_project_short_object() object space projection. - ED_view3d_project_short_ex() take perspective matrix and local space option as args. - ED_view3d_project_base() - special function to set the Object 'Base' screen coords (sx, sy), since this is a common enough operation.
2012-10-04Kind of cleanup of "menu strings": always have a space between the entry's ↵Bastien Montagne
label and value (these strings are a nightmare to handle in RTL languages like arabic or persian, but a bit less of a nightmare this way ;) ).
2012-09-20code cleanup:Campbell Barton
- make view3d project names more consistent. - remove apply_project_float() its not needed. - update comments referencing an old function name. - move doxygen docs into the C file, prefer they are kept here to avoid getting out of sync with code.
2012-07-19code cleanup: remove commented includes - mostly from 2.4xCampbell Barton
2012-05-16Code cleanup: simplify standard GHash creation.Nicholas Bishop
Added four new functions as shortcuts to creating GHashes that use the standard ptr/str/int/pair hash and compare functions. GHash *BLI_ghash_ptr_new(const char *info); GHash *BLI_ghash_str_new(const char *info); GHash *BLI_ghash_int_new(const char *info); GHash *BLI_ghash_pair_new(const char *info); Replaced almost all occurrences of BLI_ghash_new() with one of the above functions.
2012-05-09style cleanup: graph & armatureCampbell Barton
2012-05-06Last part of fix for [#31157]: Some (actually, 172) operators have no tooltip.Bastien Montagne
Only remaining undocumented one is IMAGE_OT_record_composite (not sure what it actually does, nor even whether it’s actually working or not...). Note that I didn’t bother with operators flagged as OPTYPE_INTERNAL!