Commit Graph

1007 Commits

Author SHA1 Message Date
34aa68f299 fix for using uninitialized boolean vars for mask select more/less 2013-08-06 03:45:11 +00:00
78d69a1e15 code cleanup: replace strcpy with BLI_strncpy for fixed size strings, and correct some harmless but incorrect sizeof() use 2013-08-04 18:12:49 +00:00
93f5e2218a code cleanup: replace strncpy -> BLI_strncpy, skip first 2 chars when making a hash from the object name. 2013-08-04 03:45:30 +00:00
e03b1668e0 code cleanup: remove unused functions
- IsectLLPt2Df
- isect_point_quad_uv_v2
- isect_point_face_uv_v2

These are obsoleted by resolve_tri_uv, resolve_quad_uv

also add attributes for unused function results for some math functions.
2013-08-01 17:15:11 +00:00
4982f200fa move alloca define into its own header since its not related to BLI_array 2013-07-28 10:38:25 +00:00
0cb9a83113 code cleanup: remove unused code 2013-07-27 18:17:19 +00:00
7c58ec9337 use math functions for copying matrix/vector types, also cast const pointers for freeing (clang error's out otherwise) 2013-07-26 10:43:23 +00:00
f77405356a remove use_relative option from simple deform,
all modifiers should be using object transformations relatively.
2013-07-23 19:31:49 +00:00
e50c37d90f code cleanup: remove deprecated bevel code (unused since 2.64) 2013-07-23 14:28:19 +00:00
6f8913b498 replave isfinite with finite for msvc 2013-07-23 07:40:07 +00:00
0682ade250 fix/workaround for crash in ocean modifier when size is zero (causes invalid array index/lookups). 2013-07-22 21:02:45 +00:00
003df3d2de fix [#36247] Modifier Ocean (Geometry in Displace)- Subdivision Surface
regression in 2.68
2013-07-22 20:53:52 +00:00
f4609acedc optimization: avoid memcpy with shake key vertex array. 2013-07-19 10:40:20 +00:00
922320f86e fix own regression [#36154] Simple deform modifier doesn't recalculate normals
get_cddm and get_dm are called within modifiers so they wont ensure normals are valid, added an arg to optionally ensure valid normals.
2013-07-16 08:24:53 +00:00
1dd7156c4c Fix #36058: Displace Modifier errors using a baked Image and displace baking inconsistency between 2.67/2.68RC and previous versions
This was in fact really nasty bug, caused by multitex_nodes
function using global variable R (which is a copy of current
renderer). this variable is not initialized to anything
meaningful for until first rendering (preview or final)
happened.

Since multitex_nodes might be used outside of render pipeline,
made it so whether CM is on or off as an argument to functions
multitex_ext_safe and multitex_ext. Now multitex_nodes() is
only shall be used for stuff happening from render pipeline!

Also needed to make some changes to other places, so all the
usages of texture sampling knows for the fact whether CM is
on or off.

And one more change is related on behavior of dispalcement,
wave, warp, weightvg modifiers and smoke. They'll be always
using CM off since texture is used for influence, not for
color.

It's rather bigger patch, but it's mostly straightforward
changes, which we really need to be done.

Reviewed by Brecht, thanks!
2013-07-15 14:47:58 +00:00
3c4c2478b6 fix for own regression, face index ranges still need checking in some places. 2013-07-14 23:41:33 +00:00
83a172e40c fix for case where negative index was used when rendering particles with UV's, also removed redundant array check. 2013-07-14 13:18:05 +00:00
1c15beb6b2 remove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every time in the file selector with a blank string. 2013-07-13 14:16:59 +00:00
8a40444d6b fix bad uses of sizeof() with memory allocation. 2013-07-13 05:43:35 +00:00
a7858767f4 fix [#35858] Weight Paint: Hiding faces isnt flushing the flag to the vertices. 2013-06-26 02:47:56 +00:00
fed8f76098 fix [#35795] Edge split modifier do not show result in viewport with curves.
caused by recent changes in normal calculation, however curves were not being very smart about calculating modifiers (calling unneeded re-tessellation for every modifier)
2013-06-19 08:19:36 +00:00
d4cbd78a79 fix for recent changes in solidify, normals were OK but customdata for loops wasnt. 2013-06-15 08:59:54 +00:00
9161a4daa5 fix for own error in recent solitify refactor (r57402), face flip check was incorrect. 2013-06-14 16:10:32 +00:00
69153c7089 ifdef bugfix since its a little strange. 2013-06-12 10:03:13 +00:00
31e667c10e solidify: dont add poly-normal layer to the derived mesh, since this is no longer a convention. 2013-06-12 09:35:02 +00:00
8e2e590484 fix [#35710] Mesh explodes while using solidify modifier with tubular non-manifold base mesh. 2013-06-12 08:24:31 +00:00
0b316d72ca change to solidify modifiers own normal calculation function, dont attempt to calculate normals for edges with 3+ face users. 2013-06-12 07:53:54 +00:00
293b3f0bdf optimize solidify, no need to do edgehash lookups, the edges are known. 2013-06-12 07:16:13 +00:00
d00ca6eb2c solidify: reduce sign conversions. 2013-06-12 06:51:02 +00:00
3994ad8ced solidify: remove BLI_array realloc's. 2013-06-12 06:20:24 +00:00
da733a25a5 correct solidify normal calculation logic
- always calculate vertex normals since they are used as fallbacks.
- only calculate rim normals if the normals are not already flagged as dirty.
2013-06-12 06:06:19 +00:00
67a5d1b660 Follow up to r57354: WeightVG and Wave modifiers too need to handle tex id refcount ;) 2013-06-10 18:12:07 +00:00
bfbac9b448 Fix #35678: Duplicating an object with Displace modifier does not increase the reference count of the texture 2013-06-10 14:04:03 +00:00
c423e3ed8f code cleanup: warn undefined compiler defines. 2013-06-08 05:24:55 +00:00
8a5e3a8425 fix [#35628] Dynamic paint waves over ocean modifier doesn't work
Caused by my recent normal calculation changes, added dependsOnNormals callback which was missing for ocean modifier (it assumed input normals were set).
2013-06-05 19:22:12 +00:00
e03bbcec65 fix [#35453] "copy mirrored uv coords" doesn't work
- made precision configurable.
- report a warning when doubles are found since they cause problems.

added Polygon.center attribute to avoid calculating in python.
2013-06-05 03:10:29 +00:00
790e9d9fa0 fix [#35311] Planar Decimate / Limited Dissolve fails to merge some adjacent faces
optionally limit by face flipping, also added support to delimit by material and edge crease.
2013-06-03 05:07:16 +00:00
dfad9b0c09 fix [#35555] Collada: export destroys mesh in some cases
add arguments to calculate normals when converting to bmesh:
  BM_mesh_bm_from_me, DM_to_bmesh

This gives some speedup to undo (which didnt need to re-calculate vertex normals), and array modifier which doesnt need to calculate face normals at all
2013-06-02 23:20:49 +00:00
ad0305281b fix [#35545] Weight paint with mirror modifier does not accurate represent bone influence 2013-06-02 22:40:45 +00:00
ec30e3f00e corrections to modifiers from recent normal handling changes
- solidify didn't define a dependsOnNormals callback (which it should have)
- build wasn't passing on dirty normals.
- decimate wasnt setting dirty normals.
2013-06-02 04:09:29 +00:00
e648ca8862 use booleans for modifiers and api callbacks. 2013-06-02 03:59:19 +00:00
075a910d72 fix regression in reducing normal recalculation [#35595],
pass the dirty-normal-state from the input dm to the output.
2013-06-02 00:20:26 +00:00
d7f51f83f6 remove CD_MASK_NORMAL from CD_MASK_DERIVEDMESH, bmesh merge included this but its not needed.
Now add asserts to make sure this layer is only added once the modifier stack has been calculated.
this saves normal layer being calculated whenver vertex normals need updating.
2013-05-30 18:09:19 +00:00
09e11ad6ef modifier stack: lazy initialize normals
many modifiers were calculating normals, when those normals were ignored by the next modifier.
now flag normals as dirty and recalculate for modifiers that set use `dependsOnNormals()` callback.

Quick test on mesh with 12 modifiers (mostly build type), calculated normals 6 times, now it only runs once - so this will give some speedup too.
2013-05-30 17:36:43 +00:00
9e05f6571f Make sure bool will always have the same size in C and C++
There were an issues with data structures defined in headers
and being used by both C and C++ on systems with stdbool
unavailable.

This happened because bool in this case will be defined as
unsigned int, which is 4 bytes. But C++'s bool is only 1
byte and this lead to alignment issues.

Now bool is always 1 byte, also made sure there's no situation
like bool foo = BitField & BitFlag, which could give overflow
issues. Use (BitField & BitFlag) != 0 instead.

Fixes #35553: Compositor broken (Backdrop & Preview)
2013-05-29 11:49:39 +00:00
225c5fee6b move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)
remove MEM_sys_types.h which was a duplicate.
2013-05-28 19:35:26 +00:00
a70fa65592 optimize mirror merging, remove array reallocation, replace with fixed size arrays. 2013-05-27 20:11:12 +00:00
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
28937676f3 fix for out of bounds memory access in solidify (harmless with guardedalloc padding but bad practice) 2013-05-25 00:22:04 +00:00
c4ee1f2658 Fluid simulation manual number of threads option now doesn't set the number
of threads to the number of cores when the fluid is created. Rather it is now
set to 0 which means "use the number of threads specified for the scene".
2013-05-21 11:37:42 +00:00