Commit Graph

138 Commits

Author SHA1 Message Date
f2074949e7 code cleanup: reduce calling sqrt() when distances are only calculated for comparison use dist_squared_to_line_segment_v2(). 2012-08-14 08:44:35 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
468ef74ed7 More spell and typo fixes (mostly visualise->visualize, grey->gray, normalise->normalize). 2012-07-03 19:09:07 +00:00
3ad9e0f3ec Fix #31948: dynamic paint substeps do not work for objects parented to armatures 2012-06-29 11:19:29 +00:00
15cb064e1b style cleanup 2012-06-25 07:24:48 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
ed679693c9 style cleanup: whitespace/indentation 2012-05-19 13:55:54 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
5fe5a8c283 style cleanup: function definitions 2012-05-17 23:21:11 +00:00
9dd981a440 style cleanup: block comments 2012-05-16 23:37:23 +00:00
145289ad95 code cleanup: minor improvements to float/vector usage. 2012-05-12 22:13:38 +00:00
85fd56a3a8 code cleanup: some style and use math defines, also small speedup for dynamicpaint, dont call acosf twice. 2012-05-12 16:42:12 +00:00
53ee7908d6 style cleanup: whitespace 2012-05-12 16:11:34 +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
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
112162e09e code cleanup: header cleanup 2012-04-30 14:24:11 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
950ed69297 code cleanup:
- replace inline face UV center calc.
- use const float[3] for mesh and uv functions.
- remove unused define
2012-04-28 08:29:20 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
b8c4c54ff0 corrected more issues from [#31069] Analyzing the Blender project with PVS-Studio 2012-04-23 16:29:13 +00:00
b56aabf815 style cleanup: multi-line if statements. 2012-04-21 15:11:03 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
3c1b5b5632 stule cleanup: edits for files which were recently cleaned up. 2012-04-02 22:26:00 +00:00
ca05219f3e fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces.
problem was that BMesh had tessellation call when undo pushes were called.

if python called an operator with no undo push, tessfaces would not be created.

fix this by making it the responsibility of each editmesh operator to re-tessellate, as it is with notifiers and depsgraph.
added EDBM_update_generic() function to add notifier, tag for depsgraph update and optionally re-tessellate.
2012-03-27 00:01:35 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
9751653410 Renaming CD_WEIGHT_MCOL/MLOOPCOL and their masks from WEIGHT to PREVIEW, as this layer is now also used for various preview tasks in Object mode.
“Cleanup” commit, no functional changes.
2012-03-22 08:41:50 +00:00
53b7078343 Fix [#30234] Various problems with CD layers and tesselation, related to modifiers stack.
Should also fix [#30266], [#29451], and partly [#30316].

Here are the changes made by this commit:
* It adds a "dirty" flag to DerivedMesh struct (for now, only DM_DIRTY_TESS_CDLAYERS, but more might be added as needed).
* It adds a new func, DM_update_tessface_data, which assumes tessfaces themselves are valid, but updates tessellated customdata from their poly/loop counter parts.
* At end of modstack, when valid tessellated faces are present in finaldm , but the cdlayers dirty flag is set, call that function (instead of recomputing the whole tessellation).
* Edits to the codes concerned (UVProject, DynamicPaint, and Subsurf modifiers).
* Also add to subsurf dm generation code the creation of a CD_POLYINDEX layer (mandatory for DM_update_tessface_data to work well, and imho all tessellated dm should have one).

Note: some pieces of old code are just #if 0’ed, will clean them later.
2012-03-18 22:06:57 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
91580c0929 swap BMLoopCol r/b color, requires subversion bump.
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.

Loading old files works, saving legacy format works too.

What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
2012-03-17 20:39:28 +00:00
89a963fb7f style cleanup: comment blocks 2012-03-09 18:28:30 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
1c91d62c7e use BLI_path_cmp() rather then strcmp() 2012-03-08 02:19:41 +00:00
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
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