Age | Commit message (Collapse) | Author |
|
|
|
Summary:
Issue was caused by access to pchan->custom object from channel free
function when freeing all objects from main. Order of objects free
is not defined and such an access might easily end up with access
to freed memory.
We don't need to do user counter stuff when freeing main, so added
an _ex functions with do_id_user flag which is used when freeing main.
We had the same issue with other datablocks, so now it should be
easier to support relevant user counter.
This issue was caused by the fix for T36391, so perhaps that's indeed
high time to do real user counter.
Reviewers: brecht, campbellbarton
Reviewed By: campbellbarton
Maniphest Tasks: T37709
Differential Revision: https://developer.blender.org/D137
|
|
- added BKE_pose_channel_get_mirrored (matching editmode function ED_armature_bone_get_mirrored)
- editbone_name_exists -> ED_armature_bone_find_name
|
|
|
|
|
|
BKE_pose_channel_in_IK_chain()
This was needed for depsgraph work, and it's cleaner for RNA to have fewer
dependencies on editors
|
|
Issue was caused by couple of circumstances:
- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview
All this leads to threading conflict between preview render and undo
system.
Solved it in way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.
This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:
- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
but adds temporary mesh to specified Main.
So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.
Viewport render shall not be an issue because object sync happens from
main thread in this case.
It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.
Thanks to Brecht for review!
|
|
|
|
Added more clear warning print for cases when a Proxy cannot be resolved.
|
|
|
|
Action
Custom color set colors were not getting copied over when creating new action
groups. Instead, a "default set" was initialised for use instead.
|
|
Colors used by Bone Groups are now copied/assigned to Action Groups too when
they're created now. This completes the work started in r.46960 to restore this
functionality from 2.48.
Currently, there is no control over when/whether these colors are copied over
(although it is possible to disable the display of these colors for relevant
animation editors if desired). Originally I was going to make this a more
generic Keying Sets feature, though that turned out to be a bit too complex to
manage.
Other notes:
* Split out the code for copying colors to a common library function
|
|
|
|
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
|
|
Causing a flurry of refresh file prompts post-commit,
Confusing local diffs and causing merge conflicts,
Stating the obvious; redundant and useless...
We shall not miss thou, blasted expand $keywords$
|
|
|
|
- Custom properties are now affected by the Pose Sliding tools too.
This is now more important to support, given that modern rigs use
these a lot for facial expressions/posing. By and large, this should
work fine, though discrete integer values may experience a bit of
trouble
- Fixed potential bugs with the code which detects which F-Curves are
relevant to a PoseBone's transforms (+ custom props). This was prone
to being tricked by certain setups if the names of the bones contained
some of the keywords these were searching for.
- Shuffled some code around: moved bulk of logic out of vec3 case into
new function for single-value, since it was really doing per axis
already
|
|
|
|
compositor
This commit fixes the original bug reported here by adding some
methods to move the relevant F-Curves (and drivers) over to the new
Node-Tree's (i.e. group-node) AnimData. Animated nodes which
subsequently get grouped will still be able to animate as a result of
this commit.
TODO's:
- Ungrouping now will not yet merge the animation back (or at least
copy it)
- Buttons for nodes freshly grouped do not correctly show animated
status indicators for some reason, yet normal animation does
|
|
* Fixed all the dangerous code added in 27907. Using the code there, scripters could corrupt animation files in ways which would render them useless, with channels not appearing in any animation editors, and others not getting evaluated at all.
* Partial fix of bug 21818, by disabling destructive replacement of keyframes. Will followup this commit with a more comprehensive commit which gets rid of the rest of the problems, by incorporating some requests from Durian team.
* Fixed problems with users being able to see+edit the name of the active Keying Set in the Scene buttons. There is still a bug though with the list widget given how the indices are now interpreted...
|
|
playback in one particular scene with 3 characters go from 10 to 13 fps.
(commit 27728 by Brecht from render25 branch)
|
|
|
|
id-props etc.
duplicate_pose_channel_data(), the code to do this was inline in editarmature.c
duplicating editbones now duplicates posebone id-props
also removed an if test for &channew->constraints since it will always be true.
|
|
number of cases,
added free_pose_channel(pchan) and use this in all places that free pose bones
|
|
Makefile updated but not tested. Comes with Eigen2 2.0.6 C++ matrix library.
|
|
Added a utility function to check which transforms for an object or bone are animated, returning these as bitflags and/or optionally retrieving the relevant F-Curves too. Beware that this method may not be working correctly yet, but it shouldn't hurt anyone in the meantime :)
Also, split RNA-path building function up into a version which only creates the path up to the given struct, with the other parts being added later.
|
|
* F-Modifiers on F-Curves can now taken into account when calculating the extents of actions. This is used when there are some NLA strips and some action with some F-Modifiers is being played back on top of those.
* The toggles in the NLA channels list now respect the width of the list instead of using a hardcoded position. This means that clicking on these toggles when the list is resized works again.
|
|
* Added Bone Groups UI to 'Armature' context buttons for now. Later, it may be more convenient to have these with bones instead?
* Added operators for the operations that can be performed on these groups. Moved the core adding/removing functions to blenkernel so that they can be used elsewhere in future if need be.
* Properly wrapped bone groups in RNA. Copied the way that Vertex Groups are wrapped, since they share some similarities. Setting colours for bone groups still needs more work though.
|
|
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :)
To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with.
I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here...
Also, added proper license headers to new NLA files.
TODO:
- testing + bugfixing due to this commit
- show range of keyframes in NLA Editor active-action line
|
|
|
|
game_blend_poses, the new animation system doesnt use it but doesnt have a replacement function so it can be kept for the BGE only.
|
|
* Data copying
* Strip sorting
|
|
Following on from the methods added specially for PoseLib to only execute the F-Curves in a given Action Group, I've attempted to use this for evaluating Action Constraints on Pose Channels. This does rely on the F-Curves being in groups named according to name of the Pose Channel of interest, hence, we may need some way to be able to fine tune this later.
Preliminary tests seem to be promising, with rigs with quite a few action constraints being slightly more responsive (subjective test though). Please test thoroughly.
|
|
|
|
When inserting keyframes on previous un-animated Objects/bones, F-Curves will be added into Action Groups into either "Object Transform" or <PoseChannel Name>. Ob->Material settings are not grouped for now to illustrate what's possible.
Old files are currently not patched to use do this, as it's still not clear whether this will be ideal.
|
|
Currently this still works really badly, but I'm not sure of the exact cause yet.
|
|
* Removed nAction struct. We'll be using good ol' bAction structs again, but putting new data in a different list. Apart from that, the data is similar enough to do so.
* Rearranged code in DNA_action_types.h while renaming the structs to avoid confusion over what is currently in use...
* Added freeing and AnimData execution loops for many other ID-types too. (NOTE: I've added AnimData in NodeTree struct too, but it's not clear to me where the relevant data-management calls should go in Nodes code).
* File writing code should now only write the new data to files
|
|
Finally, here is the basic (functional) prototype of the new animation system which will allow for the infamous "everything is animatable", and which also addresses several of the more serious shortcomings of the old system. Unfortunately, this will break old animation files (especially right now, as I haven't written the version patching code yet), however, this is for the future.
Highlights of the new system:
* Scrapped IPO-Curves/IPO/(Action+Constraint-Channels)/Action system, and replaced it with F-Curve/Action.
- F-Curves (animators from other packages will feel at home with this name) replace IPO-Curves.
- The 'new' Actions, act as the containers for F-Curves, so that they can be reused. They are therefore more akin to the old 'IPO' blocks, except they do not have the blocktype restriction, so you can store materials/texture/geometry F-Curves in the same Action as Object transforms, etc.
* F-Curves use RNA-paths for Data Access, hence allowing "every" (where sensible/editable that is) user-accessible setting from RNA to be animated.
* Drivers are no longer mixed with Animation Data, so rigs will not be that easily broken and several dependency problems can be eliminated. (NOTE: drivers haven't been hooked up yet, but the code is in place)
* F-Curve modifier system allows useful 'large-scale' manipulation of F-Curve values, including (I've only included implemented ones here): envelope deform (similar to lattices to allow broad-scale reshaping of curves), curve generator (polynomial or py-expression), cycles (replacing the old cyclic extrapolation modes, giving more control over this). (NOTE: currently this cannot be tested, as there's not access to them, but the code is all in place)
* NLA system with 'tracks' (i.e. layers), and multiple strips per track. (NOTE: NLA system is not yet functional, as it's only partially coded still)
There are more nice things that I will be preparing some nice docs for soon, but for now, check for more details:
http://lists.blender.org/pipermail/bf-taskforce25/2009-January/000260.html
So, what currently works:
* I've implemented two basic operators for the 3D-view only to Insert and Delete Keyframes. These are tempolary ones only that will be replaced in due course with 'proper' code.
* Object Loc/Rot/Scale can be keyframed. Also, the colour of the 'active' material (Note: this should really be for nth material instead, but that doesn't work yet in RNA) can also be keyframed into the same datablock.
* Standard animation refresh (i.e. animation resulting from NLA and Action evaluation) is now done completely separate from drivers before anything else is done after a frame change. Drivers are handled after this in a separate pass, as dictated by depsgraph flags, etc.
Notes:
* Drivers haven't been hooked up yet
* Only objects and data directly linked to objects can be animated.
* Depsgraph will need further tweaks. Currently, I've only made sure that it will update some things in the most basic cases (i.e. frame change).
* Animation Editors are currently broken (in terms of editing stuff). This will be my next target (priority to get Dopesheet working first, then F-Curve editor - i.e. old IPO Editor)
* I've had to put in large chunks of XXX sandboxing for old animation system code all around the place. This will be cleaned up in due course, as some places need special review.
In particular, the particles and sequencer code have far too many manual calls to calculate + flush animation info, which is really bad (this is a 'please explain yourselves' call to Physics coders!).
|
|
Think global, act local!
The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.
Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
meant for permanent, but it can probably stick there until we
cleaned the anim system and depsgraph to cope better with
timing issues.
- Game engine G.scene should become an argument for staring it.
Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
is too tightly wrapped to do it easily.
|
|
* Brought back clean (OKEY), sample (Shift-OKEY), and delete (XKEY/DELKEY) tools for the Action Editor.
Currently clean uses a predefined threshold (as a rna-prop, though it's still lacking the popup to set this when it is called)
* Added new file for 'destructive' keyframe operations/tools.
* Got keyframing.c compiling. Now, some of these tools need to be operatorised. Also, the API there might change when enough of the system is stable for RNA-IPO work to take place (so that it can be tested).
|
|
Removed global "workob" from BKE, should now by passed on as an arg.
|
|
again.
* Re-exposed relevant parts of anim_keyframing.c code that doesn't have external dependencies.
* Added get_active_posechannel() to blenkernel api for poses/posechannels to solve the only missing link I found. This should have been moved there ages ago!
|
|
but don't have an action got the pose of already added armatures, even
though they're not related. This also fixes an issue where the armature
in Blender would end up in the pose from the game after ESC, removes
unneeded copies made during armature evaluation, and also solves the
constraint copying hack.
|
|
but should be extended so transforming dosnt distort UV's
* smooth respects mirror option (will move mirrored vert too)
|
|
Shape Action are now supported in the BGE. A new type of actuator "Shape Action" is available on mesh objects. It can be combined with Action actuator on parent armature. Only relative keys are supported. All the usual action options are available: type, blending, priority, Python API. Only actions with shape channels should be specified of course, otherwise the actuator has no effect. Shape action will still work after a mesh replacement provided that the new mesh has compatible shape keys.
|