Commit Graph

19116 Commits

Author SHA1 Message Date
Matt Ebb
b9816c98bc * Volume render weaks/fixes/etc from Alfredo, after code review
- General correctness tweaks
- Light cache is enabled for all objects now
- Metaballs now give density info, for smooth falloff
2009-09-08 08:15:56 +00:00
Campbell Barton
1d0a567023 Curve/Surface Editing
- 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.
2009-09-08 07:35:07 +00:00
Matt Ebb
fab4bf0816 Re-commit previous brush ui changes.
Strangely seemed to get reverted in jahka's rev. 22861
2009-09-08 03:29:28 +00:00
Dalai Felinto
f7deb2046e manual merge trunk -r 23037
strangely vector.c was skipped in last merge from trunk.

-----------------------------------
Mathutils fix: Vector.reflect
* correct function for reflection and moving it to arithb.c
2009-09-08 03:25:00 +00:00
Joshua Leung
6808e15c8d 2.5 - Mode Switching Bugfixes
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.
2009-09-08 02:09:14 +00:00
Martin Poirier
00838f05d2 use pure py classes instead of a mix of rna stuff for ui. fix a couple of bugs 2009-09-08 01:18:06 +00:00
Campbell Barton
8b6b31b41f Made Nurb->type only store the type rather then mixing the type with flags.
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.
2009-09-08 00:23:33 +00:00
Benoit Bolsee
0ab2f675c3 Fix bug in Mathutil with matrix/matrix and matrix/vector multiplication order.
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;
2009-09-07 22:26:23 +00:00
Andrea Weikert
01eaf4fd5f 2.5 MSVC 9 projectfiles
* maintenance
2009-09-07 18:44:01 +00:00
Campbell Barton
4c859897f6 - crash fix for setting a curve smooth operator
- 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.
2009-09-07 15:02:43 +00:00
Thomas Dinges
70c4898db8 2.5:
* Fixed a Typo in Particle Effector Panel. Reported by Jack*RED on graphicall. Thanks!
2009-09-07 14:58:08 +00:00
Thomas Dinges
f4f51efa51 2.5:
* Use new Pressure Size Icons, old ones were still defined in the py file.
2009-09-07 11:59:05 +00:00
Thomas Dinges
fcf1040473 2.5:
* New Smoke Modifier icon was missing in the Smoke RNA struct.
2009-09-07 11:51:19 +00:00
Joshua Leung
a83aa92e80 2.5 - Armature/Pose Bugfixes:
* 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).
2009-09-07 11:05:16 +00:00
Matt Ebb
10c18d72f4 * Another handful of brilliant new icons by jendryzch 2009-09-07 09:43:04 +00:00
Campbell Barton
4cc908b676 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r23023:HEAD 2009-09-07 08:37:28 +00:00
Campbell Barton
d779410600 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22935:23022
looks like 2 merges are needed to skip a commit.
2009-09-07 08:31:03 +00:00
Campbell Barton
f5e80e7a80 Operator docstring patch from Ron Walker, added console operator docs too. 2009-09-07 04:52:42 +00:00
Joshua Leung
84448173c3 2.5 - Rotation Order Tweaks
* 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?
2009-09-06 23:15:43 +00:00
Guillermo S. Romero
a646688325 SVN maintenance. 2009-09-06 20:59:06 +00:00
Dalai Felinto
7064f6c5d8 Mathutils fix: Vector.reflect
* 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.
2009-09-06 19:51:57 +00:00
Campbell Barton
6a301de3eb users on blenderartist reported uncompressed TGA loading worked for them where compressed didnt. 2009-09-06 19:18:12 +00:00
Nicholas Bishop
952fa6d1c1 2.5/Paint:
* 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!)
2009-09-06 16:58:14 +00:00
Arystanbek Dyussenov
62138aaa5a Python part of multidim. array support for RNA complete.
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
2009-09-06 15:13:57 +00:00
Nathan Letwory
3d64d65ad9 * clean out some warnings (unrefenced vars mainly) 2009-09-06 14:32:02 +00:00
Nathan Letwory
fb649d5824 * cleaning up warnings (mostly windows). A collection of other warning fixes too (undefined function, assuming int, etc.)
This compiled fine with scons/msvc and scons/mingw (gcc 4.4.0). Please test and report any problems.
2009-09-06 13:20:05 +00:00
Joshua Leung
51aa207d20 2.5 Anim Bugfixes:
* 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.
2009-09-06 07:22:32 +00:00
Campbell Barton
0a3694cd6e white space commit. (2 spaces -> tab).
Was annoying to use a different editor for cmake only.
theeth says this should be ok with gsoc and merges from branches.
2009-09-06 01:51:23 +00:00
Martin Poirier
a46beac3f8 Rename Vec3ToTangent VecBisect3, since that's what it does. 2009-09-06 01:11:47 +00:00
Campbell Barton
d1c90f4bef easier to re-apply the replacement table then merge from 2.4x, same as 23023
replacements...
 MTC_cross3Float -> Crossf
 MTC_diff3Float -> VecSubf
 MTC_dot3Float -> Inpf
 MTC_Mat3CpyMat4 -> Mat3CpyMat4
 MTC_Mat3MulVecd -> Mat3MulVecd
 MTC_Mat3MulVecfl -> Mat3MulVecfl
 MTC_Mat4CpyMat4 -> Mat4CpyMat4
 MTC_Mat4Invert -> Mat4Invert
 MTC_Mat4Mul3Vecfl -> Mat4Mul3Vecfl
 MTC_Mat4MulMat4 -> Mat4MulMat4
 MTC_Mat4MulSerie -> Mat4MulSerie
 MTC_Mat4MulVec4fl -> Mat4MulVec4fl
 MTC_Mat4MulVecfl -> Mat4MulVecfl
 MTC_Mat4One -> Mat4One
 MTC_Mat4Ortho -> Mat4Ortho
 MTC_Mat4SwapMat4 -> Mat4SwapMat4
