Commit Graph

4599 Commits

Author SHA1 Message Date
Erwin Coumans
4d7089d19b these files missed the cvs commt yesterday, this should fix compilation problems 2005-08-13 08:05:48 +00:00
Daniel Dunbar
74dc0e191d - more nurbs fixes... as it turns out, rendering of cyclic UV didn't
really work at all. Fortunately no one actually *USES* nurbs so
   no one noticed. This is bug from NaN days (strubi, I am looking at
   you here) which I guess says a lot (or a little) about NURBS usage.
   And as usual, the correct code is shorter.
 - added do_version copy of ME_OPT_EDGES flag
2005-08-13 05:05:18 +00:00
Daniel Dunbar
7b1dcf4c42 - readded Subsurf "optimal" edge drawing/rendering
- added ME_EDGERENDER flag, barely changes things atm except makes
   sure plain meshes with FasterDraw/etc set still render all edges.
   The edge drawing system needs a bit of a revamping - it is a cool
   feature but could use several improvements:
     (1) The algorithm could be better in choosing the best edges to
         draw.
     (2) The drawflags should interact well with modifiers. It is wierd
         to have a large grid with a deformer that draws no edges because
         flags are only calculated based on base mesh.
     (3) Drawflags should not be destroyed by editmode. Better design
         would be a "Draw % of edges" button.

   Of course, could also be the feature is not worth it and we
   should just drop. Feel free to comment if you have an opinion.
2005-08-12 21:55:50 +00:00
Jean-Luc Peurière
0006f8ad14 update to xcode
added a workaround for scons
2005-08-12 21:41:22 +00:00
Ton Roosendaal
0d35e38938 Very small size of arealights (0.001) could cause weird overflows/bands.
There was still one float component hanging around... saacos(). Made a
double version of it.

