Commit Graph

46976 Commits

Author SHA1 Message Date
Bastien Montagne
138c9dba9b Add Custom Loop Normals.
This is the core code for it, tools (datatransfer and modifier) will come in next commits).
RNA api is already there, though.

See the code for details, but basically, we define, for each 'smooth fan'
(which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal),
a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store
custom normal as two angular factors inside that space. This allows to have custom normals
'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer.

Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals,
and be converted back into storage format at the end.

Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can
be rather heavy with high poly meshes.

Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-02-05 14:32:57 +01:00
Bastien Montagne
7bae9ee6b6 Mesh validate: add an option to not clean temp/cache CDLayers.
This is mandatory for incoming custom normal imports from io scripts, because
often geometry here is corrupted, so we need to call mesh.validate() to clean it up.

Issue is, we cannot set custom normals before geometry is clean, so we need to store
temporary plain loop normals in a CD_NORMAL layer, validate, and then set custom normals.
So we need a way to prevent 'temp' lnors to be freed by validate.
2015-02-05 14:03:01 +01:00
Bastien Montagne
e442b9916e BLI_math vectors: add minmax_v3v3_v3_array to get min and max values on each components of an array of 3D vectors. 2015-02-05 14:00:58 +01:00
Bastien Montagne
0527fc5fb8 Fix T43566: Missing update event for VSE
VSE was missing NC_ANIMATION | ND_KEYFRAME events.
Also need to invalidate cache on those, else keyframe editing do not get reflected in VSE preview!
2015-02-05 11:54:47 +01:00
Nicholas Bishop
e922903ae8 Use MAX_CUSTOMDATA_LAYER_NAME for size of GPUInput.attribname array
Before this was hardcoded to 32, which I think was incorrect because
this is used to store a customdata layer name.

Reviewers: psy-fi, campbellbarton, sergey

Reviewed By: campbellbarton, sergey

Differential Revision: https://developer.blender.org/D1040
2015-02-05 11:20:24 +01:00
Campbell Barton
343ddc52dc UI: UVWarp-Modifier had duplicate names
D1047 by @lichtwerk
2015-02-05 19:30:02 +11:00
Campbell Barton
57e1a5373f Fix T43531: Wrong object center-dot color
Write objects center point to the nearest depth.
2015-02-05 17:01:58 +11:00
Bastien Montagne
4e27f63828 Fix T43560: crash when loading old (2.45 here) file whith multires.
Was trying to free a NULL pointer...
2015-02-04 21:43:01 +01:00
Bastien Montagne
37ae32870e Fix T43567: Freestyle On/Off keyframe is being ignored.
That kind of stuff shall not be animated! :)
2015-02-04 21:21:45 +01:00
Kévin Dietrich
ac2f608fa3 Fix T43450: Texture node tree failed to clamp
Clamping routine was not implemented. This fixes T43450.

Reviewers: #nodes, #rendering, sergey

Reviewed By: sergey

Maniphest Tasks: T43450

Differential Revision: https://developer.blender.org/D1038
2015-02-05 01:20:35 +05:00
Antony Riakiotakis
363a044b4c Sequencer, scaling and audio synch
Don't scale proxies, same as we do in gooseberry, also for sound synch
give a small window around sound where frame is just pushed forward.
Avoids video jumping in the cases when video renders faster than sound
(yes, weirdly enough it happens sometimes). There might be a few jumps
but results looks smoother here.
2015-02-04 20:38:56 +01:00
Dalai Felinto
035d14c029 small typo in a code comment, fixing this before someone does it to prevent uneeded merge conflicts in branches 2015-02-04 17:19:40 -02:00
Gaia Clary
a78a17bad5 Fix T43366 export/import materials inconsistent 2015-02-04 19:07:28 +01:00
Antony Riakiotakis
f75d2fdd24 Port fix from gooseberry that doesn't load the full res file if a proxy
is requested.
2015-02-04 18:48:55 +01:00
Campbell Barton
4339caf7cb Cleanup: name flip x/y 2015-02-05 03:56:24 +11:00
Bastien Montagne
292444e3f5 RNA image.pack(): fix possible memleak, add possibility to pass raw bytes data.
Note passing data assumes user knows what he is doing, else segfault is guaranted
(there is no good ways to pass raw bytes data to RNA func currently, and using
int array is way too heavy in this case).

