Commit Graph

3274 Commits

Author SHA1 Message Date
Joshua Leung b1a106dd49 NLA SoC: Merge from 2.5
21210 to 21300

Note to self: the next merge will be messy again, since 2 commits occurred this one was complete
2009-07-02 03:32:57 +00:00
Joshua Leung 1588de008a NLA SoC: Separated 'Built-In Function Generator' FModifier into a separate FModifier
Started cleaning up FModifiers in preparation for allowing them to be used on NLA Strips. 

This commit separates the 'Built-in Function' mode for the Generator modifier out into its own modifier, since it was being quite frequently used (and the RNA wrapping for this used to be quite hackish). 

BACKWARDS COMPATABILITY WARNING:
Old files with FModifiers saved (i.e. old 2.5 files, but not any others) will not load correctly as a result of these changes (the wrong modifiers will be shown). I've decided that there are not likely to be many files affected by this yet, but doing this will result in a much nicer modifiers-define list in the long run.
2009-07-02 02:12:37 +00:00
Joshua Leung aa4ed13e4a NLA SoC: NLA Mapping Cleanup
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods. 

Now the mapping conversions should work nicely for all places that use them.
2009-06-28 07:32:00 +00:00
Joshua Leung 500507ddb1 NLA SoC: Merge from 2.5 - 21179 to 21209 2009-06-28 03:26:10 +00:00
Janne Karhu 7b547f7ce7 Particle ID block controls:
* Adding/removing particle systems to an object.
* Changing of particle settings.
* Currently showing an object's particle systems in a list (like materials).
2009-06-27 15:41:47 +00:00
Janne Karhu 912c2f440b Pointcache refresh part 2
* Based on what happens during simulation the cache is marked (also in cache panel, this could possibly be extended to 3d view as well) as:
	- exact (not marked)
	- outdated (simulation is not done completely with current settings)
	- non-exact (frames were skipped during simulation)

* The parameter "cache step" effects the number of frames between saved cache frames.
	- This can save a lot of memory (or disk space) if absolutely frame accurate simulation is not required.
	- Speeds up the "quick caching" very much.
	- Frames between cached frames are interpolated from the cached frames.
	- Current default value of 10 frames works nicely with up/down-arrows (skip 10 frames forwards/backwards on timeline), but can be changed if wanted.

* The caching can work in normal or "quick" mode:
	[Normal cache]
	- Basic: Calculate what even happens (settings change, big frame steps etc.) and cache results, if possible try to use "cache step" when saving cache frames.
	- Becomes non-exact: After larger than 1 frame steps.
	- Becomes outdated: After any change effecting the simulation other than frame steps.
	- Pros/cons: Freedom of doing anything and playing with particles, but exact results have to calculated from the beginning.

	[Quick cache]
	- Basic: Calculate simulation up to current frame automatically on changes with cache step sized jumps in simulation. With multiple "quick cached" simulations the smallest cache step is used.
	- Becomes non-exact: Always from frame 1 (unless cache step = 1).
	- Becomes outdated: Never.
	- Pros/cons: Not very accurate, but super fast!
	- Todo: Transform of any animated (non-autokeyed) object is locked! Probably needs some tinkering with anim sys overrides.

* The simulation can be run forwards or backwards even if it's cache is outdated or non-exact, the following rules apply in these situations:
	- step forwards (to unknown) -> simulate from last exact frame, store result
	- step backwards (to known) -> result is interpolated from existing frames, store result, clear cache forwards if current frame is after last exact frame

* "Calculate to current frame" runs the simulation from start to current frame with a frame steps of 1.
	- Baking does the same, but runs the simulation all the way to the end of simulation.
	- Rendering does this automatically if the simulation is outdated of non-exact, so all rendered simulations will always be updated and exact.
	
* Every cache panel also holds buttons to "Bake all dynamics", "Free all dynamics" and "Update all dynamics to current frame".

