Commit Graph

86 Commits

Author SHA1 Message Date
Bastien Montagne 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
Campbell Barton 95670e03a0 style cleanup / comment formatting for bli/bke/bmesh 2012-03-03 20:19:11 +00:00
Campbell Barton a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
Campbell Barton 48006292d8 svn merge ^/trunk/blender -r44189:44204 2012-02-17 20:56:25 +00:00
Campbell Barton 2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
Bastien Montagne 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
Bastien Montagne 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
Campbell Barton 1fef05084e svn merge ^/trunk/blender -r42761:42776 2011-12-20 22:08:24 +00:00
Bastien Montagne 738fdc7b6f New modifier type: eModifierTypeType_NonGeometrical, for modifiers affecting CustomData layers only (e.g. UVProject and WeightVG ones).
Also, allow applying to obdata those modifiers, even with shapekeys, but do not allow applying them *as* shapekey (as shapekeys do not have CD layers).

Fix [#29636] Vertex Weight Mix modifier "apply" button don't work.

Note: applying whit shape keys currently always uses base shape, not current one (for apply to obdata as well as apply to shapekey), but this is another topic...
2011-12-20 14:15:59 +00:00
Campbell Barton 8eb41f0fdb svn merge ^/trunk/blender -r41998:42009 2011-11-20 16:05:51 +00:00
Campbell Barton f1eb66aa68 share code for fluidsim, ocean & dynamic paint file paths.
- use BLI_join_dirfile for joining all paths (no need to ensure slash is appended).
- paths from linked library files now supported.
2011-11-20 14:38:11 +00:00
Campbell Barton 15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Campbell Barton 55a560c0c4 svn merge -r39286:39385 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2011-08-16 06:30:14 +00:00
Brecht Van Lommel c265a686d8 Modifiers: add callback to loop over each texture assigned to a modifier. 2011-08-12 18:11:22 +00:00
Joseph Eagar c98148a963 =bmesh= merge from trunk at r36153 2011-04-15 01:19:13 +00:00
Campbell Barton 2e5eb41522 pedantic warning cleanup, also remove texspace_edit() since its been added using a different method. 2011-02-27 08:31:10 +00:00
Joseph Eagar f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
Nathan Letwory 22638e22ea doxygen: blenkernel under core as module. 2011-02-18 13:05:18 +00:00
Sergey Sharybin 329e2d8037 Todo issue: sculpting on deformed mesh
Used a crazyspace approach (like in edit mode), but only modifiers with
deformMatricies are allowed atm (currently shapekeys and armature modifiers only).
All the rest modifiers had an warning message that they aren't applied because
of sculpt mode. Deformation of multires is also unsupported.

With all this restictions users will always see the actual "layer" (or maybe
mesh state would be more correct word) they are sculpting on.

Internal changes:
- All modifiers could have deformMatricies callback (the same as deformMatriciesEM but
  for non-edit mode usage)
- Added function to build crazyspace for sculpting (sculpt_get_deform_matrices), but it
  could be generalized for usage in other painting modes (particle edit mode, i.e)

Todo:
- Implement crazyspace correction to support all kinds of deformation modifiers
- Maybe deformation of multires isn't so difficult?
- And maybe we could avoid extra bad-level-stub for ED_sculpt_modifiers_changed
  without code duplicating?
2011-01-31 20:02:51 +00:00
Campbell Barton 0271ad6322 Give functions that use printf style formatting GCC format attributes so if incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
2010-12-04 11:44:56 +00:00
Campbell Barton 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
Campbell Barton fbf208d63f add UNUSED() to modifiers, also removed some unused args. 2010-10-14 06:29:17 +00:00
Campbell Barton 81b6d308a7 [#23673] Modifier construction gives correct result in viewport but incorrect in render.
When there are 2+ consecutive deform modifiers, the second modifier was getting incorrect normals, this only showed up for the displace modifier since its the only deform modifier that uses vertex normals.

It would have been easy to fix this by always calculating normals on deform modifiers, but slow.

To fix this I added a function to check if a deform modifier needs normals, so the normal calculation function only runs if there are 2 modifiers in a row and the second uses normals.
2010-09-30 10:51:36 +00:00
Nicholas Bishop 4eaa10aa02 == Multires ==
Fixed bug #23657, "Modifiers dosen't work when you select diffrent mesh for object"

Multires modifier now adds empty mdisps if they're missing, rather than displaying a warning
Switching an object's mesh will now check for a multires modifier; if found the modifier's total number of levels are reset to match the mesh's mdisps
Switching the mesh also forces a multires update so that sculpted changes aren't lost
2010-09-09 00:14:51 +00:00
Joseph Eagar c11c196efa part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :) 2010-07-19 04:44:37 +00:00
Brecht Van Lommel 08775e8f14 Mesh Deform Modifier: compress static binding weights better, threshold
is still set very low so in many cases it could be even smaller, but being
a bit conservative here to try to avoid breaking rigs.

This is not forward-compatible, i.e. loading new files in older blender
versions will loose the binding.
2010-04-23 11:19:06 +00:00
Matt Ebb 5c94896490 Fix [#22078] Cannot apply modifier in python (context error)
Previously all modifier operators relied on the buttons layout data context pointer to 
decide which modifier to work on. This meant that these operators would only work 
from from the properties panel, and not from scripting/macros or for operator redo.

This commit makes all modifier operators take the modifier name as an operator 
property, so the operators can be re-done or executed outside of the modifier panel. 
When invoking the operators from the modifier panel, they automatically fill in the 
operator property from context.

This isn't a perfect API design, but it does bring these operators in line with the design 
of being able to access all UI functionality via other means like scripts.
2010-04-22 01:55:10 +00:00
Campbell Barton 1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
Joseph Eagar 71003b9bcc merge with trunk at r27259 and commit of a patch by anthony jones to fix msvc (though further work may be needed because changes made by the merge 2010-03-09 04:32:40 +00:00
Campbell Barton 081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
Brecht Van Lommel cbb23d96bb Added simplification back for quicker preview renders with less subdivision
levels, child particles, and shadow/SSS/AO quality.. Now also works on what
is displayed in the 3d view instead of only rendering, see panel in the scene
properties.

Most file changes were to make scene available in the isDisabled modifier
callback function.
2010-01-25 11:39:56 +00:00
Joseph Eagar 67ff197cb1 Merge with trunk/2.5 at r25563
Most likely will not compile for others, I'd appreciate any build errors
and missing files reports (I can never seem to get everything committed
and all the build systems working without help).

Porting over the sculpt/multires tools was a breeze,
thanks goes to brecht for a design that didn't exclude
ngons and was easy to port.

Note that I've not tested externally-backed multires
file support yet.  Also, I still need to write version
patch code for some cases.

Some notes:

* Like trunk, topological changes don't update multires right,
  so e.g. subdivide will duplicate multires data on the new faces,
  instead of subdividing it.
* If you set the debug value (ctrl-alt-d) to 1 it'll turn on
  my experiments in speeding up sculpting on higher-res multires
  meshes (but note it makes partial redraw not completely accurate).
* There's a bug where you have to go through editmode to get out
  of sculpt mode, not sure if I inherited or created this myself.
2010-01-05 22:33:41 +00:00
Brecht Van Lommel 6639ba6b86 Sculpt Branch:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r25180:25245
2009-12-09 15:24:55 +00:00
Matt Ebb 2ef0ee76a0 Fix for [#20249] duplicating a mesh in edit mode with a lattice modifier
Removed lattice and curve modifiers from being correctable for crazy space - it didn't work and was giving weird results.
2009-12-09 01:53:04 +00:00
Joseph Eagar abd16aac5a ok, apparently didn't commit this either. apparently includes a merge with trunk/2.5 at r24811 I thought I'd committed but did not, yeek. 2009-11-29 00:53:23 +00:00
Brecht Van Lommel 55d2a56d60 Sculpt:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r24483:24889
2009-11-25 17:51:16 +00:00
Brecht Van Lommel fffce6c554 Sculpt: Multires
* Displacement coordinates are now stored differently, as a grid per
  face corner. This means there is duplication of coordinates, especially
  at low subdivision levels, but the simpler implementation justifies it
  I think.
* ToDo: conversion of existing multires files (2.4x or 2.5x), loading them
  may even crash now.
* Editmode preservation/interpolation code also has not been updated yet.

* Multires now works on the CCGDerivedMesh grids instead of CDDerivedMesh,
  which should be more memory efficient.
* There are still bad memory peaks (if you're using 32bit) when subdividing
  or propagating displacements. Though at least there should be no huge
  memory blocks allocated, which windows is now to have trouble with.
* Still found some weird spike artifacts at lower multires levels, some also
  happening before this commit. Perhaps computation of tangents needs to be
  tweaked more.

* Multires modifier now has viewport, sculpt and render levels. Also the
  levels have been made consistent with subsurf, previously the same level
  of subdivision was one less for multires.
* Both multires and subsurf modifier now can have their subdivision level
  set to 0 for no subdivision.
2009-11-25 14:07:12 +00:00
Matt Ebb 8be7b757e3 * New option on modifiers that don't change topology: Apply as Shape
Rather than applying the modifier to the object data, it will create a new shape 
with the deformed vertices in there. Only mesh at the moment, other object 
types on the todo.
2009-11-22 13:44:09 +00:00
Joseph Eagar 2d0d4e7de4 commit before doing some hefty shapekey change, will break compilation 2009-11-01 00:06:53 +00:00
Joseph Eagar 8f788c64db merge with trunk/2.5 at r23876
[[Split portion of a mixed commit.]]
2009-10-22 23:22:05 +00:00
Brecht Van Lommel 3ffb695b10 Shape Keys
Blended shape keys can now be displayed & edited in edit mode. This
is much like showing an armature modifier in edit mode, and shape keys
now are a applied as a virtual modifier (for mesh & lattice only, curve
doesn't fit in the stack well due to tilt).

The main thing missing still is being able to switch between the active
shape key in edit mode, that's more complicated.. but the weights of
other shapes can be edited while in edit mode.

One thing to be careful about is that this does automatic crazyspace
correction, which means that if you edit a shape key with a low value,
the actual vertices will be moved to correct for that and actually move
a (potentially much) longer distance.

Also includes some UI tweaks, mainly placing some buttons horizontally
since the vertical list was getting too long.
2009-10-22 16:35:51 +00:00
Joshua Leung 9ebcd9c5e4 A few bugfixes:
* #19583: Keying Sets list issues
Deleting a Keying Set (or a Keying Set Path) set the active index to 0, but that would mean that the first item would be selected but not visible.

* #19590: Keyframing properties of a modifier with more than one of it's type the property will highlight in all
- Modifiers now always have a unique name, so renaming a modifier should check that the name is unique. Most of the files changed in this commit were just to make sure that modifiers got unique names when they were created
- Modifiers path getter was wrapped a bit wrong (missing the "s around the name)

* Constraints Bugs
- Constraints renaming now also makes sure the names stay unique
- Fixed (or attempted to fix) compiler warnings about some enum declaration for distance constraint
2009-10-09 09:48:04 +00:00
Joseph Eagar de7f08cc41 merge with 2.5 at r22793 2009-08-26 10:27:04 +00:00
Brecht Van Lommel 1be67b60fd 2.5: Modifiers & Menus
* Popup menus now remember the last clicked item again.
* Modifier and File Format menus are now organized in multiple
  columns with categories.
* Hook, explode, uv project modifiers have all their buttons
  again with the relevant operators implemented.
* Modifiers that can't be added by the user, or don't work on
  curves for example, are not in the menu anymore.
* Fix search menu overlapping buttons when near the bottom of
  the screen.
* Fix uv layers search menu not working in some modifiers.
* Cleanup popup menu code a bit, layout engine is used in more
  cases now instead of ugly position calculation code.
2009-08-21 02:51:56 +00:00
Joseph Eagar 38de6d14e4 merge with 2.5 (not trunk, last merge message said that on accident) at r22252 2009-08-06 09:56:14 +00:00
Campbell Barton 2a727083c9 fix for warnings and implicit declarations
also fixed smoke comparing a float's mem-location rather then its value.
2009-07-31 01:40:15 +00:00
Joseph Eagar 0b1649b2b8 merge with 2.5 at r21568 2009-07-16 06:27:37 +00:00
Brecht Van Lommel 093ff8202c 2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.

* Added near empty soft body, fluid, field and collision panels,
  tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
  or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
  updates after pointcache refactor?
2009-07-02 19:41:31 +00:00
Campbell Barton a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00