And image->packedfile was never freed...
2015-02-04 15:40:28 +01:00
Antony Riakiotakis
fe03bc2a02 Support rotation and flipping for background images, patch by Andre D.
(T34583) with minor changes. Thanks for the patch!
2015-02-04 15:05:36 +01:00
Sybren A. Stüvel
32482aadb8 BGE physics: allow higher values for maxlogicstep and maxphystep
Increasing those values beyond 5 is important for exact physics
simulation. Soft limit is increased to 50, hard limit to 10000.

To be able to set different values for hardlimit and softlimit,
RNA_def_property_range needs to precede RNA_def_property_range, hence
the swapped order.
2015-02-04 14:16:10 +01:00
Joshua Leung
810c7ee825 Fix T43552: Cannot jump between GP keyframes in dopesheet 2015-02-05 00:04:46 +13:00
Sergey Sharybin
66eacc2abb Fix for recent LANG locale workaround
Need to get a copy of the string since stored pointer is affected
by subsequent calls of setlocale().
2015-02-04 16:02:47 +05:00
Sergey Sharybin
3b0c4d888c GLSL: On some cards '>' can't operate on 'float' and 'int'
So make it so comparison doesn't imply type-cast.
2015-02-04 15:54:42 +05:00
Sergey Sharybin
d16ac1e152 Compositor: Code cleanup, trailing whitespace and wrapping 2015-02-04 13:04:09 +05:00
Sergey Sharybin
1dddcfbaff Compositor: Implement sampled motion blur for plane track deform node
Quite striaghtforward change, and in theory we can even try supporting motion
blur for the corner pin node (which is tricky because coordinates actually
coming from sockets, but with some black magic should be doable).
2015-02-04 01:17:59 +05:00
Campbell Barton
c69458985c Hook Modifier: add falloff & radius options
- Add falloff types & curves (matching warp-modifier)
- Add uniform scale option,
  important when adding hooks to non-uniform scaled objects,
  especially for use with lattice objects which can't avoid uneven scaling.

  This uses relative transformation set when the hook is assigned,
  when measuring the distances.
2015-02-04 07:16:20 +11:00
Campbell Barton
a66a54c06d New Hook's now use the objects center
When adding a hook to an existing selected object/bone,
Use the location for the hook (instead of the selected vertices).
2015-02-04 07:16:20 +11:00
Bastien Montagne
37a08ae5c5 UI messages: minor fixes... 2015-02-03 20:25:14 +01:00
Campbell Barton
c2f6a07531 Fix possible (unlikely) buffer overrun
Translated strings didn't check fixed length for PET id's
2015-02-04 05:51:48 +11:00
Campbell Barton
02acfdab9e Add inverse-square blending for PET and warp
Similar to 'Root' but without noticeable spike/pinch in the center.
2015-02-04 05:45:30 +11:00
Ines Almeida
15cd222270 BGE: python API initialization cleanup
The goal of these changes is to Close T40132 and to get rid of the 'PyRun_SimpleString'

Hilighted changes are:
- consistent naming and initialization of BGE submodules
- initialization of the 'bge' module as a proper module
- using PyDoc_STRVAR instead of static char*
- generic cleanup (unused arguments, logica ordering, naming and whitespace)

Reviewers: campbellbarton

Maniphest Tasks: T40132

Differential Revision: https://developer.blender.org/D983
2015-02-03 15:32:55 +00:00
Ines Almeida
2699866720 BGE: python API cleanup - initialization for bge with submodules, closes D615 2015-02-03 15:32:55 +00:00
Ines Almeida
0e0af4f772 BGE: python API cleanup - adding proper initialization to GameTypes 2015-02-03 15:32:55 +00:00
Ines Almeida
e67bd30bdf BGE: python API cleanup - replace BLI_program_path with BKE_appdir_program_path 2015-02-03 15:32:55 +00:00
Ines Almeida
ba0978c1a9 BGE: python API cleanup - bge submodules definitions 2015-02-03 15:32:54 +00:00
Ines Almeida
a7b0330c13 BGE: python API cleanup - using PyDoc_STRVAR instead of static char*
Cherry-picking d503f8a onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
Ines Almeida
95425bc97a BGE: python API initialization cleanup
-Removing unused parameters
-Updating some parts to match bpy_interface.c initialization

