Commit Graph

50904 Commits

Author SHA1 Message Date
Campbell Barton 2f0db80155 Fix crash pressing +/- in file-selector
Filenames over 128 chars would crash.
Move BLI_newname into file_ops,
this was only used in one place and isn't all that re-usable.
Also remove special behavior for 4 digits.
2015-10-16 04:57:52 +11:00
Campbell Barton cebaedd709 Fix crash w/ PlayAnim & long filenames
Paths >128 chars could crash.
Replace BLI_newname with direct BLI_stringenc/dec use which makes more sense in this case.
2015-10-16 04:31:17 +11:00
Campbell Barton 14de9a5982 Knife tool: generalize angle snapping code
Replace hard-coded snap angles with function that allows arbitrary snapping increments.

Currently no user visible change.
2015-10-16 04:04:45 +11:00
Campbell Barton 99142ec7e0 BLI_math: isect_ray_plane_v3 now takes 4d plane
Was taking a triangle and doing ray-tri intersect.
2015-10-16 03:06:12 +11:00
Bastien Montagne fa3dd5d9f4 Cleanup: BLO_read: linking API arg order and name.
linking API funcs would use 'name, idcode', when all other code here uses
(more sensible) 'idcode, name'.

Also, use 'name' arg name when we expect a bare name, without the prepended ID code, and
'idname' arg name when we expect a complete ID name.

And here too, idcode shall be short, not int!
2015-10-15 16:12:00 +02:00
Bastien Montagne 25f79d97de Cleanup: BKE_idcode: idcode (types) are short, not int...
Also, use 'idcode' var name, as in many other places in Blender.
2015-10-15 16:12:00 +02:00
Campbell Barton df1e9fac06 Fix error w/ printing knife header angle-snapping 2015-10-16 00:41:14 +11:00
Campbell Barton e60d535443 3D View: support non-uniform scaled lamps
D1378 by @youle

Non-uniform scaled lamps now cast oval/rectangular shadows, viewport & BGE.
2015-10-15 22:36:31 +11:00
Campbell Barton 3de81314fa Error in last commit 2015-10-15 21:30:24 +11:00
Campbell Barton 83d6b73e96 Error in last commit 2015-10-15 21:28:07 +11:00
Campbell Barton 0a82a20fe4 BLI_math: add normalize_m#_ex functions
Useful when we need to use the axis lengths too.
2015-10-15 21:03:27 +11:00
Campbell Barton f53a21747c Fix T46494: Can't de-select a face w/ mixed modes 2015-10-15 19:57:51 +11:00
Campbell Barton a595cda2cd Fix memory leaks in PlayAnim
Was never freeing filenames or pictures.
2015-10-15 17:45:53 +11:00
Campbell Barton 0be6ca0b83 Fix T46465: Lag scrubbing w/ PlayAnim 2015-10-15 17:25:43 +11:00
Campbell Barton b4b2caffd8 PlayAnim: avoid list count setting frame from mouse 2015-10-15 16:56:30 +11:00
Campbell Barton 0296642794 Change version cycle to 'alpha' 2015-10-15 16:56:30 +11:00
Bastien Montagne 767d3f23b7 Fix T45900: Allow again white spaces in file names.
Should probably be added to 'a' release, should we do one...
2015-10-15 07:44:25 +02:00
Brecht Van Lommel f823b9ece8 Fix T46483: vertex/edge slide with correct UVs sometimes pinning UVs. 2015-10-15 03:14:38 +02:00
Brecht Van Lommel 12c705ec86 Fix related to T46223: memory leak when loading multilayer multiview images.
Differential Revision: https://developer.blender.org/D1549
2015-10-15 01:58:33 +02:00
Brecht Van Lommel 8191066c0b Fix T46223: multiview image sequences crashing.
Differential Revision: https://developer.blender.org/D1549
2015-10-15 01:58:28 +02:00
Brecht Van Lommel 4965c43df7 Fix T46451: vertex/edge slide clamp not available in redo popup. 2015-10-15 01:51:57 +02:00
Porteries Tristan 75e4e4b67f BGE: Fix animations update when scene is suspended. 2015-10-14 22:54:20 +02:00
Sergey Sharybin 59ba52628f Fix T46487: OpenSubdiv objects are invisible in Blender Internal "Rendered" viewport mode 2015-10-15 00:19:38 +05:00
Campbell Barton 51fc7aee34 Fix T46453: JPEG quality not stored in file
This is a feature unique to jpeg that would store the quality it was saved.

- Use struct instead of bit-shifting.
- No longer store the 'flag'.
2015-10-14 21:04:17 +11:00
Campbell Barton 2635f5b2c8 Cleanup: remove historic, blender-only jpeg io 2015-10-14 20:18:18 +11:00
Antonis Ryakiotakis ad58310161 Comment cleanup, use better lower bound for waveform 2015-10-14 12:23:17 +03:00
Antonis Ryakiotakis 6562e4ebe9 Fix T46189, draw style for waveforms occludes sequence strip text.
Used old (2.49 era) filled style for drawing here, with white color and
alpha blending.
Also changed drawing to do linear interpolation between samples instead
of ugly square wave in high zoom.
This could be improved upon, with real waveform drawing in higher zoom
levels, but I'll leave this for later since it may need some hacking on
audaspace level.
2015-10-14 12:15:03 +03:00
Campbell Barton 904db487a7 Fix T46284: Texture paint, wrong shading mode
Project-paint now supports painting to cycles materials.
2015-10-14 16:22:23 +11:00
Campbell Barton 56021cad31 Support for multi-sample sequencer GL render
OpenGL sequencer render now uses a single fbo for all rendering.
2015-10-14 12:50:03 +11:00
Campbell Barton 53d73c51a7 Support for multi-sample off-screen buffers
Replaces much slower manual accumulation buffer which simply did multiple renders.

