Commit Graph

43234 Commits

Author SHA1 Message Date
f87d38b5f5 Bugfix T42225: Python - GreasePencil.active incorrectly accepts GreasePencil type instead of GPencilLayer 2014-10-15 12:56:29 +13:00
Dalai Felinto
2f49be5b20 Fix for Editor Fullscreen on Sequencer
The sequencer 'display' area is a region on its own, so we can't hide
the preview regions. The only problem is that the <-> resize icon shows
in the main region, so you only see it over the tracks region in the
sequencer, I'm not addressing this though.
2014-10-14 18:31:06 -03:00
Dalai Felinto
7c25f16f1a Fullscreen Editor (new fullscreen mode for clean UI)
Organize Maximize/Fullscreen mess and add a new fullscreen mode with no UI

* Maximize Editor: (old Ctrl+Up)
* Full Screen Window: (old Alt + F11)
* Full Screen Editor: new operator (Alt + F10)
* Change Show/Hide Header: (Alt + F9)

When the mode is on moving the mouse near the top right corner of the
editor shows an icon to go back to the normal editor mode.

This was originally intended for the multiview branch, but this
functionality also benefits non-stereo workflows, thus it can be
reviewed and committed independently.

Development notes:
* This includes cleanups in the code to sanitize the naming of
  fullscreen/maximize across the window/editor code.

* Originally the idea was to make the window fullscreen as well, but
  this idea was dropped.

* You can see the clicking area when debug is 1

* Technically the user can be left with an unfaded icon in the corner
  (specially when using a tablet). If we think this is too bad we can
  increase the action zone to be the whole screen, or something similar.

Reviewers: campbellbarton [1], ton [2], fsiddi [2]

[1] actual code review
[2] design review

