Commit Graph

274 Commits

Author SHA1 Message Date
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
cd97253502 - added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
2010-12-03 12:30:59 +00:00
223e70467e bugfix [#24777] Scale both markers and keyframes at the same time?
sync marker option worked for translate and extend but not for scale in the dope sheet.
2010-11-18 05:05:06 +00:00
f713761039 Keyframing Operators: Improved Error Messages
* Keyframing operators now use the reports system for displaying all its error messages. 
- The benefit of this is that users no longer need to check the console for error messages if keyframing fails.
- Unfortunately, reports are not currently viewable in any space/view in Blender, so...

* Added a temporary operator (UI_OT_reports_to_textblock), which can be accessed in the UI from the button which appears in place of the icon when more than one report exists. This dumps the current list of reports to a textblock "Recent Reports", from which they can be viewed. 

This isn't really nice, but at least we now have a way to view these again, which makes debugging some things a pain.

* Bugfix #24606 - when trying to add keyframes to F-Curves with F-Modifiers already which alter the curve significantly enough that the keyframes will have no effect, there are now warnings which aim to alleviate any confusion.
2010-11-17 12:02:36 +00:00
43e6ccd57b Move rotOrder to proper transform data structure 2010-11-14 19:19:58 +00:00
98e98bf5d2 Bugfix #24621: NLA strips move insensitively across tracks
This was a 2-part bug:
1) "Track index" (i.e. "index of NLA track within NLA Stack") was calculated incorrectly when the transform data is created. A typo meant that this was actually "index of strip within original track" 

2) Strips were flying around madly vertically (especially for downward movements, and with extreme difficulty for upwards) as the track index was being updated incorrectly. I suspect at the time I was misreading it as trackIndex = ... vs trackIndex += ..., though it obviously looked wrong looking at it now!
2010-11-11 10:27:24 +00:00
854b6cd327 fix for the crash reported in [#24625] Duplifaces not generated using spacebar to activate 2010-11-10 05:46:17 +00:00
e32a81cba2 workaround/fix [#24451] Motion path not automatic recalculating + locking obj moving
Comment from source...
			/* re-calculating the frame positions means we loose our original transform if its not auto-keyed [#24451]
			 * this hack re-applies it, which is annoying, only alternatives are...
			 * - dont recalc paths.
			 * - have an object_handle_update() which gives is the new transform without touching the objects.
			 * - only recalc paths on auto-keying.
			 * - ED_objects_recalculate_paths could backup/restore transforms.
			 * - re-apply the transform which is simplest in this case. (2 lines below)
			 */

Martin, if you think this workaround is unacceptable, then automatic recalculating of paths after transform should probably be disabled since it looses data on non transform un-keyed values.
2010-11-03 23:49:56 +00:00
6b767b8018 fix [#24499] Consistency Issue with LassoSelect/ExtendOption
Added extend option to lasso. 

also...
- selecting bones wasn't checking their layer of if they were hidden in a number of places.
- fixed memory leak.

small unrealed changes
- added PBONE_VISIBLE macro
- renamed functions used for paint selectoin from *_tface to paintface_*. sine they no longer have anything todo with tface's.
- removed scanfill include from BLI_blenlib.h, this is only used in very few places and quite specific.


Noticed lasso select is broken for metaballs and face mask mode but this has been the case for a while, will look into it next.
2010-11-03 01:56:02 +00:00
369a5cc29e fix for compiling with the c90 standard, support for non-static variable initializers is a c99 feature. 2010-11-02 13:12:30 +00:00