* Cloth simulation supports the new cache too.
2009-06-27 15:28:58 +00:00
Joshua Leung d3557fc487 NLA SoC: Recoded the strip<->global time conversion code
* Strip evaluation now takes into account repeats
* Increasing the number of repeats lengthens the strip, while decreasing the number of repeats does the opposite.

TODO:
- inverse correction doesn't take into account repeats != 1, so tweaking strips with repeats is currently not recommended!
2009-06-27 12:35:11 +00:00
Joshua Leung bbf793472e NLA SoC: Merge from 2.5 - 21146 to 21178 2009-06-27 03:19:55 +00:00
Brecht Van Lommel d839a9ae9c RNA
* Added support for passing collections to/from RNA functions,
  this is done using a ListBase of CollectionPointerLink, which
  is a standard ListBase link + PointerRNA.

* Added editable active uv/vcol layer to Mesh.
* Armature.bones now includes all bones, not only the ones without
  parents.
* Modifier UV layer fields now are allowed to be empty, previously
  this would set the name during modifier evaluation if there was
  none.
2009-06-27 01:10:39 +00:00
Joshua Leung a1c5c501a6 At last... this merge should finally do the trick!
21073 to 21145
2009-06-25 04:33:21 +00:00
Brecht Van Lommel a379fdd7fb 2.5: Object material slot operators add/remove/assign/select/deselect. 2009-06-24 14:07:48 +00:00
Brecht Van Lommel 242d9c31d3 RNA
* RNA_struct_name_get_alloc function to get the name from a
  pointer, instead of having to deal with name property.
* CTX_data_pointer_get_type to get data from context with
  a check for the RNA type.
2009-06-24 14:03:55 +00:00
Joshua Leung e5119ee2c0 NLA SoC: Drawing Tweaks
* Transition tracks are now drawn in a different colour (bluish)

* Action line now shows keyframe indicators for the action it is representing. These are drawn as small empty diamonds to show that they're not directly editable (and never ever will be) via the NLA Editor.
* Action line is also drawn with borders to help differentiate it from the other tracks.

* As an experiment, removed the 'TweakMode' buttons from the header. I had originally added this as a way of indicating that this functionality was there (and to allow for keeping track of it), though it seems to have caused far too much confusion and frustration about 'modality' instead.
2009-06-24 10:32:13 +00:00
Joshua Leung db03788ad3 2.5 - Particle Settings now Animateable
Added AnimData to ParticleSettings so that this will work. This seems to be ok in the brief tests I did, but be warned that this may not be optimal for the Particles System...
2009-06-24 02:11:36 +00:00
Joshua Leung b4acd77526 NLA SoC: Big Commit - Restored NLA-Mapping Corrections
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
2009-06-23 13:25:31 +00:00
Brecht Van Lommel e2b6cea3b9 2.5: Tool Settings
* Moved proportional edit, snap, autokey mode, and a few others
  from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
  proportional edit, snap settings, selection modes.
2009-06-23 00:41:55 +00:00
Guillermo S. Romero 333e231fa6 SVN maintenance. 2009-06-23 00:09:26 +00:00
Brecht Van Lommel e7d02e5679 2.5: warning fixes
Mostly harmless ones, except for one about "gzopen64" being
undeclared. This needs some defines in BLI_storage.h to be set
before <unistd.h> is included. Might fix a crash in compressed
file reading, though I'm not sure since it's hard to repeat
the crash consistently.
2009-06-22 18:19:18 +00:00
Joshua Leung aa267976b8 NLA SoC: Merge from 2.5
21043 to 21072 

