Commit Graph

3678 Commits

Author SHA1 Message Date
Daniel Dunbar
e6e9b1ea80 - replace displistmesh_calc_normals by mesh_calc_normals
- convert MeshDerivedMesh to calculate new vertex normals and such
   on initialize, means copy free conversion to DispListMesh
 - replace vertex access through function by direct access fo
   MeshDerivedMesh
 - shadeDispList was not getting correct orco's
2005-07-17 20:12:16 +00:00
Daniel Dunbar
75fefdc5a7 - need to release object DerivedMesh prior to release object data 2005-07-17 19:15:06 +00:00
Ton Roosendaal
141e577353 More fixes thanks to irc testing;
- On exit editmode and after deleting bones, a pointer in PoseChannels
  was not set NULL correctly, causing potential crashes.
- Action Window: select on 'ipo key' (little icon) didn't select/deselect
  the associated bone (old bug!)
- After unlinking an Action, the blue color in bones was not cleared

Also:

- Improved selection in editmode, doing it in 2 stages. Makes it a lot more
  accurate.
2005-07-17 19:08:04 +00:00
Daniel Dunbar
a229931ce6 - switch shadeDispList to use DLM face normals if available 2005-07-17 18:51:50 +00:00
Daniel Dunbar
033f3d5126 - switch shadeDispList to always using DispListMesh from
mesh_get_derived_final... a bit slower atm because of extraneous
   copying (will be fixed shortly) but normals are correct for deformed
   meshes now (don't think they ever have been)
2005-07-17 18:37:27 +00:00
Daniel Dunbar
f79ff93497 - assorted fixes for drawing "Text" tfaces 2005-07-17 18:31:39 +00:00
Daniel Dunbar
3d155330e1 - remove extverts argument from vertexnormals_mesh
- changed new_NMesh_internal to not take extverts argument
2005-07-17 18:22:23 +00:00
Daniel Dunbar
61fe766897 - removed unused DL_TRIA type 2005-07-17 17:43:15 +00:00
Daniel Dunbar
726aea881c - convert mesh_modifier to return deformed verts instead of
leaving in a DL_VERTS type displist (and modifying mesh)
 - removed DL_VERTS displist type (woot woot)
 - makeDispListMesh now puts deformed verts in object->derivedDeform
 - switch over other system parts to new deformed vert storage,
   still kinda hacky and maybe some inconsistencies... will be
   sorted out soon enough.
 - moved build_particle_system to makeDispListMesh... this may have
   adverse side effects, needs to be sorted out with depgraph system
2005-07-17 17:41:03 +00:00
Ton Roosendaal
fdaf1c6eac Three fixes, thanks to irc reporting of Basse & Sten;
- Bone points for B-Bone drawing were not adjusted for size of Bone, now
  they draw same size as for other bone type
- Deleting bones in editmode didn't check for constraints in Pose, causing
  weird collapsed poses or even crashes
- ALT+S scaling on B-Bones in editmode didn't correct for the Object scale.
2005-07-17 17:36:54 +00:00
Daniel Dunbar
099b3e786c - made particles use displistmesh not DerivedMesh interface 2005-07-17 17:33:09 +00:00
Daniel Dunbar
675f18707e - back out ton's vertex_duplilist "fix" 2005-07-17 16:16:22 +00:00
Ton Roosendaal
5aa6ca6960 Wire selecting in Armature editmode accidentally broke. :) 2005-07-17 16:04:53 +00:00
Daniel Dunbar
51fe322063 - add extern to selboxes variables declaration 2005-07-17 16:02:10 +00:00
Ton Roosendaal
261bd94e7f Fix: outliner crash on deleting bones in editmode
Further cleaned up editmesh code to be warning free and to have a little
nicer style :)
2005-07-17 15:45:35 +00:00
Ton Roosendaal
d5ccd35f4c While checking old bugreports on the todo tracker, found weak issue in
current depgraph... that's when an object has multiple "parents", which
have different relation types. (one parent moves Object, the other
deforms). In that case the result was undefined.

Solved it nicely with the DAG building code, resulting in quicker flushing
of changes even.
Also noted a bug in the drawview.c 'object_handle_update' call, which
should not check for layers. The DAG flushing clears recalc flags for
invisible layers, if possible. Now need to write that @#!# doc!
2005-07-17 12:20:08 +00:00
Ton Roosendaal
3ab974ca58 Bugfix #2836
Crash in Vertex-duplicator when there's an empty Mesh. Simply added check
for dm pointer. :)
2005-07-17 09:49:02 +00:00
Ton Roosendaal
ef73b6f140 New: B-Bones now support adjusting the 'handle length', with the values
"In" and "Out" in the new posemode Panel, editing buttons.

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