Reported by Shul. thnx!
2005-08-12 20:27:18 +00:00
Brecht Van Lommel
65aa88af11 Added the 4 new proportional editing modes also to the uv editor transform.
Eventually the uv editor should use the new transform code and get these
automatically, but until that's done this might fix bug #2920.
2005-08-12 15:33:06 +00:00
Erwin Coumans
5ebc7c8bda added more debug text, enabled the bullet penalty solver, instead of ode solver by default, added a better demo. 2005-08-12 13:42:00 +00:00
Daniel Dunbar
5afdfc6ac1 - remove some silly array copying code for nurb displist generation
- converted dl->flag to use consistent defines for cyclic U/V
2005-08-11 22:27:53 +00:00
Kent Mein
841ddb4680 A couple of small fixes...
I removed config.h code from the files that had them.
effect.c had nested /* so cleaned that up...

added a newline to vector.c to shut gcc up ;)
buttons_editing.c had a possible unintalized var (height) so I gave
it a default value.

removed an unused var i in interface_draw.c
removed an unused var mti in outliner.c

in BL_SkinDeformer.cpp
commented out a call to bDeformGroup->data which no longer exists so it
compiles again.

Kent
2005-08-11 16:39:51 +00:00
Brecht Van Lommel
2cb9c4db0c Bugfix, the lock button in the uv editor didn't work, the 3d view would
always redraw even if it was disabled (only on non-apple).
2005-08-11 13:08:08 +00:00
Daniel Dunbar
65c5eb6e09 - bug fix, add hook didn't respect modifier ordering constraints 2005-08-11 07:52:41 +00:00
Daniel Dunbar
0fba0e6b4b - update displistmesh_to_mesh to free existing mesh data (including
sticky, dvert, and keys if number of verts don't match)
 - changed modifier panel to not allow manual addition of hook or
   softbody modifiers
 - changed apply modifier to apply to existing mesh (fixes bug with
   materials) and to warn about loss of tface/mcol/keys/dvert/sticky
   for all modifier types
 - changed modifier UI to not display disclosure triangle for virtual
   modifiers
 - changed softbody ui to allow enable/disable
2005-08-11 07:11:57 +00:00
Daniel Dunbar
76d2f0da9e - couldn't help myself, got distracted working on something else and
wondered what these silly data pointers in MDeformVert were for.
   Turns out they aren't even need! Just taking up extra memory and
   space and confusing the armature deform algorithm. Naturally I
   had to clean things up. Sorry Ton.

   Deform weights are still stored in a pretty expensive and unnecessary
   way, probably use about twice as much memory as needed, and do
   way too many memory allocs.
 - moved armature_deform_verts into armature.c
 - some python code accessed the MDeformWeight data pointers, but
   did so in a completely wrong way, I am positive this code could
   never have worked (or maybe things changed during tons refactor),
   regardless it wouldn't work now... will test later.
2005-08-11 06:44:32 +00:00
Daniel Dunbar
8eca413964 - added recalc ob, recalc data options to ctrl-alt-shift-t timer 2005-08-11 05:56:48 +00:00
Daniel Dunbar
5c74f25c8a Two quick bugfixes, thanks slikdigit!
- armature modifier was not flagged to require original data (but it
   does)
 - add hook messed up the ModifierData initialization, stupid bug!
2005-08-11 05:45:47 +00:00
Daniel Dunbar
1fd6ce391b - bug fix, cage buttons weren't displayed correct with virtual modifiers 2005-08-11 03:37:50 +00:00
Daniel Dunbar
75bcb4cd98 - added modifiers_getVirtualModifierList, returns pointer to first modifier
but including "virtual" modifiers (for example, an object skel-parented
   to a lattice has a virtual first lattice modifier)
 - removed mesh_modifier(), all functionality has been incorporated into
   modifier stack (well, keys still don't exist as a modifier, but I am
   not sure if they should).
 - added interface option to convert a virtual modifier into a real modifier
 - added option to parent to lattice object or lattice with deform
 - bug fix, patch of hook indices patched all hooks (oops) not just ones
   for edited mesh

NOTE: Files saved with 2.38 that include an object parented to a lattice
will not load correctly, because it will look like the object is parented
only to the object (i.e. without deform). Can be simply fixed by reparenting
or adding a lattice modifier. Older files are handled automatically.
2005-08-11 03:31:33 +00:00
Daniel Dunbar
ac3ed0f92a - switch to using softbody modifier, controls enabling but does not have
variables, these are still in same place. enable button automatically
   makes/enables modifier.
 - changed hook to hook modifier conversion to happen on direct link,
   required to make sure we don't forget to free any memory for files
   saved with 2.38 that have hooks.
 - update modifier interface to enforce modifiers with the require-original-
   data flag to not move beyond deforming modifiers.
 - enforce only one softbody modifier allowed

NOTE: Once again, no modifier stack for lattice yet means softbody for
lattice does not work atm.
2005-08-11 02:23:52 +00:00
Brecht Van Lommel
2f32c8451c New "Mirror UVs" function in faceselect mode, to complement Rotate UVs.
It mirrors the UVs or Vertex Colors of individual faces (on the red edge
of the UV face).

Patch provided by Martin Poirier, thanks!
2005-08-11 00:00:24 +00:00
Daniel Dunbar
2b40f19c5b - bug fix, hook deform could crash because old files can have hook
indices that are out of range
 - bug fix, hook indicies were not corrected on exit editmode (there
   probably should be a general interface for this kind of patch)
2005-08-10 22:25:32 +00:00
Daniel Dunbar
9030e5f686 - added eModifierTypeFlag_RequiresOriginalData for modifiers that
can only follow deform (for example, they store mesh vertex
   indices)
 - added ModifierType.foreachObjectLink for iterating over Object
   links inside modifier data (used for file load, relinking, etc)
 - switched various modifiers_ functions to take object argument
   instead of ListBase
 - added user editable name field to modifiers
 - bug fix, duplicate and make single user didn't relink object
   pointers in modifier data
 - added modifiers to outliner, needs icon
 - added armature, hook, and softbody modifiers (softbody doesn't
   do anything atm). added conversion of old hooks to modifiers.

NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.

NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.

NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
2005-08-10 22:05:52 +00:00
Stephen Swaney
eb64e304b4 Patch #2758 Update of image module.
New Image methods from Austin Benesh:
- getPixelI(x, y)
- getMinXY()
- setPixelF(x, y, [r, g, b, a])
- setPixelI(x, y, [r, g, b, a])
- save()

sorry for the delay.
Thanks.
2005-08-10 17:50:18 +00:00
Joilnen Leite
1d08915f45 ideasman fix that epydoc compile for it
.
2005-08-10 13:36:40 +00:00
Daniel Dunbar
02f3c930f5 - bug fix, face center drawing was wrong for editmesh
- added several useful utility functions to editmesh,
   these can simplify/clarify a lot of mesh code, check them
   out
 - cleaned up EdgeSlide a bit to be clearer/shorter
     o bug fix, EdgeSlide did not always cancel correctly
     o bug fix, EdgeSlide did not choose initial "control" edge
       correctly after calc_meshverts_ext change
2005-08-10 03:51:34 +00:00
Johnny Matthews
9823e7d548 Removed need for vert-xs and ys in edgeslide 2005-08-09 20:02:53 +00:00
Daniel Dunbar
c5a223056a - bug fix, convert modifiers should free modifiers from new object 2005-08-09 16:02:23 +00:00
Johnny Matthews
98741ec436 fix for bug #2906
Was allocating array for all hidden edges, not needed, just hidden with a selected vert needed
2005-08-09 14:44:46 +00:00
Johnny Matthews
6aead5176b Possible fix for bug #2906
Added some parens to change eval order
2005-08-09 13:49:05 +00:00
Daniel Dunbar
c192b80b17 Big commit, had to rework lots of selection stuff so that things
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.

 - added DerivedMesh foreach functions to iterate over mapped
   verts/edges/face centers. These replaced some of the drawing
   functions and are more general anyway. Special edge drawing
   functions remain for performance reasons.
 - removed EditFace xs, ys fields
 - added general functions to iterate over screen coordinates of
   mesh/curve/lattice objects
 - removed all calc_*verts* functions that were used for storing
   screen coordinates in objects. they were recalc'd on the fly
   for most situations anyway, so now we just always do that.
   calc_*verts_ext was one of those calls that did dirty things
   deep down in the callstack (changing curarea and poking at
   matrices)
 - rewrote all vertex level selection routines (circle, lasso, bbox)
   and closest vertex routines (rightmouse select) to use the new
   system. This cleaned up the selection code a lot and the structure
   of selection is much easier to see now. This is good for future
   work on allowing modifiers to completely override the selection
   system. It also points out some discrepancies in the way selection
   is handled that might be nice to resolve (mesh vertex selection has
   fancy stuff to try to help with selecting overlapping, but it only
   works w/o bbuf select, and curves/lattices don't have at all).
 - had to remove ton's code to move Manipulator to cage location, this
   is not reliable (can come up with a different method if requested)
 - as it happens BezTriple.s and BPoint.s are basically available to
   be removed, just need to rewrite editipo code that still does
   background calc of screen coordinates
 - MVert.{xs,ys} are still around because they are abused in some places
   for other info (not sure if this is safe actually, since they are
   short's and the mvert limit went up).

And did I mention this commit is comes out to -305 lines? Well it does.
2005-08-09 08:12:36 +00:00
Jens Ole Wund
932e958816 made weight paint panel full width ( still try to understand that X,Y system panels use )
replaced senseless 0 opacity  with 1/8 opacity
2005-08-08 21:56:52 +00:00
Daniel Dunbar
9c8c51cbe3 - added VecLerpf to blenlib
- switch to using DerivedMesh.drawMappedFaceCentersEM to draw
   face dots, still need to do some work so this works in all
   selection modes (atm it does not work in no-zbuf mode)
2005-08-08 18:50:47 +00:00
Erwin Coumans
29f06ad76e some more work on bullet raycast 2005-08-08 17:08:42 +00:00
Johnny Matthews
7f98c960b5 Added extra Select Type option for esubdivide and put them in defines to get rid of magic numbers
SUBDIV_SELECT_ORIG      - Retain selection to look like original selection
SUBDIV_SELECT_INNER     - New selection is all the new inner edges
SUBDIV_SELECT_INNER_SEL - New selection is all the new inner edges except where only 1 edges was selected on a face

Loopcut now uses SUBDIV_SELECT_INNER_SEL for better interaction with edgeslide
2005-08-08 15:59:05 +00:00
Erwin Coumans
ed80fde36b - fixed missing logic positive pulse repeat button
-better naming for collision bounds:
polytope -> convex polytope
polyheder -> concave mesh

-better naming:
frequency -> the pulse delay
2005-08-08 11:03:16 +00:00
Ton Roosendaal
8ef6df8d2d Bug fix #2894
Using Lkey (select connected) in Armature editmode could crash, it didn't
correctly check for drawing non selectable items (have index -1).
2005-08-08 09:58:57 +00:00
Ton Roosendaal
b228c90e24 Two radiosity glitches, bugs #2872 #2881
- add new scene, "Full Copy", didn't copy radio settings
- switch scene didn't reset radiosity baking
  (note that you can only do 1 radiosity scene in Blender, switch scene
  will free the radiosity data)
2005-08-08 09:36:07 +00:00
Ton Roosendaal
fc8b4b14f5 Bugfix #2871
Selecting in Mesh edit mode or in FaceSelect mode is tied, but setting
faces hidden was not tied. This caused hidden faces in edit mode to
become selected, with all associated disasters. :)
Now hiding faces in editmode and faceselect are tied too. Please note
that leaving faceselect mode will unhide always!
2005-08-08 08:49:24 +00:00
Johnny Matthews
fec419a05e Little fix for Edgeslide so it doesn't crash on usage!
Also fixed trying to edgeslide an edge with a missing rail.

And Changed the okee calls to error (thanks intrr)
2005-08-07 23:59:34 +00:00
Johnny Matthews
11e21a8bac Clean up spaces (make into tabs) in editmesh_tools
Also add menu items for Edgeloop Delete
2005-08-07 21:47:08 +00:00
Ton Roosendaal
941d5ae44e Fix for bug #2859
Beautyfill didnt work in illustrated case, due to 1) face select 2) no
correct edges selected...
2005-08-07 21:23:55 +00:00
Johnny Matthews
bfcc67267b In CTRL-E menu "Edgeloop Delete" with a valid "inner" edgeloop selected, this function calls other tools to delete that edgeloop by doing the following
Edgeslide to one side 100%
CTRL +  to select "more"
Remove Doubles

Leaves you with new faceloop selected.
2005-08-07 20:46:26 +00:00
Daniel Dunbar
f333f124ca - update effect.c for function def change of convertToDispListMesh 2005-08-07 19:43:14 +00:00
Jens Ole Wund
7176e8926f Softbody collision with deformed deflectors2
using bit in pd->flag to signal the use of deformed rather than wasting pd->pad

removing evil cast
replaced by  using convertToDispListMesh()  ZR: I hope that's OK that way

commented off the ( debug purpose ) recursion trap in SoftBodyDetectCollision()
replaced forbidden okee() with printf() in there
( not so nice, since it does not anounce crash on UI )

note: crashing example from previous commit
needs enabling 'UMS'  on panel to crash again
UMS = uses modifier stack
2005-08-07 19:22:29 +00:00
Joseph Gilbert
ebd83b9bc4 _updates and warning fix_
* fixed a few warnings in the python project
* added timeline to py project
2005-08-07 12:09:50 +00:00
Daniel Dunbar
317f7d1446 - bug fix, need to check mapped verts/edges/faces are non-NULL before
using in assorted DerivedMesh functions
2005-08-07 05:59:19 +00:00
Daniel Dunbar
1f431b50d6 - got rid of DerivedMesh.drawMappedEdgeEM function, can be implemented with
drawMappedEdges
 - added DerivedMesh.convertToDispListMeshMapped function which converts and
   also returns mapping information for use in editmode
 - updated DispListMesh derivedmesh to be able to function in editmode
 - update mirror modifier to support use as a cage
 - update mirror & subsurf modifiers to properly pass mapping information down
   modifier stack

It is now possible to have a mesh with mirror/subsurf modifiers where you
can edit with both as cage. Selecting the mirror'd part works, but of course
transform is flipped so it is a bit weird. Not the cleanest code in the
world and I can't say I am really happy with the architecture but it works for
now and supports the existing feature set.
2005-08-07 05:42:03 +00:00
Daniel Dunbar
8da5df8887 - add allowShared argument to DerivedMesh.convertToDispListMesh to allow returned
DLM to share data from DerivedMesh (reduces some copying/memory allocation)
 - added displistmesh_copyShared function to copy a DLM but not duplicate any
   internal data
 - changed crease drawing to use DerivedMesh functions... this means varying
   edge width style of creases had to go, I replaced by using varying color to
   show crease weight instead. Don't think this is a big loss since the subsurf
   result gives you a much better indication of the crease weight anyway.
 - bug fix in mirror modifier, didn't copy edge creases from editmesh correctly
2005-08-07 02:30:29 +00:00
Jens Ole Wund
f17a9a1d3d working on : make softbodies collide with moving ( armatures,lattices .. ) objects
works nice & smooth unless we encounter logical circles
well, because of function pointers re-hooking i could not debug that in detail
may be DAG or modifier stack is .. dunno

anyway
did abuse pd->pad bit 1 ( i hope this was 'real' padding till now )
to get SoftBodyDetectCollision(..) use mesh_get_derived_XXX [in effect.c] ..[*sigh* (the linetriangle() func is there)
..]
and put that to the deflection panel (blush .. i would have decapted anyone in my team doing stuff like that)

to defend this commit:
it makes you aware of problems ahead
having code that works/doesn't (on some conditions) is is usefull to look at
i think code is OK , so the problem is either
a. me not understanding
b. real

for locical circles see files -->
http://wund.privat.t-online.de/bt/WorkFine1.blend
http://wund.privat.t-online.de/bt/WorkFine2.blend
http://wund.privat.t-online.de/bt/WorkCrash.blend
2005-08-06 23:20:52 +00:00
Jens Ole Wund
d1285d0229 adding time line stuff 2005-08-06 22:00:21 +00:00
Daniel Dunbar
80dcdc9508 - added editmhes_get_derived_base, used when a mesh with multiple users
is in editmode. current bevahaior is to display the object that is
   actually in editmode with its modifiers, and all other objects that
   share the mesh using just the base editmesh data. this is not 100%
   consistent but no architecture at the moment to display all objects
   that have mesh in editmode with each individual modifier stack.
2005-08-06 20:44:59 +00:00