Commit Graph

4375 Commits

Author SHA1 Message Date
Daniel Dunbar 1df154d140 - split {curve,lattice,armature}_deform_verts out of mesh_deform
- removed mesh_deform (merge into mesh_modifier)
 - switch python lattice_apply function to use object_apply_deform,
   this isn't exactly equivalent but the python system shouldn't
   have been calling that deep into the kernel anyway.

New feature: Modifier stack
 - added Object.modifiers (list of ModifierData elements)
 - added DNA_modifier_types.h
     o contains type definition for the file data for the various
       modifier types
 - added BKE_modifier.h
     o contains modifierType_get_info (access to modifier type registry)
     o structs and defines for runtime modifier usage
 - updated mesh_calc_modifiers to evaluate modifier stack (note that
   for the time being it also evaluates the old style modifiers so files
   should load and work as normal).
 - add file handling modifier code (todo: don't replicate on object copy)
 - add modifier stack UI code (lives in object panel)


Only real new feature at the moment is that you can apply lattices and
curves *after* a subdivision surface which was never possible before.

Todo:
 - DEP graph updating does not work correctly yet, so you generally have
   to tab cycle to see results.
 - editmode calculation does not use modifier stack.
 - bug fixes (there must be a few in there somewhere)
2005-07-19 20:14:17 +00:00
Ton Roosendaal f1763b2f08 Fix: CTRL+Click adding bones didn't attach them to the parent! 2005-07-19 19:25:17 +00:00
Joseph Gilbert 2801c8b20a __ bug fix__
- internal methods for mathutils class need to incref before returning a pointer to self
  * memory allocation errors (freeing bad pointers) were appearing after repeatedly calling internal methods on the same object due to ref counts.
2005-07-19 18:47:25 +00:00
Ton Roosendaal 19abd72baa Couple of fixes combined;
- With Actions on a Pose, ESC in transform restored wrong.
  This is solved similar to ipos now, storing a 'last time evaluated'.
  Could be extended to ghosting... soon.
- Moving the little yellow 'key blocks' in Action window didn't update
  3d window. ALso the 'lock' option didn't work, and flashed header.
- Pose Transform: noticed there were still errors in cases, especially
  with actions. Painfully tried to build the desired matrix now.
- Removed obsolete Bone pointer from TransData
2005-07-19 16:12:56 +00:00
Johnny Matthews b344db3670 First step towards restoring / improving subdivide 'beauty'.
Beauty button now is Beauty and Short.

Works as follows

Beauty on: If a face is selected, only subdivide the longest 2 sides
Beauty & Short on: If a face is selected, only subdivide the shortest 2 sides

1 problem atm is when more than 2 sides are equal. Must add code to check for this and disable beauty on that face. Use with caution! :)

Also restoring selection needs to be tweaked here.

Side Note: for most accurate subdividing, use edge mode and select only the edges you wish to cut rather than relying on beauty.
2005-07-19 15:37:18 +00:00
Joseph Gilbert 8d2d045079 -Patch submitted by Campbell Barton
-Fixed matrix.invert() to return the correct inverse matrix
2005-07-19 14:17:07 +00:00
Ton Roosendaal 29855c895c Grms... removed too happily a part of depgraph yesterday. That fix was OK,
but doesn't make the removed code obsolete :)
Error was that transform on deformed objects didn't set recalc flags
2005-07-19 11:47:22 +00:00
Ton Roosendaal e700b79587 Removed last remainder of old transform. The function is still called
special_aftertrans_update() though...
2005-07-19 11:21:01 +00:00
Ton Roosendaal 5f22838822 Bugfix #2818
On importing a file (dxf for example), the active filename got set to the
imported filename, causing save-over to use that too. Tracked it down to
be a very old feature... better to remove this, doesn't work according
specs!
2005-07-19 10:50:13 +00:00
Ton Roosendaal 8fa42457ca 1) Removed old annoyance in adding armature or bones.
- Add Armature or Bone (SHIFT+A) now adds by default a single Bone, view
  aligned and of unit-size 1.
- Then use E-key (extrude) to draw chains, this option now doesn't popup
  the "OK" requester anymore, so works fast
- Another new method is using CTRL+click to add Bones

This makes it working identical to the other edit modes in Blender. The old
modal loop for drawing bones just wasn't working well either.

Related to this; have a real set of useful Armature primitives?

