Multidim. arrays can now be modified at any level, for example:
struc.arrayprop = x
struc.arrayprop[i] = x
struc.arrayprop[i][j] = x
struc.arrayprop[i][j][k] = x
etc...
Approriate rvalue type/length checking is done.
To ensure all works correctly, I wrote automated tests in release/test/rna_array.py.
These tests cover: array/item access, assignment on different levels, tests that proper exceptions are thrown on invalid item access/assignment.
The tests use properties of the RNA Test struct defined in rna_test.c. This struct is only compiled when building with BF_UNIT_TEST=1 scons arg.
Currently unit tests are run manually by loading the script in the Text Editor.
Here's the output I have: http://www.pasteall.org/7644
Things to improve here:
- better exception messages when multidim. array assignment fails. Those we have currently are not very useful for multidim.
- add tests for slice assignment
* Rotation order code should be more correct now. Previously was only shuffling axes, and was also doing some evil things to provided that that it shouldn't have been doing, which was causing some flipping issues.
* Built-in keyingsets for 'visual' options should now be more correct. The old code had typos, giving wrong array indices to start from.
* makesrna and makesdna now use CFLAGS, CCFLAGS and Linking flags as specified in config.
This might help with cross-compile on OSX 10.6 (32bit on 64bit). devroo & jensverwiebe, please test and report.
- Moves hair from face-space to global space and back.
- Allows for editing of emitter mesh after hair combing.
- Disconnect hair before doing topology changing changes in mesh edit mode, connect after changes.
- Notes:
* The closest location on emitter surface to the hair root is used to connect the hair.
* Emitter deflection, sticky roots and add brush don't apply for disconnect hair in particle mode.
- Todo for future:
* Copy disconnected hair from object to another (when 2.5 has proper copy operators again).
* Possible automatic disconnect/connect with topology changing operations in mesh edit mode.
Other changes/fixes:
- Proper subtypes for some particle mode notifiers.
- Particle mode selections didn't draw correctly because of using lighting for the paths.
* Made sure that nodes have a working 'path' function (needed for any tools that will resolve paths needed for animating properties)
* Replaced all the UI button controls for a single node (Vector Blur) with relevant RNA buttons which can be animated. There are probably some even nicer ways to do this (i.e. using layout engine for drawing all sets of buttons), though this is the easiest way forward in the immediate future.
Anyways, if people are interested in getting this working, they will need to spend time to replace all the necessary button calls :)
* bring back 'player' libtype, after investigation with ideasman.
scons/mingw works nicely, for some reason msvc fails to link still, will look further into it.
NOTE: this needs changes to stubs.c, but need to check with ideasman_42 how to fix with cmake. Probably linking order issues, but stubs.c currently generates warnings for msvc (redefinition of funcs) and errors for mingw (same redefinitions). Removing the offending lines from stubs.c fixes that.
- Some big refresh issues with softbody & cloth point cache usage should now be fixed.
- Removed sticky objects from particles (better stuff will come back when I get to updating reactor particles).
- Some initial easy memory efficiency cleanup for ParticleData struct. The ultimate goal is to get particles less memory hungry -> more particles possible in single scene.
- Wrong path timing clamping caused hair particles to seem disappeared when changing between normal<->hair particles.
- "Calculate to current frame" in cache buttons baked instead of the intended function.
- Boids particle data is now a bit better organized.
* Sequencer data is now animateable. Was missing a 'path' setting. For now, sequencer data is animated under scene, since SequenceEditor is not an ID block.
* Fixed some buggy insert-keyframe code.
- made actuators and sensors 300 wide (like they were in 2.4x, someone must have changed that). The layout didnt take advantage of the extra width and it looked odd.
Make local and make single user are back for ID template.
Internally these calls got unified, id_make_local and
id_copy are now used to do these operations for all types
that support it. Also reveals that for some ID types the
implementation is still missing.
Further, some small changes:
* unlink_text is now in blenkernel.
* copy_group was implemented.
* ID template now has an open operator again.
* fix preview to not change material reference count,
even if temporary it shows up with threaded preview.
* id_unlink unifies unlink for text, object and group.
Notifiers
---------
Various fixes for wrong use of notifiers, and some new notifiers
to make things a bit more clear and consistent, with two notable
changes:
* Geometry changes are now done with NC_GEOM, rather than
NC_OBJECT|ND_GEOM_, so an object does need to be available.
* Space data now use NC_SPACE|ND_SPACE_*, instead of data
notifiers or even NC_WINDOW in some cases. Note that NC_SPACE
should only be used for notifying about changes in space data,
we don't want to go back to allqueue(REDRAW..).
Depsgraph
---------
The dependency graph now has a different flush call:
DAG_object_flush_update(scene, ob, flag)
is replaced by:
DAG_id_flush_update(id, flag)
It still works basically the same, one difference is that it now
also accepts object data (e.g. Mesh), again to avoid requiring an
Object to be available. Other ID types will simply do nothing at
the moment.
Docs
----
I made some guidelines for how/when to do which kinds of updates
and notifiers. I can't specify totally exact how to make these
decisions, but these are basically the guidelines I use. So, new
and updated docs are here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/NotifiersUpdateshttp://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
* apply a patch from b333rt. I modified to test for relative/absolute paths before doing mods by b333rt. Fixes troubles with using absolute paths in BF_BUILDDIR
* further cleaning of 'player' stuff. Now only 3 libs are remaining, of which ideally the stubs lib will be fixed at some point, fading away into the dark history of not-so-nice code. The current blenderplayer part is still a little bit hackish, I'll see if I can find a better alternative, for now it works good enough.
* Some of the patches in patch #19034 - by Wolfgang W. (bender)
- outliner.patch - a small fix to make the outliner draw the last
line of the list, if the list is bigger than the window.
- scroll.patch - enables vertical scrolling in the buttons window in horizontal mode. Necessary if a panel is opened that
is higher than the buttons window.
* Also, fixed some messy comments in drivers code
* first working changes to get blenderplayer linking
* blenderplayer/ moved into source/ (CMakeLists.txt changed for that too)
* added externs for bprogname to gp_ghost, so that it links properly
Now there is (in order of speed):
* Nearest neighbour (very rough quality)
* Linear (medium quality)
* Quadratic (good quality)
* Cubic Catmull-rom (very good quality, crisp)
* Cubic B-spline (very good quality, smooth)
Thanks!
bpy.data, bpy.ops.object etc.
- added basic docs for bpy.props
- omit panel, menu and operator classes (took up too much space and not useful)
- exec cant be used as an operator suffix eg- CONSOLE_OT_exec --> CONSOLE_OT_execute (same for file)
- fixed some crashes when generating docs
Updated docs here
http://www.graphicall.org/ftp/ideasman42/html/
* DopeSheet + Graph Editor - 'Sample Keyframes' option now tags newly created keyframes as being breakdowns. Also moved reduced the code duplication here by moving the core code for this to the animation module.
* Keyframing (Standard/Auto) - Added proper 'replace' option
Keyframes can now be rekeyed non-destructively when the INSERTKEY_REPLACE flag is provided to the keyframing API functions, since this option will make sure that only the values of the handles get altered.
For the Auto-Keyframing 'Replace/Edit Keys' option, this means that it truly works as it describes now, since it will now only replace the values of the keyframes on the current frame, and won't create new keyframes in the process or destroy the tangents already created for those keys.
For things like the sliders in animation editors, keyframes changing the value won't destroy existing tangents.
It is now possible to tag certain keyframes as being 'breakdowns' in the DopeSheet. Breakdown keyframes are drawn as slightly smaller blue diamonds.
Simply select the relevant keyframes and use the RKEY hotkey (or from the menus, Key->Keyframe Type) to choose between tagging the keyframe as a 'proper' keyframe and a 'breakdown' keyframe.
Notes:
* Please note that this feature does not currently imply anything about breakdowns moving around keyframes or behaving any differently from any other type of keyframe
* In future, if there is any such need, more keyframe types could be added, though this is not really likely at all
AutoSide names now gets called correctly from menus.
However, the toggle bone settings operators aren't. I can't seem to get them to call the invoke again after making autoside call exec...
example. bpy.ops.tfm.rotate('INVOKE_REGION_WIN', pivot=(0,1,2), ......)
bpy_array.c - was too strict with types, 0 should be allowed as well as 0.0 in a float array.
* Autoside renaming tools in EditMode for armatures now works again. (Wrong property name)
* Action used by NLA Strips can now be chosen/changed to another action
*****
first commit in a long time, and its great to be back!
commited Select Mirror operator for objects
eg. L.sword->R.sword
added to 3dview select menu aswel
the hotkey is shift-ctrl-m (hope its not taken)