2009-09-06 00:36:26 +00:00
Campbell Barton
c9dd69c11a remove MTC_ functions, (don't merge)
replacements...
MTC_cross3Float -> Crossf
MTC_diff3Float -> VecSubf
MTC_dot3Float -> Inpf
MTC_Mat3CpyMat4 -> Mat3CpyMat4
MTC_Mat3MulVecd -> Mat3MulVecd
MTC_Mat3MulVecfl -> Mat3MulVecfl
MTC_Mat4CpyMat4 -> Mat4CpyMat4
MTC_Mat4Invert -> Mat4Invert
MTC_Mat4Mul3Vecfl -> Mat4Mul3Vecfl
MTC_Mat4MulMat4 -> Mat4MulMat4
MTC_Mat4MulSerie -> Mat4MulSerie
MTC_Mat4MulVec4fl -> Mat4MulVec4fl
MTC_Mat4MulVecfl -> Mat4MulVecfl
MTC_Mat4One -> Mat4One
MTC_Mat4Ortho -> Mat4Ortho
MTC_Mat4SwapMat4 -> Mat4SwapMat4
2009-09-06 00:19:15 +00:00
Nathan Letwory
75407a4ecc == SCons ==
* 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.
2009-09-05 22:39:42 +00:00
Janne Karhu
08b8fc34cf Disconnect/connect hair:
- 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.
2009-09-05 20:12:08 +00:00
Campbell Barton
3b743ac556 Option to correct for 3D curve twist error. example before and after.
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.
2009-09-05 09:54:01 +00:00
Joshua Leung
05c44056dc 2.5 - Demo of how to get node attributes animateable
* 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 :)
2009-09-05 04:04:51 +00:00
Nathan Letwory
668b92dfed * fix lib list creation. now blenderplayer links fine with both scons/mingw and scons/msvc 2009-09-05 02:14:45 +00:00
Nathan Letwory
d56f826ea9 remove unnecessary semi-colons 2009-09-05 02:13:13 +00:00
Nathan Letwory
9216efcba2 == SCons ==
* 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.
2009-09-05 01:58:02 +00:00
Nathan Letwory
fc8ba755bd * fix linking order.
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.
2009-09-04 23:22:46 +00:00
Guillermo S. Romero
c802d187e5 Comment out line so build does not crash due to NULL pointer. 2009-09-04 23:20:45 +00:00
Janne Karhu
f09d605410 Some particles cleanup & fixes:
- 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.
2009-09-04 23:06:15 +00:00
Joshua Leung
ec5a8c010c 2.5 - Animation Tweaks
* 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.
2009-09-04 22:50:15 +00:00
Campbell Barton
eaa079b9b7 - buttons to move logic bricks up and down when they are collapsed
- 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.
2009-09-04 22:07:33 +00:00
Brecht Van Lommel
d3e35f0968 2.5: increase subversion to init new sound userpref variables. 2009-09-04 21:34:17 +00:00
Joerg Mueller
a49020b241 Strip input is not used for sound strips in 2.5. 2009-09-04 21:21:12 +00:00
Brecht Van Lommel
5dd9f7635a 2.5
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.
2009-09-04 21:02:43 +00:00
Dalai Felinto
670296dabe fix for relative path to build bplayer with cmake in windows (ffmpeg still needs to be off) 2009-09-04 20:57:50 +00:00
Brecht Van Lommel
7df35db1b1 2.5
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/NotifiersUpdates
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers
2009-09-04 20:51:09 +00:00
Joerg Mueller
5342f7930f Added sound device default settings for the gameplayer. 2009-09-04 20:14:59 +00:00
Joerg Mueller
944d0e9087 Fixed sound stuff for gameplayer, no sound though as U.audiodevice is set to 0 (="No Audio"). 2009-09-04 20:03:27 +00:00