Commit Graph

45754 Commits

Author SHA1 Message Date
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
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
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
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
9f18e4f0eb Cleanup: tabs
Set your editor to tabs for all C/C++!
2014-10-09 17:12:50 +02:00
2025730715 Sculpt: use bitmap for mask bool array 2014-10-09 17:12:50 +02:00
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
928be3013a Classic blenderplayer fix + small optimization 2014-10-09 16:05:00 +02:00
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
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
fe9394741b Freestyle: silence a GCC warning (-Wunused-function). 2014-10-09 01:31:08 +09:00
14df7de916 D801: Freestyle: remove old and unused stroke shaders
This patch removes several stroke shaders written in C++ that are unused
and don't serve a real purpose any more.  The removed shaders are:

  - BPy_ColorVariationPatternShader
  - BPy_StrokeTextureShader
  - BPy_TextureAssignerShader
  - BPy_ThicknessVariationPatternShader
  - BPy_fstreamShader
  - BPy_streamShader

and a few more that weren't even exposed to the Python API.

Some minor edits were made by the reviewer.

Differential Revision: https://developer.blender.org/D801

Reviewed by: kjym3
2014-10-09 01:31:07 +09:00
9c97624fc9 Select Random in Particle Edit Mode, by jezv
Added the select random functionality in particle edit mode for hairs or control points.

Reviewers: campbellbarton, lukastoenne

Reviewed By: lukastoenne

Subscribers: campbellbarton, kevindietrich, jezv

Projects: #quick_hacks, #bf_blender, #physics

Maniphest Tasks: T37873

Differential Revision: https://developer.blender.org/D809
2014-10-08 18:10:27 +02:00
0ba84b7124 Operator to define render border from rendered image editor
This way it is possible to define render border directly from the image editor,
which is useful for at least three things:

- If viewport is really optimized out (simplified etc) then it might be hard to
  guess which exact area you're mainly interested now.

- No need to switch to the viewport to do render border tweaks, could be useful
  when doing compositing.

- If one need to look at particular pixel(s) which is real handy for debugging
  render engines (both Cycles and BI).

Reviewers: campbellbarton, venomgfx

Reviewed By: venomgfx

Differential Revision: https://developer.blender.org/D820
2014-10-08 18:02:49 +02:00
a62b806d70 Fix T42145: EditMesh Bevel tools had no clamping option.
Missing feature already present in Bevel modifier, useful and rather simple to add.
2014-10-08 16:42:41 +02:00
67943af47a glutil: use ints for drawing functions
shorts would wrap sometimes & many inputs were ints already.
2014-10-08 14:01:51 +02:00
5c829d2c4e OSX: fsmenu cleanup 2014-10-08 12:48:46 +02:00
a550d913bc Fix Python ray-cast failing to check hit direction 2014-10-08 09:47:41 +02:00
9245e1aeb8 Fix compilation error after recent commit 2014-10-08 04:11:23 +06:00
05e26297bf OSX: adapt fs_menue to modern entries handling 2014-10-07 23:45:09 +02:00
e36cc29a69 Fix T42137: Keymap editing is broken
Own mistake in previous fix here, was too greedy in finding an existing kmi of UserPref add diff kmi, we only want
to ignore exact same kmi's here.
2014-10-07 23:39:56 +02:00
8f1cdc1949 Fix bplayer linking after recent addition of glew_mx. 2014-10-07 23:28:28 +02:00
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
a8705e99ee Sculpt: minor speedup for dyntopo
Add retake to range-tree to avoid double lookup.
2014-10-07 21:02:08 +02:00
22e9f4f838 Sculpt: dyntopo, avoid redundant gset remove calls 2014-10-07 20:26:17 +02:00
d5e300e14d Paint: add debug print to time strokes 2014-10-07 20:20:19 +02:00
26083d5de5 Partial fix of T42052: Clip editor does not support Continue zoom style 2014-10-07 17:24:48 +02:00