Commit Graph

587 Commits

Author SHA1 Message Date
Chris Want
5dd3bfdb18 MEM_freeN() and MEM_mallocN() should not have been redeclared in this
file.
2005-08-29 02:47:55 +00:00
85efe767f0 Integration of new IK lib features in Armature Poses.
Best is to forget yesterday's commit and old docs. New docs are underway...

Here's how IK works now;

- IK chains can go all the way to the furthest parent Bone. Disregarding
  the old option "IK to Parent" and disgregarding whether a Bone has an
  offset to its parent (offsets now work for IK, so you can also make
  T-bones).
- The old "IK to Parent" option now only does what it should do: it denotes
  whether a Bone is directly connected to a Parent Bone, or not.
  In the UI and in code this option is now called "Connected".
- You can also define yourself which Bone will become the "Root" for an IK
  chain. This can be any Parent of the IK tip (where the IK constraint is).
  By default it goes all the way, unless you set a value for the new IK
  Constraint Panel option "Chain Lenght".
- "Tree IK" now is detected automatic, when multiple IK Roots are on the
  same Bone, and when there's a branched structure.
  Multiple IK's on a single chain (no branches) is still executed as usual,
  doing the IK's sequentially.
- Note: Branched structures, with _partial_ overlapping IK chains, that don't
  share the same Root will possibly disconnect branches.
- When you select a Bone with IK, it now draws a yellow dashed line to its
  Root.
- The IK options "Location Weight" and "Rotation Weight" are relative,
  in case there's a Tree IK structure. These weights cannot be set to
  zero. To animate or disable IK Targets, use the "Influence" slider.
- This new IK is backwards and upwards compatible for Blender files.
  Of course, the new features won't show in older Blender binaries! :)

Other changes & notes;

- In PoseMode, the Constraint Panel now also draws in Editing Buttons, next
  to the Bones Panel.
- IK Constraint Panel was redesigned... it's still a bit squished
- Buttons "No X DoF" is now called "Lock X". This to follow convention to
  name options positive.
- Added Undo push for Make/Clear Parent in Editmode Armature
- Use CTRL+P "Make Parent" on a single selected Bone to make it become
  connected (ALT+P had already "Disconnect").

On todo next; Visualizing & review of Bone DoF limits and stiffness
2005-08-28 12:23:06 +00:00
Stephen Swaney
adc1d7137a patch #2911 - tp_getset for Lamp module.
A nice juicy chunk of new style attribute handling from Ken Hughes.

Thanks, Ken.
2005-08-27 18:44:56 +00:00
Chris Want
bc3f228bc9 Variable was defined in a header file (constant_Type), resulting in
'multiply defined symbol' warning on IRIX for every file that
included that file. Moved to a C source file.
2005-08-23 22:12:06 +00:00
Stephen Swaney
24c8bcf884 bugfix: #2924 Bugs in api2_2x/Material.c
- BPy_Material_methods[] "setFilter" calls Material_setFresnelMirrFac()
 - Material_setSpecSmooth() should be setting param[3], not param[2]

Contributed by Ken Hughes.  Thanks!
2005-08-21 15:16:16 +00:00
Stephen Swaney
bb5ae49992 A large collection of fixes from Ken Hughes including:
- corrections to constants
 - parameter type checking
 - correct use of METH_VARARGS vs METH_NOARGS
 - return objects instead of strings in Scene.getChildren() as per doc.
 - correct logical operators

Thanks, Ken!
2005-08-21 15:00:17 +00:00
7804860cf6 - added mesh_strip_loose_faces, works in conjunction with make_edges
to get rid of faces with MFace.v3==0
 - change all Mesh's to have ->medge now. This is forced by make_edges
   on readfile, and in the various exotic important routines, and on
   conversion back in python.
 - make python NMesh structure always have medges now (needs testing)
 - with above two changes it is guarenteed that mf->v3 is never ==0
   in main blender code (i.e., all MFace's are actually triangles
   or quads) and so I went through and removed all the historic tests
   to deal with MFace.v3==0. Equals lots of deleting, I am in heaven!
 - removed MEdge edcode flag, no longer needed
 - added experimental replacement for edge flag system

Still are some inconsistencies in FACESELECT mode edge drawing to
be ironed out.

NOTE: This commit adds an experimental edge flag calc system, based
on 10-seconds-of-thought algorithm by yours truly. Would appreciate
feedback on how this system works, esp compared to old one and esp
on complex or interesting models.

