Commit Graph

49420 Commits

Author SHA1 Message Date
Brecht Van Lommel
a53e864cf4 Fix T37572: text editor scrolling not working well with Mac trackpad panning.
The trackpad would give isolated mouse pan events with a distance smaller than
one line or character. For other 2D views this is all accumulated in floats,
but in the text editor it only keeps track of integers, and the small mouse pan
events got lost due to rounding.

Now it keeps track of sub-line or sub-character scroll offsets to avoid this.
2013-12-13 00:04:05 +01:00
Campbell Barton
51b9d85b09 UI: remove text margin when a slider is aligned to another button
Paint sliders had too much space on right (aligned with pressure icons)
2013-12-13 05:29:54 +11:00
Antony Riakiotakis
e45a9a3aaa Radial control operator support for pixel properties 2013-12-12 20:07:40 +02:00
Scott Petrovic
c701082a92 RNA: Add pixels property type 2013-12-13 04:40:30 +11:00
Antony Riakiotakis
b0a3f32ed3 improvements and simplification to gravity code:
* world to object matrix is calculated for view vector as well, reuse
that.
* if no orientation exists use world negative axis instead of object
negative axis for gravity.

there's also the issue of mirroring, it may be wise to invert the
gravity effect there but it may be better to have artist feedback on
that.
2013-12-12 19:35:33 +02:00
Antony Riakiotakis
c740f1a792 Sculpt mode Gravity feature from GSOC 2010 by Jason Wilkins.
Reviewers: sergey, brecht, campbellbarton, jwilkins

Differential Revision: http://developer.blender.org/D89
2013-12-12 19:01:11 +02:00
Campbell Barton
9ad88fbe6d Fix for error exposed by right-align number buttons
When the entire label was clipped, the right aligned number component
could be clipped on its left hand side too.
So "Foo: 1.00" could be clipped to ".00"
2013-12-13 02:47:00 +11:00
Campbell Barton
2195dd32cc Fix T37595: Switching modal transform broke with trackball rotation.
Id properties may have different sized "values" array depending on the
transform operator
2013-12-13 00:35:12 +11:00
Campbell Barton
8a7f2b24c1 Code Cleanup: use const's and bools for idprops 2013-12-13 00:35:11 +11:00
Campbell Barton
afffa9bc39 RNA: Add assert to ensure the idprop is correct size on array get/set 2013-12-12 21:01:20 +11:00
Sergey Sharybin
a0a09d1423 Fix T37757: MCE - Mask Pivot Point individual origins doesnt work
Simple wasn't implemented.
2013-12-12 14:37:01 +06:00
Campbell Barton
7658f7acff Fix for off by one error noted by Anthony Edlin 2013-12-12 19:02:51 +11:00
Sergey Sharybin
460a96dc5a Use factor subtype for plane track opacity 2013-12-12 13:51:04 +06:00
Sergey Sharybin
61616b0b88 Code cleanup: indent preprocessor directives inside #ifdef 2013-12-12 13:10:03 +06:00
Campbell Barton
ab127c12d4 Mesh API: Add BKE_mesh_origindex_map_create
This API function lets original data loop over its derived data,
Use for vertex paint, replacing custom function.
2013-12-12 17:37:16 +11:00
Campbell Barton
e23f77b935 Code Cleanup: move mesh mapping functions into their own file/header 2013-12-12 16:28:52 +11:00
Brecht Van Lommel
653d645587 Fix T37769: inconsistent behavior of Remove Selected From Active Group.
Add Selected to Active Group presented a menu with groups to choose from, while
this seemingly inverse operation did not and used all groups of the active
object.

Now both operators present a menu, with as first option "All Groups".
2013-12-12 06:13:35 +01:00
Campbell Barton
ec4ed2e3df Code Cleanup: replace global debug checks in raycast with DEBUG ifdef 2013-12-12 15:30:50 +11:00
Bastien Montagne
41e70cfb39 Add meaningful default for SimpleDeform modifier's angle prop. 2013-12-11 22:12:10 +01:00
Brecht Van Lommel
9c6fc9f15e Fix T37777: layout.column_flow() not working correct with retina / DPI. 2013-12-11 17:06:49 +01:00
Campbell Barton
09b859d03f UI: change how number button strings are concatenated (to easy add new suffix) 2013-12-12 00:33:41 +11:00
Benoit Bolsee
c35fb528c5 Fix intersect_line_plane bug causing crash on Motion trail and other
similar potential bugs in mathutils_geometry