Needs OpenGL3.2, otherwise multi-sample is disabled.
2015-10-14 10:51:17 +11:00
Bastien Montagne e1b67c9bc0 Fix T46002: mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments.
Ugly issue really, but at least doc now matches behavior of the function. :|
2015-10-13 09:59:42 +02:00
Campbell Barton 8f92cbd4a7 missed last commit (use utility function) 2015-10-13 16:31:43 +11:00
Campbell Barton 0528c16b3a Cleanup: simplify view3d trackball logic 2015-10-13 16:28:18 +11:00
Campbell Barton 5e75acf81d Fix T46450: Seams from islands, wont show 'Sharp' 2015-10-13 09:00:03 +11:00
Campbell Barton e32430df34 Fix T46458: BGE Crash on load
regression from 96dd213e7
2015-10-13 08:43:41 +11:00
Bastien Montagne cee8a3148c Usual UI message fixes... 2015-10-12 21:34:14 +02:00
Bastien Montagne cdd727b7ce Add functions to compute normals (verts, polys and loops ones) for a given shapekey.
Title says pretty much everything, we now have BKE and RNA funcs to get vertex, poly and
loop normals of a given shapekey.

This will be used e.g. in FBX exporter (shapekeys need normal data too).

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D1510
2015-10-12 20:12:55 +02:00
Brecht Van Lommel ee688e24a7 Fix T46451: edge slide even and flipped not available in redo popup. 2015-10-12 17:40:34 +02:00
Bastien Montagne 591f4549c9 WM linking code rework.
New code loops much less, does re-open & close .blend files for each data type,
and is much much more flexible - it is also ready for id-remap & co work being done in branches.

Main idea is to store libraries & datablocks to link in a dedicated struct, in a way
that avoids too much looping, and also allows to search for a single datablock in several libraries.

Here again, no change is expected in current behavior of link/append tool, please report
if anything goes different!
2015-10-12 15:20:51 +02:00
Bastien Montagne 2e8fcac15d Cleanup & rework of BLO_linking code.
This commits does mostly two things:
* Get rid of bContext parameter: I can see no real good reason to pass such a high-level data
  to such low-level code... It also makes it more difficult to call when you do not have
  a context available.
* Cleanup the instantiating part.

Last point is the most risky - previous code was sometimes quite confusing and hard to follow,
from tests nothing behaves differently in new code, but some hidden corner case may show up.

Anyway, no change in behavior is expected from this commit, if it happens please file a bugreport!
2015-10-12 15:07:07 +02:00
Bastien Montagne d24bafa0d5 Cleanup: BLO: use proper typedef for expand_doit callback. 2015-10-12 14:31:47 +02:00
Bastien Montagne 6f41febff1 Cleanup: BLO: move func doc comments to definitions of functions.
Follows our conventions and makes include file itself much cleaner.
2015-10-12 14:30:00 +02:00
Bastien Montagne 4bc08d09ae Cleanup in BLO API: rename 'append' funcs to 'link', since none do append, but only linking of datablocks! 2015-10-12 13:47:44 +02:00
Bastien Montagne 07332dd2bb Fix T34446: Make Local on linked mesh object: object gets removed if redo function is used.
Root of the issue is that we do not re-read lib data blocks and ID placholders (ID_ID bheads)
in undo context (in `blo_read_file_internal`), because `BLO_read_from_memfile` copies
lib datablocks and Main data directly from oldmain.
The idea being, linked data do not change from undo/redo.

This is valid as long as linked data was not changed by the undo step - but if some
was deleted or localized, it will be missing from oldmain, leading to data loss
(note that does not only concern objects, all linkable data types can be affected,
at least in theory).

This commit addresses that issue by carefully mixing reuse of needed data from oldmain,
and "normal" re-reading of missing one. Makes us swimming in some rather dark waters,
and gives a rather non-easy-to-follow code, but it seems to work quite well,
and only other solution would be to get rid of that optimization
(not re-reading all libs on undo/redo), which is not acceptable.

Also, thanks to @carlosdp for initial investigation of the issue.

Differential Revision: https://developer.blender.org/D1485
2015-10-12 12:15:05 +02:00
Campbell Barton e0c05a1e6a Support applying scale for font objects 2015-10-12 13:13:38 +11:00
Campbell Barton e302105981 Cleanup: RNA naming, use 'max' as a suffix 2015-10-12 12:31:55 +11:00
Campbell Barton eb6e8521c2 RNA: correct tips 2015-10-12 12:31:55 +11:00
Brecht Van Lommel 758febba45 Fix T46446: texture nodes image node not working with image sequences. 2015-10-12 03:22:43 +02:00
Campbell Barton c2ce38b102 Fix T46434: Shear w/ local-center & editmode fails 2015-10-12 12:02:22 +11:00
Campbell Barton 1b8a4fd9bd Fix T46444: Crash importing DAE w/ empty armature 2015-10-12 11:35:08 +11:00