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
2015-06-26Cleanup: transform centerCampbell Barton
store global center in transform struct, some code was calculating all the time, this is useful to keep available.
2015-06-26Cleanup: transform aspectCampbell Barton
Transform code had duplicate aspect checking, now store aspect in TransInfo.aspect for reuse.
2015-05-17Cleanup: indentationCampbell Barton
2015-04-27Cleanup: use mul_v3_mat3_m4v3Campbell Barton
2015-03-19Cleanup remove unused variableAntony Riakiotakis
2015-03-19Fix T43989: Sequencer - Ctrl snapping a sequencer strip does not work if you ↵Bastien Montagne
specify the x axis. New 'strip' snapping was simply not computed in case of constrained transform, hence init '0' value was used as frame offset in this case. This commit reorganizes a bit that snapping, to keep it more 'confined' into `snapSequenceBounds()` dedicated function. It still needs a minor hack (setting snapping mode to something else than defualt `SCE_SNAP_MODE_INCREMENT`, to avoid this snapping to be called by contraint code). Thanks to Antony for review and enhancements. This fix should be backported to 2.74.
2014-11-24Politically correct terrible consequencer changesAntony Riakiotakis
This patch includes the work done in the terrible consequencer branch that hasn't been merged to master minus a few controversial and WIP stuff, like strip parenting, new sequence data structs and cuddly widgets. What is included: * Strip extensions only when slipping. It can very easily be made an option but with a few strips with overlapping durations it makes view too crowded and difficult to make out. * Threaded waveform loading + code that restores waveforms on undo (not used though, since sound_load recreates everything. There's a patch for review D876) * Toggle to enable backdrop in the strip sequence editor * Toggle to easily turn on/off waveform display * Snapping during transform on sequence boundaries. Snapping to start or end of selection depends on position of mouse when invoking the operator * Snapping of timeline indicator in sequencer to strip boundaries. To use just press and hold ctrl while dragging. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D904
2014-11-20Fix T42660 snapping not working nicely on graph editor.Antony Riakiotakis
Basically, get the grid increments and reuse them when snapping. System is slightly crappy here, we should calculate those factors only once, but leaving as todo for later.
2014-11-16Cleanup: use BLI_listbase_*** prefix for count,sort,sort_rCampbell Barton
2014-11-13Fix T42571,T42572 snapping ignores linked objectsAntony Riakiotakis
Make sure to use edit object if objects share the same data.
2014-10-30Transform: snapping: normal-align: Cleanup!Bastien Montagne
Use BLI's `rotation_between_vecs_to_mat3` helper instead of own custom code, both simplifies the code and fixes wrong handling when snapped normal was exactly opposed to org one (i.e. 180° rot case).
2014-10-30Math Lib: add transpose_m3_m3, m3_m4, m4_m4Campbell Barton
2014-10-10Cleanup: (float)floor -> floorfCampbell Barton
2014-09-24Cleanup: const correctness for BLI_sortlistCampbell Barton
2014-09-24Cleanup: use float versions of functions when in/output are floatsCampbell Barton
2014-08-08Fix crash on edit mode with multi-align projectAntony Riakiotakis
2014-07-31Fix T40958 align rotation + project individual elements not workingAntony Riakiotakis
This is another example of transform code crappiness. Projection snapping for objects is handled separately than regular snapping. Luckilly for us, we have the normal ready from the raycast result and a copy of code from ElementRotation function can do the necessary rotations for us. I have not enforced constraints here (arguably, maybe I should, and the already present projection snapping should do that too but seems it is commented out and the unorthodox order of operations here has me a bit scared. Leaving as TODO)
2014-07-28As suggested by Campbell, rather use BVHTree to get len_diff in this ↵Bastien Montagne
morning's fix. Note than it's using nearest faces, since it showed to be much more performant than nearest vertex (quite odd, it's about 40% slower for the first element, then 50 times quicker for all others, as if BVH was cached, and building face was slower than verts one, but then using it, much quicker!).
2014-07-28Fix T41191: Face snapping doesn't work properly.Bastien Montagne
Issue was caused by rB47ec0394ca3d, which disabled BBox check in editmode - but bbox check was also setting `len_diff`, which is mandatory when doing ray_start_local correction for ortho view... Now, in this case, we do a quick rough compute of len_diff from vertices coordinates (accuracy is not needed here, we just have to be sure corrected `ray_start_local` remains 'before' (outside) of the geometry).
2014-07-28Fix T41201: Blender Crashes when UV EditingSergey Sharybin
Disable adding snapping point outside of 3D space for now, visualization of the points is not implemented outside of this space and silently adding them wouldn't really be a good idea.
2014-07-21GSOC 2013 paintAntony Riakiotakis
Yep, at last it's here! There are a few minor issues remaining but development can go on in master after discussion at blender institute. For full list of features see: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting Thanks to Sergey and Campbell for the extensive review and to the countless artists that have given their input and reported issues during development.
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-06-18Fix T40679.Antony Riakiotakis
Cleanest way here is not do bounding box collision for editmeshes at all. Decision is taken because: * Usually we want to do the snapping to the edited mesh anyway (when we don't the mesh is skipped completely, so we don't need to worry for extra checks) * Bounding box is calculated from derived mesh. This means that for subsurfed meshes for instance, the bounding box may be significantly smaller than the size of the edit mesh.
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-14Fix T40610. This is a critical bug caused by own bugfix that does notAntony Riakiotakis
allow editing any object type without bounding boxes. This should be included in the final release!
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-05-09Fix T36973: Active snapping fails for edges/facesCampbell Barton
also add snap-active support for armatures, pose & metas
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-26Code cleanup: use 'const' for arrays (editors)Campbell Barton
2014-04-21View2d: API Cleanup for view<->region conversionCampbell Barton
View2D had some inconsistencies making it error prone in some cases. - Inconstant checking for NULL x/y args. Disallow NULL args for x/y destination pointers, instead add: - UI_view2d_region_to_view_x/y - UI_view2d_view_to_region_x/y - '_no_clip' suffix wasn't always used for non-clipping conversion, switch it around and use a '_clip' suffix for all funcs that clip. - UI_view2d_text_cache_add now clips before adding cache. - '_clip' funcs return a bool to quickly check if its in the view. - add conversion for rectangles, since this is a common task: - UI_view2d_view_to_region_rcti - UI_view2d_region_to_view_rctf
2014-04-16Code cleanup: use bools & const argsCampbell Barton
2014-03-29Code cleanup: replace dot with len_squared and is_zero checksCampbell Barton
2014-02-13Code cleanup: styleCampbell Barton
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell Barton
2014-02-02Fix T38435: Crash when pressing MMB in walk modeBastien Montagne
Snap code may be called with a NULL region, add check about this and assume ray_start is OK in this case!
2014-02-02Code cleanup: suffix vars to make obvious they are squaredCampbell Barton
2014-01-30More snapping fixes (this is ridiculous).Bastien Montagne
I hope this time we are done!
2014-01-30Fix T38409: Snapping BugBastien Montagne
Issue partially caused by own errors (glicth in new BKE_boundbox_ray_hit_check() code causing segfault in volume snapping, and we have to treat ortho and persp differently in case of face snapping, because in persp our ray_start might very well already be *inside* the boundbox of the checked object), and partly due to the fact that ED_view3d_win_to_vector() was returning wrong vector (negated one) for ortho views (see previous commit).
2014-01-30Fix T38358: typo in own rB77089a3bf203.Bastien Montagne
Also allowed me to fine another potential issue, hit.dist was no more initialized correctly - and I had forgotten to take into account Brecht's remark about normalize_v3() also returning the vector's previous length.
2014-01-29Fix T38358: Face snapping fails on Orthographic viewBastien Montagne
Issue is caused by start point of ray used to detect faces under the mouse is set rather far away in ortho 3dviews. The loss of precision on the ray location induced by this can lead to face snapping failures. Solution is to do the raycasting with a temp start point, much closer to the object we check, and add back to the found distance the diff to the real start point once detection is done (as we need all hit distances from all tested objects to be relative to a common point!). Note this commit only addresses the "face snapping on mesh" case, other kind of snapping do not seem to suffer from this issue. Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D268
2014-01-26Fix T38354: Excess memory allocation when projecting onto object with multiresBastien Montagne
Found three cases where created bvhtree was not freed...
2014-01-21Fix T38128: snapping to node border uses node centers.Lukas Tönne
This was caused by recent change to transform locations being changed to the upper-left corner of nodes (rBa857a6f).
2013-12-26Threaded object update and EvaluationContextSergey Sharybin
Summary: Made objects update happening from multiple threads. It is a task-based scheduling system which uses current dependency graph for spawning new tasks. This means threading happens on object level, but the system is flexible enough for higher granularity. Technical details: - Uses task scheduler which was recently committed to trunk (that one which Brecht ported from Cycles). - Added two utility functions to dependency graph: * DAG_threaded_update_begin, which is called to initialize threaded objects update. It will also schedule root DAG node to the queue, hence starting evaluation process. Initialization will calculate how much parents are to be evaluation before current DAG node can be scheduled. This value is used by task threads for faster detecting which nodes might be scheduled. * DAG_threaded_update_handle_node_updated which is called from task thread function when node was fully handled. This function decreases num_pending_parents of node children and schedules children with zero valency. As it might have become clear, task thread receives DAG nodes and decides which callback to call for it. Currently only BKE_object_handle_update is called for object nodes. In the future it'll call node->callback() from Ali's new DAG. - This required adding some workarounds to the render pipeline. Mainly to stop using get_object_dm() from modifiers' apply callback. Such a call was only a workaround for dependency graph glitch when rendering scene with, say, boolean modifiers before displaying this scene. Such change moves workaround from one place to another, so overall hackentropy remains the same. - Added paradigm of EvaluaitonContext. Currently it's more like just a more reliable replacement for G.is_rendering which fails in some circumstances. Future idea of this context is to also store all the local data needed for objects evaluation such as local time, Copy-on-Write data and so. There're two types of EvaluationContext: * Context used for viewport updated and owned by Main. In the future this context might be easily moved to Window or Screen to allo per-window/per-screen local time. * Context used by render engines to evaluate objects for render purposes. Render engine is an owner of this context. This context is passed to all object update routines. Reviewers: brecht, campbellbarton Reviewed By: brecht CC: lukastoenne Differential Revision: https://developer.blender.org/D94
2013-12-18Revert svn r55587, fix for T34698 (Disable snap when transform axis is ↵Campbell Barton
constrained) Currently we don't properly support snapping + axis-constraints, but there are cases where its handy to project-snap for eg, and constraint to an axis so re-enable this.
2013-12-01Code Cleanup: replace ABS() with fabsf() when used with float expressions.Campbell Barton
2013-11-20Fix T37550: Crash while snaping to curve made from Susane (bug in recent ↵Campbell Barton
addition)
2013-11-17Style Cleanup: whitespaceCampbell Barton
2013-11-16Transform: vertex snapping for curvesHenrik Aarnio
This adds vertex snapping capabilities for curves. Snaps to all control points of other objects, and visible + selected control points and handles in curve edit mode. Reviewed By: brecht Differential Revision: http://developer.blender.org/D3
2013-11-06True grid snapping for nodes: This snaps nodes to the actual background grid ↵Lukas Toenne
instead of using incremental offset (which is not useful for nodes). Increment snapping has been disabled for nodes to avoid confusion, grid snap is now the default as it seems to be the most wanted and easy to use mode. Absolute grid snapping happens in a somewhat generic function 'applyGridAbsolute', which could also be used for objects and other transforms later on. It is conceptually similar to the 'project' snapping option, in that it calculates a delta vector for each element on top of the overall transform, which places each node on the grid. Node transform now uses the top-left node corner for TransformData->loc. The transform center is still the average of node centers, so that scaling and rotation works nicely. snapGrid*** functions have been renamed to snapGridIncrement*** to distinguish better between incremental and absolute grid snapping.
2013-11-06Fix #37251: Snap not working correctly in metaball edit mode.Sergey Sharybin
It wasn't enabled in snapping code from the beginning it seems, but from quick tests snapping for mballs works just fine. Maybe we could drop out check for edit object type now?