Commit Graph

48942 Commits

Author SHA1 Message Date
Campbell Barton
78cae5bad9 Cleanup: remove redundant includes 2015-07-11 02:49:04 +10:00
Campbell Barton
3443686399 Sequencer: changes to text effect strip
- default alignment to lower center.
- placement is now relative,
  so changing output size keeps correct placement.
- instead of center override, add align option (left/right/center).

Also don't use pixel-size for setting the font size, on new strips.
Better not have UI prefs impact low level API's.
2015-07-11 02:30:26 +10:00
Julian Eisel
9a3dfa1f21 Fix crash when appending from File Browser
Again own mistake in rBaeeb23efa28dc1
2015-07-10 17:49:58 +02:00
Tamito Kajiyama
25638a9656 Code cleanup: White space and dead code. 2015-07-10 23:15:57 +09:00
Folkert de Vries
eeeb845d33 Freestyle: new stroke modifiers
This patch introduces a couple new stroke modifiers. The ones currently implemented are based on prototypes by @kjym3 and myself.

The new modifiers:
  - Tangent
  - Thickness noise
  - Crease Angle
  - Simplification
  - Curvature 3D

The documentation for these new modifier types can be found [[ http://www.blender.org/manual/render/freestyle/parameter_editor/index.html | in the manual ]]:

{F134441}
(left: AnisotropicThicknessShader, right: NoiseThicknessShader)

{F140499}
(left: Curvature 3D, right: Simplification)

Author: Folkert de Vries (flokkievids)

Reviewers: kjym3

Subscribers: #user_interface, plasmasolutions, kjym3

Projects: #bf_blender

Differential Revision: https://developer.blender.org/D963
2015-07-10 23:15:56 +09:00
Bastien Montagne
7837f0e833 BLI_math 'compare' cleanup & enhancements.
This commit:
* Adds a 'compare_ff' function for absolute 'almost equal' comparison of floats.
* Makes 'compare_vxvx' functions use that new 'compare_ff' one.
* Adds a 'compare_ff_relative' function for secured ulp-based relative comparison of floats.
* Adds matching 'compare_vxvx_relative' functions.
* Adds some basic tests for compare_ff_relative.

See https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/

Note that we could replace our python/mathutils' EXPP_FloatsAreEqual() by BLI's compare_ff_relative
(using a very small absolute max_diff), but these do not have exact same behavior...
Left a comment there for now, we can do it later if/when we are sure it won't break anything!
2015-07-10 15:02:43 +02:00
Bastien Montagne
bbcbd2eed9 REmove stupid apple check on OMP in weightvg modifier.
This is handled in build files...
2015-07-10 09:56:10 +02:00
Campbell Barton
a8b8d60c50 CustomData: deprecate CD_ID_MCOL 2015-07-10 16:47:39 +10:00
Campbell Barton
a7ed374459 makesrna: use int64 for rounding check
Harmless but larger values would overflow
2015-07-10 16:42:36 +10:00
Campbell Barton
66f1c3b882 DNA: replace GCC poison with ifdef for enums 2015-07-10 15:58:50 +10:00
Julian Eisel
5513fdc629 Fix T45398: Saving file from File Browser doesn't work if no file is selected
Own mistake in rBaeeb23efa28dc16e20
2015-07-09 23:48:55 +02:00
Julian Eisel
f766a61626 File Browser: (Re-)Allow selecting '..' parent entry for file navigation
Selecting '..' entry was intentionally disabled in rB76b4fad6dbda1b10c, however, for file navigation this can be really useful. So this basically allows selecting '..' entry again, *if it is the only entry to select*. It won't be selected using box select, select all or when expanding selection.
2015-07-09 19:48:03 +02:00
Julian Eisel
aeeb23efa2 File Browser: Improve usage of Enter-key to open files/directories
From a user-POV this makes following changes:
* Adds support for using the Enter-key to open directories
* Updates the upper text-buttons for file and directory on selection
* Last selected file/directory is opened now (in sync with upper text-buttons)
* Changes text in open button to "Open Directory" if a directory is selected

D1349, Reviewed by @mont29
2015-07-09 18:40:34 +02:00
Campbell Barton
26bd1a766a Cleanup: warnings 2015-07-09 19:39:37 +10:00
Campbell Barton
a837797740 Cleanup: quiet warning 2015-07-09 19:33:02 +10:00
Porteries Tristan
980ea4e54f Use it->second instead of (*it).second in KX_BlenderSceneConverter. 2015-07-09 09:45:21 +02:00
Campbell Barton
cdbb60b0a3 Select Shortest Path for edit-curve
D1391 by @pink.vertex with own fixes/edits
2015-07-09 17:03:00 +10:00
Campbell Barton
ee1b1b9e59 Curve: change rules wrt active bezier
Activate the vertex even if only a single handle is selected
2015-07-09 14:52:01 +10:00
Campbell Barton
bbc4a92318 Curve selection, de-duplicate & cleanup 2015-07-09 14:39:24 +10:00
Campbell Barton
ec64bf17e3 Select Similar for edit-curve
D1381 by @johnroper100 with edits
2015-07-09 03:03:19 +10:00
Campbell Barton
161bbfcd19 Add BKE_nurb_bpoint_calc_normal 2015-07-09 02:56:04 +10:00
Campbell Barton
4a328a7689 EditCurve: move selection into own file 2015-07-09 00:09:26 +10:00
Bastien Montagne
de6b4dc7f7 Fix/Cleanup mesh remap dest transformation in tree/source space.
In org work, bvhtree helpers were modifying passed co/no in place according to given transform.

However, during review pass we decided this was bad, and made them modify copies. But this broke
some cases where we'd do extra tests after bvhtree query, expecting tmp_co to be in tree (aka source) space!

Further more, since in quite a few cases we were already doing that transform outside of bvhtree helpers,
decided to remove this alltogether from the helpers - makes things more clear and easy to follow,
avoids needless copy of vector, and ensures we are always using tmp_co in its transformed version!
2015-07-07 19:29:17 +02:00
Campbell Barton
30b7aafe33 Correct default enum values
Had assert creating cheat sheet
2015-07-07 23:10:08 +10:00
Porteries Tristan
0c14a897dd BGE: Fix wrong current logic manager in collision callback. 2015-07-07 13:37:27 +02:00
Campbell Barton
5af1daa2dc Fix for recent error, ngons now flipped correctly 2015-07-07 20:29:13 +10:00
Sybren A. Stüvel
23aa425cd9 Using proper subtype in game object velocity clamping properties.
The game.velocity_{min,max} and game.angular_velocity_{min,max} object
RNA properties did not use a subtype, and thus velocity was always
displayed as radians or blender units instead of the configured units.

Reviewed by: campbellbarton
2015-07-07 11:59:28 +02:00
Campbell Barton
afa25b1136 Minor simplification for uv edge drawing 2015-07-07 15:08:45 +10:00
Quentin Wenger
6ed1a1abe2 BGE: bge.texture API documentation enhancement
This patch attempts to improve and review the documentation of bge.texture, as requested in the [[ http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/GameEngine#Video_Texture | TODO list ]].

More specifically, it

  - fixes the rst syntax, including titles of the examples bge.texture.py and bge.texture.1.py;

  - adds, standardizes and reviews description of the API elements, particularly signatures, types, etc.

  - adds SOURCE_* constants to the doc

  - splits the doc into thematical parts (Video, Image, Texture, and Filter Classes, Functions, Constants).

Notes:

  - The parameter "mode" of ImageBuff.plot has to be described better. Actually, the whole set of IMB_BLEND_* constants (from IMB_imbuf.h) should be exposed to Python. I'll do that in a future diff, and complete the doc at the same moment (adding those IMB_BLEND_* constants to the Constants part of this doc).

  - The option of using webcams in VideoFFmpeg is still particularly not well documented. I am planning to make a proposal about fixing T18634 (and its corresponding TODO in the list) by integrating OpenCV in the BGE (and Blender?). The idea would then probably be to add a new class, f.ex. ImageWebcam, making this functionnality more specialized. So for now I don't think it is worth to document that part much.

This patch fixes T44284 too.

Reviewers: moguri, kupoman, campbellbarton, panzergame, lordloki

Reviewed By: panzergame, lordloki

Subscribers: hg1

Projects: #game_engine, #game_python, #documentation

Maniphest Tasks: T44284

Differential Revision: https://developer.blender.org/D1352
2015-07-06 21:48:25 +02:00
Howard Trickey
791b5fe9d0 Fix T45331, a bevel regression for 2.75.
Got bad results when two beveled edges form straight line
and there are two or more unbeveled edges attached to either
side of the connecting vertex.
2015-07-06 13:27:01 -04:00
Dalai Felinto
93608e4f3b Fix T45237: Dither does not work 2015-07-06 11:51:40 -03:00
Dalai Felinto
6a132aa65d Fix T45290: Selecting passes in image editor does no longer work
This issue was introduced with the wrong fix I committed for dither (rB56ca7f34)
Which also means T45237 has to be re-open
2015-07-06 11:15:16 -03:00
Jorge Bernal
12583287e7 BGE: Fix T45341: Crash when camera is eliminated
A null check is added to avoid crashes when the camera is removed during
the game and no other is available
2015-07-06 15:40:50 +02:00
Sergey Sharybin
266459c7da Fix T45328: Crash upon finishing render with 'Cache Result' enabled 2015-07-06 12:35:11 +02:00
Sybren A. Stüvel
be07ab58c6 BGE Fix T45207: Camera actuator shakes with low height
The camera-aiming code was using a near-zero-length cross product, which
caused oscillations. Thresholding on the cross product length seems to
fix this.

Reviewers: lucky3, Matpi, lordloki

Reviewed By: lordloki

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1387
2015-07-06 12:20:29 +02:00
Campbell Barton
28d712b238 Remove redundant face-flipping check 2015-07-06 19:21:19 +10:00
Campbell Barton
72565fbf30 Cleanup: style, spelling 2015-07-06 17:45:11 +10:00
Campbell Barton
499308d079 CMake: use cmake commands where possible 2015-07-06 13:34:32 +10:00
Howard Trickey
15c301f533 Change default for bevel to match previous behavior.
Have reconsidered and feel it best to try matching previous behavior
(doing "loop slides" where possible) as default. This will avoid the
need to change regression tests, among other things.
2015-07-05 13:31:26 -04:00
Howard Trickey
12aff8d783 Add 'loop slide' option to bevel. See T45260
Current behavior of bevel is to 'loop slide' along unbeveled edges
when possible, but this produces uneven bevel widths sometimes,
so this option lets user choose between having the loop slide effect
or having more even bevel widths. Trying it out with default being
'no loop slide', so different from current behavior. May reverse this
choice later, depending on user reactions.
2015-07-05 09:53:17 -04:00
Campbell Barton
51e9a814c9 Correct vert-slide helper-line scale
Was invalid in perspective view
2015-07-05 22:35:04 +10:00
Bastien Montagne
2b63ec2894 Fix T45319: Set same precision for 3D cursor location as other locations (objects', vertices', etc.). 2015-07-05 10:55:59 +02:00
Campbell Barton
6de7f3c747 GPencil: use ctrl+x/del for dissolve
Move dissolve into own operator (as with mesh/armature)
2015-07-05 14:34:17 +10:00
Howard Trickey
68d72e2164 Add key toggle (V) to bevel tool to turn vertex-only on/off. 2015-07-04 10:14:47 -04:00
Campbell Barton
631b53bad4 RNA: Match enum string to UI name
Having different terminology for enum's is confusing for scripters.
2015-07-04 13:02:59 +10:00
Porteries Tristan
b997bda9f9 BGE: Fix T45259 collision sensor registration. 2015-07-03 23:48:26 +02:00
Porteries Tristan
749f346ce0 BGE: Add alpha to coverage render mode.
This patch add a new option for transparency meshes : Alpha to coverage, in the game setting panel in material.
The alpha to coverage request a multisample, the best is 8x but 4x and 2x can also give nice render.

4x alpha clip : http://www.pasteall.org/pic/show.php?id=89464
4x alpha to coverage : http://www.pasteall.org/pic/show.php?id=89463

Reviewers: moguri, kupoman, campbellbarton, psy-fi

Reviewed By: psy-fi

Subscribers: lordloki, rdb

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1354
2015-07-03 19:03:29 +02:00
Bastien Montagne
c503d17353 Fix T45281: IOR Value Slider with "Ctrl" modifier does not increment as intended.
Looks like a typo in rB1b8069bd?
2015-07-03 18:56:59 +02:00
Bastien Montagne
e42609db49 Fix T45283: Blender crashes on some grayscale PNGs with alpha.
PNG_COLOR_TYPE_GRAY colortype can have some values for alpha, in the same way as
PNG_COLOR_TYPE_PALETTE colortype.

In this case, we need two channels (grayscale and alpha), not one.
2015-07-03 18:30:58 +02:00
Thomas Szepe
97b431e42d BGE: Add integer uniforms for 2D Filter
Actually it is only possible to pass float properties to a 2D filter (GLSL fragment shader).
This patch allows also to use integer properties for the 2D filter.

Reviewers: sybren, agoose77, kupoman, moguri, lordloki, panzergame

Reviewed By: lordloki, panzergame

Projects: #game_engine

Differential Revision: https://developer.blender.org/D1370
2015-07-03 17:07:31 +02:00