Commit Graph

3409 Commits

Author SHA1 Message Date
Daniel Dunbar 4060b82567 - put {} around the various minmax defines... this was a nice bughunt 2005-07-22 05:03:04 +00:00
Chris Burt 438b5a6733 Fix for bug #2766: Shear shortcut broken
The problem is that the shear shortcut that was originally chosen was
eaten up by the shortcut to switch to the scale blezmo. Changed the
shortcut to CTRL + ALT + SHIFT + S which is painful but seeing as how
shear in object mode has limited use, I don't think it will cause any
real problems. I also updated the menu entry to match.

This was assigned to Martin but he's busy so I did it... and if I did it
wrong... blame him for not fixing it sooner ;)
2005-07-22 03:25:29 +00:00
Daniel Dunbar 451161c29e - bump blender version
- warning fixes (unused vars)
 - added do_lib_versions for patches that need to happen
   after linking and updated some patches.

There are still issues where patches can go wrong, particularly
if an Object is linked from another file. However, this should
fix all crashes.
2005-07-21 22:34:01 +00:00
Ton Roosendaal 96a6a38e00 New drawmode for the Armature geeks!
It was noticed that Bones dont perform well in 'xray' drawing, for that
purpose a very minimal style would serve best.
This new option "Line" draws a solid line with bitmap circles in endings.

http://www.blender.org/cms/Armature_draw_modes.629.0.html

Or temporal pics:

http://www.blender.org/bf/rt1.jpg
http://www.blender.org/bf/rt.jpg
2005-07-21 22:03:27 +00:00
Daniel Dunbar 24f2b61fdb - add comments to BKE_DerivedMesh.h about which functions are called in editmode
- gcc warning fixes
 - start work to make CCGDerivedMesh able to run in object mode (hint: more
   speed improvements)
 - fix modifier move down tooltip
2005-07-21 21:19:38 +00:00
Daniel Dunbar 33709bf6e2 - shuffled editmesh derived function name/function
- added ModifierTypeInfo.freeData function
 - added modifier_{new,free] utility function
 - added ccgSubSurf_getUseAgeCounts to query info
 - removed subsurf modifier faking (ME_SUBSURF flag is no
   longer valid). subsurf modifier gets converted on file load
   although there is obscure linked mesh situation where this
   can go wrong, will fix shortly. this also means that some
   places in the code that test/copy subsurf settings are broken
   for the time being.
 - shuffled modifier calculation to be simpler. note that
   all modifiers are currently disabled in editmode (including
   subsurf). don't worry, will return shortly.
 - bug fix, build modifier didn't randomize meshes with only verts
 - cleaned up subsurf_ccg and adapted for future editmode modifier
   work
 - added editmesh.derived{Cage,Final}, not used yet
 - added SubsurfModifierData.{mCache,emCache}, will be used to cache
   subsurf instead of caching in derivedmesh itself
 - removed old subsurf buttons
 - added do_modifiers_buttons to handle modifier events
 - removed count_object counting of modifier (subsurfed) objects...
   this would be nice to add back at some point but requires care.
   probably requires rewrite of counting system.

New feature: Incremental Subsurf in Object Mode

The previous release introduce incremental subsurf calculation during
editmode but it was not turned on during object mode. In general it
does not make sense to have it always enabled during object mode because
it requires caching a fair amount of information about the mesh which
is a waste of memory unless the mesh is often recalculated.

However, for mesh's that have subsurfed armatures for example, or that
have other modifiers so that the mesh is essentially changing on every
frame, it makes a lot of sense to keep the subsurf'd object around and
that is what the new incremental subsurf modifier toggle is for. The
intent is that the user will enable this option for (a) a mesh that is
currently under active editing or (b) a mesh that is heavily updated
in the scene, such as a character.

I will try to write more about this feature for release, because it
has advantages and disadvantages that are not immediately obvious (the
first user reaction will be to turn it on for ever object, which is
probably not correct).
2005-07-21 20:30:33 +00:00
Daniel Dunbar 9449f0b24f - changed GetRawFromObject to always return mesh name/info... this
is a behavior change from prev releases, used to be only NMesh that
   were not from a subsurf would have name...
