Commit Graph

86 Commits

Author SHA1 Message Date
f2acb10b6b edge hash: take an arg for the guarded-malloc string (as ghash does) 2013-08-24 13:08:55 +00:00
c46cbc602e Make lattice deform safe for threading
Lattice deformation used to store some runtime data
inside of lattice datablock itself. It's something
which is REALLY bad. Ideally DNA shouldn't contain
and runtime data.

For now solved it in a way that initialization of
lattice deform will create a structure which contains
lattice object for which deformation is calculating
and that runtime data which used to be stored in
lattice datablock itself.

It works really fine for mesh deform modifier, but
there's still runtime data stored in particle system
DNA, It didn't look something easy to be solved, so
leaving this as-is for now.

--
svn merge -r58277:58278 -r58795:58796 ^/branches/soc-2013-depsgraph_mt
2013-08-19 10:11:48 +00:00
e648ca8862 use booleans for modifiers and api callbacks. 2013-06-02 03:59: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
afb4b65167 Random number generator: replace a bunch of usage of the global random number
generator with a local one. It's not thread safe and will not give repeatable
results, so in most cases it should not be used.

Also fixes #34992 where the noise texture of a displacement modifier was not
properly random in opengl animation render, because the seed got reset to a
fixed value by an unrelated function while for final render it changed each
frame.
2013-04-15 23:12:40 +00:00
e3944f5bfa Divide by 3 instead of multiplying by variations of 0.333
Fixes small precision problems.
2013-02-14 17:35:43 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
a1856a38f6 minor improvement to vector api use, replace add, multiply by 0.5 with mid_v3_v3v3 2012-10-30 14:22:49 +00:00
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
3fab39f76f style cleanup: modifier structs 2012-10-24 05:45:54 +00:00
d599b643b7 style cleanup: bge, switch statements mostly.
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
318b44fe5d Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
2012-05-09 15:00:26 +00:00
3d8e58751c style cleanup: modifiers 2012-05-06 13:38:33 +00:00
299ff91ea1 code cleanup: BKE_scene api naming.
also stop numpy from being found in /usr/include with cmake.
2012-05-05 14:33:36 +00:00
933b3166fc style cleanup: guys - set your editors to tabs! 2012-05-01 17:51:03 +00:00
60c9addf79 - improve select grouped prefix/suffix from recent patch
- added select similar direction (Y axis)
2012-04-30 08:24:44 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
670cdd5381 code cleanup:
always use if (...) even if the macros dont require it (confuses parsers)
  define macros without the ';'s included.
2012-04-02 02:41:28 +00:00
c9e1ced4dd code cleanup: (dont include ';' in defines), last commit also missed changes to paint_image.c 2012-03-28 01:06:43 +00:00
5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
1362523ce6 CDDM_calc_edges_tessface was being called twice for boolean and explide modifiers, now leave it up to the caller to run. 2012-03-20 00:59:51 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
c956e5d2d9 modified fix for "Fix [#30351] Solidify Modifier High Quality Normals fails." from r44464.
rather then recalc polygon normals - solidify is simple enough to just flip the normals of the copied faces, the rim faces normals are already re-calculated so copy them.
2012-02-26 18:12:01 +00:00
2d1a05874b svn merge ^/trunk/blender -r44024:44076 2012-02-13 04:14:35 +00:00
39daef28a1 Bug fix: Explode modifier created invalid faces if "unborn", "alive" or "dead" setting was unchecked
* Exploded faces that were meant to be hidden were still created with invalid vertices (0,0,0,0).
* In normal cases this went unnoticed, but for example edge split modifier crashed when it encountered these faces.
2012-02-12 16:47:03 +00:00
1b505e6d1b replace CDDM_calc_normals_mapping with CDDM_calc_normals when used within modifiers.
this way modifiers wont be calculating tessface's which CDDM_calc_normals_mapping will do if not already calculated.
2012-01-20 13:25:54 +00:00
be1bc0eb98 rename
* CDDM_calc_edges --> CDDM_calc_edges_tessface
* CDDM_calc_edges_poly --> CDDM_calc_edges
2012-01-06 02:59:28 +00:00
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
7fd67392eb added a function to ensure derived mesh has tessface's, in preparation for removal of tessface recalculation after each modifier runs. 2012-01-05 12:40:09 +00:00
8d8403c15e for modifiers that are stull creating MFaces - call CDDM_tessfaces_to_faces rather then making an entire copy with CDDM_copy(result, 1) 2012-01-03 15:28:53 +00:00
b64f352270 svn merge ^/trunk/blender -r43033:43062 2012-01-02 02:57:36 +00:00
1b4487e813 Fix [#29728] Explode Modifier Causes Crash.
The problem was in fact in recent BLI_edgehash changes: a typo in the new macro EDGE_ORD made v0 > v1, instead of v0 < v1. This caused the bug in explode modifier, which (ab)uses that ordering feature a bit…
2011-12-31 15:10:38 +00:00
c174f5682c syncing modifiers with trunk - only small changes 2011-12-29 04:04:27 +00:00
ff2eb8d72f svn merge ^/trunk/blender -r42914:42918 2011-12-28 10:27:25 +00:00
2e92b14bc6 copy BLI_edgehash changes from bmesh branch, main change is use of mempool. 2011-12-28 10:20:37 +00:00
e936c78251 svn merge ^/trunk/blender -r41503:41575 2011-11-06 10:38:44 +00:00
723484ec06 Removed old "bsystem_time()" function, which by now is just a
duplicate of BKE_curframe() which just takes two extra args.

For the few calls in the physics engine where CFRA+1 instead of CFRA
was being used, I've added a new BKE_nextframe() call, which will
calculate for CFRA+1 instead of CFRA in much the same way that
bsystem_time() would end up doing things (which means including
subframe steps).
2011-11-06 06:08:18 +00:00
735ab2b22d fix for crash in explode modifier. 2011-11-04 00:27:18 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
8695bedda2 svn merge ^/trunk/blender -r40644:40720 2011-10-06 16:59:58 +00:00
35f881b44d Commented and tagged some unused vars, added some var init (gcc warnings...) 2011-09-28 15:22:13 +00:00
4a157de23d svn merge ^/trunk/blender -r40587:40643 2011-09-28 07:34:48 +00:00
018fa1540e whitespace edits, make formatting for functions consustent at least within the file. 2011-09-28 05:53:40 +00:00
55a560c0c4 svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-08-16 06:30:14 +00:00
c265a686d8 Modifiers: add callback to loop over each texture assigned to a modifier. 2011-08-12 18:11:22 +00:00
a7815053ef svn merge -r37600:37700 https://svn.blender.org/svnroot/bf-blender/trunk/blender
manually merged source/blender/editors/uvedit/uvedit_unwrap_ops.c
2011-07-25 12:59:54 +00:00