Commit Graph

59 Commits

Author SHA1 Message Date
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
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
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
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
75fefdc5a7 - need to release object DerivedMesh prior to release object data 2005-07-17 19:15:06 +00:00
581df16520 - add DerivedMesh *derivedDeform to struct Object, this is temporary
until fullblown modifier system comes in, need it now to move forward.
2005-07-17 05:34:35 +00:00
b3169b22b8 - convert give_parvert to use mesh_get_derived_deform 2005-07-17 01:29:12 +00:00
8d2176bfeb - removed makeDispList, set_displist_onlyzero
- appropriate callers of makeDispList replaced with depgraph calls
 - unappropriate places just killed... small chance this gives some
   errors in corner cases if dep graph isn't notified (example, font
   family displists) but these can be tracked down as they show up.
 - still a large number of callers of makeDispListCurveTypes, but
   makeDispListMesh has just a few.
2005-07-15 20:56:55 +00:00
b22e3414ca - add mesh_get_bb function to return mesh boundbox and calc if needed
- switch all mesh boundbox access to go through mesh_get_bb
 - switch object_handle_update to call mesh_changed instead of making
   the displist data immediately (delayed calculation)
2005-07-14 18:04:27 +00:00
6a648da13f Another old bug bites the dust! Actually the error was simple... but
thanks to depgraph it executes nicely now. :)

#bug 2397: frame-duplicator using Constraint not evaluated.
2005-07-13 13:56:15 +00:00
542358265b Couple of small fixes;
- cleaned up 'version correction' a bit. There was code slowing down
  current files even (armatures were evaluated all, even when not in
  current layer, was added to make sure they get converted OK).
  Send me old files that crash now! :)
- on reading older files with path-constraints, a fix had to be added.
- error "badd call to addqueue' found when using header-less window for
  filewindow
2005-07-13 13:30:51 +00:00
03c255ac1d New: Armature editmode/posemode now react correctly to HOME or Numpad-DOT
for viewing all or only selection nicely centered.

Fix: Poses without NLA or Action were reset to restposition on file read
or exit editmode.
2005-07-11 17:12:33 +00:00
d7bf5c0583 New! Pose-constraint Ipos now are integrated in NLA. ALso cleaned up the
weird disabled code that was hanging out there for ages.

Also cleaned up NLA blending itself, it was copying far too much data
around. Should be three times faster or so... need good test!

And restored Action Baking.
2005-07-09 19:37:38 +00:00
895c9a55d8 Two small fixes;
- ALT+R clear rotation on PoseMode didn't work when an Action was assigned
- 'Delete object' didn't set object pointers to NULL for Armature/Pose
  constraints (old bug)
2005-07-07 07:03:35 +00:00
4fb314b809 Action constraint works again. Needs revision though... do that with
testfiles i get from Bassam. :)

Further removed old code that was ifdeffed hanging around still.
2005-07-04 20:09:32 +00:00
28a1e8277b Result of 2 weeks of quiet coding work in Greece :)
Aim was to get a total refresh of the animation system. This
is needed because;
- we need to upgrade it with 21st century features
- current code is spaghetti/hack combo, and hides good design
- it should become lag-free with using dependency graphs

A full log, with complete code API/structure/design explanation
will follow, that's a load of work... so here below the list with
hot changes;

- The entire object update system (matrices, geometry) is now
  centralized. Calls to where_is_object and makeDispList are
  forbidden, instead we tag objects 'changed' and let the
  depgraph code sort it out
- Removed all old "Ika" code
- Depgraph is aware of all relationships, including meta balls,
  constraints, bevelcurve, and so on.
- Made depgraph aware of relation types and layers, to do smart
  flushing of 'changed' events. Nothing gets calculated too often!
- Transform uses depgraph to detect changes
- On frame-advance, depgraph flushes animated changes

Armatures;

Almost all armature related code has been fully built from scratch.
It now reveils the original design much better, with a very clean
implementation, lag free without even calculating each Bone more than
once. Result is quite a speedup yes!

Important to note is;

1) Armature is data containing the 'rest position'
2) Pose is the changes of rest position, and always on object level.
   That way more Objects can use same Pose. Also constraints are in Pose