2005-07-21 16:46:13 +00:00
Martin Poirier 676b9013ea Tsk, noob mistake in intrr's radiosity commit (not collecting invisible faces).
Didn't check pointer, so it crashed if the mesh didn't have TFaces.
2005-07-21 05:43:49 +00:00
Daniel Dunbar 15f6ce46b1 - apologies, made stupid newbie error in makesdna change (I'm blushing),
which majorly borked DNA and meant crashes everywhere. (C pointer
   arith, you know)
2005-07-21 02:56:45 +00:00
Daniel Dunbar f17ecb5789 - add option argument to makesdna for path within which to look
for DNA includes instead of assuming run from in source dir
 - remove casts to long before comparing pointers (warning fix)
2005-07-20 20:46:01 +00:00
Daniel Dunbar 734d5b2dba - renderer always goes through DerivedMesh atm, means no need
to recalc vertex normals (can be assumed good)
2005-07-20 18:15:40 +00:00
Daniel Dunbar bacb560634 - readfile incorrectly increased user count for Lattice & Curve
modifier objects
 - make unlink_object clear Lattice & Curve Modifier object references
 - add expand_modifiers for liblinking

There really needs to be a more consistent and unified way of dealing
with datablock references between objects. It should be possible to
make this generic so that lib_link, expand_, DEP graph, unlink,
oops and maybe outliner can use a single API. The code to deal with
this is too bulky and error prone at the moment.
2005-07-20 18:04:50 +00:00
Daniel Dunbar 8a947c27ab - fix convert XXX _to mesh to recalc mesh data 2005-07-20 16:45:41 +00:00
Daniel Dunbar dc232fda47 Wow! A new feature!
- made ModifierData.isDisabled optional
 - Added new modifier type: Mirror
    o modifier system isn't running in editmode yet so still
      don't have mirrored editing, but otherwise it is pretty
      cool. code even goes to tricks to make sure mirror join
      looks nice in degenerate cases.
    o this kind of commit is basically the upshot of all the
      previous commits - in that implementing a new modifier
      changes only about 3 files and still integrates nearly
      completely.
2005-07-20 07:11:26 +00:00
Daniel Dunbar eb9d466b48 - orco fix for build effect, didn't copy input vertex cos over (duh!) 2005-07-20 04:56:15 +00:00
Daniel Dunbar 38e0d79e68 - for some reason mesh_create_derived_no_deform took the raw data (not
an object) but this is not going to work... I can't remember the reason
   I did it this way in the first place either! oops! regardless, switch
   to all mesh_ derived accessors taking object argument. there is still
   a bug in render orco calculation though. (hunt hunt)
 - removed python files that should have been ditched in previous commit
2005-07-20 04:44:02 +00:00
Daniel Dunbar 259c7b6cad - added modifier_dependsOnTime to check if modifier needs updating
based on time change. would be nice if dep graph could handle this.
 - made dep check if modifiers need update on time change
 - fix render crash (access null)
 - added new Build Effect modifier type. compared to old one works as
   a full member of modifier system, means can apply subsurf, etc on
   it, reorder, what have you. and it is all nice and self contained.
 - removed old Build effect, old files convert to new style on load
 - couldn't help myself, added a randomize feature to build effect
 - removed Python BuildEffect support
2005-07-20 04:14:21 +00:00
Daniel Dunbar ba28fc489a - added an array shuffling function to BLI_rand 2005-07-20 03:33:44 +00:00
Daniel Dunbar 87e76e8560 - fix for particle related crash in editmode. particle system calculation
is pretty haphazard at the moment, needs to be reviewed before next
   release (as does duplis).
2005-07-20 02:23:09 +00:00
Martin Poirier 3e843f80d7 Improper indentation in getParentBoneName docstring.
I must say, the use of hard tab in the doc files is very annoying as it goes against what is done for the rest of the source code.
2005-07-20 00:03:52 +00:00
Daniel Dunbar d18600520e - added ModifierTypeInfo.updateDepgraph function, responsible for building
appropriate relations in dep graph (modifiers respond to scene changes
   correctly now)
 - update modifier buttons to trigger depgraph rebuild if needed
2005-07-19 23:04:34 +00:00
Daniel Dunbar 259a6fe8be - fixed subsurf_make_derived_from_dlm 2005-07-19 20:42:34 +00:00
Daniel Dunbar fd6a1732e2 - vertex indexing in softbody was wrong after I switch loop direction 2005-07-19 20:29:22 +00:00
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
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