To Use: New system is enabled by setting G.rt to a value between
1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for
"auto" edge, which is more or less identical to old system but also
makes sure that at least 10% of edges are drawn (solves errors for
super subdivided meshes). Values between 1 and 999 act as percent
(out of 1000) of edges that should be drawn, starting with "most
interesting" edges first. Please try it and comment!
2005-08-21 07:19:20 +00:00
a30740c196 - convert all DerivedMesh map functions to use index based
mapping (instead of Edit{Vert,Edge,Face} pointers)
 - dropped convertToDispListMeshMapped (whew, glad of it too)
 - added DerivedMesh drawMappedFaces function
 - dropped EM suffix for DerivedMesh functions, it was neither
   particularly correct nor descriptive
 - converted test_index_mface to test_index_face that also corrects
   MCol and TFace. Good thing we had three versions of this routine,
   you never know when one might burn down.
 - removed flipnorm_mesh, not used anymore (and was incorrect to
   boot)

 - Getting face select to work with modifiers turned out to be much
   more complicated than expected. Reworked mapping architecture for
   modifiers - basically elements in a DispListMesh are now required
   to be stored in an order that corresponds exactly to original
   ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
   that is set on each element that is set on the first derived element
   of each original element. I can't say the code to follow these
   requirements for subsurf is particularly transparent, but on the
   upside it is a reasonably consistent and simple system that is memory
   efficient and allows keeping the DispListMesh structure.

 - rewrote mirror modifier to be simpler/conform to new requirements
   for mapped DispListMesh structure. This also means that mirror interacts
   much better with incremental subsurf calculation (it used to recalc
   one entire side on any topology change, now it generally avoids that).

 - added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
   functions to handle mapping indices back into appropriate EditMesh
   structures.
 - bug fix, make edges didn't recalc object data
 - bug fix, initial image assignment to TFace's didn't recalc object data

 - new feature, added circle select support for FACESELECT
 - bug fix, creating new faces in editmode duplicated the TFACE active
   flag - but there should only be one active tface
 - bug fix, possible crash when deleting all faces in faceselect mode
   on mesh with tfaces...

Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
2005-08-20 03:08:23 +00:00
c8a5887daa Forgot hidden flag update in this file... 2005-08-19 12:39:43 +00:00
8b060dd5ad - update to constant.c
- give it the key/items interface
  - creates some factory functions for const generation
- genutils methods
  - method for getting module constants
  - method for throwing errors with a print string
- updates to function names
- clean up interpreter launch a bit
2005-08-17 14:26:00 +00:00
2abd79b491 - readded DL_VERTS type to store lattice deformed verts
- new feature, twiddled with lattice resizing to try to maintain
   existing vertex changes... much nicer than just resetting the
   lattice if you decide you need more detail in the lattice.
 - modifiers work with lattices now. yes, that does mean you
   can make a chain of lattices effecting each other 8 miles
   long.
 - some cleanup of softbody code, was rather splintered and call
   path was twisted and confusing. reworked main object step
   routine to do things in a more obvious and consistent manner
   and without duplicate code
 - added ob->softflag OB_SB_RESET instead of sbObjectReset
   call
 - modifier changes reset softbody now
 - moved curve_getVertexCos/curve_applyVertexCos into curve.c
 - update curve modifier eval to work with virtual modifiers
 - update modifier apply to work with curves/surfs
 - update make parent to also recalc object data

NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
2005-08-15 10:30:53 +00:00
93aeb6b318 - added make_orco_curf, even does keys!
- removed {lattice,curve}_modifier functions
 - changed render code to use displist for curve rendering
   instead of making its own. required adding a bevelSplitFlag
   field to DispList. I also fixed the bevel face splitting
   which did not work correctly in many situations.
 - changed so all curve data creation happens in makeDispListCurveTypes,
   includes making bevel list and filling polys
 - changed render code to use displist for surface rendering
 - removed Curve.orco variable, built as needed now
 - removed stupid BLI_setScanFill* functions... why use a function
   argument when you can use a global and two functions! Why indeed.
   (this fixed crash when reloading a file with filled curves and
   toggling editmode)
 - bug fix, setting curve width!=1 disabled simple bevel for no
   apparent reason
 - cleaned up lots and lots of curve/displist code (fun example:
   "if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
 - switched almost all lattice calls to go through lattice_deform_verts,
   only exception left is particles
 - added DBG_show_shared_render_faces function in render, just
   helps to visualize which verts are shared while testing (no
   user interface).
 - renamed some curve bevel buttons and rewrote tooltips to be
   more obvious
 - made CU_FAST work without dupfontbase hack

Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:

http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
2005-08-14 06:08:41 +00:00
Stephen Swaney
9e6ad3dffc bugfix #2931 crash if $HOME not set
unchecked pointer returned from BLI_gethome().
2005-08-13 17:20:46 +00:00
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
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
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
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
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
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
1d08915f45 ideasman fix that epydoc compile for it
.
2005-08-10 13:36:40 +00:00
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
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
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
1b0cd9340d doc to bpy TimeLine support
.
2005-08-05 18:02:49 +00:00
d033b6df7f bpy TimeLine stuff
.
2005-08-05 17:49:56 +00:00
4eb963a0f0 adding TimeLine bpy support
.
2005-08-05 17:47:48 +00:00
0f044af97e added bpy TimeLine
.
2005-08-05 17:00:26 +00:00
74820841df - removed BLO_findstruct_offset (obsolete)
- remove python access to Optimal and Subsurf flags (they don't
   work this way anymore, I suppose need to replace with python
   access to modifiers but not going to do right now).
 - removed interface access to OPTIMAL mode, needs to be rethough...
   this means at the moment subsurfs outside editmode always draw
   and render all edges
2005-08-03 19:56:27 +00:00
7d63a1f277 This patches adds support for Font, Curve, Surface and Meta Objects in
Blender.NMesh.GetRawFromObject through a displist conversion method as used by
Blender when converting them in the UI.

Notes:	Objects with only edges (3D curves/polyline without bevel) do not have
		normals, so they are all initialised to (1, 0, 0) on conversion

		Converting from meta objects only work on the "mother ball". That is,
		the object with the lower base name.
		Example: "meta" for all the "meta.*" objects.

		Meshes extracted from curve based objects (Font/2D filled curves)
		contain	both the filled surfaces and the outlines of the shapes.

		Materials are taken from the object's material list. Material handling
		in NMesh is incorrect anyway, as it always uses the materials from the
		mesh, ignoring the setting in ob->colbits.

This patch also makes the include order a little clearer.
A couple of warnings have been fixed by using better types:
	-	Using char instead of short when parsing color values.
		The "constructor" expects and uses char anyway.

	-	Explicit casting to short when storing normals back in mvert.

	-	Changing constant doubles to floats with "f" to make compiler happy.

The only warning left regards NMFace.flag which is stored as a short but is
used to fill in TFace.flag which is a char. I didn't want to change the
object's structure so I left it like that. I didn't add an explicit cast when
putting it back in TFace so that the warning can remind us that there might be
something to change there.
2005-08-01 06:01:24 +00:00
f6ff9ec608 Scripts updated:
- Jean-Michel Soler: 1) paths import -- ai module; 2) tex2uvbaker;
- Campbell Barton: obj exporter.

BPython:
- Campbell also provided a patch (+docs) to add shader data access to Blender.Material.

Again, thanks guys and sorry for the long delay.
2005-08-01 03:06:24 +00:00
4b1588e277 - update storage.c to use standard time codes (should fix issue
with MSVS 8)
 - broke mesh_create_shadedColors out of shadeDispList, used to
   build vertex colors for mesh in vpaint as well (also fixed
   bug where they were not initialized correctly for subsurfs)
 - added modifier_copyData and modifier_findByType functions
 - change editmode modifiers to only calculate if Realtime and
   Editmode bits are both set, makes more sense for copying
   modifiers
 - update object_copy to correctly copy modifiers
 - removed duplicate redefinition of ME_ attributes in python,
   this is a horrible idea, why was it done in the first place?
 - update armature auto vertex group code to check for subsurf
   in modifier stack
 - fixed flip_subdivision to work with move to modifier stack
 - added copymenu_modifiers, can copy all modifiers or just
   data from first modifier of a certain type (not sure how
   to deal with multiple modifiers of same type... not
   a big issue though I think)
2005-07-27 20:16:41 +00:00
59672145a9 Cleanup & goodies for rigging geeks! :)
- PoseMode: Wkey menu, "Flip Left/Right Names". On selected bones, it flips
  the L/R tags in names, and calls the proper code to rename everything
  that's related (constraint targets, bone-childs, etc).
- PoseMode: Shift+S snapmenu: snap cursor to selected now works
- Outliner: select bones now correctly sets 'active' flag for bones,
  updating the UI as well.
  Also made sure you cannot select hidden bones in outliner.
- 3DWindow: in PoseMode/EditMode draws name of active Bone too (with user
  option "Draw active object name" set.
- Added the new Armature/PoseMode options in View3D pulldowns.

Cleanup:

- moved Pose code from editaction.c to poseobject.c
- removed BSE_editaction.h and BSE_editaction_types.h, moved contents of
  it to BIF_editaction.h. One include per C file should be fine. :)
  I know the src/ structure would require more elaborated includes, but
  we don't have that now...