3) Actions only contain the Ipos to change values in Poses.

- Bones draw unrotated now
- Drawing bones speedup enormously (10-20 times)
- Bone selecting in EditMode, selection state is saved for PoseMode,
  and vice-versa
- Undo in editmode
- Bone renaming does vertexgroups, constraints, posechannels, actions,
  for all users of Armature in entire file
- Added Bone renaming in NKey panel
- Nkey PoseMode shows eulers now
- EditMode and PoseMode now have 'active' bone too (last clicked)
- Parenting in EditMode' CTRL+P, ALT+P, with nice options!
- Pose is added in Outliner now, with showing that constraints are in
  the Pose, not Armature
- Disconnected IK solving from constraints. It's a separate phase now,
  on top of the full Pose calculations
- Pose itself has a dependency graph too, so evaluation order is lag free.

TODO NOW;

- Rotating in Posemode has incorrect inverse transform (Martin will fix)
- Python Bone/Armature/Pose API disabled... needs full recode too
  (wait for my doc!)
- Game engine will need upgrade too
- Depgraph code needs revision, cleanup, can be much faster!
  (But, compliments for Jean-Luc, it works like a charm!)
- IK changed, it now doesnt use previous position to advance to next
  position anymore. That system looks nice (no flips) but is not well
  suited for NLA and background render.

TODO LATER;

We now can do loadsa new nifty features as well; like:

- Kill PoseMode (can be option for armatures itself)
- Make B-Bones (Bezier, Bspline, like for spines)
- Move all silly button level edit to 3d window (like CTRL+I = add
  IK)
- Much better & informative drawing
- Fix action/nla editors
- Put all ipos in Actions (object, mesh key, lamp color)
- Add hooks
- Null bones
- Much more advanced constraints...


Bugfixes;

- OGL render (view3d header) had wrong first frame on anim render
- Ipo 'recording' mode had wrong playback speed
- Vertex-key mode now sticks to show 'active key', until frame change

-Ton-
2005-07-03 17:35:38 +00:00
244a1a71b3 Bug fix #2591
Dependency issue... could solve it by calling an extra where_is_object
when a displaylist is made for vertex-parenting on deformed objects.
2005-05-20 20:44:33 +00:00
aca394e341 On "Add duplicate object" the softbody baking info wasn't freed.
Note: currently the 'baking' stores the entire animation system, which
makes further animation refining (or duplicating) useless for a Baked
SoftBody. You can even delete the entire anim system.
This can be presented as a feature too (saves slow armature stuff).
However, I might check on a 'relative' bake too.
2005-05-12 14:00:12 +00:00
09fb5d6b8d BPython:
- Made Blender.event var (previously only used by script links) hold ascii value -- where it applies -- of current event during events callback registered with Draw.Register(gui, events, button_events).  Useful for gui scripts like Campbell's Python console. No problem using this var to hold the value, since in gui scripts it was not used (always None).

- Updated Window and Window.Theme with new theme vars and the Time space.

- Script links:

-- Added "Render" event for script links (runs twice, second time as "PostEvent", for clean-up actions). Now FrameChanged links don't run when a single pic is rendered.

-- Added "Enable Script Links" button in the script buttons tab.  Now this bit gets saved in .blends along with the rest of G.f, so users can define per .blend if they are on or off by default.  "blender -y" also disables all slinks as happened before with OnLoad ones only.

-- Other small changes in the script buttons tab:
  When a link is added (button "new"), it becomes the active one for the window, no need to press a button to reach it.
  Also, a pupmenu showing all available texts is shown when "new" is pressed, so users can choose a text w/o having to type.  Cancel the popup to leave the string button empty (link exists, but has no script assigned).  A pulldown would be better UI-wise, but it's kinda weird to show both scripts and normal texts (Blender doesn't differentiate them) in a script links pulldown.  With a popup we can show only texts ending in ".py" (not done in this commit, need opinions) and if the script has no or another extension, case of many in old and current .blend's, there's still the string box for writing its name.

-- Implemented Ton's space handler script links:

Right now only for the 3d View,  but it's trivial to add for others.  There are two types: EVENT, to receive 3d View events from a chosen window and DRAW, to draw on the window.  Ton's idea was to give scripts a controlled way to integrate better within Blender.

