Commit Graph

19090 Commits

Author SHA1 Message Date
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
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
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
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
Joerg Mueller
9303254e4f fix for ffmpeg with cmake, now linking 2009-09-04 19:27:15 +00:00
Campbell Barton
5bc0fa9a04 fix for ffmpeg with cmake, still not linking yet 2009-09-04 19:09:05 +00:00
Campbell Barton
d65a908ec1 update relative paths for CMake 2009-09-04 18:32:31 +00:00
Nathan Letwory
01f9b34abe * remove mtio.h - no magnetic tape support has been coded. Helps compilation on osx10.6. 2009-09-04 16:41:46 +00:00
Nathan Letwory
b537da1837 * shuffle a bit with playerlist. Fixes some undefined references, but not all. 15 undefined references left for mingw. (msvc is fine) 2009-09-04 16:13:43 +00:00
Nathan Letwory
461cb87e1d == SCons ==
* 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
2009-09-04 15:54:06 +00:00
Nathan Letwory
20f39ec7d8 == SCons ==
* 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.
2009-09-04 12:56:30 +00:00
Joshua Leung
0e40abf642 2.5 - Patches + Cleanups
* 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
2009-09-04 11:19:12 +00:00
Joshua Leung
1e6efcc965 2.5 - KeyingSet fixes
* Fixed warnings in console about missing (removed) property
* Fixed update problems after creating a new keyingset
2009-09-04 10:41:02 +00:00
Nathan Letwory
bade641408 == SCons ==
* 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
2009-09-04 10:40:41 +00:00
Campbell Barton
6ed49857a4 poll functions to stop crashing when running operators in an invalid context. 2009-09-04 08:49:11 +00:00
Joshua Leung
15ef88b902 Keying Sets: Added options to add/remove properties from the active Keying Set to the RMB menu (and also via KKEY and ALT-K respectively) 2009-09-04 07:26:32 +00:00
Matt Ebb
62dd488ad1 * New and improved voxel interpolation methods, from Alfredo.
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!
2009-09-04 06:55:01 +00:00
Campbell Barton
6caff6b390 - rna documentation layout now matches blenders internal layout, autogenerate packages for nested modules.
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/
2009-09-04 04:29:54 +00:00
Joshua Leung
a819ef1bf2 2.5 - Keyframing Bugfixes + Code Cleanups
* 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.
2009-09-04 04:27:06 +00:00
Nathan Letwory
d577e0d986 * clean commented-out parts 2009-09-04 04:05:29 +00:00
Joshua Leung
fa01703ac3 2.5 - Keyframe Types for DopeSheet
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
2009-09-04 02:44:56 +00:00
Martin Poirier
640e39206b add blendcache files to dependancies. next step, per frames deps. 2009-09-04 01:33:22 +00:00
Joshua Leung
993037d3cb 2.5 - Bugfixes for Armature operators
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...
2009-09-04 00:18:44 +00:00
Campbell Barton
02f951c3a0 allow execution mode to be given as an argument to operators from python (requested by algorith)
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.
2009-09-03 22:37:09 +00:00
Daniel Genrich
fc975a9148 Bugfix for usage of uninitialized variable on windows (props_ptr.data needs to be set to NULL before calling uiItemFullO() ) - please check if this also compiles on gcc 2009-09-03 19:08:16 +00:00
Brecht Van Lommel
579b8ef6e5 2.5: fix missing LIB_NEEDLINK check in windowmanager reading,
would cause crash with linking/appending.
2009-09-03 18:38:52 +00:00
Nicholas Bishop
9250ab0619 2.5/Multires:
* Added back multires delete higher levels (new operator + button)
2009-09-03 17:45:04 +00:00
Joshua Leung
92395bb93c 2.5 - A few bugfixes...
* 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
2009-09-03 12:20:59 +00:00
Michael Fox
78425fb657 2.5
*****
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)
2009-09-03 10:42:53 +00:00
Daniel Genrich
40c89b5c6e Missing header include for non-linux OS "BLI_exist()" 2009-09-03 10:34:54 +00:00