Commit Graph

13274 Commits

Author SHA1 Message Date
Brecht Van Lommel
e917b1043e Fix for bug #18860: particle hair strands missed first segment
when rendering as regular geometry (not strand render).
2009-06-09 18:25:57 +00:00
Campbell Barton
8adb155e98 Built in limitations for script scanning was making python fail on meta-androcto script pack.
If a total of 30 subdirs was hit, or 4 dirs deep was hit - script scanning would quit, skipping files in the root scripts path too.

To work around this the script pack included some of blenders scripts twice just so they would get into the menu but this is a dodgy workaround.

* dont stop scanning for scripts when limits are reached (just dont scan further).
* global 30 dir limit per scan is silly - removed.
* limit recursive depth is kept but keep scanning at lower depths.
* bumped recursive limit from 4 to 6

* flt_properties.py had #!BPY without a menu header.
2009-06-09 18:21:48 +00:00
Chris Want
8704629945 Use fputs instead of fprintf in mem_error_cb(). This silences the
gcc warning "format not a string literal and no format arguments".
2009-06-09 18:08:45 +00:00
Brecht Van Lommel
19c9708a16 Fix for bug #18855: in texture node editor, "Add New" for world
did not set texture in correct place and crashed without an active
object.
2009-06-09 17:56:07 +00:00
Ken Hughes
61889df87b Tools
-----
Bugfix #18835: negatively scaled objects resulted in incorrect boolean
output.  Commit to trunk instead of tagged release this time :-p
2009-06-09 17:04:50 +00:00
Brecht Van Lommel
e29c9bc4da Fix for bug #18900: game engine lights in non-glsl mode did move
anymore, missing matrix update. Also move some code to KX_LightObject
to avoid duplication with player.
2009-06-09 13:51:32 +00:00
Brecht Van Lommel
20eaa1466d Fix for bug #18881 and #18866: Surface option for Fields crashed
on non-mesh objects, so hide it if not applicable. Also made it
support surf, curve, font objects.
2009-06-09 13:03:00 +00:00
Campbell Barton
e4b427bb59 [#18847] Material.c Python API calls
Adds access to...
- Anisotropy
- Mirr Threshold
- Trans Threshold

Breaks rule of no additions but python data access is quite safe, vray exporter needed these attributes.

[#18891] BGE Convert script Python 2.5 compatible
2009-06-09 12:18:20 +00:00
Ken Hughes
105d3fd323 Fix "no newline at end of file" warning. 2009-06-08 17:30:53 +00:00
Campbell Barton
d8ae009653 needed to use sizeof(string)-1 for text button lengths 2009-06-08 11:04:05 +00:00
Erwin Coumans
a03c30ea77 Bugfix to avoid crashing BGE on Mobile Intel GMA 950/945 Express GPU (2009 latest driver 6.14.10.4926 Windows XP)
Command-line option to disable vertexarrays in BGE:
-g novertexarrays
2009-06-07 06:04:44 +00:00
Benoit Bolsee
80571c0408 BGE VideoTexture: fix VideoFFmpeg range attribute + error message. 2009-06-06 21:54:12 +00:00
Daniel Genrich
580e69b365 Patch/Bugfix so wind noise got controlable seed and therefore redoable cloth sims - bug reported by istvan 2009-06-06 21:49:00 +00:00
Campbell Barton
e4b20c3d2a Setting the directories and files is buggy still, but this should prevent some simple crashes, file was 80 chars long but it let the text input type in 160 chars. 2009-06-06 11:26:43 +00:00
Campbell Barton
99c0f8dcc0 Blender.Particle.New() wasnt documented.
Changed to accept Object as well as Object name to avoid name collisions with libraries.
2009-06-06 04:56:22 +00:00
Erwin Coumans
884a6a6573 #18872 bugfix for torque on dynamic objects
#18893, fix to getParam for generic 6dof constraints
2009-06-06 00:12:49 +00:00
Campbell Barton
04ccb0caf8 bpy.config.sequenceMemCacheLimit is the only way to set the memcache in background mode and it didnt work.
removed some unused vars from KX_Scene
2009-06-05 19:22:23 +00:00
Kent Mein
868f31754c A bunch of the same logic issues. (missed these before)
Kent
2009-06-05 17:45:17 +00:00
Diego Borghetti
e9ffd8f63e Fix "duplicate strip" always increase the user count for ipo.
As venomgfx point, the shift+d function never duplicate the ipo block
if we have enable the option in UserDef -> Edit Methods -> Ipo.

Now, if Ipo option is disable, we just increase the user count, otherwise
we duplicate the ipo.

Note: Alighorith, we need call ipo_idnew here ? (like single_ipo_users)
2009-06-05 16:54:06 +00:00
Kent Mein
6c5e1b6b24 coverity issue CID: 97
Checker: FORWARD_NULL (help)
File: base/src/source/blender/src/poseobject.c
Function: pose_special_editmenu
Description: Variable "ob" tracked as NULL was dereferenced.

logic was wrong (gets complicated when you use !'s ;))

Kent
2009-06-05 16:53:21 +00:00
Kent Mein
c5b05fd450 coverity issues:
CID: 478
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/softbody.c
Function: apply_spring_memory
Description: Pointer "sb" dereferenced before NULL check

and
CID: 480
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/softbody.c
Function: springs_from_particles
Description: Pointer "ob" dereferenced before NULL check

again moved assignment after check to make sure pointer is valid.

Kent
2009-06-05 04:15:19 +00:00
Kent Mein
010a9c0b00 coverity issues:
CID: 506
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/editparticle.c
Function: PE_mirror_x
Description: Pointer "(edit)->keys" dereferenced before NULL check

and
CID: 507
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/editparticle.c
Function: PE_mirror_x
Description: Pointer "(psys)->particles" dereferenced before NULL check


No need to copy the memory if the pointer isn't valid.

Kent
2009-06-05 03:52:24 +00:00
Kent Mein
d585a201e1 coverity issue CID: 484
Checker: REVERSE_INULL (help)
File: base/src/source/blender/imbuf/intern/anim.c
Function: IMB_anim_absolute
Description: Pointer "anim" dereferenced before NULL check

again moving init code after check to valid pointer.

Kent
2009-06-05 03:40:58 +00:00
Dalai Felinto
52b7c157a0 getScreenPosition, Ray and Vect fixes:
- fix for [#18867] getScreenRay error
 ... the Vector wasn't been added to KX_Camera origin. Therefore the Ray was always casted to the wrong coordinate when camera wasn't in [0,0,0] (where is obviously was in my tests :)

- making the input parameter compatible with Blender/BGE window coordinate system (Top-Bottom).
 ... that will break scripts done in 2.49. Since this feature was added only in 2.49 that fix is OK. (and the fix is ridiculous.

Note:
the input parameter is normalized. That means it runs from 0.0 to 1.0. Some users found it confusing, but it allows to make a game compatible with multiple desktop resolutions.a
2009-06-05 00:51:36 +00:00
Benoit Bolsee
8154de7045 BGE [#18884] light in skinned object only work properly after running the action once. 2009-06-04 21:24:41 +00:00
Kent Mein
aa0f4fb694 coverity issue CID: 488
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/hddaudio.c
Function: sound_hdaudio_extract_small_block
Description: Pointer "hdaudio" dereferenced before NULL check

Moved some init code that uses a pointer to after the check
to see if pointer is valid.

Kent
2009-06-04 15:58:47 +00:00
Ton Roosendaal
549d1d3742 Bugfix
Loading font used a minimal string array (80 chars) and copied file name
strings in it without size checks. Triple tsk!
2009-06-04 15:44:43 +00:00
Campbell Barton
cf6ed23578 BGE small fixes
- script template use new property syntax
- Python could set the axis/hat to a negative index and crash blender (nobody complained)
- Servo control UI had overlapping text
2009-06-04 07:42:03 +00:00
Campbell Barton
9b088acc67 KX_MouseFocusSensor - bug reported by Micro27 on blenderartist
vertical bounds checking for multiple viewports was inverted.

quiet some compiler warnings and minor corrections
2009-06-03 20:06:40 +00:00
Kent Mein
e650251948 coverity CID: 374
Checker: FORWARD_NULL (help)
File: base/src/source/blender/src/toolbox.c
Function: tb_do_render
Description: Variable "ca" tracked as NULL was dereferenced.

Moved check for null to include else statement.

Kent
2009-06-03 15:24:42 +00:00
Kent Mein
eafd2720f6 Missed this one before. It's another coverity issue:
CID: 477
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: cloth_apply_vgroup
Description: Pointer "dm" dereferenced before NULL check

Just like the others it assigned the value twice, removed
the one that was before checking for NULL.

Kent
2009-06-03 15:14:09 +00:00
Kent Mein
5412653289 This is coverity issue:
CID: 595
Checker: OVERRUN_STATIC (help)
File: base/src/source/blender/python/api2_2x/sceneSequence.c
Function: Sequence_setProxyDir
Description: Overrun of static array "&((((self)->seq)->strip)->proxy)->dir" of size 160 bytes by passing it to a function which indexes it with argument "248" at byte position 247

Wasn't using the size of dir it was using the sizeof the struct dir is in.

Fixed.

Kent
2009-06-03 14:55:41 +00:00
Campbell Barton
903722299d BGE PyAPI fixes
- CValue warning ShowDeprecationWarning("val = ob.attr", "val = ob['attr']"); had false positives because of python using getattr() internally. Only show the wanring now when a CValue is found.
- Py functions that accepted a vector and a GameObject were slowed down by PySequence_Check() first called on the GameObject, though this would fail it would try and get attributes from the game object - ending up in ~8 attribute lookups each time. Avoiding PySequence_Check() makes ob.getDistanceTo(otherOb) over twice as fast.

- Joystick hat events could crash the BGE for joysticks with more then 4 hats.
- PLY Import failed on PLY files from Carve, added some extra types.
2009-06-03 04:12:59 +00:00
Kent Mein
a9c29cd415 This commit fixes the following two coverity issues:
CID: 475
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: bvhselftree_build_from_cloth
Description: Pointer "clmd" dereferenced before NULL check

CID: 476
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: bvhtree_build_from_cloth
Description: Pointer "clmd" dereferenced before NULL check

You'll notice in the code the var is actually set again
a few lines down before being used so better to set it
after you've made sure the pointer is valid.

Kent
2009-06-02 19:29:20 +00:00
Robin Allen
62abe788c4 Fixed limits on translate node 2009-06-01 21:38:03 +00:00
Robin Allen
a3f097c646 Bugfix for faulty noise function in bricks node 2009-06-01 21:22:43 +00:00
Benoit Bolsee
4c7a02f6a1 BGE: memory leak in Random actuator + make actuator truly random when seed=0 in the UI. When running the game, seed 0 is replaced by a random seed accessible through Python in seed attribute of the actuator. Other seed value will be left unchanged and will generate fixed pseudo random series. 2009-06-01 18:41:58 +00:00
Peter Schlaile
2a3627e338 == Sequencer ==
This fixes:
[#18507] Wrong audio mixdown

Also: you can change output sample rate while blender is running
and the audio device get's reopened automatically.

Subframe-precision seeking was also broken for some releases...
(shame on me)
2009-06-01 16:35:05 +00:00
Campbell Barton
617b45256a BGE Blendfile path bug (use for loading and saving the GameLogic.globalDict)
the original blendfile path wasn't reset when loading new blendfiles.
blenderplayer was ok, but running the BGE from blender would set the blendfile original path and never reset it on loading other blend files.
2009-06-01 12:36:22 +00:00
Benoit Bolsee
358ec00256 BGE bug fix: dynamically added sensor objects didn't have their physic shape synchronized with movement. 2009-06-01 09:44:41 +00:00
Peter Schlaile
d1f7a2ceee == Sequencer ==
This removes the need of using "-g noaudio", if only HD Sound strips
are used. (In opposite to the RAM Sound strips, they don't need an 
initialized Game Sound Engine for obvious reasons...)
2009-06-01 09:24:46 +00:00
Peter Schlaile
332279e12e == Sequencer ==
This fixes:
[#18707] Syncing animation to audio (works fine in 2.45. It does not work properly in 2.48)
2009-06-01 09:01:29 +00:00
Campbell Barton
94af724293 YoFrankie bug [#18857] On start gives ImportError: No module named frankie_scripts
GameEngine sys.path creation was broken because of a pesky slash at the end of each path name.
Win32 sys.paths were also failing when running a game that switched between blend files in different directories

On win32 for some reason making absolute paths from lib->name failed, work around this by using lib->filename.

STR_String.h, cast to float to quiet compiler warnings.
2009-06-01 05:43:58 +00:00
Peter Schlaile
e415fa27b0 == Sequencer ==
This fixes dependency of scrub duration on mixbuffer size.
(start audio with a mixbuffer size of 2048, let it play = initialize,
change mixbuffer to smaller value, you will here 1 second
of audio instead of a scrub)

should hopefully fix
[#18850] 2.49 scrubbing creates an echo
2009-05-31 21:14:25 +00:00
Peter Schlaile
ae565b9bb3 == Sequencer ==
This fixes: IPO pinning on sequencer strips was lost during Undo.
2009-05-31 17:59:57 +00:00
Campbell Barton
8e882d0d61 Bug in KX_GameObject.get() and ListValue.get(), wasn't checking if the CValue derived objects could be converted to a PyObject.
so where foo is an int prop,
 gameOb.get("foo") == 0, would end up returning a CValue int proxy.

This is more a problem for KX_GameObject since ListValues with python access mostly don't contain ints, strings, floats.
This also wont break games from 2.48 since the .get() function wasn't available.
2009-05-31 17:44:38 +00:00
Benoit Bolsee
8deca3ecfc BGE: fix refcount bug causing crash with Object texture coordinates. 2009-05-31 14:54:31 +00:00
Ton Roosendaal
011d91624e AO render error, caused by bugfix after RC3 :(
My bug fix to support AO with "Amb" texture channel changed code too that calls
AO as a pre-shade process, when texture isn't calculated yet. This caused very
first pixel in a tile to show wrong AO.

Especially myself deserves a kick in butt for not testing the regression files 
for release binaries again! Error shows clearly... in the cornelius_passes 
.blend file.
2009-05-31 11:22:11 +00:00
Ton Roosendaal
b3ce0c6a49 Last pre-2.49 commit part 1: splash c file and release number 2009-05-29 17:51:16 +00:00
Benoit Bolsee
f5b3a00fbb BGE: small performance problem: object set invisible at startup were still put in the DBVT, causing unnecessary culling. 2009-05-29 17:09:20 +00:00