- rename "Nurb" to "Spline" in RNA, eg. bpy.data.curves[0].splines[2].type == 'NURBS'
from a user perspective spline is a more generic term while Nurb is misleading when used for beziers and poly lines.
- added curve.active_spline property so the python UI can display the last selected curve.
- set the active spline when entering editmode (uses first selected spline)
- added back Hide Handles as a curve property (removed the global flag), access from the view panel in editmode.
- added hide normal option for curve, normal size access for curve and mesh display.
- changing orderU/V, endpoints, cyclic, bezierU/V now work in editmode and calls update functions.
- entering editmode was crashing with text objects
- curve.switch_direction() crashed (own fault from last commit)
- Tkey for tilt was overridden by Toolbar, made Tilt Ctrl+T.
- OBJECT_OT_mode_set check for compatible modes before running - so curves dont try go into paint mode with V key for eg.
strangely vector.c was skipped in last merge from trunk.
-----------------------------------
Mathutils fix: Vector.reflect
* correct function for reflection and moving it to arithb.c
This commit some of the many bugs here (it's still not perfect now, but much better than it was):
* Moving in/out of Object, Edit, and Pose Modes for Armatures should now work smoothly. Operators should work nicely in the appropriate modes now (select linked might be a bit tempermental still, since it uses mouse-position).
* Fixed the 'mysterious' memory leaks when changing modes. These were only caused when using the mode switching menu in the 3D-View.
* Went through bullet-proofing some of the operator calling functions against NULL operator id-name strings.
moved CU_2D to Nurb->flag in do_versions
This made simple type checks confusing to read.
many... if( (nu->type & 7)==CU_BEZIER)
replaced with ... if(nu->type == CU_BEZIER)
made setting rna curve_2d clamp the Z values. still more RNA/UI changes to do.
MathUtil matrix type follows Blender convention of column
major storage. This means that the elements on one column
are contiguous in memory. Vectors are one dimensional
arrays that can be considered in row or in column but
the Blender convention is column so vector should only
be considered as row. This means that the only logical
multiplication operation between matrix and vector is
matrix * vector.
This convention is respected in all parts of MathUtil
except in matrix/matrix and matrix/vector multiplication
where the row major convention is assumed, which in the
and is equivalent to reversing the order of multiplication.
This is clearly a bug and must be corrected but the side
effect is that it will break all scripts using these
operations. Script writers who care about the correctness
of the matrix operations have already implemented work around:
1) change order of matrix/vector multiplication.
vec2 = vec1 * mat1
This must be changed to the normal order:
vec2 = mat1 * vec1
2) change order of matrix/matrix multiplication
(with matl a local transform in matw reference)
mat3 = matl * matw
This must be changed to the normal order:
mat3 = matw * matl
3) transpose before an after the multiplication
matl.transpose()
matw.transpose()
mat3 = matw * matl
mat3.transpose()
This must be changed to:
mat3 = matw * matl;
- added curve attribute use_twist_correction
- added nurb attribute type - NURBS, POLY, BEZIER
- renamed a number of curve attributes with the use_ prefix.
- UI layout adjustments to only show buttons that are needed and reflect internals for nurbs.
... Note that many of the buttons only apply to NURBS, and all the "V" buttons only apply to surfaces, remove when not needed.
* Added missing prototype from arithb
* Added define for Axis-Angle rotations. This has not yet been hooked up for actual usage yet, since there are some issues regarding evaluation which I'd like to investigate further first.
* Editing numbuttons for posechannel transforms now updates in realtime. Sending ND_POSE|ND_TRANSFORM was causing confusion for the listeners (which only check for either/or)
* Partial fix for axis drawing on bones. Now the axes are drawn at the tips of the bones again, but unfortunately the texts aren't (since they only use the object matrix, they get drawn at the origin).
* Copy Rotation constraint should now work ok with this new code again. Previously, it was the only thing that really went beserk when the typos were still uncaught.
* Fixed one other case of a potential case where typos would cause problems.
* Made changing the rotation order setting perform conversions of the current rotation to an equivalent representation in the other orders/forms. This is done at RNA level, so maybe not that great for switching representations while animating?
* correct function for reflection and moving it to arithb.c
* note: 2.5 has an already more elegant solution for it (still wrong, but the code is cleaner).
Therefore the merge may need to be manual in that case.
Specifically in 2.5 we are doing:
if(!BaseMath_ReadCallback(self) || !BaseMath_ReadCallback(value)) return NULL;
And there we don't need to create a VectorObject *mirrvec; only to get the values.
Code used to test it:
http://www.pasteall.org/7654/python
* YoFrankie script probably needs to be fixed too.
* Fixed some bad UI pointed out by letterrip. People had made some quite bad changes (duplicating buttons, adding UI for non-existent features, even deleting UI for existing features!)
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.
http://www.graphicall.org/ftp/ideasman42/curve_auto_twist.png
Access next to the "3D" edit button.
details...
- open curves use the first points orientation and minimize twist for each new segment.
- cyclic curves calculate the least twist in both directions and blend between them
- AxisAngleToQuat replaced inline code.
- Notice the model on the right now has more even corners. added Vec3ToTangent to arithb.c.
* 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