Commit Graph

12373 Commits

Author SHA1 Message Date
Martin Poirier
4baa2d7800 merge 17206:17211 2008-10-28 20:26:38 +00:00
Campbell Barton
07a1971ced error in DISABLE_PYTHON defines 2008-10-28 20:19:25 +00:00
Campbell Barton
ac4ff83ca6 added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON) 2008-10-28 18:47:13 +00:00
Martin Poirier
025e4b046a merge 17122:17206 2008-10-28 18:47:01 +00:00
Martin Poirier
d1e90606c7 Add compile time define to disable skeleton generation and retargetting UI (disabled by default).
This is done to make merging make in trunk painless.
2008-10-28 18:33:53 +00:00
Kent Mein
705a248c75 Updated cmake so it has the option to use WITH_DDS
Kent
2008-10-28 18:33:34 +00:00
Campbell Barton
c71430d072 bpy access to image premul was missing. 2008-10-28 02:03:13 +00:00
Ken Hughes
5cd569ed0e Python API
----------
Bugfix #17911: Mesh.getFromObject() incorrectly decremented the mesh's
material user refcount when the material was linked to the object.
2008-10-28 00:01:20 +00:00
Campbell Barton
2e96728843 face transp option CLIP wasnt added to the py api.
added gameObject.replaceMesh(meshname)  - needed this for an automatically generated scene where 100's of objects would have needed logic bricks automatically added. Quicker to run replace mesh on all of them from 1 script.
2008-10-27 15:47:58 +00:00
Brecht Van Lommel
71260b6603 Fix for crash reading a peach file, chubbychestnut.blend. A do_versions
conversion was reading the mtex array in a library linked material. It
is however not guaranteed that direct_link_* was called  on the material
yet, so the array pointer is not always valid and it can crash.
2008-10-27 15:22:55 +00:00
Joshua Leung
780a5438a2 Bugfixes:
* #17900 - IK Constraint was not included regardless of what Visual-Keying method was used
* Deleting a Bone Group now corrects indices of those groups that occurred after the one that was deleted
* No more click-a-mania - Delete all vertex groups from a Mesh (Ctrl-Shift-G menu)
2008-10-26 09:41:59 +00:00
Campbell Barton
0dc22dc65e fix for [#17895] Python-generated Curves can't be beveled
radius and weight's values were not initialized for nurbs curves

for 2.48a just use set radius from curve specials menu to work around this.
2008-10-26 08:06:48 +00:00
Ton Roosendaal
f005bb1a2a Missing NULL check causes crash on Ikey when no active object.
Error is bad enough to go for a retag... hrmf!

Report from Ernesto (der|kunstler) Mndez in irc. Thanks a lot!
2008-10-22 16:13:30 +00:00
Ton Roosendaal
fbecf0cadc New splash c file (now gimp png) and bumped version to 2.48.1 to make it
even a bit more clear.

After this commit we'll tag svn (gasp!) and then go build!
2008-10-22 11:50:12 +00:00
Nathan Letwory
2ecf987dc6 * Minor cleanup of SCons files
- cleanup of boolean usage - use True and False now instead of 'true'/'false' or 0/1
- changed SConscripts accordingly
2008-10-22 11:28:10 +00:00
Campbell Barton
688cc11302 added an option for python Draw.UIBlock(func, mouse_exit) so moving the mouse outside the popup wont close it.
Stops FBX Export and OBJ I/O from flickering a lot.
2008-10-22 08:21:43 +00:00
Campbell Barton
69c6bd604c make sure BPY_Err_Handle clears python errors, even if the exception cant be printed. Added PyErr_Clear() incase there are other references to exception data (sys.exc_info() from python) 2008-10-22 07:09:15 +00:00
Nathan Letwory
5987488fd0 * comment fix 2008-10-22 07:02:30 +00:00
Joilnen Leite
09e4bb058c 2008-10-22 05:35:23 +00:00
Joilnen Leite
0026247ee2 2008-10-22 05:33:45 +00:00
Campbell Barton
18f2d484d9 missing undo for vgroup operations, countall was running twice from select/deselect and DAG_object_flush_update isnt needed for changed selections. 2008-10-22 04:42:00 +00:00
Campbell Barton
59a30d822f fix for [#17878] Scripts operating on blender objects don't clear memory after a crash
This is an interesting bug since it is likely the cause of many other suspicious python crashes in blender.

sys.last_traceback would store references to PyObjects at the point of the crash.
it would only free these when sys.last_traceback was set again or on exit.

This caused many crashes in the BGE while testing since python would end up freeing invalid game objects -
When running scripts with errors, Blender would crash every 2-5 runs - in my test just now it crashed after 4 trys.

It could also segfault blender, when (for eg) you run a script that has objects referenced. then load a new file and run another script that raises an error.
In this case all the invalid Blender-Object's user counts would be decremented, even though none of the pointers were still valid.
2008-10-22 03:10:00 +00:00
Nathan Letwory
71206c9337 Patch from Timothy Baldridge
* add irix6 to GHOST windowing system (same as linux2 et al)
* fix faulty return lines in shrinkwrap.c
2008-10-21 23:07:09 +00:00
Brecht Van Lommel
7a4e9d97ff Fix for bug #17881: with SSS disabled, SSS materials didn't
render textures, related to other recent bugfix for baking.
2008-10-21 14:46:00 +00:00
Nathan Letwory
b32bd5e8af * improvement for CSizeof
- instead of fiddling around with strings, just compare pointers. (It's a good thing we have ideasman_42)
2008-10-21 10:38:24 +00:00
Joshua Leung
f99c02a06b Duplicating bones in EditMode didn't set the custom-shape and bone-groups too. 2008-10-21 08:53:39 +00:00
Joshua Leung
a7d7acf601 Bugfix:
"Warning: binarysearch_bezt_index encountered invalid array" errors were being displayed in the console. Was caused by 3d-view show-keyframe for infostring stuff, when an IPO being checked had no keyframes.
2008-10-21 08:30:02 +00:00
Nathan Letwory
27b90f2c66 * Add some missing docu for Blender.Types
* Fix potential crash in CSizeof()
2008-10-21 08:27:38 +00:00
Joshua Leung
8977ccafbb Bugfixes:
- Adding constraint using button in panel still didn't update Armature Editing buttons properly.
- Minor code tidying of earlier bugfix for armatures
- 'For Transform' option for Limit constraints is now only taken into account for constraints that are enabled.
2008-10-21 08:00:19 +00:00
Joshua Leung
3ac142e654 #17873: "switch direction" for bones can cause infinite loop
Second attempt at fixing this bug. Previous fix caused segfault when all bones in a chain are selected. Now it should segments which are selected (i.e. get swapped) will get unparented from segments that aren't (i.e. aren't swapped, so are still in old orientation)
2008-10-21 01:40:47 +00:00
Martin Poirier
11afafb01e [#17873] "switch direction" for bones can cause infinite loop
Stop the infinite loop, but it could be loosing parent relations that it kept before. Aligorith needs to review.
2008-10-21 01:11:18 +00:00
Campbell Barton
bc55102eac renamed WITH_BF_BPYDOC to WITH_BF_DOCS, added SConscript for building BGE docs too. 2008-10-20 23:21:01 +00:00
Nathan Letwory
47345cfd78 === Blender Python API ===
After some discussion with Campbell, changed the way cstruct sizeof is fetched.

Moved DataSize() to Blender.Types.CSizeof(Blendertype). Supported types return sizeof(data struct), otherwise -1.

To quickly check what types are supported:

import Blender.Types as bt
x = dir(bt)
for t in x:
	if t[0] != '_':
		s = 'bt.CSizeof(bt.' + t + ')'
		print t,"=", eval(s)
2008-10-20 12:33:31 +00:00
Joshua Leung
25859cf1f7 Another constraint panel (in Armature Editing Panels) bugfix. This time, when adding a new constraint using vertical layout. 2008-10-20 09:35:07 +00:00
Joshua Leung
81c21128bb A few warnings missed in previous sweep 2008-10-20 09:24:25 +00:00
Joshua Leung
63f6932fa5 Reduced number of MSVC compiler warnings (mostly just casting issues). 2008-10-20 06:39:08 +00:00
Joshua Leung
67e3ac0edf - Bugfix: 'Hide' button for PoseMode bones (in Editing Buttons) was setting the 'Mult' flag instead
- Tidied up comments in Action Editor code a bit
2008-10-20 04:53:49 +00:00
Martin Poirier
a806c1eb7f merge 16951:17122 2008-10-20 00:48:10 +00:00
Joshua Leung
90721f3f83 Fixed overlapping panels in Armature Buttons that resulted after adding a constraint/IK using the hotkeys. 2008-10-19 23:52:28 +00:00
Nathan Letwory
036c4f6434 === Blender Python API ===
* add DataSize() to module level
  with this one can get datablock struct size.
2008-10-19 23:20:17 +00:00
Nathan Letwory
ae9953bb87 forgot to add removeRenderLayer() documentation 2008-10-19 22:09:45 +00:00
Nathan Letwory
f1f27c0350 === SCons ===
[#17867] Adds option to SCONS to generate Python API documentation

Added patch from Brandano with some small improvements (BF_DOCDIR, clean) by yours truly.

To use make sure you have epydoc installed. Enable with WITH_BF_BPYDOC=1.
2008-10-19 22:01:46 +00:00
Nathan Letwory
3544a4bd36 === Blender Python API ===
* fix two typos in RenderLayer API (renderosiy -> renderosity in two places. Will break .py's saved with render_save_layers.py, just fix passRadiosiy and passRadiosiyXOR)
* add some docs on RenderLayer API
* fix some copy/paste leftover in render_save_layers.py
2008-10-19 21:39:50 +00:00
Nathan Letwory
4d4fd5687f * small code change from Split to env.Glob() 2008-10-19 13:51:52 +00:00
Nathan Letwory
f76a742dc0 === BPy API ===
* Add read access for octree resolution
2008-10-19 13:48:37 +00:00
Campbell Barton
c6d1ac3af8 only set the SDL audio driver to alsa when not running in background mode and when blender is compiled with SDL. 2008-10-19 06:12:11 +00:00
Campbell Barton
42e287af1c source/blender/blenloader/intern/readfile.c - use memmove rather then strncpy for overlapping strings.
source/blender/blenlib/intern/fileops.c - zero length strings would check for a slash before the strings first char.
source/gameengine/GameLogic/SCA_JoystickSensor.cpp - m_istrig_prev was not initialized
source/blender/src/editmesh.c - active face pointer was not set to NULL in free_editMesh()
2008-10-19 04:02:37 +00:00
Joshua Leung
72e5ede546 Few tiny cleanups in Action Editor code (comments only) 2008-10-19 03:41:49 +00:00
Campbell Barton
e96a5bd05b patch [#17856] Correction on docs for Ipo module. from Lucas Vella (lvella) + some other minor changes. 2008-10-18 13:33:27 +00:00
Campbell Barton
03d5780b76 Added joystick epydocs, only changed incorrect docstrings in SCA_JoystickSensor.cpp
patch [#17857] HotKeys Update by dfelinto - SmoothStroke and Anchored.
	Made own edits, removed videoscape and added curve and armature specials.
2008-10-18 13:23:30 +00:00
Brecht Van Lommel
2158fbf9e3 Fix for bug #17829: with ATI drivers, GLSL shadows crashed on physics
'show pivot' drawing in the viewport. Also added checks for some other
cases where this could happen.
2008-10-17 13:36:40 +00:00
Brecht Van Lommel
6ff2110edc Fix for imagepaint soften tool giving a bit too dark results,
due to poor float-to-char conversion.
2008-10-17 13:34:20 +00:00
Benoit Bolsee
bf0440add8 BGE bug fix (continuation of previous bug fix):
- Forgot to make SCA_ISensor::UnregisterToManager() virtual to intercept active-inactive transition on collision sensor to clear colliders reference.
- Don't record collision on inactive sensor. 
  This situation occurs when an object with an inactive collision sensor collides with an object with an active collision sensor: the collision handler triggers both sensors.
  The result of this bug was pending references that eventually cause temporary memory leak (until the sensor is reactivated).
2008-10-17 09:24:35 +00:00
Benoit Bolsee
c119fb6e51 BGE showstopper bug fix:
- Reset hit object pointer at end of frame of touch sensor to avoid returning invalid pointer to getHitObject().
- Clear all references in KX_TouchSensor::m_colliders when the sensor is disabled to avoid loose references. 
- Test GetSGNode() systematically for all KX_GameObject functions that can be called from python in case a python controller keeps a reference in GameLogic (bad practice anyway).
2008-10-16 23:33:40 +00:00
Martin Poirier
d8d2358ab2 [#17845] View Snapping causes background grid confusion
view needs to be reset while moving to take care of view snapping properly.
2008-10-16 21:43:25 +00:00
Campbell Barton
8fcaa1782d cleanup epydoc errors 2008-10-14 22:31:10 +00:00
Campbell Barton
55dafc125b resaved in the gimp, now loads with libpng 1.2.30 2008-10-14 14:10:49 +00:00
Ton Roosendaal
6773d41daa Bugfix #17832
Particle system crashed in convertblender, missing NULL check.
This fixes crash, render survives, but I doubt it was meant so...

Will leave it Janne to evaluate later.
2008-10-14 12:16:12 +00:00
Daniel Genrich
e1aff849e4 Collisions: CollisionModifier needs to be resetted for every loop 2008-10-14 11:54:07 +00:00
Daniel Genrich
af7b777d22 Bugfix for regression from 2.46 on cloth collisions reported by Daniel Salazar via IRC 2008-10-14 11:50:30 +00:00
Ton Roosendaal
b0b37252da Bugfix on IRC report. Luckily Daniel Salazar *does* carefully check our
regression files, it showed small dark outline errors on envmap.

This commit rewinds bugfix #8437, which actually had to be fixed on
another location in code, which was done a few weeks ago. :)
2008-10-14 11:42:53 +00:00
Ton Roosendaal
028a10769b Bugreport in IRC: Area lamp, "Constant jitterred" had wrong alignment
code, causing the "SamplesY" button to overlap others.
2008-10-14 10:55:18 +00:00
Ton Roosendaal
882997ddff Bugfix #17830
Index OB pass didn't support FSA for Ztransp.
Also made buttons to set black/white for non-RGBA images hide in Image Window,
the Curves color code only supports 4 channels atm.
2008-10-14 10:44:22 +00:00
Joshua Leung
0196890ebf Action Editor - Grease Pencil Bugfix:
When Action Editor was maximised, Grease Pencil data disappeared. This was due to the screen-swapping that went on. Now, it uses the old-screen that was stored in the maximised Action Editor's screen (should be safe...)
2008-10-14 10:11:01 +00:00
Joshua Leung
8fa76a3c43 Grease Pencil Bugfixes:
* Onion-skinning with GStep > 0 was not showing enough of a noticable difference between ghosts. Improved method of calculating this.

* Clicking in a Grease-Pencil datablock channel in the Action Editor would crash
2008-10-14 09:36:08 +00:00
Ton Roosendaal
f02f984142 Part two of the 2.48 release preparation!
(After this svn tag)
2008-10-13 10:03:17 +00:00
Campbell Barton
602c784de3 missing calls to countall() on switching scenes in the outliner. 2008-10-13 03:55:59 +00:00
Brecht Van Lommel
84cf941c29 Added a -noglsl option to disable GLSL from the command line. 2008-10-12 18:32:26 +00:00
Campbell Barton
1a92054d57 hard limit in for bpy material was wrong 2008-10-12 15:35:17 +00:00
Campbell Barton
2202cd8781 correction to epydoc 2008-10-12 14:27:30 +00:00
Brecht Van Lommel
96e9debe1f - Fix for bug #17825: baking SSS is not supported, but it didn't give
proper results, should bake as if SSS was disabled.
- Fix for GLSL to handle failing shadow buffer creation better.
- Fix for sky/atmosphere version patch, was not doing files from 2.46
  and newer.
2008-10-12 13:32:28 +00:00
Ton Roosendaal
23a02bbead Bugfix, studio report by Pablo Venomgfx
- insert key crashed when object ipo was in action, but action got unlinked
  from object
2008-10-12 13:16:23 +00:00
Peter Schlaile
3110f63162 == Sequencer ==
This fixes (works around):
[#13598] LOAD / SAVE: Segfault after attempting to load surround encoded file
2008-10-12 12:00:26 +00:00
Campbell Barton
f8d6057808 in rare cases the screen cant be found for BPy's file/image selector 2008-10-12 11:31:11 +00:00
Ton Roosendaal
a146614a5c Small fix, ancient issue:
drawing object names in 3d window, zbuffered mode, didn't show up.
2008-10-12 11:13:35 +00:00
Matt Ebb
4022186473 * Patch #17729 from Dalai Felinto
Additional sculpt mode hotkeys to toggle Smooth stroke (Shift S) and Anchored brush (Shift A) . Menus are updated with hotkeys too. This is a real last minute one, but it was given the ok previously, and I've just had time to commit this for him.
2008-10-12 06:39:47 +00:00
Joshua Leung
012a98988f Bugfix:
Grease Pencil panel in Sequencer and Nodes were not able to be minimised.
2008-10-12 00:59:58 +00:00
Brecht Van Lommel
d241d0a379 Fix for opengl errors being thrown when creating textures, it was
setting the magnification to GL_LINEAR_MIPMAP_NEAREST but that is
only valid for minifaction, should be GL_LINEAR instead. OpenGL
driver should refuse setting this so should be harmless, but better
to fix it anyway.
2008-10-12 00:41:28 +00:00
Joshua Leung
78cc88e041 Grease Pencil Bugfixs:
- Eraser now works in Sequence Editor. Cleaned up the code that handles Sequencer coordinate-conversions so that it should be a bit faster (doesn't need to recalculate offsets+scaling for every point that is made).

- Fixed mistake made in previous commit that made the pressure value (for tablets) an integer instead or a float. This should solve some of the reports of bits of strokes being missed on tablets.
2008-10-12 00:13:25 +00:00
Brecht Van Lommel
513b544bbc Fix for two more game engine issues:
* Debug text drawing didn't disable textures correct leaving
  texture state invalid, quite old issue.
* Multitexture materials didn't get enabled correct, recent bug.

Both pointed out by José Ignacio Romero, thanks!
2008-10-11 23:48:37 +00:00
Brecht Van Lommel
d3c661e682 Fix crash in game engine IPO code, got out of sync after IPO cleanup, removed the duplicated function declarations. 2008-10-11 22:29:50 +00:00
Brecht Van Lommel
c646a80b53 Actual fix for bug #17819, that doesn't disable the functionality, crash with tiled image textures in the game engine. 2008-10-11 22:16:39 +00:00
Erwin Coumans
ffa67424a9 prevent crash in gpu_draw.c, so tilemode might not have GLSL/GPU features
/* for tiles, copy only part of image into buffer */
	if (GTS.tilemode) {
		return 0; //disabled for now, it causes crashes
	
See tracker issue here:
http://projects.blender.org/tracker/index.php?func=detail&aid=17819&group_id=9&atid=125
2008-10-11 20:54:18 +00:00
Erwin Coumans
3cac11a3a2 Last (hopefully) soft body fixes:
Enable soft body collision clusters by default.
Add option to 'disable collision' button between soft body and rigid body connected by constraint (option was already available between two rigid bodies)
2008-10-11 20:19:04 +00:00
Brecht Van Lommel
b79063bd57 Fix for bug #17794: GLSL didn't take into account normal maps
for Nor texture inputs.
2008-10-11 19:34:48 +00:00
Brecht Van Lommel
c40dfaa531 Fix for recent commit, should only do glFinish() on Windows. 2008-10-11 18:58:07 +00:00
Brecht Van Lommel
5bd1bb4899 Fix for bug #17809: crash with glsl materials and nodes refresh,
didn't attach to the right materials to the lamp.
2008-10-11 18:52:36 +00:00
Brecht Van Lommel
ec7407f942 Fix for bug #17793: the glFinish() call in ghost that was disabled in a previous commit, because it was causing performance issues for the game engine, apparently still is needed to solved issues with FSAA. Now instead it will still call this for blender but not anymore for blenderplayer. 2008-10-11 16:03:17 +00:00
Joshua Leung
5df66e0865 Bugfix #17810: Blender crashes when constraint-keys are moved in NLA
Copy and paste error. Was using ob-ipo instead of conchan->ipo
2008-10-11 12:23:56 +00:00
Joshua Leung
f691752a34 Quick PyAPI patch:
Now it is possible to clean IPO-curves using the call:
icu.clean()
There's an optional value to specify the threshold to use for cleaning. 

This just wraps the internal clean_ipo_curve() function.
2008-10-11 12:17:16 +00:00
Joshua Leung
d35178ee61 Grease Pencil Bugfixes:
* Fix for #17808: Can't compile using SunCC - gpencil.c uses DOS line endings. 
Added some svn-properties on gpencil files and also keyframing ones that I added, so that this shouldn't be a problem anymore.

* In Node Editor, it is now possible to close an open Grease Pencil panel when there is no node-tree being shown (i.e. after switching between node editing modes)
2008-10-11 11:07:25 +00:00
Campbell Barton
ac5c48d186 removed warning in fluidsim.c
fixed tooltip for delay sensor - delay is in tics not frames
2008-10-11 04:30:09 +00:00
Brecht Van Lommel
9b948cad08 Fix for a relative paths issue in the game engine. G.sce was being
kept as the original file, but that can't work correct for solving
relative paths once a .blend in another directory is loaded. The
reason it went OK with the apricot tech demo is that the images there
were lib linked into the level file, which still worked.

Now it sets G.sce to the current loaded .blend file. Note that the
python config file path still uses the first loaded .blend file so it
looks in the same location each time.

Also added some NULL pointer checks in the joystick code because it
was crashing there on Mac, there's similar checks in related functions
so I'm assuming this was just a missed case.
2008-10-11 00:56:49 +00:00
Joshua Leung
c3aef29ab7 Bugfix #17802: Grease Pencil still draws when not shown in Image Editor
Added missing check for this case.
2008-10-10 22:49:17 +00:00
Kent Mein
2f9e0ec154 This commit fixes bug: [#17770] Texture Plugins do not work. (on windows)
Thanks to Lguillaume for helping with this one.


Had to go back to bug: [#17631] PIL_dynlib_get_error_as_string() returns NULL, causes crash

and revert the fix and make some new updates.
function needs to return NULL so fix the functions that were assuming it
always returns a string.

Kent
2008-10-10 17:52:25 +00:00
Ton Roosendaal
d99fd92ffa Missing include, apparently only scons+mingw suffers this, strange. 2008-10-10 14:22:54 +00:00
Benoit Bolsee
3fd204312f BGE bug #17789 fixed: Lock Active Camera and Layer to Scene doesn't work in BGE. This bug fix applies only to games started from the 3D view. Now the BGE will use the layer and camera selected in the 3d viewport under the mouse when the user presses P. Note that there is still a problem with the restart game actuator but that's another bug. 2008-10-10 07:20:42 +00:00
Erwin Coumans
7995395fd2 fix: leave default behaviour the same to be backward compatible with previous rigid body constraints: No Collision between linked objects if button is pressed. 2008-10-10 05:32:04 +00:00
Erwin Coumans
3c27b8034b use BLI_strcasecmp instead of strcasecmp so it actually links under Windows 2008-10-10 05:17:47 +00:00
Erwin Coumans
0749bf7be7 Fix bug in rigid body constraint buttons drawing, and while we are at it, add 'Collision' button to disable collisions between bodies, linked between constraint. 2008-10-10 05:12:57 +00:00