Here's how it works:

- scripts must have a proper header, like:
# SPACEHANDLER.VIEW3D.EVENT

and then they are shown in 3d View's View menu, "Space Handler Scripts" submenu.  Check (mark, click on it) a script to make it active.

EVENT handlers should consult the Blender.event var to get the current event, which can be compared with values from the Draw module:

import Blender
from Blender import Draw

evt = Blender.event
if evt == Draw.AKEY:
  print "a"
elif evt == Draw.LEFTMOUSE:
  print "left mouse button"
else:
  return # ignore, pass event back to Blender

Blender.event = None # tell Blender not to process itself the event

DRAW handlers are free to draw to their owner 3D View. OpenGL attributes and modelview and projection matrices are pushed before running the handler and poped when it finishes.

To communicate between EVENT and DRAW handler scripts we have the Blender.Registry module, as always.

Still need to code some nice example, which should also serve to test properly space handlers.  Simple tests went fine.

- doc updates about the additions.

=======

Note: the UI part of the space handlers and script links is of course open for changes, I just tried to make it understandable.  Probably we won't use the scriptlinks icon for "None Available" (check 3d View -> View -> Space Handler Scripts), though it hints at what space handlers are.  The tooltips may not be accepted either, since other menus don't use them.  Opinions welcomed.
2005-05-08 21:20:34 +00:00
42126cb5fc Added baking for softbodies.
Works as follows;
- press the 'show bake settings' button (no space left... :)
- define start/end frame for bake, and an interval step.
  The baked result interpolates nicely (Bspline, 4 keys) so in general a
  step size of 2 or 3 still gives OK results.
- Press "BAKE". This will do a full animation + playback. Press ESC if it
  you don't want it.

Once Baked, the BAKE button becomes a FREE BAKE. As reminder the softbody
buttons get blocked with error() menu.

This saves OK in a file. Renders any frame, including fields and moblur.
You can also set a "Timeoffs" for the softbody. And yes, this should be
in the NLA once... :)

NOTE! With this commit, files saved with the old (first commit) version by
Jens Ole won't read the settings back... he stored all sofbody variables in
Object, which was moved to a new struct when I did my first commit on SB
(over a month ago)

Also note that I moved particle deflecting & softbody to a new include.
2005-05-02 13:28:13 +00:00
Alexander Ewering
dfe3ad0d7b copy_softbody() didn't check if object actually was softbody! 2005-04-16 16:56:06 +00:00
07ef51cdb1 More SoftBody stuff:
- after grab/duplicate the softbody didn't get a reset signal
- added 'copy properties' for softbody settings
- duplicate object didn't copy softbody yet
2005-04-16 15:06:02 +00:00
8d92e6ced2 Added more dependencies to softbody, for correct recalc
For example; subsurfed softbody after play anim (ALT+A) didn't get
cleared correctly. Darn where_is_object stuff!
2005-04-03 16:57:16 +00:00
bdb86d7c67 Integration stage of Softbody project
User level notes are in Wiki here;
http://wiki.blender.org/bin/view.pl/Blenderdev/Softbodies
And will be added in blender3d.org CMS later.

Tech level notes are still pending, but here's the most relevant ones;

- made ob->soft struct SoftBody to hold all settings, and read/save in
  files
- added (temporal!) conversion for the old settings. So: read old files
  with softbody experiments now, and save over!
- cleaned API calls for softbody, which are only 5 of them now:
  sbNew()
  sbFree()
  sbObjectStep()          (animation steps)
  sbObjectToSoftbody()    (full re-initialize data)
  sbObjectReset()         (only reset motion)
- API calls accepts time in frames now, within softbody.c it converts

Further, internally code was cleaned some (missing tabs etc). Also tried
to keep a well defined structure with hints how to add support for more
objects. Can write notes about that...
2005-04-02 13:57:23 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
39959b4f21 Little warming-up getting-feet-wet coding project. :)
Much wanted feature, to have paths with children having fixed distance
offsets from each other, for example to animate a train with wagons.

Solved it with Path option (Editing buttons curve) "PathDist Offs" which
interprets time-offsets of children as blender-unit offsets. The entire
animation system still works, but offsets are calculated based on distance,
even with a CurvePath without motion (speed curve horizontal).

