This commit restores fluid sim baking functionality in 2.5, it's been on the todo for
a while, and was previously almost completely non-functional. The old
code was quite complicated and specific to the 2.4 animation system, so I've
pretty much rewritten most of it.
This includes:
* Animated variables work again - just key them in the UI. Non-animateable values
should be already set non-animateable in RNA, hopefully I got them all.
Available are: Domain Gravity / Domain Viscosity / Object loc/rot/scale /
Object initial velocity / Deforming meshes / Fluid control Attract strength /
Fluid control Attract radius / Fluid control Velocity strength /
Fluid control Velocity radius / Object Active status (checkbox next to fluid type)
The Domain time scale is still not yet implemented.
* Fluid sim now use global scene units data by default - when enabled, the
scene's global gravity value is used and when units are set (metric/imperial)
the simulation real world size is taken from the object's actual measurements.
* The baking process is now done in the background, using the nifty threaded
Jobs system. It's non-blocking and your domain object will show the simulated
fluid as it becomes available for that frame.
A nice extra thing for the future would be to improve the visualisation of the
object's state while baking, and also the jobs system/ui could do with some
touchups - currently it has to share a bit from the 'render' job, and appears as
'Render' in the header. Progress bars for jobs in the header would be great too.
* Added 'id_name' property, which is used as the "typeinfo_name" by Keying Set instances. This is simply the name of the relevant KeyingSetInfo classes.
* Renamed the 'array_index' arg for ks.add_path() to 'index'. Also removed the 'entire array' toggle arg in favour of just passing -1 to index. However, Keying Sets in general still maintain their 'entire array' toggle flags for now, it's just that the API function does conversion between the two.
C functions and python used different argument order, this relied on mapping non-keyword arguments to 'REQUIRED' arguments but meant that you could not have an optional, non-keyword argument.
next commit will make order of arguments consistant (currently only changed order that rna wrapped).
(commit 27674 by Campbell from render25 branch)
This commit clarifies the somewhat "murky" separation between "builtin" and "absolute" KeyingSets as a result of discussions with Cessen.
* "Builtin" Keying Sets are now just the Keying Sets which in the past have been known as PyKeyingSets or Relative KeyingSets. These are registered from Py Scripts at startup, and will use the context info to determine what data they should be keyframing. These are stored per Blender session, independent of files, since usually these will be coded specific to sets of rigs used at a studio.
* "Absolute" Keying Sets are the ones that you can create from the Scene buttons and/or KKEY or RMB over any property. They specify the exact set of properties which should always get keyframed together. These are stored in the scene.
In relation to this, I've made it possible to now set one of the builtin Keying Set types as the active Keying Set.
* For now, this can only be done via the box beside the insert/delete key operator buttons on the TimeLine header (now complete with an recycled icon - HINT TO ICON DESIGNERS, to make this a bit more obvious). Later on I'll commit an operator to set this via a hotkey.
* The "IKEY" menu will only show up when there is no active Keying Set. When there is one, keying will happen silently (with info notice at the top of the screen). Later on, I'll hook this menu up to a hotkey, so that that active Keying Set can be changed without inserting keyframes or clearing active Keying Set...
* By default, there isn't any default Keying Set enabled. IMO, this is probably a good default, though some might like to have LocRotScale instead.
* I'm not terribly impressed with the search menu for the items being SORTED (and of all things, alphabetically!) currently, since this does break muscle-memory with the menu (and jumbles up order of closely related vs not closely related).
* The Scene buttons for KeyingSets still need some changes to fully cope with users setting builtin KeyingSets as active sometimes. Controls which are useless or shouldn't be used when a builtin set is shown are being shown.
Builtin set registrations have been tweaked a bit:
* Renamed "bl_idname" to "bl_label" for consistency with rest of API. Note that this is the identifier used by Blender internally when searching for the KeyingSet, and is also what the user sees.
didnt commit this patch because curves are generally better to create a shape to lathe however now that curves can have modifiers applied to them I think its good to have this.
Added options to offset the lathe so it can work like the screw tool as well.
- optional object for axis which also controls the center point.
- screw offset so rather then just lathing this can work more like the screw tool.
- screw optionally using the object distance along the axis.
- iterations so the screw can be applied multiple times.
tested to work well with curves.
Also removed some python code to check for node materials within the material and texture properties. It seems to go fine without it, and this should be handled by context instead.
* sound file path was not displayed in sequencer panel.
* sound strip with relative paths would stop working after undo.
(commit 27575 by Brecht from render25 branch)
Campbell please check/beautify if you like, but it works properly on OS X, either
opening Preview with the 'open' command or Photoshop, when the path is set
in user preferences.
- update internal 'btempdir' from userprefs on changing and initializing the temp dir.
- add sequence strip operators nolonger require the sequence view to be active (better for automation).
(commit 27434 by Campbell from render25 branch)
* 'Export Keying Set' operator works again - a change in the previous commit broke the created code
* Relative Keying Sets don't get their paths shown
* Keying Set paths show options for inserting keyframes too now
---
Another attempt at fixing compile troubles, and removed some commented out + obsolete stuff.
After a few days of wrong turns and learning the finer points of RNA-type-subclassing the hard way, this commit finally presents a refactored version of the Keying Sets system (now version 2) based on some requirements from Cessen.
For a more thorough discussion of this commit, see
http://sites.google.com/site/aligorith/keyingsets_2.pdf?attredirects=0&d=1
------
The main highlight of this refactor is that relative Keying Sets have now been recoded so that Python callbacks are run to generate the Keying Set's list of paths everytime the Keying Set is used (to insert or delete keyframes), allowing complex heuristics to be used to determine whether a property gets keyframed based on the current context. These checks may include checking on selection status of related entities, or transform locks.
Built-In KeyingSets have also been recoded, and moved from C and out into Python. These are now coded as Relative Keying Sets, and can to some extent serve as basis for adding new relative Keying Sets. However, these have mostly been coded in a slightly 'modular' way which may be confusing for those not so familiar with Python in general. A usable template will be added soon for more general usage.
Keyframing settings (i.e. 'visual', 'needed') can now be specified on a per-path basis now, which is especially useful for Absolute Keying Sets, where control over this is often beneficial.
Most of the places where Auto-Keyframing is performed have been tidied up for consistency. I'm sure quite a few issues still exist there, but these I'll clean up over the next few days.
Some code changes:
* Every Add-On now needs a dictionary with several infos, which are then displayed in the Blender UI and/or are used internally.
Example:
bl_addon_info = {'name': 'Measure panel',
'author': 'Buerbaum Martin (Pontiac)',
'version': '0.6.3',
'blender': '2.5.2',
'location': 'View3D > Properties > Measure',
'url': 'http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Panel_Measure',
'category' : 'UI'}
Unfinished/Not working yet
* The 'blender' tag is compared with the internal version number, it raises an error if the add-on was written for a newer Blender version.
* The 'category' tag will be added to the filter, so the add-ons can be searched/filtered.
encoding format
Bypassed existing hardcoded ffmpeg presets that executed when changing
format, replaced with bpy presets.
Leaving old code there for now, haven't got python/rna access to the ffmpeg
id properties.. Anyone know how to do this?
Code snippets here: http://www.pasteall.org/11657/c
This patch adds following features:
- Filter Add-ons by a category.
- Search Add-ons by Name and Author.
- Possibility to expand an Add-on, displaying more information like author, version, description, etc.
- Warns when a user wants to enable a script that was written for a newer version of blender
- Replaced hardcoded nurbcol array with theme colors
- Send notification in duplicate curve operator (this operator could
reset/change active nurb)
- Edge seam color added to the user preferences dialog
* Fixed up RNA and UI
* Brought back 'Save' and 'Clear' operators (in the little triangle menu in
environment map properties)
* While I was at it, noticed that environment maps were only using 8bit
colour, changed it to use full 32bit float instead for proper HDR colour etc,
so environment map reflections have the correct colour range
--> http://mke3.net/blender/devel/2.5/env_hdr.jpg
This fixes [#20904] Environment Map does not render; also missing panel
unrelated changes that ended up being more trouble to commit separate...
- removed BLI_split_dirfile(), was nasty, occasionaly modifying the source string, it could create directories and used the $CWD in some cases. was only used in 2 places in filesel.c, if this gives problems can address without bringing back this function.
renamed BLI_split_dirfile_basic --> BLI_split_dirfile
- view3d_operator_needs_opengl was being called for offscreen render when it wasnt needed.
setting sys.stdin to None is done so python wont lock blender when it tries to read from the input. - help() from the console does this.
Running blender with -d keeps the stdin so python debugging can work. add info in the help message about this.
eventually it might be best to replace sys.stdin with our own object which interacts with the console but this is not trivial.
image.py has a function image_editor_guess(), please test on windows and mac. (using 'startfile' and 'open')
this is only used when the image editor is not set.
* I put it under General->System. Not sure is the better place for it though (space_userpref.py)
** also: creator.c fix to avoid autoplay of games when scripts are disabled.
- new mode for projecting an image with the view matrix saved in the image id-properties rather then using the camera matrix.
- operator to screenshot the view and create a new image with the view matrix stored in the image.
these will be used for better re-project integration and are not immediately very useful.
It's (still) not working since the pool in the operator will not allow this operator to run without context.
For the window/area/screen has to be created somewhere (maybe in WM_init_game ).
I have no idea on what should be done to initialize it here, so if anyone knows how to proceed, please help here.
* side note: should we also have it as a command line option?
Reports (i.e. 'info' or 'errors') are now shown in the info header in place of the scene statistics if the last executed operator had some, with this info disappearing again once another operator is run (to show scene statistics again).
For example, this means that info such as the the number of verts merged, or whether a Keying Set successfully inserted keyframes, etc. is now shown again somewhere, and that this is done in a non-blocking manner.
The current implementation is still a bit crude (i.e. lacking fancy polish), but is at least barebones functional. The todos...
* When more than 1 report message is generated by the last operator, there is currently a display of the number of reports. In future, it would be nice to be able to add a button beside this or make the label clickable with appropriate text indicating this (commented out atm) to show popup menu of all the reports...
* There could probably be some kind of coloured backdrop behind the text. Currently using standard box, but that has padding problems, and lacks visual interest.
* Timer based fade out/disappear?
* joined filename and directory to single rna entry for movie and sound sequence
* PROP_FILENAME was missing in makesrna
* made seq->strip->data->name PROP_FILENAME rather than PROP_FILEPATH for the complete path
* also made seq->strip->data->name read only
Missing still: update of sequence length, start end frame etc..