2) Removed event REMAKEALLIPO, which was added in NaN days for testing, and
proved to be extremely slow. Code is moved now to editnla.c.
Thanks Tom Hendrick to pointing to this nasty buggy feature!
2005-07-19 10:06:57 +00:00
Ton Roosendaal 1baf64cd45 Bug fix; pose mode transform didn't count # of selected bones correctly,
skipping selected bones with parent but without "IK to Parent"
2005-07-19 08:02:27 +00:00
Martin Poirier da93fdc9ee Added DAG flush to NMesh when updating geometry (was needed after zr's latest commits).
I added that in mesh_update, if anyone has a better idea, feel free to fix it.
2005-07-19 05:35:35 +00:00
Daniel Dunbar 59a2980611 - some missing changes for switch of mesh_modifier to
deform new verts array.

I don't really know how to use softbody, so it would be nice
if someone would test this for me.
2005-07-19 04:27:43 +00:00
Erwin Coumans 2dbb9409df initialize simd quad in default constructor
this should not be necessary, its for testing
2005-07-19 04:11:47 +00:00
Daniel Dunbar 09b5272639 - split mesh_deform off from object_deform
- changed mesh_modifier, sbObjectStep, object_deform to take vertexCo
   argument instead of operating on mesh
 - fixed bug where a derived mesh would not be returned in editmode
 - removed object_wave, replaced by init_wave_deform and calc_wave_deform
 - moved cached DerivedMesh to Object, not Mesh... fixes heisenbugs
   with linked objects
2005-07-19 02:36:21 +00:00
Johnny Matthews 8962195f21 Fix for bug #2848 This flushes selection upward in subdivide based on select mode. So faces with all edges selected should now be selected as well. 2005-07-19 02:23:52 +00:00
Daniel Dunbar 3181991e86 - silly bug, didn't test for hash before freeing 2005-07-19 01:12:14 +00:00
Daniel Dunbar b58f7d0c55 - change mesh_get_derived_render to mesh_create_derived_render (always
builds new DerivedMesh... caching can come later)
 - split DerivedMesh returning functions into editmesh and mesh groups
 - got rid of DL_NORS displist type (get built on fly for mesh when
   needed)
 - got rid of Mesh.disp (yay!)
 - started to punch DerivedMesh returning functions into shape to introduce
   modifier stack
2005-07-19 00:21:01 +00:00
Ton Roosendaal d1dfb246c7 Bugfix: clear rotation on Pose bone didn't flush changes to DAG
Fix for previous commit today; found other test file with action
constraint that behaved different... found out the old action constraint
used the deform matrix (from restpos to pose) to define the key.

ALso removed unused function from outliner.c
2005-07-18 22:18:03 +00:00
Daniel Dunbar 272f35d427 - ditch mesh_uses_displist 2005-07-18 20:49:19 +00:00
Daniel Dunbar 945c2e0a92 - change convert subsurf to mesh to use mesh_create_derived_no_deform
(converts any modifier now)
2005-07-18 20:48:16 +00:00
Daniel Dunbar 3b21e9543c - remove some extverts related cruft 2005-07-18 20:34:28 +00:00
Daniel Dunbar 609022a4e7 - miscapitalized ghash...
Ok, I'll stop trying to bump up my commits per minute rate for now.
2005-07-18 20:05:30 +00:00
Daniel Dunbar 28057fa2f6 - yet another warning fix 2005-07-18 20:03:52 +00:00
Daniel Dunbar 47072e5084 - another warning fix 2005-07-18 20:00:41 +00:00
Daniel Dunbar 02cadf84be - minor warning fix 2005-07-18 19:59:51 +00:00
Daniel Dunbar 1e3bd6d45e - added DerivedMesh.getVertCos function and implementations
- added mesh_create_derived_no_deform[_render]
 - mesh_create_orco now always goes through a DerivedMesh, some
   redundant copying atm but can be fixed (and orco generation is
   not a big bottleneck)

New feature: TexMesh (texcomesh) works with subsurf now (are
you listening rob?)
2005-07-18 19:58:23 +00:00
Ton Roosendaal 291af7418e Two small fixes (armatures);
- adding relations to pose-constraints should call DAG on the pose
- prevented constraints to break "IK" chains
2005-07-18 19:36:17 +00:00
Daniel Dunbar 7da6aa2cf7 - need to zero hash pointer on free 2005-07-18 19:29:42 +00:00
Daniel Dunbar 37fe347a59 - removed orco pointer from struct Mesh
- switch renderer to store orco's in a hash table instead of
   caching in mesh (I don't like the renderer caching data
   in the actual mesh structure)
 - added mesh_create_orco[_render] function
2005-07-18 18:28:16 +00:00
Joseph Gilbert 2e2f62f6ee [ #2423 ] Object.getParentSubName
- this is a submitted patch by lordbosh
- adds to ability to get the bone name when and object is parented to a bone
2005-07-18 18:11:23 +00:00
Daniel Dunbar f289329ed5 - remove unnecessary editmode cycle on convert subsurf to mesh 2005-07-18 17:45:30 +00:00
Daniel Dunbar 06c7653be1 - added boundbox_set_from_min_max function
- fix DerivedMesh.getMinMax implementations to set min & max when
   there are no vertices
 - mesh boundbox calc was wrong in some cases, messed up HOMEKEY
   and localview zooming
2005-07-18 17:33:51 +00:00
Ton Roosendaal 02ab203c98 Made action constraints to become backwards compatible. In the old version
it used the 'global' (Pose Space) rotation to define the action timing.
That was of course hardly useful, reason for many weird patched rigs.
Nevertheless, sometimes it can be useful, and it's nice to see old files
nicely work still. So: "Local" is an option now.

Note: if you changed last week files because of the new action constraint,
set the new "Local" option in the object-buttons Constraint panel.
2005-07-18 17:27:17 +00:00
Erwin Coumans 701b9c21fd more preparations for bullet physics, and some eol issues with SCA_Joystick* 2005-07-18 05:41:00 +00:00
Joseph Gilbert 56a85af31d Increase the warning level for the python vcproj 2005-07-18 03:52:29 +00:00
Joseph Gilbert e60291d39c Header file clean up and warning fixes
- Mostly this cleans up the #includes and header files in the python project.
- Warning fixes are mostly casting issues and misc fixes. General warning clean up.
- #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles
- fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
2005-07-18 03:50:37 +00:00
Ton Roosendaal 9919df089d Third attempt to fix crash on leave editmode + delete loadsa bones! :)
Now certain pointers get cleared better, prevent reading freed data...
2005-07-17 22:15:12 +00:00
Daniel Dunbar 1900b83301 - "Text" tfaces should only be drawn from deformed (not subdivided)
mesh
2005-07-17 21:54:12 +00:00
Daniel Dunbar c6a72088a2 - convert write_object_stl to use mesh_get_derived_final 2005-07-17 21:48:23 +00:00
Daniel Dunbar dfe15f57e8 - convert draw_mesh_tfaces to use mesh_get_derived_final instead of
calling mesh_uses_displist (becoming obsolete)
2005-07-17 21:43:35 +00:00
Daniel Dunbar a92a513c19 - missed commit of file with mesh_calc_normals 2005-07-17 21:24:43 +00:00
Daniel Dunbar 5bc4eae608 - commit patch from Matthew Plough to request buffer with SWAP_COPY
behavior
2005-07-17 20:40:07 +00:00
Daniel Dunbar e6e9b1ea80 - replace displistmesh_calc_normals by mesh_calc_normals
- convert MeshDerivedMesh to calculate new vertex normals and such
   on initialize, means copy free conversion to DispListMesh
 - replace vertex access through function by direct access fo
   MeshDerivedMesh
 - shadeDispList was not getting correct orco's
2005-07-17 20:12:16 +00:00
Daniel Dunbar 75fefdc5a7 - need to release object DerivedMesh prior to release object data 2005-07-17 19:15:06 +00:00
Ton Roosendaal 141e577353 More fixes thanks to irc testing;
- On exit editmode and after deleting bones, a pointer in PoseChannels
  was not set NULL correctly, causing potential crashes.
- Action Window: select on 'ipo key' (little icon) didn't select/deselect
  the associated bone (old bug!)
- After unlinking an Action, the blue color in bones was not cleared

Also:

- Improved selection in editmode, doing it in 2 stages. Makes it a lot more
  accurate.
2005-07-17 19:08:04 +00:00
Daniel Dunbar a229931ce6 - switch shadeDispList to use DLM face normals if available 2005-07-17 18:51:50 +00:00
Daniel Dunbar 033f3d5126 - switch shadeDispList to always using DispListMesh from
mesh_get_derived_final... a bit slower atm because of extraneous
   copying (will be fixed shortly) but normals are correct for deformed
   meshes now (don't think they ever have been)
2005-07-17 18:37:27 +00:00
Daniel Dunbar f79ff93497 - assorted fixes for drawing "Text" tfaces 2005-07-17 18:31:39 +00:00
Daniel Dunbar 3d155330e1 - remove extverts argument from vertexnormals_mesh
- changed new_NMesh_internal to not take extverts argument
2005-07-17 18:22:23 +00:00