Commit Graph

15079 Commits

Author SHA1 Message Date
Campbell Barton
6c7c38a4e4 BGE Py API
* Made GameLogic.addActiveActuator(actu, bool) to raise an error if the actuator is not in the list. Before it would allow any value as the actuator and fail silently (makes debugging scripts more difficult).

* Allow the actuator to be a string which is convenient if you dont want to change the settings of the actuator.
* Added activate/deactivate functions to the controller, this is more logical since the GameLogic.addActiveActuator() function is running through the controller anyway.

GameLogic.addActiveActuator(controller.getActuator("SomeAct"), True)
...can be replaced with...
controller.activate("SomeAct")
2009-02-24 05:50:45 +00:00
Campbell Barton
394d893e13 compile scripts when converting controllers to give more predictable performance and print syntax errors early on rather then when the script is first executed. 2009-02-24 03:29:31 +00:00
Martin Poirier
57c7200a65 Merging volume embedding and transform snapping.
- Volume embed is available as a transform snap option (need new icon). Not as "continuous" as stroke embed, will have to be fixed somehow.
- Transform snaps work in armature edit mode (only snap to mesh, not other armatures, for now). Adding to other edit data type should be easy.
- Strokes can use all the transform snap options plus volume embed.

Bug fix: added small threshold to face snap (and volume embed) to prevent slipping in cracks between faces. More tweaking needed but this now takes care of all the worst cases.
2009-02-24 00:45:40 +00:00
Martin Poirier
7c830b75f1 merging trunk 17520:19093 2009-02-23 21:00:42 +00:00
Campbell Barton
334da0fa57 [#18291] Viewing muliple object UV's in the UV/Image editor
patch from Chris and Guillermo S. Romero.
2009-02-23 12:35:16 +00:00
Campbell Barton
373d4fe6d3 [#18323] VRML import will not import colors if pervertexcolors set (comparison reversed)
thanks to Ezra Peisach for fixing.
2009-02-23 12:17:34 +00:00
Campbell Barton
5488175d0b BGE Python API
* fixed segfaults in CListValue.index(val) and CListValue.count(val) when the pyTypes could not be converted into a CValue.
* added scene.objects to replace scene.getObjectList()
* added function names to PyArg_ParseTuple() so errors will include the function names 
* removed cases of PyArg_ParseTuple(args,"O",&pyobj) where METH_O ensures a single argument.
* Made PyObjectFrom use ugly python api rather then Py_BuildValue(), approx %40 speedup for functions that return Python vector and matrix types like ob.orientation.
2009-02-23 06:41:10 +00:00
Nathan Letwory
1c088b454d SCons
* I accidently broke the scons bit by chopping the node libs into pieces. I forgot that trunk hasn't had the nice scons cleanout I did in Blender 2.5 branch. Now everything should compile again.
  It took a while because I tried to quickly do the same cleanup, but src/ is just not cooperating, neither is stock mingw (no @commands.txt tempfilemunge goodies)
2009-02-22 20:44:36 +00:00
Nathan Letwory
3408d9022a SCons
* chop nodes library into smaller parts to have scons/mingw not puke over long command-lines (the texture nodes pushed the limits).
2009-02-22 15:02:23 +00:00
Campbell Barton
570b48aae6 BGE Py API
print filename:line with ShowDeprecationWarning().
Typo in scripttemplate_gamelogic.py
removed 2 unneeded typedefs
2009-02-22 10:22:49 +00:00
Campbell Barton
9d5c2af1d1 * removed typedefs that were not used (from anonymous enums and structs)
* Missed some cases of using a 'char *' as an attribute
* replace BGE's Py_Return macro with Pythons Py_RETURN_NONE
* other minor warnings removed
2009-02-21 12:43:24 +00:00
Andre Susano Pinto
a3b684d698 [#18277] Segfault crash by editing mesh with subsurf+ParticleInstance modifiers
particleInstanceModifier_applyModifier uses getVertCo,which is not implemented by ccgDM.

getVertCo was used to simply perform a min/max, so it was fixed to use the apropriate min/max
		dm->getMinMax(dm, min_r, max_r);


Maybe the fact ccgDM doesn't implements getVertCo/getVertNo is a bug, since it implements every
other DM function and its strange those are left out.
2009-02-21 12:15:57 +00:00
Campbell Barton
f87a399978 [#18058] Black dots appear when blender renders with multi-thread and material nodes
Without thread locking the function that allocates new threads, black dots appear in renders.

This wont affect composite nodes,
Ton/Brecht - this is possibly too many lock/unlocks but I timed the render from the bug report and it didn't make a noticeable difference.
2009-02-21 04:42:46 +00:00
Campbell Barton
7260e8fe29 bugfix [#17941] Attempting to change path of audio to relative fails. 2009-02-21 03:02:39 +00:00
Benoit Bolsee
95f91f2a46 MSVC9 project files: reactivate VideoTexture module in BGE; it that was disabled for some reason. 2009-02-19 23:15:27 +00:00
Benoit Bolsee
d3e7b37fff BGE API Cleanup: distinction between array and list of values in KX_PYATTRIBUTE macros. Fix compilation problem under Windows with strcasecmp: define it as stricmp 2009-02-19 23:13:41 +00:00
Campbell Barton
cdec2b3d15 BGE Python API
Use 'const char *' rather then the C++ 'STR_String' type for the attribute identifier of python attributes.

Each attribute and method access from python was allocating and freeing the string.
A simple test with getting an attribute a loop shows this speeds up attribute lookups a bit over 2x.
2009-02-19 13:42:07 +00:00
Campbell Barton
c597863783 "object" and "objectLastCreated" attribute for actuators, deprecates getObject/setObject() & getLastCreatedObject()
also removed some warnings
2009-02-19 10:34:51 +00:00
Campbell Barton
92d4ef0939 Accept negative indices's for ListValues
scene.getObjectList()[-1] works like a python sequence.

removed some STR_String creation that was only used to do comparisons, in a simple expressions benchmark this made logic use 4% less overall.
2009-02-19 07:01:49 +00:00
Campbell Barton
7d2582de09 more uninitialized variables and auto-complete could copy a string over its self. 2009-02-18 05:49:51 +00:00
Campbell Barton
21925c6f47 uninitialized variable used in mesh_foreachScreenVert__mapFunc 2009-02-18 04:43:12 +00:00
Campbell Barton
7a96881795 disable texture clamping while painting. 2009-02-18 03:56:16 +00:00
Campbell Barton
f6b0b76fea [#18159] Path -> toggle cyclic -> toggle cyclic again == path corrupted
was not recalculating the knots when the cyclic flag was disabled so the endpoint flag was being ignored until recalculating (extrude for eg).

Also removed unneeded re-allocation of curve knots which are always reallocated by makeknots.

Fixed another bug with which recalculating knots with the Python surface api. (mixed up u/v args to makeknots(..) )
2009-02-18 03:13:57 +00:00
Campbell Barton
28245a754e python api bugfix,
forgot to remove the cast from short to long when making x,y aspect floats.
2009-02-17 14:41:36 +00:00
Campbell Barton
def36ce180 fix for [#17972] Saving/Loading Radiance HDR changes colors
removed HDR loop that loaded 8bit color channels (which was incorrect)
and added a call to IMB_rect_from_float at the end.

This also means that char buffers wont be created if they are not needed.
2009-02-17 04:32:49 +00:00
Campbell Barton
e5a5399c33 [#17991] Anim rendered in BMP format won't play back
fix from Sebastian Kochman (raiq)  - [#18022]
2009-02-17 04:11:20 +00:00
Campbell Barton
25ab515951 bugfix [#18003] Rev-17473: Scene sets doesn't work in links 2009-02-17 03:43:56 +00:00
Nathan Letwory
c3d74547be SCons:
* giving compileflags, cc_compileflags and cxx_compileflags to BlenderLib() now actually overrides any other setting (so there's no unclarity when ie. conflicting options are being specified in REL_CFLAGS et al). These are set after either release or debug flags, but before any *_WARN flags (so those stay maintained).
* add cxx_compileflags for GE parts on win32-vc to have better performance.
* NOTE: if platform maintainers (OSX and Linux) could check and do the same for their systems. Not vital, but probably very, very much welcomed by GE users.
2009-02-15 23:26:00 +00:00
Benoit Bolsee
915baae622 BGE bug #18137 fixed: When two actors collide in this blend file the blender crashes. 2009-02-15 19:07:27 +00:00
Campbell Barton
b052ae4cdb [#18209] 3 VSE crash bugs with .blends (all left click and move mouse over Metastrip/Blend Mode related)
Workaround for a bug where dragging the playhead over a metastrip with blending on it could segfault blender.
Tried to figure out why the imbuf rect is not set, but for now a NULL check stops the crash.
2009-02-13 06:24:15 +00:00
Campbell Barton
64d2984aa0 add some more modifier types and access to shrink wrap target object (but no other shrink wrap settings) 2009-02-12 16:27:19 +00:00
Campbell Barton
c12149cf26 According to Amir Ebrahimi, fbx vertex color is supposed to be between 0.0 and 1.0 rather then 0-255
At the moment I dont have a way to test this.
2009-02-12 01:46:38 +00:00
Campbell Barton
fec8107281 Once a linked image was selected, from a texture there was no way to switch to a local image because the dropdown was blocked with a linked library error message.
Remove linked library checking from this image selector, this isn't quite correct since the texture could be linked too, however there is no access to the texture data (or other users) when this button is drawn.
2009-02-11 08:16:42 +00:00
Campbell Barton
227c84f64e dpx/cineon was using the OUTPUT settings when loading DPX - white point, blackpoint, gamma, log.
Allow DPX's with different color channel types to load, even if they are unsupported.

Saving log DPX's is broken, the header will always be written with log off because dpxCreate is called before the image presets are set. However there is no access to image presets before running dpxCreate() so log data is written but the header always sets it off.
Made a fix for this but couldn't test because it seems loading log images is also broken.

Enable verbose DPX output when '-d' debug flag is used.
2009-02-10 02:43:35 +00:00
Campbell Barton
41a7b23c41 - Py seq API - Added an option for seq_strip.update() to run update_changed_seq_and_deps and new_tstripdata
- Render stamp sequencer option wasn't ignoring muted strips.
2009-02-09 04:18:30 +00:00
Peter Schlaile
ecf5250cf3 == Sequencer ==
Fix for the transform fix. It's getting late...
2009-02-08 19:54:11 +00:00
Peter Schlaile
7877fb2f83 == Sequencer ==
Fixed proxy scale problems in transform effect
2009-02-08 19:28:12 +00:00
Peter Schlaile
270b724b8d == REDCODE ==
Fixed 64bit issues. sizeof(unsigned long) = 8 on 64 bit machines, 
shame on me...
2009-02-08 19:13:29 +00:00
Peter Schlaile
0039da6ed8 == REDCODE ==
* Fixed ntohl dependency (and hopefully 64bit issues)
* Video length detection fixed (tests for picture presence)
2009-02-08 09:07:36 +00:00
Benoit Bolsee
4f3768af49 Update MSVC9 project files 2009-02-07 20:47:23 +00:00
Benoit Bolsee
59e96a2831 BGE Py API cleanup: Camera Actuator. 2009-02-07 20:35:16 +00:00
Brecht Van Lommel
e40803a5b3 Fix for bug #18228: OpenGL specular did not get the correct view
vector in perspective mode. This is default OpenGL behavior, but
by now this optimization is really insignificant. Works in both
the 3d view and game engine.
2009-02-06 19:21:24 +00:00
Robin Allen
09099111e3 Added Scale, fixed bugs incl. patch #18037 2009-02-06 18:09:35 +00:00
Campbell Barton
86c25491e1 [#18257] Workaround for bug in freealut 1.1.0
by Jörg Müller (nexyon) 

Since this area is not maintained, I can only say it works on my system (linux/32bit)
And nexyon assured me he checked over this patch well.
Blender using the deprecated function is not great, but nexyon's bugfix would not be available until the next version of freealut so better to work around it by using the new function.

Please test game sounds play back on win32 and Mac, in cases that it worked in the first place.
2009-02-06 16:38:53 +00:00
Campbell Barton
8f70b93124 2.4x Sequencer Python API
- add metastrips now possible
- access to speed options
- access to wipe options
- added seq.startDisp seq.endDisp seq.update()
2009-02-06 14:03:29 +00:00
Robin Allen
6a669d00b2 Patch #18015, adds "Value to Normal" node 2009-02-06 01:21:38 +00:00
Robin Allen
fbdd75a475 Added compose/decompose, fixed bugs. 2009-02-06 00:55:38 +00:00
Martin Poirier
e25318ebef Rename correlation subdividing method into adaptative subdividing method, since that's what it's trying to do and much more understandable from a user's pov. 2009-02-04 21:38:03 +00:00
Ton Roosendaal
8837d69ed3 Bugfix #18251
Patch from Konrad Kleine

After read-home file (or restore factory settings) the opengl
lights have to be reset.
2009-02-04 17:56:31 +00:00
Campbell Barton
fe1c4ecd89 Relative option for the blur node only applied when the UI updated.
This meant that changing the image size later on would still use the old size.

Set the relative blur size when executing the node too.
2009-02-04 06:41:48 +00:00