Commit Graph

33 Commits

Author SHA1 Message Date
33accdb725 use (const char*) rather than (char*) where possible.
also removed some unused function definitons.
2011-11-05 11:04:28 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Nathan Letwory
22638e22ea doxygen: blenkernel under core as module. 2011-02-18 13:05:18 +00:00
51dcbdde03 use 'const char *' by default with RNA functions except when the value is flagged as PROP_THICK_WRAP.
Also use const char in many other parts of blenders code.

Currently this gives warnings for setting operator id, label and description since these are an exception and allocated beforehand.
2010-11-17 09:45:45 +00:00
8517a7a3cd Fix #20965: metaballs partticles and volume material crash rendering
Fix #21187: 2.5svn26947 - particles + meta sphere = crash in rendering

Use separated displists for mballs in view3d and render stuff.
Do not recalculate displist for view3d while rendering - mball.c
uses several global variables which shouldn't be accepted from
parallel threads.
2010-06-28 11:07:02 +00:00
1e9bf0cfdb spaces -> tabs, (4 spaces == 1 tab, only for white space preceding text) 2010-03-22 09:30:00 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
b8dac71bda 2.5
- restored three more C files: editlattice, editkey
  and editgroup
- editmode lattice working, (mouse select works)
- accidentally removed yesterday 3d cursor drawing
- removed global editLatt entirely now.
2009-01-13 15:18:41 +00:00
637ffd1dfb 2.5
More globals discovered; lattice deform stored static
deform array and a matrix. Tsk!
2009-01-07 16:05:55 +00:00
f7cb86df3a 2.5
Think global, act local!

The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.

Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
  meant for permanent, but it can probably stick there until we
  cleaned the anim system and depsgraph to cope better with
  timing issues.
- Game engine G.scene should become an argument for staring it.
  Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
  is too tightly wrapped to do it easily.
2009-01-04 14:14:06 +00:00
ca80578e4e Simple warning fixes 2008-11-04 01:05:44 +00:00
ec462b8cea Added Lattice vgroup support to shrinkwrap and simple deform modifier. 2008-11-03 23:17:36 +00:00
Chris Want
5d0a207ecb Patch from GSR that a) fixes a whole bunch of GPL/BL license
blocks that were previously missed; and b) greatly increase my
ohloh stats!
2008-04-16 22:40:48 +00:00
7accd3a662 Long outstanding feature request: "Multi Modifier"
This allows to mix between the result of 2 modifiers, with both
using the same input state. This is useful for having a mesh deform
and armature deform working together.

However! This functionality could have been presented better...
this is actually Node editor stuff!

Now it works by adding a "MM" button, next to the "overall vgroup"
option. If MM is pressed, the input of this modifier is the same as
the input of the previous modifier.
Only the armature modifier has this option now...
2007-11-16 15:46:59 +00:00
8742899f5e Armature CrazySpace Improvement
===============================

An improved CrazySpace correction is now used for Armature modifiers that use
vertex groups, and that are the first enabled modifiers in the stack. This is
a a specific case, but also a common one.

http://www.blender.org/development/current-projects/changes-since-244/skinning/

Implementation Notes:

- The quaternion crazyspace correction is still used for modifiers other than
  the armature modifier.
- Modifiers can now provide a deform matrix per vertex to be used for
  crazyspace correction, only the armature modifier implements this now.
2007-07-28 21:04:30 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
35d6c6e695 Two wonderful new NLA & Armature editing features!
- FORWARD CYCLING & MATCHING

Up to no now, adding multiple actions in NLA with walkcycles required to
animate them standing still, as if walking on a conveyor belt. The stride
option then makes the object itself move forward, trying to keep the foot
stuck on the floor (with poor results!).
This option now allows to make walk cycles moving forward. By
indicating a reference Offset Bone, the NLA system will use that bone to
detect the correct offset for the Armature Pose to make it seamlessly going
forward.

Best of all, this option works as for cyclic Action Strips as well as for
individual Action Strips. Note that for individual strips, you have to set
the strip on "Hold". (Might become automatic detected later).

Here's an example edit image for NLA:
http://www.blender.org/bf/nla_match-cycle.jpg
And the animation for it:
http://download.blender.org/demo/test/2.43/0001_0150_match.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_matching.blend

Using this kind of cycling works pretty straightforward, and is a lot
easier to setup than Stride Bones.

To be further tested:
- Blending cycles
- matching rotation for the bones as well.

- ACTION MODIFIERS (motion deformors)

The above option was actually required for this feature. Typically walk
cycles are constructed with certain Bones to be the handles, controlling
for example the torso or feet.
An Action Modifier allows you to use a Curve Path to deform the motion of
these controlling bones. This uses the existing Curve Deformation option.
Modifiers can be added per Action Strip, each controlling a channel (bone)
by choice, and even allows to layer multiple modifiers on top of each other
(several paths deforming motion). This option is using the dependency graph,
so editing the Curve will give realtime changes in the Armature.

