Commit Graph

411 Commits

Author SHA1 Message Date
ff4ff9c8a4 Bugfixes for various ID-block references (Constraints, NLA)
* ID-blocks referenced by Constraints but not being used as the target objects
(such as Actions in the Action Constraint, or Text Blocks in PyConstraints) now
get usercounts for being referenced in this way. This should fix ancient bugs
such as [#19205] and [#8593]. More tests still needed to verify that this
does now play nicely with proxies.

* Changing actions used by NLA strips should now update the usercounts
accordingly
2012-05-05 15:54:08 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
084fedd03a code cleanup: brush/camera naming 2012-05-05 00:58:22 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
e701f9b670 style cleanup: whitespace / commas 2012-04-29 15:47:02 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
ae33503d03 Fix #30716: Clamp To Constraint Locks up Blender after a while.
Issue was caused by object moved really far away (not just actually issue,
it's just about long mouse gesture and X-axis orientation which projects
position to quite large X-axis value) and for this location start offset
from curve length was calculating iteratively which takes plenty of time for
short curves.

Replace iterative search of offset with formula which seems to be working
in the same way and should be a bit more accurate.
2012-03-29 15:41:58 +00:00
1ce2c73816 Code style cleaup for motion-tracking modules.
Should be no functional changes.
2012-03-25 23:19:21 +00:00
69e6894b15 style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:18:31 +00:00
7ff77ed4ea code cleanup: use zero_v3 2012-03-23 20:18:09 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
dfdfa3d51b code cleanup: replace macros VECCOPY, VECADD, VECSUB, INPR - with BLI_math funcs.
added copy float/double funcs: copy_v3fl_v3db(), copy_v3db_v3fl(). 2d & 4d too.
2012-03-09 06:04:17 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
6c0361dff7 Armature pose evaluation: more factorization of code.
Now constraints' space conversion code also uses generic armature_mat_(pose_to_bone/bone_to_pose). Previous own function (constraint_pchan_diff_mat) was somewhat inconsistent too with Hinge/NoScale/LocalLocation options...
As with previous similar changes, this might break some old rigs, in very specific cases (when constraint-evaluating an hinge/noscale/local_location bone in local space).

In the same part of code, removed unnecessary matrices copying, mult_m4_m4m4 can take the same matrix as input and output, nowadays...

Also found a bug-generator weakness in those armature_mat_ functions (if both input and output mat where the same, result was wrong, now systematically copying input mat, as done in LIB's matrix funcs).

Finally, factorized offset bone matrix generation into its own small function too, as it is used in two different places in armature.c (pchan_to_pose_mat itself, and restpose's where_is_armature_bone).

Note: I think all parts of blender's code related to that topic have now been tackled, but yet have to check BGE, it’s probably using that stuff too, one way or the other...
2012-02-22 20:06:33 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
d0412a1981 svn merge ^/trunk/blender -r43864:43887 2012-02-05 02:30:30 +00:00
deec4ce0bc Code Cleanup: avoid double promotion. 2012-02-04 06:55:29 +00:00
075fee4d58 svn merge ^/trunk/blender -r43830:43864 2012-02-03 01:30:21 +00:00
722e0d38ac Code Cleanup: de-duplicate bone space calculation ~(35 sloc) 2012-02-02 08:47:46 +00:00
ab4dbc6d78 fix [#30051] Copy Scale constraint overrides Inherit Scale from parent
space conversion in constraint code ignored inherit scale option.
2012-02-02 08:04:06 +00:00
4aa82806ef svn merge ^/trunk/blender -r43751:43819, need to look into changes made to editmesh_loop.c from this range still 2012-02-01 09:31:13 +00:00
a834007a9b Previous fix for [#29484] wasn't working right (did work in report file though).
this now shares code with RNA's 'pchan.matrix = matrix'

tested with parent scale/rot/translation
2012-02-01 05:59:50 +00:00
7836069775 fix [#29484] Visual keying bone with local location disabled 2012-02-01 05:04:51 +00:00
8ec8aaf77f Fix #30019: Copy rotation from a vertex group
It was incorrect behavior of contarget_get_mesh_mat in cases when
object's Y axis is co-linear to average vertex group normal.
Use object's X axis for plane definition in such cases.
2012-01-30 19:46:15 +00:00
4af4863baf svn merge ^/trunk/blender -r43639:43664 2012-01-24 16:18:20 +00:00
925234f1e0 New fix for [#29940] Stretch To constraint breaks scaling in Transform constraint, previous one caused bug [#29962] linked objects not correct on r4361, should be fixed now.
Org code was working with isotropic scaling, but when scaling only one axis, it was broken. First fix just disabled completly scale handling. This version only takes into account scaling along local Y axis, as this is the only one affecting that constraint!

Sorry for the mistake, hope this time it will be ok.
2012-01-24 13:17:32 +00:00
4966982a5a svn merge ^/trunk/blender -r43564:43609 2012-01-22 18:04:35 +00:00
56fae37b2a Fix [#29940] Stretch To constraint breaks scaling in Transform constraint.
Compute of dist between ob/bone and target was quite odd and causing that bug.
2012-01-21 09:41:21 +00:00
ad3e9900d6 call CDDM_from_BMEditMesh without creating tessface data for modifiers.
- in the case of deform modifiers this is very safe (assuming the mods themselves dont need tessface data), since the DM is freed right after, so this is an easy speedup.

- in the case of bevel and split edge modifiers this should still work out fine since mods that need tessface data will generate it.
2012-01-18 15:29:25 +00:00
9d782c8a1a argument for CDDM_from_BMEditMesh() so creating tessface data is optional, no functional changes since all callers use this so far. 2012-01-18 15:09:27 +00:00
348f116fe5 svn merge ^/trunk/blender -r43124:43160 2012-01-05 11:23:24 +00:00
cd84a43334 Camera tracking: added depth object to Follow Track constraint
If this object is defined, object with Follow Track constraint would be
projected into surface of this depth object.
If object is not set or there's no projection onto it, projection plane
calculated based on original object position would be used.

This allows to make cheap facial mocap.
2012-01-04 17:20:08 +00:00
81f5c9ed9b svn merge ^/trunk/blender -r42991:43009 2011-12-31 03:07:14 +00:00
3c6e818b22 Object tracking integration
This commits merges object tracking implementation from tomato branch.

Summarized changes from branch:

- Added list of objects to be tracked. Default there's only one object called
  "Camera" which is used for solving camera motion. Other objects can be added
  and each of them will have it;s own list of tracks. Only one object can be used
  for camera solving at this moment.
- Added new constraint called "Object Tracking" which makes oriented object be
  moving in the save way as solved object motion.
- Scene orientation tools can be used for orienting object to bundles.
- Object has got scale to define "depth" in camera space.
- All tools which works with list of tracks or reconstruction data now
  gets that lists from active editing object.
- All objects and their tracking data are available via python api.
- Improvements in witness cameras workflow,
2011-12-30 18:06:02 +00:00
532afede02 patch [#29726] Enable looping with Follow Path constraint and cyclic curves. by Peter Amstutz (tetron) 2011-12-30 14:52:03 +00:00
737648a0bf Merging r42648 through r42722 from trunk into soc-2011-tomato 2011-12-19 10:39:40 +00:00
3708d66c88 Object tracking: forgot to initialize inverted matrix for object solver constraint 2011-12-18 18:03:20 +00:00
db6cb30941 svn merge ^/trunk/blender -r42669:42670 2011-12-16 23:50:55 +00:00
3311164b24 Math lib: matrix multiplication order fix for two functions that were
inconsistent with similar functions & math notation:

mul_m4_m4m4(R, B, A) => mult_m4_m4m4(R, A, B)
mul_m3_m3m4(R, B, A) => mult_m3_m3m4(R, A, B)

For branch maintainers, it should be relatively simple to fix things manually,
it's also possible run this script after merging to do automatic replacement:
http://www.pasteall.org/27459/python
2011-12-16 19:53:12 +00:00
862dc635ed svn merge ^/trunk/blender -r42617:42655 2011-12-15 23:59:02 +00:00
b1111bafa1 Camera tracking: follow track + 3d position now respects camera orientation and object offset 2011-12-15 20:38:45 +00:00
8a9d901c81 Camera tracking: add camera to follow track and object solver constraint
Object used to be parented to active camera which isn't very convenient when
working with witness cameras.

Now parent camera can be specified in constraint (if it's not specified, active camera is used)
2011-12-15 20:38:23 +00:00
ba16e7d631 Object tracking: object with object solver constraint is now parented to scene's camera
Made Object Solver operator parent object to scene's camera. Behavior is pretty much
familiar to Child Of constraint -- it stores inverted transformation matrix which gives
constant offset in parent's space.
Current files would open incorrect, to make object aligned well again, just press
"Set Inverse" button in Object Solver constraint.
Fixed orientation operators so now they should work in all cases.
Also changed behavior of Set Origin operator which now sets origin to the median
point of all selected tracks/
2011-12-15 16:09:57 +00:00
deb95ddb44 Merging r42621 through r42647 from trunk into soc-2011-tomato 2011-12-15 16:04:59 +00:00
40a2c1a292 more vertex weight edits,
* replace inline loops with api calls.
* change constraints so verts with 0.0 weight are ignored like they are everywhere else.
2011-12-14 22:54:38 +00:00