Cherry-picking 14fceb6 onto 117edbb
Conflicts:
	source/gameengine/Ketsji/KX_PythonInit.cpp
2015-02-03 15:32:54 +00:00
Antony Riakiotakis
c48c20b498 Fix T43530 using blender on remote connection crashes
Issue here is that remote connection will use OpenGL 1.1.
There was a call here that would free VBOs always without a check,
however the VBO free function pointer is NULL on such contexts causing a
crash.

This must have been causing some of the crashes with old contexts. While
I think supporting those systems is not such a good idea in general,
they can have a few more moments of support I guess.

Things might be better now for systems using OGL 1.1 though there are
still things that could be done better here - for instance going to
dyntopo can crash immediately because we don't have a fallback
implementation there. It might be worth reimplementing sculpting with
vertex arrays for the legacy case too, but I guess if we move on to
OpenGL 2.1 soon this is a bit of a wasted effort.
2015-02-03 16:18:19 +01:00
Antony Riakiotakis
3ff9e52dca Fix T43380 modulo operation in GLSL does not return negatives.
Make it so by checking operand sign.
2015-02-03 15:08:42 +01:00
Sergey Sharybin
8186214c39 Fix T43514: Environment map doesn't update 2015-02-03 18:52:01 +05:00
Joshua Leung
a01501443b Bugfix T43541: Inserting keyframes using sliders in Action Editor doesn't respect NLA time remapping 2015-02-04 02:22:57 +13:00
Sergey Sharybin
445eed8e38 Fix T43403: Compositor does not respect interlaced video
This is actually issue with Image datablock, which had obscure Fields settings
but didn't allow to de-interlace the video.

Now added the option to de-interlace Image with Movie input type.
2015-02-03 18:17:12 +05:00
Sergey Sharybin
701a7dcc87 Fix T43544: Runtime Error when Locale is not valid
This is not a real fix and only prevents crash, textures IO might be not
working totally correct if they're unicode path or so. Proper solution
would be to detect which locale we can use and set LANG, LC_ALL and friends.
2015-02-03 17:36:15 +05:00
Campbell Barton
1667e68797 Revert "Keep mingw specific includes ifdef'd"
This reverts commit ba8b9ae307010ee5e8e43c6afc4c9d0571c2bf73.

Turns out this is needed on other systems, just happened to be indirect included on them.
2015-02-03 23:24:31 +11:00
Campbell Barton
ba8b9ae307 Keep mingw specific includes ifdef'd 2015-02-03 22:54:57 +11:00
Antony Riakiotakis
7345d558f9 MinGW64 complains about clock, include time.h 2015-02-03 12:31:51 +01:00
Campbell Barton
488b342741 BMesh: optimize selection flushing
De-selecting a face would do flushing checks on each vertex 3 times, now only do once.
2015-02-03 19:59:39 +11:00
Campbell Barton
af2d75b9a7 cleanup: inconsistent BMesh select checks 2015-02-03 19:08:25 +11:00
Campbell Barton
faaaf7ee1f Possible NULL de-reference on fullsceen check
Also quiet some other minor warnings
2015-02-03 16:42:22 +11:00
Campbell Barton
32125c40d3 Fix own mistake unlinking text (recent commit) 2015-02-03 16:39:32 +11:00
Campbell Barton
75249259f4 BMesh: optimize edge select
It's called a lot, so avoid using a generic iterator for edges of vert.
2015-02-03 09:33:04 +11:00
Campbell Barton
052a021711 cleanup: indentation & redundant casts
also use 'const' bucket rect args
2015-02-03 09:33:04 +11:00