Differential Revision: https://developer.blender.org/D678
2014-10-14 15:11:41 -03:00
b171fd7483 Code cleanup: int/float and float/double conversions 2014-10-14 15:36:21 +02:00
2d6458c64c Fix T42064: Directional blur uses wrong sampler
Now use linear one, nearest is far too doggy.
2014-10-14 15:35:41 +02:00
f23cf22125 Pie menus:
* Only use last key for pies if it hasn't been released already
* Confirm threshold is now measured as distance after regular threshold.
zero disables.
* Only display the confirm threshold if there's a valid direction (mouse
is after threshold).
* Calculate confirm threshold taking recentering into account
2014-10-14 12:08:44 +02:00
20c233f3af Yet another tweak to stretch volume variation.
Make sure the 1.0 value is not affected by smoothing, and min/max limits
never go above or below 1.0 respectively. This was a request by
animators since not modifying the mesh in its rest pose is regarded as
crucial.
2014-10-14 11:51:36 +02:00
0297763afa Tweak for smoothing limits in stretch-constraint volume preservation.
Uses a arctan instead of sine function now, which has the advantage of
not overestimating the bulging.
2014-10-14 11:03:13 +02:00
c08e7e1dc0 Fix T42209: Changing Node Editor header color also changes wire color
The nodes wire was using 'TH_HEADER' flag to get its color and thus would be in sync with the header. Now make it so it uses its 'own' flag (actually 'TH_SYNTAX_R', the only TH_SYNTAX_* which wasn't yet used by the nodes).
Also expose the setting to the user so it can be themified.

This fixes T42209

Reviewers: lukastoenne

Reviewed By: lukastoenne

Maniphest Tasks: T42209

Differential Revision: https://developer.blender.org/D827
2014-10-14 10:17:06 +02:00
cd2295f93e BLI_bitmap: add a macro to set/clear the whole bitmap at once. 2014-10-14 09:40:35 +02:00
d665095e0d Filter out pie spawn button events.
The reason being, with the current system of quick selection, it's
possible to spawn an operator after confirmation, especially for cases
with modifier buttons.
2014-10-13 20:09:37 +02:00
f9cbb908a3 Integrated limits for volume preservation in stretch-to constraints.
Currently the volume variation feature in stretch constraints is
unlimited. This has to be compensated by riggers by adding scale limit
constraints, but these are unaware of the stretch orientation and can
lead to flipping. Also the stretch calculation itself is not working
properly and can lead to collapsing volume.

The patch fixes this with several modifications:
- Interpret the volume variation factor as exponent, which works better
  with large values for artistic purposes.
- Add integrated limits to the volume "bulge" factor, so secondary
  constraints for compensation become unnecessary
- Add a smoothness factor to make limits less visible.

Eventually a generic volume preservation constraint would be nicer,
because multiple constraints currently implement volume variation of
their own. This feature could actually work very nicely independent from
other constraint features.

Differential Revision: https://developer.blender.org/D826
2014-10-13 19:58:53 +02:00
af346f9918 Some corrections to the pie spawning code to account for nested pies. 2014-10-13 19:55:19 +02:00
02175027f2 Fix T42206: RenderLayers popup crashed when clicked while rendering 2014-10-13 18:15:55 +02:00
f4a260fb3c Fix T42198: Linked lines only work with linked objects.
The reported issue was caused by a backward incompatibility due to careless
code changes made when per-material Freestyle line colors were introduced
in rB7915d7277ac8c605f016f30f943080556244fb59.  In 2.71 line style
Material color/alpha/thickness modifiers was retrieving alpha transparency
from Material.alpha, whereas in 2.72 Material.line_color[3] was referenced.

The present fix reverts the aforementioned code changes.

This issue is a regression from 2.71, so the fix is appropriate for inclusion in
the 2.72a release.
2014-10-14 01:14:33 +09:00
bdc41ca756 Code cleanup: Move output arguments to the end of the list 2014-10-13 18:06:18 +02:00
bcee57e74e Roto: Improve spline sliding vs. curvature detection
If the mouse is closer to the spline than to it's center do a
spline curvature correction operator instead.
2014-10-13 17:59:03 +02:00
99a386da9e Code cleanup: Prevent possible int->float conversion 2014-10-13 17:52:14 +02:00
fa021e3a44 Code cleanup: Use new SQUARE() macro to get squared distance threshold 2014-10-13 17:48:10 +02:00
cf38b933f3 Fix T42005: Reset py-handlers could crash
Wasn't acquiring the GIL.
2014-10-13 17:45:40 +02:00
e72d8b4711 Mesh Inset: select internal faces by default 2014-10-13 17:02:21 +02:00
8e1ae537dd Fix T42205: MovieClip ignores grid color 2014-10-13 16:27:01 +02:00
9231150577 Cleanup: redundant cast 2014-10-13 15:51:31 +02:00
4f90c880a9 Error in last commit 2014-10-13 15:41:19 +02:00
a4258d40a1 BLI_utildefines: add SQUARE macro
also minor cleanup
2014-10-13 15:36:13 +02:00
9fcc1a32df Pie menus: Confirm threshold
This commit adds a confirm threshold property to pie menus.

Basically, this will confirm the pie menu automatically when
the distance from the center of the pie exceeds that threshold without
a need to release the pie button.

The confirm threshold will only work if it is larger than the pie
threshold.

The confirmation actually occur when the mouse stops moving, to
allow multiple pie menus to be better linked together, (see below)

This functionality also facilitates the ability for chained pie menus by
dragging. Basically, a pie menu item can be a call_menu_pie operator and
the new pie menu will still use the original pie menu release event for
confirmation. This should allow for quick, gesture based navigation in
pie menu hierarchies (going back in the hierarchy is still not supported
though)

There will be a demonstration pie in the official add-on soon
2014-10-13 14:35:41 +02:00
116439ed91 Mesh calc smooth group: several fixes.
* Consider non-manifold edges as sharp, as in split normals handling.
* Consider edges from sharp polys as sharp!!!
* Fix returned number of groups (was off-by-one for non-bitflags grouping, could also
  be wrong in case of id overflow).

Note about using sharp polys too to define groups: Only current use of this function
(Obj exporter) does not need that, because it does its own check for sharp faces.
However, we might reuse that func in other places in future (e.g. in custom split
normals area), so better to get a consistent behavior!
2014-10-13 14:03:39 +02:00
4eadc3801a Minor typo fix, reported by Sebastian Koenig on irc. Thanks! 2014-10-13 12:28:10 +02:00
9d078f2916 Bugfix: "Hide" button in modifiers panel did only hide smoke domain, not the smoke.
Reported by nudelZ
2014-10-12 16:36:35 +02:00
ee5936cf6b Minor alignment for triangles on number slider widget 2014-10-12 01:01:59 +02:00
545308fd10 Sculpt: update dystopia debug verify 2014-10-11 17:57:46 +02:00
0a738280e1 Cleanup 2014-10-11 11:44:28 +02:00
f7957e2f7e Cleanup: tabs in empty lines. 2014-10-10 18:45:11 +02:00
32bc1eb677 Cleanup (no functional changes):
* int -> bool where possible
* Use const where possible
* Get rid of magic numbers
* Add/tweak a few UI tips
* A few other misc changes.
2014-10-10 18:45:11 +02:00
b100bdca25 Fix T41950: Parent-Child Menu behaves weird
Issue was, parenting with operator, then unparenting would keep the inverse parent matrix.
So if you then parented again through the mere Object field of Object buttons, you'd still
use previous inver parent matrix, giving some weird behavior from user PoV.

This commit simply makes sure inverse parent matrix is always reset to indentity when clearing
parents.
2014-10-10 18:45:11 +02:00
504370cafb Code cleanup: Fix silly duplication of typecheck and swap macro 2014-10-10 21:13:19 +06:00
65e1600cf3 Change interaction of pie menus slightly.
In drag style pie menus clicking is ignored now. This is done because
if we want to ensure that pie menus will not respawn, we had to not
destroy and keep the pie menu invisble while the button is pressed.

This opened a can of worms where pie items that would spawn popups could
steal the focus from the invisible pies and then the former pies would
be stuck in an invisible state, stealing all input unless user did a
right click to cancel the pie.

Invisible state is still kept for cancelling and strictly for that only.

This still allows nested layouts but only in click style, while hold
style is used for faster interaction. As a plus, it should also be
possible to tweak slider properties now, though menu will close after
that.
2014-10-10 17:02:47 +02:00
067f70cff7 Code cleanup: tabs vs. spaces (tm) commit 2014-10-10 20:17:56 +06:00
91d2485c52 Fix T42163: Outliner: recursive visibility toggle: autokeyframe only works for ancestor, not children
Ancestor's autokeyframing is handled through UI/buttons code, but children completely
skipped this, so we have to do it explicitely here...
2014-10-10 15:09:03 +02:00
e640b4fb72 Sculpt: remove offset args from internal funcs
Detect this from the element type, also typecheck lookup functions
2014-10-10 12:38:04 +02:00
585d2f31a9 Fix T32209 quitting not saving latest data if you are in edit or sculpt mode on
quit.blend.

This will use a slower file write if an object is in edit or sculpt
mode.

Autosaving will explicitly not be supported to keep it fast.
Added a tooltip warning.
2014-10-10 12:04:44 +02:00
c2d6de8e20 Freestyle: Fix for memory leaks in StrokeVertexIterator.
The issues identified here are regression from 2.71, so the present code
revision is appropriate for backporting if 2.72a is planned.
2014-10-10 18:57:36 +09:00
5fdbb793ff Freestyle: Fix for StrokeVertexIterator.__next__() ignoring the first and only element.
A StrokeVertexIterator ignores the first element when it is the only element.
Such an iterator can be created by the .incremented() method from an iterator
over two stroke vertices.

This problem is a regression from 2.71.  The present fix is appropriate to backport
if Blender 2.72a is planned.

Problem report by Kazuhiro Murakawa through personal communications, thanks!
2014-10-10 18:57:35 +09:00
642c8243e7 BLI_buffer: empty macro 2014-10-10 10:10:13 +02:00
c6d8ac9fe2 Tracking: Use task scheduler instead of thread pool for proxy build 2014-10-10 04:30:42 +06:00
a00b6d1271 Cleanup: (float)floor -> floorf 2014-10-10 00:24:34 +02:00
0f6afddb04 Tracking: Switch prefetch to use generic task scheduler
Not as if it gives any huge benefit to end artists, but it's kinda silly
to have like 3 different task/thread scheduling systems. The new one is
what's recommended for use now i'd say.

On the other hand it has unmeasurable memory save benefit :)
2014-10-10 02:56:56 +06:00
30dab51c29 Cleanup: use bool and const args 2014-10-09 22:44:03 +02:00
aaf772b724 Current tile highlight should use render data from the engine
Otherwise tweaking resolution/border would affect the way tiles are highlighted.
2014-10-10 02:11:36 +06:00
539a61bce2 Code cleanup: Use generic isnan() function instead of own ifdef 2014-10-10 02:04:36 +06:00