Fix in image.c: just an unitialized variable.
2005-07-17 08:58:42 +00:00
Ton Roosendaal
a8a69f5f63 - The "in" and "out" interpolation values for B-Bones were not copied to
and from editmode Armature

- Altered 'axismat' for PoseMode bone transform. Fix for bug #2769, bone
  rotations using hotkey-constraints (R, Y, Y) didn't work well.
2005-07-17 08:56:51 +00:00
Daniel Dunbar
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
Daniel Dunbar
e1c653c5c3 - convert vertex_duplilist to use mesh_get_derived_deform
- convert object_apply_deform to use mesh_get_derived_deform
 - convert build_particle_system to use mesh_get_derived_deform
 - remove apply option from mesh_modifier

What do you know, this leaves only one callsite for mesh_modifier
and one "user" site for DL_VERTS...
2005-07-17 05:20:57 +00:00
Daniel Dunbar
e6f4527813 - added DerivedMesh.getMinMax function (calls DO_MINMAX on all vertices)
- static'd boundbox_displist
 - added getMinMax implementations for all existing DerivedMesh
   implementations (mesh, editmesh, displistmesh, and ccgsubsurf)
2005-07-17 04:17:33 +00:00
Daniel Dunbar
80327e675a - converted draw_tfaces3d and bbs_mesh_solid to use
mesh_get_derived_deform... (whats that? more general AND it uses less
   lines? how can that be!!!)
2005-07-17 03:48:29 +00:00
Daniel Dunbar
b3169b22b8 - convert give_parvert to use mesh_get_derived_deform 2005-07-17 01:29:12 +00:00
Daniel Dunbar
bbb83af14c - converted write_videoscape_mesh to use mesh_get_derived_deform 2005-07-17 01:23:43 +00:00
Daniel Dunbar
67d58c0f45 - added DirectMesh.getVert{Co,No} functions
- added mesh_get_derived_deform function (always returns a DerivedMesh
   corresponding to deformed (but not subdivided) mesh). used in places
   where original mesh is to be displayed but with deformed coordinates
   (vpaint for example).
 - added DirectMesh.getVert{Co,No} implementations for MeshDerivedMesh
 - updated vpaint to use mesh_get_derived_deform
2005-07-17 01:18:59 +00:00
Erwin Coumans
7c9422111b another file behind the #USE_BULLET 2005-07-16 22:13:20 +00:00
Alexander Ewering
851d4016f8 Reverted to good line endings 2005-07-16 22:02:59 +00:00
Erwin Coumans
2d73b31aff preparation for bullet physics 2005-07-16 21:47:54 +00:00
Daniel Dunbar
3166974a67 - switch M_NMesh_GetRawFromObject to always get mesh data from
DerivedMesh (needs testing)
 - added needsFree argument to mesh_get_derived_final
2005-07-16 21:20:44 +00:00
Daniel Dunbar
d2fb9ae533 - added dontFreeNors flag to DispListMesh as well
- changed mesh_get_derived_render to always return a DerivedMesh (even if
   no subsurf)
 - changed init_render_mesh to always get the mesh data through a
   DerivedMesh
2005-07-16 21:16:05 +00:00
Daniel Dunbar
6dd382f966 - added dontFreeVerts and dontFreeOther flags to displistmesh for
situations where data can be shared easily.
 - added convertDisplistToMesh function for regular mesh DerivedMesh
   interface (how many times can *you* use mesh in one sentence?)
 - do_puno was uninitialized in init_render_mesh
 - added mesh_get_derived_final (temporary), difference from
   mesh_get_derived is it always returns a derived mesh, even if
   no subsurf.
2005-07-16 21:03:28 +00:00
Daniel Dunbar
0d806074b3 - remove call to mesh_modifier from init_render_mesh, shouldn't
be needed anymore
2005-07-16 20:42:20 +00:00
Ton Roosendaal
e67ba0ae33 More armature goodies;
The B-Bones!
(where the B can be read as 'block' or 'bezier' or 'b-spline')

- set option on/off in edit buttons, armature panel
- scaling of B-bones only works in editmode, use ALT+S to make bones fatter
  or thinner. Also works for constrainted transform
- In pose mode, you now have a buttons panel with per-bone settings too
  Here you can find the "segments" button, which allows bones to
  interpolate between previous/next bones, including roll.