(NOTE TO SELF: Campbell made a commit in 2.5 before this merge finished)
2009-06-22 04:39:35 +00:00
Campbell Barton b9f5676caa remove support for videoscape, amiga 3D app that came before lightwave. 2009-06-21 16:58:22 +00:00
Campbell Barton 8ead648fd1 Spring Cleaning
* removed radiosity render code, DNA and RNA (left in radio render pass options), we'll get GI to replace this probably, better allow baking to vertex colors for people who used this.
* removed deprecated solid physics library, sumo integrations and qhull, a dependency
* removed ODE, was no longer being build or supported
* remove BEOS and AMIGA defines and references in Makefiles.
2009-06-21 16:18:38 +00:00
Janne Karhu 6b15024f4a Pointcache refresh part 1:
* Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast and you get a nice feeling of how the particles behave!
* "Cache to current frame" button calculates the exact result of particles at current frame.
* Current state of cache can be protected by making it a bake.
* Cache is now in memory by default, disk cache is an option.
* Only "viewport %" number of particles are calculated and cached in viewport, baking and rendering calculate all particles.
* Info on cached frames and memory usage given in ui.
* Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided)
* "Continue physics" is probably deprecated after this and should be removed once sb & cloth use the new cache code.

Todo:
* Make softbody & cloth use the new cache things.

Other changes:
* Some cleanup of particle buttons.
2009-06-21 10:16:52 +00:00
Nicholas Bishop 984ab79629 2.5/Multires:
Bugfix for loading older files with the pre-modifier multires.
2009-06-21 02:51:42 +00:00
Joshua Leung 19c246ce5d NLA SoC: Merge from 2.5
21021 to 21042
2009-06-21 00:01:37 +00:00
Brecht Van Lommel ad07fc19c0 Context
Python dir(context) now gives the items from the data context
too, modified context callbacks to also return a list of items
in the context.
2009-06-20 14:55:28 +00:00
Joshua Leung 6ff4a7229f NLA SoC: Conversion fixes - Curve 'Speed' Curves + Constraints
These fixes get the 'pathJumper.blend' file from our testing suite workable in 2.5 (with a few minor tweaks still needed *)

Changes required:
- Added a 'ctime' var to curve structs for storing the value that used to be obtained by specially evaluating the 'speed' curve when evaluating objects parented to the curve. This can now be animated as a 'proper' var as per normal.
- Added a special hack for detecting constraint blocks, as the old method resulted in paths for Objects instead...

(*) Issues:
- Unfortunately, the paths still don't work out of the box. For some reason, the constraint names in the paths are spelt incorrectly - "Ar" and "Br" instead of "Ap" and "Bp". I'm not sure where this problem is coming from, but changing the paths manually in the Datablocks viewer fixes this error...
- I noticed that in the buttons view, only 1st of the constraints gets shown. This seems a bit like some of the intermittent problems I've had with some arrays/lists not expanding properly in Datablocks view.
2009-06-20 11:44:56 +00:00
Joshua Leung ef7860ed9a NLA SoC: Conversions for old NLA-data to the new system
Old NLA-data now gets mostly ported converted over to the new system, with strips and their respective Actions being handled correctly in the test cases I've got. 

The conversion procedure now tries to fit multiple strips into since tracks as it is assumed that quite a few old setups tried to do. However, some old setups may be adversely affected by this (i.e. if they depend on a certain order of holding adds for example). 

For now, there are no complete replacements for the NLA-Modifier/Auto-Walking stuff yet, so that info is currently just ignored (but correctly freed). The current plan here is to get Armature-level pose-offset system + F-Modifiers where appropriate. This should be one of the major causes of file breakage now...

Also, I've yet to restore some patching for group instancing NLA stuff, since more trickery here is required. This is probably the second major cause of file breakage...
2009-06-20 09:36:55 +00:00
Joshua Leung 6394ee9e81 NLA SoC: Drawing + Editing Fixes
* Strips using the same action as the 'tweaking action' now get the error flag cleared after tweakmode is exited. (These strips draw with red shading)

* The direction in which strips get played (as a result of the 'reversed' option) now gets indicated on strips by the direction of the arrow text printed on each strip

* The active strip flag is now cleared after duplicating/splitting strips.
2009-06-20 04:02:49 +00:00
Martin Poirier 12bf10be02 2.5 merged 20773:21020 2009-06-20 03:38:34 +00:00
Campbell Barton 7785ead4eb ObColor wasnt converted into an RNA string.
Updated Mathutils.Vector/Euler/Quaternion/Matrix so these are types rather then module methods, each type now has a tp_new function, matching python builtins float/int/str.
Also cleaned up float conversion and arg passing.

