Commit Graph

351 Commits

Author SHA1 Message Date
47c373c7a9 style cleanup (mostly whitespace) 2012-02-27 10:35:39 +00:00
2ea8a3b8ca remove CDDM_copy second argument, added CDDM_copy_from_tessface instead.
this function caused too many conflicts and in most cases was zero anyway.
2012-01-29 21:59:47 +00:00
870aa90112 svn merge ^/trunk/blender -r43733:43751 2012-01-29 21:49:49 +00:00
d7b9fdc2f6 Dynamic Paint:
* Fix: Brush didn't paint particles that were hidden by the display percentage setting.
2012-01-27 17:44:56 +00:00
d3090a32f2 svn merge ^/trunk/blender -r43664:43676 2012-01-24 20:19:09 +00:00
e6e88ff7c1 Dynamic Paint:
* Converted some more functions to use mpolys/mloops instead of tessellated faces.
* Fixed some bmesh related issues.
2012-01-24 18:29:01 +00:00
8f7762c356 Dynamic Paint:
* Fix: Substep update failed if brush was parented to a canvas vertex. Now substeps are ignored in such case.
* Fix: Wave "open borders" option didn't work for image sequence format.
* Fixed a possible crash after changing surface format to image sequence.
* Some code cleanup.
2012-01-24 17:28:50 +00:00
92aa15805d BMesh: Fix for previous own fix (re-enable DynamicPaint previews in Object mode).
In fact, we have to add a CD_WEIGHT_MCOL layer (if not yet present) when updating CD_WEIGHT_MLOOPCOL, else with modifiers modifying the topology (like subsurf), it will sigsev.

That step should probably be done at tesselation time, though…
2012-01-23 17:17:08 +00:00
6c9438ea8a BMesh: Fix (re-enable) DynamicPaint previews in Object mode.
Also simplifies DM_update_weight_mcol: no need to update CD_WEIGHT_MCOL here, as it is anyway recreated from CD_WEIGHT_MLOOPCOL at tesselation time. Only commented out code for now.
2012-01-23 16:32:11 +00:00
a63efc00cc svn merge ^/trunk/blender -r43611:43616 2012-01-22 20:15:05 +00:00
6eb0ca9385 Merged with trunk (-r43609:43611): updated modifier preview.
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
2012-01-22 20:05:26 +00:00
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
1a93d88343 Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!

Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.

Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).

