Commit Graph

51421 Commits

Author SHA1 Message Date
Bastien Montagne 87cc890aef Support units in modal numinput
Summary:
This completly changes the way modal numinput is handled. Now, edited expression is a string, which then gets unit- and py-evaluated to get a float value.

We gain many power and flexibility, but lose a few "shortcuts" like '-' to negate, or '/' to inverse (if they are really needed, we still can add them with modifiers, like e.g. ctrl-/ or so).

Features:
- units (cm, ", deg, etc.).
- basic operations from python/BKE_unit (+, *, **, etc.), and math constants and functions (pi, sin, etc.).
- you can navigate in edited value (left/right key, ctrl to move by block) and insert/delete chars, e.g. to fix a typo without having to rewrite everything.
- you can go to next/previous value with (ctrl-)TAB key.
- As before, hitting backspace after having deleted all leading chars will first reset the edited value to init state, and on second press, the whole "modal numinput" editing will be cancelled, going back to usual transform with mouse.

Notes:
- Did not touch to how values are shown in header when modal numinput is not enabled (would do that in another commit), so this is still quite inconsistent.
- Added back radian support in BKE_unit.
- Added arcminute/arcsecond to BKE_unit.
(those unit changes affect all angle UI controls, btw, so you can now enter radians or longitude/latitude values when in degrees units).

Related to T37600.

Reviewers: brecht, campbellbarton, carter2422

Reviewed By: brecht, campbellbarton, carter2422
Thanks everybody!

Differential Revision: http://developer.blender.org/D61
2013-12-21 17:44:48 +01:00
Sergey Sharybin f72b86da8c Fix T37906: Adding force field settings to boids gives hard crash
Was a regression since fix for another bug T37189.
2013-12-21 20:35:47 +06:00
Sergey Sharybin b9d732e047 Fix T37907: Crash when change screen layout to "Motion Tracking"
Was a bug in recent change from my own.

Also fixed cache line being displayed twice.
2013-12-21 20:26:23 +06:00
Thomas Dinges 9bd3a226ae Cleanup: Code and style cleanup for Cycles curve export code. 2013-12-21 00:20:16 +01:00
Bastien Montagne 14c9899a69 Fix T37903: Operator log serialization broken for sets.
Was a mistake in rB9d6f05ed style edits (TRUE became false ;) ).
2013-12-20 23:35:28 +01:00
Brecht Van Lommel 163e544006 Fix bookmarks not appearing in file browser after "copy previous settings". 2013-12-20 17:57:11 +01:00
Sergey Sharybin aec90a8faf Fix wrong display of movie clip cache with mask overlay enabled 2013-12-20 22:17:43 +06:00
Antony Riakiotakis 26aeb81d00 Slightly improve undo performance in dyntopo when last operator was mask
modification. In that case no pbvh needs to be freed and recreated and
we can get away just with draw buffer update (all of them for now. When
pbvh nodes get logged for undo we will be able to only update the
affected ones).
2013-12-20 13:42:03 +02:00
Martijn Berger 59fd22e1d8 MSVC 2013 cmake changes
Summary:
I think we should try to use find_package more over just setting the variables it would set.
I added find_package with old behavior as a feedback for boost and openexr

@dingto can you test it in msvc2008 setup ?

Reviewers: dingto

Reviewed By: dingto

CC: dingto, brecht