Changed buttons_objects.py...
 if ob in groups.objects: # no longer works
 if ob.name in groups.objects: # is the new syntax
...its more dict like and a lot faster (avoids python iterating over each item and comparing each, use a single rna lookup instead).
2009-06-20 02:44:57 +00:00
Brecht Van Lommel aa0aac706e 2.5
* Optimized RNA property lookups and path resolving, still can be
  much better, but now the 1000 IPO example on bf-taskforce25
  runs at reasonable speed.
* Also an optimization in the depsgraph when dealing with many
  objects, this was actually also a bottleneck here.
2009-06-19 23:05:21 +00:00
Campbell Barton c3b8db4833 BGE: allow action blending by bringing back blend_poses() as 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. 2009-06-19 16:27:01 +00:00
Joshua Leung 42e60acce6 Animato - Conversions Bugfix
Object actions are now converted before object ipo's so that if both of them exist, the Action can still preserve its name.
2009-06-19 11:17:56 +00:00
Joshua Leung 8ffb1dacad NLA SoC: Bugfix for Deleting Keyframes
When an F-Curve doesn't contain any keyframes anymore but it still exists, the F-Curve's value is not recalculated and flushed anymore if the F-Curve's value will not change. That is, if the F-Curve doesn't have any other data, i.e. drivers or generator-modifiers, which would still change its value, it wouldn't be recalculated to have a value of zero. 

This solves the problem of deleting all scale keyframes, whereby objects/bones would appear to 'vanish'
2009-06-19 04:58:40 +00:00
Joshua Leung a87bc73d32 NLA SoC: Transition Strips + Strip Adding Operators + Bugfixes
== Transitions ==
Transition strips are now able to be created + evaluated. Transitions allow for interpolation between the endpoints of two adjacent strips in the same track (i.e. two strips which occur in the same track one after the other, but with a gap between them). 

- The current behaviour when only one endpoint affects some setting is non-optimal, since it appears somewhat inconsistently extend/replace values...
- Transform code needs a few fixes still to deal with these


== Strip Adding Operators ==
* New strips referencing Actions can be added using the Shift-A hotkey while in the strips-area. You must have a track selected first though.  
The new strip will get added, starting from the current frame, in the selected track(s) only if there is enough space to do so. Otherwise, the new strip gets added at the top of the stack in a new track.

* New transition strips can be added with the Shift-T hotkey while in the strips area. You must have two adjacent strips selected for this to work.

== New Backend Methods ==
* Recoded the strip/track adding API to be more flexible
* Added a new method for testing whether F-Curve has any modifiers of with certain attributes. Will be used in a later bugfix...

== Bugfixes ==
- Fixed bug with strip-blending which caused the blending modes to be useless.
- NLA buttons now use proper poll callbacks instead of defining checks
- Commented out missing operator in menus, silencing warnings in console
- Removed obsolete/incorrect comments
2009-06-19 04:45:56 +00:00
Campbell Barton ecb39291e9 small merge needed for testing new animsys in 2.5 BGE, mixing own changes with merge can be a hassle.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20928:20937
2009-06-16 19:51:58 +00:00
Campbell Barton 2faf20c4b3 BGE Action Actuator setChannel() function was broken in a number of ways.
* extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes.
* game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory.
* setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful.
* Added getChannel() - returns pose loc/size/quat
* Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat)
2009-06-16 18:25:48 +00:00
Campbell Barton 55f1a1dcad changes to the sequencer in trunk between 20855:20928, (excluding UI changes)
had to //XXX comment some funcs.
2009-06-16 15:04:29 +00:00
Campbell Barton a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00
Brecht Van Lommel f10541f7cf UI
* Added option for panel to be closed by default.
* Added support for RNA property and enum icons in buttons.
* Remove some deprecated RNA menu code.
* Fix issue with newly created panels not being inserted in the
  right place.
