Commit Graph

185 Commits

Author SHA1 Message Date
bfbda2d284 fix for crash in 'Skin Armature Create' when the mesh doesnt have any skin data. 2012-08-01 14:37:13 +00:00
e32c60284a style cleanup 2012-07-29 00:20:28 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
8b865c01cd style cleanup: comments 2012-06-30 22:49:33 +00:00
2d7efed014 mark modifier operators that only work in the UI as internal, otherwise this causes some confusion when they do nothing when accessed from the spacebar search menu. 2012-06-29 23:09:19 +00:00
ac9344de75 Fixes for modifier data in multi-user meshes.
When removing a skin or multires modifier, it skips deletion of the
associated CustomData layer if the object has any other modifiers of
that type. This check has been extended to all objects that use the
object's data.

Similarly, deleting higher multires levels and multires subdivision
will not update the maximum level of any other multires modifiers on
objects that link to the same mesh.

Note that modifier_apply_obdata() doesn't need any changes as it
does not allow applying to multi-user data.

Object joining has also been modified to synchronize multires levels
objects that share a mesh. This is needed because joining can
subdivide or delete levels in order to match the maximum level of the
join-from object to the join-to object.

Fixes bug [#31880] instance multiresolution modifier error.
http://projects.blender.org/tracker/index.php?func=detail&aid=31880&group_id=9&atid=498

Reviewed by Sergey:
http://codereview.appspot.com/6332047/
2012-06-24 20:18:32 +00:00
87211a49ab Fix #31743: Applying Smooth modifier to a curve crashes Blender
Actually there were two different issues involved here:

- Recently enabled Smooth modifier wasn't actually designed for curves, so
  it in fact requires a bit bigger work to make it working.

  For now added check for object's typy in this modifier and if it's not
  mesh, it wouldn't try to use edges.

  The reason why it worked in 3d viewport is that creating DM from curve while
  displist is still ocntrcuting for would result in empty CDDM and that leads to
  not taking edges into account, only vertexCos passed to modifier would be used.

  This makes it behaving a bit differently from if it was a mesh, but still gives
  quite reasonable result. Would leave actual fix for a guy who enabled smooth
  modifier.

- Another issue is related on ensuring sculpt mask layer after applying modifier.
  This shall happen only for meshes.
2012-06-08 08:17:34 +00:00
ebdeed07e5 Delete skin customdata if all skin modifiers are removed.
Fix for bug [#31604] "Skin Modifier - Mark Root Bug?"

Essentially the same as multires customdata deletion.
2012-05-26 21:11:23 +00:00
ad65b7b86b Animation playback: now all windows are update during playback, rather than
just the active window.
2012-05-25 12:37:11 +00:00
f16f545c6e style cleanup
also fix example for mesh uv's
2012-05-22 16:24:09 +00:00
3fc3c9f3b4 style cleanup: relating to skin modifier 2012-05-22 16:09:31 +00:00
45265b326a Add operator to extract armature and vertex groups from skin.
* The operator creates bones for each input edge (does not subdivide
  them like the skin operator does), adds a fake root bone for skin
  roots with multiple children.

* The operator adds vertex weight groups to the original mesh.

* Make copy_object_transform() public, used to match the armature
  object to the mesh object.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:57 +00:00
11309a19e2 Add skin vertex operators.
* Add operator to mark selected vertices as skin roots.
* Add operator to mark/clear selected vertices as loose.
* Add operator to equalize skin radii.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:44 +00:00
0cdd5892fa Ensure skin nodes get created when adding modifier.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:37 +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
5d92564041 use utf8 functions for new modifier names 2012-05-20 18:19:45 +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
ce17c35240 style cleanup: mainly sculpt/whitespace 2012-05-11 08:05:47 +00:00
c9c0bfeeb8 Ensure mask layers are always present in sculpt mode. 2012-05-10 20:34:35 +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
3ef11693f5 Style cleanup: displist module 2012-05-07 06:58:03 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
e2c453b5f9 style cleanup: editors / mesh & object 2012-04-28 15:42:27 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
54911f52d8 Fix #31117: Segfault when removing Meshdeform Modifier 2012-04-28 09:32:55 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
4c3bb77012 style cleanup: spaces aroudn operators for operator definitions. 2012-03-22 07:26:09 +00:00
e508c2d9e1 Add a multires function to delete MDisps.
The code was duplicated in various places, replaced with calls to
a new function, multires_customdata_delete().
2012-03-19 05:13:41 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
a527e3ea25 Fix #30496: Bugs and crashes about "make links modifers" function.
Was missed check for if modifier is available for particular object type
which ended up with unpredictable results when modifier which isn't supported
yet for some object type as linked to that object type.
2012-03-12 14:35:07 +00:00
24b676e370 Remove the OBJECT_OT_test_multires operator.
Originated in r35213, appears to have been some test for multires in
BMesh.
2012-03-10 05:15:17 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
c8b53d2aaf code style cleanup, no functional changes. 2012-02-23 02:23:42 +00:00
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
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
101a287040 Fix #30031: Build modifier crashes when applied to bezier object
Just missed check for modifier type.
2012-01-30 20:44:08 +00:00
d3090a32f2 svn merge ^/trunk/blender -r43664:43676 2012-01-24 20:19:09 +00:00
44850d6946 Fix #29946: Recover Auto Save defaults to "Short List" View -- Cannot determine dates
Added option display_type to WM_operator_properties_filesel which defines which file
display type (short/list/icons/default) should be used for file browser.

All current operators are using FILE_DEFAULTDISPLAY display type which means display
type will still be calculated based on type of opening file and user preferences
settings. Recover Auto Save operator is now using long display type so file date can
easily be checked now.

Reviewed by Andrea, thanks!
2012-01-24 18:18:51 +00:00
705f23064e svn merge ^/trunk/blender -r43294:43338 2012-01-13 01:39:57 +00:00
f66f33cefc rename RNA_property_is_set() --> RNA_struct_property_is_set() in preperation to add a second version of the function which takes the property rather then its name. 2012-01-11 16:32:12 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +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
dab41e0499 macro for getting next/previous MPoly loops 2011-12-28 07:10:27 +00:00