http://download.blender.org/demo/test/pathdist.blend

Thanks to Bassam for kicking my ass!
2005-02-11 12:42:02 +00:00
996374bb5a Fixed old annoyance; enabling true Ortho render in Blender.
It used to be a simple hack, scaling lens with 100, and moving the camera
to the back with an equivalent amount.
Because of the hack, making it 100% compatible with older files I could not
achieve (yet?). To help reminding users, I've added a print when reading
old files with Ortho cameras.

Full description of how it works can be found here;
http://www.blender3d.com/cms/Render_changes.515.0.html
2005-01-30 11:25:27 +00:00
8ff0209ca5 Bugfix #2048
Object "time" ipo was evaluated before it applied offset for field and
motion blur. Should be after! (ancient one)

in buttons_editing.c: removed sound include file
2005-01-07 18:29:54 +00:00
2b614b2be4 Fixes, after bug report Stefano:
- Dupli-Frames objects didn't render correct with Motion Blur (they moved!)
- VertexKey on Bezier paths didn't animate the 'twist' rotation. This did
  work for Nurbs paths.

Plus; removed Nabla slider from Stucci, it doesn't work for that texture.
2004-12-11 12:41:51 +00:00
aad31875d7 Special bf-committers request; Lamp/World/Material now each have 10
channels to link texture to.

The amount of code changes seems large, but is mostly getting rind of
hardcoded values (6 and 8) for channels, replacing it with MAX_MTEX.

Further did some fixes;
- Ipo for Lamp showed too many mapping channels
- Texture MapTo buttons for lamp missed the slider to blend texture color
- Lamp texture mapping "View" only worked for Spot, now it uses lamp-
  view vector for all types. (Nice for projections!)
2004-12-04 21:49:02 +00:00
0069a48897 Fix for strange (showed in windows only) error that delivered flat curve
deforms by default. Proved to be a [3] array passed on to function needing
[4] array. Bad bad...
Thanks Ole for finding it! :)
2004-11-21 10:42:42 +00:00
9326a6cf51 Report 1659
Delete object, after selecting it in Oops (not outliner!) crashed blender.
2004-10-28 14:47:53 +00:00
652427c856 Three fixes;
- bug #1307; copy full scene didn't update links in constraints
  (was an oldie bug!)
- also fixed same for Hooks, which even't didn't duplicate yet
- HOME in outliner (show hierarchy) now only does current scene
2004-10-14 08:52:12 +00:00
851c5781be - Added Outliner selection
As a means to indicate items in the Outliner to do operations on, you can
select with RMB items. Works like FileSelect here. Since selection in
Outliner is only on outliner level, no further UI updates happen. That is
reserved for LMB actions.

Implemented right now are only few operations... they can be called up with
the WKEY (the famous spare key :)
- if objects selected, a menu appears with choices
- if materials or textures selected, a meny appears to unlink them

If you make mixed or confusing selections you get a warning message.

TODO: add selection color in theme, and of course more operations.
2004-10-10 11:33:19 +00:00
04f5baee3a OK. Here's the long awaited first step (V0.01!) of SoftBody. It is called
from within mesh_modifiers (kernel deform.c). It copies vertices to a
temporal particle system (struct SoftBody with BodyPoint structs) to do
physics tricks with it.