* Fix issue with 3-split layout not being divided correctly.
* FIx issue with menu items not drawing correct using python UI.
2009-06-16 01:08:39 +00:00
Brecht Van Lommel 51fbc95e8c RNA
* Added icon to property and enum property items. The latter is
  responsible for the large number of files changed.
* For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA
  as argument instead of a C pointer, instead of doing it implicitly
  with the AnyType type.

* Material: properly wrap diffuse/specular param variables, and
  rename some things for consistency.
* MaterialTextureSlot: added "enabled" property (ma->septex).
* Image: make animated property editable.
* Image Editor: make some things editable, notifiers, respect state.
* Context: fix issue with screen not being set as ID.
2009-06-16 00:52:21 +00:00
Brecht Van Lommel b8d0f62fd2 Fix for bug #18924: OpenGL performance issue with particle modifiers,
actually two modifier datamask optimizations that were never done.

* Don't use modifier data mask for disabled modifiers.
* Check if UV data is needed for particle system instead of always
  requesting it.
2009-06-15 11:48:42 +00:00
Ton Roosendaal e6aa552e25 2.5
Text Object: editmode suffered wrong allocation and reading from wrong
memory, causing crashes when typing more than a few chars.
2009-06-15 09:54:37 +00:00
Peter Schlaile ca12954e9f == Sequencer ==
Big proxy fix (addressing hopefully most complaints on mailing list and 
in tracker)
* proxy render settings are now independent of render size settings.
  That means: which proxy size is used, is controlled by two parameters
  now: the proxy size of the files, can be controlled with additional
  buttons within the proxy panels. What is shown in a specific preview
  window depends on the header settings of the preview panel.
  So: proxies are _only_ used in those windows, that are switched to a
  specific proxy resolution.
* output rendering is always done _without_ proxies.
* proxy generation now shows a waitcursor with numbers.
  (closing Bug: [#18909] Building Proxies doesn't give any feedback
  which was rather a feature request, since the problem mentioned there
  was always the case :) )
2009-06-14 18:54:35 +00:00
Kent Mein 472239cc94 coverity issue CID: 307
Checker: FORWARD_NULL (help)
File: base/src/source/blender/blenkernel/intern/modifier.c
Function: meshdeformModifier_deformVerts
Description: Variable "dm" tracked as NULL was passed to a function that dereferences it.

fix provided by Brecht.

Kent
2009-06-13 22:23:24 +00:00
Kent Mein a7ac260cc5 coverity issue CID: 469
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/BME_tools.c
Function: BME_split_face
Description: Pointer "example" dereferenced before NULL check

Check for null before we try to use it.

Kent
2009-06-13 16:57:26 +00:00
Robin Allen c4ad2ed253 Omission of a texture node to specify coordinates was regarded as a bug by some users. I rather agree :) 2009-06-13 14:22:40 +00:00
Campbell Barton eed13b43b1 merged from trunk 20741:20848
* Missing changes to release/windows/installer
* Sequencer fixes in source/blender/src/seqaudio.c dont apply to 2.5
* brechts fix for #18855 r20763 wasnt merged, does this apply to 2.5?
2009-06-13 11:09:13 +00:00
Joshua Leung f0f9034966 NLA SoC: Operator for adding new NLA-Tracks
New tracks can be added in the following ways (with the mouse hovering over the channels-list):
* Shift-A - this will add a new track at the top of the stack (i.e. above all the existing NLA-tracks but below the Active Action) for every AnimData block where there was a selected NLA-Track

* Ctrl-Shift-A - this will add a new track above every selected one
2009-06-11 03:19:08 +00:00
Joshua Leung 64f94a670e NLA SoC: Evaluation bugfixes
* Strip scaling was being evaluated in the wrong way, resulting in scaled strips not being played too fast (for lengthened strips) or too slow (shortened strips)

* Also, verified that the 'reversed' option works correctly (no changes needed to be made here)
2009-06-11 02:14:56 +00:00