Differential Revision: http://developer.blender.org/D104
2013-12-20 14:32:51 +01:00
Joshua Leung 48b9680578 Fix T37883: Dope Sheet - Selecting object channels in AnimEditors doesn't make them active
There was probably a reason in the past why this wasn't desirable, but since we allow
bones to be properly selected when clicking on corresponding channels here, we may as
well allow this case too.
2013-12-20 23:55:44 +13:00
Campbell Barton f55eba5462 Code Cleanup: style 2013-12-20 21:52:08 +11:00
Sergey Sharybin 39daf283ae Don't use with_resol suffix for functions which doesn't get resolution 2013-12-20 16:00:05 +06:00
Sergey Sharybin b54ac21622 Code cleanup: remove unused functions from mask module
This functions doesn't seem to be used even from a commented code.
2013-12-20 15:47:19 +06:00
Sergey Sharybin d71bcab076 Fix for border select doesn't work with normalization enabled
Some lazy developer named Sergey typed zero instead of actual
mapping flag in unit mapping function in the original f-curve
normalization commit.
2013-12-20 14:46:50 +06:00
Brecht Van Lommel b2fdc591c3 UI: restore confirmation popups for delete operators.
It turned out this was leading to accidental deleting in some cases when the
info message was missed by users. Fixes T37801.
2013-12-20 01:40:33 +01:00
Brecht Van Lommel 29e3b09825 Fix T37890: compositor did not take number of thread setting into account. 2013-12-20 00:43:26 +01:00
Brecht Van Lommel 8ed0878f0f Fix T37884: cycles hair rendering crash with UV coordinates.
This was broken in a recent bugfix for zero length hairs.
2013-12-20 00:08:46 +01:00
Bastien Montagne 61ce7a26f3 Raise Python version to 3.3.3. 2013-12-19 22:44:51 +01:00
Brecht Van Lommel e8c801f86c Fix T37861: remove unnecessary error print when viewport rendering a curve that gives an empty mesh. 2013-12-19 19:19:31 +01:00
Brecht Van Lommel e7ac87a254 Fix T37869: vertex paint + wireframe draw mode + smoke domain did not draw correct. 2013-12-19 18:52:26 +01:00
Brecht Van Lommel 19c0c7992a Fix T37003, Fix T37859: smoke modifier taking deforming modifiers into account
in some cases.

The smoke modifier now ignores the modifier evaluation for generated texture
coordinates, which would previously cause the undeformed mesh to be cached for
flow objects. Dynamic paint has a similar exception, and other physics systems
avoid it by not being a constructive modifier.
2013-12-19 18:25:14 +01:00
Campbell Barton 2746f7ef28 Change recent fix for T37864, now only check if the file is readonly
Other error cases are already handled elsewhere
2013-12-20 02:27:15 +11:00
Campbell Barton aab587817c Fix T37795: Resetting a button to the default value could crash
Added ui_handle_afterfunc_add_operator so a button can queue an operator
to run without executing it immediately.
2013-12-20 01:07:09 +11:00
Peter Staples 3fcfbf24b3 Fix missing F-Curve Generator modifier updates from the Python API.
The poly_order and mode properties were missing update and range, now they
match the UI code.

Reviewed By: brecht

Differential Revision: http://developer.blender.org/D116
2013-12-19 14:53:33 +01:00
Antony Riakiotakis a102d3397f Sculpting:
* Support for symmetry in lasso masking
* Optimize away symmetry multiplication of gravity vector if no gravity
active
* Move flip_v3_v3 to paint_utils (used in masking as well)
* Use OpenMP for mask flood fill too.
2013-12-19 14:40:19 +02:00
Campbell Barton 70ef1f2004 Patch T19235: bmesh comments (with updates) 2013-12-19 22:41:18 +11:00
Campbell Barton 0cb3f54fda Code Cleanup: remove duplicate errorstack 2013-12-19 22:41:18 +11:00
Sergey Sharybin b0c4133c67 Followup for fix T37718: image was not saving with proper settings second time
This was actually a regression after color management re-implementation, need
to copy settings from saved image buffer to an original one since they might
be modified during save.

Also noticed image format planes detection didn't work properly from an image
buffer. Made it so save operator works fine now, but also marked a TODO in
BKE_imbuf_to_image_format() which needs to be investigated further.
2013-12-19 17:20:12 +06:00
Thomas Dinges 01745d359e Fix for T37864, save/save_as blend now refuses to save and report an error, when filepath is not writeable. 2013-12-19 09:57:44 +01:00
Bastien Montagne dce82591a7 Fix T37830: UILists text now right align.
Simply check for non-embossed TEX buttons inside uiList items, and align their text like labels do.
2013-12-19 09:34:53 +01:00
Antony Riakiotakis e915ecdfc4 Fix T37387 VIEW3D_OT_view_selected in sculpt mode zooms far from
sculpted object if last sculpt stroke ends outside the mesh.