marking no_flip as TODO
2013-12-11 10:28:30 -02:00
Sergey Sharybin
3a370ec6ec Move curve's boundbox and texspace calculation out of modifier stack
There were several issues with how bounding box and texture space
are calculated:

- This was done at the same time as applying modifiers, meaning if
  several objects are sharing the same curve datablock, bounding
  box and texture space will be calculated multiple times.

  Further, allocating bounding box wasn't safe for threading.

- Bounding box and texture space were evaluated after pre-tessellation
  modifiers are applied. This means Curve-level data is actually
  depends on object data, and it's really bad because different
  objects could have different modifiers and this leads to
  conflicts (curve's data depends on object evaluation order)
  and doesn't behave in a predictable way.

  This commit moves bounding box and texture space evaluation from
  modifier stack to own utility functions, just like it's was done
  for meshes.

  This makes curve objects update thread-safe, but gives some
  limitations as well. Namely, with such approach it's not so
  clear how to preserve the same behavior of texture space:
  before this change texture space and bounding box would match
  beveled curve as accurate as possible.

  Old behavior was nice for quick texturing -- in most cases you
  didn't need to modify texture space at all. But texture space
  was depending on render/preview settings which could easily lead
  to situations, when final result would be far different from
  preview one.

  Now we're using CV points coordinates and their radius to approximate
  the bounding box. This doesn't give the same exact texture space,
  but it helps a lot keeping texture space in a nice predictable way.

  We could make approximation smarter in the future, but fir now
  added operator to match texture space to fully tessellated curve
  called "Match Texture Space".

Review link:

  https://codereview.appspot.com/15410043/

Brief description:

  http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2013/Results#Curve_Texture_Space
2013-12-11 16:32:41 +06:00
Campbell Barton
dde5e5ce25 User Interface: Align number buttons labels to the left, number right 2013-12-11 21:27:13 +11:00
Campbell Barton
7d2652ad7c User Interface: add colon separator for number buttons 2013-12-11 21:06:00 +11:00
Campbell Barton
8e94d3685a Interface: avoid setting \0 to drawstr in widget_draw_text 2013-12-11 20:35:28 +11:00
Lukas Tönne
c0b717b046 Sanity check in node links API: Make sure a valid node exists for both
sockets passed to the nodetree.links.new function, otherwise this could
lead to invalid connections between different node trees! The
ntreeAddLink function has asserts for this, but this condition needs to
be checked in the RNA method calling it.
2013-12-11 09:22:13 +01:00
Joshua Leung
fcdc04af4f Fix T37755: Autokey doesn't work for local Z-Axis in Camera view with MotionPaths enabled
The problem here was that the hack used to fix T24551 in r32863
would cause the camera to jump back to its pre-transform position
after motionpaths were recalculated. This made it seem like a keyframe
wasn't inserted by AutoKeying (even though it was).
2013-12-11 16:19:42 +13:00
Joshua Leung
71d5fe29da Fix incorrect comment - copy and paste error 2013-12-11 16:19:42 +13:00
Campbell Barton
5afc2a9a44 Code cleanup: assign win size to const vars and some renaming 2013-12-11 13:07:00 +11:00
Brecht Van Lommel
522f17daa1 Fix T37713: proxy not updated for first frame in background render.
The problem is that the animation curves are first before object updates,
where BKE_pose_rebuild and proxy synchronize will undo the animation when the
proxy is evaluted for the first time after loading.

This is somewhat of a workaround but it's also useful to have the scene updated
once when opening in background mode, and it makes rendering from the UI and
background more similar and so more predictable to give the same result.
2013-12-10 19:54:42 +01:00
Geoffroy Krantz
ebdaf4f192 Nodes UI: add the position field to the color ramp node.
Reviewed By: dingto, brecht

Differential Revision: http://developer.blender.org/D91
2013-12-10 17:13:59 +01:00
Bastien Montagne
03059f31d8 uiList: Small tweak to drag-resize (switch to auto-size mode).
When you drag past the smallest size of the list, it switches back to auto-size mode.
This commit makes wider the gap between smallest size and auto-size activation,
previously it could switch to auto-size a bit too easily...
2013-12-10 16:23:16 +01:00
Bastien Montagne
a1031d5dd5 Fix T37739: uiList drag-resize was not working as expected outside of panels.
Patch by Brecht, with minor edits by myself, thanks a lot!

Tech details: previous drag-resize handling code was based on the assumption that coords
returned by ui_window_to_block() was relative to the bottom on the uiBlock.
This is in fact completly eroneous, usually this func does not translate at all the coords,
it merely rescale them - except for blocks inside panels, where returned values are relative
to the left/bottom corner of the panel... Pretty confusing, solution for now is to store ref mouse
position in window space, and convert them to block each time, just like current mouse pos.
2013-12-10 16:23:16 +01:00
Dalai Felinto
4b127dfc5a fix: Fly Navigation centered in viewport, not in camera view
Summary:
The safe zone, mouse and everything else was relative to the viewport.
It should be relative to the camera 'view' instead.

This problem (noticed while developing the Walk Navigation)
happens when the camera is not centered in the viewport.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: http://developer.blender.org/D78
2013-12-10 12:14:31 -02:00
Campbell Barton
91d8519c47 Fix T37463: Increasing window size would add space around menu header 2013-12-10 23:54:33 +11:00
Campbell Barton
d07fea2439 Screen Resize: minor code cleanup 2013-12-10 23:52:19 +11:00
Campbell Barton
e140024f2e Fix for off-by-one regression in D41
making the window larger was using incorrect factor leaving a black bar
on the window edge.
2013-12-10 22:19:17 +11:00
Campbell Barton
737e51cb21 Mempool/Memarena: hint for unlikely conditions 2013-12-10 21:28:52 +11:00
Campbell Barton
02e378bf19 Fix for fix: Paths and copying object
Fix for T37471 made path copying modify local paths,
now apply the same logic used for save-as.
2013-12-10 17:28:25 +11:00
Campbell Barton
8dc80e9d73 Style Cleanup 2013-12-10 13:45:17 +11:00
Antony Riakiotakis
07d0926796 Style changes to refactor commit. 2013-12-10 04:28:16 +02:00
Campbell Barton
cc9372b7e0 DNA Deprecation: add DNA_DEPRECATED_GCC_POISON for enum/structs.
also fully remove freestyle raycasting_algorithm
2013-12-10 13:01:55 +11:00
Campbell Barton
96f95e0223 Python API: when OIIO is disabled use the same version format. 2013-12-10 12:58:10 +11:00
gaiaclary
fe81ac0e4e Fix T37753: encapsulated the creation of the source ID into one function to ensure the id is always created correctly 2013-12-09 23:18:01 +01:00
Jeroen Bakker
8983f50a9a Node Previews:
Removed USE_HIDDEN_PREVIEW from source code as it is now deprecated.
The feature was introduced during project mango to quickly hide previews, now that the previews are hidden by default this feature has no need.
Inside the DNA the flag is still visible in comment, this way no one will reuse that value as it could have some side effects

Jeroen & Monique
 - At Mind -
2013-12-09 22:04:00 +01:00
Antony Riakiotakis
f0675b14d8 Refactoring/cleanup, borrowed from soc-2013-paint branch.
* Move symmetry options to the paint struct (where all paint systems can
make use of it)

* Rename draw_pressure to stroke_active. This is what is really checked
on those occasions that this is used. Also move turning on/off of this
option to the stroke level and avoid doing it on every stroke system.

* Rename BRUSH_RESTORE_MESH to BRUSH_DRAG_DOT. In image painting this
won't restore any mesh, so better have a name that is directly linked to
what the flag actually does.
2013-12-09 22:40:02 +02:00
Jeroen Bakker
4332cd16fb Compositor node preview:
moved the hide preview logic to a method on bNodeTreeType. This way the node.c keeps clean, but logic could still be shared.
Implementing this per node, can lead to future errors.
2013-12-09 20:22:16 +01:00
Jeroen Bakker
6c83d92d58 Enhancement: By default do not show the previews of composite nodes
only input nodes will show the preview by default.
2013-12-09 20:22:16 +01:00
Jeroen Bakker
f120adf65c Enhancement: added node colors for every node class
In the user preferences all node classes can get its own color
The in/out color is splitted into 2 sepatate colors
the rna has been updated to better names
2013-12-09 20:22:15 +01:00