Commit Graph

22567 Commits

Author SHA1 Message Date
Joshua Leung ae22d97c45 Constraints API: ID-Loopers
Added a system for running a callback on all the ID-blocks referenced by constraints (like for modifiers). Also, added an API function which calls these on the constraints present in the given list.

These could be used for:
- the proxies + action/pyconstraint fix that campbell committed
- simplification of file loading code
2010-02-06 11:28:22 +00:00
Andrea Weikert df2ed25558 MSVC compile fix
* needed to add _USE_MATH_DEFINES to make M_PI known
2010-02-06 10:50:34 +00:00
Dalai Felinto b2926cf8e2 BGE: rna update for Logic Bricks
New Actuators done:
* SCENE
* RANDOM
* MESSAGE
* GAME
* VISIBILITY
* TWODFILTER
* PARENT

Actuators to be done:
* OBJECT (aka MOTION)
* SOUND
* PROPERTY
* CONSTRAINT
* EDIT_OBJECT
* ACTION
* SHAPE_ACTION
* STATE
* ARMATURE

Actuators done already:
* IPO
* CAMERA

once again: feedback is appreciated.
2010-02-06 06:21:42 +00:00
Dalai Felinto 443d913f72 BGE: rna update for Logic Bricks
Sensor and Controllers: small fixes and suggestion (comments) for future improvement - mainly to replace text properties to material, text or object datablocks.

Actuators done:
* IPO
* CAMERA

Actuators to be done:
All the others (their structure is in the file)

Adding NC_LOGIC

** If someone want to help on that:
Files used for actuator RNA:
- logic_window.c
- DNA_actuator_types.h

*** my first big RNA operation. critics/suggestions are welcome

**** padded some DNA variables that were not been used.
2010-02-05 23:50:33 +00:00
Joshua Leung 29a6465ed4 Bugfix #20971: IK Joints Inexplicably Stiff In Recent Blender 2.5 Builds
- IK-Solver interfaces were still converting units from degrees to radians. Made these all use radians now.

- Tried to fix the DOF limits drawing. This is still not totally functional again yet, but at least there are visible lines now.
2010-02-05 22:03:19 +00:00
Joshua Leung 5affc83eb2 Disabled ability to animate FPS setting, since this was producing weird and crazy effects for when viewing timecodes.
See http://www.pasteall.org/blend/1769 and switch to timecode displays in the timeline (Ctrl T) to see the effects of this (in an old build).
2010-02-05 21:23:07 +00:00
Arystanbek Dyussenov ebf491b111 Merge -c 26630 from COLLADA branch into trunk. 2010-02-05 18:39:04 +00:00
Campbell Barton e7741a9dc4 changes to 'view selected' operator.
- near clipping is not used to clamp minimum zoom level in ortho mode.
- view selected applied to a single point (no bound-box volume) just moves the view rather then zooming in.