For each frame change the delta movements (based on standard ipo anim or
even other deforms (later) are applied to the physics system. How to apply
and calculate satisfying results is not my thing... so here I'll commu-
nicate with others for.

Since it's in the modifier stack, the SoftBody code can run entirely on
original data (no displists!).

Right now I've implemented 2 things;

- "Goal" which is a per vertex value for how much the current position
  should take into account (goal=1 is without physics). This is a powerful
  method for artists to get control over what moves and not. Right now i
  read the vertex color for it.
- And some spring stuff, which now only works based on force moving it to
  the originial location. This doesnt work with 'goal'... erhm.

- You can re-use physics vars from engine, used right now is (in Object)
  - damping
  - springf (spring factor)
  - softflag (to set types, or activate softbody for it

- The SoftBody pointer in struct Object is only runtime, nothing saved in
  file

To prevent all users going to complain it doesn't work, I've hidden the
functionality. :)
The buttons to set softbody 'on' only show now (psst psst) when the object has
name "soft" as first 4 characters. You can find the buttons in the F7 Particle
Interaction Panel (which should be renamed 'physics properties' later or so.

Demo file:
http://www.blender.org/bf/softbody.blend
2004-10-01 14:04:17 +00:00
37f57288cb Lot of code... 2 new features:
1) Curve deform
http://www.blender3d.org/cms/Curve_Deform.392.0.html
Works simple as expected, but keep track of the rotation axis
in F7 buttons (Track X Y Z)
Only Mesh deform supported now.

Code changes:
- centralized deformation calls in curve_modifiers() mesh_modifiers()
etcetera. Here also other effects can be added like wave. Now the
evaluation order is fixed, but should become optional. It also doesnt
use the Displist anymore as deform-input. That latter part is unfinished
yet.
This code also is used for Hooks and will be needed for softbody

- made convention stricter that displists are being checked on in
drawobject(), this to prevent routines to make new displists recursively
(like armature does). Now a freedisplist() is sufficient to signal that
a new displaylist should be made.

2) Object Hooks
http://www.blender3d.org/cms/Object_Hooks.391.0.html
Support for Hooks is added to Mesh, Lattice, Curve and Surface objects.
For Armatures this would require some more work & research.
Main goal for this feature is to provide quick & simple access to the
underlying geometry in Objects on Object level, supporting hierarchies and
Ipos etc.
2004-09-14 19:03:11 +00:00
bf83f6ddd8 Second itteration of global undo system. Now based on:
- file-to-memory save
- incremental difference steps (compression)

everthing has been tightly coded to use minimum of memcpy or allocs. In
fact this system works with a single full buffer (=file) in memory, and undosteps as differences from it.
Speed gain is factor 4-8 faster. I've added it in CTRL+ALT+T timer menu for
a test. Please note the gain is especially in the undo-storing, not in
retrieving undo.

Also new: file read option to skip UI read (file menu). This now also is
default for the undo system.
2004-09-05 13:43:51 +00:00
4edfc3a919 Feature for Curve objects in Blender; 'tapering'.
Next to the "BevOb" button you now have a "TaperOb" button to give a name
of a curve object which defines the width of extrusion of the 'BevObj'
along the curve. The TaperOb curve typically is horizontal, where the
height denotes the width.
Important rules;
- Only the firste curve in TaperObj is evaluated
- the first width is left, last width is right
- it scales the width of normal extrusions based on evaluating the taper
  curve; which means sharp corners in taper curve won't be easily visible

(That latter feature could be improved by extrusing based on the points
in the taper curve; this is a *lot* more work)
2004-08-29 09:21:52 +00:00
f9acfa722d Renamed get_constraint_target in constraint kernel file to get_constraint_target_matrix since that's what it really does
Moved get_con_target from editconstraint to constraint kernel file and renamed to get_constraint_target

Make scene.c use constraint functions from kernel instead of doing the switch itself (regrouping specific constraint code in one file).

Add LockTrack as an option in the Make Track menu (Ctrl-T)

Adding fun for vortex forces in 3D window, the representation now match the orientation and direction of the force (this is code will need optimisation). I'll probably be slapped for mixing two things in one commit but some function calls needed to be fixed for the new spelling and since this is really isolated code I didn't feel like wasting time getting a fresh copy, doing the changes and then readded this after commiting.

