Commit Graph

280 Commits

Author SHA1 Message Date
841c50b5e2 Fix for [#25526] Inmediate crash when changing amount of particles in a particle system
* Point cache index array doesn't necessarily have all particles if the particles were re-allocated recently.
2011-01-07 10:38:17 +00:00
5f64450726 remove assignments which are unused. 2011-01-06 01:29:13 +00:00
fe44c6596d Small changes to new pointcache code:
* Removed the unused fuctions spotted by Campbel.
* Removed the gotos to make Ton happy.
* Added better debug prints to disk cache operations.
* Fixed a memory unmap error that seemed to happen on a test file.
2011-01-02 18:10:33 +00:00
7b865b5ce8 Crash fix for pointcache... bad goto's here. 2011-01-02 13:57:06 +00:00
8c86d2da3a Quiet warnings from last commit.
Janne: could you check if ptcache_file_pointers_seek() & ptcache_read_init() can be removed?
2011-01-02 10:13:17 +00:00
a6a2512f47 Pointcache code cleanup and disk cache compression options:
* Massive reorganization of pointcache code, things are now cleaner than ever.
* For all but smoke the cache is first written to memory when using disk cache and after that written to disk in one operation. This allows less disk operations and the possibility to compress the data before writing it to disk.
* Previously only smoke cache could be compressed, now the same options exist for other physics types too (when using disk cache). For now the default compression option is still "no compression", but if there aren't any problems this can be set to "light compression" as it's actually faster than no compression in most cases since there's less data to write to the disk. Based on quick tests heavy compression can reduce the file size down to 1/3rd of the original size, but is really slow compared to other options, so it should be used only if file size is critical!
* The pointcache code wasn't really 64bit compatible (for disk cache) until now, so this update should fix some crashes on 64bit builds too. Now all integer data that's saved to disk uses 32 bit unsigned integers, so simulations done on 64bit should load fine on 32bit machines and vice versa. (Important disk cache simulations made on 64bit builds should be converted to memory cache in a revision before this commit).
* There are also the beginnings of extradata handling code in pointcache in anticipation of adding the dynamic springs for particle fluids (the springs need to be stored as extradata into point cache).
* Particles were being read from the cache with a slightly wrong framerate. In most cases this probably wasn't noticeable, but none the less the code is now correct in every way.
* Small other fixes here and there & some cosmetic changes to cache panel, but over all there should be no functional changes other than the new disk cache compression options.
* This whole re-organization also seems to fix bug #25436 and hopefully shouldn't introduce any new ones!
2011-01-02 06:52:47 +00:00
b0f87a1746 rename addlisttolist() to BLI_movelisttolist()
name was misleading because the list items were removed from the source list.
(no functional changes)
2010-12-21 14:49:34 +00:00
d920bf5072 Mistake in previous own commit, checking the wrong cache frame. 2010-12-18 21:16:37 +00:00
b58dbbd51b Extreme makeover of pointcache code:
* Pointcache code was quite ugly looking and complicated, so here are mostly just cosmetic adjustments, but some improved logic also.
* Slight cleanup of pointcache ui too.
* Shouldn't have any functional changes what so ever, so poke me right away if something seems off.
2010-12-18 15:03:31 +00:00
a934116298 Fix for [#25282] Crash when weting initial mesh pressets with a smoke simulation 2010-12-18 09:46:52 +00:00
902b239aa8 no functional changes: SETLOOPER macro assumed a scene was defined called 'sce' used to loop over, now make this an argument, helps to make it clear what's going on. 2010-12-17 15:37:59 +00:00
6b2b56c35e Fix for [#25218] No smoke is emitted when particle system starts and ends on same frame
* Depsgraph wasn't updated properly for smoke flow collision object dependencies.
* Smoke also wasn't properly using the actual emission frame of the flow particles.
* There was a lot of bloated logic in some parts of particle code so this fix turned into a small scale cleanup operation.
** As a result particle updating and cache usage should be a bit more stable too.
2010-12-15 17:05:34 +00:00
40af167b09 Bug fix: normal (from particles) child particles didn't use the rough parameters properly
* Also child particles didn't do particle trail properly.
2010-12-08 11:02:56 +00:00
1a8665ac45 Fix for [#25079] Duplicating object with particles system on it make Blender crashs
* pointcache->cached_frames wasn't set to NULL when copying pointcaches
* also set pointcache->edit to null just in case
2010-12-07 22:17:58 +00:00
b110c7c8f2 Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next
redraw. For objects the update was already delayed, just flushing wasn't
yet.

This should help performance in python and animation editors, by making 
calls to RNA property update quicker. Still need to add calls in a few
places where this was previously avoided due to bad performance.
2010-12-05 18:59:23 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00
b45c3363fd fix for some pedantic warnings. 2010-12-03 01:52:28 +00:00
ad0dd98f26 fix for some mistakes in recent commit. 2010-12-01 02:40:13 +00:00
17cd5811e7 Smoke now uses only one point cache where both normal and high resolution smoke are stored together:
* Separate caches were causing quite a lot of problems both in principle and practice.
* For example it doesn't really make sense to have different frame ranges for normal and high resolution smoke, but this was fully possible before.
* Also to fully bake the smoke you had to do a "Bake All Dynamics", which completely defeats the whole point of the feature!
* As a result of this change the smoke cache usage is much much simpler and less error prone.
* This is quite a big change, but hopefully there should be less rather than more problems as a result :)

Some other related changes:
* Changing the cache name now works for disk caches properly too, it now just renames the cache files so should be faster too!
* Smoke is now always forced to disk cache with step 1 on file load as there were some strange cases where smoke was trying to use memory cache.
* Disabled smoke debug prints from console.
* Disabled changing smoke parameters when smoke is baked.

Note to users: The unfortunate side effect of this is that old high resolution simulations have to be baked again, but in return you get much better and more logical functionality. Sorry none the less!
2010-11-30 21:31:18 +00:00
22b3f2228f Possible fix for the issue that came up in [#24890] Vector Blur node is Buggy
* Apparently some compilers don't respect proper operator precedence, so added some parentheses around to make inline conditionals unambiguous.
2010-11-25 11:38:55 +00:00
f15187cfcd Fix for [#24597] Option External in Smoke cache affects settings of start and end frame of simulation
* Don't change anything in the pointcache unless a valid external cache is found.
2010-11-08 11:19:53 +00:00
8bbf27dfbd Temporary fix for "freezing when pointcache is baked":
* WM_timecursor is broken somehow, so pointcache baking makes the cursor disappear.
* For user this seems like blender has frozen although it's just a matter of no progress indication.
* This fix just sets the default "busy" cursor for the whole duration of baking and reports progress in the console.
* If there's and easy fix for this then it should probably be done straight away, but I want to re-implement baking using the job system soon anyways, so a proper fix for this is not strictly necessary.
2010-11-04 20:17:38 +00:00
fe8d5b81b0 use c90 compatible static initializers. 2010-11-03 06:31:53 +00:00
130088300b Fix for [#24501] Apeend object with cloth sim from another file crash. 2010-11-02 15:21:43 +00:00
4d37cf90b9 remove G.sce, use G.main->name instead.
Both stored the filename of the blend file, but G.sce stored the last opened file.
This will make blender act differently in some cases since a relative path to the last opened file will no longer resolve (which is correct IMHO since that file isnt open and the path might not even be valid anymore).

Tested linking with durian files and rendering to relative paths when no files is loaded however we may need to have some operators give an error if they are used on the default startup.blend.
2010-10-18 06:41:16 +00:00
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
d3bf6b7224 Fix for [#24237] Hair dynamics with zero particles generates a segmentation fault 2010-10-14 09:01:03 +00:00
8a4fe62843 misc fixes found with clang's static checker. 2010-10-07 10:04:07 +00:00
20d0236f10 Fix for [#24134] pointcache memory error (crash) 2010-10-06 07:57:55 +00:00
636e555ec2 Fix for [#24118] Hair particles can not be edited
* Own mistake from a previous fix.
2010-10-04 08:48:50 +00:00
30bd26d435 [#24028] Minor fixes to BLI_math_vector
+ minor warning fixes.
2010-09-28 11:48:13 +00:00
92fd0680cb Fix for [#23732] Smoke / load external cache doesn't work 2010-09-28 10:04:41 +00:00
8d50b283cb Fix for own recent commit 32147
* Pointcache wasn't checked to be valid before allocating the cached frames array
2010-09-28 09:27:35 +00:00
12be522cbe Fix for [#24031] Baked Physics with Phsics set to NO can't be freed
* Should fix the cause ("no physics" gets baked) and old files that are effected (ui allows freeing if cache isn't really used)
2010-09-28 08:47:59 +00:00
afa4b855ca Fixed: Showing pointcached frames in the timeline was terribly slow when using disk cache.
* The existence of cached frames was checked each frame causing hundreds of disk operations per frame update.
* Pointcache now keeps an updated array of the cached frames for fast "frame exists in cache" queries.
* This fix also speeds up some other pointcache operations nicely.
2010-09-27 09:58:37 +00:00
baadd70ea1 Fix for [#23794] Particle System + FS Motion Blur corrupts some frames and possibly cache 2010-09-14 12:17:09 +00:00
0738ae7688 2.5: more removal of G.main. 2010-08-13 14:23:44 +00:00
15669532a2 header re-shuffle, some headers contained unneeded refereces to other headers, better include inline with the C files that need them 2010-08-10 05:41:51 +00:00
5fa7d1c1b4 2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
2010-08-01 12:47:49 +00:00
f24bcc689c bugfix [#22988] Duplicating Lights by Frame Causes Hangup 2010-07-24 02:51:51 +00:00
6b6cdbe322 pointcache support for relative external paths with the useual // prefix as well as library path option. 2010-07-14 07:47:03 +00:00
9cbbc9d3af rename some rna properties filename --> filepath
* filename == "foo.ext"
 * filepath == "/path/to/and/including/foo.ext"

this was alredy followed in some places not not everywhere.
2010-06-02 17:58:28 +00:00
88743740b8 dont use a thread for baking in background mode, its not really any advantage since it starts a single thread that runs a loop. 2010-05-18 14:38:25 +00:00
aaa7c493e4 merge of last commit to trunk 2010-05-11 20:06:20 +00:00
3409eb429e fix for crash reading pointcache, was reading over the buffer size, use lzo1x_decompress_safe rather then lzo1x_decompress 2010-05-11 19:37:17 +00:00
c8a0592288 option to use the linked path or the local path for pointcache.
needed for sintels hair to be baked locally.
2010-05-06 17:12:44 +00:00
23ccac18cd Fix [#22199] Cloth Cache Panel > Disk Cache doesn't work
Condition for this to work (.blend file must be saved) was poorly communicated 
in the UI (printfs are no good for this - ideally should use reports). Tweaked this a bit.
2010-05-03 03:02:27 +00:00
08c3bfdfaf NULL check for pointcache. not sure this should be fixed elsewhere, commented this needs further checking. 2010-04-29 17:57:17 +00:00
33acae1a15 only override start and end frames with particle's if the partices are emitters. Was very confusing for hair baking. 2010-04-22 16:23:44 +00:00
f7717b2e80 option to use curve point weights to influence particle effectors. 2010-04-21 11:59:47 +00:00