Commit Graph

49420 Commits

Author SHA1 Message Date
Bastien Montagne
cd2295f93e BLI_bitmap: add a macro to set/clear the whole bitmap at once. 2014-10-14 09:40:35 +02:00
Antony Riakiotakis
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
Lukas Tönne
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
Antony Riakiotakis
af346f9918 Some corrections to the pie spawning code to account for nested pies. 2014-10-13 19:55:19 +02:00
Campbell Barton
02175027f2 Fix T42206: RenderLayers popup crashed when clicked while rendering 2014-10-13 18:15:55 +02:00
Tamito Kajiyama
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
Sergey Sharybin
bdc41ca756 Code cleanup: Move output arguments to the end of the list 2014-10-13 18:06:18 +02:00
Sergey Sharybin
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
Sergey Sharybin
99a386da9e Code cleanup: Prevent possible int->float conversion 2014-10-13 17:52:14 +02:00
Sergey Sharybin
fa021e3a44 Code cleanup: Use new SQUARE() macro to get squared distance threshold 2014-10-13 17:48:10 +02:00
Campbell Barton
cf38b933f3 Fix T42005: Reset py-handlers could crash
Wasn't acquiring the GIL.
2014-10-13 17:45:40 +02:00
Campbell Barton
e72d8b4711 Mesh Inset: select internal faces by default 2014-10-13 17:02:21 +02:00
Campbell Barton
8e1ae537dd Fix T42205: MovieClip ignores grid color 2014-10-13 16:27:01 +02:00
Campbell Barton
9231150577 Cleanup: redundant cast 2014-10-13 15:51:31 +02:00
Campbell Barton
4f90c880a9 Error in last commit 2014-10-13 15:41:19 +02:00
Campbell Barton
a4258d40a1 BLI_utildefines: add SQUARE macro
also minor cleanup
2014-10-13 15:36:13 +02:00
Antony Riakiotakis
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
Bastien Montagne
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
Antony Riakiotakis
4eadc3801a Minor typo fix, reported by Sebastian Koenig on irc. Thanks! 2014-10-13 12:28:10 +02:00
Daniel Genrich
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
Pablo Vazquez
ee5936cf6b Minor alignment for triangles on number slider widget 2014-10-12 01:01:59 +02:00
Campbell Barton
545308fd10 Sculpt: update dystopia debug verify 2014-10-11 17:57:46 +02:00
Benoit Bolsee
04814476c0 Fix another crash with Navigation mesh.
Navigation mesh object need to access the current scene at
creation time. This can be at scene start or when an object
is instantiated from an inactive layer. The method of getting
the scene differs in these cases. This fix handles both.
2014-10-11 12:17:31 +02:00
Campbell Barton
0a738280e1 Cleanup 2014-10-11 11:44:28 +02:00
Bastien Montagne
f7957e2f7e Cleanup: tabs in empty lines. 2014-10-10 18:45:11 +02:00
Bastien Montagne
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
Bastien Montagne
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
Sergey Sharybin
504370cafb Code cleanup: Fix silly duplication of typecheck and swap macro 2014-10-10 21:13:19 +06:00
Antony Riakiotakis
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
Sergey Sharybin
067f70cff7 Code cleanup: tabs vs. spaces (tm) commit 2014-10-10 20:17:56 +06:00
Bastien Montagne
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
Campbell Barton
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
Antony Riakiotakis
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
Tamito Kajiyama
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
Tamito Kajiyama
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
Campbell Barton
642c8243e7 BLI_buffer: empty macro 2014-10-10 10:10:13 +02:00
Sergey Sharybin
c6d8ac9fe2 Tracking: Use task scheduler instead of thread pool for proxy build 2014-10-10 04:30:42 +06:00
Campbell Barton
a00b6d1271 Cleanup: (float)floor -> floorf 2014-10-10 00:24:34 +02:00
Sergey Sharybin
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
Campbell Barton
30dab51c29 Cleanup: use bool and const args 2014-10-09 22:44:03 +02:00
Sergey Sharybin
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
Sergey Sharybin
539a61bce2 Code cleanup: Use generic isnan() function instead of own ifdef 2014-10-10 02:04:36 +06:00
Antony Riakiotakis
0609aee4db Fix T41639, hierarchical pie menu - popup interaction is buggy.
Basically, this commit changes pie menu click interaction so that
confirmation is done on left click release instead of press. This allows
dragging on the pie menu to select different items, but most
importantly, there should be no left over click events passed on to
subsequent menus/pies. This means that pie menus should now be able to
spawn popups safely. Also, left clicking to spawn a second pie menu now
sets that menu to click style by default allowing for better interaction
between hierarhies of pie menus.
2014-10-09 18:38:10 +02:00
Campbell Barton
9f18e4f0eb Cleanup: tabs
Set your editor to tabs for all C/C++!
2014-10-09 17:12:50 +02:00
Campbell Barton
2025730715 Sculpt: use bitmap for mask bool array 2014-10-09 17:12:50 +02:00
Antony Riakiotakis
5f6e47e767 Minor cleanup.
* Use pie direction, not draw type for pie item collision
* Strict function definitions.
* Initialize random array with system time
2014-10-09 17:12:32 +02:00
Antony Riakiotakis
928be3013a Classic blenderplayer fix + small optimization 2014-10-09 16:05:00 +02:00
Antony Riakiotakis
016e75ad64 Fix T42139, vertical noise stripe patterns in noise texture.
Two fixes here (only the second one is strictly needed to fix the issue,
but both make the system better).

First is introduction of a random generator array for use with threaded
systems where each thread needs to access its own number generator.
The random texture now uses this so it should not be influenced by other
random generator reseedings of the main random generator like it did
before.

Second, I reshuffled the texture code to resample the upper bits of the
random number first. According to Numerical Recipes, this is where the
most variance can be found, so by sampling those we avoid correlation
issues. Also, multiplying here is not ideal because if a pair of bits
are zero, then the whole result will also be zero.

Overall this is much more random (tm) than before, however result will
also be brighter, since we now have less black spots. Tweaking the
brightness/contrast should somewhat fix that, generally having the same
result as before is not possible anyway if we are to really fix this.

Also, seems like exposing procedural depth might be nice here since it
influences the precision of the texture lookup.
2014-10-09 15:48:52 +02:00
Sergey Sharybin
375d2dc855 Implement custom names for render slots
Basically the title tells it all, quite straightforward implementation.

The only thing is the image.render_slot which used to represent the active
render slot index is now moved to image.render_slots.active_index.

Reviewers: venomgfx, campbellbarton

Differential Revision: https://developer.blender.org/D821
2014-10-09 11:17:31 +02:00
Tamito Kajiyama
fe9394741b Freestyle: silence a GCC warning (-Wunused-function). 2014-10-09 01:31:08 +09:00