Code here used the last true location which is invalid in that case,
just reuse the average stroke location instead.
2013-12-19 05:09:42 +02:00
Antony Riakiotakis 58ae499fc1 Support for symmetry in gravity.
Also fix previous commit original coordinate change for proxy calculation
(broke all non-anchored brushes -facepalm-) and cache the gravity support
result.
2013-12-19 02:25:32 +02:00
Antony Riakiotakis 2d06ecf687 Fix T37812, anchored sculpting on a flat plane created artifacts.
This must be an ancient bug, almost as old as anchored brushes
themselves. Code did not do sphere node intersection against original
bounding boxes if an anchored brush required it. In practice this was
not easy to see because vertices were displaced inside brush radius most
of the time. However in the provided report file, displacement was far
away from the brush sphere, making the issue apparent.

Also added original check in proxy combination code (might cause issues
with dyntopo but quick test did not show any) and did some style int ->
bool style changes.
2013-12-19 01:48:30 +02:00
Antony Riakiotakis 94a2801322 Fix T37807 gravity causes crashes when using shif-smoothing.
Turns out we didn't properly free node proxies that gravity did use and
strokes ended up accessing previous data. Also deactivated gravity when
a smooth brush is used. It is kind of distracting to get the mesh
gravitated while smoothing.
2013-12-19 00:50:39 +02:00
Campbell Barton d7033d5637 Fix T37691: Screw modifier created zero length normals 2013-12-19 07:57:16 +11:00
Brecht Van Lommel 4b206af1c9 Fix T37847: some buttons displayed too wide in multi-column menus. 2013-12-18 19:35:13 +01:00
Campbell Barton 3f2f7091d6 Revert svn r55587, fix for T34698 (Disable snap when transform axis is 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-19 04:54:11 +11:00
Campbell Barton 6a2d5eb1ef UI: avoid using AT define for malloc id's
They're very verbose and while useful for debugging leaks - a unique
string is normally enough to track down the problem.
2013-12-19 04:08:16 +11:00
Brecht Van Lommel fd0825e7c4 Vertex/weight paint: remove "Use All Faces" option.
This is now always enabled, when you want to paint on a individual faces you
can use face selection masking instead.

Fixes T37855.
2013-12-18 17:50:51 +01:00
Antony Riakiotakis d9e8537d9b Comment fix to previous commit 2013-12-18 18:36:07 +02:00
Antony Riakiotakis 9efef3c251 Fix T37177, sculpting can act on opposite side of mesh in orthographic camera.
Summary:
Issue here most probably is that the start point in ray-casting is too
far away from the mesh. As a result the triangle intersection code can
sometimes miss the ray intersection. To solve this, we project the ray
segment to the boundary of the root node.

Reviewers: brecht, sergey, campbellbarton

Reviewed By: brecht

Maniphest Tasks: T37177

Differential Revision: http://developer.blender.org/D115
2013-12-18 18:34:02 +02:00
Brecht Van Lommel 355c699dc6 Fix T37834: smoke opengl render not delivering correct alpha channel. 2013-12-18 17:24:52 +01:00
Campbell Barton 9943802829 View3D: small optimization for smoke drawing 2013-12-19 02:03:47 +11:00
Brecht Van Lommel 15927e05e4 Fix T37675: blender internal viewport render not updating properly with volumes. 2013-12-18 15:46:30 +01:00
Brecht Van Lommel 8106444756 Revert fix for T37705: it's messing up the panel order in another place. 2013-12-18 15:10:40 +01:00
Brecht Van Lommel d591f314f9 Fix T37705: texture panel order wrong when switching from cycles to blender render. 2013-12-18 13:15:13 +01:00
Brecht Van Lommel 6ccf3402cb Fix T37790: OSL not rendering subsurface scattering color correct since upgrade to 1.4. 2013-12-18 12:29:11 +01:00
Brecht Van Lommel f92bb64505 Fix T37843: area split widget missing in python console editor.
Python was indirectly causing redraw tags during drawing, which interfered
with the ARegion.drawrct, now ignore these during draw.
2013-12-18 12:02:31 +01:00
Brecht Van Lommel 7214001cdb Fix T37837: mirror modifier merge does not place vertices at the center.
This was broken since BMesh.
2013-12-18 11:15:11 +01:00
Brecht Van Lommel 90b831dc09 Fix T37842: missing 3D view redraw when editing group layers and offset. 2013-12-18 10:53:49 +01:00