So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
2012-01-22 17:54:23 +00:00
a98a75346c quiet warnings and possible NULL checking crash fix for indentation functions. 2012-01-20 23:03:41 +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
a31d1132e8 Minor code enhancement (replace for loops with while's, and avoid multiple checks to get good face vertex index). No functional changes. 2012-01-19 19:09:59 +00:00
330da356da svn merge ^/trunk/blender -r43524:43530 2012-01-19 16:30:56 +00:00
25a5915650 Dynamic Paint:
* Added "Project" option also for "Volume + Proximity" brush type.
2012-01-19 11:13:41 +00:00
bbe69705a5 svn merge ^/trunk/blender -r43420:43436 2012-01-17 02:20:23 +00:00
67b2985cce comment unused var 2012-01-17 02:07:38 +00:00
4d9197866b Dynamic Paint:
* Added per surface options "influence scale" and "radius scale" for tweaking brush settings individually for each surface.
* Added option to completely disable drying. This should be nice for indefinitely spreading paint etc.
* Improved paint mixing algorithm.
* "Paint effects" now work in relative mesh space instead of global. This means that effect speed remains same for identical shapes regardless of their size.
* Complete rewrite of "spread effect" algorithm. It now works much better in all test cases done. Old algo sometimes produced artifacts and stopped spreading too early.
* Adjustments / rewrite on some parts of dripping algorithm to make it work better with transparent paint.
* Added a new "color dry" setting. It can be used to define wetness level when paint colors start to shift to surface "background". Lower values can be useful to prevent spreading paint from becoming transparent as it dries, while higher (default) values give better results in general.
* Fix: If multiple displace/wave surfaces were used simultaneously, displace was applied using wrong normal.

Please note that due to these changes in "paint effects" system older save files may require some tweaking to match results from previous versions.
2012-01-16 17:18:07 +00:00
917714acf7 svn merge ^/trunk/blender -r43345:43381 2012-01-15 09:16:39 +00:00
d14ac69c8c ensure functions are not used within FTOCHAR macro since they run 2-3 times.
brushes were doing curve lookups within this macro for example.
2012-01-14 10:33:16 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
fbc4846a6e dynamicpaint had some incorrect string sizes for layers names, use BLI string functions in more places too. 2012-01-11 12:56:31 +00:00
e10fd04db0 use BLI_strncpy and BLI_snprintf when the size of the string is known.
fix for sequencer unique naming which was missed with string length update.
2012-01-11 12:33:51 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
78a4e24614 svn merge ^/trunk/blender -r43009:43033 2011-12-31 12:03:36 +00:00
0f2f2fe1a8 Dynamic Paint:
* Fix: Smudge and brush velocity settings didn't work for "image sequence" surfaces unless any paint effect was enabled.
* Adjusted some property ranges.
2011-12-31 10:28:36 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
74a1123059 Quite some compiler warnings... 2011-12-17 16:22:08 +00:00
ea6de7626e removed some bmesh todo comments which are not needed and minor edits on previous commit. 2011-12-08 00:28:42 +00:00
d97f88d278 svn merge ^/trunk/blender -r42426:42439 2011-12-05 17:54:33 +00:00
c9eb206c06 Fix: Dynamic Paint sub-steps didn't work for constraint controlled brush objects. 2011-12-05 13:36:41 +00:00
15ad39e684 svn merge ^/trunk/blender -r42303:42329 2011-12-02 01:01:07 +00:00
fa3c345dfa dynamic paint, possible use of uninitialized value - fix. 2011-12-01 18:49:42 +00:00
89e390f28f Dynamic paint vertex color output now works with bmesh.
3D view preview still doesn't work because the used CD_WEIGHT_MCOL data layer isn't yet generated properly during poly tessellation.
2011-11-30 20:41:13 +00:00
df5af02dec svn merge ^/trunk/blender -r42290:42292 2011-11-30 10:07:04 +00:00
d24bbba150 dynamic paint
- replace inline code with existig defvert_find_index()
- use madd_v3_v3fl() func and remove redundant normalize call.
2011-11-30 10:04:14 +00:00
eb46f6bf0d More DM func renames, this one includes renames of the function pointer members of the DerivedMesh struct 2011-11-29 13:01:51 +00:00
2022580ce1 svn merge ^/trunk/blender -r42194:42197 2011-11-27 23:56:29 +00:00
a2e1060862 quiet some warnings and logical errors.
- curve map insert point had a nested loop which used the same value to index different arrays.
- dynamic paint used ternary operator where both outcomes were the same.
2011-11-27 23:41:01 +00:00
3b5bcab09c svn merge ^/trunk/blender -r42139:42172 2011-11-26 16:29:14 +00:00
af7288c407 minor edit - weight_to_rgb() and ramp_blend() now take a float vector rather than 3 float pointers.
also make particle draw use a float vec.
2011-11-26 03:13:54 +00:00
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
2345efc6c5 Patch #29336: renaming UV (Texture) Layer to UV Map in the user interface,
by Gaia Clary.

Rationale: the name was confusing and not always used consistently, and this
map itself is not something that can be layered, rather the map can be used
as texture coordinates in some layered setup.

The original intent was to indicate this contained more than just UV's, but
the game engine settings have already been moved out, and apparently users
didn't really get this from the name anyway.
2011-11-23 17:25:25 +00:00
f9e00b5c99 svn merge ^/trunk/blender -r42009:42053 2011-11-22 11:51:42 +00:00
fd742566a6 - use cache_ as a prefix for new modifiers.
- some comments to recent image changes.
2011-11-22 10:04:28 +00:00
743d2f8c0f rename image type defines to be less ambiguous, also set BMP as not supporting alpha (it reads but cant write) 2011-11-22 00:35:26 +00:00