for sintels face view selected didnt work well for eg: selecting a face at the mouth and zooming in.
2010-02-05 15:55:45 +00:00
Campbell Barton a1d2b84222 patch [#20910] Support for exporting UV layouts to EPS files
also improved this so visible UVs are exported unless 'All UVs' is enabled, taking into account local-view and mesh face selection.
2010-02-05 15:20:12 +00:00
Campbell Barton 31955feba1 active face was incorrectly set on entering editmode. 2010-02-05 15:07:44 +00:00
Campbell Barton 2973ffbb49 add menus for vertex group and shape key panels, functionality wasnt communicated well with icons and getting cluttered.
also made 'transfer shape' script copy into the active object to match 'join as shape', which was quite confusing before.
2010-02-05 14:29:05 +00:00
Campbell Barton 61755860ea VBO's face index was incorrect, didnt see this break anything but was giving the triangulated index (always wrong for quads). 2010-02-05 13:40:43 +00:00
Campbell Barton 236b533015 [#20462] Weight painting subsurf mesh doesn't work with VBO
- backbuf colors were ignored with VBO's, disable since to make this work with VBO's it would need to re-bind a color array, then restore the previous one after.
2010-02-05 13:38:41 +00:00
Joshua Leung 65af2e2d48 Bugfix for "Show Only Selected" option and Bones (in Animation Editors):
If you have some bones selected, and then hide their layer, they would stay selected + visible even when you make another selection. Now, they are hidden and are no longer visible when they aren't on visible layers. 

Currently, this is only done if the channels are being filtered by visibility, but this could easily be changed to do without this check. Will see how this goes after some production testing. :)
2010-02-05 11:52:51 +00:00
Joshua Leung c1bbda703f Armature Drawing - Active Bone:
Active bones are now only highlighted if they are also selected. This reduces confusion over when something will get moved/edited.
2010-02-05 11:39:58 +00:00
Campbell Barton 29e11e3ef4 bugfix for proxying linked objects & action constraints, reference to linked actions were being lost. 2010-02-05 11:32:27 +00:00
Campbell Barton 061f258d69 bugfix [#20936] Making lasso-selection of verts in weightpaint-mode "misses target"
xray objects can overwrite the view's obmat.
2010-02-05 10:17:43 +00:00
Joshua Leung 2a39fc2bb5 Fly Mode Bugfix: Animation recording works again 2010-02-05 08:14:33 +00:00
Joshua Leung ba6d50c3d3 Bugfix #20975: Deleting a constraint causes segfault
Missing null checks in API functions.
2010-02-05 06:05:24 +00:00
Dalai Felinto f7a24a25ba BGE: Sound Actuator API
act.time can set the sound position (float in seconds)
act.is3D RO gives you the dimension of the audio
act.minGain3D, maxGain3D ... set the 3D parameters of the sound

** PyDoc to be done. Jörg Müller (NeXyon) do you want to document them? The file is here:
//source/gameengine/PyDoc/GameTypes.py


+ adding a missing \n to KX_Scene.cpp. (kind of typo)
2010-02-05 00:51:32 +00:00
Dalai Felinto f32df64d2b BGE fix: KX_Lamp using strcmp wrongly + typo in rna_define 2010-02-04 23:51:41 +00:00
Tom Musgrove 26a69496ba fixing blenderplay compiling 2010-02-04 23:03:08 +00:00
Campbell Barton 9c5a752c49 use the camera's lens angle as radians. 2010-02-04 21:48:10 +00:00
Campbell Barton fe5b216030 access spot size in radians from python. 2010-02-04 19:24:20 +00:00
Campbell Barton eedf5cbe89 reading in hair with dynamics wasnt working but mostly crashed when duplicating the object.
from reading all places dynamic hair is used I think these changes are correct (cloth seems to share pointcache with the psys) but its not obvious.

jahka: please check this is ok.
2010-02-04 16:54:25 +00:00
Campbell Barton eaca7fa8b5 when autodepth is enabled use the z-depth for placing the cursor. 2010-02-04 16:30:28 +00:00
Campbell Barton a6bbdae805 sync the custom transform option for proxies 2010-02-04 10:42:15 +00:00
Campbell Barton b7e3862b55 fix for crash when deleting duplictaed objects with particle systems
cloth modifier was copied but not assigned to the new psys.
2010-02-04 09:59:05 +00:00
Joseph Eagar 843b0e343b ghash tweak to not do so much preallocation 2010-02-04 00:17:25 +00:00
Benoit Bolsee 0020de72e4 BGE: Optimize Soft body conversion: don't create BVH structure.
A btBvhTriangleMeshShape object is created when converting
a mesh to physics, also in case of Soft body although the
soft body will not use it (it only uses the mesh interface).

This patch keeps this system for compatibility with the
KX converter but avoids the creation of the BVH structure,
which consumes a lots of CPU. This should speed up
significantly the conversion of large mesh to softbody.

A secondary optimization is that the sharing of shapeInfo
is extended to rigid body using gImpact. Before it was
only active between static body and soft body.
2010-02-03 21:41:03 +00:00
Campbell Barton 02d9da1d5d [#20681] Text beveling works incosistently when not justifying text left
as changed in 2.4x
2010-02-03 21:33:22 +00:00
Joshua Leung 7516a56cb7 Small tweaks to Knife Cut
- Number of multicuts can now be set (only usable for multicut mode)
- Midpoint cutting is now done using shift-k + drag hotkey mapping

These were just minor properties changes, which shouldn't be too much of a hassle for BMesh merging.
2010-02-03 21:33:15 +00:00
Benoit Bolsee ec5788925c Add btBvhTriangleMeshShape::buildOptimizedBvh() in preparation of next commit. This patch has been approved already and will be in Bullet 2.76. 2010-02-03 21:20:06 +00:00
Benoit Bolsee b6c643c19f Update MSVC project files. 2010-02-03 21:14:50 +00:00
Martin Poirier 9916e0193c New Transform 3D view recalculate scheme.
Only recalculate changes when absolutely necessary (mouse move triggers a soft recalc that will only happen before the next redraw other events trigger hard recalcs). The problem was that mouse moves are reported as lots of events (with small dx,dy) between each redraw which would trigger often heavy recalculations every time while only the last one was really important (the one before the redraw).

This makes snap project (retopo) much more manageable but induces a very small lag equal to one refresh cycle. Confirming transform does a hard refresh, so the final result is always consistent with mouse position.
2010-02-03 21:01:41 +00:00
Martin Poirier 845136ea13 Wrong argument for internal snap call. 2010-02-03 20:49:05 +00:00
Martin Poirier 152708df68 Pre Draw callback for 3D view. 2010-02-03 20:45:35 +00:00
Campbell Barton a7edd5cac5 [#20957] Python API: unlink an object while in edit mode may crash Blender
disallow unlinking objects if there not in object mode.
2010-02-03 19:25:43 +00:00
Campbell Barton f590151725 avoid nan tangents which happen with cubes that have generated UVs 2010-02-03 19:16:18 +00:00
Martin Poirier 6bdfa43431 -fpe command line argument. Tying it to -d is just hell. 2010-02-03 17:48:39 +00:00
Campbell Barton 61457571af use fpe_handler on linux when running with -d, this runs a function rarther then quitting, use for setting breakpoints to find where nan/inf occur. 2010-02-03 15:50:08 +00:00
Nathan Vegdahl fb728addd2 Eh... stupid me. Left a duplicate main function in the rig type.
(Tail between legs, walks away shamefully.)
2010-02-03 15:44:19 +00:00
Nathan Vegdahl 11ce6eb4d4 Added a new rig type "shape_key_transforms" that drives shape keys based on the local transforms of a single bone. Quite useful in a variety of situations.
Required options:
    mesh:  name of mesh object(s) to add/get shapekeys to/from
           (if multiple objects, make a comma-separated list)
Optional options:
    loc_<x/y/z>:       name of the shape key to tie to translation of the bone
    loc_<x/y/z>_fac:   default multiplier of the bone influence on the shape key
    rot_<x/y/z>:       name of the shape key to tie to rotation of the bone
    rot_<x/y/z>_fac:   default multiplier of the bone influence on the shape key
    scale_<x/y/z>:     name of the shape key to tie to scale of the bone
    scale_<x/y/z>_fac: default multiplier of the bone influence on the shape key
2010-02-03 15:40:56 +00:00
Campbell Barton 1f3e277121 bugfix [#20709] Strange rendering artifacts in raytraced refraction 2010-02-03 13:54:09 +00:00
Campbell Barton 116a52ee21 bugfix [#20943] Solidify Modifier working incorrectly
old code was merged chich use the angle degrees.
2010-02-03 12:01:57 +00:00
Joshua Leung 0cb790ac8e Bugfix #20586: Selecting "Straight Line" from Grease Pencil crashes in UV image editor
This commit adds a check that should prevent crashes of the kind that were occurring in the report description from happening. 

However, I couldn't verify yet whether this really works, since it appears the bug has temporarily disappeared in recent svn. Just in case, I've committed this fix, and we can revert/improve if the bug returns.
2010-02-03 11:53:57 +00:00
Joshua Leung 40903efe85 Missed a few places in previous constraints commit 2010-02-03 11:43:26 +00:00
Joshua Leung e5bfbcca02 Bugfix #20902: In PoseMode, ObjectMode constraints can't be deleted or moved up/down 2010-02-03 11:36:09 +00:00
Joshua Leung 74190f255b Spline IK: Small tweak improving (but not completely solving) the situation for bug #20708
The best workaround for problems with SplineIK applied to a chain of BBones so far is to disable 'Chain Offset'. Hopefully this workaround will soon become irrelevant.
2010-02-03 11:09:47 +00:00
Campbell Barton ba4cf7bf0c fix for shape key value not updating. 2010-02-03 10:27:31 +00:00