- Buttons to control interpolation ("In" and "Out" are disabled, doesn't
  work satisfying yet

NOTE: this doesn't give deform yet! Main purpose for now is to test if this
drawing method serves to animate/pose armatures well.
Still need to review proper interpolation methods... maybe bezier is too
limited.
2005-07-16 19:07:02 +00:00
Erwin Coumans
502c34ee49 added Bullet physics binding files 2005-07-16 10:15:31 +00:00
Erwin Coumans
1921a356be Added type for Bullet collision detection and physics engine.
This will improve collision detection and physics for the game engine (Ketsji).
Bullet uses optionally uses the ODE quickstep solver.

Hope this commit doesn't break everything.
2005-07-16 09:55:22 +00:00
Alexander Ewering
3be3e68e2f Fix radiosity "Collect Meshes" to ignore TFaces set to "Invisible".
I hope this doesn't break anything - works fine here.
2005-07-16 01:06:55 +00:00
Daniel Dunbar
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
Daniel Dunbar
10d865df25 - remove calls to showkeypos from exit editmode functions, should be
handled by DAG update now. (ton: please confirm)
2005-07-15 18:15:56 +00:00
Johnny Matthews
e0dd08dc52 Part #2 to vert color fix in new subdivide, Please check UV and Vertcolor with new subdivide.
Was checking for a condition < 0 should have been > 1
2005-07-15 18:13:21 +00:00
Daniel Dunbar
8c2df5ddd1 - missed a space in header title text 2005-07-15 17:57:40 +00:00
Daniel Dunbar
0be013010f - decided it made more sense to make a key_get_active function, switched
to that in editmesh as well as for edit{curve,lattice}
 - added a G.editModeTitleExtra string that gets displayed in header info
   string in editmode. currently used to display "(Key)" when editing a
   key (before there was not UI level display of this info).
2005-07-15 17:55:19 +00:00
Daniel Dunbar
5263d588c1 - removed unused actkey field from struct Key 2005-07-15 17:35:10 +00:00
Daniel Dunbar
925c024653 - more signedness warning fixes in editsima
- added mesh_get_active_key and replaced code in editmesh to use this
 - removed obsolete code in object_deform
2005-07-15 17:31:58 +00:00
Johnny Matthews
e85355b710 Part #1 of the fix for UV colors in new subdivide code
UV colors on Tri's should go right now when subdivivded,
for Quads, 3 of the for points should be right. Still working on the 4th.
2005-07-15 16:12:34 +00:00
Daniel Dunbar
573f86bc3c - remove some redundant drawing code
- mousewheel zooming in drawipo used uninitialized var (MSVC run time
   error).
2005-07-15 15:00:08 +00:00
Daniel Dunbar
2501bc1ad6 - static'd several functions in key.c, just for readability 2005-07-15 14:50:48 +00:00
Martin Poirier
6f264a0e5b BPY Support for Deform Parenting and Vertex Parenting
This adds two new method to the BPY Object type:
 - makeParentDeform
 - makeParentVertex

Both are based on makeParent. In fact, I splitted off the parenting
part of makeParent into an internal function so that all can reuse it. I
also added DEP_graph refresh flag that where missing.

makeParentDeform sets the parent type accordingly for correct
deformation (armature and curve) and checks if the parent and childs are of the
correct type for deformation.

makeParentVertex takes as additional mandatory argument a tuple of
indices to tell the parent which vertex to use. It does some object type
checking too.

Also included documentation. :)

Test file is in the patch there: http://projects.blender.org/tracker/?func=detail&atid=127&aid=2833&group_id=9

Note to Ton: When doing vertex parenting, the dashed parent line is only updated correctly if the objects are on screen when calling the function. If they aren't, the line is wrong and is only corrected when another recalc is called on the parent or child.
2005-07-15 05:30:58 +00:00
Daniel Dunbar
5332854a7b - more warning killing: unused vars, double -> float constants, signedness 2005-07-14 22:21:12 +00:00
Daniel Dunbar
480b8ce10b - switch em_{vert,solid,wire}offs to be unsigned
- some other twiddles to fix mixed signedness compiler warnings

And from the "Dear lazy programmers" file: After you have extern declared
a variable 5 or more times at the top a function, you would have actually
saved a lot of effort by just putting it in the header where it belonged.
Or perhaps you thought by hiding it no one else would notice you were
using global variables to pass information around. Tsk tsk.
2005-07-14 22:16:38 +00:00