Fixed some warning regarding implicit casts and constants (this last one is a MSVCism where you need to explicitely tell the compiler to use floats with an f. AFAIK, it doesn't affect/bother other compilers).

Removed a useless commented piece of code in readfile (there was an uncommented copy a couple of lines before)
2004-08-16 01:14:18 +00:00
d0da285547 Fixed small annoyonce that was there for long;
New objects were not created with correct 'ipowin' value, to denote the
default ipo to show. That caused sometimes wrong display with weird empty
menu button in header.
2004-07-26 22:46:56 +00:00
97bba404fb Demo mode and BPython:
- small additions and fixes to enable the demo mode;

- Added sleep() to Blender.sys and 17 new functions to Blender.Window module:
    things to help demo script writing and as a bonus read / write access to Blender's input event queue;

- updates in docs, those interested please check Window.py in python/api2_2x/doc/ to read about the new Blender.Window functions.

----

Demo mode should be working well now for (I) playing rt animation -- aka ALT+A -- and (II) rendering pics and anims and playing anims.  I'll still add access to radiosity data and functions.

PS: Joseph Gilbert made (II) possible with the Scene.Render module he added for 2.32.  He's been coding great things for bpython, so I'd like to take the chance to point that and thank him here.
2004-07-16 03:08:43 +00:00
e750478ce3 The revised patch from Leon for new particle effects.
New is that objects can have a force field, and Meshes can even deflect
(collide) particles. This is in a new sub-menu in Object buttons F7

The full instructions where on the web, Leon mailed it me and I will put
it in CMS tomorrow. For those who like to play with it now, here are demo
files:

http://download.blender.org/demo/test/

Quite some changes where in the integration though... so previous created
particle deflectors will not work. Changes to mention now are:
- gravity is renamed to 'force field'
- force field and deflector options are in Object now, not in Mesh
- the options also have its own struct, doesnt add to Object by default
- force fields are possible for all object types, but only work on center.
  So empty objects are typical for it.

Work to do:
- add draw method in 3d win to denote forcefield objects
- check on the UI (panel with different size?)
- add 'recalc' button in deflector panel
2004-06-26 18:18:11 +00:00
6b51c684f1 NEW! Blender now displays flipped (negative scaled) Objects correctly in
OpenGL draw.

(BTW: the previous commit also solves raytrace errors with negative scaled
objects...)

Further a cleanup of displaylist flags and object/base flags. The #define
ACTIVE is moved to filesel.c (only used here).
The GONNA_MOVE #define got a OB_ added in front.
2004-05-29 16:17:46 +00:00
09b19aead2 Revert the changes I did in solve_constraints.
The real bug is in the matrices blending function which doesn't handle non-uniform scaling correctly.
I've minimized the occurence of the bug by calling the blending function only when the influence is smaller than one (woah, optimisation AND bug fix!)
This should make the bug disappear approximatly 90% of the time since people don't use influence all that often (also, this only applies to constraint that are alone, not using influence IPOs to switch between two constraints).

I'd solve the blending function bug, but I haven't had much time to dig into it really.


Incidently, by reverting to the previous code, this solves bug #1069 http://projects.blender.org/tracker/index.php?func=detail&aid=1069&group_id=9&atid=125
2004-04-04 17:23:51 +00:00
9206a1eba6 - replaced G.{edve,eded,edvl} with G.editMesh, atm just a structure to
hold the three lists, nothing major, but gives a place to hang data
    off of and a single "mesh" structure to pass around for editing
    functions.
2004-03-28 08:46:35 +00:00
44a74dbf29 - added editmesh_[de]select_by_material function
- added mesh_set_smooth_flag, mesh_delete_material_index function
 - isolated some globals
 - got rid of reliance on meshdata in buttons_editing.c and material.c
2004-03-20 23:59:57 +00:00
aedf456938 - split the data structures that actually constitute a mesh
(MVert,MFace,etc) off into DNA_meshdata_types.h, to isolate areas
    of source that actually edit mesh *data* vs. areas that just edit
    mesh object information.
2004-03-20 22:55:42 +00:00
44cf2c587d Constraint blending and accumulator fixes for bug #924 and #983
924: Constraints (especially tracking) on objects with non uniform scaling was screwing the orientation of the object badly
983: Two or more Follow Path constraint on one object was fubar

Fixing 983 enables nice tricks like this: http://www.clubinfo.bdeb.qc.ca/~theeth/Work/Path.blend

URLs for both bugs:
http://projects.blender.org/tracker/index.php?func=detail&aid=924&group_id=9&atid=125
http://projects.blender.org/tracker/index.php?func=detail&aid=983&group_id=9&atid=125
2004-03-09 17:21:08 +00:00
4a8f52f619 Converted the Userpreference buttons to zr's new ButBit calls.
Also added USER_*  to each define located in DNA_userdef.h.
2004-01-13 14:50:45 +00:00