The previous walkcycle, controlled by two curves:
http://download.blender.org/demo/test/2.43/0001_0150_deform.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_actiondeform.blend

Action Modifiers can be added in the NLA Properties Panel. Per Modifier you
have to indicate the channel and a Curve Object. You can copy modifiers from
one strip to another using CTRL+C (only copies to active Object strips).

Setting up a correct Curve Path has to be carefully done:
- Use SHIFT+A "Curve Path" in top view, or ensure the path is not rotated.
- make sure the center point of the Curve Object is at the center of the
  Armature (or above)
- move the first point of the curve to the center point as well.
- check if the path starts from this first point, you can change it using
  (in Curve EditMode) the option Wkey -> "Switch Direction"
- Make sure alignment uses the correct axis; if the Armature walks into
  the negative Y direction, you have to set in Object Buttons, "Anim settings"
  Panel, the correct Track option. (Note; option will probably move to the
  Modifier later).

This is a good reason to make such paths automatic (on a command). Is on the
todo list.

Also note this:
- the Curve Path extends in beginning and ending, that's (for now) the default,
  and allows to use multiple paths. Make sure paths begin and end horizontal.
- Moving the Curve in Object Mode will change the "mapping" (as if the landscape
  a character walks over moves). Moving the Curve in Edit Mode will change the
  actual position of the deformation.
- Speed (Ipos) on paths is not supported yet, will be done.
- The Curve "Stretch" deform option doesn't work.
- Modifiers are executed *after* all actions in NLA are evaluated, there's no
  support yet for blending multiple strips with Modifiers.
- This doesn't work yet for time-mapping...

This commit is mostly for review by character animators... some details or
working methods might change.
This feature can also be used for other modifiers, such as noise (Perlin) or
the mythical "Oomph" (frequency control) and of course Python.

Special thanks to Bassam & Matt for research & design help. Have fun!
2006-10-31 15:51:57 +00:00
ddbfb04642 * Changed the Curve Modifier to have it's own X/Y/Z axis deform direction
settings, rather than using the object's TrackX/Y/Z/etc buttons.

 This is good for two reasons: a) having the settings over in the object buttons
 before was terribly unintuitive and hidden, now it's more visible how to
 control the deformation, and b) now if you have more than one curve modifier,
 they can have their own settings, instead of being forced to use the object
 level data.
2006-10-28 16:48:56 +00:00
12a732fc20 Added a VGroup input to the Armature modifier. This allows the user to specify
a vertex group which will modulate the influence of all bones in the armature.

This commit also tidies up the height of the modifier panels; they should all
have the same size margin now.
2006-08-28 21:56:58 +00:00
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
197fdd2e36 Curve and Lattice deform Modifiers now accept optional Vertex Group name
to finetune deform further as well.
Note that curve deform requires object buttons 'track' and 'up' axes set
properly. Curve deform can twist/flip a lot, making Vertex Group based
deform hard to set up.
2005-10-20 18:52:29 +00:00
9409eaf92e Another option for more Armature deform control;
The "Use VGroup" or "Use Envelope" options now are in Modifier Panel
for Armature deform.
If Modifiers are in use, they override the Armature settings for it.
(Cannot get rid of the Armature panel options yet, since Blender still
allows parenting to be deforming too, which is displayed as a Virtual
modifier now)

This now allows to - for example - make a Envelope deform on a Lattice,
and have same Armature use vertexgroups on Mesh.

Next; vertexgroup option for Lattice & Curve deform
2005-10-20 16:31:46 +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
74623f33aa - get rid of unused object_deform_curve
- some tweaks to modifier UI thanks to Bart (aligning buttons)
2005-08-15 00:53:51 +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
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
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
5ac0d4fd26 Cleaned the apply deform code in Blender. Now also using the modifier code.
Right now, it works for Meshes (all deformers including Curve) and for
Curve/Surfaces (only hooks).

More follows.
2004-09-28 16:18:22 +00:00
0d4300eb49 - added object_apply_deform, removed lt_applyflag global 2004-03-20 22:06:01 +00:00
f1c4f705a1 Removed the config.h thing from the .h's in the source dir.
So we should be all set now :)

Kent
--
mein@cs.umn.edu
2002-12-27 13:11:01 +00:00
b9a19f1ea7 Did all of the .h's in source
(adding)
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

also the Makefile.in's were from previous patch adding
the system depend stuff to configure.ac

Kent
--
mein@cs.umn.edu
2002-11-25 11:16:17 +00:00
01bff70383 fixed spacing in the headers to get rid of some warnings and some other
little minor spacing issues.
2002-10-30 02:07:20 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00