Commit Graph

283 Commits

Author SHA1 Message Date
ab2026bf42 Animation Channel Filtering Refactor - Part 3 (Visibility Flag Split)
* This (big) commit is aimed at cleaning up the filtering flags used
by the animation channel filtering code. The list of filtering flags
has been growing a bit "organically" since it's humble origins for use
in the Action Editor some 3 years (IIRC) ago now during a weekend
hackathon. Obviously, some things have ended up tacked on, while
others have been the product of other flag options. Nevertheless, it
was time for a bit of a spring clean!

* Most notably, one area where the system outgrown its original design
for the Action Editor was in terms of the "visibility" filtering flag
it was using. While in the Action Editor the concept of what channels
to include was strictly dictated by whether the channel hierarchy
showed it, in the Graph Editor this is not always the case. In other
words, there was a difference between the data the channels
represented being visible and the channels for that data being visible
in the hierarchy.

Long story short: this lead to bug report [#27076] (and many like it),
where if you selected an F-Curve, then collapsed the Group it was in,
then even after selecting another F-Curve in another Group, the
original F-Curve's properties would still be shown in the Properties
Region. The good news is that this commit fixes this issue right away!

* More good news will follow, as I start checking on the flag usage of
other tools, but I'm committing this first so that we have a stable
reference (of code similar to the old buggy stuff) on which we can
fall back to later to find bugs (should they pop up).

Anyways, back to the trenches!
2011-06-22 11:41:26 +00:00
207911bdb3 Merge with trunk r37677 2011-06-20 22:55:18 +00:00
216ba20942 fix [#27671] Transforming sequencer effects strips crashes 2011-06-16 12:48:25 +00:00
aaf7dae5f1 Code cleanup: remove unused shaded draw mode code. 2011-06-15 10:17:06 +00:00
8ff0c2e107 Merge with trunk r37475. 2011-06-14 12:06:21 +00:00
299602b360 fix for vertex group copy to selected
- was using un-initialized stack memory if the source / target object had no vertex group.
- if the target object had no vertex groups it would fails silently (not a bug but not very good functionality)
- added an error message if any copying fails.
2011-06-07 18:04:03 +00:00
d16c1f3665 fix for sequencer transform with effects strips where the effects could be moved to invalid times to avoid overlap but would immediately refresh back to overlapping locations after. 2011-06-07 16:47:25 +00:00
072d350aab Time-Slide Fix:
Second attempt at fix for only having a single-key selected. In this
case, it just uses the start/end frame as it's min/max
2011-06-02 11:58:13 +00:00
b41427c66b Bugfix: "Time Slide" tool broken
Dunno how long this has been broken for (*), but the Time Slide
transform tool in DopeSheet no longer did anything most of the time.
It appeared to be be caused by some blotched indexing code from ages
ago. I've fixed this problem, as well as preventing the case where it
would also give errors when only a single key was selected.

(*) Does anyone actually use this tool? IIRC, this was added during
Orange, though I can't find the commit for this anymore or why it was
added. Probably it might be better to just let it go...
2011-06-02 11:51:38 +00:00
f5ec4cf4e9 fix own mistake [#27451] Flip to Top / Flip to Bottom menuitems on right click on header not working
also get rig of more shadowed vars (-Wshadow).
2011-05-23 08:14:29 +00:00
d16da799fb change transform to round at 0.5 for fcurves.
this gave noticeable issue when transforming int/fcurve's below zero.
2011-05-20 18:19:29 +00:00
304ce06a5a fix remaining crash from [#27035] 3 problems: crash and enum "REGION" not found in ('VERTS') 2011-05-18 09:58:17 +00:00
d4e540dff3 comment some unused code. 2011-05-08 10:29:40 +00:00
1093f69e50 Style Cleanup
- duplicate cases in if/else
- calc inside sizeof(...)
- redundant NULL checks.
- assignment to self.
- fix error getting text prefix for screen ID button.
2011-05-01 10:14:09 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
bbf82877cf Bugfix [#26792] blender crash when scaling action strip in NLA
Two part bug:
Part 1) NLA Editor menu was calling wrong operator
Part 2) r35829 broke NLA scaling, since it only checked that the
transform mode used was allowed in the Action Editor (probably
confused by Part 1)
2011-04-05 11:04:00 +00:00
faf07c3e2b transform: floats were being implicitly promoted to doubles, adjust to use floats.
also use macros RAD2DEGF & DEG2RADF.
2011-03-28 17:06:15 +00:00
7609370d50 Bugfixes:
- Sync Markers option works for local markers (or any other list of
markers in future) too now.
- Apply Pose to Restpose operator now displays a warning if an action
was found (warning about the action now being invalid)
2011-03-14 10:45:42 +00:00
f96a1546c0 Bugfix: "Sync Markers" option in Action Editor is now a bit more
useful.

Instead of only working for the "extend" transform mode, standard
transforms now work too now (i.e. grab and scale).

TODO:
This currently only works on Scene markers, though it should be
possible to make this work on a provided list of markers instead...
2011-03-14 03:10:23 +00:00
4fc83c8efa Fix for [#26420] F-Curve key handles affected by NLA strip position
* NLA timing was only applied to fcurve keys, but not handles, so strange things happened.
* This time tweaking was missed in selections too, so fcurve handles couldn't be selected properly either if the NLA strip was moved from frame 1.
2011-03-09 15:04:09 +00:00
d49bafe957 Fix #26324: proportional editing and armature applied to editing cage during edit mode works strangely
Not sure why proportional editing used to disable crazyspace corrections,
but from that time hwn it was done transform stuff was changed a lot.
I've made several tests (with file from report and sintel from durian
data files) and it worked nice.
2011-03-06 17:03:25 +00:00
3c184def72 use NULL instead of 0 for pointers, (editors) 2011-03-03 17:59:04 +00:00
a19e917782 Bugfix [#26269] Initiating a duplication with shift D and cancelling
in dope sheet/ graph editor leads to duplicated keys

The old hack using the transform "undostring" didn't work anymore, as
this wasn't set. Instead, I've added a special mode transform mode for
this that the duplicate operators can set to get this functionality.
2011-03-02 23:39:08 +00:00
b8c85abc1c tag unused var 2011-03-02 19:06:09 +00:00
e6a5715773 Fix for [#25326] FCurve rotate gives strange results.
* The fcurve points changed their order when rotating, but the transform data wasn't updated properly for this change so some curve handle pointers got lost.
* Also found a second bug while fixing this: The fcurve handle type pointers weren't updated at all when the order changed, so some auto handles could turn into aligned handles even if the transform was canceled (no undo possible in this case!).
2011-03-02 17:32:01 +00:00
Nathan Letwory
95100afc12 doxygen: blender/editors tagged. 2011-02-27 20:29:51 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
aeeb09bd56 fix [#26164] bpy.ops.transform.translate ignores AutoIK mode
auto-ik updates are done by notifiers at the moment which are ignored when running bpy.ops.transform.translate(), so add an special_aftertrans_update() check for this case.
2011-02-23 04:03:58 +00:00
9d168f7337 Bugfix #26096
Switching layers reveiled hidden objects in wrong positions, changes
are currently not being handled for hidden objects. 
Only way to fix it is by completely update newly visible objects...

(Also fixed a typo and a compile warning)
2011-02-16 18:04:03 +00:00
8b7482892b made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors. 2011-02-14 17:55:27 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
d909e61d99 Sculpting on deformed mesh
==========================

Removed limitation of armatured-only objects for sculpting -- now all
deformation modifiers are allowed in sculpt mode. Use crazyspace corrections
like from transformation modules was used to support all deformation modifiers.

Internal change: all crazyspace-related functions were noved to crazyspace.c

P.S. Brush could make quite unexpected deformation for meshes which are
     deformed in specified way. Got patch for this and discussing with Brecht
	 if it's really needed or maybe it could be done in better way.
2011-02-12 17:51:02 +00:00
a155d8895d Moved Auto-Keying "Insert for KeyingSet only" option from UserPrefs to
Scene (Toolsettings, i.e. alongside "layered" option for using NLA
while doing auto-keying)

This option makes all Auto-Keying operations use the active Keying Set
to carry out keyframing operations instead of picking and choosing
their own Keying Sets to use, thus cutting down on the number of
unwanted keys.

Warning: if the older userpref option was enabled in an old
startup.blend, it may be difficult to turn this option off.
2011-02-04 08:33:07 +00:00
6f0aa2cb0e Targetless IK Bugfixes + Tweaks:
- "CONSTRAINT_IK_AUTO" flag for targetless IK constraints was being
set in the wrong place. This is for the IK constraint data's flag, not
the generic constraint's flag
- Converting stack var "targetless" from type bConstraint to
bKinematicConstraint (i.e. constraint baseclass -> specialised data),
since it was only used in one place with a cast used there.
- When using targetless IK with no specified chain length, bone
rotation locks are taken into account too, saving a bit of extra setup
work
2011-02-01 05:15:32 +00:00
dc8078e667 Bugfix [#25885] Auto IK ignores full rotation locks
... actually, this was just an off-by-one bug again.
2011-02-01 00:43:28 +00:00
dc2431c491 Small code reshuffle... sequencer transform stuff was bisecting the
code for object transform stuff
2011-01-20 20:51:38 +00:00
619c287851 Reverting r33930 and r34202, which were related to bugs #21825 and
#25554. As found by Daniel Lara (Pepeland) in #25554, the original
problems in #21825 all stemmed from the ChildOf constraint there
having an incorrect inverse set, which was altering the final results.

Now Auto-IK works nicely for old rigs again (i.e. FK arms on BBB rigs)
2011-01-13 23:53:14 +00:00
cf25b10eb5 Todo #22395: Restoring Grease Pencil Editing Mode in DopeSheet Editor
This commit restores some basic functionality for retiming Grease
Pencil sketches. Some of the functionality that existed before still
hasn't been restored (namely snap/mirror tools as well as copy+paste),
though it should be possible to use this for basic retiming and
sketch-frame management again.

- There's still a lot of work required to get this up to the standard
of the rest of the animation editor code, as some of this code was
originally just hacked in based on the old-style code.
- Work is already required to not have to directly access the main db
global to get the list of Grease Pencil datablocks to show, but that
can come along with pending cleanups of the filtering code.
2011-01-10 22:10:28 +00:00
856d9c9057 Bugfix #25554
Actually a minor tweak: 
Auto-IK fails on correcting for constrainted bones in chains.
For that reason it stops including constrainted bones for it.

Now it does include constraints with influence zero, or which
were disabled by user input.
2011-01-09 17:49:38 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
37931a6b1a Todo item: brought transform texture space back.
Code changes are minimal, re-using the code as already was there.

Options are in pulldown menu, or SHIFT+T and SHIFT+ALT+T

Might be that Martin likes to see it different... do we need
a special operatortype for it?
2011-01-05 17:27:26 +00:00
8c4a93110e Bugfix #21825
Auto-IK: applying back the IK transform on bones fails for constrainted 
bones themselves. This would require the post-transform of IK to be
converted to a pre-transform for the constraint. That's too much of
a headache for bugfixing days.

To keep the autoIK feature work it now stops IK chains at constrainted
bones. Added todo item for a matrix wizzard to fix this one day.

(What would be really cool is a matrix-api for armature to easily 
get all the required pre- and post transforms and apply. There's a lot
of duplicate exception handling for hinge bones for example.)
2010-12-28 17:03:09 +00:00
8e80ada09a bugfix [#25238] Render image window edits UV's 2010-12-20 05:26:25 +00:00
8dcd210de0 bug [#25292] No undo scale with sculpt mode
applies to project paint too, added with comment.
2010-12-19 12:38:20 +00:00
e53921cf40 Bugfix #25292
In sculpt mode, Object transform still worked, which was:
1) Not undo-able (sculpt undo stack)
2) Clearing the entire sculpt undo stack on operator redo
3) Had keymap conflict for R

Simply added check for this case and return trans operator.
2010-12-19 09:41:41 +00:00
f90a2123ee no functional change: only check against OB_RECALC_ALL but don't use for assignment.
Makes adding new flags give ambiguous results and also makes it less easy to tell whats intended.
In some places it looks like OB_RECALC_TIME should be left out too.
2010-12-17 15:51:42 +00:00
e836d2a169 Bugfix, irc report
After using loop-cut with multiple edges, transform widget
disappeared. Reason was a variable being set in function
not being called on cancelled operators. Now it's in Posttrans()
2010-12-16 17:19:24 +00:00
ee09aeb498 dont transform hidden handles in the graph editor. 2010-12-15 16:07:49 +00:00
b110c7c8f2 Dependency graph: changed DAG_id_flush_update to DAG_id_tag_update. Now it
only tags the ID and does the actual flush/update delayed, before the next
redraw. For objects the update was already delayed, just flushing wasn't
yet.

This should help performance in python and animation editors, by making 
calls to RNA property update quicker. Still need to add calls in a few
places where this was previously avoided due to bad performance.
2010-12-05 18:59:23 +00:00