Commit Graph

211 Commits

Author SHA1 Message Date
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
74a9c1510a Alternate fix for bug [#34369], where invalid polygon normals could be saved in the mesh data and in the file.
This was from initial BMesh merge, but should not have been added in since face normals are calculated and stored in the DerivedMesh.

Toggling editmode would remove poly-normals so its unlikely anything relies on this custom-data.
2013-03-06 03:58:38 +00:00
c2157518de fix [#34369] applying screw modifier turns object to black 2013-03-04 01:57:29 +00:00
4df5b943ed patch [#34103] - listbase.patch, insertlinkbefore.patch
from Lawrence D'Oliveiro (ldo) 


notes from tracker:
use bool for return type from BLI_remlink_safe, necessitating including BLI_utildefines.h in BLI_listbase.h
get rid of duplicate BLI_insertlink, use BLI_insertlinkafter instead.

A few places which were using BLI_insertlinkafter (actually BLI_insertlink), when it would be simpler to use BLI_insertlinkbefore instead.
2013-02-22 14:12:55 +00:00
2c084e280d code cleanup: remove unused arg 2013-02-22 00:51:58 +00:00
20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
809e37bf15 Ensure that mask layer exists in sculpt mode after multires subdivide
Sculpt mode requires mask customdata layer for multires and ensures it
exists on entering sculpt mode. However, sculpt mode only considers
multires to be active if the level of subdivision is not zero, so it
does not add mask for unsubdivided multires meshes. If the multires
mesh is subdivided while in sculpt mode, no mask was present leading
to weird drawing and crash on use of the mask brush.

Fixed by doing the same thing in multires_subdivide_exec() that is
done in ED_object_modifier_add(), which is to check if sculpt mode is
active and add mask layer if so.

Fixes [#34190] Viewport artifacts when using Multiresolution modifier
projects.blender.org/tracker/index.php?func=detail&aid=34190&group_id=9&atid=498
2013-02-10 15:59:29 +00:00
d94b2efbb9 disable applying constructive modifiers when in sculpt mode with multi-res data, since this would crash.
also rename modifier_sameTopology -> modifier_isSameTopology(), modifier_nonGeometrical -> modifier_isNonGeometrical()
2012-11-13 14:21:55 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
64add7c9c7 More UI messages and BKE_reportf<->BKE_report fixes... 2012-10-16 07:53:10 +00:00
df298490b8 mask data is no longer automatically added when sculpting (except when there is a multi-res modifier). 2012-10-01 05:19:57 +00:00
5205927892 Fix #32596: bones in armature created from skin modifier have wrong envelope
values.
2012-09-20 00:53:25 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
9a07bd78fc add clarification, without this the tool reads as if it makes the radius of each selected vertex equal. 2012-09-12 06:31:26 +00:00
526d0be9bf Fix crash when adding skin modifier to empty mesh
Fixes bug [#32362] SIGSEGV when adding skin modifier to empty mesh
projects.blender.org/tracker/?func=detail&atid=498&aid=32362&group_id=9
2012-08-19 17:13:45 +00:00
33fa436447 Fix incorrect error test when removing a modifier
r49989 had the test reversed
2012-08-18 19:01:37 +00:00
4301df952e Fix reversed names in modifier-remove error report 2012-08-18 18:54:05 +00:00
27b4b45543 utility functions: BLI_findptr, BLI_rfindptr --- use for finding an item in a linked list by a pointer. 2012-08-18 16:16:13 +00:00
15bd03f958 fix for missing change to fluidsim from last commit and name jobs a more useful name - 'wm_job'. 2012-08-15 10:03:29 +00:00
97859e8709 add wm job types they are not used yet, so this just defines them for new jobs add add argument to search by job type. 2012-08-15 09:42:06 +00:00
c567cf3fab code cleanup: WM naming conventions 2012-08-11 21:35:24 +00:00
f0951f58ca code cleanup: rename G.afbreek --> is_break, G.rendering --> is_rendering 2012-08-08 18:37:06 +00:00
97e9659c53 style cleanup 2012-08-04 12:54:27 +00:00
45801286a5 fix some more crashes when running skin operators on a mesh with no skin layer 2012-08-01 15:04:10 +00:00
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