2005-07-27 10:37:20 +00:00
3e34ff9a09 _update to .NET projectfiles_
- removed wave from python
- added include path for decimation header
- added additional line to eof in point
2005-07-26 13:30:08 +00:00
951a4934b0 - added wave modifier & removed old wave effect
- added decimate modifier & removed old decimate interface
   (currently lacks warning about destroying data, and there needs
   to be a way for modifiers to return errors back to the interface)
 - allow applyModifier to return NULL to indicate error
 - unfortunately new decimate modifier means it does not know exact
   number of faces in mesh (other modifiers may come before) and so
   instead interface uses a percentage. if people need exact face
   count slider then I will have to think of some hack to fit this
   in. note that it does display the output face count so its possible
   to tweak the pct to get what you want regardless.
 - removed python Wave object

If you are bored now how much easier it is to implement something
like decimate as a modifier. Very few changes to interface, very
few entry points.
2005-07-26 02:44:59 +00:00
fb651ddb4a - change mesh_calc_normals to set vertices with len(no)==0
to normalised coordinate (convention in blender, helps with
   halo)
 - removed vertexnormals(), vertexnormals_mesh()
 - removed CTX_NO_NOR_RECALC (always assume already calculated)
 - change NMesh.c to call mesh_calc_normals
 - chance load_editMesh to call mesh_calc_normals after done
   converting instead of using editmesh normals
 - update recalc_editnormals to also calc vertex normals (whats
   4 more adds and a sqrt among friends)

Its hard to believe, but it just might be the case that there
are only two places mesh normals are calculated now (renderer
and kernel)
2005-07-23 19:03:43 +00:00
42da62679f - removed mface->puno flags, was only used to flip normals in display
and this is better left to user (whee this was a fun commit! so
   much deleting!)
 - removed mesh_calculate_vertex_normals (replaced by mesh_calc_normals)
2005-07-23 16:09:08 +00:00
d7dcadfb7a Added point.c to the SConscript file 2005-07-23 14:15:13 +00:00
6a9e7ab3f2 _new point class and update_
- adds a new point class
  * point/ vector math (p + v = p, p - p = v, etc.)
  * points can be transformed by matrices/quats
  * wraps 'place vector' type vectors that have no magnitude
- wrapped toXXX() methods work correctly
  * toXXX() will NOT wrap data (this is due to the fact that wrapped data cannot be converted)
  * added a 'wrapped' attribute to mathutils classes to determine wether the object is accessing python or blender data
- added the ability to negate vectors/points with "-vec"
  * deprecated vector.negate()
- added the ability to shorhand inverse matrices with "~mat" (tilde)
- conversion between vector/point with toXXX() methods
2005-07-23 13:46:40 +00:00
e546e81762 - added data arguments to deformer modifiers, in case someone wants
to write one that is based on geometry (and not just vertex position)
 - added editmode versions of modifier deform/apply calls and flag
   to tag modifiers that support editmode
 - added isFinalCalc param to applyModifier, basically a switch to let
   subsurf know if it is calc'ng orco or not (so it can deal with cache
   appropriately). This is kinda hacky and perhaps I can come up with
   a better solution (its also a waste to do a complete subdivide just
   to get vertex locations).
 - changed ccgsubsurf to not preallocate hash's to be approximately correct
   size... this was probably not a big performance savings but means that
   the order of faces returned by the iterator can vary after the first
   call, this messes up orco calculation so dropped for time being.
 - minor bug fix, meshes with only key didn't get vertex normals correctly
   calc'd
 - updated editmesh derivedmesh to support auxiliary locations
 - changed mesh_calc_modifiers to alloc deformVerts on demand
 - added editmesh_calc_modifiers for calculating editmesh cage and final
   derivedmesh's
 - bug fix, update shadedisplist to always calc colors (even if totvert==0)
 - changed load_editMesh and make_edge to build me->medge even if totedge==0
   (incremental subsurf checks this)

todo: add drawFacesTex for ccgderivedmesh

So, modifiers in editmode are back (which means auto-mirror
in edit mode works now) although still not finished. Currently
no cage is computed, the cage is always the base mesh (in
other words, Optimal edge style editing is off), and the final
mesh currently includes all modifiers that work in edit mode
(including lattice and curve). At some point there will be toggles
for which modifiers affect the final/cage editmode derivedmesh's.

Also, very nice new feature is that incremental subsurf in object
mode returns a ccgderivedmesh object instead of copying to a new
displistmesh. This can make a *huge* speed difference, and is very
nice for working with deformed armatures (esp. with only small
per frame changes).
2005-07-22 07:37:15 +00:00
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
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
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
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
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
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
8d2d045079 -Patch submitted by Campbell Barton
-Fixed matrix.invert() to return the correct inverse matrix
2005-07-19 14:17:07 +00:00
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
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
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
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