Compare commits

...

4790 Commits

Author SHA1 Message Date
ea97a37383 svn merge -r 22628:22753 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-08-25 01:37:08 +00:00
4a78b9e904 2.5 - Assorted Bugfixes for Animation Editing
* Inserting keyframes now takes into account whether the F-Curve was editable or not.

* Editing keyframes in animation editors now sends proper depsgraph updates instead of just tagging the relevant objects. 

Thanks JiriH for reporting these bugs.
2009-08-25 00:12:11 +00:00
8ed64f7854 Tiny tweaks to Display panel in image editor 2009-08-24 23:27:07 +00:00
7793848db2 Reverted some keymap changes.
Moving to standards for opening/saving etc was causing uproar in IRC.
2009-08-24 21:45:09 +00:00
6faf7eb2ba Smoke:
*enable non-2^n textrues for all gfx cards which support it.
* try to enhance the visual quality under linux a bit when gfx card doesn't support it (still errors visible)
2009-08-24 21:39:48 +00:00
75f1166b6c Smoke:
*fixing the fix as usual
2009-08-24 21:16:23 +00:00
8b51b993db Smoke:
* Bugfix for scaling on non-2^n-textures
2009-08-24 21:06:55 +00:00
8eeb71e6d9 Correct transform descriptions.
Some operations were described as vertex only when they aren't.
2009-08-24 14:26:58 +00:00
Nathan Letwory
01e2aa0249 * r22739 broke compilation with scons. Make sure WITH_OPENEXR definition is given 2009-08-24 12:34:19 +00:00
0b459178e1 [#19232] (2.5) Correction of cmake for windows about audio (jack and openal)
Didnt apply the patch updated with sndfile.
2009-08-24 10:21:53 +00:00
b39f73431a [#19232] (2.5) Correction of cmake for windows about audio (jack and openal)
from Guillaume Lecocq (lguillaume) 

[#19247] (2.5) useless WITH_OPENEXR redefinition
from Mauro Toffanin (equilibrium)
2009-08-24 10:07:49 +00:00
1ef190088b patch from Ron Walker (o6a).
Descriptions for TFM, TEXT, CONSOLE and ED operators.
- Made some minor edits.
2009-08-24 09:17:09 +00:00
90895fce8c * Fix for camera+internal surface object inside ztransp volume 2009-08-24 08:13:09 +00:00
b33b6babbd 2.5 - Sliders in Animation Editors
The 'Show Sliders' option for DopeSheet and Graph Editors now works again. When this option is enabled (it is disabled by default), a slider (or combobox) is shown beside the mute/lock toggles for F-Curves. Editing the slider will result in a new keyframe being added on the current frame. 

So, for all the (ex)-Maya animators out there, you can now animate in a channelbox-like way. :)

Also in this commit:
* Fixed some warnings in modifier.c from previous commits there
* Fixed some refresh problems with DopeSheet channel list (which were only obvious after adding back the sliders)
* Removed the old/unrestored and nasty slider code used in the past by the Action Editor only.
2009-08-24 04:31:13 +00:00
Nathan Letwory
365783cad4 * merge r22734 from trunk
NOTE: Remember to svn up your lib/windows. Also, CMake files might need updating still
2009-08-24 02:51:59 +00:00
Nathan Letwory
5e9e6df2a2 * changes to work with updated FFMPEG libs. Mainly build system. CMake files may need changing too.
NOTE: remember to svn up in lib/windows!
2009-08-24 02:49:57 +00:00
ac44d73acd Made menu text more consistent, using '...' when a menu item spawns a popup or confirmation, and removing redundant starting words in submenus.
Also added notifiers for user prefs, and tweaked wave modifier layout.
2009-08-24 00:01:09 +00:00
3eed35ada1 Adjusted spacing of header items.
Made toggle buttons less wide, with less extra space around them
Made number widgets wider to allow larger numbers, such as the current frame field in the timeline.
2009-08-23 22:22:58 +00:00
6ddcb47746 * Fix for volume materials + AAO 2009-08-23 22:19:45 +00:00
53f66e5c88 2.5 3DView:
Patch by Lorenzo Pierfederici (lento). Many thanks! 

* Ported some more menus to python (Pose, Particle...)
* Some cleanup and reorganization in the python file to reduce code. :)
* Cleanup of old C buttons code.
2009-08-23 22:13:56 +00:00
c1edc2f313 * Fix for rendering wire materials 2009-08-23 22:11:19 +00:00
7da7103d1a UI
Changed the rounding of action buttons. The round style looked pleasing when they were isolated, viewed by themselves, but looked terrible when grouped, or at small sizes with icons as it was often used. The old Filebrowse or Render This Window buttons were examples of how badly they looked with an icon, and the rounding in the tools area made for some weird visual shapes. When combined in groups of widgets, such as the datablock selectors it looked even weirder, because one side of the group would be square and the other would be round, causing some spatial clashes. 

http://www.reynish.com/files/blender25/actionbuttons_new.png

Also tweaked the tools sub-area color which stood out as being much brighter than the rest of the UI. When the tools area was open in the default layout, the overall impression was asymmetrical, non-harmonic.
2009-08-23 21:56:32 +00:00
bb4f5801d1 revert previous change, povray rendering works again, somehow I managed to render with previous changes
(probably failed to reload the module and was using the register un-modified version)
2009-08-23 18:20:31 +00:00
77ec3a1239 deprecated world settings were being used making new world's have zero gravity in the game engine.
Double checked these aren't used anymore by renaming the vars in DNA_world_types.h
2009-08-23 17:33:34 +00:00
2c5cbd4c7c 2.5/Sculpt:
* Deleted unused file
2009-08-23 17:03:06 +00:00
971435f2a1 * Compile fix after merge - disabled high-res smoke rendering in voxeldata texture. Will re-enable when the modifier situation has been worked out. 2009-08-23 13:15:10 +00:00
19b81733cc 2.5 - Custom Shape and Bone Groups can be viewed/set on Bones again. 2009-08-23 12:53:55 +00:00
834f509c5a missed this in last commit. 2009-08-23 12:50:08 +00:00
01d4748e5f svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22704:22717 2009-08-23 07:46:34 +00:00
2ed155b98a spacebar for the search menu was overriding space in the text editor 2009-08-23 07:33:29 +00:00
4a4a3b4989 Option for MouseFocus sensor. only used when 'Mouse over any' type is set.
Previously the only way to detect if the mouse moved over a different object was to enable true-level-triggering and have a python script detect the change.

When the Pulse option is set, focusing on a different object pulses true.
Python attribute is focusSensor.usePulseFocus.

This is similar to the collision sensors pulse option where changes in the set of collision objects generates an event too.

Found this functionality missing when trying to make a logic demo that used mouse-over with overlapping objects.
2009-08-23 06:17:59 +00:00
f5711909a6 svn merge -r 22628:22714 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-08-23 03:33:33 +00:00
f82ce68a9e * enable ztransp transparency type for new materials by default. 2009-08-23 02:59:18 +00:00
46aac7b4fc * Volume rendering - z transparency
This solves one of the last remaining hurdles for 
volume rendering. Previously it always used ray 
tracing to shade other objects inside or behind the 
volume. This meant that said objects would look 
aliased, unless you used Full OSA on the volume 
(which is slow!). As well as this, it meant that you didn't 
get a good alpha channel out of the volume to use for 
compositing, similar to ray refracting materials.

This commit enables z transparency for volume 
materials. Although it can be potentially less 
physically correct, in most situations there's no 
difference, and you get the benefit of nice sampling for 
other objects and an alpha channel for compositing too.
2009-08-23 02:54:30 +00:00
7a0e545c64 use class __props__ for povray settings. 2009-08-22 17:50:10 +00:00
45bb3293b4 2.5: Python subclasses can now define RNA properties by making
a __props__ list in the class, same as for operators.
2009-08-22 17:30:47 +00:00
9cd19fd210 [#19226] (2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc
thanks to Mauro Toffanin (equilibrium)

This is the only place where strstream were used.
2009-08-22 17:19:31 +00:00
4ca76ac543 [#19229] 1 line fix resolves - segmentation Fault
from Martin Frances (martinfrances) 

Added a scene check when appending objects so you can append data without a scene.
2009-08-22 17:11:36 +00:00
215f80361c bpy's __rna__ attribute doesnt work as it should, since the parent classes __rna__ overrides the subtypes.
For now have pyrna_struct_as_srna look in the dict first for __rna__ before using PyDict_GetItemString.
Somehow __rna__ is not calling the pyrna_struct_getattro function, python find it first.

The only relyable way to get the rna from python currently is.
bpy.types.SomeType.__dict__['__rna__']
2009-08-22 17:06:10 +00:00
98e9ddbf5b Bugfixing. 2009-08-22 16:54:18 +00:00
fa8e44556d svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22701:22704 2009-08-22 14:23:54 +00:00
f08a4c9719 missed this in last commit. keyboard event manager was stored twice. 2009-08-22 14:19:27 +00:00
580d383364 Moved mesh display options to the 3D view n-key area, next to other display options.
The DNA/RNA for these options should be changed to reflect this.
2009-08-22 11:51:26 +00:00
1e14ab9992 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22668:22701 2009-08-22 10:57:07 +00:00
a4f3f5c23c - BGE, Some sensors, stored the event manager in 2 places (became confusing to do changes in this area)
- Change compiler warnings for linux/scons/C++
2009-08-22 10:51:21 +00:00
2aa2512a43 Tiny User Prefs tweaks. Also put the Save As Default button in header so it stays put. 2009-08-22 09:21:08 +00:00
fe0dfc2315 use '' for enums rather then "" 2009-08-22 08:48:01 +00:00
977a50ad77 2.5 MSVC projectfiles maintenance
* AUD_filefactory added.
* imbuf added to RNA include dirs.
2009-08-22 08:35:39 +00:00
9e3ac3c1f2 Added extra padding for OS X at the top of the screen when opening user prefs. The window header was still getting clipped slightly behind the menu bar. 2009-08-22 08:06:54 +00:00
b20f4e46c6 remove -Wnested-externs warning for CMake/unix, since this is used a lot, if we want to remove it can be re-enabled.
fix view3d python errors with no object/edit object.
2009-08-22 05:46:03 +00:00
d4407115fa Hook Modifier Bugfixes:
Fixed some typos made in previous commit. Hook Modifier should now work correctly again (and also for newly added Hook relationships)

Notes:
* To add a hook, you currently need to perform the following steps
1) add modifier from menu (no operator in EditMode)
2) specify the object (and/or bone to use as the hook target)
3a) in EditMode, select the vertices you wish to be affected by the hook, and press 'Assign'
3b) alternatively, fill in the vertex-group field for the Vertex Group which contains the vertices to be affected
4) press 'Reset' (to make sure hook will behave correctly)
5) optionally, also press 'Recenter' if the hook position isn't right...

* BUG ALERT (Brecht/Ton): it is impossible to clear the vertexgroup/bone fields once you have assigned some value. Doing backspace+enter (or any other variation) will always result in the first item in the search menu being used.
2009-08-22 04:11:17 +00:00
17e3b09e88 2.5 - Timeline now updates correctly after keyframes have been edited 2009-08-22 03:10:52 +00:00
98272a0138 2.5 - Code shuffling
Moved WeightPaint/VertexPaint toggling hotkeys to the same place that the ones for PoseMode/EditMode are defined. This means that the hotkey for toggling PoseMode works again (instead of being overwritten by WeightPaint).
2009-08-22 02:53:14 +00:00
0be1e72dca 2.5/Vertex paint:
* Added operator for filling vertex colors with the brush color
* Pythonized the vertex paint menu
2009-08-22 02:27:37 +00:00
095ec3a6e9 2.5/Multires:
* Disabled multires subdivide button in editmode (again)

SVN weirdness:
I already did this in r22447. Somehow it got changed back -- but I can't find any log of it getting reverted, either in my email or on p.b.o. This is extremely weird!
2009-08-22 01:01:53 +00:00
2355130c3a Added standard hotkeys for standard features like copying, cutting, pasting, saving, loading.
Saving/Loading:
Save - Ctrl S / Cmd S
Save As - Ctrl+Shift S / Cmd+Shift S
Open - Ctrl O / Cmd O
Open Recent - Ctrl+Shift O / Cmd+Shift O
New File - Ctrl N / Cmd N

Text:
Copy- Ctrl+C / Cmd+C
Cut- Ctrl+C / Cmd+C
Paste- Ctrl+V / Cmd+V
Select text- Ctrl+A / Cmd+A

Misc:
Repeat Last Op - Ctrl+R / Cmd+R
Render - Ctrl+Return / Cmd+Return
Render Animation- Shift+Ctrl+Return / Shift+Cmd+Return
User Preferences - Ctrl+Comma / Cmd+Comma
Changed the important search menu to Space key.

Old hotkeys are still preserved, at least for now.
2009-08-22 00:19:24 +00:00
9202aaa2dc Update Makefiles for audaspace.
This add support for: sdl, ffmpeg, openal, jack and sndfile.
We have new options:
	WITH_OPENAL, default false
	WITH_JACK, default false
	WITH_SNDFILE, default false

and with this:
	NAN_OPENAL, default /usr

	NAN_JACK, default /usr
	NAN_JACKCFLAGS, default -I$(NAN_JACK)/include/jack
	NAN_JACKLIBS, default $(NAN_JACK)/lib/libjack.a

	NAN_SNDFILE, default /usr
	NAN_SNDFILECFLAGS, default -I$(NAN_SNDFILE)/include
	NAN_SNDFILELIBS, default $(NAN_SNDFILE)/lib/libsndfile.

Also add two new option on source/Makefile for jack and sndfile libs,
but only for linux, so let me know for other OS.
2009-08-21 22:56:26 +00:00
d82935a327 SVN maintenance. 2009-08-21 22:06:19 +00:00
f248b25152 Audio file loading backend libsndfile! 2009-08-21 19:39:28 +00:00
647fd95c7f 2.5 Multires:
* Fixed doing a simple subdivide, rather than Catmull-Clark. Note that the first subdivision will still appear to be CC rather than simple, this is a bug we just have to live with for now.
2009-08-21 18:35:40 +00:00
b6548c21c2 2.5/Multires:
* Fixed multires subdivision of a sculpted object. Accidentally broke this when I fixed removing a multires modifier.
2009-08-21 18:15:50 +00:00
fc5df351b3 Material buttons tweaks
-Made Mirror and Transparency panels more consistent.
-Improved greying out, and better communicated the fact that alpha settings do work even if Ztransp/Ray Transp are not enabled. The results of low alpha and no Ztransp/Ray Transp look weird though - is this supposed to be supported?
-Added Flare panel for halo.
-Improved SSS panel.
2009-08-21 17:53:27 +00:00
5280c2884b 2.5 Object mode:
* Made object mode an enum, shows better in the debugger
* Added a toggle mode to the set object mode operator
* Toggling a mode on and off goes back to the previous mode, not just object mode
* Changed the vertex mode and weight mode shortcuts to call the toggle mode operator
2009-08-21 17:35:35 +00:00
bc41c845f3 2.5: Animation playback without sync option was slightly slower
than expected time, even when it could keep up. Changed the WM
timer logic a bit to always target the next frame time exactly,
2009-08-21 16:28:49 +00:00
f2e7ca0de3 2.5: Load UI is now an operator property, and a user preference to
define what the default is, just like file compression for saving.
2009-08-21 14:33:53 +00:00
1c614f6cf6 2.5: layout.itemO now returns OperatorProperties to be filled in,
when passing properties=True as argument.

Other changes:
* uiItemR, uiItemFullR, uiItemFullO now accept a flag argument rather
  than multiple different "boolean" arguments, but still exposed as
  booleans to python.
* Fix RNA to support setting PROP_RNAPTR for return values.
2009-08-21 12:57:47 +00:00
93dd95b6c2 bug fix #18982
non mesh objects missing initializers
2009-08-21 12:49:21 +00:00
27797a45ee 2.5:
* Deleted Help scripts, there are now operators in space_info.py. 

* Some code cleanup.
2009-08-21 11:52:20 +00:00
d9283fc0cc Ack... committed wrong file before (fortunately it was just a harmless comment added) 2009-08-21 11:22:38 +00:00
df61b5f9fd 2.5 - 2 Bugfixes
* Alt-S in Object Mode would crash. Was caused by modal-keymaps for Pose Mode not being cleared when not in Pose Mode. 
Also fixed what appears to have been a copy+paste error for Armature Sketching keymaps.

* Active KeyingSet menu in TimeLine header is now properly editable. Was using the wrong type of layout call to do this.
2009-08-21 11:04:33 +00:00
9125fe55fb Hook Modifier - Bone Targets
Made Hook Modifier be able to use bone targets. However, I haven't been able to verify that everything will work perfectly, since just creating a new Hook Modifier and assigning targets doesn't set hmd->indexar correctly.
2009-08-21 10:47:27 +00:00
46fb2d37e3 have texture paint use the curve rather then the falloff setting (falloff gave ugly center area of 100% opacity) 2009-08-21 07:19:06 +00:00
589ea76833 2.5/Paint:
* Updated texture paint UI for stroke settings.
* Removed duplicate brush blend types, just use the ones defined in imbuf instead
2009-08-21 06:23:38 +00:00
5cd51b4387 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22625:22668
needed this for 2.5 testing
2009-08-21 03:09:27 +00:00
442ba39d49 fix for own bug added since 2.49a,
2.49a tries to remove the object from the conversion list every time. Now remove from the conversion list directly without being apart of the remove object function.
2009-08-21 03:06:36 +00:00
1be67b60fd 2.5: Modifiers & Menus
* Popup menus now remember the last clicked item again.
* Modifier and File Format menus are now organized in multiple
  columns with categories.
* Hook, explode, uv project modifiers have all their buttons
  again with the relevant operators implemented.
* Modifiers that can't be added by the user, or don't work on
  curves for example, are not in the menu anymore.
* Fix search menu overlapping buttons when near the bottom of
  the screen.
* Fix uv layers search menu not working in some modifiers.
* Cleanup popup menu code a bit, layout engine is used in more
  cases now instead of ugly position calculation code.
2009-08-21 02:51:56 +00:00
2881393fbb 2.5 Paint:
* Added airbrush and airbrush rate options to paint stroke. Works for sculpt, vertex paint, and weight paint.
2009-08-21 00:46:36 +00:00
23d9b6bcec View3D: shift+c center the view but no the cursor like 2.4x
Probably missing because is not inside view3d_home, it's in the main
winqreadview3dspace function.
2009-08-20 21:09:48 +00:00
86e38ef6f7 2.5 Paint:
* Evil backbuf drawing strikes again. In paint modes, it was causing the tool panel to flash black, bad glScissor.
2009-08-20 19:46:53 +00:00
c1100361e2 2.5 filebrowser
* code cleanup: remove duplication in drawing, join list and preview drawing
2009-08-20 18:39:25 +00:00
1772a0a62f Add unsigned char buffer to BLF_draw_buffer and update makefiles for lzo and lzma.
I rename the original makefile of lzo (Makefile.bak) and a new one.
Also four new option for user-def.mk:
	WITH_LZO, default true
	WITH_LZMA, default true
	NAN_LZO, default extern/lzo
	NAN_LZMA, default extern/lzma

It's easy add support for system libs (using lzo and lzma from OS) but I don't
know if it have much sense.

Note that I can't test the "unsigned char" buffer because the OGL animation
is not working (right ?), but is the same code that for float also the new
Makefile work fine here (Linux), but maybe need some tweak on other OS.
2009-08-20 18:34:14 +00:00
f6dcd9376b 2.5 Texture RNA:
Distorted Noise: "Distortion" Flag was swapped with "Basis".
Reported by schuh in IRC. Thanks.
2009-08-20 17:59:37 +00:00
fda97809bc 2.5 Multires:
* Fixed a memory corruption bug when deleting a multiresmodifier, was hanging on to a bad pointer. Reported on IRC by lusque
2009-08-20 17:37:38 +00:00
ec6b14bb07 2.5 texture paint:
* Little bugfix, was passing an invalid pointer
2009-08-20 16:43:55 +00:00
4df4b17ed6 2.5 Paint:
* Weight paint and vertex paint now use the same cursor setup as sculpt
2009-08-20 16:00:17 +00:00
ff27281f2e changed layout of PovRay radiosity panel to be more consistent with other render panels 2009-08-20 15:58:28 +00:00
a54af8e3ba 2.5 weight paint:
* Refactored weight paint to use the new stroke code, now does smooth stroke and stroke spacing.

Note: weight paint is failing to free it's MocNodes in 2.5, someone might want to look into that
2009-08-20 15:25:12 +00:00
8df1d6d13a * cleaning and simplification 2009-08-20 13:45:04 +00:00
1e0bd07522 Swapped some icons in the node editor. The Render Layers menu was using wrong icon, for example. 2009-08-20 11:38:09 +00:00
6dbadb23ce update MSVC project files. 2009-08-20 09:18:55 +00:00
9f764ae36d Smoke:
* Fix for OpenGL domain scaling/rotating/translating reported by Wahooney
2009-08-20 09:13:57 +00:00
bc4806579b Smoke:
* Fixing my fix for opengl GL_BLEND
2009-08-20 09:00:23 +00:00
e75bf81ac6 Smoke:
* Fix OpenGL drawing resulting (at least on windows) in missing panels when switching fullscreen + back
2009-08-20 08:59:09 +00:00
d8cd7a22e8 * a few more small cleanups 2009-08-20 08:18:54 +00:00
210ef4c07c 2.5/Sculpt:
* Fixed sculpt brush stroke exec (F4 operator)
* Made a generic paint stroke exec
2009-08-20 05:44:32 +00:00
7dfc1317ac 2.5/Paint:
* Converted vertex paint to use the new stroke system. Now supports the same smooth stroke and stroke spacing as sculpt mode.
* Refactored the paint cursor a bit, just sculpt for now but other modes soon.
* A couple warning fixes
2009-08-20 05:13:07 +00:00
2878eed1c1 Fix Smoke:
* Making it less verbose
2009-08-20 01:22:07 +00:00
e56c32073d LZMA: Deleting unused bad files (bad for gcc) 2009-08-20 01:02:34 +00:00
147bcc92b6 * Library path fixes for win64 2009-08-20 00:54:40 +00:00
858dbbe232 Fix Smoke:
*totally forgot scons file for lzma
2009-08-20 00:42:57 +00:00
89658db576 Fix Smoke #1:
* compile error reported by nudelZ (static/nonstatic)
2009-08-20 00:37:27 +00:00
286c2ca80b Smoke:
* cache for low res (deactivating high res for now)
* new way of view3d rendering of smoke (no longer 3 axes) -using 3dtexture now (introduced into gpu/intern)
* introducing LZO and LZMA libs into extern (makefiles missing for now)
* reducing memory usage after simulating for the frame ended (freeing temporary buffers)
* splitting smoke into 2 modifier for the cache-sake (it cannot handle more than 1 cache on the same modifier-index)
* no color on gui anymore
* fixing non-power-of-2 resolutions (hopefully)
* fixing select-deselect of domain drawing bug
* fixing drawobject.c coding style (making Ton happy) ;-)

HINT #1: If scons doesn't work -> cmakefiles are up-to-date, couldn't test scons (but i tried to mantain them, too)

CODERS HINT #1: we really need a way to disable adding all modifiers through "Add Modifiers" dropdown!

WARNING #1: before applying this commit, deactivate your SMOKE DOMAIN in your old files and save them then. You can open them then savely after that.

WARNING #2: File and cache format of smoke can be changed, this is not final!
2009-08-20 00:33:59 +00:00
fa5838c7be * volume rendering cleanups and optimisations 2009-08-19 21:48:09 +00:00
33adf41cac * CMake fixes, mustn't have come through in the merge 2009-08-19 21:47:47 +00:00
c21627e31b 2.5/Paint:
* Some initial work on a new paint abstraction, PaintStroke. For now, most of the code just pulls out stroke-related stuff from sculpt mode, next step is to integrate the other paint modes to use this. It'll enable stuff like smooth stroke for all the paint modes with less code duplication.
2009-08-19 21:24:52 +00:00
8a5a7d3d28 2.5/Multires:
* Fixed saving most recent sculpting on a multires object. Uses the same hack already in place for saving that info for undo.
2009-08-19 16:49:21 +00:00
792d526489 More texnode preview fixes. Previews now have correct aspect ratio and are drawn by the renderer. 2009-08-19 15:45:16 +00:00
315229ea5f texture enum was crashing when generating docs, removed radiosity from makefiles. 2009-08-19 14:04:21 +00:00
aace6ef551 2.5: Restored statistics in the info header.
Implementation:
* NC_SCENE or NC_OBJECT cause scene->stats to be cleared.
* NC_INFO is sent to tag info headers for redraw.
* In UI scene.statistics() creates scene->stats if it is
  NULLd, and then returns the string.
2009-08-19 12:35:40 +00:00
132277f098 svn merge -r 22450:22627 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-08-19 11:18:52 +00:00
c3041ae7cd - fix for BGE warnings
- when C++ uses guardedalloc SYS_DeleteSystem was called after MEM_printmemlist(), making it look like there was a leak.
2009-08-19 10:26:43 +00:00
e611c4756f 2.5: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22291:22625 2009-08-19 09:35:22 +00:00
9b25a3bb2a 2.5 Timeline:
* Removed timeline_header.c with old Buttons code.
2009-08-19 09:12:21 +00:00
360235a5f4 cmake cleanup (remove unused includes, make some within IF checks) 2009-08-19 07:48:56 +00:00
8480ea2b0a *small volume render code cleanups 2009-08-19 05:54:53 +00:00
680f88017f updated for new transparency RNA names 2009-08-19 01:11:18 +00:00
eb6c5d7a7f New scons option (WITHOUT_BF_PYTHON_INSTALL) to disable copying python files from system 2009-08-19 01:03:34 +00:00
184ac26dd0 2.5: Headers
* Fix header menu spacing bug, and make it consistent for all headers.
* For consistency, always put menus first in the header, then any enums
  to switch the type of data displayed.
* Node editor header ported to python layout. Still quite a few
  operators missing to make the menus complete.
* RNA wrapped node editor, and added use_nodes property to material
  and scene.
2009-08-19 00:55:30 +00:00
e21c1dde81 Texture node previews: Well and truly fixed.
(Probably.)
2009-08-19 00:46:06 +00:00
d37d673894 Fix for my previous fix. 2009-08-18 21:19:29 +00:00
d96edd041e 2.5:
* Fixed CMake includes for blenkernel
* Fixed an RNA property read that was causing failures in a couple paint modes
2009-08-18 21:14:36 +00:00
80cbcfed27 Fixed redraw issues in texture node tree. 2009-08-18 21:10:03 +00:00
05dec4a9d8 Scons compile fix.
Missing blenfont directory, caused error.
2009-08-18 20:47:31 +00:00
0747977317 SVN maintenance. 2009-08-18 20:24:40 +00:00
c9795eae45 Fixed the texture preview to work with multi-output node-based textures. 2009-08-18 19:58:27 +00:00
7d812822bd Stamp info back only for float buffer. (next commit add unsigned char).
A couple of new functions:
	BLF_width_and_height	- Merge of BLF_width and BLF_height in one call to avoid freetype2 stuff.
	BLF_buffer		- Set the buffer, size and number of channel.
	BLF_buffer_col		- Set the text color (the alpha is not used right now).
	BLF_draw_buffer		- Draw the text in the current buffer.

Also tweak a little the boundbox and draw function to avoid access the freetype2 and use the cache info.
By default the font size is 12, the UI still need work to allow change the font and size.
2009-08-18 19:26:53 +00:00
94511c6729 Missing libed_userpref in source/Makefile 2009-08-18 17:01:59 +00:00
b51ebdf0ba 2.5: Middle mouse button emulation with alt + left mouse button
works again, implemented at windowmanager level this time.
2009-08-18 16:11:53 +00:00
14d33b3c1f BGE guardedalloc, Uses WITH_CXX_GUARDEDALLOC but gives a string to MEM_mallocN for better tracking memory usage.
* off by default.
* new/delete are at the bottom of each class
* python BGE objects have the new/delete in the Py_Header macro.
2009-08-18 15:37:31 +00:00
3682624616 2.5: Game Engine
* Added Shading and Performance panels in the scene buttons,
  containing the options previously in the 2.4x game menu.
* Added show framerate/debug/physics/warnings back in game menu.
* Moved these settings from G.fileflags to scene GameData.
* Enabled Display Lists by default.
* Some other small game scene button tweaks.
2009-08-18 15:27:48 +00:00
ede954b938 compile time option to override C++'s new/delete to use guardedalloc, useful for debugging. shows memory leaks very quickly. currently cmake only - WITH_CXX_GUARDEDALLOC 2009-08-18 15:20:29 +00:00
3803a3c5a7 Fixed some redraw problems with texture nodes. 2009-08-18 14:31:13 +00:00
990dcd0f7f 2.5:
* Split Info and User preferences into two separate spaces.
* Renamed Buttons Window to Properties also in RNA identifiers.
2009-08-18 12:58:51 +00:00
ac2451c6be 2.5: RNA. Default values were not set when calling functions, this
is fixed now. Also added option for spaces without menus in the
header in uiTemplateHeader.
2009-08-18 12:56:43 +00:00
6e10e93965 Renamed Buttons Window to Properties, for these reasons:
1) This fits with our splitting the old Buttons Window into Tools and Properties

2) The name Buttons Window doesn't communicate what it is for, only that it includes buttons. Of course, most other editors include a fair amount of 'buttons' too. 

3) A 'button' is not usually what you'd associate with a slider, number field, checkbox or menu. Really there are hardly any true buttons in this window space.


Also added some notifiers to sequencer RNA, though there seems to be some refresh errors in the image preview area.
2009-08-18 12:10:12 +00:00
34b947d0bc 2.5 - Fixing some drawing problems I noticed in ZanQdo's file...
Alpha for icons wasn't getting set correctly in animation editors anymore. This commit should fix the issues there, though the scrollbars still have a few minor issues still too. 

Also, NLA strips with repeats now have the repeat indicators drawn only 80% or so of the height, making it easier to distinguish between strips with repeats and bunches of strips.
2009-08-18 11:48:34 +00:00
a238034c61 missed this define when renaming bullet defines 2009-08-18 11:28:57 +00:00
88f114af56 Bugfix: Crash in demo file from ZanQdo (reported by jaguarandi).
Was caused by old animation-system code that was no longer working. I've commented out this code for now until we need something like this again.
2009-08-18 11:25:50 +00:00
61ffa9f131 2.5 - Newly created KeyingSets are now automatically named properly. 2009-08-18 04:15:47 +00:00
798bed8424 forgot to updated scons and make for the bullet defines 2009-08-18 04:15:28 +00:00
0dad5cfbca CMake/Warnings
* WITH_GAMEENGINE and WITH_BULLET were being added to the compiler flags, only define in areas that use them.
* removed C++ unix warnings by adding -Wno-invalid-offsetof -Wno-sign-compare. the py api uses invalid offsets for attributes.
* removed C unix -Wnested-externs warning, these are everywhere in blender.
* removed unused BGE python headers
* undefine _XOPEN_SOURCE and _POSIX_C_SOURCE in the BGE, python redefines.
* renamed USE_BULLET in collision.c to WITH_BULLET for consistency
2009-08-18 03:24:46 +00:00
ca20107edb 2.5/Sculpt:
* Added UI for rake mode
2009-08-18 01:39:49 +00:00
4fb19159ea 2.5: RNA, defining enums, pointers and collections properties is now
possible from python, but it's still work in progress.

Pointers and collections are restricted to types derived from
IDPropertyGroup (same as for operators), because RNA knows how to
allocate/deallocate those.

Collections have .add() and .remove(number) functions that can be
used. The remove function should be fixed to take an other argument
than a number.

With the IDPropertyGroup restriction, pointers are more like nested
structs. They don't have add(), remove() yet, not sure where to put
them. Currently the pointer / nested struct is automatically allocated
in the get() function, this needs to be fixed, rule is that RNA get()
will not change any data for thread safety.

Also, it is only possible to add properties to structs after they have
been registered, which needs to be improved as well.

Example code:
http://www.pasteall.org/7201/python
2009-08-18 01:29:25 +00:00
a5da26f59d 2.5/Sculpt:
* Added UI for brush stroke. Contains for now spacing and smooth stroke
* Removed Sculpt UI for airbrush -- doesn't do anything in sculpt mode
* Improved smooth stroke by using float instead of int precision, so smooth stroke is even smoother now
2009-08-18 01:19:00 +00:00
2d7305f12d 2.5/Sculpt:
* Fixed tablet pressure for brush size.
2009-08-17 23:37:39 +00:00
7d93d1c8f8 Bugfix for time line: Fixing usage of uninitialized memory which resulted in e.g. backward playing time line. 2009-08-17 22:27:08 +00:00
2de4c8f2b2 Implemented multisampling for texture nodes. 2009-08-17 22:17:25 +00:00
6412fe4b92 * Point density texture works again 2009-08-17 22:09:36 +00:00
f9ceeeede6 Slight refactor of texture nodes.
Delegates now receive a TexParams* instead of float *coords. This gives texture nodes access to dxt, dyt, cfra as well as coords. This fixes the time node and allows nice sampling to be implemented.
2009-08-17 20:30:11 +00:00
9f5d257483 New command line argument to specify render engine
-E <engine>

-E help: lists all available engine and then quits. (blender window might flash open and then disappear. io python scripts need to be read for all engine, so we have to load interface and not do that before like other help options).

When run after -b, only builtin engines are available because of the python scripts not being read correctly bug.
2009-08-17 20:04:28 +00:00
912c48442c 2.5/Ghost:
* Hopefully fixed X tablet support. The name string was not a reliable way of finding tablet anymore, so now we get the type string and search it for 'stylus' and 'eraser'. Still not very robust, but without UI I don't see how to do better.
2009-08-17 19:54:29 +00:00
55b6230464 Made texture nodes accessible in the interface.
* Exposed Tex.use_nodes, Tex.nodetree, MTex.which_output in RNA
* Added node controls to texture buttons (Use Nodes and Use Output)
* Made new texture outputs have unique names by default, though unique names still aren't required.

Note: The preview window in the texture buttons only takes which_output into account when in "material" mode, and in the material half of "both" mode; the plain texture display ignores the user's output choice.

This is because ED_preview_draw draws a Tex* and not an MTex* -- still some work to do here.
2009-08-17 18:37:58 +00:00
6aeb2f687a - rna sequence sound was referencing unknown struct
- cmake was using libs that were disabled (whitespace changes too)
- unit conversion missing checks for % ~ & operators
2009-08-17 18:07:40 +00:00
e19e654d84 2.5/Sculpt:
* Fixed a mem leak with the grab brush
2009-08-17 17:49:33 +00:00
77f60458e2 2.5 Particle edit:
* Fixed cursor poll, so the cursor won't show up outside the 3d view
2009-08-17 17:34:15 +00:00
b0508659f6 2.5 editmode:
* Added a poll to the editmode operator that checks first that the object is an editable type (no more tabkey on camera, bug reported by DingTo)
2009-08-17 17:26:58 +00:00
f3caa80a49 rna reference doc generation
- rna classes,  only include props and functions that are not inherited (epydoc then gives inheritance info)
- include function arguments and return values for in cross reference
2009-08-17 17:26:54 +00:00
c00d610e3e 2.5:
* Added icons to viewport shading enum. On a side note, why do we have an icon called "ICON_POTATO" for texture mode?
* Fixed clay brush at zero-strength bug, was dividing by zero. Still todo is fixing clay brush strength relative to other brushes.
2009-08-17 17:14:37 +00:00
931ffbedaa 2.5
Stablity commit: on render, all running jobs are stopped now (previews, 
composite, screencast). First render has to be more threadsafe, to allow
multiple renders simulatenously.
2009-08-17 16:54:52 +00:00
2a9e6b7237 2.5/Sculpt:
* Hopefully fixed the tablet pressure in sculpt mode? Can't test because Blender isn't seeing my tablet.
2009-08-17 16:08:09 +00:00
21ca9a6049 2.5 paint:
* Fixed texture paint UI
2009-08-17 15:17:45 +00:00
b0fe88117b 2.5 Paint:
* Updated the brush selection UI to make the slots less apparent; adding and removing brushes now directly adds and removes slots.
2009-08-17 15:05:18 +00:00
9f973bca78 units with no separator can now be typed into number buttons - eg, 5'7" 2km4m 2009-08-17 12:48:56 +00:00
f1ec842cb2 2.5 Timeline:
* Added "Only selected" Option in View menu.
2009-08-17 11:45:24 +00:00
Nathan Letwory
3a4fd712c0 * libjack.dll copying 2009-08-17 11:39:34 +00:00
Nathan Letwory
7997fe4774 * I accidently committed a tainted SConstruct with some old tests. This disabled copying of Python .dlls. Fixed. 2009-08-17 11:37:43 +00:00
7798ed75d4 2.5 - Bugfixes:
* Reverse playback works again. Flag was getting overriden before it had a chance to do anything

* Active KeyingSet field in TimeLine header should now only be marked as editable when there are some Keying Sets. However, there still seems to be a bug when trying to change this...

TODO (Brecht?): it would be nice to be able to specify a list/collection of data for pointer-buttons that aren't ID's.
2009-08-17 10:39:03 +00:00
ddd7bfc91b 2.5 3DView:
* Ported Edit Menus to python.
Many thanks to Lorenzo Pierfederici (lento) for this patch.
2009-08-17 10:13:24 +00:00
Nathan Letwory
d4d94618ee * Jack support should be off by default until things have been cleared up (see meeting notes 16.8.2009) 2009-08-17 09:20:14 +00:00
61b2ac04e3 2.5 - Keying Sets Fixes
* Properly wrapped Keying Sets in RNA. Now the timeline header shows a popup for choosing KeyingSets instead of the nasty index button.

* Fixed bugs in Outliner code for adding/removing array elements to Keying Sets. This makes it possible to add only the x and z location settings for an object for example.
2009-08-17 07:35:38 +00:00
97db057a4c paint toolbox layout grouping 2009-08-17 07:35:23 +00:00
22e68ba1bb scons support for extracting python from the system on unix os's 2009-08-17 07:34:41 +00:00
a3b317daf7 2.5 Texture paint:
* Converted to use Paint struct. Now all the brush modes are done.

TODO:
* Make the UI better
2009-08-17 04:40:59 +00:00
3425925a77 mesh operator documentation patch from Ron walker, (edited a few of the descriptions) 2009-08-17 04:15:53 +00:00
73ea51eccd 2.5/Sculpt:
* Some UI fixes suggested by broken, removed specialized Add Brush menu in favor of standard ID add button, also put a separator between brush selection and brush properties.
2009-08-17 03:16:14 +00:00
9d2d3a8be7 2.5 Paint:
* Converted vertex paint and weight paint to use the new Paint type
2009-08-17 02:49:31 +00:00
Nathan Letwory
1e0fd0d4c1 == SCons ==
* add jack support for audio system.
  Note that for OSX jack support is still off by default, since
  I'm not sure about what goes where. OSX maintainers, please check and fix.
2009-08-17 01:16:50 +00:00
951895b619 2.5 Paint:
* Refactored the file write/read code for the new Paint type. Just used for sculpt for now, but this'll make it easier when the other paint modes are converted.
2009-08-17 00:39:00 +00:00
79da01a288 2.5 Armatures:
* Missed one posemode flag-to-mode switch, drawing of armatures works correct now.
2009-08-17 00:24:49 +00:00
5f7ed83735 2.5 Timeline:
Some fixes:
* Added missing "Layered" Button.
* Jump to last keyframe operator was called incorrect.
2009-08-17 00:22:04 +00:00
bee5f9f09e 2.5: Fix timeline space redraw properties, these were not RNA wrapped
correct, and were missing update. Also moved this update code to
screen_edit.c, next to the other animation play stuff.
2009-08-16 23:37:46 +00:00
66c916138a 2.5:
* Fixed a few warnings (unused vars, missing forward struct)
2009-08-16 23:06:16 +00:00
d35a42d3e6 2.5: Render Api
* Add RenderResult.load_from_file to load whole multilayer exr's at once.
* Removed x/y offset from RenderLayer.load_from_file, better to encourage
  using offset in begin_result() to minimize memory usage.
* Added WITH_OPENEXR in some screen/file/image module for scons/make, exr
  was not working in some places there.
2009-08-16 22:53:15 +00:00
594121016d 2.5
* Use scene->r.audio instead of scene->audio everywhere, was using both still.
* Fix time_top_left_3dwindow link error, not sure why this happens, somehow
  with scons building it seems that files (like time_header.c) wich are not
  called from the same .a module get stripped?
2009-08-16 22:49:17 +00:00
fcce333a08 Add jack subdir makefile and standarize audaspace sub-lib names.
Jack support not enabled for now.
2009-08-16 22:48:30 +00:00
3458642935 Add debug support like other libs. 2009-08-16 22:35:22 +00:00
2cf5b52856 2.5 Timeline:
* Finally the header and menus are done via python.
* Added RNA for sync audio. 

Note: This is just a basic working version in python. It needs more work and some layout changes.
Joshua: Feel free to adjust this further :)
2009-08-16 22:01:20 +00:00
64fb0667b2 2.5:
Fixed a crasher reported in IRC by DingTo (bad pointer dereference)
2009-08-16 21:05:57 +00:00
6a6d304033 SVN maintenance. 2009-08-16 20:53:10 +00:00
55edb016b1 2.5: Sound
* Move sound_init to make sure it gets called everytime user
  preferences is reloaded.
* Merged sound_reinit and sound_init. One used user preferences
  while the other did not, don't see the point of this, so just
  made it always use user preferences now.
* Timeline header audio sync option now controls scene flag
  rather than timeline flag. Since it uses the same playback
  operator now, there is no distinction anymore.
* Added boolean property sync to animation play operator, to sync
  with audio or not. Uses scene setting if property is not set.
* Playback stop button in info header now calls operator, so sounds
  stop playing too.
2009-08-16 20:37:22 +00:00
19babf988d 2.5: Added operator ui() callback for defining own ui layout
to show properties.

* One problem is that we currently have 3 different kinds of
  property layouts, single column, two column, and single column
  with text inside button, probably best to reduce this..
* Last operator panel now shows operator name in the header.
* Fix extrude operator to not include transform properties
  anymore, since they are already there now due to macro system.
2009-08-16 20:23:34 +00:00
5765b1bfa4 2.5: Update GPU module to deal with removed G_TEXTUREPAINT
global, passing along enable/disable mipmap setting through
various functions instead.
2009-08-16 20:14:49 +00:00
afa0fa5e29 2.5 Sculpt:
* Added a new Paint type in scene DNA. This is now the base struct for Sculpt.
* The Paint type contains a list of Brushes, you can add or remove these much like material and texture slots.
* Modified the UI for the new Paint type, now shows the list of brushes active for this mode
* Added a New Brush operator, shows in the UI as a list of brush tool types to add
* Made the sculpt tool property UI smaller and not expanded, expectation is that we will have a number of preset brushes that will cover the basic sculpt brush types

TODO:
* Vertex paint, weight paint, texture paint need to be converted to this system next
* Add brush presets to the default blend
2009-08-16 19:50:00 +00:00
d5c990664e 2.5
Another keymap goodie for test fun: Tweak events allow to be limited
to a direction, like North, South-West, etc.

Tested with View3D keymap for border, circle & lasso. Issue to look at
still is whether a border should start immediate, or first draw a cross...
this can be an operator property of course.

Note that tweak code can be extended to corner-gestures too (so you can
do a north+east, north+west, and so on... nice for later).

Time to get keymap saving work! :)

(Fixed bug in Mesh edit circle select, missing notifier)
2009-08-16 18:25:22 +00:00
84758d0eb2 copy the systems python to the install dir for re-distrobution (non-osx unix), removed some unused stuff in makefiles 2009-08-16 18:14:17 +00:00
e6cd41ca44 2.5
Muscle flexing commit; put the "any key modifier" to work, also exposed
(ugly) in keymap editor. Notes for it works:

- You can use any keyboard key to become modifier now (not mouse buttons)
- But, if this key was assigned to be a regular hotkey, that still gets
  triggered, obviously.
- So: only use unused keys for this, like "~" or other special ones?

For test fun: L+K now does animplay.
2009-08-16 17:42:09 +00:00
09e9537ebb 2.5 Object mode:
* Cleaned up code in 3d header; still requires custom code for creating the object mode button, but removed all the nasty V3D_XXXMODE stuff, and the mode switching code is now just an operator call.
2009-08-16 16:38:32 +00:00
482dfa19a5 simple crash fix 2009-08-16 16:35:14 +00:00
13dcf69eee 2.5 Timeline:
* Python conversion is nearly done, still uncommented.
2009-08-16 16:15:13 +00:00
5555ef8a76 rna function return values in generated docs,
added prop.use_return so you can tell if a prop is a return value.
2009-08-16 15:46:09 +00:00
0e06b0bdf1 tweaked units layout 2009-08-16 15:45:27 +00:00
53f451928e 2.5: RNA, added context.screen.animation_playing to detect
animation playback.
2009-08-16 15:34:30 +00:00
1ee26d45b5 Added jack audio support, building with cmake only currently, feel free to add scons and maybe cmake. 2009-08-16 14:53:11 +00:00
c73bad7bdd == Sequencer ==
Forgot coverity id: CID 598
2009-08-16 14:52:05 +00:00
71cc934c6f == Sequencer ==
Make coverity scan happy and check for input strip on speed control map
rebuild.
2009-08-16 14:43:30 +00:00
f250a92808 2.5/RNA:
* Added Context access to RNA_property_as_string. This is needed for doing a Python call to the object mode set operator, which has a dynamic enum property that needs context.
2009-08-16 14:43:08 +00:00
406d009269 2.5:
* Removed some more old sculpt layout code.

* Fixed Channel hack in sequencer. This is now fixed in layout engine.
2009-08-16 14:38:59 +00:00
bbf24a2243 2.5
Small fix: region-zones (currently triangles) overlapped when closed in
cases. Happened for 3d window toolbar for example.
2009-08-16 13:51:33 +00:00
d823172d6d 2.5
Flaw in python UI for headers: code missing to correctly set the total
width of header, plus obsolete call in view3d header template to set width.

Now MMB scroll of view3d header works again.
2009-08-16 13:01:40 +00:00
e3b2cdc8ea 2.5 3DView Header:
* Sculpt Menu is now written in python.
* Select Menus are only for Object, Edit and Particle Mode, added code to check on that, fixed Console warnings.

* Fixed a typo in armature buttons, reported in IRC by "ebrain".
2009-08-16 12:52:57 +00:00
d800426c57 own mistake, __rna__ wasnt causing circular references. python can handle this. changing broke python operators like the pyConsole. 2009-08-16 12:29:46 +00:00
59c6a81507 2.5
Skipping UI script and keymap calls for -b background mode.
2009-08-16 11:45:25 +00:00
2cc64a95b5 Minor adjustments to particle buttons and particle brush panels. Use only two rows in lists, and added greying out. 2009-08-16 11:25:18 +00:00
591e5c18a4 2.5
AUD library Makefile missed ranlib for OSX.
2009-08-16 11:19:22 +00:00
ed66ee8b7a units for edge length and area mesh drawing. 2009-08-16 11:16:04 +00:00
1b2ebfcb61 Minor adjustments to game physics. Moved some of the name changes into RNA and moved some options around for nicer alignment. 2009-08-16 09:47:33 +00:00
dfc7d63911 - typos in boxpack comments (incorrectly had comment that it was from NAN)
- removed unused defines STREQ, STREQ2, STREQ3 and MINSIZE
2009-08-16 08:36:08 +00:00
d776dcf795 - added RNA_struct_free_extension rather then having the funcs in each unregister func.
- use RNA_struct_blender_type_set to set the type to NULL before its freed

There is a memory error here when reloading scripts - ui_handler_panel_region, need to look into theis further.
2009-08-16 07:26:29 +00:00
fe984a6e6c volume material
* data reorganisation - uses own values now instead of reusing surface material properties (i.e. an individual density value, rather than reusing alpha) Files saved with the old system won't load up the same after this.

* improved defaults and ui
2009-08-16 06:10:31 +00:00
d86663ee1a 2.5/Modes:
* Added OBJECT_OT_mode_set for setting the object mode. Takes one property, "mode", which can be any of the OB_MODE_* flags. The available modes are limited based on the active object (e.g. only meshes can have sculptmode, and so forth.)
* Set the icon properties in the object mode enum RNA

TODO:
At this point I think everything is ready to start ripping out the ugly hacks in view3d_header for setting the mode :)
2009-08-16 05:48:07 +00:00
128cf15224 missing args for rna funciton. comment on rna leak with type registering that I haven't been able to fix yet. 2009-08-16 04:59:11 +00:00
b1166492e2 Changed material RNA 'emit' value to be soft limited at 2.0 rather than hard limited. 2009-08-16 03:59:39 +00:00
38aef3c3d4 fix compile error for the BGE 2009-08-16 03:51:25 +00:00
573678df48 - replace rna context.mode_string with an enum context.mode, that way its self documenting and is used as a string from py anyway.
- view3d use select menus use the context.mode enum value.

- if selectmenu in dir(bpy.types) # creates a list of 1400+ strings, does a lookup and throws them away, better avoid this for redrawing.
2009-08-16 03:40:00 +00:00
177956a3a7 2.5/Posemode:
* Pose mode was already object-localized, but moved the flag from object->flag to object->mode, with all the other modes.
* Updated object mode RNA
* Commented out some dubious use of base->flag with the posemode flag. So far as I could see the value was only being set, not read, so a hopefully safe change.
2009-08-16 03:24:23 +00:00
c0718d2d4a 2.5:
* Updated object mode flags with Object and Edit.
* Updated RNA for that property
2009-08-16 02:49:37 +00:00
abcdc909eb Animation Editors: Visibility Toggles for Datablocks now work 2009-08-16 02:43:06 +00:00
88294d7fa2 2.5/Particle edit:
* Made particle edit object-localized.
2009-08-16 02:35:44 +00:00
b257acfed1 Animation Editors: Code Cleanups (for Channel Lists) Part 2
Now the mute/protect/expand/etc. toggles are drawn using UI widgets. This means that special event handling code to determine when they were clicked on is no longer needed, and also means that there can now be tooltips for these items too. 

Also, added visibility toggles for ID-block expanders, which will cause all the F-Curves in the linked datablock to not get drawn. The backend filtering code to make this work will come later...
2009-08-16 02:21:43 +00:00
ebf1c5faca 2.5/Texture paint
* Made texture paint object-localized too.

Note for Brecht: gpu_draw.c had three uses of G_TEXTUREPAINT that I was not able to cleanly fix, so commented out for now. Can you take a look and see what should be done here?
2009-08-16 01:25:53 +00:00
db1cab0f3a Remove astray tab chars. 2009-08-15 23:42:16 +00:00
3c3ffb2bab Remove dynamic link directive as it seems we keep on with static approach. 2009-08-15 23:37:42 +00:00
a6089f8238 2.5/Paint:
* Added RNA for the object-localized modes
2009-08-15 22:35:00 +00:00
9bd5b486fb 2.5 3DView Header:
* "Object" Menu is now written in python.
2009-08-15 22:28:48 +00:00
b8aff06466 2.5/Paint:
* Weightpaint is now object-local like sculpt and vertexpaint.
* Fixed a bug spotted by DingTo, going from editmode to sculptmode didn't fully leave editmode
2009-08-15 21:46:25 +00:00
e182d65370 2.5/Vertex paint:
* Made vertex paint local to object, like sculpt mode.
* New test for vertex paint is (ob->mode & OB_MODE_VERTEX_PAINT)
2009-08-15 20:36:15 +00:00
2b3d2b72ea 2.5 3DView:
* Renaming of edit mode context types. 
* Code cleanup.
2009-08-15 20:21:49 +00:00
9d673cd354 2.5, continuing work with localizing paint modes.
* Replaced FACESEL_PAINT_TEST macro with paint_facesel_test. This removes one more thing from BKE_global, and it'll make it easier to localize.
* Fixed sculpt paint cursor sometimes not showing.
2009-08-15 19:48:50 +00:00
0ce5163cc0 2.5 3D_View:
Patch [#19031] (2.5) python menus for the view3d header
by Lorenzo Pierfederici (lento). Thanks!

* Added CTX_data_mode_string() to find out in which mode we're in.
* Added some "select" menus as a test.

This patch makes it basically possible to wrap the 3D View menus to python.
2009-08-15 19:40:09 +00:00
ca906df5cc 2.5: Increase subversion, to avoid doing 2.5 do_versions code each time. 2009-08-15 19:38:52 +00:00
3da40611d9 2.5: Material buttons
* Transparency is now it's own panel, with a boolean toggle
  + enum for z/ray transparency (following mockup made by
  William). Also had to change DNA flags for this.
* Disabled radiosity a bit more in render engine, it still had
  some effects like auto autosmooth.
* Make some sliders in material buttons percentages in RNA.
* Some other small tweaks in layout and naming.
2009-08-15 19:35:03 +00:00
41dc419dcb 2.5: fix for layout engine, increase default size of number buttons
in headers.
2009-08-15 19:31:49 +00:00
f27bee3d21 had support for single triangular brush commented when it works ok.
thanks to j michaelson for pointing out.
2009-08-15 19:28:28 +00:00
be1efd74d1 2.5/Sculpt:
* Made sculpt mode local to object.
* This also fixes loading files from 2.4x saved in sculptmode

Touched a lot of things here, let me know if anything breaks

TODO:
* The other paint modes should be converted as well
2009-08-15 18:58:01 +00:00
e63d4d2bea dont link against SDL when disabled 2009-08-15 17:46:45 +00:00
9059639df4 2.5: Screen/Scene New/Delete operators.
Implementation Note:
* Moved the scene copy/unlink code back into blenkernel, with
  the exception of the copy single user stuff which is still in
  object_edit.c.
* Uses SCREENDELETE notifier like SCREENBROWSE, seems only clean
  way to do this now.
2009-08-15 16:43:03 +00:00
314b14301f 2.5: warning fixes
Directories intern/ and source/blender/ now compile warning
free again here with scons/gcc.
2009-08-15 16:36:25 +00:00
de330b0d5c Fix for View All operator in 3dview, was not working because of missing code. 2009-08-15 14:37:40 +00:00
efc4624e8a 2.5 Physic Buttons:
Patch by nudelZ. Thanks.
* Some layout and code cleanup.
* Made Collision Panel use Modifier Layout with Add/remove Operator.
2009-08-15 14:16:50 +00:00
9236f92dab - remove UNSET becuase it only works with newer versions of cmake,
- changed the SDL and Freetype vars to match CMake's names
- removed unneeded freetype, SDL and ftgl includes
2009-08-15 13:30:28 +00:00
9c45a27fb8 2.5 Sequencer:
* Added Marker Operator Buttons in Menu, although they don't show up inside the Sequencer yet.

* Code Cleanup.
2009-08-15 13:06:21 +00:00
de354d549d Fix for shift-selecting manipulator types. Now redraws correctly 3dview. 2009-08-15 12:47:59 +00:00
13c3bdbf8b Compile fix.
Variable was in wrong place, caused errors in msvc.
Fix by Lguillaume in IRC.
2009-08-15 10:50:30 +00:00
712b67743b changes to help refcounts in rna be more predictable (still leaks when reloading on - F8) 2009-08-15 09:53:38 +00:00
a8872d99a9 * scons fixes for voxel data texture 2009-08-15 07:49:56 +00:00
34dc95f7ee svn merge -r 22423:22450 https://svn.blender.org/svnroot/bf-blender/branches/blender2.5/blender 2009-08-15 07:40:22 +00:00
12291b693c RNA Types were storing an instance of themself for class introspection and docs but makes freeing the type complicated.
now __rna__ is a PyCObject rather then a BPy_StructRNA instance, to get the rna from python use __get_rna() now.
2009-08-15 05:05:23 +00:00
dc952c7f2b Commenting out code from commit 22457 by Genscher for PointCache.
There was some missing code or something causing compiling problems.
2009-08-15 00:40:44 +00:00
d0607c9d8d CTX_wm_reports needs to return NULL when wm.manager is NULL (this happens in background mode).
This fixes a segfault on quit in background mode. Now it reports unfreed datablocks, someone should fix that.
2009-08-14 18:18:19 +00:00
52485190e8 Pointcache:
* prepare pointcache for smoke (smoke doesn't use it yet, commit follows later)
2009-08-14 17:39:27 +00:00
eef09b9cba cmake changes
- set python to 3.1 on linux (dont use FindPackage for now)
- remove duplicate settings (disable cache for copied settings, was quite confusing)
- added an option WITH_INSTALL, when disabled scripts and language files wont be copied to the target dir (better for quick builds)
- remove .svn (was still CVS), and pyc/pyc files after copy
- copy the 'io' as well as 'ui'
2009-08-14 17:16:16 +00:00
47a41ad055 Proper copy code for multiple point caches. 2009-08-14 16:25:59 +00:00
0ba5cf2450 2.5/Paint modes:
* Fixed one of the items from Brecht's TODO mail. Exiting edit mode now restores any paint mode you might have been in, rather than going to object mode.
2009-08-14 15:47:32 +00:00
c32fce0705 some fixes for netbsd with cmake
- CMake, use FIND_PACKAGE(Freetype) for unix/linux
- Only link with libdl.so on linux
- use statvfs rather then statfs for netbsd (size of statfs wasnt available)
- add x11 include path with ghost, glu.
2009-08-14 13:13:36 +00:00
08f0938434 - registering new python classes runs the free functions on existing classes.
- print an error if RNA Structs are freed with a python pointer set to help with debugging leaks.
- fix for unlikely eternal loop in unit conversion.
2009-08-14 12:29:55 +00:00
4bbccd39bc 2.5 - Assorted Animation UI Tweaks
* Fixed padding for Graph Editor visibility toggles
* Reverted many of the tweaks to Timeline UI for now (for the reasons outlined in earlier mail)
* NLA Editor now (mostly) uses the new channel-drawing API
2009-08-14 11:09:19 +00:00
c6e041f125 2.5/Paint modes:
* Moved brush curve preset operator out of sculpt to paint_utils
* Added a button to the curve panel to set the preset
2009-08-14 04:45:29 +00:00
d426676f79 2.5/Multires:
Bugfixes

* Don't allow multires subdivision in editmode, this leads to corruption as noted by nudelZ. Reason is that editmode has its own copy of the MDisps customdata layer, gets written back out on exiting editmode, but the layer that was subdivided was the non-editmode original.
* Missed clearing a couple variables, caught with valgrind.
2009-08-14 01:48:05 +00:00
9a654aa8de Clean some whitespace. 2009-08-14 00:32:29 +00:00
f04da8e7f5 Changed to able compile libsamplerate properly 2009-08-14 00:14:20 +00:00
ec00cec3e8 2.5 Timeline:
* Added some menus and buttons. Still uncommented.
2009-08-13 22:10:50 +00:00
3671a420c6 Smoke: bugfix - tray, not tvox 2009-08-13 21:30:48 +00:00
4fb59f6565 Smoke: no lamp results in no shading (requested by nudelZ) 2009-08-13 21:29:05 +00:00
972224b9e1 2.5/Sculpt:
* Moved the brush texture settings to MTex/TextureSlot. The mapping settings now show up in the texture panel, pretty much like they do for textures used with materials.

TODO:
* Tiled mode should not show Z size setting
* Add a locked mode so that texture size can be changed uniformly like in 2.4x
2009-08-13 20:05:36 +00:00
75af1a7f9e MSVC compile fix.
* replaced snprintf with BLI_snprintf 
* in unit.c used the #define hack used in several places already to avoid adding additional dependency.
2009-08-13 18:26:15 +00:00
52a6a07d67 added string max length option for unit functions bUnit_AsString and bUnit_ReplaceString 2009-08-13 17:05:27 +00:00
e8d9e0823e 2.5 Timeline:
WIP Commit, still uncommented.
* Adeed some RNA properties for Playback.
* Start of Python File.
2009-08-13 16:59:52 +00:00
94d359c9bc Some changes to smoke ui (path by nudelZ) - this divides the panel in normal and advanced options 2009-08-13 14:27:35 +00:00
79a928682c 2.5 - Fix for segfaults with entering text in normal number buttons (i.e. frame buttons in timeline header). 2009-08-13 11:54:12 +00:00
5a3bd23e8e Accidentally made the game collision bounds panel display itself when Blender Render was selected as the renderer. 2009-08-13 09:30:36 +00:00
d916c25616 - moved unit settings from user prefs into the scene.
- use the scene context for the unit settings since there isn't a better place for it currently.
- added 'chain' to imperial units
- set more rna props to be distances and angles.
2009-08-13 07:37:41 +00:00
127f19cac4 2.5 - Assorted cleanups
* Silencing some compiler warnings
* Set paths for Scene rendering settings so that they can be animated (or at least won't produce error warnings)
2009-08-13 07:28:51 +00:00
5a21bc578c * First commit merging 2.4-based sim_physics in to volume25 branch.
Integration is still very rough around the edges and WIP, but it works, and can render smoke (using new Smoke format in Voxel Data texture) --> http://vimeo.com/6030983

More to come, but this makes things much easier to work on for me :)
2009-08-13 05:21:25 +00:00
44ca632ce7 Added game soft body settings, and cleaned up layout there slightly.
Also converted some other percentage properties to use sliders, and a few other small layout tweaks.
2009-08-12 22:16:47 +00:00
Nathan Letwory
78c2330550 * fixing linking flag form. 2009-08-12 18:12:33 +00:00
92cfad965d 2.5 MSVC 9 projectfiles maintenance
* rev. 22367: splitting of anim_channels.c
* rev. 22383: units.c in blenkernel added
* Fix include paths was intern/audaspace, code expected intern/audaspace/intern
2009-08-12 18:06:30 +00:00
3757bb4a4f Mistake in previous commit. 2009-08-12 17:41:03 +00:00
15e617f2a9 Smoke: accidentally left some old code in 2009-08-12 17:39:38 +00:00
bba9c797b5 Various fixes:
- Correct fix for file loading crash introduced by earlier point cache commit.
- Simulations are no longer calculated to current frame at render time automatically.
	* This has to be thought through more carefully at some point, perhaps through render profiles.
	* All simulations can be updated manually to current frame from any cache panel with the "update all to current frame" button.
- Some explanatory comments added for BKE_pointcache.h.
2009-08-12 17:39:11 +00:00
fb7c9d5a0d Smoke:
* New feature: "Dissolve Smoke" - Idea by nudelZ
2009-08-12 17:32:02 +00:00
b8fcda9ea5 unit grid snap while transforming, display units in the header. 2009-08-12 17:02:03 +00:00
a86aa8c34b Edited timeline header layout slightly.
-Made the 'PR' button not align itself to the start/end frame fields, as this makes for a nicer visual rounding of those two numbers.
-Made current frame indicator longer, to allow for display of higher frame numbers
-Removed the auto-keyframe dropdown menu. This exists as a preference, and doesn't need to take up space here. This is not something you're likely to change much after all.
-Made the keying sets menu stay put in the UI. It was moving about depending on what options are selected to the left of it. This sort of moving around should be avoided as much as possible.
-Swapped Add/Delete keyframe buttons. It's more intuitive to have the add key button first.
2009-08-12 15:55:15 +00:00
7ca23e0ef6 Put back sequencer type icons, and moved the type menu, separating it from the menus. 2009-08-12 14:39:57 +00:00
7ffbaa6631 Sequencer UI layout tweaks.
There was a mix in the layout of these panels; some were single column, some dual column. All these n-key sidebars seem to work best with single column layouts to minimize wasted space, so made all the panels fit that paradigm.

Also included a bunch of labels and a bit of layout cleanup.
2009-08-12 14:21:43 +00:00
45ba3d31c0 when units are enabled use them for 3d viewport grid drawing, display the dimension for the smallest grid cell.
still need to make this work with grid snapping.
2009-08-12 14:11:53 +00:00
fcf883ecf9 2.5
Removed BKE_ptcache_ids_from_object() from readfile.c do_versions,
this cannot work... IDs are not set for versioning. Will need to go
over this with janne what he actually wants to achieve here...

This solves crash on startup of Blender. Tsk!
2009-08-12 13:07:12 +00:00
020ee171b7 * osx cmake libsamplerate fix 2009-08-12 12:17:41 +00:00
3a1da2219d Reverting "fix" - didnt fix crash at all.
jahka: please take a look at this, several people in #blendercoders now reporting crashes on startup.
2009-08-12 12:15:45 +00:00
64dba1596d Particles: should fix crash on startup 2009-08-12 11:12:20 +00:00
65a54eedd4 2.5
Bad commenting in header file.
2009-08-12 10:38:35 +00:00
b221c0e2e6 New point cache file format:
- HEADER (beginning of each file)
	* general header:
		+ 8 char: "BPHYSICS"
		+ 1 int: simulation type (same as PTCacheID->type)
	* custom header (same for sb, particles and cloth, but can be different for new dynamics)
		+ 1 int: totpoint (number of points)
		+ 1 int: data_types (bit flags for what the stored data is)
- DATA (directly after header)
	*totpoint times the data as specified in data_types flags

- simulation type
	soft body = 0, particles = 1, cloth = 2
- data types (more can be added easily when needed)
	data		flag		contains
	----------------------------------------
	index		(1<<0)		1 int	(index of current point)
	location	(1<<1)		3 float
	velocity	(1<<2)		3 float
	rotation	(1<<3)		4 float	(quaternion)
	avelocity 	(1<<4)		3 float	(used for particles)
	xconst		(1<<4)		3 float	(used for cloth)
	size		(1<<5)		1 float
	times		(1<<6)		3 float (birth, die & lifetime of particle)
	boids		(1<<7)		1 BoidData
	
Notes:
- Every frame is not nescessary since data is interpolated for the inbetween frames.
- For now every point is needed for every cached frame, the "index" data type is reserved for future usage.
- For loading external particle caches only "location" data is necessary, other needed values are determined from the given data.
- Non-dynamic data should be written into an info file if external usage is desired.
	* Info file is named as normal cache files, but with frame number 0;
	* "Non-dynamic" means data such as particle times.
	* Written automatically when baking to disk so basically a library of particle simulations should be possible.
- Old disk cache format is supported for reading, so pre 2.5 files shouldn't break. However old style memory cache (added during 2.5 development) is not supported. To keep memory cached simulations convert the cache to disk cache before svn update and save the blend.
- External sb and cloth caches should be perfectly possible, but due to lack of testing these are not yet enabled in ui.
	
Other changes:
- Multiple point caches per dynamics system.
	* In the future these will hopefully be nla editable etc, but for now things are simple and the current (selected) point cache is used.
	* Changing the amount of cached points (for example particle count) is allowed, but might not give correct results if multiple caches are present.
- Generalization of point cache baking etc operator & rna code.
- Comb brushing particle hair didn't work smoothly.
2009-08-12 09:54:29 +00:00
8641833b57 Set the clickstep for unit buttons to each click moves 1 unit. 2009-08-12 08:16:10 +00:00
63b276efbf - was displaying 1cm as 10mm because of double precission problem.
- typing in numbers without any units will use the units displayed before editing the value.
- fixed some errors
2009-08-12 07:23:10 +00:00
d1085715a3 fix for errors evaluating user input when units are disabled 2009-08-12 05:53:12 +00:00
23e0571853 added time units, currently only used when metric or imperial are enabled.
long/short units...
day,d,  hour,hr,h,  minute,min,m, second,sec,s,  millisecond,ms,  microsecond,us

Also may fix some bugs that were reported.

Note, to convert fps to time evil_C needs to be used to get the scene.
2009-08-12 05:20:16 +00:00
c77e556b23 - missing a decref for new pytypes
- remove needless strlen
2009-08-11 19:20:31 +00:00
b2a77852ff user interface units, off by default.
- currently only distances work.
- user preferences, edit section to set the units and scale.
- option to display pairs (nicer for imperial display?)
- support for evaluating multiple comma separated values eg: 2',11" ..or.. 5ft, 4mil
- comma separated expressions/values accumulate 1+1,2**3,4cm/3
- attempted fast conversion from a value to a string so button drawing isn't too slow.

* imperial long/short *
- mile, mi
- yard, yd
- foot, '
- inch, "
- thou, mil

* metric long/short *
kilometer, km
meter, m
centimeter, cm
millimeter, mm
micrometer, um
nanometer, nm
picometer, pm
2009-08-11 18:53:01 +00:00
3ba949b050 Added libsamplerate.a in Makefile
The structure for names where this lib is could need fix... 
will need feedback from other make users.

Also Python lib in svn is wrong, intel lib???
2009-08-11 18:39:27 +00:00
cf23d1948f 2.5: User Preferences:
* Code cleanup. Note: This file doesn't follow the UI code guidelines due to some more complex layout structure. 
Will think about this special case.

* Added new Sound Options into the System settings.
2009-08-11 18:19:09 +00:00
d8dc1b9fd4 2.5
Makefiles to get new AUD stuff to compile (OSX 10.3 PPC)
It uses lib/samplerate, which gets committed soon too
2009-08-11 18:14:49 +00:00
75fe900c9c SVN maintenance. 2009-08-11 17:51:45 +00:00
58ba4ce011 Fix for batch mode. 2009-08-11 13:07:24 +00:00
9ea24f887c Smoke: fix problem with more than 1 domain + collision and flow groups - reported by nudelZ aka "Master of Smoke" 2009-08-11 12:01:36 +00:00
b9584607c5 Animation Editors: Code Cleanup Part 1 - Drawing
Finally started refactoring the drawing code for animation editors so that all the drawing (of the channels/names list) is done using standardised code for all the editors. 

A little specialised system for this has been made, and is now used for DopeSheet and Graph Editor drawing. This should make it easier to add new channel types with less effort.

Protect/mute toggles are now always clamped to the right-hand edge of the channels list. So you can now make the list wider to view longer names fully. However, since the mouse-handling hasn't been fixed yet, this won't always work.

TODOs:
* make mouse-click handling code use this system too, simplifying things to 1-2 lines of code there. Maybe this could be made to use UI widgets instead at a later date?
* NLA still needs to be ported to this system
2009-08-11 11:52:23 +00:00
911078aaad fix for using subtype units that are not defined as a part of types. eg.
prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
2009-08-11 11:50:40 +00:00
e49ad2e148 Fix a bug in Ghost causing crash on Blender exit. 2009-08-11 11:44:45 +00:00
1d63cacfe4 fixed mistake made when changing rna prop definition functions, made povray custom props fail. 2009-08-11 02:27:25 +00:00
578000b2ca MSVC project files: removed SoundSystem completely 2009-08-10 21:53:19 +00:00
86ef13c0a0 UNTESTED: Fixes for cmake on apple; libsamplerate and ffmpeg. 2009-08-10 21:48:17 +00:00
f6682ab773 RNA: subtypes and units
* Reviewed subtypes, making them more specific and adding new ones.
* Subtypes now have an associated type of units (length, area, volume,
  mass, rotation, time, velocity, acceleration). These are not used
  yet anywhere.
* Centralized code that decides the name of array items based on
  subtype (XYZ, RGB), was copied in 3 places.
* RNA_def_float etc functions still need to be update, will do this
  later together with another change.
2009-08-10 21:31:05 +00:00
6e5b78a277 RNA: make curve and metaball update functions consistent with
others, these cannot assume the existence of an edit object
or active object.
2009-08-10 21:10:09 +00:00
8dd523a154 2.5: Fixes
* Disable shaded mode for now, it cause too many crashes combined
  with preview render, will be fixed properly later.
* Make 3d view toolbar region a bit wider. Ideally this would not
  be needed, but the sculpt/paint buttons just don't fit otherwise.
* Revert change to icon/text spacing in buttons, it breaks text
  editing and clipping. Will properly fix this later so changing
  the spacing can be done centrally.
* Fix for grease pencil simplify stroke python error. Now button
  is hidden (as in 2.4), but still available through outliner.
* Fix for memory leak in UI code, when using ctrl+Q menu.
* Fix submenu > icon being drawn on some buttons where it was not
  needed.
2009-08-10 20:57:12 +00:00
24b7d90e95 2.5: UI, tweaks to curve mapping template to fit better
in 3d view panel, and resize properly.
2009-08-10 20:48:38 +00:00
0b2324f679 2.5: Small optimization in color management code to avoid doing
computation with doubles instead of floats, about 2x faster.
2009-08-10 20:17:11 +00:00
690e117ed3 Copy all the .h so sequencer_add.c does not fail. 2009-08-10 19:51:37 +00:00
d118d7e017 Update Makefile for audaspace. 2009-08-10 19:41:34 +00:00
2a58c84018 Stop changing the includes! 2009-08-10 19:22:50 +00:00
c2239abdbd MSVC project files: add audaspace project, upgrade to Python 3.1 2009-08-10 18:36:12 +00:00
22dd40f8ab Add missing include dir to Makefile 2009-08-10 18:18:15 +00:00
43ecb741e1 Remove hardcoded path in include.
IMPORTANT: use compiler include paths to point to the file.
2009-08-10 18:01:19 +00:00
80ddb02180 Sculpt/2.5:
* Fixed clay brush to work more like the original patch. It should now correctly limit the depth being added or subtracted.
2009-08-10 16:52:29 +00:00
a27cc1adf0 2.5 audio cleanup:
* Removed CD Actuator
* Removed bSample and bSoundListener
* Removed SoundSystem
* Removed -noaudio parameter
2009-08-10 15:39:11 +00:00
cb9e51bf8a missing include for fluid 2009-08-10 14:15:05 +00:00
f1c69e9d84 Smoke:
* bugfix for crash when loading smoke files more once on linux/mac
* could also fix occasional explosions
* code cleanup
2009-08-10 14:09:56 +00:00
eafef35cd8 patch from Stukfruit in IRC 2009-08-10 13:21:01 +00:00
90e2ffd538 IK constraint and armature modifier layout tweaks 2009-08-10 12:17:12 +00:00
6c951fbb98 adding back button evaluation so you can do 1/60, 90*0.1 etc as well as dimension conversion 1km-10cm+4ft
Note...
- Python3.1 you don't need to add the .0 for divisions anymore (was esp annoying for button eval)
- Simple dimension input, imperial mi/yd/ft/in, metric km/m/cm/mm,  Later could display these values and have a pref for scene scale, atm it assumes 1BU == 1m.
2009-08-10 11:58:53 +00:00
7084be920a fix for build problem with audiospace and implicit declaration. 2009-08-10 04:50:48 +00:00
335b74a714 Change linux makefiles to use system wide python lib. 2009-08-10 02:43:03 +00:00
de759dd278 Wrap message with " as the ' was giving issues. 2009-08-10 02:07:34 +00:00
5fddab3fd8 Add initial support in Makefiles for audaspace.
Note: removed hardcoded path in include directive. Check other build systems.
2009-08-10 01:56:54 +00:00
7440fee85c remove python2.x support 2009-08-10 00:07:34 +00:00
f71ef08744 Add missing include paths. 2009-08-09 23:31:16 +00:00
1b34950160 SVN maintenance. 2009-08-09 23:23:19 +00:00
8512b30d31 fix crash caused by stroke selection 2009-08-09 22:22:40 +00:00
6c5c58e057 2.5: Sound branch merge!
See mailing list for additional information.
2009-08-09 21:16:39 +00:00
c1ca2ab5dc Sculpt/2.5:
* Added toolbar UI for setting "anchored" mode
* Added a "persistent" mode for the layer brush; basically you can keep sculpting on the same layer between strokes when this is on. There's a button to reset the base so you can add another layer on top of that, and so on.
This feature was suggested by Blenderer on BA, thanks!

Note, I think these options could use better names in the UI, but I couldn't really think of anything very descriptive, suggestions welcome
2009-08-09 17:21:40 +00:00
b58083ea55 smoke: fix fft not working 2009-08-09 15:04:31 +00:00
9e1b2d0cdb fftw + smoke: fifxing define (making it work with scons) 2009-08-09 14:13:33 +00:00
2a408c864f - fix error in last commit
- added better error feedback when registering operators fails.
- added some python benchmark timers (prints on exit), times number of times py scripts run, average time and total % of time running py scripts.
2009-08-09 13:20:12 +00:00
21302619f8 fftw: fixing mac linking name 2009-08-09 12:52:59 +00:00
07bd579fc1 Smoke: little fix to ui 2009-08-09 12:50:39 +00:00
5256def6f5 fftw3 scons: hopefully fixing indent error 2009-08-09 11:02:47 +00:00
054ed5a50b Smoke:
* WITH_BF_FFTW3 flag --> fftw3 scons + cmake settings refined. 
* Disabled by default since mac + win32 libs missing. Works already on win64 + linux (with installed fftw3 libs)
2009-08-09 10:55:25 +00:00
a4755dcf2b - report errors on rna name collisions (does not check parent type yet)
- minor cleanup for Py/C api functions that define rna properties from python.
2009-08-09 10:05:33 +00:00
d53e82cbca povray integration
- declare materials and reference them later
- support ray-transp filter setting
- blobs pigment wasn't working right
2009-08-09 07:09:32 +00:00
d48ca69985 Smoke: decoupling of wavelet #2, new noise strength option on gui, fftw3 option in place for cmake, scons yet uncommited 2009-08-09 01:30:32 +00:00
18121524dd Smoke: fixing collision objects again (bug introduced in decoupling commit) - thanks to nudelZ for reporting 2009-08-08 20:41:44 +00:00
c4c0753dcc 2.5 Button Files:
* Cleanup of smoke and texture files to match guidelines. 
* Made "Curve" Panel in Toolbar Closed per default.
2009-08-08 17:21:34 +00:00
e213d4078b Improved layout of voronoi texture. There was some strange empty space. 2009-08-08 14:17:55 +00:00
039d4d427b 2.5 3D View Toolbar:
Brush Panel:
* Separated the code for different modes, easier to maintain.
* Only settings which are used in the current paint mode are shown now.
2009-08-07 19:16:59 +00:00
0ce86b0a76 Added material game physics options in RNA and layout.
Thanks to the new render API system these options don't clutter up the layout when you're not doing games.
2009-08-07 19:14:49 +00:00
70f011bbce bpy_context_set and bpy_context_clear to replace a number of functions (some were not always called causing bugs).
fix for a leak when trying to run a text with a syntax error too.
2009-08-07 16:20:19 +00:00
ce273aee08 smoke:
- Bugfix: a bit too fast ;-) Better do it right too (problem with res > 150)
- fixing high res view button which disappeared sometimes
- fixing tooltip
2009-08-07 13:19:17 +00:00
1311b2f78b 2.5: 3D View Toolbar:
* Added some greying out and hiding for disabled/non available settings.
* Some layout tweaks.
* Added "Flip Direction" for Sculpt, this is the "Add, Sub" Option from 2.49, this time as a boolean. Off = Add, On, Sub.
2009-08-07 09:45:48 +00:00
db0b490e29 fix for crash while appending data. (missing NULL check for newlibadr return value) 2009-08-07 05:25:17 +00:00
bc093b4cc4 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22205:22290 2009-08-07 04:41:15 +00:00
e7c53e20a1 gameObject -> blenderObject mapping was being created but wasnt needed.
Added utility func tag_main for (un)tagging every ID in a Main database with LIB_DOIT.
2009-08-07 03:51:28 +00:00
Dalai Felinto
77d79ffb5d BGE: removing remaining reference to sce->world->gravity/physics/... (it's all in sce->gm now) + Dome UI changes
UI changes: splitting dome options for different dome modes (eg angle doesn't work for envmap mode)
if anyone wants to tweak that, feel free to do it.

* I put a remaining to bring setEyeSeparation + Focal Length to the Stereo GUI. I'm still not sure what would be the default parameters for that, and that will require other changes (eg remove the flag m_setfocallength and m_seteyesep). For so far only a label remind :)
2009-08-07 03:06:32 +00:00
7c8c83f30d Smoke: test commit of PCG 2009-08-07 01:07:45 +00:00
917fce65a6 Povray
* Sun lamp type export (known as parallel lights in povray)
* Native support for blenders metaballs, currently exports
 - ball and ellipsoid types
 - radius, stiffness
 - ellipsoid xyz scale
 - negative elements
 - single material (like blender)

Renamed rna props.
 elem.sizex -> size_x
 mball.last_selected_element ->  mball.active_element

minor changes to UI scripts.
2009-08-07 01:05:33 +00:00
0ac90cabe1 2.5 Mesh Draw Options: [WIP]
* Added RNA for Mesh Draw Options.
* Added "Draw" Options into the Mesh Data Tab, needs check for Edit Mode.

* Fixed a typo in DNA.
2009-08-06 23:34:14 +00:00
042fe910aa - fix for a crash in readfile.c, thanks Roelf for finding.
- add media option for povray
- remove unintentional line from modifier script
2009-08-06 23:19:05 +00:00
85c343c049 Smoke: another 10-20% speed gain due to CG (conjugate gradient) improvements 2009-08-06 22:28:55 +00:00
a791cfc5d3 [#19206] Fix MD2 Vertex Normal Export
from Calvin Loncaric (marvinx03)

[#18965] Blender Load and Run need fully qualified specs
[#18966] getMaterials not used
from Roger Wickes (roger)
2009-08-06 22:24:14 +00:00
85d75077a6 [#19035] New Python command to set the active flag of Armature Bones
from Ivo Grigull (loolarge)

Removed redraw calls from the python function, added epydocs.
2009-08-06 22:11:33 +00:00
cb7ebe5879 osx scons/ffmpeg tweaks
* options to enable building with precompiled ffmpeg (in /lib) rather than building from source in extern - this is off by default since I haven't compiled ffmpeg for ppc yet

* tweaks to enable building ffmpeg on osx better out of the box (still need to install yasm with these options on though..)
2009-08-06 22:06:11 +00:00
d5f51f5019 Cleanup a little to add "draw to buffer" (and bring back stamp). 2009-08-06 20:51:41 +00:00
74b3681532 Remove bitmap mode from blenfont, only draw with textures.
As Joe point on a previous mail, glBitmap don't work nice
on all cards and also some of the things that we can do
with texture are hard (or need that blender check the font mode)
to implement.
2009-08-06 20:06:02 +00:00
e84e6664c2 -Use getattr() now for constraints too. :)
-Deleted old Buttons C code for RIGIDBODYJOINT constraint.
-"Realtime" Icon for Modifer was different in Template and RNA, i changed the Icon in RNA to match the template version, which is an eye instead of a cube.
2009-08-06 18:31:25 +00:00
6b7e9336f0 Smoke: forgot ui redraw event 2009-08-06 17:00:37 +00:00
2fd0263602 smoke: decoupling high-res, introducing reset for heat+gravity, fixing another obstacle problem 2009-08-06 16:50:02 +00:00
65cf500fdc smoke gui: refining the new simulation panel ui
(thanks to nudelZ for this patch)
2009-08-06 15:55:42 +00:00
f10647e203 2.5 Smoke:
Moved the Smoke Buttons into the Physic Tab.
2009-08-06 14:23:48 +00:00
d608d33583 output the origin for each map node.
thanks to j michaelson for the patch
2009-08-06 13:30:23 +00:00
07ed542187 pedantic changes to python UI scripts
- SOFTBODY -> SOFT_BODY
- Use getattr() with enum value to get the modifier function rather then a lot of elif's
2009-08-06 13:15:23 +00:00
Nathan Letwory
9eff68a9e9 * further cleanup of windows defaults for openal 2009-08-06 13:01:24 +00:00
c443f0161b added a 'repeat' option to vertex smooth in the main 2.5 branch. 2009-08-06 12:34:48 +00:00
Nathan Letwory
1e4fb48400 * update windows default config for the openal updates, merging r22241 from soundsystem branch 2009-08-06 08:23:07 +00:00
Nathan Letwory
6f1ec5e3b9 * merge r22237 (from soundsystem branch) to have b25 still compile against new openal on windows.
NOTE: Windows users should update lib/windows/openal from SVN.
2009-08-06 08:04:35 +00:00
Nathan Letwory
5763746af7 copy openal dlls 2009-08-05 15:21:10 +00:00
Nathan Letwory
3af26a09e9 copy openal dlls 2009-08-05 15:19:02 +00:00
acd02148d8 Update for new OpenAL windows library. 2009-08-05 14:10:29 +00:00
8aa3383408 fix for ghost memory leaks
- ghost data wasn't being freed (added wm_ghost_exit() call to wm_init_exit.c)
- GHOST_EventManager wasn't freeing GHOST_IEventConsumer's
- ghost/X11 wasnt calling XCloseDisplay(), some junk from X11 wasnt being freed
- ghost/X11 XAllocNamedColor wasn't freeing the colors when done making a custom cursor.
2009-08-05 02:40:51 +00:00
64ba7c1303 fix for writing to freed memory in cases where python wasn't holding a reference to the PyObject 2009-08-04 22:59:50 +00:00
2a999890fb NLA - Quick patch bugfix
When there were no strips but some empty tracks, the active action should be evaluated normally. This is not an optimal solution (more user testing + suggestions regarding the best way to do this is welcome).
2009-08-04 10:31:25 +00:00
610d9348f5 - allow changing game engine physics types in RNA
- allow appending with a NULL scene (only used to add object bases into the current scene)
2009-08-04 09:20:48 +00:00
9bb8540ba9 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22130:22205 2009-08-04 05:34:21 +00:00
856dba000b no need to store the physics env in each KX_GameObject 2009-08-04 05:14:10 +00:00
59bfe91f21 remove makefile cruft, mostly BGE related references to SUMO, Fuzzics, Blenkey etc.
also remove define MOZ_NOT_NET that was being used all over for telling the plugin to link against mozilla (not netscape)
2009-08-04 03:13:36 +00:00
Nathan Letwory
d595f6f203 * apparently I forgot to update this one for the python zip copying business. Thanks to JMS for spotting. 2009-08-04 01:05:31 +00:00
e0f5764e4c Fix segfault on makesrna.
Call to RNA_def_property_update with a invalid pointer cause a segfault.
2009-08-03 18:44:01 +00:00
ee92957b36 Smoke: fix crash with collisions + flows 2009-08-03 16:39:12 +00:00
Nathan Letwory
7185303219 * add notifications for rna updates to curve. This gives realtime updates for curves in editmode. If someone knows how to get this to work for object mode too, that'd be great. 2009-08-03 15:06:56 +00:00
Dalai Felinto
f4bc2131c0 Ignoring BGE world setting from previously files.
* That also means you can't really change them and save it before we actually do a do_version.
* Marking the old variables in DNA_world_types.h to be removed.
2009-08-03 14:56:46 +00:00
Nathan Letwory
583fc3a2ac * copy python zips from new release location 2009-08-03 14:48:39 +00:00
e9c1550432 2.5 MetaBalls and UI
* Added callback function for some metaball properties:
When some properties (wiresize, threshold, update flags) of metaball are changed, then these properties are copied to all metaballs in the group (all metaballs with same base name). This is important to "share" some properties between metaballs, because polygonisation of metaball is influenced only by properties of base metaball and base metaball can be changed.
* Improved drawing of selected Metaball objects
2009-08-03 14:40:10 +00:00
adbae1d174 Renamed Subsurf > Subdivision Surface
Multires > Multiresolution

The term 'Subsurf' was really confusing, because of the similar term Subsurface Scattering, meaning something completely different. Additionally, the prefix 'sub' (meaning 'lower' or 'under'), as well as the word 'surf' (meaning water foam / a water sport) really mean completely different things on their own, making 'subsurf' a terrible abbreviation.
2009-08-03 13:46:45 +00:00
641c8e69a8 2.5 - MetaBalls are now animateable 2009-08-03 13:09:23 +00:00
cd905eef70 2.5 - Make Proxy Tweaks
* Drivers are now copied across and relinked as appropriate
* Drawtype is also copied now (especially useful for rigs)
2009-08-03 12:11:50 +00:00
28909178d9 2.5 - Make proxy operator works again now
Now it uses strings instead of pointers. Maybe the properties could still get some tweaks, but they work well enough for now.
2009-08-03 11:12:17 +00:00
9ae77b0eff UI tweaks
-Removed shadows from most UI items. The shadow settings are unfortunately not really useful, because you can't set them for individual items. There was a lot of black text with black shadows, which really only makes the text look fuzzy. For shadows to improve clarity, they should be the opposite color of the text label, not the same color.

-Tweaked material layout, with clearer grouping in Ray Mirror and Ray Transparency panels.

-Added icons in the texture type menu to signify which textures are procedural and which ones are images, and plugins.
2009-08-03 10:54:02 +00:00
acd4b4732b * Fix makefiles once more, change tabs to spaces 2009-08-03 05:21:13 +00:00
851fac055c * unzip osx python modules on make release, too 2009-08-03 04:55:32 +00:00
4ee4dc355c Fix access to MEM_CacheLimiterC-Api.h. 2009-08-03 01:24:55 +00:00
8d3b3780d0 * small fix for python versions 2009-08-03 00:58:50 +00:00
1517ef9d9e changed makefile defaults to point to py3.1 for linux/bsd/openbsd/windows (probably nobody uses makefiles on win32 anymore) 2009-08-03 00:44:42 +00:00
95e08f6bff * remove unused member of KX_Scene - m_objecttree
* implicit declaration of getenv in glutil.c
2009-08-02 23:53:53 +00:00
9a8b01218f 2.5 - Bones with "Euler" rotations can now have their rotation keyframed properly using built-in keyingsets (i.e. the IKEY menu in 3D-View) 2009-08-02 23:31:18 +00:00
262a76812e Smoke:
a) fixing domain boundaries
b) fixing flow gui (no more velocity there - taken from particles)
c) Outflow available (deletes smoke from scene)
d) deactivating other noise options for now
e) base for render/preview settings 
f) fixing collisions to be working again
2009-08-02 23:30:44 +00:00
eff8e107fe == Sequencer ==
This brings back sequencer rendering, moving do_render_seq() into the
pipeline where it belongs.

Things to fix: SCENE-strip rendering and memory cleanup for
SCENE-strips.

Otherwise: enjoy :)
2009-08-02 23:02:59 +00:00
e05474d52f Graph Editor Bugfixes:
* Tools such as set handle type, etc. were not being called correctly from the menus. There were missing operator-context calls to make sure that the invoke methods would get skipped.

* Hack for loading old files - buttons region for Graph Editor now gets added. Dunno why this didn't work automatically as for NLA despite the two having the same code.
2009-08-02 22:56:42 +00:00
05a97747dc Small tweaks to scene buttons (checkboxes in the right column) 2009-08-02 21:46:35 +00:00
ee11ca62bd Smoke: 2 preview fixes
a) take first position lamp into accountn for smoke ligthning (still no realtime shading when you move the lamp - you have to simulate another frame for now)
b) fix front/back "looking throurgh" issue by reordering the billboards
2009-08-02 19:40:25 +00:00
dc75023f6f Softbody now uses the new pointcache code.
Note: Rna access to softbody point cache is through softbody modifier although the point cache is in softbody settings. This is to make it similar to cloth.

Bugfix: Softbody rna was trying to get "ob->soft->softflag" instead of the correct "ob->softflag".
2009-08-02 19:39:33 +00:00
7b123ff13c Smoke: (hopefully) fix collision high-res smoke disappearance 2009-08-02 18:32:56 +00:00
08d4b96317 2.5 3DView:
* Removed redundant color picker panels from the Properties Panel.
* Deleted some old C Buttons Code. (Background Image, Weight Paint, View and the Color pickers.)
* Added missing Particle Mode Buttons into the Toolbar. They need a check if the system is editable or not. 
* Pose Mode Panels in Toolbar were not working due to wrong context. Fixed.
2009-08-02 16:44:32 +00:00
900c61f062 Smoke: fixing 8MB memleak 2009-08-02 15:57:19 +00:00
81146e419c NLA Tweaks:
* "Pushing down" the action to make a new strip will now make the new strip the 'active' one. 

* 'Active Action' field in Animation Data panel is now editable as long as we aren't in "tweakmode"
2009-08-02 13:15:20 +00:00
1aa3885ef7 2.5 - Animation/RNA Bugfixes
* Settings for Bones can now be animated properly from UI
* Settings for constraints on bones and objects can now be keyframed properly
* Added missing 'subtarget' property wrapping for StretchTo constraint.
2009-08-02 12:52:02 +00:00
c5f0be6d99 Mistakingly removed check for old Python in material buttons in previous commit.
Added it back, plus some smaller layout tweaks.
2009-08-02 11:36:12 +00:00
8aae02bb84 2.5 - Animation Playback Tweaks
* Added some optimisations to avoid having to try evaluating some data that won't have any effect.

* Converted playback buttons in timeline header to use operators too
2009-08-02 11:05:13 +00:00
90f089e6b6 fix for crash in background mode. 2009-08-02 10:32:52 +00:00
0bbc1229b9 2.5 - Bugfixes
* Added operator for jumping to the start and end frames. Shift Up/Down
* Fixed bad spacing for buttons in Graph Editor header
2009-08-02 07:08:51 +00:00
a0e252c25f NaN makefiles now support and build with precompiled Python 3.1 by default on Mac 2009-08-02 06:22:53 +00:00
24d1cf7d54 Animato - Bugfixes for ShapeKeys + ShapeKey Drivers
* Animated ShapeKey F-Curves/Drivers are now visible in the Animation Editors. 

* As a result of this, the old 'ShapeKeys' mode (which would display all the shapekey channels, even if they had no keyframes yet) in the DopeSheet, no longer works for now. However, it would have been of no use as no sliders were shown anyway.

* Drivers which depended on the rotation of bones now work again. These now point to the right RNA properties, and get some extra 'time' corrections (for degrees -> radians change).
2009-08-02 06:10:24 +00:00
de36dd1e99 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22099:22130 2009-08-02 03:59:00 +00:00
f45dcf022d - X11 tablet was using uninitialized variables.
- Added BLENDER_FORCE_SWAPBUFFERS in help message.
2009-08-02 03:41:42 +00:00
dd2db3703f 2.5 - Fixes for crashes when moving keyframes in F-Curve channels 2009-08-02 03:15:24 +00:00
41b72408a9 Added ramp input and blend settings in RNA and layouts. 2009-08-02 01:00:15 +00:00
a9da1fc0e8 remove own postscript font loading code (rely on freetype now) 2009-08-01 22:33:18 +00:00
0045a70d96 Allow users enabling workaround for menus with some Mesa3D drivers.
Define the env var BLENDER_FORCE_SWAPBUFFERS to enable (1, yes, oui, the
value does not matter, code just checks for existence).

The issue seems to happen with Intel and Radeon, but enabling myswapbuffers()
hack solves it (or reduces to just flicker) for now.
https://bugs.freedesktop.org/show_bug.cgi?id=21774

Reported by Philippe Van Hecke.
2009-08-01 22:23:57 +00:00
2c642d1373 Further improved shape keys UI.
Made value slider stretch to the entire width of the panel, useful for added precision. 

Also used greying out when shapes are locked.
2009-08-01 17:50:51 +00:00
7355cff68b 2.5 Object Force RNA:
* Added RNA properties for Bullet Softbody. 
Only RNAified properties which are used in 2.49a GUI.
2009-08-01 10:36:05 +00:00
b6abeca2fe Update MSVC projects files 2009-08-01 10:13:32 +00:00
6a6a69abb1 2.5 Background Image:
* Replaced NC_OBJECT with NC_WINDOW notifier.
2009-08-01 09:39:58 +00:00
41a0bfaf7c sizeof() was being used incorrectly to clear X11 m_keyboard_vector, would only have 4-8 bytes cleared rather then 32.
fix for harmless memleak too.
2009-08-01 09:07:45 +00:00
e60138117c - Ancient resource leak (rev 2) where checkPackedFile would open a file and never close it.
- Running simulations missed freeing some variables.
2009-08-01 06:27:40 +00:00
78bbe5c479 2.5 - Giving shapekeys UI a bit of attention
* Separated value and range sliders for the value into two separate rows. Value comes before the range settings since it's used more often, and is drawn as a slider instead.

* Tweaked ranges for the sliders so that they will work sanely.
2009-08-01 06:03:08 +00:00
dc90e758b4 2.5 - More tweaks to realtime record
* New NLA Tracks/Strips are now only created if the 'layered' button (visible in the timeline header when autokeying is on, and the playback is running) is enabled. This multiple bones to be able to be animated in the same action, but done in multiple passes.

* Made Alt-A work in timeline header too.
2009-08-01 05:10:57 +00:00
c1438a57db tweaks for linking openEXR on osx/ppc - previous switch per cpu architecture was unnecessary and broke compilation 2009-08-01 01:39:10 +00:00
0b3fd395ef svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r22075:22099 2009-07-31 23:42:22 +00:00
0949d48d25 missed this line in last commit 2009-07-31 23:15:00 +00:00
fe850bd163 Changed texture layers list to display as a proper list. This makes the order clearer, and you can see names. The list always displays its full length though, because texture layers are pre-populated with all 18 texture layers. Would be nice if this was eventually more dynamic, resembling the way you add/remove material indices. 2009-07-31 16:19:26 +00:00
fb52042375 2.5 Field Panels:
* Attempt to make it a bit more consistent. ;-)
2009-07-31 15:36:14 +00:00
50ea547176 Fields UI: Several attempts to follow UI guide and other things leaded to a really confusing UI (on the left):
http://666kb.com/i/bb49zl2t6ojvk7tax.png
We tried now to connect top-down with left-right, having top-down for the big picture (like already used in textures panel).
Other fields still missing. Approved by William, another small fix ("type" in one row) suggested by DingTo (not visible in the screenshot).
2009-07-31 14:38:42 +00:00
a0c22badc1 Bug fix in low value setting. Originally checked against the wrong channel (chroma) instead of the luminence channel.
Changed default value for high value to 1.0 from 0.0.
2009-07-31 12:51:18 +00:00
b7d11a5eef Tiny tweaks to modifier template. Added more logical icons for enabling modifiers in edit mode etc. 2009-07-31 10:21:29 +00:00
3eb8000eb4 remove more unneeded args, also allow ipo to animate the ref value for KX_BlenderMaterial's 2009-07-31 09:05:13 +00:00
65cb64665a 2.5
Check for old py in UI scripts. Temp fix that'll go when the move
to Py 3.1 is definite! :)
2009-07-31 08:07:41 +00:00
a1eef5bb4d Animato - NLA + Realtime Animating Goodies
* When doing realtime recording of animation (i.e. transforming objects + bones while animation playback is running, and auto-keying is enabled), animation will be added to a new NLA Track+Strip combo everytime a single 'loop' of the frame range has finished. This will allow 'passes' over the animation to be less destructive.

* Made the evaluation of the active action (when NLA data is present), be handled as part of the normal NLA system evaluation code (as if it were just another strip in a track at the end). The immediate benefit is that there are now some settings (available in the "Animation Data" panel in the NLA Editor with a strip selected) which allow for the way the active action is combined with the NLA stack results. For instance, the way that the action extrapolates is used in the recording tweaks above.
2009-07-31 07:43:47 +00:00
Dalai Felinto
6f847863a1 setting WITH_BF_PLAYER = False as default to scons
(temporary solution to avoid linking problem reports over and over and over and over ... again)

I obviously couldn't test this in all OS. If there is any problem with this commit please fell free to fix/let me know.
2009-07-31 02:35:56 +00:00
6aed229cc0 * Updated icon sheet, thanks jendryzch! 2009-07-31 02:16:07 +00:00
2a727083c9 fix for warnings and implicit declarations
also fixed smoke comparing a float's mem-location rather then its value.
2009-07-31 01:40:15 +00:00
c371f49d9a svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r21908:22075 2009-07-31 00:42:10 +00:00
b55e996874 Sculpt/2.5:
* Fix for bug reported by Brian Staub, sculpt on transformed objects wasn't working.
2009-07-30 22:24:05 +00:00
da4ab9b14b Smoke:
a) Crash fixed when loading files with smoke
b) changed presets to be more low-cpu friendly
c) smoke looks thicker

Unsolved:
a) 3dview of smoke changes weirdly when looking at front/back. Just move around a cube with smoke and you know what I mean - odd shading. If someone likes to take a look: draw_object.c -> search for "smoke" there
2009-07-30 22:11:28 +00:00
7301f33b26 remove some unused function args 2009-07-30 21:42:29 +00:00
9561d34dbb changes to defaults for sequencer strip adding 2009-07-30 20:22:55 +00:00
0d45058867 Smoke: compile error due to bad merged conflicts 2009-07-30 20:18:28 +00:00
dbba273371 Smoke: fixing some compile warning reported by Ton and one compile erro for gcc 4.4.1 reported by mrunion 2009-07-30 20:12:40 +00:00
1dbd47f4c3 wasnt building with gcc 4.4 2009-07-30 20:11:59 +00:00
fc9204b746 2.5 Background Image:
* Added notifier.
2009-07-30 19:19:21 +00:00
5eee72b092 2.5
Another Makefile fix for smoke
2009-07-30 18:41:36 +00:00
466435553f 2.5
Makefile fix to link smoke lib
2009-07-30 18:41:19 +00:00
d3fb4ec0b4 SVN maintenance. 2009-07-30 18:39:22 +00:00
a39192f243 Separated metaball size values, and hid inapplicable values depending on metaball type. 2009-07-30 18:32:20 +00:00
1c6cb51e65 2.5:
first step at adding Makefiles for smoke

NOTE: someone needs to add $(NAN_SMOKE)/lib/$(DEBUG_DIR)/libsmoke.a 
to source/Makefile to make it link
2009-07-30 18:19:46 +00:00
2f79219c07 2.5 Smoke:
* Put Smoke Modifier in the right alphabetical order in RNA and py file.
* Some small naming changes.

Commit approved by Genscher. :)
2009-07-30 16:38:00 +00:00
20819ddcc9 Smoke: forgot cmake file 2009-07-30 15:25:56 +00:00
8ddf8ff977 Blender Smoke credits:
Wavelet Turbulence for Fluid Simulation
Copyright 2008 Theodore Kim and Nils Thuerey 
Paper + Website: http://www.cs.cornell.edu/~tedkim/WTURB/
2009-07-30 15:17:41 +00:00
98d45c3da0 smoke: another fftw3 error fixed 2009-07-30 15:07:44 +00:00
accc2ab744 smoke: forgot to disable fftw3 noise function 2009-07-30 15:03:00 +00:00
58c88bcf76 BF2.5: First commit of smoke code.
Not working: 
a) rendering (since volumterics branch is not merged yet)
b) moving collision objects of any kind
c) saving of collision objects (because that's what I am working on)
d) pointcache
e) A bunch of other things I already know of 

So please do not report any bugs on this one yet :-)
2009-07-30 15:00:26 +00:00
1b26fe50c3 * More lamp tweaks, meant to commit this last night 2009-07-30 13:56:39 +00:00
224ec40e45 * Some nicer icons for the render still/ animation buttons 2009-07-30 13:35:32 +00:00
ec4904a9fe Support for povray radiosity settings, adjust in scene panel. 2009-07-30 11:05:45 +00:00
248fa8ec54 2.5 Buttons:
* Material buttons didn't import. Fixed.
* Removed Path label from Fluid panels.
2009-07-30 10:38:46 +00:00
13786ba621 2.5 - Tiny tweak to a tiny tweak for text padding (22039)
The second tweak made (for the case without an icon) was causing superfluous spacing all over the UI for things like checkboxes + combo-boxes + text widgets. This was quite ugly and gave readability issues with the checkboxes in particular.
2009-07-30 10:33:27 +00:00
d56466747d 2.5 Part 3 of Layout Code Cleanup:
* More cleanup to match new coding guidelines.
http://wiki.blender.org/index.php/Dev:Py/Blender2.5/Layouts/Guidelines

* Replaced some if's with proper elif's.
* Removed some unnecessary code.
Note: Please don't use inconsistent assign names like colsub, subcol1 etc. anymore!
2009-07-30 10:11:19 +00:00
249c5fcddc World UI
Cleaned up AO influence controls. These buttons had no labels, and were aligned strangely. Also made mist intensity a slider, since it's a percentage.
2009-07-30 08:30:57 +00:00
ade8f5197a Engine specific panel's
- All of this is in python and easy to change.
- each panel class has a set() of compatible engines.
- this set is checked for the poll function
- external engines can add themselves to this panels compatible engines
eg.
 buttons_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_RENDER')

I tried doing this by subclassing each panel and replacing only the poll function to reference 'POVRAY_RENDER' but it became fairly complicated and meant registering many of the same panels under different names.

Added mist support to povray.
2009-07-30 08:10:10 +00:00
61bd567071 * tiny tweak to icon/text padding in list ui templates 2009-07-30 03:26:33 +00:00
39ea55fff1 Operator Copy/Paste
you can copy operator strings from buttons or the reporting interface and run them in the console.

- Ctrl+C over an operator button copies its python string to the clipboard.
- Paste in the console (1 line only for now).
- operators run from python no longer require all arguments.
2009-07-30 01:52:00 +00:00
24a269a07c Move some sketching base code in kernel.
Other code will eventually move out of armature editor (to help reuse).

This solves the issue reported by Cambo on the ml about kernel code calling editor functions.
2009-07-30 01:39:42 +00:00
78b32ceeed switched file and dir by mistake 2009-07-30 00:46:48 +00:00
86cfc1966e better blender doesnt look idiot for siggraph with tips wider then the screen.
only show operator args in the tooltip that are different from the defaults.
2009-07-29 23:48:06 +00:00
5896233564 2.5: update .B.blend, to have 1:1 zoom levels for the buttons. 2009-07-29 23:21:57 +00:00
e5a668ea9b error in last comit 2009-07-29 23:18:18 +00:00
239b78c637 - include operator commands in tooltips (needs sanitizing for transform operators, there are massive :|)
- WM_operator_pystring can now be used with an operator type and properties (rather then a wmOperator instance)
- removed menus from file selector
2009-07-29 23:12:30 +00:00
408ba429e6 2.5: Buttons View
* When resizing the window, the top position is now preserved,
  instead of the center position.
* Fix zoom level not being preserved in various cases, when
  changing both with and height. This replaces some earlier code
  which did this at screen level but wasn't very reliable.
* Different tabs now each preserve their own scroll.
* When switching between tabs, it now scrolls to show as many
  buttons as possible, instead of possibly showing empty space.
  There is a trade-off here between doing that keeping the
  buttons in the same place, no ideal solution exists I think.
* Change zooming in/out to be symmetric, for example doing
  numpad + then - did not give the original zoom level back.
* Added some calls to avoid hanging tooltips when manipulating
  the view.

Internals:
* Added V2D_KEEPOFS_X and V2D_KEEPOFS_Y to keep the top/bottom
  rather than the center.
* Renamed V2D_KEEPZOOM to V2D_LIMITZOOM (seems more appropriate),
  and make V2D_KEEPZOOM preserve the zoom level.
2009-07-29 22:57:53 +00:00
2df1eeba0e Only show ~/Desktop/ if really exists. 2009-07-29 22:37:33 +00:00
80015c8867 2.5: File Browser on Unix
* Attempt to better filter file systems, it displayed all kinds
  of devices which are not interesting to the user. The trick
  used is now to use mounts starting with "/dev".
* Add / at the end to properly highlight directories in the list.
* Fix for non-linux unixes, this now falls back to showing / again.
2009-07-29 21:35:03 +00:00
992382ddb3 Even more metaball layout changes.
Added icons in menu, moved type setting at top of panel. Need to make the size widgets only show the relevant options.
2009-07-29 20:56:22 +00:00
49faf9011a 2.5 / Drag & Drop
Removed all related code. Talked with Ton about this and agreed to postpone it at indefinite time in the future, when things get more relaxed.
Files saved since my first commit should not break although I'm not 100% sure.
2009-07-29 20:51:05 +00:00
2621dd90e3 2.5 MetaBalls:
* Layout tweaks by nudelZ. Thanks!
2009-07-29 18:44:54 +00:00
da14738624 2.5
Two bugfixes, reported by Sebastian Skejo in IRC:

- File operator poll wasn't secure, search for it crashed
- Knife tool depends on having view3d context, fixed poll for it
2009-07-29 18:15:46 +00:00
785bf413f3 2.5
On 2nd thought: added back undopushes on every button use.
Operator re-use works with it now!
2009-07-29 18:04:35 +00:00
3d70e21c17 2.5
Makefile fix: added metaball.a lib
2009-07-29 18:03:25 +00:00
4a1266baad 2.5
Operator goodies!

--- Macro operators

Operators now can consist of multiple operators. Such a macro operator
is identical and behaves identical to other opererators. Macros can
also be constructed of macros even! Currently only hardcoded macros are
implemented, this to solve combined operators such as 'add duplicate' or
'extrude' (both want a transform appended).

Usage is simple:
- WM_operatortype_append_macro() : add new operatortype, name, flags
- WM_operatortype_macro_define() : add existing operator to macro

(Note: macro_define will also allow properties to be set, doesnt work
 right now)

On converting the macro wmOperatorType to a real operator, it makes a
list of all operators, and the standard macro callbacks (exec, invoke,
modal, poll) just will use all.

Important note; switching to a modal operator only works as last in the
chain now!

Macros implemented for duplicate, extrude and rip. Tool menu works fine
for it, also the redo hotkey F4 works properly.

--- Operator redo fix

The operators use the undo system to switch back, but this could give
errors if other actions added undo pushes (buttons, outliner). Now the
redo for operator searches back for the correct undo level.

This fixes issues with many redos.

Note for brecht: removed the ED_undo_push for buttons... it was called
on *every* button now, which is probably too much? For example, using
the 'toolbar' redo also caused this...
2009-07-29 17:56:38 +00:00
fa7a2091f1 2.5 MetaBall Buttons:
* Code and layout cleanup.
2009-07-29 17:15:17 +00:00
198d996934 * a few more small lamp panels tweaks 2009-07-29 14:17:15 +00:00
9547fc48ac - Fix some things I missed in my last commit
- Change name of OBJECT_OT_object_add operator
 - Use new OBJECT_OT_object_add operator in space_info.py
2009-07-29 14:07:51 +00:00
2ee51efd6b * Reverted some superfluous button alignment. The
'Align' should not be overused, it gets quite ugly (and 
loses communication impact) when used between 
buttons of different types. Dependencies should be 
shown via layout and greying out.

These lamp panels still needs some cleaning up too...
2009-07-29 13:33:14 +00:00
f75005c2a8 2.5 MetaBalls
- It is possible to work with MetaBalls in edit mode now
 - Added basic UI to the button window (feel free to change it :-))
 - Header menus should work
 - Undo & redo should work
 - Removed global variable editelems and lastelem (moved it to the MetaBall struct)
 - All tools from old editmball.c was converted to the operators
 - Added lastelem to the RNA
 - Experimental: mb->editelems is only pointer at mb->elems or NULL (depends on Mode). ListBase of MetaElems is not duplicated in edit mode.

Tested with scons at Linux and mac OS X

TODO:
 - Recalc data after Undo or Redo
 - Solve issue with basic MetaBall and Python UI script (only base MetaBall object influence Wiresize and Threshold)
 - Fix orientation of manipulator in "Normal mode"
2009-07-29 12:35:09 +00:00
b3d0753467 2.5 - Small tweaks to order of buttons for Animation Editor header buttons to have more consistent layout 2009-07-29 11:59:21 +00:00
1744061a91 2.5
Small fix: SHIFT+D caused transform to move with more precision, as if
shiftkey was pressed.
2009-07-29 11:53:37 +00:00
208c535869 Use the Ramer-Douglas-Peucker algorithm instead of a reverse Chaikin filter to reduce stroke complexity.
Divergence limit is 4 pixels (could be tweakable but 4 is a nice number).
2009-07-29 04:53:10 +00:00
cacc5f782a - console remove doubles with command history
- povray file removal was uncommented
2009-07-29 00:37:37 +00:00
a638f611a8 list the filesystems on linux. 2009-07-28 22:44:50 +00:00
e3f6770bd3 2.5 file browser
* small tweak for tab completion of directory: make TEX button interactive again

Note1: only TAB key triggers update (see ui_do_but_textedit, line 1599)
2009-07-28 21:08:28 +00:00
4ba8397ab0 Forget add the bearing X, a little better now (hinting). 2009-07-28 21:06:23 +00:00
4ad9dd7c8e Bitmap mode is back.
The option of Texture or Bitmap font is working again, yes it's really
uuuuugly right now, but it work.

On the next commit I go to put this at the same level that texture font.

Change this from User Preferences -> Language -> Textued Fonts, save
the preferences and run blender again.
2009-07-28 20:02:09 +00:00
b073fe336c - UVs weren't exported correctly.
- check for user quit while povray is parsing the file.
- detect if povray cant parse the file and exit the render loop.
2009-07-28 19:32:46 +00:00
00e92c4d8c Fix crash on Linux with some WM.
This is fixed on trunk but was remove in some merge (give conflict).
2009-07-28 19:14:25 +00:00
8cf4ef091c 2.5: various one-liner fixes
* Image window only show game properties in game mode.
* Fix image window render info drawing wrong with alpha enabled.
* Win32 editmode cursor now uses a different one than the system
  cursor, that one is barely visible, especially in the new theme
  colors.
* Center text in operator header print.
* Fix sequencer unlock shortcut key.
* Fix uv layer / vertex color active render button now graying out.
* Workaround to get default zoom level 1:1 again for new buttons
  (will try to fix properly later, is due to scrollbars).
2009-07-28 18:59:36 +00:00
801d44a09e 2.5: Materials and textures can now be assigned again
even if not slot for them is available.
2009-07-28 18:54:02 +00:00
9a874da36c 2.5: File browse button in ui layouts now works, e.g. for render
output path or fluidsim path.
2009-07-28 18:51:06 +00:00
5d7a7525a4 2.5 file browser
Bugfix: scrollwheel in left panel area should pan, not zoom.
2009-07-28 18:25:02 +00:00
c645f3660d 2.5 file browser
* Bugfix: keep the filename when changing directory, either by clicking on it or by selecting a bookmark
* MSVC uninitialized variable runtime check fix in widget_draw_text
2009-07-28 18:20:16 +00:00
86336f5cdd 2.5 file browser
Bugfix: revert to previous behaviour of BLI_rename, is used for safe blendfile saving.
Added guard in file browser though to prevent user from invoking this.
2009-07-28 18:07:00 +00:00
a5e1ff294e 2.5: UI
* Text editing in buttons now hides the label, to give more space.
* Tweak slider buttons text clipping, happened a bit too early.
* Move editing text closer to the left, because the < > buttons
  are not visible then anyway.
2009-07-28 17:59:59 +00:00
94e06c9859 changed some sprintfs to strcats, thanks to Fredrik Axelsson for the patch 2009-07-28 17:23:45 +00:00
561db001cc PovrayRenderEngine: Should now work with win32 and win64 povray installations 2009-07-28 17:22:49 +00:00
e3d17ca33d 2.5
OSX fix:
carbon code can not be included in blender code, it conflicts with struct ID
2009-07-28 16:56:22 +00:00
87b547c79f 2.5
Fix in include file, missing 'struct'
2009-07-28 16:50:13 +00:00
347a1f4376 2.5
Keymap feature: RightMouse in pulldown menus allows to assign 
a new hotkey.
2009-07-28 16:48:02 +00:00
aa44603146 2.5: File browser
* Side panels now use list widgets.
* Enabled theme colors for side panel.
* Add button in bookmarks panel.
* Operator panel title now uses operator name.
* For unix, added / to system, and home and desktop to bookmarks.

* For opening fileselect with filter, cleaned up the code a bit,
  adding WM_operator_properties_filesel instead of duplicating code.
* Also added filter for all operators calling fileselect, only image
  and file open did it before.
* Hide . files by default, and also hide files ending with ~.

* Added back .. (but not .) in the file list, I really missed this.
* File highlight now only happens when you're actually over a file,
  instead staying after you move the mouse away.
* Fix some redraw/refresh issues.
2009-07-28 16:46:14 +00:00
74e4ad20c9 2.5: code cleanup, added CTX_wm_space_* for each space type,
instead of casting everywhere.
2009-07-28 16:33:02 +00:00
f4f3a9b08b 2.5 Lamp Buttons:
* Some layout tweaks and fixes by nudelZ.
2009-07-28 11:04:08 +00:00
fee10e5a40 * copy io scripts into osx bundle with scons, in post-build process 2009-07-28 10:57:36 +00:00
b2ceadc359 * copy io scripts into osx bundle with cmake, in post-build process 2009-07-28 10:40:08 +00:00
1e237e7e2f console copy text was upside down.
made ctrl+space operator find and autocomplete in the console, need a bette way to make these key bindings co-exist.
2009-07-28 08:50:11 +00:00
17b0a794c7 NLA: Mute/Disable NLA Playback
Exposed toggles (defined on AnimData) that will mute the evaluation of that AnimData block's NLA stack. It's active action will then be the only thing that gets evaluated.
2009-07-28 07:24:25 +00:00
61178b19ea 2.5 - Anim Editor cleanups + Graph Editor Clutter Reduction
* Cleaned up some parts of the code that were unused/could be done a bit nicer

* Added a new option for only showing the keyframes of the selected F-Curves in the Graph Editor, as another way of reducing the clutter.
2009-07-28 06:50:30 +00:00
9cbdf73cf0 2.5 Part 2 of Layout Code Cleanup:
* Cleanup of Modifier and Text Data Panels. 
* Made some small layout tweaks.

* Added missing RNA properties for Cast Modifier.
2009-07-28 06:26:10 +00:00
0b3eb956c4 wrote images with the wrong extension (still ran), but is confusing. 2009-07-28 06:12:58 +00:00
37b49492a8 simple povray render integration.
Supports...
- camera/lamp/mesh object types
- meshes with modifiers applied, normals/uv/vertex colors
- materials, reflection, transparency
- spot/area/point lamps, samples, raytrace options
- scene render size, AA setting

Details...
- Doesn't need any 3rd party modules.
- Runs povray from the subprocess module, updating the image from a TARGA.
- Currently no UI panels or support for custom settings.

This could be used as an example for other scripts.
2009-07-28 05:51:38 +00:00
e52dbadcff 2.5 Lamp Buttons:
* Layout Fix for shadow panel.
2009-07-28 05:26:01 +00:00
8584507671 2.5 - Start of Make Proxy Operator
The code has been ported to the operator+rna system, however, there are currently issues related to how the pointer-rna's work for use as operator properties. (NOTE: RNA_property_pointer_set only takes into account builtin props for now, but not id-props, while the corresponding get method seems to take them into account)

The alternative to using pointer-properties for the operator, is to store strings and look up the relevant objects later, but there should be a nicer way...
2009-07-28 03:54:40 +00:00
ddb09d3220 [#19036] blender should use 'static inline' in BKE_cloth.h to work with C99
Török Edwin (edwintorok)

this was the only thing stopping blender being compiled with clang
2009-07-28 01:48:10 +00:00
fe881aa7ad - lamp UI was missing y samples for rectangle area lamps
- returned ID types from RNA funcs didnt get their ID's assigned which crashed in some cases (still not working for members of ID types).
- ob.create_remder_mesh() wasnt assigning any materials.
2009-07-28 01:06:56 +00:00
396ebf0c91 better loading partially written TARGA's, dont read over the end of the buffer and set the remaining pixels 0. 2009-07-27 22:41:35 +00:00
cc3c21f27c * scons changes for mac osx intel / precompiled python 3.1
Feedback (especially on < 10.5) would be most appreciated!
2009-07-27 22:15:17 +00:00
71e0e22ae0 * cmake / mac - unzip python modules from /lib/release into .blender/python on build
This last commit should make everything right for compiling out of the box with python 3.1 on Mac OS X intel. I've been testing/developing this on 10.5 and I'd be very interested to hear feedback from people on other OS versions! Scons and PPC to go...
2009-07-27 22:02:47 +00:00
09fd0a5e48 2.5 Part 1 of Layout Code Cleanup:
* Again, some layout code cleaning. 
* Made assignments more consistent. 

I started to write code guidelines in the wiki:
http://wiki.blender.org/index.php/LayoutFiles-Code_Guidelines

Matt/William: You are welcome to change them or add new infos, I will continue on improving them as well in the next few days.
2009-07-27 20:39:10 +00:00
793324ef83 small msvc fix 2009-07-27 19:33:06 +00:00
a869bdc44e 2.5 file browser
New:
* added filter and display to some operator properties. Now file browser opens showing only .blend files and folders on file->open and on image->open changes to image display and only shows images and movies.
Fixes:
* fixed stupid removal of wrong prototype in last commit
* fixed a few warnings
2009-07-27 19:06:33 +00:00
eb40d8ef0f render api utility function to initialize a render layer from an image rather then loading through python.
lay = result.layers[0]
	lay.rect_from_file("somefile.png", part.x, part.y)

If the source image is bigger then the render layer x/y offsets can be used to choose the part of the image use.
2009-07-27 18:50:10 +00:00
324187b61a 2.5 / Drag & Drop
Small tweak for MOUSEDRAG/DROP event generation
2009-07-27 18:26:48 +00:00
9dc819a56d readonly face normal option eg.
me.faces[0].normal
2009-07-27 18:17:21 +00:00
d0422dec35 2.5 file browser
* fix some notifiers, so directory is correctly shown
2009-07-26 19:23:07 +00:00
6c0e9e21cb indentation error with some operators (strip the descriptions)
if 0'd the exec() workaround for running python scripts incase windows devs want to test.

theeth said the problem is when you compile a debug blender against a non debug python (or the ther way I assume), you can get a FILE struct mismatch.

A quick way to test this on windows is to run this from the command line.
 blender -P somescript.py
 
Somescript.py can be anything
2009-07-26 18:56:27 +00:00
cbb9dfaab8 2.5 file browser
* operator for create new directory activated (IKEY)
* operator for rename (works on files and directories so far) (CTRL+LMB)

Note: fail to rename is rather quiet, no message popup, just doesn't rename if it can't.
So far checked that (On Windows Vista) rename fails on system directories, which I think acceptable.

Note: I removed the code that (silently) deletes file if I rename file to an existing one. Considered harmful :)
2009-07-26 18:52:27 +00:00
4741137fc9 misc py/rna changes
- running a script from a file now uses the PyRun_File(FILE *, ...) rather then PyRun_String("exec(open(r'/somepath.py').read())"...), aparently FILE struct on windows could not ensured to be the same between blender and python, since we use our own python on windows now it should be ok.

- generating docs works again (operator update for py style syntax broke them)

- python operator doc strings was being overwritten

- added rna property attribute "default" to get the default value of a property, not working on arrays currently because variable length arrays are not supported.
2009-07-26 18:18:14 +00:00
b666f55e0e 2.5 Layout files:
* Removed __idname__ from all panels. 
Note: Operator classes still need that id. Don't remove it there.
2009-07-26 16:31:48 +00:00
6d84e38856 2.5 Space RNA:
* Added Key Map Editor to Outliner "display_mode" RNA.
2009-07-26 13:10:29 +00:00
9ac754eca5 2.5
First step towards keymap editor!
Before getting too excited:
- doesn't save yet
- no rna properties can be defined
- no insert/remove keymap options yet
- no option yet to set 'key press/release'

But what does work;
- Keymap list is in outliner, new category 
  (Keymaps are listed in order as being created now)
- enable/disable a keymap entry: click on dot icon
- it displays python api names for ops
- browse new operator for keymap (menu button)
- set keymap to use other keys, mouse or tweak events
- four modifier key options

I first intent to test it all well, there are still
quite some modal map conflicts (like border select) and
there's problems assigning items to tweaks

Another issue is that a visual editor for keymaps might be
quite hard to use... the amount of data and options is just not
so fun for a buttons menu. There are ways to improve this though.
Maybe do this via a script?
2009-07-26 12:52:39 +00:00
7084447c73 2.5 file browser
* enable large file size for WIN64 too.
2009-07-26 12:49:43 +00:00
569bb8f47d 2.5 filebrowser
Bugfixes:
* crash when loading file that has filebrowser open
* file size over 2GB/4GB? shows negative number 
Other:
* tried to improve drawing speed a bit by only drawing the files actually shown and improving refresh behaviour a bit.

Note: Solution I found so far is to use the non-standard _stat64, as far as I could see, WIN64 should work without that patch (Genscher, please check and if needed you can enable this too by removing the !defined(WIN64) )
This probably needs to be fixed in at least one other place (BLI_filesize), will look into this once this fix proves stable enough)
2009-07-26 12:40:44 +00:00
4e024a1e6e 2.5 - 'Reset' buttons for Limit Distance and Stretch To Constraints 2009-07-26 11:57:27 +00:00
812530aca8 2.5 - More armature/bone operator tweaks
* Restored quick operators for moving bones between layers and switching visible armature layers. The popup used here (based on the layers template) is not optimal yet - you can click on multiple layer buttons to enable/disable them, but you need to move your mouse outside the area for it to confirm. 

* Separate armatures works again. I've tweaked the arguments to ED_object_duplicate() to make this work (besides, the other users of this wouldn't have been affected).

* Added some missing special (transform) operators to the menus + keymaps
2009-07-26 11:01:56 +00:00
3d096c2712 blender 2.5 MSVC9 projectfiles
fix renamed rna_vpaint.c -> rna_sculpt_paint.c
2009-07-26 09:35:40 +00:00
3e5f46ebf9 2.5 Various fixes:
* Small code and layout cleanup in 3DView Side Panels.
* Added missing redraw notifier for changing world datablock and cursor location.
2009-07-26 08:53:23 +00:00
a934773475 - console scrollback userpref
- copy coperator for the console (Ctrl+C and from the menu)
2009-07-26 04:31:46 +00:00
117fdd8072 * projection paint options in the toolbar
* renamed  __no_header__ -> __show_header__
2009-07-26 03:54:17 +00:00
f4d70c9812 2.5 - Restoring 'set bone setting' operators for Armatures/PoseMode
In the future, it might be a good idea to look for more efficient alternatives...
2009-07-26 03:22:24 +00:00
dd918da8de ReplaceMesh Actuator option to replace the physics mesh and display mesh + python api options.
When the mesh field is left blank and Physics option is enabled, it reinstances the physics mesh from the existing mesh.
like calling gameOb.reinstancePhysicsMesh() from python.
2009-07-26 01:32:37 +00:00
777a0d78e7 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r21899:21908 2009-07-25 23:16:45 +00:00
e9ca43521f BGE Physics
Add support back for reinstancePhysics mesh, a frequently requested feature in the BGE forums.
from what I can tell Sumo supported this but bullet never did.
Currently only accessible via python at the moment.

- rigid body, dynamic, static types work.
- instanced physics meshes are modified too.
- compound shapes are not supported.

Physics mesh can be re-instanced from...
* shape keys & armature deformations
* subsurf (any other modifiers too)
* RAS_TexVert's (can be modified from python)

Moved the reinstancePhysicsMesh functions from RAS_MeshObject into KX_GameObject since the physics data is stored here.

video and blend file demo.
http://www.graphicall.org/ftp/ideasman42/reinstance.ogv
http://www.graphicall.org/ftp/ideasman42/reinstance_demo.blend
2009-07-25 22:57:29 +00:00
756488fbe2 2.5: Painting
Various fixes for painting, sculpting and particle edit, still
much to be done...

* Move RNA paint and sculpt structs into rna_sculpt_paint.c,
* Added Particle Edit RNA.
* Some tweaks to existing Paint RNA.

* Put texture paint and particle edit object in context.

* Fix some errors in the brush layout, properly doing None
  checks, fixing some wrong property identifiers.
* Added tool enum for texture paint and particle edit in panels.

* Allow editing brush textures in the texture buttons, still with
  a stupid toggle, ideas for how to make the connection better are
  welcome.
2009-07-25 22:31:02 +00:00
5d240af42b 2.5: fix for use background image toggle in 3d view, it didn't
allocate the right data.
2009-07-25 22:22:47 +00:00
580d000f8f 2.5:
* Fix crash entering particle mode, and particles not showing.
  Janne, please check the changes I made in psys_cache_paths,
  I'm not confident they are correct.
* Fix some warnings
2009-07-25 22:20:26 +00:00
c543eca36e 2.5:
* Fixed a typo in User preferences. 

* Add a use_ prefix for some projection paint booleans in RNA.
2009-07-25 21:33:43 +00:00
eb80ce4d7f 2.5: Materials
* Diffuse/specular ramps works again.
* Wire is now a material type next to Surface and Halo.
* Removed Volume material type option until it is actually there.
* Some button layout tweaks.
2009-07-25 21:31:17 +00:00
1b14243405 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20937:21899
missing commits from peter 20942, 21165, 21170, 21174, 21597
these files still need manual merging

source/blender/makesdna/DNA_sequence_types.h
source/blender/src/sequence.c
source/blender/src/seqeffects.c
source/blender/src/editseq.c
source/blender/include/BSE_sequence.h
2009-07-25 20:59:09 +00:00
1c00eacca2 fix memleak in BGE py api - action.channelNames 2009-07-25 20:51:45 +00:00
dff9dce1cd Windows: fixing user preference window opening full screen 2009-07-25 20:16:56 +00:00
90a08b1c78 2.5: Object Buttons File:
* Renamed the file for consistency.
2009-07-25 19:59:18 +00:00
88097e9909 - BGE Python API converting a mesh from a python arg was broken but happened to work if the uninitialized pointer was not NULL.
- iris.c - looks like a copy/paste error, was using rect where it could not have been initialized.
2009-07-25 19:34:38 +00:00
6502b927f8 2.5 / RNA
Added RNA_pointer_set as counterpart for RNA_pointer_get (i.e. sets pointer property by name lookup)
2009-07-25 19:10:24 +00:00
24d39c0de4 2.5 / Drag & Drop
Commit of basic architecture. Sorry, nothing fun to play with yet.
Added two events: MOUSEDRAG and MOUSEDROP. MOUSEDRAG is sent when left-mouse clicking and then moving the cursor and every time the cursor is moved until the user releases the mouse button, thus generating a MOUSEDROP.
Also added two dummy drag operators in view3d and outliner (place holders for now).

Brecht and Ton: feel free to check/edit especially the event system code. I'm not sure that's the right way to do it. Also, I'm getting some mem leaks which I suspect are caused by my code.
2009-07-25 15:26:06 +00:00
5b12cb9378 2.5
Fix in previous commit: 
Outliner data view, rna levels didn't open/close correctly.
2009-07-25 15:05:51 +00:00
55e3a4a6f0 2.5 Scene RNA:
* Added Projection Painting RNA.

Note: The properties doesn't seem to be accessible yet via datablocks. Brecht please check.
2009-07-25 14:35:08 +00:00
dcfc0333d1 2.5
Outliner: brought back to near full functioning:

- proper operators, like for open/close items, exec operations
  (note: select is still same operator as activate, should
   become modal ops later)
- rename works again (ctrl+click)
- proper notifiers for redraws
- select / extend select works again
- editmode in/out works again
- enter key opens/closes again
- right mouse operations work again

Didn't do:
- options for Sequence strips
- signals to change button views on clicks
- error/warning messages

UI: 

- added new uiButSetRenameFunc(), which passes on the old name
- added uiButActiveOnly(), which ensures a button gets created in
  active state, and gets removed when used. Needed for editing
  names in outliner.
  
  Andrea: check outliner.c for uiButActiveOnly(), very easy to use!

Also:

- Added posemode operator, CTRL+TAB tied to it.
2009-07-25 13:40:59 +00:00
90dfb61e04 BGE: Fix Keyboard actuator that didn't generate release event. 2009-07-25 12:35:14 +00:00
a13341bed1 Added Ztransp (renamed Z Buffer) option in rna and layout. Also added diffuse and color ramps, although a bug in the RNA prevents these from working unless you load an old file with them already enabled. 2009-07-25 12:22:22 +00:00
5815cfd53b 2.5 Smooth/Flat Shading:
* Added operators in Toolbar for Object Mode too. (Mesh only).
I think it should be there too, going into edit mode and select all just to change the shading of the whole mesh is not good. ;-)
2009-07-25 10:42:23 +00:00
020a34b9de 2.5 - Restored most of the remaining Armature/Pose Operators
* Armature:
- added: fill, merge, separate
- renamed: duplicate, align

* Pose:
- added: apply pose

* Armature Edit menu has been converted to use operators/layout now
2009-07-25 05:11:28 +00:00
f7b90c0f41 - report header buttons were not drawing.
- shift+b in the console would do border zoom (rather then upper case B), fixed by making v2d's border zoom check if the v2d's zoom is locked.
- blender in debug mode registers all operators, useful for testing.
2009-07-24 23:07:18 +00:00
a93619a8c4 2.5 3DView View Panel:
* Added Lines option.
* Made some settings use alignment. 

Logs: Of course i meant 4-Split in last commit message ;-)
2009-07-24 22:33:09 +00:00
a1403f7fbb 2.5 3DView Properties Panel:
* Some Code cleanup.
* Added 3-Split Operator into the panel and some options (which don't work yet)
* Added RNA for RegionView3D lock and box options.
2009-07-24 22:09:30 +00:00
4f3ee918c1 2.5 3DView Toolbar:
* Some Code and tiny layout cleanup.
2009-07-24 21:01:41 +00:00
9325f35d4c ParticleSettings animdata wasn't shown in graph editor, dope sheet and nla editor.
Tiny bug fix too: Had forgotten particle child length setting from do_versions so old files with child hair showed all hair with zero length.
2009-07-24 19:36:08 +00:00
431a388ae7 This is patch# 19017 16bit SGI image loading
submitted by Albertas Vyšniauskas (thezbyg) 

Improves SGI image support.

Kent
2009-07-24 17:17:04 +00:00
f24bcac43e 2.5: Various Fixes
* Fix crash loading particle AnimData. This crashed many BBB
  files. If you have a .blend file that crashes when loading
  it in 2.5, please mail me, I'd like to know.

* Image window zoom ratio did not work correct with py 2.x.
* Other minor fixes for image window RNA.

* Buttons window now remembers the tab that was last clicked
  by the user, even if that tab is no longer available due
  to context, and then enable the tab again if the context
  for it is back.
* Cleaned up buttons space DNA a bit, removing unused vars.

* Armature bone rename outside edit mode did not call right
  function yet.
* Armature layers are now editable even if lib linked. This
  is useful for proxies. For this purpose a PROP_LIB_EXCEPTION
  flag was added. Need to think over proxy / RNA a bit though,
  not sure what the requirements are yet.
* Parent to Armature Deform now has options to create vertex
  groups, instead of always creating them.
2009-07-24 16:41:12 +00:00
ad6aaeb319 Resized the preferences window to 800 px. This makes proper space for the header button text. Merged File Paths and Autosave preference tabs to one 'File' item. This makes the number of items inside the tabs more even and makes text in the tabs easier to read when the window is narrower.
Also added weight paint ramp.
2009-07-24 14:30:40 +00:00
ef6cbc27e0 Buttons for next/prev keyframes in timeline now work again 2009-07-24 13:41:57 +00:00
4158913835 2.5 - Adding Jump to Next/Prev Keyframe Operator
This is implemented at the Screen-level, and only considers scene and active-object keyframes (like the timeline). 

TODO: 
* Need to update the timeline header buttons to use this operator. One limitation is that I can't get the buttons there to take an arg...
2009-07-24 13:34:45 +00:00
7f630d728a tiny change to menu header text. It was almost identical with the menu items themselves, making it impossible to tell them apart. 2009-07-24 13:25:39 +00:00
e0c64de297 2.5
Temp window now clips correctly on left side.
Also increased top offset for OSX to show window header.
2009-07-24 13:17:40 +00:00
fbad147b76 2.5 - Restored 'AutoSide Name' and 'Flip Names' operators for both PoseMode and Edit Mode (Armatures).
Only the PoseMode menus work for now (since these use operators)
2009-07-24 13:02:16 +00:00
2f8a19e5bc 2.5
Related to previous commit:
- new file menu option "user prefs"
- removed 'save user pref' confirmation menu
2009-07-24 12:45:25 +00:00
6abddb0fc4 2.5
New feature: allowing to open temporarily windows for output.
Implemented for:

- Render output (use output menu "new window" option).
- User Preferences (alt+U, plus added in 'File' menu)

Currently the window opens where your mouse is. The Render window
works as usual, with ESC or F11 moving it to back or front again.
That allows the window position to remain where you moved it on 
new renders.
If you close a render window when it renders, the render thread
will be killed.

User prefs show 'info window' now... i thought we'd use outliner?
Anyhoo, I've made the 'save settings' to close the 2nd window as
well.

Opening a secondary file window for save I'll check on later,
this has to be checked with the current event system still.

the WM_window_open_temp() api call for this maintains currently
a *single* temp window. If you have a render window open, and call
for the preferences, the render window will be used for it. And
the other way around.

On closing the blender window, the temp windows close automatically
when there's no regular window open, and blender quits.
2009-07-24 12:43:59 +00:00
1844fc7057 2.5 - Restored Bone Paths Operators
* A number-counter cursor is now used while sampling the curve
* Fixed some of the drawing errors with the paths. Unfortunately, when the armature is rotated, the path text is drawn in the wrong places still...
2009-07-24 12:27:42 +00:00
bd628d9c0c UI
Added cursor location to the view panel in 3D view. 

Removed the Shade Smooth/Flat buttons from mesh data for two reasons:  

These kinds of tools are more appropriate in the tools area, and the context would not always match the selected datablock, if you have multiple objects selected, or if you're viewing the mesh data tab in 'pinned' mode.
The shade smooth/flat buttons are in the edit mode tools area now.
2009-07-24 11:48:45 +00:00
84c8992e61 RNA Wrapping Fixes:
* Changed update callbacks for several armature properties to do proper depsgraph flushing instead of sending redraw notifiers

* Wrapped preview-range settings for Scene

* Fixed bug with 'parent-type' enum menu for Object parent-type. The problem here was that PARSKEL was used and is still used for both Armatures and Lattices, but the lattice entry would always override armatures entry. Now, when dynamically building the list to display, the function to add these is given the specific item to use, and has been made to stop after the first match has been added. Hopefully this doesn't break anything else...
2009-07-24 11:24:00 +00:00
87f3ba8a80 Toolbar
Improved the brush tools UI and added a bunch of brush controls. There seems to be some RNA magic missing for texture paint to work, so that's empty for now. Added tablet pressure buttons, which needs a new icon.

Added a bunch of tools in a categorized fashion for all edit modes. Need to figure out what to do for vert/edge/face specific tools - perhaps it could detect the mode setting and show most appropriate tools for each mode.
2009-07-24 11:14:59 +00:00
b2606534b6 2.5 - Timeline window now displays keyframe lines again
* Keyframes for scene-linked animdata is drawn first (if 'Only Selected Data Keys' is off)
* Keyframes are also drawn for the active object
2009-07-24 08:05:56 +00:00
dbd5c5b8a1 2.5 - Animation Tweaks (KeyingSets/NLA)
* Insert Keyframes menu now only displays the 'active keyingset' entry when there are some KeyingSets.

* Moved the validation code for auto-blending/extend modes to NLA editor code, and included calls for this in many of the editing tools for NLA strips.

* Removed obsolete 'ID_IPO' entries from RNA-ID wrapping (these were commented out anyway).
2009-07-24 06:51:33 +00:00
0f4fd4f5b1 NLA - Auto-Blending + 'Smarter' Extend Behaviour
* Auto-blending (blend in/out values get determined based on 'overlaps' of strips) now occurs after transforming strips. Where islands (continuous chains of strips) occur, only the ones on the ends of the islands will get or contribute to auto-blending.

* Extend modes (other than 'nothing') now get automatically determined (after transforms) so that moving strips will no-longer cause problems.

* Added a new option to hide influence curves in NLA. Also, made the line widths for these curves narrower, since the old setting was too ugly.

* Pose copy/paste buffer now gets freed on exit
2009-07-24 06:08:03 +00:00
57727fc145 blender wasn't building on my system because of this, cant this use notifiers? 2009-07-23 22:45:24 +00:00
366a64959c 2.5: Render/Game Engine
An engine to use for output can now be selected an influences what
shows in the buttons window, only showing relevant data. The idea
behind this is to make it more clear what is supported where, make
the system more pluggable for external render/game engines, and save
space hiding stuff that is not relevant anyway.

* Top header now has an engine menu, to choose between the blender
  render engine, game engine, and other future external engines.
* If the game engine is enabled, the buttons window should show
  only properties that work in the game engine, and similarly for
  the render engine.
* Moved panels from the logic space and game tabs to the physics,
  scene and world tabs instead, and removed the game tab.
* Materials and textures tabs should eventually become game
  specific too, to better show what is supported.
2009-07-23 21:50:40 +00:00
1ee8038e41 2.5: Top Menu
* Clean up File menu, added back recover last session op.
* .blend compress now behaves a bit different, previously
  it would only respect the user preference. Now it saves
  existing files the same way they are saved, and new files
  following the user preference. The save operator has a
  Compress toggle in the file browser left panels now.

* Add menu working again, some fixes to make these operators
  work outside the 3d view were needed.
* Timeline menu removed, its contents will be moved to the
  timeline header menus.
* Game menu can now start game, changed the start game op
  to choose another 3d view if none is available.
* Render menu has a few items now.
* Help menu contains a few links again.
2009-07-23 21:35:11 +00:00
0bb50594f9 2.5: UI
* Fix issue where it would automatically scroll when collapsing panels.
* Fix panel dragging not taking zoom level into account.
* Fix enum menu having too small default width in headers.
* Fix tooltips not showing shortcuts etc. if there was not tooltip
  defined for the button.
* Fix some refresh issues with color ramps.

* Add a bit more space between columns in the layout engine.
* Make scrollers darker so they are less distracting, and highlight
  instead of reverse shading when dragging.
2009-07-23 20:50:24 +00:00
062b1b88ad 2.5: Various
* Buttons header: made tab buttons bigger, remove view menu,
  replaced by RMB menu in main region.
* Timeline header: tweak button placement and alignment, added
  a play reverse icon.
* Window type chooser menu: removed audio and scripts windows,
  change console and logic icons.
* Node space: disable the channel region until it is used.
2009-07-23 20:40:51 +00:00
580b527854 Various layout tweaks. Improved game buttons, made minor adjustments to lamp, scene and fluids. 2009-07-23 14:35:20 +00:00
f3f89ebac1 cmake updates for compiling with prebuilt py 3.1 on osx 2009-07-23 14:20:08 +00:00
7508afe25b pyrna,
calling rna functions with the wrong argument type would raise an error like..
 expected a string type

Added an error prefix so now the message is..
 TypeError: UILayout.item_enumO(): error with argument 3, "value" -  expected a string type
2009-07-23 13:48:15 +00:00
712298abd2 autocomplete wasn't working 2009-07-23 12:31:45 +00:00
17a9b3e44c External cache
Particle point cache can now be loaded from external files.
- Activated by "external" checkbox in cache panel and giving proper folder path and file name identifier.
- External cache panel has controls for particle emission start, end, lifetime and random lifetime. These should be set according to the external data for correct playback.
- External files should be named "identifier_frame_index.bphys" or "identifier_frame.bphys" where:
	* "identifier" is a freely choseable name.
	* "frame" is the cached frame number.
		** Six digits padded with zeros!, for example "000024".
	* "index" can be used to tell caches with the same identifier apart.
		** Two digits starting from zero.
		** The index and the underscore before are optional. If no index is present the index number in ui should be set to -1.
- Cache file format is pure floating point numbers (in binary, not text!) with each particle's data one after the other with the following data members:
	* 3 floats: particle's location vector
	* 3 floats: particle's velocity vector (per second)
	* 4 floats: particle's rotation quaternion
	* 3 floats: particle's angular velocity vector (per second)
	* 1 float: frame of the actual data (this can be non-integer for particles that are born or die between two integer frames, but otherwise should be the same as the "frame" in the file name)
- Cache files don't have to exist for each frame.
	* Frames without actual data are interpolated from surrounding frames that have data (extrapolation is not supported).
- Cache file formats with extended (or reduced even) data members are in future plans for easier usage.
- Current code only does particles, don't yet know if it's applicable to cloth or sb.
- Known issue: endianness can't yet be handled in any way.

Other changes:

New hard limits for many particle parameters. Some examples:
- Maximum amount of particles: 10M particles :) And before you all go and crash your Blender trying this out remember that this limit is only for those freaks who really have the machine power to handle it. 10M particles alone take around 2.2 Gb of memory / disk space in saved file and each cached frame takes around 0.5 Gb of memory / disk space depending on cache mode.
	* Known issue: To actually use this many particles they most likely need to be allocated in parts as taking hold of a 2.2Gb chunk of memory at once is probably not ok with any operating system.
- Maximum amount of children: 100k children/particle (1T childparticles here we come :D)
- Kink frequency: -100k to 100k half-rotations (really strange the previous limit was only from zero upwards)
- Path draw steps: 10 (power of 2 remember)
- Path render steps: 20 (power of 2 also!! If over 1M segments doesn't get you smooth paths then I think nothing will!)
2009-07-23 00:19:01 +00:00
b6db4f8e17 Change to avoid trigraph confusions. 2009-07-22 22:12:55 +00:00
413fa4730b less verbose subtyping Py/C API code, use PyObject_CallFunction which supports packing the function args into a string. 2009-07-22 19:50:21 +00:00
3ecb88fc76 2.5 MSVC 9 projectfiles
* maintenance: console_space, physics_boids, rna_render
2009-07-22 18:06:59 +00:00
94518b6308 2.5
* Make EWA new default, rename Default to Box.
* Fix windows compile issue in texture filter code.
2009-07-22 17:20:04 +00:00
8b5fbbec80 * Updated CMake files to build with Python 3.1 on OS X by default. Remember to update /lib to get the precompiled libraries! 2009-07-22 12:43:37 +00:00
702307c8f8 Colorband UI
Fixed the 'Add' button
2009-07-22 11:52:42 +00:00
9387c235a8 Colorband UI
Cleaned up the colorband UI, and tweaked the tooltips. BTW the 'add' button doesn't seem to work yet?
2009-07-22 11:40:59 +00:00
25f7b351aa missed this file 2009-07-22 10:12:00 +00:00
1a42f8c77e removing all functions from bpy.ui module, keeping the module incase its useful later.
removed a check in exotic.c that should be added back later.
2009-07-22 10:09:59 +00:00
ffb8ac01a2 remove scriptlinks,
they were not working and we have plans for better script integration in 2.5
2009-07-22 09:41:41 +00:00
53c1b562af Fixed weird alignment for new mesh objects. This still doesn't work correctly in edit mode, but it's a bit more usable than before. 2009-07-22 06:31:36 +00:00
d44d7e220d SVN maintenance. 2009-07-21 21:31:13 +00:00
c354ea0ef1 2.5: Render
This adds a RenderEngine type to RNA, which can be subclassed
in python (c++ will follow once we support subclassing there).
It's very basic, but plugs into the pipeline nicely. Two example
scripts:

http://www.pasteall.org/6635/python
http://www.pasteall.org/6636/python

Issues:
* Render runs in a separate thread, and there is unrestricted
  access, so it's possible to crash blender with unsafe access.
* Save buffers and full sample are not supported yet.
2009-07-21 20:28:32 +00:00
6b8dae0874 RNA
* ID blocks can now get RNA properties defined from python, e.g.:
  bpy.types.Scene.BoolProperty(..)
* RNA structs/functions/properties can now get pointers duplicated
  (mostly strings), since we can't point to some static string then.
* Added ExtensionRNA struct to add into *Type structs for subclassing,
  is a bit more compact than defining the 4 variables each time.
  Only disadvantage is it requires including RNA in more places.
2009-07-21 20:05:16 +00:00
b8445173c4 2.5:
* Fix armature drawing crash with materials.
* Mixed texture/material preview was doing wrong gamma correction.
* Use *f math functions for AAO.
2009-07-21 18:29:37 +00:00
a1407ff342 2.5:
* Windows fixes for texture filter & bump patches, thanks
  Jean-Michel Soler for noting.

* Added sqrtf/sinf/fabsf/... fallback #ifdefs in BLI_arithb.h,
  those should be safe to use now. Replacing the double for the
  float version throughout the code can be done once, but would
  need proper testing.
2009-07-21 18:23:45 +00:00
e4b7997277 py console wasnt working since r21743 2009-07-21 15:52:15 +00:00
0391b5ecef 2.5: fix crash on load when saving with a filebrowser open. 2009-07-21 14:28:41 +00:00
b5457e8e70 RNA
* Wrapped RenderResult, RenderLayer, RenderPass.
* Update RNA_access.h with new structs.
2009-07-21 14:11:51 +00:00
0b49dc77de 2.5: Bump Mapping
Patch by Alfredo de Greef. Considerably improves the quality of bump
mapping, and texture filtering for displacement and warp too. Mainly
this is achieved by getting the texture derivatives just right in
various cases, many thanks to Alfredo for figuring this one out, works
great.


This is enabled by default now, but disabled still for existing
textures to preserve backwards compatibility. Can be enabled with
the "New Bump" option in the material texture slot in the outliner.

Also, I made the range for the normal factor a bit smaller since this
gives stronger effects, but note that you can still type in larger
values than the slider allows.
2009-07-21 13:46:49 +00:00
d19bb6ffcf Silencing warnings (mingw + scons) about undefined stuff... 2009-07-21 13:20:39 +00:00
e3c6ae9b89 2.5: Texture Filtering
Patch by Alfredo de Greef with high quality image texture filters.
This adds 3 new filters:

* SAT: Summed Area Tables. This is like mipmaps, but using somewhat
  more memory avoids some artifacts.
* EWA: Ellipitical Weighted Average, anisotropic filter.
* FELINE: Fast elliptical lines for anisotropic texture mapping.

The one change I made to this was to try to fix an alpha/premul
problem, hopefully I didn't break anything, it looks compatible
with the existing filter now for me.
2009-07-21 13:20:35 +00:00
ea0b015b0a 2.5 - Copy/Paste Operators for Armatures
* Buttons in header now use operators too. The paste-flipped button needs attention though, since the flipped argument isn't set yet

* Assigned Ctrl-C, Ctrl-V, and Ctrl-Shift-V to Copy/Paste/Paste-Flipped respectively for now.

* Auto-Keying for this doesn't work again yet. On todo for later...

---

* Also, new armatures now get the flag to show custom bone colours enabled by default.
2009-07-21 13:12:40 +00:00
e56287bfc9 2.5: Texture Buttons
* World and Lamp previews now working here too.
* Experiment with list template, showing only icons. Unfortunately
  texture icon render crashes combined with preview render so it
  shows all icons the same.
* Influence panels updated, with slider for each option. The values
  are still linked though, will fix that later.
* Image texture controls a bit more complete, still WIP.
* Color ramp back.
2009-07-21 12:57:55 +00:00
7284eb6d91 2.5 - More work on Bone Groups
* Added a new UI Template for the 3-colour picker used to visualise + select the custom colours for a bone group.

* Finished wrapping the colour properties for Bone Groups in RNA. Although changing the colour-set used will change the displayed/cached colours, changing the colours via the colour wells will not change the colour set to 'custom' (as per 2.4x) yet. This needs a nice solution...

* Fixed context-related bugs with the Assign/Remove operators for bone groups. These were using context-iterators for selected posechannels, but that was only defined/valid for the 3d view (but not for the buttons window), hence a failure in that case.
2009-07-21 12:38:01 +00:00
e18164dbab 2.5
Overlooked WM event.val usage without checking proper #defines.
My previous commit made all input not work on any modifier key press.
2009-07-21 12:19:46 +00:00
ed92105857 2.5
Modal keymaps.

I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.

The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.

Tech doc:

1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
  This only for UI, so user can get information on available options

2) items
- WM_modalkeymap_add_item(): give it an enum value for events

3) activate
- In keymap definition code, assign the modal keymap to operatortype
  WM_modalkeymap_assign()

4) event manager
- The event handler will check for modal keymap, if so:
  - If the modal map has a match:
    - Sets event->type to EVT_MODAL_MAP
    - Sets event->val to the enum value

5) modal handler
- If event type is EVT_MODAL_MAP:
  - Check event->val, handle it
- Other events can just be handled still

Two examples added in the code:

editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()

Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
2009-07-21 11:03:07 +00:00
0865bf2959 2.5: python module name for import had trailing "." 2009-07-21 10:40:13 +00:00
6d074526f2 2.5 - Restoring Bone Groups
* Added Bone Groups UI to 'Armature' context buttons for now. Later, it may be more convenient to have these with bones instead?

* Added operators for the operations that can be performed on these groups. Moved the core adding/removing functions to blenkernel so that they can be used elsewhere in future if need be.

* Properly wrapped bone groups in RNA. Copied the way that Vertex Groups are wrapped, since they share some similarities. Setting colours for bone groups still needs more work though.
2009-07-21 10:18:08 +00:00
8c9ade81e8 Make linux/scons default to python 3.1 rather then the version scons runs with.
for a while py2.x will work but eventually be dropped when most OS's support it, so Id recommend upgrading.

The following instructions are only needed if you don't use python3.1 installed in the default location.
For releases users wont have to worry about this.


# in python3.1 source dir, build and install into your own dir, /opt/py31 is just an example.
./configure --prefix="/opt/py31"; make; make install

# In the scons user-config.py...
BF_PYTHON = "/opt/py31"

# ... now build ... 
# 
# Blender now needs 2 things to run. ./lib/libpython3.1.so and the python modules.

# Symlink (or copy) python modules, blender sets this path for modules on startup if it is found.
ln -s /opt/py31/lib/python3.1 ~/.blender/python

# Currently static linking is not working without hacks because of limitations in scons.
# for releases we can workaround, but for now its easier to set an environment variable.
# To start blender so it can find libpython3.1.so make this into a shell script to save yourself typing it in all the time.
export LD_LIBRARY_PATH="/opt/py31/lib/"
./blender
2009-07-21 10:13:20 +00:00
5cd5e85143 Cleaned up logic buttons in logic space slightly.
Moved Shade Smooth/Flat from Mesh obdata panel to tools area. These kinds of operator tools aren't really allowed in the buttons window anymore - whole point of new tools area :)
The only operators that are allowed in buttons window are things that act on the RNA fields, like add/remove buttons for adding vertex groups etc.
2009-07-21 09:35:39 +00:00
0ebf23c0b8 BLI_setenv, use instead of copying ifdefs about for setting env vars.
set PYTHONHOME as well as PYTHONPATH, quiets some warnings.
2009-07-21 09:26:28 +00:00
ca466dc8d8 2.5 - Porting 'Pose' Menu (and its submenus) to Layout Engine
It's alarming how many tools are still missing here!
2009-07-21 05:08:59 +00:00
93f2743b0f 2.5 - IK Constraint Tools + Constraint Editing Tweaks
* Add/Remove IK now works again using Shift-I and Ctrl-Alt-I as before. The code for this is now located in editconstraint.c for now...

* Adding constraints with automatically added targets works again. It's a relief that the old code still works (with a minor tweak)
2009-07-21 04:21:07 +00:00
74fce51841 2.5 - Constraint (Re)Naming
* Names for newly added constraints are now derived from the type of constraint, making it easier to identify the type of constraint

* Fixed crash when renaming constraints (due to invalid pointer being passed for the 'old' string name)
2009-07-21 02:54:02 +00:00
22f421a9ee 2.5: Texture buttons preview now has an option to display the
texture, the material, or both side by side.
2009-07-21 01:57:46 +00:00
6dfec894f9 2.5: Lamp button layout improvements by nudelZ. 2009-07-21 01:52:05 +00:00
a78ef19054 2.5: UI
* List template visual changes. Items now look different,
  and it expands to size 5 as more items are added.

* Added LISTROW and LISTBOX elements. The former is like
  a typical ROW button, but looks diffrent. The latter
  looks like a BOUNDBOX, and has no extra features yet.
* Fix some glColor3ubv warnings with casting, did not find
  a nicer way.
2009-07-21 01:26:17 +00:00
f682de6fd2 RNA
* Added suppport for generating code without verifying with DNA,
  this doesn't give good errors and is more error prone, but makes
  it easier to wrap things like EditBone which are not in DNA.
* RNA_define_verify_sdna(0), and set to 1 again afterwards.
2009-07-21 01:14:55 +00:00
1f4fa869e4 2.5: RNA & UI
* Revert lamp sampling/buffers change. The right enum items should
  be defined in RNA, not the layout, so that it works in outliner,
  python api too.
* Also changed type popup to radio buttons again, and removed the
  icons. This is more consistent, and I don't think it's a good idea
  to start using icons for these things, too much clutter.

* Replace Mesh with Normals panel in the mesh buttons.
* Remove Material panel from mesh buttons.
* Added name fields for shape/vgroup/vcol/uv.
* Spacing tweak to Object and Bone names.

* Fix some naming conflicts in RNA, with "name" and "type" properties
  being defined twice in the same struct.

* context.scene.tool_settings -> context.tool_settings.
2009-07-21 00:55:20 +00:00
0aebd5f144 2.5: Make shade smooth/flat operators consistent,
and add object mode operators.
2009-07-21 00:36:07 +00:00
5fd16476d9 Forgotten file from boids commit. 2009-07-21 00:31:33 +00:00
ae10731eb9 2.5: DNA fixes for game engine changes, making it work on 64bit. 2009-07-21 00:30:19 +00:00
024cd8c3d8 SVN maintenance. 2009-07-21 00:19:07 +00:00
b4353a8443 Initial code for boids v2
Too many new features to list! But here are the biggies:
- Boids can move on air and/or land, or climb a goal object.
- Proper interaction with collision objects.
	* Closest collision object in negative z direction is considered as ground.
	* Other collision objects are obstacles and boids collide with them.
- Boid behavior rules are now added to a dynamic list.
	* Many new rules and many still not implemented.
	* Different rule evaluation modes (fuzzy, random, average).
- Only particle systems defined by per system "boid relations" are considered for simulation of that system.
	* This is in addition to the boids own system of course.
	* Relations define other systems as "neutral", "friend" or "enemy".
- All effectors now effect boid physics, not boid brains.
	* This allows forcing boids somewhere.
	* Exception to this is new "boid" effector, which defines boid predators (positive strength) and goals (negative strength).
	
Known issue:
- Boid health isn't yet stored in pointcache so simulations with "fight" rule are not be read from cache properly.
- Object/Group visualization object's animation is not played in "particle time". This is definately the wanted behavior, but isn't possible with the current state of dupliobject code.

Other new features:
- Particle systems can now be named separately from particle settings.
	* Default name for particle settings is now "ParticleSettings" instead of "PSys"
- Per particle system list of particle effector weights.
	* Enables different effection strengths for particles from different particle systems with without messing around with effector group setting.

Other code changes:
- KDTree now supports range search as it's needed for new boids.
- "Keyed particle targets" renamed as general "particle targets", as they're needed for boids too. (this might break some files saved with new keyed particles)

Bug fixes:
- Object & group visualizations didn't work.
- Interpolating pointcache didn't do rotation.
2009-07-20 23:52:53 +00:00
Dalai Felinto
01b787636b fix for recent stereo changes+tweaks
(it's the 3rd commit in a row. But as they say, the 3rd is always a charm ;)

I still think we have a little mess with the DEFINE parameters in BGE (as in RAS_IRasterizer::StereoMode).
We used to have them duplicated and hardcoded in 2.4xx, but I think we can do it in another way now.

(I didn't change gameplayer, but I can do it once we have it linking and building properly)
2009-07-20 22:36:56 +00:00
a3366cb8f0 UI layouts
Changed order of panels in scene buttons to better follow order of importance, putting the post-processing options further down.

Cleaned up game physics properties
2009-07-20 21:31:32 +00:00
Dalai Felinto
bb0eab7f93 fix from last commit.
I thought """ """ could be used everywhere to make comments in python
2009-07-20 20:42:13 +00:00
c72064272f 2.5 Lamps:
* Replaced RNA ENUM hacks for "shadow method" and "shadow_ray_sampling_method" with modifications in the layout file.
2009-07-20 20:34:14 +00:00
Dalai Felinto
9a9d118bbf BGE panels: wip
Logic Panel:
- world settings (moved from world)
 ... that includes physic engine selection + gravity
- game player (from gamesettings, it wasn't wrapped)
- stereo/dome (from gamesettings, it wasn't wrapped)
 ... separated stereom into stereoflag and stereomode
- properties
 ... (didn't touch it)

Buttons Game Panel:
(wip panel)
- Physics (moved from Logic Panel)
 ... it will be a datablock in the future (right Campbell ?)
- Material Physics (not currently implemented)
 ... a datablock link to the materials of an object + the dynamic physic variables

* NOTE:
in readfile.c::do_version I couldn't do if(scene->world). There is something wrong with scenes with an unlinked world. So so far we are ignoring the old values....
2009-07-20 20:28:29 +00:00
1b7f1bc72d mistake in own recent change, errors with startup scripts didnt raise errors 2009-07-20 20:00:59 +00:00
e43c425e8c Ok, first commit! Hope this goes ok.
Added the Turbidity parameter to the Sky panel in lamp buttons, since it affects sky as well as atmosphere.
2009-07-20 17:59:45 +00:00
0b4a6ddf4a 2.5 Notifier:
* Added some missing notifier for 3DView Display settings.
2009-07-20 17:42:40 +00:00
d301d8174c Some little UI adjustments to cloth + fluid panel and their presets 2009-07-20 17:15:41 +00:00
587d408f61 patch from William
Cleaned up force fields panel, as well as the other fixes (sculpt, lamps)
2009-07-20 16:39:16 +00:00
33bfd7397b BGE Button types panel, can edit existing buttons but not add new ones yet.
World Physics panel too though Im not sure if we'll eventually move this into another struct.
2009-07-20 16:21:55 +00:00
cc69f13013 2.5 - Constraints Editing + Keyframe Drawing Tweaks
Constraints:
* Adding constraints with targets should now work. 
-- (When no target is provided, the code to create a new target is not yet in place again yet)
* Constraints can be added in Object and PoseModes again using the Ctrl-Shift-C hotkey. 
* All constraints can now be cleared from the active Object or selected Bones using the Ctrl-Alt-C hotkey.
* Added warnings when adding constraints invalid for the current context, and removed the old add_constraint() function.
* Buttons window updates correctly after adding keyframes now

Keyframes Drawing:
* Removed un-necessary extra function-call for RB-Tree implementation, by inlining a special one-off case.
* Keyframe diamonds which are not within the viewable area are now not drawn (but filtering will still need to find them).
2009-07-20 12:42:31 +00:00
8bf9a8cb1e Added error prints if the text's main is not set. 2009-07-20 11:30:27 +00:00
ae7e321c8b 2.5 - Fixes to try and let C++ compilers not choke on DNA_anim_types.h 2009-07-20 10:43:41 +00:00
4d0a6fee4a cmake option to disable SDL,
bpy_interface.c - change order of checking scripts to avoid calling stat on .py files.
2009-07-20 10:24:53 +00:00
b76009232e 2.5 - Bugfixes
* Fix for crash when holding down downarrow in the info-header search box. Was caused by badly written poll callback for file-browser. Thanks pidhash for noticing the error

* Made add constraint operators work again from 3D-View. They were using the wrong context pointer when in the 3D-View, since the old one was only valid for the buttons-window. Now they check which window they're in.
2009-07-20 00:02:03 +00:00
4e9171e6f6 binreloc wasnt working with cmake. 2009-07-19 19:36:56 +00:00
62ffb81316 d_type isnt a member of dirent on win32. 2009-07-19 18:51:25 +00:00
979bec79c3 - Support for importing python packages. (directories of python scripts containing an __init__.py)
- BLI_add_slash returns the new string length.
- BLI_where_am_i() would often have /./ in the path (not incorrect but annoying, got into python exceptions)
- release/ui/space_image.py, py error referencing invalid keyword args.
2009-07-19 17:45:14 +00:00
d410135408 Sculpt+Paint/2.5:
* Moved brush NKEY panel from C to Python. Could use some UI review :)
* Added a NULL check in bpy_internal_import.c, was crashing here on Python errors
* Added RNA for vpaint brush and for weight paint
* Added context for vpaint/wpaint similar to edit_object and sculpt_object
2009-07-19 17:44:44 +00:00
8ac67fcd21 Remove unneeded manipulator functions.
Disable manipulator drawing while moving. This still use G.moving, but that's acceptable for now (it's sort of a weird display option, after talk with Ton, we couldn't find a good place to set it).
2009-07-19 17:42:01 +00:00
20f1fb6a7f 2.5
Bugfix: extrudes failed when called a 2nd time, missing statistics
update. Reported by Sanne in irc, thanks!
2009-07-19 17:14:26 +00:00
9e047d5acc 2.5
Bugfix: the 'active 3d view layer' was never set, causing issues when
adding new objects. Reported by Martin, thanks!
2009-07-19 16:53:57 +00:00
b96a6e1838 issues auto generating rna docs
- add a warning when an operator name is NULL, set it to a dummy name to prevent crash. POSE_OT_constraints_clear had its name commented (not sure why)
- rna_Object_parent_type_itemf wasnt checking for context being NULL, needed for docs else it crashes.
- bpy.ops.add/remove didnt show up in a dir(bpy.ops)
2009-07-19 14:57:20 +00:00
d9a7e5144f Python operators
- simplified C operator API bpy.__ops__ since its wrapped by python now.
- needs the class to have an __idname__ rather then __name__ (like menus, headers)
- convert python names "console.exec" into blender names "CONSOLE_OT_exec" when registering (store the blender name as class.__idname_bl__, users scripters wont notice)
- bpy.props.props ???, removed
2009-07-19 13:32:02 +00:00
8efdb04817 2.5 - Recode of Add Constraint Operator(s)
Add Constraint operators are now based on the old add_constraint() function (to be removed when the new code works well). 
- Fixed a few bugs with the code, including depsgraph missing rebuild call, and unique-naming for constraints failing due to wrong order for adding constraint to list
- Added capabilities for setting the target of the constraint to the first selected object/bone for the operator when called from menus + hotkeys (but not for buttons window)

This commit is still buggy. I'll fix the remaining issues tomorrow, as well as adding some more operators for IK add/clear.
2009-07-19 13:06:18 +00:00
f72018ebeb 2.5
Small fix: Triple Buffer mode didn't clip custom paint cursors correctly
for overlapping regions (example, view3d paint circle drawing into toolbar)
2009-07-19 12:15:20 +00:00
26ec00d567 First version of fields panel.
Please keep in mind: I am no python expert and may have some ugly layout-tricks in this file. GUI designed by nudelZ. 
Commit approved by William ;-)
2009-07-19 11:28:43 +00:00
08ef73ab3e 2.5
Requested UI feature: when scaling Blender window, the buttons view keeps
scale (in visible pixels) as previously. Also works for the .B25.blend, which
currently will show the buttons a bit too large for small screens... this 
because the .B25.blend was created on a 1920x1200 screen. Might need a config
inbetween... 1440x1080 or so? Or we make a couple of defaults later.

Additional feature could be to also scale the buttons area itself, but that
will change the entire screen layout too much, potentially giving bad issues
with extremer scaling.
2009-07-19 11:13:15 +00:00
1917e951ca py rna arrays were assumed sizeof(char)*len, should be sizeof(int)*len, was causing end of array corruption errors when running operators that took bool array options - transform. 2009-07-19 09:33:27 +00:00
8ced84eec9 2.5 - Clear Constraints Operators
Added some operators to clear all constraints on the active object or the selected bones.
2009-07-19 07:20:21 +00:00
388af9d827 2.5 - Warning Fixes + Hotkey for Reversed Playback
Reversed playback can now be activated using the Alt-Shift-A hotkey. It works the same way that the Alt-A playback operator works.
2009-07-19 05:20:30 +00:00
7411a86a41 - was freeing reports on freed listbases
- free reports in a single loop.
- extrude was using a NULL scene, crashed when used as a macro
2009-07-19 04:50:10 +00:00
aad1f809dd SVN maintenance. 2009-07-19 02:28:59 +00:00
880c3756e9 Store sketch in armature instead of ugly global.
Like edit data, this isn't saved, just a temp pointer used during work session.

Also bring back sketching panel for 3d view.
2009-07-19 02:26:01 +00:00
036c0012e6 Sculpt/2.5:
* Added pointer RNA for the sculpt brush
* Converted sculpt settings panel (in the NKEY area) from C to Python
* For Python UI, needed context for whether sculpt is enabled or not; discussed this with Brecht and added sculpt_object to scene context
2009-07-19 01:55:21 +00:00
d7564761c0 operator macro playback (run operator reports in the console)
- reports can be selected with RMB, Border (bkey) and (de)select all.
- delete reports (X key)
- run operators in the console (R key)
- copy reports (Ctrl+C), can be pasted in the text editor an run with alt+p

Details
- Added "selected_editable_objects" and "selected_editable_bases" to screen_context.c, use the scene layers, this was needed for duplicate to run outside the 3D view.
- RNA_property_as_string converted an array of 1 into "(num)" need a comma so python sees it as a tuple - "(num,)"
- add flag to reports, use for seletion atm.

opens a new world of context bugs :)
2009-07-19 00:49:44 +00:00
ad2e306b09 SVN maintenance. 2009-07-18 23:12:42 +00:00
2d88c069bc missed this file in last commit. 2009-07-18 19:42:13 +00:00
9b75187c55 initialize keymaps after python so python keymaps, solves the problem of keymaps complaining about python operators not existing, but at the expense of some annoying init flags/functions. :/
Brecht/Ton you may want to check that C->data.py_init is a good place to store this.
2009-07-18 19:40:26 +00:00
119844eb23 fixes for errors on startup and compiler errors and draw speedup.
* Drawing the console text now skips all lines outside the view bounds.

* Added dummy C operators for console.exec and console.autocomplete so blender wont complain at startup, its not really a problem but people testing reported it a few times. Eventually we should have some way python operators are initialized before the spaces operators are checked.

* reordered the imports so the "ui" dir is imported before "io", for now this means bpy.ops is defined before exporters and importers need to use it, was causing a python error on startup.

* fixed all compiler warnings for the console (gcc4.4)

* stopped operators were printing out the return flag.

* removed references to ACT_OT_test, TEXT_OT_console_exec and TEXT_OT_console_autocomplete
2009-07-18 16:27:25 +00:00
75b8badda5 2.5 / RNA Fix for render layers' rendering options
Was using same flag for all options
2009-07-18 15:14:59 +00:00
d0b6a27104 Second round of transform mouse buttons experiment.
Confirm on LMB up but cancel on RMB down.

This works well with hotkeys, manipulator, RMB+drag and gesture (when they are added back).

The question is do we stick with one scheme for all or have separate keymaps for different "calling mode".
2009-07-18 15:02:12 +00:00
d9e16f494f Use verb for operator names
Translation -> Translate
Rotation -> Rotate
2009-07-18 14:55:03 +00:00
c13674614e 2.5/Sculpt:
* Fixed the NKEY panel not updating when switching to sculpt mode
* Removed some old XXX'd code for testing textures, can replace that now with proper brush-texture UI
2009-07-18 13:29:47 +00:00
3a32411f2b 2.5 - Removing quick test operator that I added by mistake
It was used to quickly test that the red-black tree was being built correctly, but was really an incomplete operator...
2009-07-18 11:39:50 +00:00
178bc61dd3 2.5
Fix for Makefile to use GLEW in console editor
2009-07-18 11:32:52 +00:00
169a87cb0b 2.5 - Optimisations for Keyframe Drawing in DopeSheet
Keyframes are now prepared for drawing by being added to a binary-tree structure instead of using insertion-sort on a Double-Linked List. This gives rather significant improvements on a few bad cases (*).

I've implemented a basic Red-Black Tree whose nodes/data-structures can also be used as a simple Double-Linked List (ListBase) for this purpose. The implementation of this tree currently does not have support for removing individual nodes, since such capabilities aren't needed yet. 

Stats (using keyframes from an imported .bvh animation file):
* When only the keyframes are drawn (i.e. long keyframes are not identified), the time needed to draw the DopeSheet region 10 times went down from 4000ms to about 300ms.
* When long keyframes are considered as well, the same test has gone from 6000ms to 3000ms. There is still a bottleneck there that I haven't been able to remove yet (an attempt at this made the runtimes go through the roof - 32000 ms for the test done here).

Assorted Notes:
* Added missing headers for some files
* Fixed profiling flags for mingw. There was an extra space which prevented the sound-code from compiling.
2009-07-18 07:11:37 +00:00
43ac3aebf3 worked for me but broke building for eman, this fixes (both on linux which is confusing). 2009-07-18 07:01:16 +00:00
7018af51cd removed BeOS dirs (BeOS isn't supported anymore)
removed unneeded includes for the console.
2009-07-18 05:26:47 +00:00
d1bafa00c6 2.5 - Quick fix for NLA drawing
When some object had materials that may have been driven/animated, a crash could sometimes occur if some material-slot had no material.
2009-07-18 04:16:51 +00:00
ffdd2d12ce patch from oxben (Benjamin)
* fixes two typos in the material buttons: "Recieve" -> "Receive"
* adds a missing preference in the User Preferences view: "Rotate Around Selected"
2009-07-18 04:09:23 +00:00
4fb20358e4 Source code with executable property, manual fix. *sigh* 2009-07-17 18:35:49 +00:00
802ca7f639 patch from William, adds some rna user prefs and adjusts prefs UI. 2009-07-17 12:35:57 +00:00
a705f64245 python access to operators now hides the _OT_ syntax, eg. SOME_OT_operator -> some.operator
this works for the calling operators from python and using the RNA api.

bpy.ops.CONSOLE_exec() is now bpy.ops.console.exec()

eg.
split.itemO("PARTICLE_OT_editable_set", text="Free Edit") becomes... split.itemO("particle.editable_set", text="Free Edit")

For now any operator thats called checks if its missing _OT_ and assumes its python syntax and converts it before doing the lookup.

bpy.ops is a python class in release/ui/bpy_ops.py which does the fake submodules and conversion, the C operator api is at bpy.__ops__

personally Id still rather rename C id-names not to contain the _OT_ text which would avoid the conversion, its called a lot since the UI has to convert the operators.
2009-07-17 12:26:40 +00:00
1ef7293585 Colour Management
- 1st stage: Linear Workflow

This implements automatic linear workflow in Blender's renderer. With the 
new Colour Management option on in the Render buttons, all inputs to the 
renderer and compositor are converted to linear colour space before 
rendering, and gamma corrected afterwards. In essence, this makes all 
manual gamma correction with nodes, etc unnecessary, since it's done 
automatically through the pipeline.

It's all explained much better in the notes/doc here, so please have a look:
http://wiki.blender.org/index.php/Dev:Source/Blender/Architecture/Colour_Management

And an example of the sort of difference it makes:
http://mke3.net/blender/devel/rendering/b25_colormanagement_test01.jpg

This also enables Colour Management in the default B.blend, and changes the 
default lamp falloff to inverse square, which is more correct, and much 
easier to use now it's all gamma corrected properly.

Next step is to look into profiles/soft proofing for the compositor.

Thanks to brecht for reviewing and fixing some oversights!
2009-07-17 02:43:15 +00:00
70f6255433 bpy rna
Calling rna functions with invalid keywords, too many keywords and too many args would fail silently
- now raise an error with invalid keywords and a list of valid ones, raise an error when too many args are given.
- calling rna functions would alloc a ParameterList each time, changed to use a stack variable (2 pointers and an int).
- store the number of parameters ParameterList
- python exception types were wrong in many cases, (using attribute error rather then type error)
- fixes to small errors in python UI scripts.
2009-07-17 02:31:28 +00:00
c6c853d88a 2.5 - 2 Tweaks
* Comment re-formatting for keyframe drawing code
* Removed redundant frame number button from buttons view header.
2009-07-17 00:17:37 +00:00
ef28383ab9 grr, py 2.5 2.6 and 3.x need different StringIO's 2009-07-16 23:04:29 +00:00
deb180e37f - Scrollbars for the console (use View2D functions)
- Set View2D operators not to register, got in the way a lot with the console.
- Made autocomplete Ctrl+Enter so Tab can be used.
- Should work with python 2.5 now. (patch from Vilda)
- Moved report struct definitions into DNA_windowmanager_types.h, could also have DNA_report_types.h however the reports are not saved, its just needed so the report list can be used in the wmWindowManager struct. Fixes a crash reported by ZanQdo.
- Store the report message length in the report so calculating the total height including word wrap is not so slow.
2009-07-16 22:47:27 +00:00
9eebb2ca36 SVN maintenance. 2009-07-16 22:06:04 +00:00
37d33d0b76 2.5 UI: Renaming cloth UI file to fit naming scheme 2009-07-16 21:22:52 +00:00
Nathan Letwory
d1169a4e12 * revert reversion by Genscher. This '/MT' business is now handled in Blender.py 2009-07-16 20:00:15 +00:00
f029bee6cb Win64: revert to use static msvc libs again 2009-07-16 19:56:47 +00:00
Nathan Letwory
2e854ec7cf SCons
* ensure all SConscripts are ready for win64-vc (where necessary).
* ensure we have proper _DEBUG flag for Python when we're doing a debug build.
* some cleaning up of linking etc.
* ensure /EHsc is there for game engine modules.
2009-07-16 19:41:28 +00:00
Chris Want
f77ef3d859 Don't link gameplayer against the decimation code (CMake). 2009-07-16 18:44:48 +00:00
730f319130 Another fluid + (little) cloth gui and settings update 2009-07-16 14:31:32 +00:00
0621225b38 2.5 - View2D fixes for User Prefs
Added NULL check for View2D code for invalid style pointer (this underlying problem should get addressed at some point), and reinstated the reinitialisation hack for panel regions.
2009-07-16 11:05:16 +00:00
9f2a13b263 2.5 - User Preferences Layout patch from William
Screenshot here:
http://www.reynish.com/files/blender25/userprefs_layout.png
2009-07-16 10:32:21 +00:00
88e3e8c1c9 - use outliner colors (with subtle stripes) for report so you can see divisions between operators with wrapping.
- added class option for PyOperators __register__ so you can set if py operators are logged in the console.
- PyOperators was refcounting in a more readable but incorrect way. in some cases would be possible to crash so better not drop the reference before using the value.
- console zoom operator was registering which meant zooming in to see some text would push it away :)
2009-07-16 07:11:46 +00:00
513dcf7b46 2.5 - Silencing various compiler warnings (mingw) 2009-07-16 04:45:52 +00:00
111be5ea2a Extrude along normals.
Note that this is on in all cases now, it needs to be restricted to face extrude only.

Some slight transform operator cleanup too.
2009-07-16 03:16:03 +00:00
2b99cdd5ca Add Makefile build support for Console Space Type (added in r21611). 2009-07-16 03:11:21 +00:00
772f6d9495 * Temporarily commented out a couple of lines from Brecht's User Prefs commit
Brecht: This makes Blender crash on startup for a few of us, so I'm just 
disabling it for now until you have have a look at it
2009-07-16 02:29:49 +00:00
77c3b12023 SVN maintenance. 2009-07-16 02:04:31 +00:00
2f74b5a260 Console Space Type
* interactive console python console.
* display reports and filter types. defaults to operator display so you can see the python commands for tools as you use them,
  eventually it should be possible to select commands and make macto/tools from them.

Example use of autocomp.  b<tab>, bpy.<tab>, bpy.<tab>, bpy.data.<tab> etc.

basic instructions are printed when opening the console.

Details...
* Console exec and autocomp are done with operators written in python.
* added CTX_wm_reports() to get the global report list.
* The window manager had a report ListBase but reports have their own struct, switched to allocate and assign when initializing the WM since the type is not available in DNA.
* changed report types flags for easier display filtering.
* added report type RPT_OPERATOR
* logging operators also adds a python-syntax report into CTX_wm_reports() so they can be displayed in the console as well as calling a notifier for console to redraw.
* RnaAPI context.area.tag_redraw() to redraw the current area from a python operator.

Todo...
* better interactions with the console, scrolling, copy/paste.
* the text displayed doesnt load back.
* colors need to be themed.
* scroll limit needs to be a user pref.
* only tested with cmake and scons.
2009-07-16 00:50:27 +00:00
Nathan Letwory
ce431c5c6e make py3.1 default for mingw/scons too. 2009-07-15 23:26:24 +00:00
7dc0083921 2.5: fix for uninitialized var in 3d view header template. 2009-07-15 23:24:51 +00:00
acb07bf013 2.5: fix for closed panels not resizing properly. 2009-07-15 22:58:34 +00:00
7c2fb42195 2.5: Defaults
* Wave modifier speed 0.5 -> 0.25.

* Particles even and random distribution on.
* Particles normal velocity 0.0 -> 1.0.
* Particles size 1.0 -> 0.05.
* Particles draw emitter and material color on.

* Field strength 0.0 -> 1.0

* Object drawing without material was not consistent
  with default material.

* Panel title 13 -> 12 points.
2009-07-15 22:58:12 +00:00
a8ce1a1586 2.5 - Tweak to Action Constraint 'Transform Channel' order of options 2009-07-15 22:51:47 +00:00
d4504aa891 2.5
* Some changes to make lamp and world textures editing work.
  You may have to click on another texture slot once before
  being able to add a texture, and the layout is messy. Added
  this so lightenv project isn't blocked by this being missing.
* Adding a new material slot now doesn't create a new material
  anymore, to avoid creating unused materials.
* Tiny changes to scene/object buttons.
2009-07-15 19:20:59 +00:00
4df1836325 2.5: User Preferences
* Added basic infrastructure to layout user preferences. The
  intention is that you open a user preferences space in place
  of the buttons space, and have panels there.
* The existing sections don't have to be followed, it's easy
  to create different ones, just change the user_pref_sections
  enum in RNA.
* This will get separated from the info header later.
2009-07-15 19:19:43 +00:00
99f373dc58 == Sequencer ==
Small fix for:

* Scene-Strip rendering with compositor scenes failed, if they
  had no camera attached...
2009-07-15 16:17:22 +00:00
Dalai Felinto
097d05a1af tiny fix: stamp alpha color was lacking range parameter
I was going to commit it later with other changes, but I'm changing other stuff at rna_scene.c for the gamedata, and didn't want to mix it up.
2009-07-15 03:47:05 +00:00
Nathan Letwory
d3799843aa * set py 3.1 as default for windows
* add some ignores for some warnings (which seem to be ignored on nixes already).
* add zips for py 3.0 and py 3.1. Note: py 3.1 zip contains entire Lib
2009-07-14 23:26:26 +00:00
d2d2c3aec2 2.5: added panel with IK settings for bone. 2009-07-14 22:11:25 +00:00
efe8e8dd15 2.5: small tweaks for scene and object layouts. 2009-07-14 20:38:21 +00:00
83acd4ac6b 2.5: Objects
* Added Relations panel with layers, pass_index, parent.
* Groups panel now can do add to group/remove from group.
* Parent, parent type, track are now editable.
* Separate constraint add operator for object and bones.
2009-07-14 20:27:28 +00:00
f1a745c436 2.5: Armature
* Bone Transform panel now works, using appropriate EditBone or
  PoseChannel properties.
* Bone name and parent are now editable.
* Some other tweaks to the UI layouts for Armature and Bone.
* Notifiers for armature/editbone properties.
2009-07-14 17:59:26 +00:00
4b3dafcaa7 RNA
* RNA_enum_items_add_value and RNA_enum_item_add_separator utility
  functions, to add an item from an existing array with a certain
  value, and to add a separator.
2009-07-14 17:35:07 +00:00
3f154c1482 error in setting the alpha value when drawing text into a char buffer.
Would only show the errors with sequencer rendering with the stamp option enabled, since blenders rendering uses a float buffer.
2009-07-14 15:08:07 +00:00
42e2796a51 2.5 Scene Buttons:
* Replaced Render Layer Dot Icons with X ones. Patch by William Reynish.
2009-07-14 13:20:46 +00:00
99e369d38d 2.5 Buttons:
* Some Updates for n-key Areas in View3D and Image Editor and some tweaks in bone panels. Patch by William Reynish. Thanks!
2009-07-14 12:32:19 +00:00
6e1e212162 2.5 Outliner - Restored all the 'toggle' operators
* AKEY - Toggle Outliner Selection (*1)
* Shift-AKEY - Expand/Collapse All
* RKEY - Toggle Renderability
* SKEY - Toggle Selectability
* VKEY - Toggle Visiblity

(*1) - The keymap-order of these has been swapped from the ones used in 2.4x. The old keys used here were inconsistent with the rest of Blender (at least I found myself always getting annoyed that I'd accidentally collapsed/expanded all items by hitting AKEY many times).
2009-07-14 12:23:08 +00:00
77a5fccb1f 2.5 Outliner - Restoring a few operators
Restored the following operators
* Show Hierarchy (HomeKey)
* Show/Hide One Level (+/- Keys)
* Show Active (Numpad .)
2009-07-14 11:56:24 +00:00
047c9e0e4e 2.5 - Scrollbars are now shown when a list of panels can't fit in view
Notes:
- These may be taking up a bit too much room in some situations. Perhaps an option to turn these on/off is needed?
- I've added a quick hack in area.c -> ED_region_panels_init() to set the flags to make scrollbars show up in regions whose View2D data has already been initialised. This is primarily aimed at the Buttons Window in the 2.5 defaults file, which seems to have been saved in 2.5 or so
- The expand icons on either end of the scrollers don't really seem to be necessary? (or not working yet)
2009-07-14 10:59:21 +00:00
0bfc98706e RNA/button tweaks:
* Texture -> renamed 'no rgb' to 'rgb to intensity' (btw it's not just for
 image textures )

* Render -> stamp closed by default - not taking effect, because saved in 
.B.blend. How do we fix this? 

* Material -> removed 'Buffer Bias' dependency - it's for receiving shadows,
not casting them

* Material -> Ray Shadow bias renamed 'Auto Ray bias' - switches between an
 automatically calculated value vs the specified value
2009-07-14 04:13:04 +00:00
8f98c5e873 Fix cloth UI + tooltips - patch provided by nudelZ 2009-07-13 22:35:04 +00:00
2ba8b72157 RNA & PyAPI
* support for dynamic enums to be inspected enumProp.items() from python.
* fix, enums check for a separator was flipped, meant no enums were in docs.
* dynamic enum functions now check for a NULL context and return all possible options for the "items" attribute used for docs.
* added an arg for rna arrays to free the array there looping over (needed to free dynamically allocated enum items)
* python api checks for NULL items since this can happen in some cases.
* python api, When getting an enum ID from an int in an array - If it failed it would get the first enum identifier and return that. Brecht? dont understand, making it return an empty string in these cases.
2009-07-13 19:33:59 +00:00
1334ed3038 2.5: fix for last commit, missing ffmpeg #ifdef. 2009-07-13 19:17:52 +00:00
e1e489c13b 2.5: and the B.blend.c to go with the last commit. 2009-07-13 19:10:35 +00:00
41fb3626f3 2.5: Render
* UI layout for scene buttons has quite some changes, I tried to
  better organize things according to the pipeline, and also showing
  important properties by default, and collapsing less important ones.

Some changes compared to 2.4x:
* Panorama is now a Camera property.
* Sequence and Compositing are now enabled by default, but will only
  do something when there is a node tree using nodes, or a strip in the
  sequence editor.
* Enabling Full Sample now automatically enables Save Buffers too.
* Stamp option to include info in file is removed, it now simply always
  does this if one of the stamp infos is enabled.
* Xvid, H.264 and Ogg Theora are now directly in the file format menu,
  but still using FFMPEG. Unfortunately Ogg is broken at the moment
  (also in 2.4x), so that's disabled. And Xvid crashes on 64bit linux,
  maybe solvable by upgrading extern/xvidcore/, using ubuntu libs makes
  it work.
* Organized file format menu by image/movie types.

Added:
* Render layers RNA wrapped, operatorized, layouted.
* FFMPEG format/codec options are now working.

Defaults changed:
* Compositing & Sequencer enabled.
* Tiles set to 8x8.
* Time/Date/Frame/Scene/Camera/Filename enabled for stamp.
2009-07-13 19:09:13 +00:00
689abe000d 2.5: bugfix for BLI_is_writable, made render with Save Buffers
not work anymore. Now it first tries to open the file without
truncating, and only then tries to create a new file.
2009-07-13 18:47:08 +00:00
1227d5d6d3 mathutils types didnt work properly in python2x. vec*matrix failed for eg.
Now with KX_Python.h line 35 commented YoFrankie 1.1 should run unmodified in blender2.5
2009-07-13 12:17:07 +00:00
030e5bd93e Drawing a string longer then 255 chars wasnt working.
changes to flatten_string_append(...), probably only brecht is interested.
- It was copying from the old malloc'd buffer but never the fixed buffer - the reason >255 length strings didnt render.
- on first malloc for the FlatString allocate 512 rather then 256 chars since the fixed string is 256 chars.
- if the char was '\0' fs->pos was set to 0, not sure why since char cant be '\0' because of the loop that calls flatten_string_append, removed.
2009-07-13 11:41:24 +00:00
b5eff581bc Console Autocomplete (Alt+Enter in the text editor), should be moved out of the text editor soon.
The autocomplete function is generic and could be made into its own module.
Examples:
 b -> bpy

 bpy.data.mes -> bpy.data.meshes

 bpy.ops.OB -> bpy.ops.OBJECT_OT_

 bpy.data.objects[0].a -> (options)
active_material, active_material_index, active_particle_system, active_particle_system_index, active_shape_key, active_shape_key_index, active_vertex_group, active_vertex_group_index, animation_data
2009-07-13 09:31:35 +00:00
89830ea0c8 calling operators from python was raising an error without returning an error value.
brecht, switched the order back to fix this, added an argument for WM_operatortype_find() to fail without printing an error.
2009-07-13 08:33:51 +00:00
26ef6da24b 2.5
* Objects now support up to 32767 material slots. It's easy to
  increase this further, but I prefer not to increase the memory
  usage of mesh faces, it seems unlikely that someone would
  create 32767 distinct materials?
* Forward compatibility: the only thing you can potentially lose
  reading a 2.5 file in 2.4 is object linking (instead of default
  data), though usually that will go fine too. Reading files with
  > 32 material slots in 2.4 can start giving issues.

* The ob->colbits variable is deprecated by the array ob->matbits
  but I didn't remove the ob->colbits updates in very few places
  it is set.
* I hope I changed all the relevant things, various places just
  hardcoded the number 16 instead of using the MAXMAT define.

* Join Objects operator back. This is using the version from the
  animsys2 branch coded by Joshua, which means it now supports
  joining of shape keys.

* Fix for crash reading file saved during render.
2009-07-13 00:40:20 +00:00
6fb0181b50 Keyed physics refresh:
- Keyed targets in one list instead of "chaining", this opens up many more possibilities than before and is much less obscure.
- Better keyed timing possibilities (time & duration in frames).
- Looping over keyed targets list.

Other changes:
- New child setting "length" with threshold (great for guard & underfur with a single particle system)
- Modularization of path interpolation code.
- Cleared "animateable" flags from many particle settings that shouldn't be animateable.

Fixes:
- Keyed particles weren't copied properly (ancient bug).
- Hair rotations depended on global z-axis for root rotation so downward facing strands could flip rotation randomly. Now initial hair rotation is derived from face dependent hair matrix. (This caused for example ugly flipping of child strands on some cases).
- Children from faces weren't calculated straight after activating them.
- Multiple disk cache fixes:
	* Disk cache didn't work correctly with frame steps.
	* Conversion from memory cache to disk cache didn't work with cloth.
	* Disk cache crashed on some frames trying to close an already closed cache file.
	* Trails didn't work with disk cached particles.
- Child rough effects were effected by emitter object loc/rot making them next to useless with animation, why didn't anybody tell me this!!
- Lots of random code cleanup.
2009-07-12 23:38:47 +00:00
5f8f2fc33a 2.5 filebrowser
* bugfix: parent on linux didn't account for first slash
* added some BLI_cleanup_dir to prevent weird directory names
* revert to old directory if user types bogus text.
2009-07-12 13:06:52 +00:00
78703a9ef8 python console in ~80 lines
Shift+Enter in the text editor executes the TEXT_OT_line_console operator defined in space_text.py

The operator's class stores a namespace for each text block.

Eventually this should have its own input rather then using the text editor.

Tested with py3.1 and 2.6

TEXT_OT_insert was only using the first char from a string, added support for inserting strings.
2009-07-12 12:47:34 +00:00
184dca5396 2.5 file browser
* tweak for autocomplete, only update live if live_update and TAB key is hit. (Brecht, please check if it's ok, otherwise will revert and we'll find another way)
* adding slash at the end of directory to allow for faster autocomplete
* bugfix: directory name buton had wrong length
2009-07-12 09:03:09 +00:00
2940384d9a 2.5 file browser
* bugfix: adding back adding the region on read of old files
* tweak: buttons for increment/decrement file number now have icons and size adjusted to UI_UNIT_X/UI_UNIT_Y
2009-07-12 08:12:22 +00:00
ba1082444e made text editor margin work with different font sizes.
also made it draw the width needed, was fixed at 4.
2009-07-12 07:37:25 +00:00
345be5cbbc 2.5 - Tweaks for Split Strips in NLA and Graph Editor view ranges
* Split strips now uses the current frame as the splitting-point for selected strips if the current frame falls within in the bounds of the strip. Otherwise, the code defaults to splitting by the midpoints of the strips.

* Time-range for Graph Editor is saner now when there is only a single keyframe or none at all.
2009-07-12 07:28:25 +00:00
fa8bd34d95 NLA Bugfixes:
* Fixed crash when anim-playback is running and a strip beside a transition gets transformed. 
Transition strips no-longer assume that their neighbours are action-clips, using the standard NLA-strip evaluation function instead to evaluate their neighbours. However, a check for ping-pong recursion needed to be added there, so that a transition beside a meta-strip, with the meta having a transition nested at the start of one of its levels, wouldn't fail with stack overflow.

* Moved 'Tweak Mode' menu entry to Edit menu, since it's not really that modal.
2009-07-12 04:29:36 +00:00
bb158ad572 2.5 - Editing Animation data (keyframes/nla-strips) using transform tools now refreshes the 3d-view in realtime.
For now, this directly sets the update flags, though this really should be calling the Depsgraph API instead.
2009-07-12 03:42:39 +00:00
3116062a82 2.5: Couple of small fun features
* Text window font size now supports full range 8-32, instead of
  just 12 and 15. I added BLF_fixed_width to get the character
  width of a fixed size font.

* Buttons do undo push on change again.

* Animated/Keyframe/Driver colors are now themable, with blend
  value to blend with original color. Set this to 0.5 now to
  give colors less constrast.
* Fix tooltip popping up with RMB menu open, and missing redraw.

* Autokeyframe now works for buttons.

* Driver expressions can be edited in place in a button now.
  (still some refresh issues).
* Also made python driver default for the Add Driver function
  in the RMB button. This way you don't have to open a Graph
  editor if you just want to type an expression. Also, the
  default expression then is the current value.

* Tooltips now show some extra info, not sure what is good to
  have, but currently I added:
  * Shortcut key for operator buttons.
  * Python struct & property name for RNA buttons.
  * Expression for driven values.
  * Value for text/search/pointer buttons.
2009-07-12 02:06:15 +00:00
8b9bb47a3f Cleaning up manipulator code a bit
Made transform confirm or cancel on mouse up. More inline with button clicking and better for tablets.

Add operator params to make sure Rip and Extrude turn off PET and Mirror correctly.

Note: sorry for all the whitespace changes, I need to reconfigure this editor not to do autocleanup.
2009-07-12 02:01:13 +00:00
42469ba1e5 SVN maintenance. 2009-07-11 22:22:53 +00:00
f787712cbb 2.5 MSVC projectfiles
* update for NLA merge from Aligorith
2009-07-11 17:29:53 +00:00
79134a54b9 2.5: X11
* Cursor grabbing is now done only if the OPTYPE_BLOCKING flag
  is set for the operator, since for e.g. render it should not
  block.
2009-07-11 14:51:13 +00:00
f3fdf9257b 2.5: use primitive icons in the Add Object menu. 2009-07-11 14:50:12 +00:00
b1d01dae36 PyApi
* refcount error if StringIO or io modules could not be imported
* importing python modules like math didnt work because the script registration overwrote the script path. now just prepend the path.
2009-07-11 13:57:56 +00:00
b775f1bb32 2.5:
* Code to start moving 3D view header and panels to python, at
  the moment the View menu and one empty panel is in python. The
  C header code is wrapped in one template, so parts of that can
  be moved over while still keeping things working.
* Fix for mistake in RNA enum commit yesterday, and some warning
  fixes.
2009-07-11 13:32:20 +00:00
0096a3dee2 2.5 - Made more operators for constraint buttons
* Move Up/Down and Delete are now operators 
* Made TrackTo constraint use expanded enum toggles for up axis too. 
--> BUG ALERT: specifying name and expand in the arguments to itemR doesn't work (name gets skipped)
2009-07-11 12:54:17 +00:00
10d14e7259 2.5 - Restored Set/Clear Inverse Buttons for ChildOf Constraint
I've tagged these operators with CONSTRAINT_OT_* not OBJECT_OT_constraint_* since constraints can operate on Bones too (and do so more often)
2009-07-11 11:52:20 +00:00
8a1caaed32 Object mode select grouped operator (Shift+G and Select manu)
Group option currently doesnt handle multiple groups.

Set makefiles python version to 2.6 for linux since its common now.
2009-07-11 11:31:49 +00:00
5022bf7ccd 2.5 - Fixing some typos for name of Graph Editor operator
An error that slipped in during the merge process?
2009-07-11 10:23:07 +00:00
a7837efb16 2.5 - Added descriptions to all Animation Editor operators
DopeSheet and Graph Editor operators were missing these, since many of these operators were written before that field was added.
NLA Editor's operators already have them.
2009-07-11 10:20:48 +00:00
a7287165db remove duplicate function. 2009-07-11 07:46:11 +00:00
4a0df3ad7b 2.5 - NLA SoC Branch Merged to 2.5!
(19863 to 21513)

Highlights of the new NLA System (and related Animation System changes):
* NLA Data is stored in AnimData alongside Action and Drivers. The NLA stack is evaluated before the Action, with the Action always overriding the results of the stack.
* NLA Data is arranged in 'Tracks', which act like PhotoShop layers. These can be muted, protected, and/or made to be played back by themselves
* Within each track, there can be multiple 'Strips'. There are 3 types of strip -> Action Clip (references some action), Transition (blends between the endpoints of two strips), and Meta (container for several strips that occur sequentially)
* FModifiers can be applied to strips, and strips can have animated influence/time controls. Playback for strips can also be backwards now!
* Playback can now go in forward and backwards directions.
* Animation Editors have been polished (unfinished features added, existing features cleaned up and made more consistent)

Notes for BuildSystem Maintainers:
* Only scons has been actively tested. Makefiles should work fine.
* MSVC ProjectFiles are broken due to the very way they work.
* CMake status unknown...

Other notes:
* Hopefully I haven't made any mistakes while doing the merge. More files than expected were showing some weird conflicts, so you may have some broken code...
* Not all old files (with NLA) data load exactly the same anymore. However, the bulk of the files out there should be ok (I hope)
2009-07-11 05:41:21 +00:00
576a642ff9 NLA SoC: Merge from 2.5
21470 to 21512

Next up, NLA-branch to 2.5 :)
2009-07-11 03:23:45 +00:00
1105ee701e NLA SoC: Quick commit of skeleton of auto-blending setting code to be completed later... 2009-07-11 03:09:44 +00:00
66a81a4062 NLA SoC: Names for NLA Strips
In order to be able to better identify NLA Strips (and to reduce the complexity of the text on them), I've implemented a name property for the strips. The names are made to be unique within the AnimData block the strip comes from, though this may not always happen if not enough relevant context info is present to validate this.
2009-07-10 23:25:30 +00:00
b80b581bc0 Allow the user set which style to use for the kerning value.
This are freetype2 options:
 Unfitted - Scaled but un-grid-fitted kerning distances
 Default - Scaled and grid-fitted kerning distances

We always use Unfitted, but the "Default" style give better result here,
so please test and if nobody complain we can set this style as the default.
2009-07-10 22:16:25 +00:00
395025d67e 2.5:
* Default panel zoom level user preference, when creating
  new button windows or pressing home-key to reset. Patch
  by Matt D., thanks!
2009-07-10 20:43:32 +00:00
ad59d04c77 Yes!! a nice font again!!
Matt, I found the problem in one of my previous commit, so I revert
all my changes and now the font look good again.

Also remove all the options (kerning, overlap and user kerning), I want
to make this a little better.
2009-07-10 20:18:19 +00:00
2e3e044d27 RNA
* Enums can now be dynamically created in the _itemf callback,
  using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
  for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
  for operators. This doesn't fit design well at all, needed to do
  some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
  _itemf callback, for docs and fallback in case there is no context.

* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
  (unselected, deselect), to make them consistent with other ops.
2009-07-10 19:56:13 +00:00
a95c68a3ea 2.5 file browser
* bugfix: set the directory to the default root when directory button is empty
2009-07-10 19:52:00 +00:00
ac11d522c8 2.5 filebrowser
* bugfix: don't allow parent dir to go beyond root
* bugfix: only attempt to change directory if it exists

New (WIP) feature: autocomplete for directory
* works on TAB
* so far only one level (in current directory)
2009-07-10 19:19:54 +00:00
a74edc0caf 2.5 Buttons:
Small fixes:

* Removed Particle System Context header
* Lamp Type is a menu now, better for small displays.
2009-07-10 19:11:22 +00:00
c7e308367a 2.5:
* Fix missing update when browsing to different text.
* Fix wrong spacing in font size 15 drawing in the text editor.
* Fix numbers not updating in color picker buttons.
2009-07-10 18:10:40 +00:00
64f300ccf4 Use python subtypes so bpy.types.Mesh is a subtype of bpy.types.ID
This means checks like this work.
 isinstance(bpy.data.meshes[0], bpy.types.ID)
 
 bpy.types.Mesh.__base__ == bpy.types.ID
2009-07-10 18:09:53 +00:00
b3d6b2f728 2.5 file browser
* buttons for increment/decrement number in filename
Patch provided by Johannes Meng, many thanks!
2009-07-10 17:26:19 +00:00
66ca86b40b 2.5 file browser
* directory button enabled again, c code for now, can later become nicer operator
* filename button enabled (pattern match for selection)
* RNA completed (title, file and directory)
* some unused code removal.
2009-07-10 17:05:04 +00:00
8f60227750 2.5
UI script for setting render output
2009-07-10 16:56:20 +00:00
3bf0400a69 2.5
Render usability:

- Option back to render to imagewindow, or fullscreen.
  The latter is default. Setting is stored in Scene.
- Added button in output panel, the option "to new window" will follow!
- F11 again toggles render view
  (moved MS Windows "full screen" to shift+F11 for now)
2009-07-10 16:55:49 +00:00
2a7a8a04da 2.5:
* 3D view Object menu works again, many operators missing still
  because they are not yet implemented.
* Constraint types now have separator, and fix too much spacing
  in the constraints header.
2009-07-10 13:56:29 +00:00
b609f2aa79 NLA SoC: Attempt at solving the jumping-views problem
The 'jumping-views' problem affected the NLA and DopeSheet editors, whereby the channels-list and the data-area would get out of sync (vertically) due to the size calculations of the two being done differently.
2009-07-10 12:42:17 +00:00
d6ef4380a0 NLA SoC: Delete Channels operator
F-Curves and Groups can now be deleted again from DopeSheet/Graph Editors.
2009-07-10 12:11:00 +00:00
56d4501d91 2.5: fix to allow python panels to override C panels with
the same name.
2009-07-10 11:59:45 +00:00
3496437585 2.5:
* RNA: enum items with "" indentifier are now interpreted as separators.
* Add Object menu: added consistent names, separators.
2009-07-10 11:36:02 +00:00
146a887b81 2.5: Fix for crash on reload file. Cursor grab should not
assume there to be a window, but also reload file exec was
not returing an OPERATOR_* value.
2009-07-10 11:33:01 +00:00
6f0de59c55 NLA SoC: Notifier Fixes for Animation Editors
I've gone through all the Animation Editor operators, making sure they send appropriate notifiers, and that these notifiers are handled. 

* Added a separate category for animation-related notifiers, since the old-style ones attached to specific datatypes only was turning out to be not too feasible.

* For now, the focus has been on making sure that all Animation Editors update when there have been any potentially suitable changes at all. Later on, we can filter these more carefully to only take the ones we really need (for optimisation purposes)
2009-07-10 10:48:25 +00:00
1e85785704 PyRNA api wasnt using python subclasses most of the time.
Now this will return True
 isinstance(bpy.data.meshes[0], bpy.types.Mesh)

Use the StructRNA identifier for the new classes name properties because classes were being named by the data names rather then the type names.

Set the __module__ for the new type which makes printing the class not use the script name where the type is first initialized.
 eg: bpy.types.Mesh instead of buttons_object.Mesh

This still isnt quite right since opertators and panels all get their own type, when they should all use an operator type.
2009-07-10 04:25:49 +00:00
b1a9281ed8 NLA SoC: Fixes for renamed headers (BIF_transform.h -> ED_transform.h) 2009-07-10 02:04:50 +00:00
0051f1be8e NLA SoC: Merge from 2.5
21330 to 21469
2009-07-10 01:57:55 +00:00
d7a7081e63 NLA SoC: Tweaks from feedback from Broken + jez
* Renamed the 'blend' blending mode to 'replace', since that's what it usually does

* Drawing a darkened rect behind the keyframes shown in the action line

--

* Fixed typo made last night which broke compiling
* Consolidated all the keyframe-shape drawing code to use a single codebase. Even if we don't ultimately go with OpenGL keyframes, there's always a tidy option for that now.
2009-07-10 00:32:13 +00:00
9241559ab4 2.5: Various
* Weight paint: brush strength was changed to both define weight
  and strength, this can't work, made them separate buttons.
* Allow adding particle system as modifier (fix crash).
* 3D view modal ops (zoom ..) could not be ended when invoked
  from a button.
* Fix some warnings.
* Fix spelling in particle RNA property.
2009-07-09 19:49:04 +00:00
d091856486 2.5: Buttons Window
* Fix poll() callback changes in recent commit, note that these have
  to work with pinned context too.
* Hide header for context panels in py layout.
* Don't jump back when collapsing a panel, allow the view to be
  over some empty space until you scroll back.
* Fix follow context icon, order had to be reversed in icon file.
* ID template now has icon as part of browse button instead of
  outside the buttons.
2009-07-09 19:45:27 +00:00
a2a04bab8a 2.5: fix for last commit, left in debug print. 2009-07-09 18:10:35 +00:00
403dc0f25a 2.5 Buttons:
* Fixed some Bugs from Commit 21458. 

* Show Preview Render only when there is an active id block. 

* Some Code Cleanup (especially in polls). Please try to keep it clean ;-)
2009-07-09 16:09:44 +00:00
b00409e72d 2.5: X11
* Pass on mouse location on window leave/enter too, fixing some
  issues with button highlights and tooltips.
* When a modal operator runs, grab the mouse cursor so that for
  example transform still works when you move your mouse outside
  of the window, previously it would just stop then. This is
  automatic now for all modal ops, perhaps not always needed?
* Fix for a trailing button highlight issue.
2009-07-09 16:05:01 +00:00
5e659c0b08 2.5
Monthly cleaning round to make it compile warning free.
Mostly it was const stuff (strings, Context), but also
a couple useful fixes, like wrong use of temp pointers.

Only Mathutils callback struct I left alone... design issue.
2009-07-09 15:40:04 +00:00
77c61f545f 2.5
Bad bad DNA errors! People should really check on warning prints for
compiling dna dir...

- SpaceFile:  ListBase* prev;  <- dna doesnt recognize this
- wmEvent: const variables were not supported yet.

The first I fixed, 2nd I added support for in makesdna.

Note that files saved between tuesday july 7 and now can be corrupted!
2009-07-09 14:35:40 +00:00
c1f3b86f86 NLA SoC: Cleanup of Keyframe Drawing code for DopeSheet
* Removed the glaMapping stuff in favour of remapping the keyframes manually. The old code was causing some mess, and not really working well for the DopeSheet with various mappings being used.

* Fixed NLA-mapped selection in DopeSheet. Clicking on individual keyframes should now work ok. More testing required though.

* Keyframes in DopeSheet are now drawn fully using OpenGL (instead of icons). They look less tactile now, but this may be compensated with in terms of speed? Previously I disabled this type of drawing due to issues with some cards. Enabled again for now, but mainly because I couldn't get the icons to line up nicely in screenspace...

* Borderselect in DopeSheet. I've had a look at issues with it selecting the wrong channel's keyframes. The issues don't seem to be solved yet though... will look again tomorrow.
2009-07-09 13:14:51 +00:00
4a3f56a29d patch from William, panel names need to be unique 2009-07-09 09:42:34 +00:00
9f592e4f62 Patch from William
"moving the ID browser into its own panel. Eventually these panels should loose their headers to distinguish them from other, normal panels. Also a few other fixes for bones and armature panels."
2009-07-09 09:07:25 +00:00
eab7905a9e operator rename
VIEW3D_OT_viewhome  ->  VIEW3D_OT_view_all
VIEW3D_OT_viewcenter  ->  VIEW3D_OT_view_center
VIEW3D_OT_clipping  ->  VIEW3D_OT_clip_border
2009-07-09 08:39:58 +00:00
0d93ad3606 Dictionary style get() to property rna.
eg..
mesh = bpy.data.meshes.get("SomeMesh", fallback)

Set length limits for python string formatting.
2009-07-09 08:06:26 +00:00
1fd38701e9 removed check for pyc when scanning the directory of python files.
Brecht, double checked and pyc or pyo files arent used because of the (file_extension[3] == '\0') test.
2009-07-09 07:35:35 +00:00
f9749ea2e7 NLA SoC: Influence of strip now gets drawn as a greyish curve on the strip
I'm not quite happy with how this works yet. It looks quite crude, and might be contributing to the clutter here. Ideas on this welcome.
2009-07-09 07:28:45 +00:00
d7a333f83f Hooking transform operators with manipulator.
It's just a straight application of the normal operator for now, none of the normal manipulator goodies yet (no draw code and you have to click to confirm).
2009-07-09 02:45:48 +00:00
b0038be275 Reduce multiplication factor for trackball input in transform (slows down trackball rotation) 2009-07-09 01:52:54 +00:00
304cbc09ab Cosmetic changes in etch-a-ton drawing code, mostly. 2009-07-09 01:48:08 +00:00
27d80365fa NLA SoC: Toggle muting operator - HKEY
This operator provides a quick way of toggling the muted-status of several strips at the same time.
2009-07-09 01:32:13 +00:00
518911e78c NLA SoC: Assorted cleanups
* Some cleanups aimed at giving some (neglible) speedups 

* Preparation for NLA-Strip keyframes to be editable
2009-07-09 01:04:42 +00:00
93428ff82a mingw-config.py prepared for work with python 2.5 and 2.6 controlled by only one parameter: BF_PYTHON_VERSION.
It needs the files: libpython25.a and libpython26.a to be copied to \\lib\windows\python\lib\
2009-07-08 22:49:35 +00:00
1f3756d7f6 mingw-config.py prepared for work with python 2.5 and 2.6 controlled by only one parameter: BF_PYTHON_VERSION.
It needs the files: libpython25.a and libpython26.a to be copied to \\lib\windows\python\lib\
2009-07-08 22:37:49 +00:00
3082d12630 2.5:
* Rename OT_duplicate_add, to OT_duplicate. Also fixes warning
  print since I forgot to do this in the toolbar for MESH.
2009-07-08 21:41:35 +00:00
51ae88aa3b 2.5: Mesh and Various Fixes
* 3D view Mesh menu works again, but incomplete.
* Add Properties and Toolbar to 3D View menu.
* Added "specials" menus back, vertex/edge/face and general.
* Various fixes in existing mesh operators, some were not working.
* Add MESH_OT_merge.
* Merge all subdivide ops into MESH_OT_subdivide, subdivide code
  changes to make smooth + multi give good results.
* Rename all select inverse ops to *_OT_select_inverse.
* Fix "search for unknown operator" prints at startup, and some
  warnings in py code.
* Don't run .pyc files on startup.
* Remove unused image window header C code.
2009-07-08 21:31:28 +00:00
288bfeea1e 2.5 Sequencer:
* Replaced some notifiers with proper ones.
* Added "Draw Safe Margin" and "Separate Colors" Features to the menu.
2009-07-08 19:14:32 +00:00
b69f952acc 2.5
Makefile still had libradioisty.a
2009-07-08 17:49:14 +00:00
70fc83e958 == Sequencer ==
* Added a lot of update notifiers to RNA
* Fixed strip deallocation (didn't free effect data for some reason...)
2009-07-08 17:41:45 +00:00
e3661aac9a 2.5 MSVC9 projectfiles
* small maintenance: keyval.c removed, some headers in editors/include renamed.
2009-07-08 17:40:42 +00:00
eacb31dbb2 2.5: code consistency
* Rename BIF_transform/retopo.h to ED_transform/retopo.h
  for consistency.
* Move MESH_OT_duplicate_add to editmesh_add.c.
* Remove some code from BIF_gl.h which is not needed there
  anymore.
2009-07-08 16:17:47 +00:00
5e749af429 2.5: Various Fixes
* Context panel now draws without header, with arrows, no scene name.
* Softbody vertex group search popup.
* Improve names for autogenerated shortcut keys in menus.
* Make most Select menus in the 3D view header work.
* Fix armature border select selection syncing.
* Add POSE_OT_select_constraint_target,
  MESH_OT_select_by_number_vertices, MESH_OT_select_vertex_path.
* Merge mesh select similar into one operator.
* Don't give MESH_OT_select_random Space hotkey.
* Add DAG_object_flush_update to many mesh edit tools, not calling this
  will crash with modifiers.
* RNA_def_enum_funcs for dynamic enums in operators, but not very useful
  without context yet.
* Fix refresh issue with image window header + editmode.
* Fix drawing of shadow mesh for image painting.
* Remove deprecated uiDefMenuButO and uiDefMenuSep functions.
* Remove keyval.c, code is in wm_keymap.c already.
* Rename WM_operator_redo to WM_operator_props_popup.
2009-07-08 15:34:41 +00:00
f3fd7d8800 2.5
Brought back the basics for transform manipulators. Martin will
hook it all up to new transform system.

Some notes:
- Still uses G.moving
- BIF_do_manipulator() is called as a View3D Operator
  I've tested selecting handles, added a print to confirm
- BIF_GetTransInfo() returns a dummy struct now, just to get
  it running.
- Marked some other issues with XXX
2009-07-08 15:01:28 +00:00
031ed0431c fix for loading YoFrankie levels in blender 2.5. Multires pointer was corrupt on linked meshes.
Note that the files didnt use multires so something odd is going on, but for now this stops the crash.
2009-07-08 14:32:03 +00:00
41be132eb7 2.5
Copied some Python compat stuff to get py 2.3 running... just 
googled for it on python.org mailing list.
2009-07-08 14:26:43 +00:00
5f5ddb0014 NLA SoC: Little optimisation + Drawing bugfix
* Text labels on NLA-Strips should now draw properly for most short-strips now. Previously, the padding on the text was a bit too extreme, so for very short strips (less than 4 frames or so), the text was often pushed down into the bottom-right corner of view.

* Optimised the keyframe-highlighting code for buttons a bit. Replaced the custom linear-search with the binary-search used when inserting keyframes (and for the 3d-view keyframe-indicator). There should be some theoretical improvements due to this at least...
2009-07-08 12:30:09 +00:00
eb5f6f7d93 This fixes some NULL checks.
* base was referenced before NULL check
* ob wasn't checked for NULL

Still broken: Add Mesh doesn't seem to work in Object Mode.
But now it doesn't crash anymore...
2009-07-08 11:18:47 +00:00
a97b645a44 * workaround for PySys_SetArgv() in python3 needing wchar_t
* PyRNA - id_struct.keyframe_insert("path", index, frame)
2009-07-08 09:23:49 +00:00
b76331a0aa trunk bugfix: added missing undo push. 2009-07-08 07:02:59 +00:00
665938191d NLA SoC: Minor UI-Tweaks
* When influence/time for NLA-strips are animated, settings in the other panels which used to control these are now greyed out to show that they won't have any impact over the result.

* NKey panel for Graph Editor now opens on Right-Hand Side, just like for NLA Editor. The small sub-region above the Channels region was too troublesome to work with.
2009-07-08 06:32:52 +00:00
be5293d3ad NLA SoC: Influence/Time properties for strips can now be animated
* These settings can now be edited + keyframed (using IKEY over the button only for now... other cases will fail)

* Reshuffled some of the keyframing code to make this sort of thing easier to do. Also, restored corrections for NLA-mapping when inserting/removing keyframes.


TODOS:
* animation editors don't show these keyframes yet
* the buttons don't change colour yet to reflect this state. How to do this efficiently?
* allow keyframing of these in more places
* more robust UI handling for this.
2009-07-08 05:00:10 +00:00
823bf891a1 NLA SoC: Clarifying the error message for adding transitions
NOTE: transition strips can only be added between two selected action-clips that have a gap (but no other strips) between them, and are in the same track.
2009-07-07 23:33:39 +00:00
d896ed98fe 2.5
- Scrollers now only disappear for regions with a fixed total view, like
  lists, buttons, channels. More or less infinite views keep scrollers to
  indicate that you can still pan or zoom further.

- Nodes: put back SHIFT+D "Add duplicate"
  (Also fixed duplicate objects menu name... it should be a bit more 
  descriptive)
2009-07-07 17:30:39 +00:00
f8c344bd17 NLA SoC: Meta Strips + F-Modifiers
F-Modifiers now work on 'all' types of NLA Strip. To get them working on Meta-strips, F-Modifiers on the Meta strip must be applied on top of those for child strips. For now, this is done by joining the lists of modifiers, and evaluating the joined list.

Currently, Transitions don't work that great with F-Modifiers yet (only the endpoints get evaluated with the F-Modifiers). Solving this is for another time...
2009-07-07 12:17:06 +00:00
d1677e36b6 NLA SoC: Recoded way that Meta-Strips are Evaluated
Previously, the quick-hack I coded for Meta-strips evaluation didn't really take into account the possibilities to use Meta-Strips as strips in their own right - i.e. reversed, muted, time-mapping-curves, influence-blending - were all unavailable. 

This commit makes the aforementioned capabilities of other strips available for Meta-Strips too. The evaluation is now kind-of recursive (as with most of the other methods which take them into account) so that each 'level' of strips get evaluated correctly within their frame-of-reference.

TODO:
* F-Modifier support for Metas...
2009-07-07 11:37:33 +00:00
e22fefc2c8 NLA SoC: Fixed bug with NLA-Transform
Strip-sorting code was buggy, as it was trying to access an invalid pointer, so the call to sort strips after transform was temporarily disabled in previous commits.
2009-07-07 10:25:55 +00:00
a86d20e5a2 NLA SoC: Quick hack - Reversed playback
Animations can now be played back in reverse, by clicking on the reversed-playback button in the TimeLine header beside the play button (NEW ICON NEEDED HERE).

I'm not sure how well this works with sound, but from what I gather, this can be quite useful for animators to use.
2009-07-07 07:29:21 +00:00
Dalai Felinto
cfd5046c9e 2.5 filebrowser: previous/next + bugfix + elubie's changes and cleanup
* Previous/Next Folder browser
* bugfix: "open most recently opened directory".

* Previous and Next functionalities:
- use BACKSPACE to navigate to previous folders
- use SHIFT+BACKSPACE to navigate forward
- once you change the folder by other ways the forward folder list is cleared

* bug fix: the sfile->params->dir set through ED_fileselect_set_params wasn't correct. According to the code taking the settings from the existing (previous) filebrowser is a temp solution. In that case this is a fix for a temp solution :)
(changes in: wm_event_system.c, filesel.c and ED_fileselect.h)

** Andrea(elubie): we can get away of the folderlist_clear_next test if we manually pass a boolean to file_change_dir (e.g. file_change_dir(sfile, true)). I tried not to mess up with your changes here. It's slightly slower (and maybe hacky) but its's more conservative IMHO.

(my first commit to 2.5 ... that was a good reason to put my paper on hold :p)
2009-07-07 07:25:44 +00:00
761241fcbb NLA SoC: Current Frame can now be negative
This commit is quite experimental, and might have to be reverted, but in quite a few places, the cleanups from this commit were already necessary. 

* I've left most of the image-handling functions alone, since I'm not sure how well they cope with negative indices.
* Start/End frames cannot be negative for now... any specific reasons why they should be negative?
2009-07-07 06:56:29 +00:00
dd42ad590e NLA SoC: Small cleanup in Graph Editor struct code (obsolete + commented out stuff) 2009-07-07 06:39:01 +00:00
6a320f3277 NLA SoC: Auto-Snapping Fixes (Transform)
Snap to nearest-second works again for NLA and Graph Editors
2009-07-07 06:21:38 +00:00
5fc61f03c1 NLA SoC: Fixes for bugs in transform code from previous commit
* The code to move strips between tracks now works (though it can still be a bit too eager to change tracks half-way through some transforms). 
Strips are moved up/down one strip at a time, depending on whether there is any space in the next-track in the direction you direct it to move in. 

* Auto-snapping works again. Also enabled snap-to-marker option for Graph Editor here.
2009-07-07 06:16:06 +00:00
2edef129be NLA SoC: Transform Code for NLA-Strips recoded (still buggy)
Recoded the Transform code for NLA-Strips so that they can now be moved between strips and will not get truncated when they get moved into other non-moving strips. 

Todos:
* The current code for moving strips between tracks is buggy (only goes up, and has a tendency to move up without being told to)
* Auto-snapping doesn't work yet...
2009-07-07 05:41:59 +00:00
905b138005 NLA SoC: Start of integration of Meta-strips in Transform
* Chains of selected strips are now converted to meta-strips before transforms begin, and converted back afterwards. This simplifies the transform code needed in later stages...

* Transform-flushing code for Meta-Strips should now work. There seems to be a little bit of numeric inaccuracy problems somewhere, as two strips which met at the same frame can get separated when scaling.

* Meta-strips now draw with proper text identification

* Snapping strips now properly clears meta-strips if a moved strip needs to be moved into a new track to be accomodated.

* Fixed a filter used by a selection-operator.
2009-07-07 02:12:50 +00:00
79633056ac 2.5
* fix for RNA generation dependency in MSVC projectfiles
* added missing include
2009-07-06 17:29:32 +00:00
f98c3ed70b NLA SoC: Fixes for Meta-Strips and Editing
* Split strip (YKEY) now plays nicely with Transitions and Metas. Meta strips get split up into their child strips, while transitions are ignored.

* Wrapped Meta_Strip->strips in RNA

* Bugfixes in Meta-strip API functions to silence some runtime-errors...
2009-07-06 12:24:09 +00:00
69df12a74d fix for a bug reported by j michaelson, empty nodes were not exported, also noticed files were invalid if there were no meshes or surfaces. 2009-07-06 11:23:22 +00:00
1586570261 NLA SoC: More work on Meta-Strips
* Added several API functions for Meta-Strips editing. One of these (flush transform) still needs a few tweaks before it does its job well enough for all cases.

* Meta strips are now drawn with a purple-ish colour. The start/end points of the strips they encompass are shown with lines along the length of the strips, with lines starting from the top indicating start-points and lines starting from the bottom indicating end-points.

* Meta strips can be made (i.e. strips can be assigned to meta-strips) by selecting some strips and pressing Shift-G. 
Meta strips can be removed by selecting some meta-strips and pressing Alt-G.

* Strips can now be 'snapped' to start from: the current frame, the nearest frame, the nearest second, or the nearest marker; using the Shift-S hotkey. 
'Islands' of adjacent selected strips occurring in the same track are moved together as a single strip so that the start-point of the first strip is on the sepcified time, but all the relative lengths of strips stay the same. Internally, temporary meta-strips are created to facilitate this.
2009-07-06 11:06:34 +00:00
f87fcde686 NLA SoC: Start of 'Meta' Strips
Refactored the backend code/API's to support 'meta' strips (i.e. strips containing other strips). These have been implemented to be nested to 'unlimited' depths (in terms of common usages that is, though there is a very remote chance of stack-overflow in theoretrical evil cases only that shouldn't ever be encountered in production).

This paves the way for implementing the necessary tweaks needed for the transform code (in addition to some cool user-level tricks)
2009-07-06 03:44:44 +00:00
f08124a3e2 2.5 filebrowser
* bringing back file numbering operator (PADPLUSKEY, PADMINUS)
* Note: discovered conflicting key with View2D zooming that causes it to not work in panel area.
2009-07-05 22:26:43 +00:00
d390ee1b60 2.5 MSVC9 projectfiles
* RNA project cleanup. Better file naming and first attempt at deleting files before rebuilding.
* editors/object/object_vgroup.c added
2009-07-05 19:11:29 +00:00
46f6cdcdcc Added a particle instance modifier option to use particle size. 2009-07-05 12:36:20 +00:00
4ebcc7402c == Python ==
Fix for the fix: G.scene slipped in at one point and the
filepath generation was broken due to a typo.
2009-07-04 15:35:16 +00:00
6a1a7f7905 == Python ==
This fixes:
* background rendering on scenes different from active scene
* makes scene.render() behave the same in interactive and background mode
* makes saveRenderedImage() work correctly in background mode
2009-07-04 14:59:28 +00:00
d5737f1f67 saving runtime on win32 didnt work with python2.6 2009-07-04 12:41:34 +00:00
7055702530 Rendering animations with particle trails cached. 2009-07-04 12:09:21 +00:00
84c614ff5f 2.5 Physic Buttons:
* Some minor layout cleanup to the field panel.
2009-07-04 08:50:41 +00:00
66918b3add A bunch of fun stuff now possible because of new pointcache code:
* Baked normal particles can now use the "Path" visualization.
* Path "max length" & "abs length" are now history:
	- New option to set path start & end times + random variation to length.
	- Much more flexible (and calculated better) than previous options.
	- This works with parents, children, hair & normal particles unlike old length option.
	- Only known issue for now is that children from faces don't get calculated correctly when using path start time.
* New option "trails" for "halo", "line" and "billboard" visualizations:
	- Draws user controllable number of particle instances along particles path backwards from current position.
	- Works with children too for cool/weird visualizations that weren't possible before.
* Normal particle children's velocities are now approximated better when needed so that "line" visualization trails will look nice.
* New particle instance modifier options:
	- "path"-option works better and has controllable (max)position along path (with random variation possible).
	- "keep shape"-option for hair, keyed, or baked particles allows to place the instances to a single point (with random variation possible) along particle path.
	- "axis" option to make rotation handling better (still not perfect, but will have to do for now).

Some fixes & cleanup done along the way:
* Random path length didn't work for non-child particles.
* Cached & unborn particles weren't reset to emit locations.
* Particle numbers weren't drawn in the correct place.
* Setting proper render & draw visualizations was lost somewhere when initializing new particle settings.
* Changing child mode wasn't working correctly.
* Some cleanup & modularization of particle child effector code and particle drawing & rendering code.
* Object & group visualizations didn't work.
* Child simplification didn't work.
2009-07-04 03:50:12 +00:00
3c85b2abc5 fix for python error when running in local view, the layer wasnt being set from the right object. 2009-07-04 00:33:50 +00:00
2c71b12998 2.5 Physic Buttons:
* Added Softbody buttons. Patch by Wahooney. Thanks.
I did some minor code cleanup.

* Collision settings now grey out, when disabled.
2009-07-03 20:03:24 +00:00
36df48eef6 2.5:
* Fix crash in python with enum properties, and don't throw
  error if no matching identifier is found. This shouldn't
  happen, but it should break a python script either, which
  is not at fault.
* Fix a wrong variable initialization in fluidsim.
2009-07-03 19:56:19 +00:00
83c0fd65fa 2.5 Physic Buttons:
* Added Fluid Buttons.
2009-07-03 19:12:59 +00:00
815fef5e7e 2.5/Multires:
Missed this somehow when merging the multires branch? Have to make sure that multires displacements are up-to-date before doing a modifier apply.
2009-07-03 15:59:59 +00:00
9e71b736eb 2.5/Sculpt:
Bugfix, mesh face normals not getting updated because a list was freed in the wrong place.
2009-07-03 15:31:23 +00:00
9f33496088 2.5
* Lattices: properties editable, editmode operators, menus working
  again. As a bonus you can now edit u/v/w in editmode.
* Shape Keys: some code cleanup, and added more buttons. The
  value/min/max buttons don't work correct yet though.
* Fix issue with uv textures, vertex colors not being visible outside
  editmode, and a few other issue. Mesh.edit_mesh is now NULL when
  not in editmode.
2009-07-03 15:23:33 +00:00
c1dcaa5dec 2.5 Physic Buttons:
* Added some collision buttons. Patch by Wahooney. Thanks!
2009-07-03 14:32:27 +00:00
bcea99d8d5 2.5 Physic Buttons:
Don't show panels when object is not a mesh.
2009-07-03 14:11:00 +00:00
a7d6b6eebf 2.5
Windows #ifdef code missed semicolon.
2009-07-03 13:48:42 +00:00
ea287fc4ec 2.5
More scroller work:

- Added subtle arrow widgets to denote a scroller can zoom the view.
- Made zoom symmetric (old convention to only zoom "one side" just
  worked badly)
2009-07-03 13:21:09 +00:00
3c6f957097 fix for own missing var in recent commit. 2009-07-03 11:46:46 +00:00
c12b2796d7 2.5 - Additional warning fix 2009-07-03 11:24:52 +00:00
74fc3a8e22 2.5 - Quick compiling fix for Ton's commit
Patch (http://www.pasteall.org/6436/diff) by skejoe. Thanks.
2009-07-03 11:22:32 +00:00
7da0d1a71e * Fixed a crazy memory leak in voxel data image sequence data source 2009-07-03 11:03:09 +00:00
d059fc6d20 2.5
Upgrading text editor to draw new scrollbar too.
2009-07-03 10:54:39 +00:00
b8042f535c NLA SoC: Muting and Graph-Editor Curve visibility for (Action) Groups
Groups (the Action variety) can now be muted, and also be set to not be drawn in the Graph Editor. These settings get applied to all the F-Curves within the group, overriding any settings individual F-Curves might have, allowing users to quickly mute or hide groups of curves without having to go through clicking on all of them.

Also, added a flag that can be used to set the curve visiblity on AnimData level too. This will be enabled in a future commit.
2009-07-03 10:28:10 +00:00
c26adeea55 * Fix for compiling with cmake on OS X. Hopefully this goes ok for other platforms too. 2009-07-03 09:23:12 +00:00
66efea5e2d NLA SoC: Toggle for 'Editing in Place'
The 'pin' icon beside the name of the active Action when tweaking some strip's action can be used to toggle between editing the Action's keyframes in 'mapped' time or in 'un-mapped' time.
2009-07-03 04:48:44 +00:00
b0f19ea7ca set the PYTHONPATH to BLI_gethome_folder("python") if it exists.
This lets us distribute blender with our own python module directory (next to ui and io), and avoids the need for a shell script to start blender.
2009-07-03 04:38:55 +00:00
a07d1ea3ea NLA SoC: Quick hack to get layer buttons in 3D view updating visible layers correctly.
Now it is possible to load old files and be able to switch layers to show/hide objects AND have that reflected in the Animation Editors which rely on the scene layers being set correctly.
2009-07-03 04:24:19 +00:00
5e92ddece3 NLA SoC: Merge from 2.5
21301 to 21329
2009-07-03 01:57:38 +00:00
28d371d117 NLA SoC: Assorted fixes
* Made NLA Editing functions more aware of transitions. 
- A transition can only be added between a pair of action-clips. Previous, two transitions could be added next to each other, which has undefined behaviour
- Deleting a strip with transition(s) on either side will remove the transitions too. Feedback welcome on this
- The 'type' setting for NLA-Strips is no longer editable. This was dangerous as it could result in transitions with undefined behaviour (though nothing would happen).

* Menus for adding F-Modifiers now only show relevant modifiers (i.e. 'Invalid' is not included in the list, and 'Cycles' doesn't need to be shown for NLA since we've got repeat)

* Function Generator and Noise F-Modifiers now have complete GUI's. A few settings were missed during the porting process.

* F-Modifier buttons now have their source-ID's included in the RNA Pointers used. This didn't get them animateable directly, but is a step closer.
2009-07-03 01:10:46 +00:00
e55d90b340 NLA SoC: Added buttons for animating NLA-Strip Influence/Speed
These buttons are found in the Evaluation panel, but are currently disabled as I've yet to add the proper code to ensure that animating these will work correctly. They will hopefully be working before the end of the day.
2009-07-02 23:36:16 +00:00
e9c85406e4 NLA SoC: UI-Drawing for Generator and Envelope FModifiers Restored
These now use a hybrid drawing approach - using the layout engine for just layouts, but still mostly using old-style buttons in many places where button callbacks and/or special data-access methods are needed (or where RNA wrapping isn't in place yet).
2009-07-02 23:27:11 +00:00
fb5f9273eb cmake support for building without fluidsim 2009-07-02 22:22:35 +00:00
093ff8202c 2.5: Physics Buttons
All kinds of changes to get it ready for UI layouts. This means RNA
and operators should be working correct, but most buttons are still
not actually there yet.

* Added near empty soft body, fluid, field and collision panels,
  tweaks to cloth panels.
* Fluid bake works, but without escape or showing any progress.
* Fluid/Softbody/Cloth/Collision can now be both added as modifiers
  or in the physics panels.
* Missing: fields & soft body for particles.
* Missing: proper updating softbodies, guess this code still needs
  updates after pointcache refactor?
2009-07-02 19:41:31 +00:00
5a0896e1a3 2.5
Cleanup of scroller drawing in 2D windows.

Before:
http://download.blender.org/institute/rt11.jpg
After:
http://download.blender.org/institute/rt12.jpg

Will add 'zoom' widget circles later, as mockupped here:
http://www.reynish.com/files/blender25/fcurve_scrollbar.png

Also note the scale values are inside scroller; drawing it
on top conflicts with current frame item and markers.

Currently scroller disappear entirely when view is total.

For Joshua:
To make sliders behave nicely, the boundbox (v2d->tot) has to
be refreshed on each change. I've added it in graph drawing
now, but it could be notifier based I guess... not sure what
the correct anim api call would be. Can discuss tomorrow!

On todo:
Layout config hints so people can make scroller positions swap.
2009-07-02 18:12:46 +00:00
441bcaae2e NLA SoC: FModifier drawing converted to use Layout Engine
* Most of the F-Modifiers have been ported to use the layout engine + RNA for drawing their buttons now. This plays much nicer with various button-layouts.
--> As a nice demo, try adding a Noise Modifier to a NLA-strip, and change the 'size' setting to about 2 to see some effects.

* Generator and Envelope modifiers haven't been ported yet since they're quite complex (requiring more time + energy), and as such, have been made to have some temporary error prints instead. Will check on this tomorrow.

* Finished/cleaned up the RNA-wrapping of most FModifiers. 


TODO's (help requested... Brecht?):
Generator modifier's UI cannot be wrapped yet using the layout engine (though I might try using the old system only), as I'm having some trouble wrapping the coefficients array for this (see rna_fcurve.c - rna_def_fmodifier_generator())
2009-07-02 12:41:03 +00:00
aefa7b626a out own Py_GetPath() function to replace pythons, so we can bundle python modules with blender, #if 0'd for now but having it is useful for testing.
This works by copying /usr/lib/python3.1 to a dir called "python", next to blenders "ui" and "io" dirs.
2009-07-02 12:11:20 +00:00
d44b341be6 2.5
Python definition of view3d context-depending toolbar. Feel free to edit
it into anything useful. :)
2009-07-02 11:24:27 +00:00
c7bd0d1248 2.5
More toolbar functionality for workflow review.

- Split the region in two parts, bottom has the Tool Properties, the
  top part shows 2 panels, one for python defined tools, other for a
  "tool shelf" which (later) will get saved in files.
- Added a full context driven framework for this toolbar, showing 
  the tools depending on 3D window 'mode'. Both python defined tools
  as the shelf respect this. So - for example - you will see different
  tools in editmode mesh, as in vertex paint mode, etc.
- First template for the python tools will be committed after this commit;
  it has placeholder tools to just show/test functioning.

NOTE: if you had saved a layout that shows tools region, open/close it
once to get the new region created for properties.

TODO:

- Moving paint properties to tool settings
- Test a layout with horizontal toolbar (without properties)
- Bring back floating panels, and put tool-properties here. (as option)
2009-07-02 11:23:19 +00:00
6b784a80f0 NLA SoC: F-Modifiers working on NLA Strips
* Using the Ctrl-Shift-M hotkey, F-Modifiers can be added to all the selected strips.

* F-Modifiers can also be added/tweaked from the NLA N-Key properties. The UI now uses the same code as for the graph editor ones.

The UI drawing here is currently messed up from the NLA side, since it seems combining normal layout stuff and old-style uiBlocks doesn't seem to work too well (BUT! the buttons are at least functional).
Next up, I'll need to recode the buttons panel for the Graph Editor so that all of the drawing can be migrated over to use the new layout engine.
2009-07-02 06:41:10 +00:00
f3c47a66b0 NLA SoC: Separating out F-Modifier API
* F-Modifier API is now in its own file in blenkernel
* Renamed and refactored these so that they're no dependent on F-Curves, since all they really used was the fcu->modifiers list
* Added missing license blocks to a few files
2009-07-02 05:25:14 +00:00
b47605d841 NLA SoC: Separating F-Modifier UI drawing into its own file
* F-Modifier UI drawing/handling is now defined in a separate file so that it will be more suitable for inclusion into the NLA Editor's buttons.

* Started removing F-Curve dependence from the modifier drawing code, which wasn't strictly necessary

* Fixed F-Curve RNA wrapping to correctly use FPoints instead of the bulkier BPoints. Although nobody was likely to have encountered bugs here yet, this would almost certainly have contributed to some segfaults/data corruption along the track.
2009-07-02 04:47:36 +00:00
3373850e95 NLA SoC: Bugfix for Auto-Keyframing version patching
When auto-keying is enabled, the insertion mode is no-longer blank. The version patching code now takes this into account, but the conversion doesn't work for existing .b25.blend defaults files though.
2009-07-02 03:50:20 +00:00
b1a106dd49 NLA SoC: Merge from 2.5
21210 to 21300

Note to self: the next merge will be messy again, since 2 commits occurred this one was complete
2009-07-02 03:32:57 +00:00
78939898c7 NLA SoC: Adding some files that seem to have been missed during some merges. Hopefully all of these should really be in the repositry... 2009-07-02 02:53:18 +00:00
1588de008a NLA SoC: Separated 'Built-In Function Generator' FModifier into a separate FModifier
Started cleaning up FModifiers in preparation for allowing them to be used on NLA Strips. 

This commit separates the 'Built-in Function' mode for the Generator modifier out into its own modifier, since it was being quite frequently used (and the RNA wrapping for this used to be quite hackish). 

BACKWARDS COMPATABILITY WARNING:
Old files with FModifiers saved (i.e. old 2.5 files, but not any others) will not load correctly as a result of these changes (the wrong modifiers will be shown). I've decided that there are not likely to be many files affected by this yet, but doing this will result in a much nicer modifiers-define list in the long run.
2009-07-02 02:12:37 +00:00
ede921fdfa NLA SoC: Proper poll callbacks for Graph Editor
For now, some of these polls may be a bit too restrictive, but at least we have some unified+cleaned bases to work from now (instead of relying on the generic ED_operator_area_active).
2009-07-02 01:01:18 +00:00
421f44278c 2.5: Lists for vertex groups, shape keys, uvs, vertex colors.
RNA
* Added the relevant active_*_index properties, with proper
  get/set/range, updates and notifiers.
* Context.tool_settings.
* ToolSettings.vertex_group_weight.

Operators
* MESH_OT_uv_texture_add/remove
* MESH_OT_vertex_color_add/remove
* MESH_OT_sticky_add/remove
* OBJECT_OT_vertex_group_add/remove/assign/remove_from/
  select/deselect/copy/copy_to_linked
* OBJECT_OT_shape_key_add/remove

UI
* Some updates and cleanups in list template code.

Known issue: when going in & out of editmode, uv textures and vertex
colors dissappear. I thought me->edit_mesh would be NULL when not in
edit mode but it is not?
2009-07-01 22:25:49 +00:00
cda566d646 2.5: Fix a case of using freed memory in event handling. 2009-07-01 22:16:16 +00:00
666ce6de80 needed for building with py2 2009-07-01 20:55:32 +00:00
594c8802d7 Added support for collection parameters also for RNA_function_call_direct family of functions. The syntax for passing collection parameters is similar to passing pointers where you pass first the RNA type and then the ListBase representing the collection. The format specifier is "C" instead of "O", e.g.
RNA_function_call_direct_lookup(C, reports, ptr, "do_something", "sC", "some string value", &RNA_SomeItemType, listbase); 

Note that from python you could in theory pass collections of items each of a different type while using this API you can't. I don't think this should be a problem as RNA supports collections this way anyway (i.e. where items are all of the same type or inherit from the same base type).

Also a small fix for pointer parameters.
2009-07-01 19:56:50 +00:00
1a86cd6dcd slice support working in py3 for Vector and Matrix types.
Added slice to PyRNA collections and arrays (py3 only).

eg.
some_verts = mesh.verts[0:10]
some_rna_array[4:-1] = [0,1,2,3]

Collections dont support assignment, when assigning slices, resizing the array isnt support like with python lists.
2009-07-01 13:31:36 +00:00
8a35439e23 converting nurbs to a mesh ignored smoothing for Alt+C and from pythons getFromObject() 2009-07-01 13:07:28 +00:00
82055c8217 RNA
* Mesh.add_geometry, Mesh.update and make indices editable. This
  is without checking if they are valid still, no time now to
  implement this.
* Also fix warnings in rna_ui.c, and a bug in CDDM_calc_edges.

Example code:

co = [0.0, 0.0, 0.0] + [1.0, 0.0, 0.0] + [0.0, 1.0, 0.0] + [1.0, 1.0, 0.0]
faces = [0, 1, 2, 0] + [1, 3, 2, 0]

mesh.add_geometry(4, 0, 2)

mesh.verts.foreach_set("co", co)
mesh.faces.foreach_set("verts", faces)

mesh.update()
2009-07-01 12:19:00 +00:00
66c8627820 NLA SoC: Renamed a few options for the Mirror operators since their purpose wasn't clear (in practice) 2009-07-01 01:17:58 +00:00
0fabb2039b 2.5/Sculpt:
== Re-added smooth stroke ==

UI: toggle is just in the sculpt menu for now. Also changes the sculpt paint cursor slightly, draws a line between previous and current locations.

It's a different implementation than in 2.4, works like this:

The stroke interpolates between the last mouse location and the current location, weighted towards the previous location. If the stroke gets within a certain radius of the current mouse location, the stroke stops. This radius allows for sharp turns in the stroke.

Todo: there are two hard-coded parameters that should become user settable, that's the weighting between previous and current locations, and most important, the no-update radius.

Note also that this option was added as a per-brush flag, worth discussing whether that's the correct place, or whether it should be a sculpt setting like symmetry?

== Improved stroke spacing ==
The previous implementation of stroke spacing simply guaranteed that stroke dots would not occur any closer than the space setting. It now forces stroke dots to always be the specified distance apart.

Todo: Performance gets pretty awful with a small spacing setting, this needs optimization.
2009-06-30 23:06:50 +00:00
5403edf8ff disabling foreach_get/set for python2.x, since it uses new buffer api. 2009-06-30 21:59:21 +00:00
60c2599a1a 2.5 filebrowser
* show only name of the last directory for the bookmark
* small fix of projectfile: header BLI_fileops.h was moved
Note: full path should appear in tool tip later, also for renaming bookmarks later on.
2009-06-30 20:34:00 +00:00
406b16e7d1 2.5 MSVC projectfiles
* small maintenance: editors/info_header.c removed, editors/info_ops.c added
2009-06-30 20:31:58 +00:00
03e11e1e55 Reverting changes made for laptop/two button mice - will make the changes available as a patch. 2009-06-30 20:14:53 +00:00
a50dfe7ce4 second part of python2.6 upgrade in cmake, now it will copy the dlls too 2009-06-30 19:29:40 +00:00
37864a4273 2.5
Image Window
* Unpack operator now works.
* Some small layout code tweaks.

Info Window Header
* Moved to python UI code.
* template_running_jobs, template_operator_search added.
* Ported external data operators: pack/unpack all, make
  paths relative/absolute, find/report missing files.

Also
* Report RPT_INFO too, not only warnings and errors.
* Run UI handle functions after RNA and Operators.
* Rename particle system add/remove operators, to not
  include "slot", that's only there for materials because
  that's what they are called now in RNA.
2009-06-30 19:20:45 +00:00
80ee09bb9a RNA
* Add Image.dirty boolean.
* Added Window struct, with editable Window.screen.
* Make Screen.scene editable.
2009-06-30 19:10:14 +00:00
538da84de0 2.5 filebrowser
* Hide dot operator (HKEY) for theeth
2009-06-30 18:29:30 +00:00
3b0fafa393 2.5 MSVC projectfiles
* moving projectfiles to python 2.6 to avoid recurring issues with python migration
2009-06-30 18:20:45 +00:00
d37a8fb5bf windows cmake uses python26 now, make sure your lib/windows is up to date (requires an additional svn update, in lib/windows 2009-06-30 18:20:12 +00:00
30dcada24d python access to RNA arrays.
coords = array.array('f', [0.0]) * len(me.verts) * 3
m.verts.foreach_get('co', coords)

the reverse works with set also.
currently works for python buffers or sequences (slower)

Quick speed test with 1,179,654 verts.

*foreach_get*
list 0.377
array 0.032
py 10.29

*foreach_set*
list 0.184
array 0.028
py 9.79


where python was done like this...
----
 i= 0
 for v in m.verts:
   co = v.co
   l[i] = co[0]; l[i+1] = co[0]; l[i+2] = co[0]
   i+=3
----

some of the error checking here needs to be cleaned up to account for different invalid bad inputs.
2009-06-30 12:52:16 +00:00
0c14be3b58 2.5 file browser
* adding GPL copyright header.
2009-06-30 06:27:48 +00:00
f60760e2e2 Python API
Mathutils support for subclassing Vector, Quat, Euler and Matrix types.

Removed C docstrings, prefer to make sure our epydocs are well maintained rather then duplicate, vague doc strings.
Will convert scripts to detect missing docs from the BGE.
2009-06-30 00:42:17 +00:00
da32a0594b 2.5 file browser
* remove '.' and '..' from file browser list. sigh!
* removed delete buttons from automatically added bookmarks (Desktop and Documents)
Note: please check on non-Windows platforms
2009-06-29 23:21:11 +00:00
17d5bfd970 2.5 file browser
* bookmark operators: add and delete bookmark
* first start at menus in file browser: Directory and Bookmarks
* Adding a bookmark via menu or via CTRL+B
* Remove a bookmark with the X button next to it.
2009-06-29 22:16:48 +00:00
84cd5a6cfb This commit adds Alt-LMB as an alternative to MMB, and CTRL-ALT-LMB as an alternative to CTRL-MMB so that laptop users can use 2.5 2009-06-29 21:07:33 +00:00
5e20f57431 2.5 filebrowser
* start of filebrowser RNA 
* system files, bookmarks, etc. now nicely inside panels to allow collapsing etc.
* filebrowser header now defined in space_filebrowser.py

TODO:
* button type for bookmarks etc. not final yet, at least should get centered still. Suggestions welcome here.
2009-06-29 20:23:40 +00:00
5d491681e0 Fix compiler warning, make for body explicit. 2009-06-29 19:46:28 +00:00
d9b74dcbc9 2.5: fix for compile error after recent search menu commit. 2009-06-29 19:37:09 +00:00
e7928dd4b4 RNA
Implementation of RNA side of foreach_get/foreach_set,
Campbell will do python code.

Three functions for efficiently setting some property for all
items in a collection. RNA_property_collection_raw_array gives
access to the properties as an array with length, stride, and
type specified, if this is possible, i.e. not when it uses a
ListBase, or if a manual get/set function is implemented.

Two other functions take a C array pointer and get/set it
using the a collection + property name, using efficient array
access if possible, and otherwise using slower RNA iterator.

RNA_property_collection_raw_get
RNA_property_collection_raw_set

The number of type conversion required here got a bit out of
hand, it could be more efficient still if checking for more
cases, but function is already long enough.


Example: http://www.pasteall.org/6362/c
2009-06-29 19:15:51 +00:00
9a7ea9664e BGE PyAPI support for subclassing any BGE game type from python, scripters define extra functions on gameObjects.
Adding a UI to set the type on startup can be added easily.

# ----
class myPlayer(GameTypes.KX_GameObject):
  def die(self):
    # ... do stuff ...
    self.endObject()

# make an instance
player = myPlayer(gameOb) # gameOb is made invalid now.
player.die()

# ----

One limitation (which could also be an advantage), is making the subclass instance will return that subclass everywhere, you cant have 2 different subclasses of the same BGE data at once.
2009-06-29 12:06:46 +00:00
7ca31bb171 2.5
Search Menu: added feature that on opening, it shows the 
current ID block, and selects it. Same can be used for other
searches, just pass on pointer to active item for the search
callback.

Also fixed arrow triangle draw for search.
2009-06-29 11:29:52 +00:00
2c3e8850a5 NLA SoC: Insert Keyframe Operator Tweaks (Anim Editor Versions)
* Insert Keyframe (IKEY) operator for Graph Editor 
* Renamed the DopeSheet version to make it more consistent with the other keyframing operators
2009-06-29 03:02:41 +00:00
Dalai Felinto
b5a4492069 fix for bug while importing transparent faces:
image.has_data can't be called before you load an image, otherwise it will return false even for valid images.
The workaround is to try to run image.glLoad() before. That will crash if the image is corrupted (for we are using try/catch here).

Campbell (ideasman42) thinks it would be better to have an api call proper for that. Since 2.4xx is close to its end I really don't think it's time to keep working in its API. Specially if we have similar functions doing what we need.

@ Arystanbek (kazanbas): I'm done with the obj fixes I told you. You are free to go with the importers :)
You may want to take a look at implementing a proper image.load() to 2.5 as Campbell suggested.
2009-06-29 02:37:44 +00:00
c50bbe5ae7 BGE Py API using python3 c/api calls. include bpy_compat.h to support py2.x 2009-06-29 02:25:54 +00:00
26c7c01c32 NLA SoC: Lines are now drawn on action-clip strips for indicating the timing of repeats 2009-06-29 01:00:35 +00:00
bb1f24ac44 2.5
Make include to make GE compile.

Py 2.3 doesnt compile expressions/Value.cpp btw... 
Value.cpp:616: error: 'class PyObjectPlus' has no member named 'ob_type'

Probably need to wait for py 3.1 :)
2009-06-28 18:09:19 +00:00
13ec1fbfa4 2.5
Starting GE should initialize opengl for the 3d region.
2009-06-28 16:31:20 +00:00
417aeb935a patch [#18950] Get/set bone and type of drivers
by Alberto Torres Ruiz (dithi) 

--- quoting the patch submission
This patchs adds the properties IpoCurve.driverBone and IpoCurve.driverBone2 and modifies IpoCurve.driverChannel to
allow OB_ROT_DIFF.

It sets the driver type to pose if IpoCurve.driverBone is not empty or None. Otherwise the driver type is set to
object.

Attached is the patch (with python doc) and an example .blend.

It also fixes the confusing description of IpoCurve.driver
2009-06-28 14:55:22 +00:00
5d6485f06e 2.5 / RNA
Return right size for PROP_COLLECTION parameters
2009-06-28 13:41:50 +00:00
1b5851b4f9 PyNumberMethods needed ifdefs for python3.x and some other corrections. 2009-06-28 13:27:06 +00:00
7d88981a24 2.5
Menu usage: enabled arrow-key based browsing, especially for open and
close sublevels. Only thing missing is to prevent sublevel to open
on creating menu (like SHIFT+A now), this is design conflict in code.
(It sends fake mouse move events causing it)

Implementation note; the 'auto open sublevel' feature gets triggered
with new state var, that checks if mouse was used or not.

Also: on render in editmode, editmode result gets stored, as usual for 2.4x.
2009-06-28 12:30:50 +00:00
8bf355533e Zeroing listbase result for context data collection get when no data is found.
Caused crash for uninitialized pointers when getting collection data for editors not supporting that member, e.g. "deselect all" operator in non-3dview editors.
2009-06-28 11:37:45 +00:00
6b9f3b5f5c BGE Python API
Remove the last of the odd C++/python wrapper code from http://www.python.org/doc/PyCPP.html (~1998)

* Use python subclasses rather then having fake subclassing through get/set attributes calling parent types.
* PyObject getset arrays are created while initializing the types, converted from our own attribute arrays. This way python deals with subclasses and we dont have to define getattro or setattro functions for each type.
* GameObjects and Scenes no longer have attribute access to properties. only dictionary style access - ob['prop']
* remove each class's get/set/dir functions.
* remove isA() methods, can use PyObject_TypeCheck() in C and issubclass() in python.
* remove Parents[] array for each C++ class, was only used for isA() and wasnt correct in quite a few cases.
* remove PyTypeObject that was being passed as the last argument to each class (the parent classes too).

TODO -
* Light and VertexProxy need to be converted to using attributes.
* memory for getset arrays is never freed, not that bad since its will only allocates once.
2009-06-28 11:22:26 +00:00
6998a0f47b 2.5
Bugfixes:

- Preview Icon for render result crashed, there was still need for a scene
  pointer to be passed on.

- Added quick fix for preventing shaded drawmode to call render while
  rendering is in progress. It crashes badly.
  Rendering while UI is alive is still in probation, most UI stuff will
  probably get blocked, with exception from inspecting buttons and using
  the image window.
2009-06-28 09:35:37 +00:00
aa4ed13e4a NLA SoC: NLA Mapping Cleanup
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods. 

Now the mapping conversions should work nicely for all places that use them.
2009-06-28 07:32:00 +00:00
2fac3f3550 2.5 MSVC 9 projectfiles
* added missing include to KX_blenderhook project
2009-06-28 07:26:16 +00:00
500507ddb1 NLA SoC: Merge from 2.5 - 21179 to 21209 2009-06-28 03:26:10 +00:00
61e30f0f00 NLA SoC: Renamed NLA-Editor operators to be more in line with those in other editors 2009-06-28 03:13:01 +00:00
7271f86be5 removed un-needed hack, something weired was going on when debugging that made the pointers to these functions change after initialization. 2009-06-28 02:47:49 +00:00
388e59a768 BGE Fix for no redrawing.
Was caused by un-initialized engine ticrate, do_versions was working on 2.4x but isnt in 2.5 so just add a zero check when getting from the world.
2009-06-28 02:37:07 +00:00
aa933d2c9f BGE Redraw problem:
at the moment only files from blender 2.4x will display in 2.5x, compared area and window structs in both cases and dont see any differences.

This doesnt fix the problem but corrects a few things related to window drawing with the BGE,
also adds a hack because I noticed the window and area pointers in the KX_BlenderCanvas were offset after initialized, maybe need to use <static cast> ?
2009-06-27 23:54:20 +00:00
35ac032b55 CMake patch from Alexander Neundorf
-under UNIX, it uses FIND_PACKAGE() to find the jpg, png and zlib libraries

-it removes the explictely listed search paths, which are already searched by
default, so it is not necessary to list them again explicitely

-it removes the include directories /usr/include
and /usr/local/include. /usr/include is used by default, all other
directories should be searched via find_package/find_file and then added to
the include directories.

-replaces the include() commands for the FindXXX.cmake
modules with the appropriate find_package(Foo) calls.
This doesn't change the behaviour, but gives more features.
E.g. you could now say
find_package(JPEG REQUIRED)
and cmake will abort with an error if the package is not found.
Also it makes it clearer what is going on.

Additionally the patch removes the line
 INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
in the Windows if-branch.
Why was this there ? This file should be included anyway under Windows when
using the MS compiler.
2009-06-27 22:48:39 +00:00
67073db49c 2.5/Sculpt:
Improved sculpting in perspective mode; starting a stroke on the background would sometimes result in the brush having a huge effect on the mesh. Fixed by waiting to start the stroke until the mouse moves over the model.

The fix is not quite perfect, because detection of the edge of the model is based on the depth buffer, so other things that change the depth buffer, like the grid and axis lines in the 3d view, can throw off the calculation.
2009-06-27 21:14:04 +00:00
b097f7250d 2.5/Sculpt:
Removed a bunch of old code that was #ifdef'd out. Mostly relates to partial visibility and partial redraw. Both of these are important features, but need better design updated for 2.5.

Also removed the old (huge/ugly!) sculpt() function that is now handled by the stroke operator code.
2009-06-27 17:10:19 +00:00
c79e57dba8 2.5
Two bugfixes:
- When making 2d windows small (zero sized) the view2d data could get
  corrupted with NaN values. Clipped values correctly to 1.
- Search menu (ctrl+alt+f) had wrong color for selected text in text
  button
2009-06-27 16:35:42 +00:00
7b547f7ce7 Particle ID block controls:
* Adding/removing particle systems to an object.
* Changing of particle settings.
* Currently showing an object's particle systems in a list (like materials).
2009-06-27 15:41:47 +00:00
912c2f440b Pointcache refresh part 2
* Based on what happens during simulation the cache is marked (also in cache panel, this could possibly be extended to 3d view as well) as:
	- exact (not marked)
	- outdated (simulation is not done completely with current settings)
	- non-exact (frames were skipped during simulation)

* The parameter "cache step" effects the number of frames between saved cache frames.
	- This can save a lot of memory (or disk space) if absolutely frame accurate simulation is not required.
	- Speeds up the "quick caching" very much.
	- Frames between cached frames are interpolated from the cached frames.
	- Current default value of 10 frames works nicely with up/down-arrows (skip 10 frames forwards/backwards on timeline), but can be changed if wanted.

* The caching can work in normal or "quick" mode:
	[Normal cache]
	- Basic: Calculate what even happens (settings change, big frame steps etc.) and cache results, if possible try to use "cache step" when saving cache frames.
	- Becomes non-exact: After larger than 1 frame steps.
	- Becomes outdated: After any change effecting the simulation other than frame steps.
	- Pros/cons: Freedom of doing anything and playing with particles, but exact results have to calculated from the beginning.

	[Quick cache]
	- Basic: Calculate simulation up to current frame automatically on changes with cache step sized jumps in simulation. With multiple "quick cached" simulations the smallest cache step is used.
	- Becomes non-exact: Always from frame 1 (unless cache step = 1).
	- Becomes outdated: Never.
	- Pros/cons: Not very accurate, but super fast!
	- Todo: Transform of any animated (non-autokeyed) object is locked! Probably needs some tinkering with anim sys overrides.

* The simulation can be run forwards or backwards even if it's cache is outdated or non-exact, the following rules apply in these situations:
	- step forwards (to unknown) -> simulate from last exact frame, store result
	- step backwards (to known) -> result is interpolated from existing frames, store result, clear cache forwards if current frame is after last exact frame

* "Calculate to current frame" runs the simulation from start to current frame with a frame steps of 1.
	- Baking does the same, but runs the simulation all the way to the end of simulation.
	- Rendering does this automatically if the simulation is outdated of non-exact, so all rendered simulations will always be updated and exact.
	
* Every cache panel also holds buttons to "Bake all dynamics", "Free all dynamics" and "Update all dynamics to current frame".

* Cloth simulation supports the new cache too.
2009-06-27 15:28:58 +00:00
9becf3c310 2.5
Test commit; toolbar has 'add operator' menu in mesh editmode.
Nothing stored, freed here...

Also: removed reading .B.blend, since a much better default has
been compiled in now, prevents confusing testers who run 2.5
for the first time. :) Of course .B25.blend still works.
2009-06-27 15:21:37 +00:00
c9513df561 UI:
* Fix issue with icon not being left-aligned in text field.
* Put modifier tab after data tab in buttons header.
2009-06-27 14:35:24 +00:00
2b8c574182 UI: move bone constraints panel to bone tab again. 2009-06-27 14:07:17 +00:00
1d135cb955 RNA: move softbody flags from Object to SoftBodySettings. 2009-06-27 14:02:21 +00:00
ce15921a68 2.5 RNA:
* Added more softbody properties (collision, solver) and some flags in object RNA.
2009-06-27 13:20:19 +00:00
5d6801a472 2.5
Mesh editmode fix: Add new primitive often was on wrong location.
Viva Vazquez testing! :)
2009-06-27 13:10:18 +00:00
bc0cd9607e NLA SoC: Move Strips Up/Down Operators
These operators may be temporary only, depending on if a workable solution via transform is found.
* PageUp moves strips into the track above if there's space
* PageDown moves strips into the track below if there's space

* Also fixed a button-alignment bug in the DopeSheet header
2009-06-27 13:00:22 +00:00
d55b460419 2.5
Bugreport; on dragging area edges, the mouse-release event was 
swallowed by the panel animation handler. Thanks Pablo Vazquez 
for report. :)
2009-06-27 12:41:28 +00:00
d3557fc487 NLA SoC: Recoded the strip<->global time conversion code
* Strip evaluation now takes into account repeats
* Increasing the number of repeats lengthens the strip, while decreasing the number of repeats does the opposite.

TODO:
- inverse correction doesn't take into account repeats != 1, so tweaking strips with repeats is currently not recommended!
2009-06-27 12:35:11 +00:00
5d6ef223fb 2.5 RNA:
* Started Wrapping softbody RNA.
2009-06-27 11:57:50 +00:00
f508319fc8 NLA SoC: Apply-Scale Operator now recalculates action length after scale is applied 2009-06-27 04:56:20 +00:00
bbf793472e NLA SoC: Merge from 2.5 - 21146 to 21178 2009-06-27 03:19:55 +00:00
222fe6b1a5 UI
* Search popup + autocomplete for bones, vertex groups, etc. This
  is done with layout.item_pointerR, specifying an RNA collection to
  take the items from. Used by constraints and modifiers.

* Some tests with the List template, ignore those for now..
2009-06-27 01:15:31 +00:00
d839a9ae9c RNA
* Added support for passing collections to/from RNA functions,
  this is done using a ListBase of CollectionPointerLink, which
  is a standard ListBase link + PointerRNA.

* Added editable active uv/vcol layer to Mesh.
* Armature.bones now includes all bones, not only the ones without
  parents.
* Modifier UV layer fields now are allowed to be empty, previously
  this would set the name during modifier evaluation if there was
  none.
2009-06-27 01:10:39 +00:00
13d18c5f77 NLA SoC: Theme colours in old defaults files for NLA now get replaced with the nice new colours 2009-06-27 00:40:25 +00:00
Dalai Felinto
d7d60f4ab9 fix for importing of transparent faces from .mtl files - ZTrans now is set for them as well.
(what makes importing from SketchUp really nice)
2009-06-26 21:51:23 +00:00
b1a5b08b1a == Sequencer ==
Small fix by jms: rint() isn't available on win32... 
(hmm, rint() is conforming to C99, that is _really_ strange...)
2009-06-26 19:40:28 +00:00
524b861437 2.5
Part one (of probably many :) of Operator review/validation.
Nothing final nor defined, it's reseach :)

- Added tool buttons in "Toolbar" (Tkey). Just four examples
  for objectmode, and six for mesh editmode.

(Review in progress is operator internal state vs context, what
do redo exactly, undo vs redo syncing, when op->invoke or not,
etc. This has to be pinned down exactly and frozen asap)

- On undo, clear redo-operator-stack for now (won't work)
- Added call to better detect active/current view3d region.
  ED_view3d_context_rv3d(C)
- Fixed some operators that missed correct redo (add-prim etc).

Later more fun!
2009-06-26 15:48:09 +00:00
efcdd16b07 == Sequencer ==
Additional speed control fixes:
frame blending can now be done on more than two
frames, enabling really fine grained motion blur
if you speed up a sequence with high factors (bigger
than two).

Next step: add morphing support using motion 
estimation.
2009-06-26 15:09:39 +00:00
07e9c4ef2b 2.5
Makes toolbar region in 3d editor work correctly overlapping, also
when area is subdivided in 4-split, and/or with properties region.
2009-06-26 12:55:46 +00:00
6f87d03b3c == Sequencer ==
This fixes several issues with the Speed Control Effect:
* IPO curve-deletion resulted in non-working effect
* easy retiming only allowed enlarging of strips,
  now shrinking is also possible (easy retiming:
  use the right display handle of input strip and
  shrink or enlarge, will make the speed of the
  strip exactly fit the effect strip's length)
* frames after end-of-display of input strips can
  now be accessed (which is necessary for fix #2)
  
=> just use easy retiming from now on, it's fun :)
2009-06-26 07:32:24 +00:00
6b9e817032 bugfix [#18949] bvh import does not do single rigid bodies
these BVH files are not that common but may as well support it.
2009-06-26 02:49:47 +00:00
23f48b8bb1 using the edge length to weight the vertex blue wasnt wokring very well (removed) 2009-06-26 02:22:53 +00:00
4b914c7f75 Made Mathutils use radians rather then degrees. defining USE_MATHUTILS_DEG for testing existing scripts.
Added conversion for BGE Quaternion WXYZ (Blender/C) -> XYZW (Moto C++).
BGE Python API now uses WXYZ following mathutils (break script warning).
2009-06-25 20:47:41 +00:00
47ca543b32 2.5
Rendering preview icons is back!

Note for Andrea: the render code has been decoupled from
drawing, it needs Scene context to be able to run...

At the moment only the search menu calls the new render
code (which is the ID browse menu default anyway)
2009-06-25 15:41:27 +00:00
8cda8abefe Bugfix, testing venom's lab .blends
Using LightGroups override for material doesn't work for preview
renders. Code didn't correctly return correct light listbase then,
crashing Blender on preview render.
2009-06-25 12:32:55 +00:00
6510da4ce2 NLA SoC: Fix transforms for transition strips. 2009-06-25 12:30:49 +00:00
deffe4a315 NLA SoC: Armature Drawing Code Fixes
* Compiling broke for some users on this file due to my scaling-fixes commit. Dunno why this didn't give any errors here (silly compiler!)

* Restored code to make ghost poses (and supposedly paths) work again. This doesn't totally seem to be the case yet though.
2009-06-25 10:52:09 +00:00
d428ba1de8 PyAPI RNA/BGE
* all mathutils types now have optional callbacks
* PyRNA returns mathutils quat and euler types automatically when they have the rotation subtype.
* PyRNA, reuse the BPy_StructRNA PyObject rather name making a new one for each function returned.
* use more arithb.c functions for Mathutils quaternion type (less inline cruft).
* BGE Mathutils integration mostly finished- KX_PyMath now converts to Mathutils types rather then lists.
* make all mathutils types share the same header so they can share a number of functions - dealloc, getWrapped, getOwner.
2009-06-25 10:11:37 +00:00
a50be876d3 NLA SoC: Quick crash fix
Pointer for accessing settings of active NLA-strip was not getting set. The code for this was accidentally removed during an earlier commit to clean up the poll callbacks here.
2009-06-25 05:05:35 +00:00
a1c5c501a6 At last... this merge should finally do the trick!
21073 to 21145
2009-06-25 04:33:21 +00:00
434a994f30 Mathutils quat1 * quat2 was broken, returned quat1*quat1 instead. 2009-06-25 01:37:19 +00:00
122808b839 bug fix SoftBody module
vertex groups are not notified on deletion .. and other relevant changes  ..
sneak in Mass and Spring Painting
2009-06-24 23:42:45 +00:00
7a357cba39 2.5: File Selector: display operator properties in the side region,
check Save Image or Export PLY operator for example.

Also these code changes:

* Added some RNA collection iterator macros to simplify code.
* Fix bpy.props.BoolProperty not working correct.
* Merge uiDefAutoButsRNA/uiDefAutoButsRNA_single into one.
2009-06-24 21:27:10 +00:00
169fdf9e97 2.5: bug fixes for some erratice materials buttons drawing. 2009-06-24 18:39:00 +00:00
b6241e7b7c 2.5
Bugfix: added refresh for modifiers for enable/disable
2009-06-24 17:57:10 +00:00
ee9c260c38 2.5
- Added ND_SHADING notifier on linking materials, so it gives 
  refreshes in UI
- Removed reduntant debug prints

Crucial fixes in other code while checking warnings;
- Particle buttons were assigned to short, whilst data was int
- Filesel border select used float rect API, on an int rect.
2009-06-24 17:22:22 +00:00
627abe0acf 2.5
Added support for icons in search menu.
It already displays icons for saved materials etc. from old files.
Have to add previewrenders for this still.
2009-06-24 16:44:54 +00:00
5b26f520bb UI
* Added SCROLL button type, use like a NUMSLI basically, with
  a1 used to define the scroller size.
* Add scroll and toggle colors to the Theme (toggle was set to
  draw like radio in a recent commit, but it's the intention
  these look different).
* Added rudimentary list template, used for object material
  slots, this is WIP though.
* In popup menu, split text with line breaks over multiple
  lines, makes python errors display slightly nicer.
2009-06-24 14:16:56 +00:00
a379fdd7fb 2.5: Object material slot operators add/remove/assign/select/deselect. 2009-06-24 14:07:48 +00:00
242d9c31d3 RNA
* RNA_struct_name_get_alloc function to get the name from a
  pointer, instead of having to deal with name property.
* CTX_data_pointer_get_type to get data from context with
  a check for the RNA type.
2009-06-24 14:03:55 +00:00
9abce5dfba 2.5
Medium sized Color Picker; consisting of number sliders, row buttons to
select rgb/hsv/hex, HS circle and V slider. It opens persistant, like
old picker.

This one opens default, other two can be accessed with ALT or SHIFT click.

On todo;
- eyedropper tool back
- method for click-drag to make mini picker appear

Note for UI coders (brecht :), added a UI_HIDDEN flag in buttons, to
support switching buttons in menus. Hidden buttons are not activated nor
drawn.
2009-06-24 13:44:19 +00:00
e5f6a41b1b NLA SoC: Scale Operators - Clear (Alt-S) and Apply (Ctrl-A)
These two operators work only on Action-Clip strips. 

* Clear (Alt-S) resets the scale of selected strips to 1.0
* Apply (Ctrl-A) applies the scale of the selected strips to their referenced Actions. If this referenced Action is also used by several other strips, a copy of the Action is made, and the scaling is applied to that Action instead.
2009-06-24 12:50:20 +00:00
3533cda80c NLA SoC: Delete Tracks Operator (XKEY / DELKEY) over the channel list
This deletes all the strips in the relevant (selected) tracks too.
2009-06-24 12:12:11 +00:00
16f32ec4ed 2.5 - Quick compiling fix for particles-animation commit earlier. For some reason, compilation was broke on some compilers. 2009-06-24 10:48:37 +00:00
e5119ee2c0 NLA SoC: Drawing Tweaks
* Transition tracks are now drawn in a different colour (bluish)

* Action line now shows keyframe indicators for the action it is representing. These are drawn as small empty diamonds to show that they're not directly editable (and never ever will be) via the NLA Editor.
* Action line is also drawn with borders to help differentiate it from the other tracks.

* As an experiment, removed the 'TweakMode' buttons from the header. I had originally added this as a way of indicating that this functionality was there (and to allow for keeping track of it), though it seems to have caused far too much confusion and frustration about 'modality' instead.
2009-06-24 10:32:13 +00:00
db03788ad3 2.5 - Particle Settings now Animateable
Added AnimData to ParticleSettings so that this will work. This seems to be ok in the brief tests I did, but be warned that this may not be optimal for the Particles System...
2009-06-24 02:11:36 +00:00
717916c2b9 NLA SoC: Fixes for segfaults during NLA Transforms
The snapping code was incorrectly assuming that td->extra was always AnimData, but for NLA this is incorrect as it is used for special data used for checking back.
2009-06-24 01:41:12 +00:00
0336c2e7f5 NLA SoC: Fixing a few cases where the wrong flags got used in last night's commit 2009-06-24 01:04:01 +00:00
483e9479f7 New Style option: Overlap
If this option is enable, the blenfont check for overlap characters, like
one of my previous commit but now it's optional and disable by default.
(This fix the "Fi" or other case when the characters are too close)

Enable/disable from:
Outliner -> User Preferences -> Styles -> Panel Font -> Overlap

(also for other styles, Group Label, Widget, Widget Label)
2009-06-23 18:26:01 +00:00
30d769e2cd fix ui issues of space_logic 2009-06-23 17:30:18 +00:00
dd493f71be modified patch from Arystanbek, allow assigning of mathutils matrix to an rna matrix 2009-06-23 17:10:46 +00:00
af3f862480 2.5
Removing editors/include export from Make, it's not needed luckily :)
2009-06-23 17:06:46 +00:00
61e7734aaf 2.5
Game engine Makefile update.

Note to coders: including BLO_ for only intptr typedef is ehh... not
so nice. But it should not have been added there in first place.
(BLO_ = .blend file read/write). Nice for a future cleanup. :)

Also goes for ED_ includes btw, = bad level call for GE! If you need
it to get things work now, fine, but it will make player impossible.
2009-06-23 16:57:46 +00:00
cb59bf722e Move shadow option (for text) from editor/interface to blenfont.
Two new function:
 BLF_shadow: set the level (for blur) and the shadow color.
 BLF_shadow_offset: set the x and y offset for shadow.
		 (this is the current position plus offset)

By default shadow is not enable in the font, so before draw the
text you need call BLF_enable(BLF_SHADOW), also remember disable
the option in the end.
2009-06-23 16:27:35 +00:00
eb22a7b210 PyRNA API support for matrix types as Mathutils matrix (with callbacks) rather then a generic rna sequence of floats.
Any 3x3 or 4x4 rna matrix will automatically be returned as a Mathutils matrix.
This makes useful stuff like multiplying a vector location by an object matrix possible.
 ob = bpy.data.scenes[0].objects[0]
 print (ob.data.verts[0].co * ob.matrix)

Also added mathutils matrix types to the BGE GameObject.localOrientation, worldOrientation

* MT_Matrix3x3 added getValue3x3 and setValue3x3, assumed a 4x3 float array.
* KX_GameObject.cpp convenience functions NodeSetGlobalOrientation, NodeGetLocalOrientation, NodeGetLocalScaling, NodeGetLocalPosition.
* 2.5 python api now initializes modules BGL, Mathutils and Geometry
* modules py3 PyModuleDef's use PyModuleDef_HEAD_INIT, rather then {}, was making msvc fail to build.
* added macros for Vector_ReadCallback, Vector_WriteCallback etc. to check if the callback pointer is set before calling the function.
2009-06-23 13:34:45 +00:00
b4acd77526 NLA SoC: Big Commit - Restored NLA-Mapping Corrections
In TweakMode, the keyframes of the Active Action are now shown (and can be edited) in NLA-mapped time, with appropriate corrections applied when editing. This works in the DopeSheet and Graph Editors :)

To do this, got rid of the old wrappers/API-methods, replacing them with new-style ones. A few methods previously (in this branch) used only for evaluation are now used for this purpose too. As the same code is used for editing + evaluation, this should now be much better to work with.

I've only done a few brief tests now, but I think I might've muddled the invert-flags on one or two cases which I'll need to check out tomorrow. So, beware that there may be some weird and critical bugs for the next few days here...

Also, added proper license headers to new NLA files.


TODO:
- testing + bugfixing due to this commit
- show range of keyframes in NLA Editor active-action line
2009-06-23 13:25:31 +00:00
bf74f105bc small changes...
- allow RNA_property_enum_items to take the totitems int pointer as NULL (spares a loop on all the enum items). this change also makes enums types with no enum array crash in some places, could support these though Id rather disallow them, generating docs is a quick way to test for this.
- open recent file operator used and enum to open the recent file without an enum array, changed to an int type.
- added space_logic.py poll functions
2009-06-23 12:36:15 +00:00
502a3849bd 2.5 - Icons for Modifiers in Modifier Template
As per William's mockup - http://www.reynish.com/files/blender25/modifiers.png
2009-06-23 11:28:48 +00:00
a4b0f41a4a 2.5 Icons:
* Added lamp icons.
2009-06-23 11:16:27 +00:00
4771c2358d 2.5 Icons:
* Modifier Icons are now shown in the add modifier menu.
2009-06-23 11:00:35 +00:00
9fd605c050 2.5: Image Editor
* Menu and header more complete now.
* Clean up Game Properties panel and moved View Properties panel
  to python.
* Fix some drawing issues when combining tiles, repeat and aspect,
  some also from 2.4x, these options didn't work together 100%.
2009-06-23 00:45:41 +00:00
e2b6cea3b9 2.5: Tool Settings
* Moved proportional edit, snap, autokey mode, and a few others
  from Scene to ToolSettings.
* RNA wrapped properties in ToolSettings for the UV editor:
  proportional edit, snap settings, selection modes.
2009-06-23 00:41:55 +00:00
272fac8fd6 UI: some API functions don't require explicit context passing anymore. 2009-06-23 00:19:10 +00:00
333e231fa6 SVN maintenance. 2009-06-23 00:09:26 +00:00
8c1d19020e UI
* Make Directional Order menus the default again.
* Scale up contents panels that do not use layout system.
* Fix for enum size and uncesseray colon in some cases. 
* For item_menu_enumO, show icons if specified in RNA in
  the menu (e.g. in the add modifier menu if there were
  icons specified).
2009-06-22 23:58:16 +00:00
2293347af8 2.5 MSVC9 projectfiles
* RNA: move of rna_*_api.c files
* removed deleted projects ODE, SUMO etc.
* Added new files to editors/space_logic
2009-06-22 22:39:28 +00:00
8579eff5c6 removing files that should not be in blender2.5, added (by mistake?) r19226 2009-06-22 22:32:00 +00:00
e7d02e5679 2.5: warning fixes
Mostly harmless ones, except for one about "gzopen64" being
undeclared. This needs some defines in BLI_storage.h to be set
before <unistd.h> is included. Might fix a crash in compressed
file reading, though I'm not sure since it's hard to repeat
the crash consistently.
2009-06-22 18:19:18 +00:00
aa267976b8 NLA SoC: Merge from 2.5
21043 to 21072 

(NOTE TO SELF: Campbell made a commit in 2.5 before this merge finished)
2009-06-22 04:39:35 +00:00
bce3f7e019 PyAPI Mathutils Vector callbacks, referencing other PyObjects rather then thin wrapping vectors which is crash prone.
in short, vectors can work as if they are thin wrapped but not crash blender if the original data is removed.

* RNA vector's return Mathutils vector types.
* BGE vectors for GameObject's localPosition, worldPosition, localPosition, localScale, worldScale, localInertia.
* Comment USE_MATHUTILS define to disable returning vectors.

Example...

* 2.49... *
 loc = gameOb.worldPosition
 loc[1] = 0
 gameOb.worldPosition = loc

* With vectors... *
 gameOb.worldPosition[1] = 0


* But this wont crash... *
 loc = gameOb.worldPosition
 gameOb.endObject()
 loc[1] = 0 # will raise an error that the objects removed.

This breaks games which assume return values are lists.

Will add this to eulers, matrix and quaternion types later.
2009-06-22 04:26:48 +00:00
f1fb09a493 NLA SoC: Graph Editor Menus + Operator Name Cleanup
As with the DopeSheet, the names of operators in the Graph Editor have been cleaned up, and operators have been added to menus as appropriate to show their availability.

Tweaked a few DopeSheet operator names to be more in line with the Graph Editor equivalents, and vica versa.


TODO: now, the operator poll callbacks here need checking...
2009-06-22 04:23:06 +00:00
aea9dd598c NLA SoC: DopeSheet Cleanups
* Replaced old-style menu defines with the new-style Layout Engine ones. These are now much cleaner as a result :)

* Wrapped DopeSheet and Graph Editors in RNA to allow them to use the new Layout Engine for menu drawing 

* Shortened the names of operators in the DopeSheet, removing the "keyframes" prefix since that's the only real context which can operate there.

* Standardised a few names, and renamed a confusingly named operator (cfrasnap -> jump to frame)
2009-06-22 03:26:36 +00:00
d5e9eb7d76 * fix for small bug in volume texture stack 2009-06-21 22:17:06 +00:00
1efffc1f56 2.5/Sculpt:
Fixed the Lock X/Y/Z buttons for sculpt, should work for all brushes now.
2009-06-21 18:59:26 +00:00
Dalai Felinto
320fc51a2b BGE pyAPI update
(adding "when accessing it from the Game Engine use Mathutils instead of Blender.Mathutils" message in Blender pyAPI doc)
2009-06-21 17:40:56 +00:00
03c46c1e54 2.5/Sculpt:
Some improvements to the layer brush; the displacement is now tied to brush size, like for draw and inflate.

Fixes for layer brush in subtract mode and anchor mode.
2009-06-21 17:04:17 +00:00
6a35c7fc98 more corrections from cleanup :/ 2009-06-21 17:03:17 +00:00
29c6440bb3 == AVI ==
Only open AVI files with at least one supported video track type.
(This is the real fix for DV-Type1-AVIs, since the FCC of iads, that
is used there, wasn't detected. But the code will happily open AVI-files
with only audio tracks... So the real fix is: only try to open things, that
contains something we know how to handle :) )
2009-06-21 17:00:18 +00:00
b9f5676caa remove support for videoscape, amiga 3D app that came before lightwave. 2009-06-21 16:58:22 +00:00
8ead648fd1 Spring Cleaning
* removed radiosity render code, DNA and RNA (left in radio render pass options), we'll get GI to replace this probably, better allow baking to vertex colors for people who used this.
* removed deprecated solid physics library, sumo integrations and qhull, a dependency
* removed ODE, was no longer being build or supported
* remove BEOS and AMIGA defines and references in Makefiles.
2009-06-21 16:18:38 +00:00
de77b4a9b3 2.5/Sculpt:
Fixed bug where anchor brush would leave messed up normals (was related to using face normals, not vertex normals.)
2009-06-21 15:59:43 +00:00
7f55c3b89c RNA read-only wrapped wmEvent so python operators invoke functions
* 2 new enums event_value_items and event_type_items in RNA_enum_types.h
* WM_key_event_string now uses an RNA enum lookup rather then its own switch statement.
* moved wmEvent from WM_types.h into DNA_windowmanager_types.h
* added RNA_enum_identifier and RNA_enum_name to get strings from an enum value.
2009-06-21 14:30:59 +00:00
4dec9f3cb6 == Sequencer ==
Very, very last minute patch for Blender on Windows systems:
move blender's internal AVI reader the last try in the list of
codecs, when opening movie files.

Otherwise, it will fail on Movie Maker captured DV-AVI files.
(isavi() seems to mistreat these files as RAW/MJPEG AVI and fails
later on IMB_anim_absolute() )
2009-06-21 12:02:40 +00:00
1f9368b37e Particle system parenting
* Allows moving, rotating & scaling of particle simulations.
* Setting in particle render options.
* Changes viewed & rendered particles from global space to parent space.
* Doesn't effect simulations at all.
2009-06-21 11:09:16 +00:00
c549e75c16 2.5 Buttons Window:
* WIP Commit: Started wrapping the buttons header to python. Still disabled due to some display problems.
2009-06-21 10:26:39 +00:00
6b15024f4a Pointcache refresh part 1:
* Particles support larger than 1 frame changes, bigger frame changes can result in inaccurate results, but it's super fast and you get a nice feeling of how the particles behave!
* "Cache to current frame" button calculates the exact result of particles at current frame.
* Current state of cache can be protected by making it a bake.
* Cache is now in memory by default, disk cache is an option.
* Only "viewport %" number of particles are calculated and cached in viewport, baking and rendering calculate all particles.
* Info on cached frames and memory usage given in ui.
* Support for exact "autocaching" of changes and large frame changes(disabled for now until exact place in event system is decided)
* "Continue physics" is probably deprecated after this and should be removed once sb & cloth use the new cache code.

Todo:
* Make softbody & cloth use the new cache things.

Other changes:
* Some cleanup of particle buttons.
2009-06-21 10:16:52 +00:00
64274de2fe 2.5/Sculpt:
Fix for the poll used for the operator to set the brush curve to a preset. The 3 brush curve presets in the Sculpt menu are now functional.
2009-06-21 03:34:30 +00:00
ed316ad8e9 NLA SoC: Fixes for Operator Poll Callbacks
* Clicking on NLA tracks while in TweakMode now works so that channels can be muted/protected/expanded as per usual. However, they cannot be selected, as changing the selection state can interfere with TweakMode state changes

* Operators for animation channel-lists now use proper poll callbacks, which also take into account TweakMode where appropriate (i.e. all selection operators are now allowed to operate in NLA while in TweakMode, and all other operators will only work in Animation Editors) 

* Action Editor operators now use the poll callback for Action Editors/DopeSheet instead of the generic active-araa one.
2009-06-21 03:02:40 +00:00
984ab79629 2.5/Multires:
Bugfix for loading older files with the pre-modifier multires.
2009-06-21 02:51:42 +00:00
6bca54aac1 NLA SoC: Click-Select Operator and TweakMode
To make TweakMode seem less modal/blocking, selection now works in TweakMode. The caveat though, is that TweakMode must be immediately exited as a result of this, or else the internal state could become rather inconsistent and confused. 

All other operators will still continue to operate as per normal though, since in TweakMode, some operations are still very dangerous.
2009-06-21 02:03:50 +00:00
09e64c6e2c 2.5 - Fixed error with Constraint Buttons
Incorrectly declared icon was resulting in very verbose warning output in the console...
2009-06-21 00:17:45 +00:00
19c246ce5d NLA SoC: Merge from 2.5
21021 to 21042
2009-06-21 00:01:37 +00:00
001dab25d4 2.5/Sculpt:
Added a clay brush. It behaves like a combination of the flatten and draw brushes.

Credit to Fredrik Hannson for the original patch (#18666)
2009-06-20 20:29:25 +00:00
a42b436a98 PLY export, use the file selector and added operator options 2009-06-20 16:08:01 +00:00
823a7ce3d3 RNA: added MeshVertex.normal. 2009-06-20 15:06:18 +00:00
ad07fc19c0 Context
Python dir(context) now gives the items from the data context
too, modified context callbacks to also return a list of items
in the context.
2009-06-20 14:55:28 +00:00
980dab9028 2.5: fix for crash in BLI_dynstr_appendf, each vsnprintf call
apparently needs its own va_start/va_end.
2009-06-20 14:53:30 +00:00
ed2887f720 updated the ply exporter to use the blender 2.5 python api
Note's
* exports the mesh without modifiers or transformations applied
* supports UV's vertex colors
* no support for normals yet (missing from data api)
* registers an operator called EXPORT_OT_ply
* no file selector yet. can only fun from python currently
  bpy.ops.EXPORT_OT_ply(filename="/tmp/test.ply")
* removed double lookups on the vertex dict, build face verts to write allong the way.
2009-06-20 14:01:34 +00:00
f7c0d1b550 moving the existing ply exporter into io before updating (to get a useful diff) 2009-06-20 13:55:47 +00:00
a68ebbbccd RNA Fixes
* Python apis iterator didnt work, for example [f for f in mesh.faces] # failed.
* Python apis collection.items(), collections without names now return (index,value) pairs, better then returning nothing.
* bpy.ui and bpy.props modules were incorrectly named
* Mesh vertex colors red/blue needed to be swapped on getting/setting.
* Mesh vertex colors were not clamped.
2009-06-20 13:53:14 +00:00
6ff4a7229f NLA SoC: Conversion fixes - Curve 'Speed' Curves + Constraints
These fixes get the 'pathJumper.blend' file from our testing suite workable in 2.5 (with a few minor tweaks still needed *)

Changes required:
- Added a 'ctime' var to curve structs for storing the value that used to be obtained by specially evaluating the 'speed' curve when evaluating objects parented to the curve. This can now be animated as a 'proper' var as per normal.
- Added a special hack for detecting constraint blocks, as the old method resulted in paths for Objects instead...

(*) Issues:
- Unfortunately, the paths still don't work out of the box. For some reason, the constraint names in the paths are spelt incorrectly - "Ar" and "Br" instead of "Ap" and "Bp". I'm not sure where this problem is coming from, but changing the paths manually in the Datablocks viewer fixes this error...
- I noticed that in the buttons view, only 1st of the constraints gets shown. This seems a bit like some of the intermittent problems I've had with some arrays/lists not expanding properly in Datablocks view.
2009-06-20 11:44:56 +00:00
ef7860ed9a NLA SoC: Conversions for old NLA-data to the new system
Old NLA-data now gets mostly ported converted over to the new system, with strips and their respective Actions being handled correctly in the test cases I've got. 

The conversion procedure now tries to fit multiple strips into since tracks as it is assumed that quite a few old setups tried to do. However, some old setups may be adversely affected by this (i.e. if they depend on a certain order of holding adds for example). 

For now, there are no complete replacements for the NLA-Modifier/Auto-Walking stuff yet, so that info is currently just ignored (but correctly freed). The current plan here is to get Armature-level pose-offset system + F-Modifiers where appropriate. This should be one of the major causes of file breakage now...

Also, I've yet to restore some patching for group instancing NLA stuff, since more trickery here is required. This is probably the second major cause of file breakage...
2009-06-20 09:36:55 +00:00
3b2ec94977 Voxel data & volume light cache
* Added support for additional file types in the voxel data texture. I added 
support for 8 bit raw files, but most notably for image sequences.

Image sequences generate the voxel grid by stacking layers of image slices on top 
of each other to generate the voxels in the Z axis - the number of slices in the 
sequence is the resolution of the voxel grid's Z axis. 

i.e. http://mke3.net/blender/devel/rendering/volumetrics/skull_layers.jpg

The image sequence option is particularly useful for loading medical data into 
Blender. 3d medical data such as MRIs or CT scans are often stored as DICOM 
format image sequences. It's not in Blender's scope to support the DICOM format, 
but there are plenty of utilities such as ImageMagick, Photoshop or OsiriX that 
can easily convert DICOM files to formats that Blender supports, such as PNG or JPEG.

Here are some example renderings using these file formats to load medical data:
http://vimeo.com/5242961
http://vimeo.com/5242989
http://vimeo.com/5243228

Currently the 8 bit raw and image sequence formats only support the 'still' 
rendering feature.

* Changed the default texture placement to be centred around 0.5,0.5,0.5, rather 
than within the 0.0,1.0 cube. This is more consistent with image textures, and it 
also means you can easily add a voxel data texture to a default cube without 
having to mess around with mapping.

* Added some more extrapolation modes such as Repeat and Extend rather than just clipping

http://mke3.net/blender/devel/rendering/volumetrics/bradybunch.jpg

* Changed the voxel data storage to use MEM_Mapalloc (memory mapped disk cache) 
rather than storing in ram, to help cut down memory usage.

* Refactored and cleaned up the code a lot. Now the access and interpolation code 
is separated into a separate voxel library inside blenlib. This is now properly 
shared between voxel data texture and light cache (previously there was some 
duplicated code).

* Made volume light cache support non-cubic voxel grids. Now the resolution 
specified in the material properties is used for the longest edge of the volume 
object's bounding box, and the shorter edges are proportional (similar to how 
resolution is calculated for fluid sim domains).

This is *much* more memory efficient for squashed volume regions like clouds 
layer bounding boxes, allowing you to raise the resolution considerably while 
still keeping memory usage acceptable.
2009-06-20 06:41:50 +00:00
3511d72488 game logic UI script, physics could be broken up into more panels. 2009-06-20 06:06:13 +00:00
bc77cc3a81 typo in logic buttons 2009-06-20 05:16:09 +00:00
9e498c7ddd Mistake in FBX export broke importing on some apps (but not the ones I tested with. grr)
Reported by James Dolan on autodesks forum
http://area.autodesk.com/forum/autodesk-fbx/fbx-sdk/fbx-files-exported-from-blender-cause-assert/
2009-06-20 04:03:13 +00:00
6394ee9e81 NLA SoC: Drawing + Editing Fixes
* Strips using the same action as the 'tweaking action' now get the error flag cleared after tweakmode is exited. (These strips draw with red shading)

* The direction in which strips get played (as a result of the 'reversed' option) now gets indicated on strips by the direction of the arrow text printed on each strip

* The active strip flag is now cleared after duplicating/splitting strips.
2009-06-20 04:02:49 +00:00
6393e9b3ca NLA SoC: Fixes for problems arising from the merge 2009-06-20 03:58:25 +00:00
12bf10be02 2.5 merged 20773:21020 2009-06-20 03:38:34 +00:00
7785ead4eb ObColor wasnt converted into an RNA string.
Updated Mathutils.Vector/Euler/Quaternion/Matrix so these are types rather then module methods, each type now has a tp_new function, matching python builtins float/int/str.
Also cleaned up float conversion and arg passing.

Changed buttons_objects.py...
 if ob in groups.objects: # no longer works
 if ob.name in groups.objects: # is the new syntax
...its more dict like and a lot faster (avoids python iterating over each item and comparing each, use a single rna lookup instead).
2009-06-20 02:44:57 +00:00
d0e8acaf29 UI
* Fix issue with panel header line not always being hidden
  for the first panel.
* Fix graying out of aligned buttons being off by one pixel,
  did not find a nice solution for it though, so just added
  -1/+1 in the code.
2009-06-19 23:11:41 +00:00
aa0aac706e 2.5
* Optimized RNA property lookups and path resolving, still can be
  much better, but now the 1000 IPO example on bf-taskforce25
  runs at reasonable speed.
* Also an optimization in the depsgraph when dealing with many
  objects, this was actually also a bottleneck here.
2009-06-19 23:05:21 +00:00
7349d775b0 2.5/Sculpt:
Made some improvements to how brush strength works.

* For the draw and inflate brushes, the brush's 3D radius is used to set the "goal" distance, towards which vertices move. A strength setting of 1.0 will move verts there immediately (with the usual exceptions of tablet pressure, texture/curve input, etc.)

* Also changed strength calculation to use the square of the strength slider, so that you don't have to be as finicky setting a low brush strength.

* For smooth brush, added an extra loop through the verts. So, a bit slower, but now verts take into account more than the immediate vertex ring.

TODO:
Still some magic numbers:
* Pinch limits the effect to moving vertices half of the way towards brush center. I see no use for a 100% pinch (it pretty much destroys the mesh.) Even half may be too high a limit, but this is hard to place an exact number on.

* Smooth has two magic numbers, the strength fudge factor and the number of smooth repetitions (currently 2.)

* The way the layer brush works is left unchanged for now.
2009-06-19 22:16:30 +00:00
c3b8db4833 BGE: allow action blending by bringing back blend_poses() as game_blend_poses, the new animation system doesnt use it but doesnt have a replacement function so it can be kept for the BGE only. 2009-06-19 16:27:01 +00:00
6c139156cf RNA:
* EditBone wrapped, using manual get/set function, and used
  in the UI code. Makes the RNA wrapping code here more
  complicated, but works.
2009-06-19 14:56:49 +00:00
bb9323a720 NLA SoC: Minor Tweaks (Duplicate + Muted-Strip Drawing)
* Duplicate operator now inits transform once strips have been created
* Muted strips now draw with a dotted outline
2009-06-19 12:57:31 +00:00
d525ae1782 NLA SoC: Duplicate Strips Operator (Shift D)
It is now possible to Duplicate Strips again. Strips are added into the first available space in the track above the original track (or a new track above the original if there wasn't any space).

Also, separated out the 'add' operators into their own menu. This might need to be changed later...
2009-06-19 12:45:08 +00:00
e3fc5481b9 NLA SoC: Bugfixes
* Loading old Action Editors resulted in wrong view settings being used
* Wrong operator names used in previous commit...
2009-06-19 11:56:53 +00:00
42e60acce6 Animato - Conversions Bugfix
Object actions are now converted before object ipo's so that if both of them exist, the Action can still preserve its name.
2009-06-19 11:17:56 +00:00
db27ab918d Bugfix: Displace modifier was missing the "direction" drop down menu. 2009-06-19 09:21:08 +00:00
8ffb1dacad NLA SoC: Bugfix for Deleting Keyframes
When an F-Curve doesn't contain any keyframes anymore but it still exists, the F-Curve's value is not recalculated and flushed anymore if the F-Curve's value will not change. That is, if the F-Curve doesn't have any other data, i.e. drivers or generator-modifiers, which would still change its value, it wouldn't be recalculated to have a value of zero. 

This solves the problem of deleting all scale keyframes, whereby objects/bones would appear to 'vanish'
2009-06-19 04:58:40 +00:00
a87bc73d32 NLA SoC: Transition Strips + Strip Adding Operators + Bugfixes
== Transitions ==
Transition strips are now able to be created + evaluated. Transitions allow for interpolation between the endpoints of two adjacent strips in the same track (i.e. two strips which occur in the same track one after the other, but with a gap between them). 

- The current behaviour when only one endpoint affects some setting is non-optimal, since it appears somewhat inconsistently extend/replace values...
- Transform code needs a few fixes still to deal with these


== Strip Adding Operators ==
* New strips referencing Actions can be added using the Shift-A hotkey while in the strips-area. You must have a track selected first though.  
The new strip will get added, starting from the current frame, in the selected track(s) only if there is enough space to do so. Otherwise, the new strip gets added at the top of the stack in a new track.

* New transition strips can be added with the Shift-T hotkey while in the strips area. You must have two adjacent strips selected for this to work.

== New Backend Methods ==
* Recoded the strip/track adding API to be more flexible
* Added a new method for testing whether F-Curve has any modifiers of with certain attributes. Will be used in a later bugfix...

== Bugfixes ==
- Fixed bug with strip-blending which caused the blending modes to be useless.
- NLA buttons now use proper poll callbacks instead of defining checks
- Commented out missing operator in menus, silencing warnings in console
- Removed obsolete/incorrect comments
2009-06-19 04:45:56 +00:00
4f9e0ec06e Update Mathutils for py3k
* removed coercing types which has been removed from py3.
* matrix uses getset's rather then getset items.
* removed deprecated functions.
2009-06-18 23:12:29 +00:00
b6182781b0 Fix for compiler error since BLO_sys_types.h was not in the path 2009-06-18 21:25:21 +00:00
96003b5b73 Revert a small change to kerning, Matt please let me know if now it's fine (or like before). 2009-06-18 20:45:58 +00:00
2269280910 don't include stdint.h directly, it's broken on non C99 compliant compilers (you know which one I'm talking about). 2009-06-18 20:23:46 +00:00
dd250f7d85 2.5
Missing { when WITH_LCMS is defined.
2009-06-18 20:13:17 +00:00
94dbb3bbdd 2.5 Python
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* Operator exec is called execute in python now, due to conflicts
  with python exec keyword.
* Operator invoke/execute now get context argument.
* Fix crash executing operators due to bpy_import_main_set not being
  set with Main pointer.
* The bpy.props module now has the FloatProperty/IntProperty/
  StringProperty/BoolProperty functions to define RNA properties for
  operators.
* Operators now have an __operator__ property to get the actual RNA
  operator pointers, this is only temporary though.
* bpy.ops.add now allows the operator to be already registered, it
  will simply overwrite the existing one.
* Both the ui and io directories are now scanned and run on startup.
2009-06-18 19:51:22 +00:00
4cd24cf058 RNA
Merging changes made by Arystanbek in the soc-2009-kazanbas branch,
plus some things modified and added by me.

* The API files now all in the makesrna module, convention is to
  call them e.g. rna_mesh_api.c for rna_mesh.c. Note for visual
  studio build maintainers, the rna_*_api.c files are compiled as
  part of "makesrna", but do not have rna_*_gen.c generated as part
  of the library. SCons/cmake/make were updated.

* Added function flags FUNC_USE_CONTEXT and FUNC_USE_REPORTS, to
  allow RNA functions to get context and error reporting parameters
  optionally. Renamed FUNC_TYPESTATIC to FUNC_NO_SELF.

* RNA collections now have a pointer to add/remove FunctionRNA's, this
  isn't actually used anywhere yet, purpose is to make an alias
  main.meshes.add() for main.add_mesh() in python.

* Fixes to make autogenerating property set/get for multidimensional
  arrays work, though a 4x4 matrix will be exposed as a length 16
  one dimensional RNA array.

* Functions and properties added:
	* Main.add_mesh()
	* Main.remove_mesh()
	* Object.matrix
	* Object.create_render_mesh()
	* WindowManager.add_fileselect()
2009-06-18 19:48:55 +00:00
89d2559e6d 2.5
* Update cmake and makefiles to link python generic.
* Fix game engine building for cmake and makefiles.
* Fix compile error with py 3.x, due to 2.x compat fix.
2009-06-18 19:25:58 +00:00
504fa6e2bc own copy/paste error, euler.wrapped would give a bad value 2009-06-18 18:23:22 +00:00
506d96cb0b Part two of svn release commit, last one! 2009-06-18 18:12:13 +00:00
895f4e62ca Part one of 2.49a release commit 2009-06-18 18:11:51 +00:00
025b6dcbc3 fix for building with py2.3 2009-06-18 17:34:39 +00:00
0a132c6166 Bufix #18942
Composite "Map UV" node was using false UVs (0,0) from neighbouring 
pixels when those pixels were not rendered (or have no UV).

This commit checks for each neighbour sample it takes if the UV was
correctly set. Solves bad errors on edges of UV maps. With FSA even
totally smooth. :)
2009-06-18 17:00:47 +00:00
c23b23db4e Attribute PolyDimensions GmbH for funding OBJ spline import/export. 2009-06-18 16:01:47 +00:00
122b206de3 Fixing gl/glw.h compiiler error 2009-06-18 15:33:58 +00:00
2f48d0b46b Added Make for new python/generic dir.
Also included GLEW.
2009-06-18 15:31:14 +00:00
8130fb29b2 RNA:
* Make cloth settings animateable from buttons.
2009-06-18 14:29:24 +00:00
5ea992df98 UI:
* Fix context.cloth, was not being set correct.
* Fix errors with context pinning, scripts should
  not assume context.object to be there.
* Always show preview even if e.g. the material is not
  set, to keep ID buttons from jumping while you're
  using them.
2009-06-18 14:20:25 +00:00
a9b99ab01c coverity issue CID: 596
Checker: FORWARD_NULL (help)
File: base/src/source/blender/render/intern/source/texture.c
Function: do_lamp_tex
Description: Variable "dx" tracked as NULL was dereferenced.

Also found a typo the 3rd check was checking projx instead of projz
I also expanded the elses to set dyt as well as dxt.

Kent
2009-06-18 12:57:39 +00:00
0489fb731a DXF-Exporter v1.35 - 2009.06.18 by migius
- missing support for multiple-instances of Curve-Objects as BLOCK/INSERTs
2009-06-18 10:34:16 +00:00
7e57823c47 build generic modules in their own lib, compiling without the game engine would fail because bpy_internal_import.c wasnt being included.
(scons only)
2009-06-18 04:36:45 +00:00
d3537256ca DXF-Exporter: apply modifiers: reactivate temporary deactivated code 2009-06-17 23:25:22 +00:00
Dalai Felinto
b033f07306 Fix for bug: [#18619] Shadow face flag ignores object's scale
In time for the 2.49a ahoy :)
2009-06-17 21:18:32 +00:00
489db9994d Some generic modules from blender 2.4x building with py3k and mostly working.
* Mathutils, Geometry, BGL, Mostly working, some //XXX comments for things to fix with py3

python import override (bpy_internal_import.c) so you can import python internal scripts from the BGE and running blender normally.
2009-06-17 20:33:34 +00:00
cb68b9434c Fix mask in arrow cursor and improve swap one. 2009-06-17 19:46:39 +00:00
f1b9e76e43 DXF-Exporter v1.35 - 2009.06.17 by migius
- added export Cameras (ortho and persp) to VPORTs, incl. clipping
- added export Cameras (ortho and persp) to  VIEWs, incl. clipping
- export multiple-instances of Mesh-Objects as BLOCK/INSERTs
- on start prints dxfLibrary version
2009-06-17 14:06:55 +00:00
95335af1b9 fix for a bug reported by zapman on blenderartist.
De-activating a loop-end actuator didnt work (it kept looping).
Looked into this further and it turns out that the actuators run with both positive and negative events false, the sound actuator assumes because its not negative that its a positive event and plays the sound anyway.

Fix by checking that its a positive event before playing.

The size limit on the message actuator was 100 which broke some scripts, set to 16384 instead.
2009-06-17 12:32:28 +00:00
2519da917a DXF-Importer v1.12 - 2009.06.16 by migius
d7 fix for ignored BLOCKs (e.g. *X) which are members of other BLOCKs
2009-06-17 11:35:35 +00:00
0b0b02caf8 2.5
Logic editing back!

Test screenie:
http://download.blender.org/institute/rt9.jpg

I gave the buttons a bit more width, added nicer linkline draw.

Not working yet:
- theme colors for sensor/actuator types (was old button colors)
- moving sensors up/down (used bad pupmenu... better is icons like
  used for modifiers)
- Linkline mouse-over select. Currently deleting a link goes by
  drawing the same line again.

Needs to be fully tested for functionality too, leave that to the GE
department. :)

I noted there's bad button hacking with reading button values,
like check_state_mask(). uiBut structure was not meant to be exported
outside of interface module.
2009-06-17 11:01:05 +00:00
50b22468b2 BGE PyAPI
while making a demo of using python to control bones found some more problems.
also added channelNames attribute to BL_ActionActuator to get a list of valid channels to use.
demo: http://www.graphicall.org/ftp/ideasman42/armature_python.blend

its still not that useful since theres not way to know rest bone locations yet but better then nothing.
2009-06-17 09:42:04 +00:00
fa3cd4aadf BGE #18823: Loading older blend files (from the blender Gamekit 1.0 demos) that use Sumo crash on playback in 2.48.5, worked in rc3. Fixed by upgrading Sumo to support the new method of sensor synchronization introduced with Sensor objects in Bullet. Sumo demo will not crash but may still not run well as other features and methods have not been ported. 2009-06-17 08:36:37 +00:00
5de1ddf96c BGE bug #18931: YoFrankie bug in 249-trunk (works in 248). 2009-06-17 06:54:35 +00:00
88f3ec3fdb == FFMPEG ==
This fixes:
[#18262] From FFMPEG/audio menu the PCM selection is missing
(thanks to Mika Saari (mikasaari) for the patch!)
2009-06-16 21:28:19 +00:00
74d3d136db == Sequencer ==
Fixed color balance tool. Problem was: we pretended to do Lift/Gamma/Gain,
but in reality we did (1-Offset)/Power/Slope. (slightly modified ASC CDL).

So now, the GUI is able to switch modes between ASC CDL-mode and real
Lift/Gamma/Gain.

It also adds a switch to enable Neutral Black/White flipping 
(very usefull for black point selection)

This closes:

[#18078] bugfix #18010 Sequencer lift
2009-06-16 21:16:22 +00:00
54ed699743 ActionActuator in the game engine working again to display deformed meshes with the new animation system.
Note that the animation conversion from existing 2.4x blend files doesnt yet set the Action pointer in the actuator so the only way to test is to use the python api to set the new converted action active on the actuator because there is no user interface.
2009-06-16 20:38:18 +00:00
ecb39291e9 small merge needed for testing new animsys in 2.5 BGE, mixing own changes with merge can be a hassle.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20928:20937
2009-06-16 19:51:58 +00:00
2faf20c4b3 BGE Action Actuator setChannel() function was broken in a number of ways.
* extract_pose_from_pose only checked one of the list items for NULL when looping over them yet its possible they are different sizes.
* game_free_pose needed to be used rather then MEM_freeN, channels would never be freed leaking memory.
* setChannel() would make a new pose that wasnt aligned with the existing pose, the lists are assumed aligned so when extracting the channels its unlikely this was ever useful.
* Added getChannel() - returns pose loc/size/quat
* Added option args for setChannel(channel, matrix) or setChannel(channel, loc, size, quat)
2009-06-16 18:25:48 +00:00
aa0825a5e5 looks like a mistake. should check with the scene render size, not the current scenes. 2009-06-16 15:44:08 +00:00
55f1a1dcad changes to the sequencer in trunk between 20855:20928, (excluding UI changes)
had to //XXX comment some funcs.
2009-06-16 15:04:29 +00:00
a1cf7988c1 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20855:20928
Sequencer changes from source/blender/src coming next
2009-06-16 14:21:58 +00:00
2d40b8d56f 2.5
Added SpaceLogic, to restore the old logic buttons into.
In future it can be used for a more advanced logic editor, with
states, behaviour, whatever. We'll see!

This commit only adds the backend for new space. Committed this
now as reference for when we need another space type. It's still
not well plugin-able (dynamic space types), but my idea is to just
have a new SpacePlugIn for this, with a neat small API to define
all relevant callbacks.

Also note the icon for the spacetype is wrong still.
2009-06-16 13:09:36 +00:00
7d02642114 2.5 Material Buttons:
* More tweaks by William. Thanks.
2009-06-16 12:54:34 +00:00
1025b750ee DXF-export update: dxfLibrary.py v1.33 - 2009.06.16
- fix _point(): converts all coords to floats
 - fix LineType class: implement elements
 - added VPORT class, incl. defaults
 - fix Insert class
2009-06-16 10:43:43 +00:00
0a66e24bd7 KX_PythonSeq (used for a number of BGE sequence types)
* cont.actuators.get("key", default) # dict like get function
* if "key" in cont.sensors: ...

Updated docs
Added missing include to Particle.c
2009-06-16 08:52:04 +00:00
2ecbe1c81c BGE Py API
* Removed modules Expression and CValue, neither were ever available.
* Added GameLogic.EvalExpression(exp) from the Expression module, evaluates an expression like the expression controller (not sure if this is really that useful since python is far more advanced).
* resetting the original blend file path didint work (own fault == -> =)
* Py3.x PyModule_Create didnt allow importing since it didn't add to sys.modules,
  Looks like they want us to use init-tab array, but this doesn't suit us since
  it needs to be setup before python is initialized.
* Documented GameLogic.globalDict
2009-06-16 07:16:51 +00:00
Dalai Felinto
8ab502b894 MSVC fix for rev. #20909 (reported/patched by moguri) 2009-06-16 03:27:57 +00:00
573f2f34fa Separate "content reordering" from "plain menus". 2009-06-16 02:40:39 +00:00
172a3e9d0e small fix: ao energy is not a percentage 2009-06-16 01:51:51 +00:00
1d0bc55e6c UI:
Revert revision #20879:
Enable non reordering menus option, it was disabled without explanation (?).

This changed the order of all header menus with the header at the bottom,
this doesn't seem acceptable to me. Additionaly, it doesn't make sense to
me that this would be the same option as the toolbox shape, they should be
separate options.


Here's the rationale from 2005 by Ton:

I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).

I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
  (like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
  bottom for top headers. We can expect the UI is configured consistantly
  for headers, so in general the menus will appear consistant as well.

Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
2009-06-16 01:32:33 +00:00
91785f1e36 UI scripts:
* Close some material/texture panels by default.
* Update material buttons to use more diffuse/specular variables.
* Don't show texture mapping/influence when the texture is pinned.
* Small visual tweak for sequencer header menus.
2009-06-16 01:25:49 +00:00
401b58cb45 2.5: Image Editor
* Started porting over to python, menus nearly done, header WIP.
* Game Properties panel is in python too
* Deprecated "Tiles" as a per face flag here, now it's always on
  the image, used to be both, working in a very confusing way.
  Unlikely someone actually had a purpose for this being per face.
* Remove GPC_PolygonMaterial.cpp/h, it's not actually used anymore,
  so I don't want to bother updating it.
* Fix crash in image painting (own mistake in porting over bugfix
  from 2.4x).
2009-06-16 01:22:56 +00:00
18d8454f2e 2.5: Text editor, port menu code to python. 2009-06-16 01:10:47 +00:00
f10541f7cf UI
* Added option for panel to be closed by default.
* Added support for RNA property and enum icons in buttons.
* Remove some deprecated RNA menu code.
* Fix issue with newly created panels not being inserted in the
  right place.
* Fix issue with 3-split layout not being divided correctly.
* FIx issue with menu items not drawing correct using python UI.
2009-06-16 01:08:39 +00:00
51fbc95e8c RNA
* Added icon to property and enum property items. The latter is
  responsible for the large number of files changed.
* For RNA functions, added PROP_RNAPTR flag to ask for a PointerRNA
  as argument instead of a C pointer, instead of doing it implicitly
  with the AnyType type.

* Material: properly wrap diffuse/specular param variables, and
  rename some things for consistency.
* MaterialTextureSlot: added "enabled" property (ma->septex).
* Image: make animated property editable.
* Image Editor: make some things editable, notifiers, respect state.
* Context: fix issue with screen not being set as ID.
2009-06-16 00:52:21 +00:00
32cf82dbb3 2.5 UI
* RNA enum for icons to allow specifying icons as string
* example: row.itemR(st, "line_numbers", text="", icon='ICON_LINENUMBERS_OFF')
2009-06-15 20:28:49 +00:00
6efd2e6439 saving globalDict didnt work with python3.x 2009-06-15 20:22:50 +00:00
1a7d3a0856 Bug #18920, clarification in tooltip of Mirror Vgroup option in
the mirror modifier.
2009-06-15 12:18:17 +00:00
17b2e0e6f6 2.5
Bugfix: reading iconfile (~/.blender/icons/xxxx.png) didn't work.

Note: go to the outliner, user preferences, first theme, User Inteface, and
fill in name of the png file in "Icon File" text button. Save prefs, start
Blender, and it shows. This whole process can be optimized once, indeed :)
2009-06-15 12:13:10 +00:00
b8d0f62fd2 Fix for bug #18924: OpenGL performance issue with particle modifiers,
actually two modifier datamask optimizations that were never done.

* Don't use modifier data mask for disabled modifiers.
* Check if UV data is needed for particle system instead of always
  requesting it.
2009-06-15 11:48:42 +00:00
7453f4388e missing var in last commit 2009-06-15 11:47:16 +00:00
e0c960814b 2.5 - Changed the order in which constraints are defined in RNA to resemble the order users of 2.4x are more familiar with. Compared to the order in which they're actually defined, this order is more 'standard' in many cases. 2009-06-15 11:36:22 +00:00
2773464561 Game Engine working with the new animation system for Ipos (IpoActuator)
FCurves are used for animation evaluation so FCurve modifiers work :).

Tested with object location and object color animation.
Armature and Shape Keys next.
2009-06-15 10:11:08 +00:00
e6aa552e25 2.5
Text Object: editmode suffered wrong allocation and reading from wrong
memory, causing crashes when typing more than a few chars.
2009-06-15 09:54:37 +00:00
afaa3768e6 == Sequencer ==
Fixes an irritating but harmless error message when using custom proxy files.
2009-06-14 20:52:43 +00:00
c12d5d61a8 Standarizing on control for unconditionally entering keyboard input edit mode.
(Outliner uses this because shift is used for multiple select)
2009-06-14 20:26:20 +00:00
bc6761f5ef BGE bug #18869: Can't create Windows runtime. 2009-06-14 20:01:12 +00:00
297329b75b Update MSVC9 project files. Use pthreadVC2 instead of pthreadVSE2 to match scons (don't know why we were using VSE2 in the first place). 2009-06-14 19:59:59 +00:00
ca12954e9f == Sequencer ==
Big proxy fix (addressing hopefully most complaints on mailing list and 
in tracker)
* proxy render settings are now independent of render size settings.
  That means: which proxy size is used, is controlled by two parameters
  now: the proxy size of the files, can be controlled with additional
  buttons within the proxy panels. What is shown in a specific preview
  window depends on the header settings of the preview panel.
  So: proxies are _only_ used in those windows, that are switched to a
  specific proxy resolution.
* output rendering is always done _without_ proxies.
* proxy generation now shows a waitcursor with numbers.
  (closing Bug: [#18909] Building Proxies doesn't give any feedback
  which was rather a feature request, since the problem mentioned there
  was always the case :) )
2009-06-14 18:54:35 +00:00
03bd1367ac 2.5 Material:
* Some material button tweaks by William. Thanks.

* Some more material notifiers.
2009-06-14 18:16:38 +00:00
680a838a79 Enable non reordering menus option, it was disabled without explanation (?). 2009-06-14 17:20:46 +00:00
069c13c9ea 2.5 MSVC9 projectfiles
* enabled game engine in regular build
Note1: blenderplayer hasn't been looked at yet and is not linking
Note2: KX_blenderhook and KX_converter need windowmanager include, this dependency should probably be removed.
2009-06-14 15:14:17 +00:00
8ab7fbe795 Blender/Python API
Send the full python stack trace to the reporting api,
added BPY_exception_buffer which temporarily overrides sys.stdout and sys.stderr to get the output (uses the io module in py3 StringIO in py2 to avoid writing into a real file), pity the Py/C api has no function to do this.

fix for crash when showing menu's that have no items.
2009-06-14 12:53:47 +00:00
36e96e5b6e == Sequencer ==
This fixes:
* free_imbuf_seq() didn't free all scenes. That will lead to steady memory
  growth in case of nested timelines with several scenes.
* sequencer panels were always jumping around, depending on strip type,
  which was caused by choosing always the same panel position and the
  silly limitation, that
* effect strips had no filter option, which was therefore added.
  So you can apply color balance on effect filter output now :)
2009-06-14 10:59:54 +00:00
7aeadf2baa typo in gpu_extensions.c, removed unused function 2009-06-14 06:52:46 +00:00
e3fda550ba changing the scale of a sleeping object wasnt working with bullet.
Example is a cube that lands on a plane, sleeps after some time, a script changes the scale.
It would still use the scale when the object first went to sleep.

reported on blenderartist.
http://blenderartists.org/forum/showthread.php?t=158617
2009-06-14 06:03:12 +00:00
bde991df9e coverity issue CID: 275
Checker: FORWARD_NULL (help)
File: base/src/source/blender/gpu/intern/gpu_extensions.c
Function: GPU_shader_create
Description: Variable "fragcode" tracked as NULL was passed to a function that dereferences it.

fix provided by Brecht. :)

Kent
2009-06-13 22:31:14 +00:00
472239cc94 coverity issue CID: 307
Checker: FORWARD_NULL (help)
File: base/src/source/blender/blenkernel/intern/modifier.c
Function: meshdeformModifier_deformVerts
Description: Variable "dm" tracked as NULL was passed to a function that dereferences it.

fix provided by Brecht.

Kent
2009-06-13 22:23:24 +00:00
c3c38155ad 2.5 Buttons:
* Added more material buttons by William. Thanks.
I made some minor adjustments and added Specular Shader Model RNA. 

* Code cleanup and some consistency tweaks of button files.
Notes: Preview render now only shows up when there is an active world, material, texture or lamp.
* Made sure initial panels with ID Datablocks are shown, even when no block is active.
2009-06-13 21:22:21 +00:00
646d4041e2 BGE events, not sure every event works as it should but keyboard looking and mouse focus seems to work ok.
Tested some basic logic brick blend files that use key input which run properly.
2009-06-13 20:58:43 +00:00
611e2f484c GameEngine WIP,
* pressing P starts the BGE in the 3D view
* redraw window clipping isnt right
* BGE python api works in py3k (without __import__ override or Mathutils, BGL, Geometry)
* no events yet (so there is no way to exit)
2009-06-13 17:25:54 +00:00
a7ac260cc5 coverity issue CID: 469
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/BME_tools.c
Function: BME_split_face
Description: Pointer "example" dereferenced before NULL check

Check for null before we try to use it.

Kent
2009-06-13 16:57:26 +00:00
0e13433d7c coverity issue CID: 401
Checker: NULL_RETURNS (help)
File: base/src/source/blender/imbuf/intern/radiance_hdr.c
Function: imb_loadhdr
Description: Incrementing possibly NULL value "ptr"

Make sure were not trying to index past our array.

Kent
2009-06-13 16:52:01 +00:00
a2bc531dc1 coverity issue CID: 228
Checker: DEADCODE (help)
File: base/src/source/blender/gpu/intern/gpu_material.c
Function: GPU_materials_free
Description: Conditional "ma != 0"

was looping over wrong variable I'm guessing a cut and
paste error from above.

Kent
2009-06-13 16:49:30 +00:00
76cd7046bb coverity issue CID: 44
Checker: FORWARD_NULL (help)
File: base/src/source/blender/render/intern/source/texture.c
Function: do_lamp_tex
Description: Variable "co" tracked as NULL was dereferenced.

co was set to NULL at the beginning of the function and it could
possibly slip through all the logic above so lets test it before
we use it blindly.

Kent
2009-06-13 15:54:39 +00:00
3a9396c47d Restore default value for font kerning.
The user value is 0 by default and the font kerning (the value
that come with the font) is enable, like always.

(the last was  disable by mistake in a previous commit)
2009-06-13 14:58:39 +00:00
c4ad2ed253 Omission of a texture node to specify coordinates was regarded as a bug by some users. I rather agree :) 2009-06-13 14:22:40 +00:00
fa01eef27e svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r20849:20855
to get the BGE building with py3k and no sdl
2009-06-13 14:07:38 +00:00
b592b6e8be convert non-string pyoperator exceptions into strings if they are not already. 2009-06-13 13:57:56 +00:00
b40eb540d3 G.sipo was being passed in the BGE when it wasnt needed, just access G.sipo directly.
KX_PythonSeq.cpp - disable the cmpfunc with py3, need to have richcmp.
2009-06-13 13:02:01 +00:00
d7e06a6d91 2.5 - Armature/Bone Tweaks
- Changing visible layers for armatures now sends notifiers
- Made the bone buttons show the layers data 

TODO:
I also tried making the bone buttons show for 'PoseChannels' instead of the raw bones since this is more correct for most editing that can be done (i.e. when posing). For editmode though, we'd need to wrap EditBones in some way? However, I couldn't seem to get this to work due to the way paths are resolved.
2009-06-13 11:52:33 +00:00
c7debe1455 allow building without SDL 2009-06-13 11:28:29 +00:00
cd3c52db03 2.5 - Armature Buttons + UI-Templates
Added a new template for layer-buttons, which auto-determines the layout of the buttons instead of relying on some hardcoded pattern for n-layers (i.e. 16 or 20 currently). This is a still bit rough, and could do with some refining to allow us to define what extra info (icons) should get drawn on the buttons or so.

Currently, this is only used in the Armature buttons to allow showing/hiding layers.
2009-06-13 11:21:02 +00:00
eed13b43b1 merged from trunk 20741:20848
* Missing changes to release/windows/installer
* Sequencer fixes in source/blender/src/seqaudio.c dont apply to 2.5
* brechts fix for #18855 r20763 wasnt merged, does this apply to 2.5?
2009-06-13 11:09:13 +00:00
2f1e118c30 in some cases importing without materials could raise a python error.
surprising nobody found before.

reported by <chewed-on> who doesnt want his real name used for some reason.
2009-06-13 09:33:55 +00:00
e10e1ac04e adding __contains__ to python rna props.
example usage.
 if "Scene" in bpy.data.scenes: print(True)
 
Only works for strings with collection property types.
2009-06-13 08:04:43 +00:00
d35d04a789 text live_edit feature useful for UI scripts (run python scripts on every keystroke, careful with the os module)
http://www.graphicall.org/ftp/ideasman42/realtime_ui.ogv

current kerning makes this a bit cryptic.
2009-06-13 06:42:12 +00:00
2183af5760 no need to use mathutils 2009-06-13 04:31:30 +00:00
2371c35afc OBJ Import
* Wasn't setting the curve 3D option
* The nurbs object name could be None which caused an error, check its set.

OBJ Export
* Off by 1 error on closed nurbs was incorrect, broke other importers but worked with blender.
* Nurbs verts were not adding to the total vert count, scrambling meshes added after (somehow my first test case had all the curve objects last)
2009-06-13 03:54:27 +00:00
03de57c6d5 coverity issue CID: 523
Checker: UNINIT (help)
File: base/src/source/blender/blenlib/intern/freetypefont.c
Function: objchr_to_ftvfontdata
Description: Using uninitialized value "face" in call to function "freetypechar_to_vchar"

freetypechar_to_vchar expects face to be defined so we need to
return before then if we have a problem.  Also it doesn't
make sense to not return FALSE if there is an error because we
didn't do anything.

Kent
2009-06-13 03:08:58 +00:00
8ef87d8b4f X90 Rotate option so you can export without rotation and import, keeping the same orientation. 2009-06-13 03:05:20 +00:00
fe329792b4 remove warnings 2009-06-13 01:30:47 +00:00
845e9a0e25 Made the kerning a float, this give a little more of tweak.
0.5 is the default value now, the range are from -5.0 to 5.0.
Note that we allow negative value, but the current draw code
always check for overlap characters.
2009-06-12 17:18:59 +00:00
Nathan Letwory
dee188df16 === SCons ===
* make the nsis installer script automatically use the Python version we build against
* bump Python version used
2009-06-12 15:37:23 +00:00
0e170f8e56 2.5 Texture Buttons:
* Now texture settings (colors, mapping, influence) only show up, when the texture type != None.
2009-06-12 15:22:08 +00:00
63abf1ec6c 2.5
Fix for new picker: mouse move out of menu was handled as 
restore... added new block flag UI_BLOCK_OUT_1 to denote
it shouldn't.
2009-06-12 15:11:51 +00:00
7910d45807 2.5 RNA:
* Added some more notifiers to userdef.
* Removed "yafray_export_directory" property.
2009-06-12 14:48:11 +00:00
a62bec6667 2.5
Quick Color picker alternative!

- only a color circle + value slider
- exits immediate after use, or slight mouse move outside picker
- use scrollwheel to change HSV 'value'. Also works while picking.
- added nicer AA'ed cursor in picker
- All color swatches change 'value' on ALT+Wheel mouse-over

Old picker is still there, under SHIFT+click on swatch. Needs
evaluation... part of UI keymap? Per button type? Or divide
picker in left/right? Or just have all those old picker buttons
in another panel... I'm not to fond of this giant old popup.
2009-06-12 14:22:27 +00:00
32b34f82fd UI:
* Immediately do updates when working in the color picker popup.
* Fix for color picking wrongly getting cancelled sometimes.
2009-06-12 13:53:08 +00:00
1c2ce9535c use contains for ListValue and KX_GameObject types (has_key is deprecated by python)
eg.
 if 'prop' in gameOb: ...
 if 'GameOb' in sce.objects: ...
2009-06-12 12:56:12 +00:00
74884754d2 NLA SoC: Added menus including the operators coded already 2009-06-12 06:44:49 +00:00
96c5f36eff OBJ import support for nurbs curves
Imports nurbs with orderU and endpointU (inferred from weights).

No support for vert-weights, surfaces, 2D curves or non-bspline's yet.

fix for exporting closed nurbs, was overlapping too much of the curve.
2009-06-12 04:16:12 +00:00
4f9846b6a1 NLA SoC: Fixes for crashes when selecting keyframes in object channels in DopeSheet 2009-06-12 02:49:21 +00:00
642fea299b == Sequencer ==
This fixes:
[#18894] Scene iterfer with movie in sequencer

(the real use cases that also triggered that bug are fixed with the
previous commit)
2009-06-11 22:21:00 +00:00
ec8b2593ec Smal tweak to allow the user set a kerning value.
This commit add two option to the blenfont library:

1) BLF_FONT_KERNING

 This enable the kerning information that come with the
font, by default this option is disable and still don't
have a UI for change.

2) BLF USER_KERNING
 This allow the user set a kerning value to by apply for
every character, by default this option is enable but all
the font have a kerning value of zero.

Ton I add this option to the style with a default value of 1.

Access from:
 Outliner -> User Preferences -> Style -> FontStyle -> Kerning
2009-06-11 21:43:59 +00:00
a054f3ccce elif rd.file_format in ("OPENEXR"):
...is the same as 
elif rd.file_format in "OPENEXR": # ("OPENEXR",) <- syntax for a single tuple

At the moment its using pythons syntax for a string search which works but isnt whats intended. Replaced in with ==
(Also use '' for enums rather then "")
2009-06-11 21:11:33 +00:00
73092af8b7 don't build game engine by default, and print a warning if game player is enabled. 2009-06-11 20:47:14 +00:00
d12c4f751c 2.5 Scene Buttons:
* FFMpeg buttons by William Reynish. Thanks!
2009-06-11 18:58:37 +00:00
a4175684b9 2.5 RNA:
* Tooltip updates by William Reynish. Thanks!
2009-06-11 18:19:08 +00:00
4e66f6d11f 2.5
Added search-browse to the Python ID template. Also added icon/button
for 'Add new'. (Note, we need icon for it).

Also fixed bug in search menu closing too quick on mouse-release, when
mouse was close to bottom of menu button.
And removed annoying warning if ID pointer was zero.
2009-06-11 17:21:27 +00:00
2c8fae1f8b 2.5:
* Fixed some RNA properties Ranges.
2009-06-11 16:59:59 +00:00
db8b4cee56 Bugfix for [#18911] Applied torque breaks rigid bodies in game engine 2009-06-11 13:42:41 +00:00
776b8c0369 sequencer patch from Xavier Thomas
- allocate transform and crop on "use"
- bring back the scopes drawing (histogram, vectorscope, luma)
- tweak properties layout (need more)
2009-06-11 11:54:56 +00:00
cdeb95e737 NLA SoC: RNA Fixes
- Lower bound for start values has been expanded to -MAXFRAME, to avoid clipping problems when the strip is moved past frame 0

- Removed some obsolete (+ commented out) NLA wrapping in Object stuff
2009-06-11 11:53:41 +00:00
bf729ab268 == SEQUENCER ==
This fixes 
* some issues with Scene strips containing audio by removing
  the curpos pointer from sequence structure. (the same scene
  strip can now be used in a row)

  That also makes the code a lot cleaner.
* fixed a corner case on the beginning of a strip, where audio was
  not mixed in, depending of current audio buffer state.
  
* Also: made some hardwired variables macros to enhance readability.

Problem remaining: mixing the same scene strip several times (read
put it into a stack instead of into a row) has
problems with HD-audio since the same HD-audio state structure is
used and therefore the system will seek permanently, which leads to
audio distortions...
2009-06-11 11:44:47 +00:00
8225caa9fb update from Aaron Keith, fixes normal flipping 2009-06-11 10:46:13 +00:00
a543a1549e Sound actuator bug reported by zapman on blenderartist.
Negative events would play on an actuator if it hadn't played a sound yet.
2009-06-11 10:26:53 +00:00
0bef8012bc NLA SoC: Channel ordering change
In response to user-feedback, I've changed the order in which channels appear. Now, the channel ordering is:

- Object/AnimData block
-- Active Action 
-- Last NLA Track
..
..
-- First NLA Track

It is important to note several things still:
1) Active action is applied AFTER the NLA Tracks have been evaluated, not before
2) In this new order, the tracks+active action are shown in the evaluation-stack order, i.e. first thing applied is at the bottom, last is at the top.

As a result, I've switched the view-orientation back so that it works the same way as for DopeSheet/Graph editors (i.e. expands downwards not upwards). This may cause problems loading files saved with older builds of this branch. There are still some lingering problems due to this change which I'll fix in due course.
2009-06-11 05:02:46 +00:00
f0f9034966 NLA SoC: Operator for adding new NLA-Tracks
New tracks can be added in the following ways (with the mouse hovering over the channels-list):
* Shift-A - this will add a new track at the top of the stack (i.e. above all the existing NLA-tracks but below the Active Action) for every AnimData block where there was a selected NLA-Track

* Ctrl-Shift-A - this will add a new track above every selected one
2009-06-11 03:19:08 +00:00
4a29d0c1a3 NLA SoC: 'Split' Operator (YKEY)
Selected NLA Strips are split into two strips, each with half the length of the original strip. 

Possible improvements subject to demand:
- multiple splits?
- splits with variable spacing? (i.e. 3:2, or 1:5).
2009-06-11 02:18:29 +00:00
64f94a670e NLA SoC: Evaluation bugfixes
* Strip scaling was being evaluated in the wrong way, resulting in scaled strips not being played too fast (for lengthened strips) or too slow (shortened strips)

* Also, verified that the 'reversed' option works correctly (no changes needed to be made here)
2009-06-11 02:14:56 +00:00
3bdcd4f738 patch from Xavier Thomas, color balance and proxy access both need to allocate structs when enabled. 2009-06-10 22:03:50 +00:00
1a787efd7c 2.5:
* Wrapped FFMpeg in RNA (some properties are disabled for now).

* Some Texture panel tweaks by William. Thanks!
2009-06-10 20:50:23 +00:00
9bcc6f3cb6 patch from Xavier Thomas, make the sequence strip start frame and channel editable 2009-06-10 19:57:06 +00:00
5a8b389ebe was printing all warnings twice 2009-06-10 19:33:59 +00:00
8347a9f21b Option to export curves as OBJ native curves (rather then a bunch of edges)
- nurbs and polyline (not bezier)
- closed / open curves
- OrderU works as expected
- Endpoint U works too.
2009-06-10 19:14:05 +00:00
219f1ce2f0 2.5
Scene toolsettings was not setting Brush pointers on read, causing
crashes on reading files. Thanks Jingyuan for (irc) report! :)
2009-06-10 15:09:44 +00:00
fba6a9931c 2.5
First version of search-based ID browsing. Now only in use for the
top bar screen/scene browse. The python buttons will follow. 
Also made search button colors match the theme colors from menu back.

Todos for browse-search:
- "Add new" will disappear, and become a separate icon button in the
  row of widgets (like X, delete).
- Drawing the preview icons in menu
- Make search menu dynamic, with configurable number of items? And/or
  multi-collumn... for now it's static
- Search menu should popup with last active ID visible and selected
2009-06-10 11:43:21 +00:00
44cebb39b8 * raised some limits in point density 2009-06-10 07:45:12 +00:00
872767f5c7 RNA wrap give_stripelem as getStripElem for sequence strips so the panel can display the current frames filename. 2009-06-10 06:02:08 +00:00
867e129135 F-Modifiers (in Nla branch):
For fun, added 'sinc' (i.e. y = sin(pi*x)/(pi*x)) as a type of builtin function usable through the generator modifier. This makes a nice 'jolt' which tapers off.
2009-06-10 05:03:27 +00:00
2f8290434c NLA SoC: Added BorderSelect operators (BKEY and Alt-BKEY)
These work in the same way as the ones in the Action Editor...
2009-06-10 04:43:18 +00:00
7dbc21ae3c NLA SoC: Merge from 2.5
20669 to 20771

(sheesh, that took an hour, not including having to restart the whole process after TortoiseSVN bailed out midway through the first try)
2009-06-10 03:36:28 +00:00
Dalai Felinto
323863015d fix for bug #18898: GE perspective 3D View not working properly (missing LENS)
note: I'm not changing GamePlayer files. There is no such a thing as 3D view camera in gameplayer (override_camera).
2009-06-09 22:56:43 +00:00
b9ef34b6e5 patch from Xavier Thomas, add back the sequencer snap operator 2009-06-09 21:29:59 +00:00
a796a74fb5 Timecode printing is more or less duplicated in two different places,
so make them both use the same style and note down for future.
2009-06-09 20:03:52 +00:00
9a54ca9af7 Fix for bug #18710: a crash with hair emitted from vertices. 2009-06-09 18:50:02 +00:00
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
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
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
677abc7f49 Texture panel tweaks by William. 2009-06-09 16:52:02 +00:00
ff6750c6fe Edits from William, Xavier Thomas (xat) and myself
- strip options in the sequencer view only.
- added a view panel for non-sequencer display modes.
- button adjustments
2009-06-09 16:19:34 +00:00
83f9f1d4d6 2.5 Texture RNA:
* Wrapped some Mapping properties and added them into the layout.
2009-06-09 16:04:07 +00:00
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
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
abdb8fd94d NLA SoC: Added simple delete-strips operator (XKEY/DELKEY) 2009-06-09 12:28:49 +00:00
ca5ff43b1f NLA SoC: Improved anim-channel filtering flags for NLA so that channels don't need to be checked to be NLA-Tracks before being used. 2009-06-09 12:28:10 +00:00
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
096e2f0b5a NLA SoC: Transform tools for NLA
This commit restores transform support for NLA. Grab, scale, 'extend', and tweak (i.e. grab by just click+dragging) are implemented. 

Notes:
- As soon as one end of a strip touches another adjacent strip (within the same track), that end stops moving. This has been done to avoid the situation where overlapping strips within the same track (which is not allowed) might be caused by transforms.
- Made some changes to the RNA setters for the strip extents so that the validation above could take place (and other necessary changes on a per-strip basis could also occur).

TODO's ?
- Strips cannot be transferred from track to track using transforms. I've yet to decide whether this needs to be done, or whether a separate operator will suffice.
- What happens to the range of Actions used when the strips change sizes unexpectedly (i.e. the no-overlap condition above)? Currently range stays the same, but this doesn't always seem desirable?
2009-06-09 11:26:45 +00:00
ed12137ff5 2.5:
* Fix compilation with FFMPEG.
* Ensure FFMPEG and similar flags are set during RNA compile,
  so the right output formats show.
2009-06-09 10:30:16 +00:00
d36a1b4f06 added layout attribute for setting the operator execution context.
eg, layout.operator_context = 'INVOKE_REGION_WIN'

Needed to set the context that menu item operators are executed in.

fixed missing NULL check with anim system debug printing.
2009-06-09 10:30:11 +00:00
a0ea138d31 minor file selector changes
- clamp the border to the region bounds when selecting files 
- fix for border select past the end of the filelist selecting nothing.
- de-selecting files would still set the filename.
2009-06-09 07:28:15 +00:00
031dbc89cf - rna wrapped sequencer space
- uiItemEnumO_string, forgot to actually set the enum value
- added more sequencer header buttons (these should probably be moved to a view panel eventually)
2009-06-09 05:39:01 +00:00
4b8b9b222e NLA SoC: Added buttons in NKEY region for NLA Editor
- Most of the settings wrapped in RNA have been exposed here using the new layout engine stuff from Brecht (C-API). I've tried to maintain a hierarchy of high-level (owner, generic-settings) to low-level (children, specialised-settings) here, which seems to be the prevailing guidelines?
(It took a while to try to understand how this all fitted together, since there were no clear examples on how to use this anywhere)

- NLA-Strip Modifiers have not been exposed yet. They still use the old-style drawing, which may/may not be compatible here.

- Fixed a bug with how the notifiers from this panel get sent. I really don't know how the compiler would have missed the undeclared pointer that was being used ('ob').
2009-06-09 04:39:33 +00:00
c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
e93db433a0 UI:
* Map panel in the Textures tab, patch by William.
  Note many properties here are not RNA wrapped yet.
2009-06-08 19:44:07 +00:00
7a3215d11b Change separator to one that does not mean drop frame. 2009-06-08 17:46:29 +00:00
Ken Hughes
105d3fd323 Fix "no newline at end of file" warning. 2009-06-08 17:30:53 +00:00
cd6ace5c16 2.5: small fix to get context.texture_slot as the right
Material/World/LampTextureSlot type.
2009-06-08 16:55:43 +00:00
62160cef8a Sequencer WIP
- Move buttons into the sequencer Nkey region
- Made the header and menu items use the python api, still need to get more buttons working.
- Fixed some minor problems
2009-06-08 16:48:12 +00:00
ddbd871567 2.5
Small fixes:

- Preview render now accepts resize of 1 pixel without re-render,
  solves re-renders on scrolling window or dragging panel, because
  of float rounding.
- Panel dragging outline was off 0.5 pixel, showed as fat AA lines
- On switching tab, the preview gets re-rendered
2009-06-08 16:24:37 +00:00
c33b6a54f7 2.5
Down with smart, up with simple!
I now use the widget polygon code to generate a mask quad strip, 
draw it over the image, and then the AA outline. Should work on
all systems.
2009-06-08 12:39:39 +00:00
098a0840a4 2.5
Removed masking idea for preview draw, it appears Win32 && X11 windows
are 24 bits, not 32 bits with alpha. Not going to open that can of worm
to add this, will find a different masking method...
2009-06-08 12:10:39 +00:00
d3467960d8 2.5 Texture Buttons:
Some tweaks by William Reynish. Thanks!
2009-06-08 12:01:17 +00:00
ab0ccbeef9 Win GUI fix: maximize works again without distorted regions 2009-06-08 11:55:16 +00:00
dad86a9bde 2.5
Test commit: different treatment of drawing alpha mask...
2009-06-08 11:27:40 +00:00
a8f8161518 NLA SoC: Fixed Outliner drawing for NLA data, and set icons for RNA wrapping of this data... 2009-06-08 11:11:39 +00:00
d8ae009653 needed to use sizeof(string)-1 for text button lengths 2009-06-08 11:04:05 +00:00
80360a0b66 2.5
Forget 'svn add'...
2009-06-08 10:41:52 +00:00
559ab6a835 2.5
Sequencer: added Nkey + UI region, with two empty panels to fill!
2009-06-08 10:38:28 +00:00
ca6a8a233b 2.5
Preview renders:

- Added proper button type (BUT_EXTRA) for preview buttons, to
  handle drawing better. It now first draws an alpha mask, to 
  ensure the preview is correctly fitting inside the widget style.
  It then draws the outline.
- Added protection for executing preview renders while regular
  rendering, that's not going to work...
2009-06-08 10:00:14 +00:00
9d4ebe1088 2.5 - Time indicator label for time-codes now draws in SMPTE format
When an Animation Editor is showing timing in 'seconds' (instead of frames), the indicator label is now drawn with the same style of timecodes as the scrollbar labels are.
2009-06-08 02:33:24 +00:00
983ffa63d7 DXF-Exporter script update
v1.34 - 2009.06.08
- export Lamps and Cameras as POINTs
- export passepartout for perspective projection
- added option for export objects only from visible layers
2009-06-08 01:29:58 +00:00
39ff455eec NLA SoC: Added button for entering/exiting TweakMode
- Should the icons used for this be reversed?
2009-06-08 01:07:19 +00:00
82501bbec5 Win GUI fix: Blender won't hide behind the taskbar anymore on startup (in non maximized mode). Until now, the bottom of Blender always got hidden behind the taskbar - verified to fix at least Win7 + XP
- Windows devs (elubie, jesterKing): please check this fix.
2009-06-07 23:36:34 +00:00
eeea2cec0d Multires/2.5:
Bugfix, restoring sculpting from undo data should mark the multires DM as modified.
2009-06-07 21:02:54 +00:00
0895747b41 Bugfix: WITH_BF_OPENMP=0 wasn't respected anymore, removed LARGEADRESSAWARE (does make no sense on 64bit) 2009-06-07 19:51:52 +00:00
0a6051295f * Added some Image Format Options to the the scene output panel. Patch by William Reynish. Thanks!
* Added missing Notifiers for Subsurface Scattering.
2009-06-07 19:18:20 +00:00
98444f6770 Multires/2.5:
Attempt to make multires updating a little cleaner by
assuming that no update needs to be performed, and only
doing the update when the modified flag is set (either
by sculpting or using some other tool that needs an update.)
2009-06-07 18:09:22 +00:00
0fc53d8d4c Use the local context pointer for the multires subdivide operator, rather than searching for a multires modifier in the modifier list. 2009-06-07 17:36:31 +00:00
51740b57b9 2.5 Buttons:
* Small stamp tweaks by William Reynish. 

* Moved the modifier tab next to constraints.
2009-06-07 15:40:14 +00:00
0940a28b07 DXF-Exporter script update
v1.34 - 2009.06.07 by migius
- cleaning code for release
- fix nasty bug in getExtrusion()
- support text-objects, also in ortho/persp-projection
- support XYmirrored 2d-curves to 2dPOLYLINEs
2009-06-07 14:57:50 +00:00
bb06e311a1 added item_enumO() so python menu items can call enum types with string args.
Example sequencer menu
		self.layout.column()
		self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", property='type', value='ADD', text="Effect Strip (Add)")
2009-06-07 14:53:08 +00:00
eecf7722b6 UI Buttons:
* Context now allows pinning a datablock, independent of
  selection.
* Initial ID browse buttons for most buttons tabs.
* Browsing from world to texture now displays world textures
  again, but is a bit of a hack, not sure there is a right
  way to do this.
* There's a button to switch between active materials and
  textures now, only temporary though.
* There's some code to put context part in own region,
  disabled still because it doesn't work that well yet.
2009-06-07 13:36:12 +00:00
0a9dea9d7d 2.5 RNA:
* Some more Notifiers for the world properties.
2009-06-07 13:35:39 +00:00
1c9079d6e1 UI:
* layout.split() now takes a percentage argument to control
  the split position.
* ID template now works for more than just the Text ID type,
  includes and icon, and some other fixes.
2009-06-07 13:20:41 +00:00
c1135d489b 2.5
Preview renders now re-use a rendered buffer when size is same.
Looks nicer while sliding, and no memory free/allocating.
2009-06-07 13:16:31 +00:00
673a39dab1 RNA:
* Accept None as NULL pointers through python function calls.
* Added type callback for pointers back, it's useful still in
  some cases. Made Object.data editable using this, the pointer
  type varying based on object type.
* Wrap pin ID pointer in buttons space.
* Added subclasses for text and surface curve ID blocks, to
  organize data better and get proper icons.
* Added RNA_type_to_ID_code and ID_code_to_RNA_type functions.
* Update RNA_access.h with new RNA types.
2009-06-07 13:09:18 +00:00
38e998e022 2.5 Preview render:
* Added missing redraw tags for lamp and texture.
* Added Texture Notifiers.
2009-06-07 12:34:38 +00:00
fd1f1c5736 2.5
Quick test commit to check on crashing previews; ignore warning about
implicit declaration...  here in OSX i can't get this crash!
2009-06-07 12:12:55 +00:00
349f5df595 2.5 Preview render
* Added Preview panel to the lamp buttons.
2009-06-07 11:42:13 +00:00
019baf8b8f NLA SoC: Adding skeleton code for a buttons region in NLA
If anyone's doing any testing at this point, please check if this works ok for files with new/old NLA Editors, as I was having some problems with one of my testing (saved from this branch) files with this.
2009-06-07 11:37:15 +00:00
0d75ad3001 2.5 RNA:
* Wrapped some image output settings (Tiff, Cineon, OpenEXR, Jpeg 2000 and DPX)
2009-06-07 11:18:32 +00:00
2c5d064dbe 2.5
New preview.blend
2009-06-07 11:12:55 +00:00
a2f9ca3b3f 2.5
Nice goodie: Preview renders!

- Added new preview.blend, allowing super wide cinemascope previews
- Draws nicely blended inside widget type, rounded corners
- Preview now renders using all available cpus/cores.
- Uses - hopefully rock stable - method, which doesn't copy or 
  allocate anything for previews, but just uses render API calls.
- Multiple previews are possible! But, added provision in Jobs
  manager to only render one preview job at a time. If you start
  more preview jobs, they're suspended until it's their turn.

Bugfix: new buttons context code crashed when going full-window.

Tweaks are still needed for notifiers. I have to figure out still
how to retrieve SpaceButs button view types...
2009-06-07 11:12:35 +00:00
43c7c15e2b NLA SoC: 2 little tweaks
- Evaluation times for strips are now strictly clamped to the endpoints of the strips - i.e. if a strip has 'extend' on, the strip's evaluation time won't continue to change as time changes

- New NLA Editor instances now have auto-snapping turned on by default (as they should)
2009-06-07 07:04:31 +00:00
34f29749c8 NLA SoC: RNA wrapping for NLA Data
Most of the relevant properties have been wrapped. 
- There are still some properties I'm not sure about whether they should be exposed at all (which have been left out for now). Most of these are really internal flags which are used in a few select places.
- To maintain the integrity of the settings, I've included some custom code for a few of the setters (i.e. scale/end-frame) where changing one should result in a change in the other and vica-versa. 

Also, tweaked the wrapping for a few other types.

Another side effect of this commit is that I can now uncommented some code for using F-Curves to control the influence and time of the strips. These F-Curves would need to be specifically attached to the NLA-Strip they affect for now (TODO: I need to review this again...), and as such, cannot be used yet since there's no (end-user-accessible) way to do this :)
2009-06-07 06:49:04 +00:00
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
1bb8d745b9 Forgot to update this file. Constraints now go into the new constraint tab. :) 2009-06-06 22:14:45 +00:00
80571c0408 BGE VideoTexture: fix VideoFFmpeg range attribute + error message. 2009-06-06 21:54:12 +00:00
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
927c8b5be6 Bugfix for crash on constraints 2009-06-06 19:32:18 +00:00
0034fbd13e Merged code passing context to python operator from soc-2009-kazanbas
branch.
2009-06-06 17:32:06 +00:00
1e03f502ae 2.5 RNA:
* Deleted some wrong properties from the blend mode enum.
2009-06-06 16:39:41 +00:00
895d76dab5 2.5 Interface:
* Added a constraint tab in the buttons window.

* Added more sequencer buttons (effect strips).
Note: Sequencer buttons will go into the sequencer itself (n-key Panel) later.

* Particle button tweaks by William Reynish. Thanks!

* Some RNA fixes and new properties.
2009-06-06 16:18:19 +00:00
9d8fa4f959 2.5
Several usablity tweaks:

- Search menu allows ScrollWheel to view items

- Tooltip on button on bottom of window showed wrong
- Tooltips were popping up while draggin (MMB) or scrolling
  (wheel). Now they stay away.

- Stolen from Gimp (blame venomgfx for hint!): ScrollWheel allows
  to go over menu items and use number buttons, only on mouse-over.

Note for devs: the WM_event_add_mousemove() call (to add a fake
event to bring UI back alive after view changes) now works much
more reliably. It ensures the mouse move is only handled after all
notifiers/redraws were done.
2009-06-06 13:35:04 +00:00
8ed66c5691 DXF exporter: dxfLibrary.py update
v1.32 - 2009.06.06
 - modif Style class: changed defaults to widthFactor=1.0, obliqueAngle=0.0
 - modif Text class: alignment parameter reactivated
2009-06-06 13:24:06 +00:00
47ca5cbea2 particle buttons gave errors when there was no particle system on an object. 2009-06-06 12:48:56 +00:00
b770be4f1f 2.5 Buttons Window
Bugfix: World Tab wasn't accessible after deleting an object.
2009-06-06 11:56:59 +00:00
acc88c9772 initial support for sequencer UI layout, anyone wants some monkey-work there are quite a few effects panels to do.
- buttons_context_path_sequencer() is a place holder
- ipo_frame_locked renamed to frame_locked
- added scene.sequence_editor.active_strip
2009-06-06 11:34:18 +00:00
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
bcbe2fbb9d DXF exporter: library
v1.32 - 2009.06.06
 - modif Text class: alignment parameter reactivated
2009-06-06 10:33:10 +00:00
9621d626a0 NLA SoC: Various user-counts and file IO bugfixes for tweaking actions... 2009-06-06 05:06:46 +00:00
964d44e6bc NLA SoC: Merge from 2.5
20571 to 20667
2009-06-06 05:00:40 +00:00
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
4e1bb5a806 NLA SoC: Action-line is now drawn with green colouring when a strip is being tweaked to show the relationship between them. 2009-06-06 04:44:18 +00:00
b6ea6d65c6 one more bugfix, related to 6dof constrains, inside Bullet 2009-06-06 00:29:22 +00:00
884a6a6573 #18872 bugfix for torque on dynamic objects
#18893, fix to getParam for generic 6dof constraints
2009-06-06 00:12:49 +00:00
880c43ad5a First new particle code:
-Many things not yet working properly :)
-Experimental new (hopefully more logical) categorization of buttons, feedback on this is very welcome.
-Separate render & draw types, for example now there is actually a render option "halo" instead of all the different point draw types.
-Particles get recalculated only from buttons that actually change something that has to be recalculated, for example changing visualization doesn't reset particles any more.
-Boid physics buttons are still missing as I'm currently redoing the whole boids code.
-Point caching is still very wip, so baking is not possible for example, but I added a few cache baking flags for rna that were/will be needed for particle buttons logic.
2009-06-05 23:59:33 +00:00
8cea65a323 fix for printing operator collection values, also set some freed pointers to NULL 2009-06-05 19:43:33 +00:00
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
868f31754c A bunch of the same logic issues. (missed these before)
Kent
2009-06-05 17:45:17 +00:00
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
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
07b3e41e18 Blender file selector support for setting multiple selected files/dirs which operators can use.
This allows the sequencers Add-Image strip to work like it does in 2.4x.

- as well as setting the "filename" operator property, operators can have collections called "files" and "dirs" which are set when available.
- RNA_OperatorFileListElement as new collection type, its a bit redundant since each item only has a "name" property but its needed since we don't have a string array type.
- the file selector now prints operators it runs.

Tested with python, adding a list of images works to the sequencer works.
bpy.ops.SEQUENCER_OT_image_strip_add(name="MyImages", start_frame=54, channel=2, filename="/somedir/", replace_sel=True, files=[{"name":"test1.png"}, {"name":"test2.png"}])
2009-06-05 16:11:35 +00:00
45ed196344 2.5
Search menu:

- Made nicer drawing for popup version of search. It now uses
  entire backdrop like pulldowns.
  Search boxes for text buttons will use different style still;
  if we use this option all over it shouldn't look too intrusive.

- Search menu allows scroll, to view all items. It doesn't cycle
  anymore.

- Click outside search menu now cancels

- If a match is in search button, it highlights it. This also
  allows ALT+CTRL+F - Enter to redo last op.

- Search popup draws higher when no no space below. No order 
  flipping!
2009-06-05 16:11:18 +00:00
f7e5fd9438 MSVC cries of uninitialized param 2009-06-05 13:20:42 +00:00
52d8e64b85 PyRNA
- Support for python to convert a PyObject into a collection (uses a list of dicts - quite verbose :/)
- Operators can now take collection args when called from python.
- Support for printing operators that use collections (macro recording).
- Added RNA_pointer_as_string which prints all pointer prop values as a python dict.

Example that can run in the in test.py (F7 key)
bpy.ops.VIEW3D_OT_select_lasso(path=[{"loc":(0, 0), "time":0}, {"loc":(1000, 0), "time":0}, {"loc":(1000, 1000), "time":0}], type='SELECT')

for some reason lasso locations always print as 0,0. Need to look into why this is.
2009-06-05 12:48:58 +00:00
308b567e9c NLA SoC: NLA-Evaluation Bugfixes
* Fixed an evil bug where the last frame of a strip was always incorrectly evaluated. 
This was because these frames were not being included in the strip's 'range' as defined by the IN_RANGE() testing macro, which only considers the given range as an open interval (i.e. non-inclusive of boundary points). I've added a new macro, IN_RANGE_INCL(), which is inclusive of boundary points, since this is a common test in many other parts of the code.

* When an AnimData block is in 'tweaking' mode, the tracks following (and including the active track) are now correctly skipped during evaluation. 

* Finished coding the option of setting a single NLA-track per NLA-block to play 'solo' (i.e. only that track is enabled for evaluation). 
To enable this, simply click on one of the grey 'dots' beside the NLA-track names, turning this dot yellow. The 'yellow' dot means that the track will play by itself (even the 'active action' gets silenced). Only one track per AnimData block can play solo at a time. To disable, simply click on the 'yellow' dot again. 
NOTE: this currently uses the View3D layer-status icons. We probably need some special ones for these later (coloured vs grey star?)

* Also (not related to evaluation) made the selection operators for the NLA Editor only work when not in tweaking mode, since in tweaking mode they can potentially result in data being resolved inappropriately when leaving tweaking mode.
2009-06-05 11:51:27 +00:00
5c21c176fa NLA SoC: Operators for 'tweaking' strip actions (TAB-Key for both)
In this commit, I've introduced the mechanism by which actions already referenced by strips used in the NLA can be edited (or 'tweaked'). To use, simply select a strip you wish to edit, and hit that TAB key to start tweaking that strip's action, and hit TAB again once you're done.


What happens when you enter 'tweak mode':
1) The action of the active strip temporarily becomes the 'active action' of the AnimData block. You are now able to edit this in one of the Animation Editors (DopeSheet/Action, Graph Editors) as per normal (i.e. sliding keyframes around, inserting keyframes, etc.). The 'action-line' will therefore get drawn immediately above the active track containing the active strip, so that it's clear that that's what we're editing.

2) All the NLA-tracks (and all the strips within them) that occur after the track that the active strip lived in get disabled while you're in tweakmode. This is equivalent to travelling back to an earlier state in a construction history stack.

3) The active NLA track also gets disabled while in tweakmode, since it would otherwise interfere with the correct functioning of the tweaking for the action of interest.

4) The 'real' active action (i.e. the one displaced by the active strip's action) gets put into temp storage, and will be restored after you exit tweakmode.

5) Any strips which also reference the action being tweaked will get highlighted in red shading to indicate that you may be making some changes to the action which you don't really want to make for the other users too.


Please note though, that this is only a rough prototype of this functionality, with some niceties still to come. i.e.:
* NLA-tracks after the active track should still get drawn above the 'tweaking action line', but perhaps with different appearance?
* Various tools will still need awareness of this to prevent corrupting operations from taking place. How to proceed is still undecided...
* When exiting tweak-mode, the strip the action came from still needs some form of syncing with the modified action... there are a few tricky issues here that will need to be solved
* Evaluation code doesn't totally take this into account yet...

---
Also, fixed a number of bugs with various code (notably selection, and also a few drawing bugs)
2009-06-05 05:18:07 +00:00
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
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
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
13376a903b UI:
* Make ESC-key close the search popup menu.
* Also make ESC-key cancel number button dragging.
2009-06-05 00:39:42 +00:00
8154de7045 BGE [#18884] light in skinned object only work properly after running the action once. 2009-06-04 21:24:41 +00:00
b0b8700a83 2.5 filebrowser
* code cleanup: removed unused fileselect mode (type)
* brought back 'hide dot files', needs proper storing of the settings still.
2009-06-04 20:07:06 +00:00
35914d8ca2 2.5 MSVC projectfiles
* added file editors/space_buttons/buttons_context.c
* removed BRE_yafray project
2009-06-04 20:05:08 +00:00
3cb4547b80 bugfix and updates for DXF-Importer/Exporter scripts
DXF-Library log:
v1.31 - 2009.06.02 by migius
 - modif _Entity class: added paperspace,elevation
v1.30 - 2009.05.28 by migius
 - bugfix 3dPOLYLINE/POLYFACE: VERTEX needs x,y,z coordinates, index starts with 1 not 0

DXF-Importer: minor changes

DXF-Exporter log:
v1.34 - 2009.06.02 by migius
- support XYmirrored 2d-curves to POLYLINEs: works correct only for rotX,rotY==0.0
- support thickness and elevation for curve-objects
- fix extrusion 210-code (3d orientation vector)
- fix POLYFACE export, synchronized with dxfLibrary.py
- changed to the new 2.49 method Vector.cross()
- output style manager (first try)
v1.33 - 2009.05.25 by migius
- bugfix flipping normals in mirrored mesh-objects
- added UI-Button for future Shadow Generator
- support curve objects in projection-2d mode
- UI stuff: camera selector/manager
2009-06-04 19:49:19 +00:00
3f0d2bd334 2.5
Just a minor tweak in menu draw, makes Search menu a tinsy prettier.
Tomorrow more!
2009-06-04 18:38:10 +00:00
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
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
33b0ba4a76 2.5
Bugfix: Icons were drawing on wrong subpixel positions, distorting
badly. Now it's crispy and tasty!

Noticed there's a magnifier icon already, using it for the search
option.
2009-06-04 15:19:48 +00:00
59333375b3 2.5
Two small fixes;
- Search menu options text could overlap with hotkey
- Operator "duplicate area into window" didnt work for non-actionzone
2009-06-04 14:32:10 +00:00
d2ea71a296 Cleaned up the node wrapping code 2009-06-04 14:11:39 +00:00
0f9841b01a All nodes are now wrapped! Some still need limits and extra logic though. 2009-06-04 13:55:02 +00:00
c12163c0c5 2.5 RNA:
* Found more bugs in factor properties.
2009-06-04 11:16:56 +00:00
1d6e679f3e 2.5 RNA:
Bugfix: Smooth Modifier didn't accept negative factor values.
Patch by Wahooney. Thanks!
2009-06-04 11:05:36 +00:00
1205579af3 2.5 RNA:
* Wrapped some more object force properties.
* Fixed a bug in the field_type_items.
2009-06-04 10:56:39 +00:00
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
5587e9bd09 UI:
* First step for buttons context browsing, read-only still.
* Drawn in a panel now, though this should become a separate region.
* Path of the context is constructed as an array of RNA pointers and
  then used for drawing and context lookups from python.
2009-06-03 23:33:56 +00:00
4df00c670e RNA:
* Added a MaterialSlot collection in Object rather than giving
  the list of materials immediately. This should more correctly
  reflect how this data is organized, even though there is no
  equivalent C struct.

* Added name properties to MaterialSlot/TextureSlot/ParticleSystem.
2009-06-03 23:22:43 +00:00
a8f69a7f5c UI/RNA:
* Added an icon entry to RNA structs, instead of the UI_GetIconRNA
  function, to keep code together a bit more and make the lookup
  faster.
2009-06-03 23:16:51 +00:00
34014df367 2.5 RNA:
* Started wrapping object force.
* Added "absorption" property in Collision Modifier RNA.
2009-06-03 22:19:04 +00:00
06fe5deaec Make release wasn't stripping the gameplayer
(typo) 

Kent
2009-06-03 21:03:44 +00:00
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
7c3c9df2c0 2.5
Further work on new "text search" button.

- Now allows to browse items (mouse, arrow key)
- Assigns active value
- Uses different backdrop to distinguish from popup menus
- Cleaned API for it, so it can be used nicely generic

Also added a search menu, which shows all currently working
operators: CTRL+ALT+F. (mind the looks, it needs some tweaks!)

To make a menu activating a button I've added a new event...
could use some tweaks.

Important note: the callback to pass on "old string" for text
button (bone rename) couldn't work yet, added first code for new
callback, but has to be worked on further. When bone rename gets
added it can be tested.
2009-06-03 18:31:37 +00:00
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
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
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
f6cac5bec7 NLA SoC: More Drawing Tweaks
* Following user feedback, I've increased the separation between normal NLA-tracks and the 'action lines' to try and differentiate them more. This hopefully this will be sufficient, otherwise, I'm going to have to abandon the use of nice, generic channel-identification code for lists of channels...

* Improved drawing of 'active' strips. 
- Now, the active strip (when NOT being 'tweaked') will be simply drawn as a yellow strip + a white border. 
- The active strip (when BEING 'tweaked') will now be greenish + a white border. The colour here may be tweakable, but we'll see...

* Strip extrapolation modes (hold, etc.) are now visualised as rects with alpha and the same colour as the strip they belong to.

* Selecting strips now makes them 'active' (and deactivates the others). Only one strip can be active at a time. Still need to figure out precisely how this will work with multiple AnimData blocks + NLA-'tweaking'.

* Fixed view-matrix bug introduced in last commit for text drawing. For now, we'll just reset the view matrix after doing that, since it's not too acceptable to move these calls to the end yet, as they should get overlapped by some other editor features (such as the Current Frame indicator)
2009-06-03 11:22:49 +00:00
9b86975586 Cloth Buttons:
Cloth Collision settings dindt't use the new button space context data.
2009-06-03 09:06:32 +00:00
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
a3c0730f99 RNA: more compositor nodes wrapped 2009-06-03 00:40:38 +00:00
dc7d0ef474 UI:
* Add Lamp Fallof Curve and Texture Color Ramp panels.
* Use button space context data.
* A few other minor python layout script updates.
2009-06-03 00:17:35 +00:00
abfc3daaf4 UI:
* Added initial color ramp and curve mapping templates.
2009-06-03 00:14:12 +00:00
084be86ea9 UI:
* Make modifier and constraint templates use left/right alignment for
  buttons in the header.
* Added mdef bind operator as an example of how to use local context
  for a modifier, and add some code I forgot to commit last time to
  make this system actually work.
2009-06-03 00:09:30 +00:00
9ed9acaf9a UI:
* Implemented scale_x/scale_y for layouts.
* Implemented left/right/center/expand alignment for row layouts.
2009-06-03 00:04:48 +00:00
7498561cfb 2.5:
* Button space context now includes most data so python code doesn't
  have to look it up manually, and to plug-in context browsing later.
2009-06-03 00:01:22 +00:00
5b2737a735 2.5:
* Fix crash adding rigid body constraint.
* Give new nodetrees NT in ID name to make them recognizned by RNA,
  even if the nodetrees aren't actual ID datablock.
2009-06-02 23:56:33 +00:00
c2d2b1c57d RNA
* Fix an issue where the pointer types wasn't always refine
  to the most specific type, now RNA_pointer_create also
  does this for convenience.
* Make lamp fallof type editable.
2009-06-02 23:53:40 +00:00
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
ca24322413 2.5
Part one of new text button type: SEARCH_MENU
This opens a popup showing all matches for a typed string, nice
for object names, materials, operators, and so on.

Warning: Currently menu doesn't function yet! Only draws choices.

As test I've added an operator search button in top bar. It only
shows operators that can be used in this context now. Also that
is part of the WIP, tomorrow more fun :)
2009-06-02 18:10:06 +00:00
67494dcad3 2.5
Crash; reading NULL pointer in poll() callback for UV edit.

Note: poll() is ONLY for checking context, not for changing things.
2009-06-02 16:40:15 +00:00
8afd6a9dc5 NLA SoC: Added basic info-text drawing on strips
The format of these is still rather experimental.
2009-06-02 13:03:33 +00:00
6a35302a54 NLA SoC: Fixed merge errors. Manually copied over any files from 2.5 that were modified in a commit by Brecht between the time when I had done the previous merge and the time when the commit for that finally got through. 2009-06-02 09:58:06 +00:00
bfbb7d5d73 2.5 Constraints:
Wrapped IK and Rigid Body Joint constraint to Python.
Note: Couldn't test Rigid constraint due to crash.
2009-06-02 09:40:24 +00:00
ad545fd9f6 Wrapped buttons window in RNA 2009-06-02 08:08:41 +00:00
37f47ef386 NLA SoC: Merge from 2.5 20441 to 20570 (HEAD)
There were a few conflicts/missing files. Hopefully everything updated ok...
2009-06-02 01:40:53 +00:00
62abe788c4 Fixed limits on translate node 2009-06-01 21:38:03 +00:00
a3f097c646 Bugfix for faulty noise function in bricks node 2009-06-01 21:22:43 +00:00
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
a117731aa2 2.5
- Fix: text draw in fonts was slightly too low; it didn't calculate offset
  correctly. Now it is aligned to have number characters in center.

- Fix: text clip was too wide, giving errors on extreme zoom in.

- Added boundbox-clipped default text drawing for view2d:

  void UI_view2d_text_cache_rectf(View2D *v2d, rctf *rect, char *str)

  (Note; also for previous commit, this cache immediately projects, so if
   you change view2d while drawing, text is still on correct positions)
2009-06-01 17:21:03 +00:00
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
cb96aa47db 2.5
Added support for cached text drawing in View2D. Cache is needed to
prevent the viewmatrix being set/restored on each text drawing.

Adding a string:
void UI_view2d_text_cache_add(View2D *v2d, float x, float y, char *str)

Drawing:
void UI_view2d_text_cache_draw(ARegion *ar)

Nothing else needed; just make sure cache-draw is always called at end
of a view2d drawing function, to clear cache memory.

On todo for next: a version with a rectf boundary to clip text within.
2009-06-01 16:22:53 +00:00
dbbe06b690 2.5
Fix for Spin & Screw Mesh edit operators.

- now center and axis are RNA properties for operator
- axis is drawn as Normal button in properties buttons. Fun toy!
2009-06-01 14:08:19 +00:00
af42ee43be fmod directory wasn't removed when all references to fmod were. (patch [#18260] FMOD Removal, committed 19395) 2009-06-01 12:49:16 +00:00
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
7c4fccd684 2.5
Cleanup commit:

- Yafray removed. Also did cmake/scons files, but didn't compile with it,
  so test would be appreciated :)
- Removed old crap from Windows release dir, should be checked on
  further by windows release builder later.
2009-06-01 12:10:30 +00:00
0e02fef8b4 2.5: Added first particle panel, and an RNA property to retrieve
the active particle system.
2009-06-01 11:39:11 +00:00
41963d9e4e 2.5
Added new widget type in drawing and themes: "Box Backdrop", which is
in use by modifiers. Allows alpha blend, shade, etc. 
It was using the general button theme for standard buttons still, to
indicate this change I made it a bit darker. Matt/Bill are invited to
tweak this default color :)
2009-06-01 11:31:06 +00:00
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
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
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
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
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
ae565b9bb3 == Sequencer ==
This fixes: IPO pinning on sequencer strips was lost during Undo.
2009-05-31 17:59:57 +00:00
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
934e3ddf0d Deform modifiers can now use useRenderParams and isFinalCalc in modifier stack as non-deforming and constructing modifiers can already - please check for problems or if i missed something 2009-05-31 17:20:57 +00:00
c4efd3a1af RNA: Wrapped texture nodes, made a start on compo nodes.
Difficult to test, because outliner no longer shows nodetree? (Just a bullet icon)
2009-05-31 16:45:30 +00:00
a5c60e3405 2.5 Buttons:
* Some world button tweaks by William Reynish. Thanks! 

* Quality slider in scene buttons gets hidden again.
2009-05-31 16:40:28 +00:00
759d31d320 Anisotropic Friction bugfix for #18854 http://projects.blender.org/tracker/index.php?func=detail&aid=18854&group_id=9&atid=125
Thanks to Campbell for the reproduction case!
2009-05-31 16:22:22 +00:00
8deca3ecfc BGE: fix refcount bug causing crash with Object texture coordinates. 2009-05-31 14:54:31 +00:00
acd5281a21 2.5
RNA didn't compile for msvc, variable declaration on wrong place.
2009-05-31 12:47:36 +00:00
3f6d5dd27a 2.5 Constraints:
* Wrapped Action Constraint to Python.

* Some layout tweaks by William Reynish.
* Cleaned up the code a bit.
2009-05-31 11:47:45 +00:00
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
33267f5858 NLA SoC: Basic selection operators
* Added click-select/left-right select and deselect all/invert all selection operators. For now, these basic operators will suffice (more advanced selection operators will be coded at a later stage).

* Fixed a few bugs in DopeSheet found while coding the relevant tools for NLA. 

* Added custom border-select operator for NLA channels (since the standard one assumes negative direction channel order)

* Added new API-method for NLA strips to check if the strip occurs within a given range, since this test needed to be performed in a few places...

* Tweaked the NLA Editor View2D ranges a bit to give saner default sizing. This still isn't right yet though.
2009-05-31 11:14:50 +00:00
c42eeddea4 NLA SoC: Bugfixes + Improvements to 'Push Down' track-selection
* Trying to save no longer crashes in some cases when the NLA Editor was open with some data. The sanity check added in filesel.c might be able to be backported to 2.5? (Elubie, please check)

* NLA-track names now get drawn with the correct colours for identifying themselves as being selected or not selected.

* Now the 'push down' functionality for actions will try to add the new strip to the last NLA track, provided it has space in the range required. 
* When new strips are added, they will only be allowed to extrapolate before/after if they are the first (time-wise) strip for the set of NLA data per AnimData block. This stops layered strips overriding strips that occurred in earlier tracks at earlier times.
2009-05-31 04:52:20 +00:00
27fe29b2b7 * started wrapping 3d view space in RNA 2009-05-31 01:22:34 +00:00
a67e7bebb9 2.5 Constraints:
* Wrapped the constraint layout to python and deleted the corresponding C code.
ToDo: 4 constraints are still C code (IK, Script, Action and Rigid Body Joint)

* Some Constraint RNA fixes.
* Wrapped the Shrinkwrap Constraint in RNA.
2009-05-30 23:31:10 +00:00
2e85686fe3 NLA SoC: Fixes (UI, evaluation?)
* Fixed some bugs which meant that NLA-strips weren't getting drawn
* Removed some debugging code
* Fixed bug with Action-line disappearing after 'pushing down' actions 
* Fixed bug where Objects with no animation data showed up in NLA 
* Tried fixing a bug where NLA-strips were evaluated erratically. I have a feeling that there are some rounding errors I'll need to pay more attention to somewhere :/
2009-05-30 12:40:07 +00:00
aa4d64d7ff NLA SoC: Bugfixes for previous commit
* Compile fix in nla_draw.c 
* Not totally correct yet, but now NLA-tracks get drawn too after action 'push-down'
2009-05-30 11:05:29 +00:00
32d0533f78 NLA SoC: More UI work + 'Push down' tool
'UI Work'
* Added more drawing code for drawing NLA data 
* Made the operators for the 'channel-list' of NLA work. A special version of borderselect for the NLA channel-list (due to the different vertical order) still needs to be coded though.

'Push Down' tool
The active action of each AnimData block, represented by the reddy/orange channel, can be added to the NLA stack as a new action by using the 'snow-flake' icon/button (probably need a special icon for this later). This will add a new NLA track and an NLA strip referencing this action. The AnimData block's 'active action' slot will then be left empty.

(Unfortunately, there still seems to be a bug here, which I'll check on later)
2009-05-30 10:41:41 +00:00
c41f8ea2ad * fix for resetting window size on builtin b.blend startup.
I think this should work ok for now, but would really appreciate someone who knows the windowmanager code well to take a look at it  :)
2009-05-30 07:26:45 +00:00
829fb38ac3 updated outliner header python file, still disabled for now, because there's not a nice way yet to represent the keying sets menu. 2009-05-30 06:23:17 +00:00
1422cb6e45 fix for previous commit, reload startup was freezing 2009-05-30 04:24:10 +00:00
b36eb7e452 * Updated blender 2.5 default setup
Simplified and started from a clean slate, without much of 
the hidden existing space data that was hanging around 
in the old one.

One issue I found is that saving the startup file from 
Blender 2.5 also saves the window size and location. 
This means the version I just saved would open up 
strangely on other screen sizes/setups. I added code to 
reset this to default when loading it up from the version 
compiled into the Blender binary, but perhaps Ton/
Brecht might want to check the diff.
2009-05-30 04:16:24 +00:00
72205f45e4 NLA SoC: Basic Strip drawing
Implemented some basic strip-drawing code with some hardcoded colours. These colours will be made into theme colours at some point, but the aim is to use different colours as indicators of the 'state' of the strip (i.e. active/being tweaked, uses the same action as the strip being tweaked, selected, normal). 

This is not yet usable though...
2009-05-30 00:28:33 +00:00
a1962cf3ee This was found by coverity
CID: 568
Checker: FORWARD_NULL (help)
File: base/src/extern/libopenjpeg/jp2.c
Function: jp2_decode
Description: Variable "image" tracked as NULL was dereferenced.

fixed by just updating to latest version of the file from
external svn branch.

Kent
2009-05-29 19:11:04 +00:00
3521789e35 Last pre-2.49 commit part 2: the original file (png btw), and txt and
VERSION update.

Image credits go to Clemens Granjon; http://clems.g.free.fr

And now: release!
2009-05-29 17:52:45 +00:00
b3ce0c6a49 Last pre-2.49 commit part 1: splash c file and release number 2009-05-29 17:51:16 +00:00
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
d5b27fabcc BGE: sensor object will now have Actor filter optional: new button 'Detect Actor' in physics settings indicate if you want the sensor to detect only Actor object or all objects. This way you don't need to set the scenery to Actor to detect ground for example. 2009-05-29 16:55:22 +00:00
688b7c73ad RNA:
* Added PROP_ID_REFCOUNT flag to control if refcounting should
  be done on ID pointer properties. All ID pointers are refcounted,
  by default, with the exception of Object, Scene and Text.
* Also made TextureFace image pointer editable, with the special
  refcounting behavior.
2009-05-29 15:12:31 +00:00
dd9c9efde7 BGE modifier: last minute commit to fix a nasty bug with modifers messing the alpha blend mode of the GE. Note the alpha sorting on modified mesh is not implemented so derived mesh should not have alpha faces (clip will work though). Incidently fixed a performance problem in GLSL where the derived mesh was possibly rendered multiple times. Modifier support is still a bit experimental and should not be used in production game. 2009-05-29 13:37:51 +00:00
092b13ef3a the option for saving images as jpeg2000 was missing 2009-05-29 13:33:33 +00:00
10e8672c8d 2.5 Buttons:
* Modifier Button tweaks by William Reynish. Thanks!
2009-05-29 12:42:06 +00:00
cee915ab56 NLA SoC: Start of UI Drawing Code for NLA Editor
In this commit, I've only setup the drawing code for the channels list. Only the drawing of the 'active action' dummy-line has been tested so far.
2009-05-29 12:26:47 +00:00
a01fa8b581 2.5 Buttons
* More greying out tweaks by William Reynish and myself.
2009-05-29 09:53:46 +00:00
6ee8067189 typo in message 2009-05-29 09:27:48 +00:00
edcb9f8863 workaround for strange python problem in the BGE and BPy API where printing warnings mistook the blender binary for a script - argv[0], Binary lines were printed into the console sometimes causing console beeps and corrupting future console output.
Internal texts file on disk is not used it seems python warnings dont support this (even though exceptions do).

The most common cause of this is passing a float as an argument to a method that took an int.
get around this by setting __file__ in the namespace to the script name before executing the script, the file lines are not found but at least the output is not weird and confusing.

Added read only 'mode' attribute to the python controller so there is a way to tell if its executing a module or a script. Updated docs to better explain execution methods.
2009-05-29 09:22:24 +00:00
39177018af Revert commit 20478: instead of changing the default in blender, it's better to change the values for the demos that need it. 2009-05-29 08:55:14 +00:00
7c2b2f5580 2.5 Buttons:
* Example code for greying out individual items.
2009-05-29 08:43:44 +00:00
9c158175ab bugfix and update DXF-Exporter scripts
please get it in 2.49 release
2009-05-29 06:50:31 +00:00
02e719079f 2.5: fix crash loading saved file with render result, image user
scene wasn't set to NULL on load. Still doesn't seem entirely safe
but prevents crash here.
2009-05-29 00:20:41 +00:00
ce334b1cd9 UI: Matt, check space_outliner.c diff to see how to get python
layouts in a header.
2009-05-28 23:58:18 +00:00
a741cbff82 2.5: fix text editor issue with scrolling and an invalid memory read. 2009-05-28 23:48:29 +00:00
276a75ae07 UI:
* Added panels with dummy preview template.
* Added constraints panel for bones next to objects, though it
  doesn't work that well yet, the operators and code need to be
  changed so they don't assume it is one or the other in/out
  of posemode.
* Added some graying out in the scene and world buttons.
2009-05-28 23:45:50 +00:00
facb944616 UI:
* Added a dummy preview render template, to test some layout
  engine features on tomorrow.
2009-05-28 23:41:12 +00:00
46b91bf162 UI:
* Added some properties of uiLayout that can be set. I've added
  some API code for more than the two I've implementeds, so
  ignore those for now.

  * layout.active = False will gray out buttons inside a layout.
  * layout.enabled = False will gray out and completely disable
    the buttons inside a layout.

* Also some function renames.
2009-05-28 23:37:55 +00:00
a591a47c43 RNA:
* Automatically do us++ and us-- reference counting in ID pointer
  set functions.
* Added an enum property callback to dynamically vary the list of
  available items.
* Added some functions to do removes on pointers and collections
  runtime defined for RNA and using ID properties.

* Constraints now have owner/target space wrapped, and most
  pointers made editable. They can be ported to use python layouts.
* Also other pointers made editable that I think are see now with
  the automatic reference counting.
2009-05-28 23:23:47 +00:00
9cc638fb16 Context:
Added a system for adding a "local" context in a UI layout.
This way you can define for example within a modifier panel
all operators to get the modifier in the context.

In the layout code:

uiLayoutSetContextPointer(layout, "modifier", &ptr)
layout.set_context_pointer("modifier", md)

In the operator:

ptr = CTX_data_pointer_get(C, "modifier")
md = context.modifier
2009-05-28 23:13:42 +00:00
17c51c6cb7 Bullet Physics maxphystep = 1 is better general default to avoid vicious circle
(graphics slower -> physics slower -> overall frametime slower -> graphics slower etc.)
See difference in vault.blend
2009-05-28 22:26:28 +00:00
4026e6341e bugfix: added import Curve module 2009-05-28 20:28:52 +00:00
Ken Hughes
bdfa07cddb Python API
----------
Bugfix: make bpy.data.meshes.new() work the same way as Blender.Mesh.New().
2009-05-28 14:24:16 +00:00
0edb6e89be [#18803] 'ShadeModes' dictionary and 'shadeMode' instance variable exported to Python API
Ton was ok with adding Vladislav Turbanov (vladius)'s patch during the freeze.
2009-05-28 14:01:10 +00:00
8c4620f3d3 [#18840] Joystick sensor lag
if(SDL_PollEvent(&sdl_event)) // if -> while fixed it
removed 'm_buttonnum' was misleading, wasn't used as you expect.

Added gravity to variable to world to be used by collada.
2009-05-28 13:44:32 +00:00
6ac072e1bd BGE: no sleeping and lock axis physics options were not propagated to replicas. 2009-05-28 11:04:45 +00:00
a843d7e316 Needed to cast to a PyObject* 2009-05-28 10:31:56 +00:00
b9d8a2716a renamed python 'bookmark' attribute to 'useHighPriority', was renamed in the UI but not in python. 2009-05-28 07:11:12 +00:00
ca5d429bf9 grsaaynoel spent ~2hrs to figure this out, theeth, feel free to elaborate if the tip isnt quite correct. 2009-05-28 06:34:56 +00:00
ea826759c4 Projection paint, cloning from 1 layer to another would show ugly black lines at the seams because interpolation didnt wrap across the image.
Added bilinear_interpolation_color_wrap to be used instead of bilinear_interpolation_color for painting.
2009-05-28 06:13:56 +00:00
970f9f3ee2 * Wrapped outliner space in RNA, and added a python ui file for the header.
Brecht, would you be able to have a look at this if you have time - I can't 
figure out how to trigger the python file to register the header instead of 
what's in outliner_header.c.
2009-05-28 05:09:25 +00:00
a804ae7b3f rna_define.c, RNA_def_struct - set the py_type to NULL when making an rna struct based on another.
bpy_util.c, PyObSpit - print refcount with PyObject
2009-05-28 02:03:48 +00:00
4512be4b6c 2.5 - Fixes for animating enum values
Interpolation between keyframes for enum values (and booleans) can only be constant now. 

TODO:
A way to do this for modifiers is still needed.
2009-05-28 01:57:29 +00:00
01f8956a6d == FFMPEG ==
This fixes:
[#17505] Bad Interlacing for NTSC in mpeg-2 files
2009-05-27 22:37:45 +00:00
65d980155d last-minute Bullet bugfix: accidently commented out a constraint limit test, causing instability for springs. 2009-05-27 22:27:10 +00:00
5936032f66 patch from Andrea Weikert, added some comments.
thanks for looking into this.
2009-05-27 15:41:44 +00:00
059b4bf8fc DXF-importer second update: v1.12 - 2009.05.26 by migius
- changed to the new 2.49 method Vector.cross()
2009-05-27 13:32:09 +00:00
00ff608991 DXF-importer update: v1.12 - 2009.05.26 by migius
- bugfix WORLDY(1,1,0) to (0,1,0)
2009-05-27 11:57:39 +00:00
e49c0b495a Reverted last buttons commit after chatting with Thomas :)
note: The new 'Toggle' options in the UI api should be 
avoided for normal text buttons, and used sparingly 
otherwise. We want to avoid having two inconsistent 
appearances for the same type of buttons.
2009-05-27 11:21:34 +00:00
3e6d23562c 2.5 Buttons:
* Changed some checkboxes into Toggle Buttons.
2009-05-27 09:37:48 +00:00
e1681fcf35 2.5 - Constraint Buttons Layout file
Separated out the code for defining the layout for the constraint targets since its practically the same (with a few minor variations) for all of the other constraints.
2009-05-27 07:28:51 +00:00
fb7d688c1b flag the images as dirty when projection painting (so there is the option to repack a packed image) 2009-05-27 03:43:22 +00:00
af324690ee * Small graphical/gui tweaks to constraint and modifier templates 2009-05-27 03:42:51 +00:00
0cab562e46 Workaround for size 1 brushes not working with projection paint,
need to investigate why this wont work but for now just clamp the value while projection painting.
2009-05-27 02:03:22 +00:00
da270c6691 "Motor at limit" jitter fixed for btGeneric6Dof constraint, fix taken from Bullet SVN repo.
Now we need some cool constraint limit/motor/spring demos, such as a Forklift demo, moving robots, ragdolls etc. for Blender 2.49!
2009-05-27 01:29:41 +00:00
95af39cc33 NLA SoC: Merge from 2.5 20215:20439 (HEAD) 2009-05-27 00:07:03 +00:00
1b1667018e UI:
* Added Constraints template and Add Constraint operator.
* Added toggle=True/False parameter to uiItemR, to get a
  toggle button (actual button) rather than an "option"
  button (checkbox) 
* Added OPTION/OPTIONN button type, to distinguish with
  TOG/TOGN.

RNA:
* Make all modifier pointers editable, including correct updates.
* Added notifiers and updates to constraints.
* Fix a stack corruption, pointed out by Andrea, and potentially
  causing crashes.
2009-05-27 00:03:49 +00:00
b89fb7d8fd 2.5 filebrowser
- some cleanup of ugly conditional.
2009-05-26 21:34:20 +00:00
191e22dd62 BGE: fix a bug with kinematic object not giving the correct friction to dynamic object when they have a translation and rotation movement at the same time (translation is ignored). Performance: avoid unnecessary synchronization for static object. 2009-05-26 21:32:19 +00:00
3159f4a243 2.5 MSVC projectfiles update
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added

Also added small fix for crash in filebrowser.
2009-05-26 18:54:39 +00:00
328d3128a5 BGE VideoTexture: VideoFFmpeg was missing a rewind function: rename stop() to pause() and add stop() that will also reset the frame counter. 2009-05-26 18:37:46 +00:00
25569b0f7d BGE PyAPI Bug reported by Pitel on blenderartist.
importing "pygame" failed when running the BGE for the second time.

Rather then clearing modules, backup and restore them (as its doing with sys.path)

This way the BGE will never remember any modules imported during game play (which can cause bugs/crashes), but it also wont break pythons state by possibly removing modules that are being used internally.
2009-05-26 18:06:09 +00:00
Chris Want
74977721a4 BGE build probs with CMake: directory "source/gameengine/SceneGraph"
was been referenced as "source/gameengine/Scenegraph" in some
include paths.
2009-05-26 17:15:29 +00:00
33b974ee43 BGE Py API
- Deprecation warnings for using attribute access

- Added dictionary functions to KX_GameObject and ListValue
    ob.get(key, default=None)
    ob.has_key(key)
 ob.has_key is important since there was no way to do something like hasattr(ob, "attr") which can be replaced by ob.has_key("attr") - (both still work of course).
 ob.get is just useful in many cases where you want a property if it exists but can fallback to a default.

- CListValue::FindValue was adding a reference but the ~3 places it was used were releasing the reference. added a FindValue that accepts a const char* type to avoid converting python strings to STR_String.
2009-05-26 16:15:40 +00:00
7e48820a97 Fix for bug #18788: vector math node subtract did not work,
patch by Matt D., thanks.
2009-05-26 15:01:06 +00:00
33304d022d Bugfix #18801
Third transparent shadow bug... this time it's a Material Node, which
has mirror + transp-shadow on, and when it traces its own material it 
enters an eternal loop...

Raytracing + shading + materialnode combo really needs work!
2009-05-26 13:46:08 +00:00
137b3e1dc5 == Sequencer ==
This adds a per preview option to set render sizes (which proxy size is used).
That makes it possible to have 
* several small preview screens which update really fast using the proxy files
* one large output screen that operates in full resolution

Since most of the time not all input strips are considered when calculating
an output screen, this is a big win.

Also: one can disable a preview screen completely using this option.

Other use cases: vector + chromaviews don't always need full resolution 
pictures and work equally well on proxy files!

This option finally makes my working setup _completely_ realtime :)
2009-05-26 12:57:16 +00:00
e93d1ba8e7 Misc warnings
- Removed/Commented some unused vars
- CValue::GetPropertyText() could return a temp reference to a variable on the stack, option wasnt used anywhere so removed.
- KX_ConstraintWrapper::GetConstraintId allows args but ignored them
- KX_ConstraintWrapper::PySetParam didnt return NULL on an error (messing up pythons exceptions).
- BLI_natstrcmp didnt return 0 when the while loop exited
2009-05-26 10:44:14 +00:00
ca4d741ce9 Bugfix: (discovered by course participant :)
Brush option "Clone" didn't read linked Clone Image from file.
No idea how this ever could work even... even for Undo it
would crash.
2009-05-26 08:30:28 +00:00
7ba91ddcc3 BGE Script template for a python module (set EOL to native this time)
BGE PyAPI use defines for error return values
 - del gameOb['var'] error message was wrong.
2009-05-26 07:41:34 +00:00
c590dd3e8c minor ref-counting changes, means new subclasses will get the correct ref count though there are big problems with this still.
Found that subclassing an RNA struct (without even registering or instancing adds a reference to Py_None).
Unlikely a python bug, tested with py2.6 and 3.1
2009-05-26 06:29:15 +00:00
a98f1f54bf * Tiny cloth panel tweaks 2009-05-26 05:12:27 +00:00
64ddd9ea4f * Scene buttons tweaks
* Added 'render stamp' rna & buttons
2009-05-26 05:03:27 +00:00
61101e560d * Small tweaks to texture panels 2009-05-26 02:49:46 +00:00
Ken Hughes
5f82855a07 Interface
---------
Fixing typo in TimeOffset tooltip.
2009-05-26 00:14:22 +00:00
bbed7918c8 IRIX: use python 2.5 by default 2009-05-25 23:35:29 +00:00
25c564c7c3 tiny fix for irix: use putenv instead of setenv 2009-05-25 23:20:38 +00:00
84e919ca4b 2.5 Buttons:
* Added initial Cloth Modifer panel.
Enable a Cloth Modifier to see the panels in the physics tab.
2009-05-25 18:32:28 +00:00
Ken Hughes
ca39228fb7 Interface
---------
Bugfix 18811: long filenames caused stack corruption in BLI_adddirstrings().
2009-05-25 16:09:22 +00:00
67d8a5b5b0 texture buttons raised py errors when there were no textures on an object 2009-05-25 14:58:10 +00:00
6d156a1bab Store the context for python in a static variable with assessor functions - BPy_GetContext/BPy_SetContext,
Still not happy with this in the long term but its less problematic then storing the context in pythons namespace which couldn't be set before importing modules.

This might fix a crash quite a few people have reported (but I cant reproduce).
2009-05-25 13:48:44 +00:00
801eeb6423 NLA SoC: Groundwork for NLA UI
Adapted the channel-filtering code for the other animation editors for eventual use by the NLA Editor.
2009-05-25 13:07:54 +00:00
ca8497d001 * UI tweaks to python controller (more space for module name), setParent actuator use less space
* object_drop.py - option to orient to face normal (useful for scattering objects over terrain), accounts for normal flipping and can adjust the orientation %.
2009-05-25 11:39:09 +00:00
2fa8504dd1 BGE Joystick Hat Bugfix
bug reported by blenderage on blenderartist (found other bugs too).

- "All Hat Events" didnt work.
- Multiple hats didnt work
- use a menu with direction names rather then have the user guess. disallow zero as a direction.
- Allow up to 4 hats (was 2).
- Python api was clamping the axis to 2, maximum is currently JOYAXIS_MAX - 16
- New python attributes hatValues and hatSingle, match axis functions.
- Use SDL Axis events to fill in the axis and hat array rather then filling in every axis with SDL_JoystickGetAxis for each axis event.
2009-05-25 06:24:23 +00:00
2a9d9605d0 Pressing the '~' key in the ipo view didnt store the view state in the ipo curves as clicking on the ipo channel names does. 2009-05-25 03:06:03 +00:00
3053ce1a8c [#18819] save and load globalDictionary actuators don't load the proper files in 2.49 RC3
For this actuator to be useful it needs to use the first opened blendfile as the base name for the configuration file.
A recent fix that made the gp_GamePythonPath always match the current loaded blend file made this actuator work differently.

keep the original filename to use for making the config name so you can load the config between loading blendfiles.
2009-05-25 02:39:05 +00:00
1af059b642 [#18808] Unstable results of Pack Margin in UV editor
was scaling the margin by the area twice
2009-05-25 02:11:18 +00:00
3ceed4cfb2 [#18731] trouble with the python api in assigning script constraint's target.
- Setting the constraint script from python didnt update the target count
- Setting objects didnt work at all, since it checked the input sequence for being an BPy_Object type (rather then an item in the sequence)
2009-05-25 01:45:35 +00:00
1266e0f2bf quick fix still allowed for possible crash, check for valid newlibadr return value in the while loop. 2009-05-25 01:00:17 +00:00
b7653ba542 missing null check, would crash blender when loading some files 2009-05-25 00:31:41 +00:00
48abe5a66e utility script for cleaning ipos animation curves,
used in YoFrankie to reduce file size for large actions
2009-05-25 00:30:06 +00:00
fe85bdd040 - BGE Py API, any py function/attribute that took a KX_GameObject would not accept a KX_Light or KX_Camera (bad oversight on my part)
- Typo in occlusion variable init "m_buffer == NULL;" -> "m_buffer = NULL;"

CcdPhysicsEnvironment.cpp and CcdPhysicsController.cpp had too many warnings, fixed most of them.
2009-05-24 23:43:10 +00:00
323052068a VideoTexture: exception in C++ was not returning an error in Python. Added function name ini PyArg_ParseTuple. 2009-05-24 23:12:38 +00:00
edd783db73 2.5/Sculpt:
Bugfix for doing a multires subdivision while in sculptmode (forgot to resize projected vertices.)
2009-05-24 23:05:27 +00:00
4e0e720158 == Sequencer ==
This fixes a stupid mistake in proxy handling with custom files:
CFRA not calculated correctly for proxy...
2009-05-24 19:54:35 +00:00
Dalai Felinto
4f7264ee52 Action actuator default value changed from 0.0 to 1.0. Bookmark renamed to Mark and other small logic tooltip changes
- IPOs and actions start it's frame counting in frame 1, not zero.
- Talked with Ben and we agreed to rename the "bookmark" feature before an official release.
- some English typos.
- removed all period in the end of tooltips for consistency's sake.

* note:
I resisted one more time to the temptation of alphabetical ordering the Sensors and Actuators.

That will be the first thing I would like to do after we are done with 2.49 :)
It really annoys me as a user.
2009-05-24 19:21:54 +00:00
Ken Hughes
2f0ec4b7fc User Interface
--------------
Bugfix 18817: DataBrowse for MTex used Material IDs instead of Texture IDs.
2009-05-24 16:22:09 +00:00
e5509b98ce == Sequencer ==
Made relative paths work with custom proxy files.
2009-05-24 14:14:58 +00:00
95e14ac4d3 == Sequencer ==
Fixed output rescaling, when changing between preview proxy rendering
and final resolution.
2009-05-24 14:11:16 +00:00
ea94f8ab8a == Sequencer ==
This adds custom proxy file storage to the sequencer.
Reasoning: sometimes low resolution versions are already available as a
seperate file built by the capture application.
So there is no real reason to make blender build it's own seperate proxy.

This also somewhat fixes (aehm works around :) )
[#13632] Creating Proxy Takes Over Process, Should be Background

Since now you can just fire up ffmpeg to build your proxies in the background.
(You could have done before and build a directory of jpeg files, but then you
would have to rename all the files since otherwise things are off by one...)
2009-05-24 13:41:37 +00:00
ab407f6ac7 2.5
First version of region-scaling. WIP commit, so bear with me a while!

- All fixed sized regions have a small 'drag' widget, on the left or top.
  (not yet for free-sized regions, like 4-split).
- Mouse-over on widget changes cursor and allows drag.
- Click on widget hides/reveals.
- Fun for test; 3d view header, if high enough, draws more rows of
  buttons when width is too small.

The WIP stuff;
- It doesn't save yet in files, using the "minsize" variable of region
  definitions, also means other similar areas show same sizes now.
- Definitions for pref size, min/max will be added.
- Properties panel in Fcurve window draws widget on wrong place when
  hidden (subdiv system needs tweak)
- Widgets don't draw perfect yet, also needs further tweaks.

But, in general it's quite fun and usable. :) Many variatians are possible,
like for real tabs, or little icons, or just click-drag on edge.

The reason to first try the widget/tab variation:
- it re-uses the "Area Action Zone" code, widgets for layouting Screens
- it's visible, hotkey-only options for screen layouts are not preferred.
- distinguish clearly area-edges from region-edges this way. Having the
  cursor change shape on every edge (and block input) is probably annoying
  too... but that can be tested.

Later more!
2009-05-24 13:29:29 +00:00
e41eeaa045 BGE: renamed sensor type enum to avoid conflict with mingw (NEAR was causing the problem). 2009-05-24 12:53:49 +00:00
ef01c5bf0a 2.5 Buttons Code:
* Code Cleanup.
* Tiny layout changes.
* Added proper context for bone, curve, mesh and text objects. 

* Fixed Sun/Sky context.
2009-05-24 12:37:55 +00:00
83bb096f24 + renamed pad3 to m_contactProcessingThreshold (thanks Campbell Barton/ideasman for confirming it is ok to rename it)
+ fixed Python method, PyArg_ParseTuple already checks for errors, no returning of NULL, thanks Campbell too)
+ added linear/angular spring for each of the 6DOFs of a generic 6dof constraint.  This makes the generic 6dof constraint very versatile.
2009-05-24 06:31:47 +00:00
Dalai Felinto
45f2463c83 Patch #18815: BGE: More updates to deprecation documentation and 2.49 conversion script by Alex Frases(z0r)
- Fixed some deprecation warnings in documentation.
 - Added more conversions to script.
 - Added more attributes to script todo list.
 - Print out name of text buffer when encountering an error in batch mode.
 - Refactor: Simplified attribute map.
 - Added notImplemented function to print warnings for missing conversions. References documentation.
2009-05-24 04:45:10 +00:00
52b0a2b3db PhysicsConstraints.createConstraint:
allow to dynamically create rigid body constraints while disable collision detection between connected bodies, pass as 10th argument the flag 128

PhysiPython KX_ConstraintWrapper, setParam
export setParam(paramIndex,paramValue0,paramValue1) for Physics constraints
paramIndex 0,1,2 are linear limits, 3,4,5 are angular limits, 6,7,8 are linear motors, 9,10,11 are angular motors

For example:
disableConnectedBodies=128
cons = PhysicsConstraints.createConstraint(oid,rid,generic6dof,pivotInAx,pivotInAy,pivotInAz,angleX,angleY,angleZ,disableConnectedBodies)
#params 0,1,2 are linear limits, low,high value. if low > high then disable limit
cons.setParam(0,0,0)

I will provide an example .blend for Blender 2.49
2009-05-24 01:55:24 +00:00
4922dd0339 fix generic 6dof constraint support -> convert 3 values into euler angles and convert those into a full constraint frame
(same values as Rigid Body constraint Generic 6DOF values), and add 'setLimit' support for generic 6DOF constraint. todo: enableMotor
2009-05-24 00:42:40 +00:00
eb8c5f3272 Set default constraint solver mode more compatible to Blender 2.48 settings, this fixes rigid body stacking in this blend file:
http://blenderartists.org/forum/showpost.php?p=1382653&postcount=102

(todo: expose this setting in World setting GUI)

Expose contact processing threshold in Advanced GUI, next to rigid body margin, called CPT.
Default to 1, makes rigid body stacking a bit more stable, smaller values makes sliding easier (at the cost of easier jittering).
Disabled for 'dynamic' objects that don't rotate, because characters etc. always need smooth sliding.
2009-05-23 22:35:47 +00:00
a96ce9453f Minor fixes in Bullet/constraint solving
Should  make generic 6DOF constraint more useable, and rigid body stacking more stable (warmstarting was accidently switched off)
If time allows, a few more minor last-minute 2.49 fixes might follow.
Check out http://bulletphysics.com/constraintsTutorial.blend
2009-05-23 20:02:12 +00:00
2de8f6e328 == Sequencer ==
Fix for the fix: SDL_PauseAudio() doesn't really wait for callback to finish
which can lead to random segfaults if we set audio_scene to 0 afterwards.

So we don't do that.
2009-05-23 19:36:11 +00:00
5441323dca BGE: fix memleaks.
SCA_RandomActuator: The random generator was shared between replicas and not deleted. Added ref counting between replicas to allow deletion at the end.
KX_Camera: The scenegraph node was not deleted for temporary cameras (ImageMirror and shadow), causing 500 bytes leak per frame and per shadow light.
KX_GameActuator: Global dictionary buffer was not deleted after saving.
KX_MotionState: The motion state for compound child was not deleted
KX_ReplaceMeshActuator: The mesh was unnecessarily converted for each actuator and not deleted, causing large memleak.

After these fix, YoFrankie runs without memleak.
2009-05-23 14:46:43 +00:00
6d8d7cd768 BGE: Random sensor will produce true random sequence of events when seed is set to 0 in the GUI (the actual seed value is stored in the sensor seed attribute). Positive values will use fixed pseudo random sequence. 2009-05-23 14:40:36 +00:00
4e3248fb91 FIX memleak in mmap(). 2009-05-23 14:21:11 +00:00
3956a10deb 2.5 Buttons:
* Some Modifier layout cleanup.
* For fun: Added icons to the Render Buttons.
* small RNA Typo's
2009-05-23 11:19:18 +00:00
d141aff097 NLA SoC: Adding more backend code/utilities
* Data copying
* Strip sorting
2009-05-23 09:36:18 +00:00
443df708e2 == Sequencer ==
This fixes:
[#18373] WAV with IPO CURVE: Clicking in playback

by adding linear interpolation between frames. (Old IPOs were only calculated
once per frame which will lead to clicking on steep curves)
2009-05-23 07:37:02 +00:00
5b5d213290 * Updated a whole swag of excellent new icons by jendryzch.
This includes a bunch of new object primitive icons 
which would be great to get into the 'add object' menus, 
they're not there yet. The specific lamp data type icons 
are now used in the outliner though, which is very helpful.
2009-05-23 07:19:31 +00:00
380efe9dc4 Multires/2.5:
Added subdivide operator and button for multires.
Since this seems to be the only modifier with an operator defined, I'm not sure if I put it in a good place or not, someone can check on this?
2009-05-23 07:12:55 +00:00
3820e4f3db BGE PyController module reloading didnt check that the base of the function was a module (could be a class). 2009-05-23 04:56:37 +00:00
cfa2b4f0a5 [#18802] BGE conversion script: more attributes; updated GameTypes.py
Patch from Alex Fraser (z0r)

 - All attributes in the conversion map have been checked against the docs. More ambiguities have been resolved.
 - Added option to convert all text buffers in Blender.
 - Updated GameTypes.py: there were inconsistencies.

The script works well (causes no errors) with 0_FPS_Template.blend and vehicle_demo.blend from the
physics-2.43-physics-testfiles pack.

Caveats:
 - Conversions were checked against other deprecated attributes. I may have missed some cases where a deprecated attribute
has the same name as a non-deprecated attribute. I did catch a few though.
 - As with the last version, the conversion is purely text-based and doesn't compile the code. It's easy to create a
script that would break on conversion.

Still, it should get you 90% of the way to a converted script.
2009-05-23 03:19:47 +00:00
Ken Hughes
89049782de Python API
----------
Fix incorrect exception message.
2009-05-22 17:01:32 +00:00
1a69eab4a0 2.5
- Added new popup menu type, which can be used to pass on a
  running operator too. Needed it for debug menu, allowing to
  set variables outside of operator "first do then tweak" system. :)

  void uiPupBlockOperator()
  
  Don't forget to tell invoke() return that operator now runs modal!

- Test menu: alt+ctrl+d gives the G.rt debug value. 
  
  Values of 0-16 now can be used to shrink areas, stuff like this
  then happens (rt==4):
  http://download.blender.org/institute/rt5.jpg
  Was looking at ways to visually distinguish areas and regions
  better. Yes I know, cute rounded corners, etc. Just testing!
2009-05-22 15:02:32 +00:00
794826feae Update to the bolt/nut script, I also replaced some loops with list-comprehension and use mesh.transform(matrix) rather then transforming every vert in a loop.
V2.00 22/05/09 by Aaron Keith

- Better error checking.
- Lock Nut and Hex Nut meshes added.
- Pre-sets for common metric bolts and nuts.
- Improved GUI.
- Meshes scaled to a smaller size
- Fixed bug when using crest and root percent other than 10%
- Can now create meshes in Edit Mode.  This will add to the 
  current mesh and align with the current view.
2009-05-22 12:31:27 +00:00
5bc3bd7b06 2.5 Buttons:
* Added initial Texture Buttons by William Reynish. Thanks! 
Note: I did some code cleanup and fixes to the code. 

* Texture RNA fixes.
2009-05-22 12:07:03 +00:00
3b7f63a088 NLA SoC: File IO for new NLA Datatypes 2009-05-22 11:19:35 +00:00
66ed4325f4 the debug option for BGE scripts only reloaded modules but not packages submodules.
Now reload all the submodules too.

It was also hiding the error message if there was a syntax error which wasnt so helpful.
2009-05-22 09:48:05 +00:00
43fc5606cf 2.5
Fix in sliders; didn't notice the left part messed up :)
Another slider draw method to explore would be like this:

(<| -------- |>)

Would make it symmetrical, and visually matching number
buttons better. (the "<" is background color triangle,
without circle around it).
2009-05-22 09:09:07 +00:00
82bd674653 2.5 Buttons Modifier:
* Forgot to initialize the fluid function.
2009-05-22 07:41:36 +00:00
88f5c999f2 2.5 RNA:
* Added missing Subdivision Type Notifier.
2009-05-22 07:02:09 +00:00
Dalai Felinto
ec60c74f08 Fix for: energy IPO not supported in glsl mode (reported in the forum).
in fact I redid part of the last "fix", making it working properly now.

Before we were changing Lamp->la . This is the Blender Lamp, we shouldn't touch it.
So this part of the code is correct now.

Things that could be tackled:
- color attribute is returning negative values when NEGATIVE is toggled
- objects with no material (default gray one) still don't support lamp spots (not spot lamp but the spot of the lamps)
2009-05-22 06:12:18 +00:00
612f3b3266 Removed use of CrossVecs, DotVecs, CrossQuats and DotQuats
for all scripts except import_dxf and colladaImEx/translator.py
2009-05-22 03:45:46 +00:00
e191618cb5 - Deprecated Mathutils.CrossVecs(v1,v2) for v1.cross(v2), (same with .DotVecs -> v1.dot(v2), for CrossQuats and DotQuats too)
- Grouped Mathutils deprecated functions
- Dont include source code in bpy epydocs
2009-05-22 03:22:56 +00:00
9b1ce6e556 NLA SoC: Part 1 of NLA-Data Management API
In this commit:
* Added code for freeing NLA data now stored in AnimData
* Started writing some utilities for adding NLA data, especially the 'push-down' concept for Actions
* Cleanups of existing code - removal of obsolete NLA code from various places

Next commits/parts:
* File IO code for new-style NLA data
* Version patching for old data to new data
2009-05-22 01:16:26 +00:00
c671469bbb 2.5 Buttons Modifier:
* Converted all modifier to python layout engine. Needs a layout cleanup still.
* Removed corresponding C code (brecht: please check)
* 2 RNA Modifier fixes

* Added initial Mesh panel by William Reynish.
2009-05-21 21:23:36 +00:00
7f5acd6875 BGE remove parent: unparented object keeps the linear and angular velocity it had while being parented. 2009-05-21 19:38:49 +00:00
036ebc5523 BGE: GUI control over frame rate, logic rate, physics rate and physics subrate.
Four new buttons in World settings to control frame rate:
fps:  Nominal frame rate in frame per second.
      Also sets the physics timestep = 1/fps
phys: Maximum number of physics timestep per game frame in case
      the actual fps is less than nominal. This allows the 
      physics to keep up with real time even if the graphics slows
      down the game.
sub:  Fixed number of simulation substeps per physic timestep.
      Improves the precision of the physics simulation. Useful for
      fast moving objects for example.
log:  Maximum number of logic steps per game frame in case the 
      actual fps is less than nominal. This allows the logic
      system to follow the physics simulation. 
      Upper bound = phys 
      (setting the value higher than phys has no effect).
      On games with heavy logic system, it is useful to set this
      value to 1, to keep logic time under control.

All these values were already accessible from Python except phys:

GameLogic.getMaxPhysicsFrame():
	Gets the maximum number of physics frame per render frame.

GameLogic.setMaxPhysicsFrame(phys):
	Sets the maximum number of physics timestep that are executed per render frame.
	Higher value allows physics to keep up with realtime even if graphics slows down the game.
	Physics timestep is fixed and equal to 1/tickrate (see setLogicTicRate)
	maxphysics/ticrate is the maximum delay of the renderer that physics can compensate.
      phys: integer
2009-05-21 18:10:19 +00:00
d54126f78e rvk1_torvk2.py patch committed by jean-michel soler (jms)
[#18765] Update of the rvk1_torvk2.py bundled script:
The script has been modified to use the last management of the modifiers in the python api and corrected too. Now it
can copy the mesh object when it is alone and also a shape keys to the second one if needed.
2009-05-21 17:54:45 +00:00
c056b22a14 2.5
Simple UI script fix, wanted to check... works all nice. :)
For ui scripters: keep track of alignment flags!

("Border" button was aligned with above button)
2009-05-21 17:41:13 +00:00
34498f3870 2.5
Bugfix: In full-area screen mode, you cannot split windows again, the
full-area code is too primitive for that. Just disabled now.
(reported by Venom's Lab!)
2009-05-21 17:13:50 +00:00
aae27374f7 2.5
Interface draw fixes:

- Red cursor for text edit widget was in wrong location
- Selection for text edit widget too
- Number slider text edit was too far too the left
- Number slider 'fill' was drawing outside boundaries.
  (Matt: note I just interpolated rounding value :)
2009-05-21 17:09:06 +00:00
2ede3b6e23 2.5: warning fixes. 2009-05-21 15:36:16 +00:00
94902dac97 2.5 UI: Modifier Template
* template_modifier creates the modifier box, and returns a layout
  to put the buttons in.
* Only the armature modifier is now done with python code, all other
  modifiers use C code. To convert a modifier to python, remove the
  corresponding C code and create a function in DATA_PT_modifiers.
* Some modifiers still require some RNA work to get it working well,
  especially to make pointers editable. Mostly that is a matter of
  defining an own _set callback and put some of the modifier C code
  into it.
* Still various buttons that don't work, like for hooks or mesh
  deform binding.
* Fix for crashing decimate modifier (still disabled).

* Removed UI_BUT_NO_HILITE, HMENU.
* Make uiLayoutBox work with align.
2009-05-21 15:34:09 +00:00
1388beebdb build without SDL in GCC 4.4 2009-05-21 14:11:12 +00:00
65143c50e0 * Updated the Mac OS X blender and .blend file icons to support
the new (in 10.5) 512px icon standard.

Thanks to Samo 'xype' Korosec for the original graphic treatment!

http://mke3.net/blender/devel/2.5/hugeicon.jpg
2009-05-21 13:39:47 +00:00
99cb9a26b0 2.5
Animation playback back in control. And non-blocking still!

- Play follows the "Playback" options in TimeLine menu.
  Only the region 'windows' are drawn, not headers, toolbars,
  channel views, etc.
  The option "Buttons Window" also redraws property regions.
- The Timeline header always redraws, this to denote at least
  progressing frame numbers
- For now: if you choose to play 3D views, it also redraws 
  the TimeLine. Seems to be good convention, but probably
  better to add menu option for it?

- Fun test: while playback, change Playback options, works OK!

- New: top header button shows animation play status, and allows
  to stop playback

- New: Animation stop/start operator. Assigned to ALT+A. It has
  no options yet; just plays active region + all 3D windows now.
  Options will follow, based on reviews.
  Also ESC won't work for now, just press ALT+A again.
2009-05-21 13:33:04 +00:00
06a7155b68 BGE: user control to compound shape and setParent.
Compound shape control
======================
1) GUI control
It is now possible to control which child shape is added to 
a parent compound shape in the Physics buttons. The "Compound"
shape button becomes "Add to parent" on child objects and
determines whether the child shape is to be added to the top
parent compound shape when the game is stated.

Notes: * "Compound" is only available to top parent objects
         (objects without parent).
       * Nesting of compound shape is not possible: a child
         object with "Add to parent" button set will be added
         to the top parent compound shape, regardless of its
         position in the parent-child hierarchy and even if its
         immediate parent doesn't have the "Add to parent" button set.

2) runtime control
It is now possible to control the compound shape at runtime:
The SetParent actuator has a new "Compound" button that indicates
whether the object shape should be added to the compound shape
of the parent object, provided the parent has a compound shape
of course. If not, the object retain it's individual state
while parented.
Similarly, the KX_GameObject.setParent() python function has
a new compound parameter.

Notes: * When an object is dynamically added to a compound 
         shape, it looses temporarily all its physics capability
         to the benefit of the parent: it cannot register collisions
         and the characteristics of its shape are lost (ghost, sensor,
         dynamic, etc.). 
       * Nested compound shape is not supported: if the object
         being parented is already a compound shape, it is not
         added to the compound parent (as if the Compound option 
         was not set in the actuator or the setParent function).
       * To ensure compatibility with old blend files, the Blender
         subversion is changed to 2.48.5 and the old blend files
         are automatically converted to match the old behavior: 
         all children of a Compound object will have the "Add to
         parent" button set automatically.

Child ghost control
===================
It is now possible to control if an object should becomes ghost
or solid when parented. This is only applicable if the object
is not added to the parent compound shape (see above).
A new "Ghost" button is available on the SetParent actuator to 
that effect. Similarly the KX_GameObject.setParent() python function
has a new compound parameter.

Notes: * This option is not applicable to sensor objects: they stay
         ghost all the time.
       * Make sure the child object does not enter in collision with
         the parent shape when the Ghost option if off and the parent is
         dynamic: the collision creates a reaction force but the parent
         cannot escape the child, so the force builds up and produces
         eratic movements.
       * The collision capability of an ordinary object (dynamic or static)
         is limited when it is parented: it becomes automatically static
         and can only detect dynamic and sensor objects.
       * A sensor object retain its full collision capability when parented:
         it can detect static and dynamic object.

Python control
==============
KX_GameObject.setParent(parent,compound,ghost):
	Sets this object's parent. 
	Control the shape status with the optional compound and ghost parameters:
	compound=1: the object shape should be added to the parent compound shape (default)
	compound=0: the object should keep its individual shape. 
	In that case you can control if it should be ghost or not:
	ghost=1 if the object should be made ghost while parented (default)
	ghost=0 if the object should be solid while parented 
	Note: if the object type is sensor, it stays ghost regardless of ghost parameter
		
	parent: KX_GameObject reference or string (object name w/o OB prefix)
2009-05-21 13:32:15 +00:00
8013f6522e 2.5 Buttons:
* Some minor layout cleanup.
2009-05-21 11:10:34 +00:00
5fc6afe240 == Sequencer ==
This fixes:
[#18007] Audio playback of a scene strip containing audio is broken.

(needed a different recursion protection than video render code, since
video and audio render can be called simultaneously because of SDL audio thread
callbacks)

Also: we don't display a wait cursor, if the scene strip has DOSEQ enabled.
(no need to wait, it is the sequencer which is realtime by definition :)
2009-05-21 10:25:40 +00:00
b495e544a8 * removed some arbitrary range limits on property values
* turned some slider UI controls back into number fields

Note: Sliders should only be used when representing a property that's 
conceptually a percentage or ratio. For arbitrary numbers, use a number field.

For example, a lamp's energy can theoretically be anything - 0.1, 3.5, 125.0, it 
doesn't matter - it's just a number, not a percentage. So this should be a 
number field.
2009-05-21 07:40:43 +00:00
3f584de8ec [#18795] Subdivide Smooth can give wrong vcol
weights given by subdivide are not normalized, if that was fixed could avoid clamping.
2009-05-21 07:28:02 +00:00
3daa8bd4ef fix for [#18772] c3d_import script crashes
Patch from Roger Wickes update to 2.48 sFrame, eFrame, fps.


[#18794] GE API conversion script: 2.48 -> 2.49
patch from Alex Fraser (z0r), will test further in the next few days.
 --- 
This is text plug in and standalone script that updates Blender 2.48 Game Engine scripts to be compatible with the 2.49
API.

The script contains a mapping of attribute names to functions that do the conversion. Most of the mappings were extracted
from the documentation in GameTypes.py. Where the conversion is ambiguous, the script will not change the source except
to insert a warning as a comment. This means that the script does not completely automate the conversion process, but
will do a lot of the work.

The script still needs a fair bit of testing. Many of the mappings have not been tested and could result in broken scripts.
I'm submitting this patch now to start the review process early. I think I might need help if it is to be included in
2.49.
2009-05-20 23:31:58 +00:00
fcdb34f593 BGE #18664: Incorrect behavior for objects when unparented. A parented object is made static in all cases. 2009-05-20 21:34:50 +00:00
176a49d1ab Bug fix: the flags for brush rake/anchored were switched. 2009-05-20 18:37:28 +00:00
3cc2d61689 UI:
* Hide enable button in horizontal collapsed panels.
* Fix enable button not being in correct position when zooming.
* Fix n-key panels layout being messed up.
2009-05-20 17:18:48 +00:00
3e49545891 Fix the fix ;)
Only check for type because ptr.data can be NULL and
ptr.type not.
2009-05-20 17:18:47 +00:00
d5a4a57e5c 2.5
Node editor:
- Crash could occur on ALT+LMB remove link lines (read free'd mem)
- Button labels were handled as full buttons, disabling node usage
  quite a lot, like drag, select, or create links.
  (Caused by making all node labels buttons)

Brecht: old UI_NO_HILITE can be depricated, it was for bad overdraw
issues. I guess it's OK to not handle Label buttons at all...
2009-05-20 16:55:28 +00:00
34aaa18af2 2.5 Buttons:
* More button tweaks by William Reynish. Thanks!
2009-05-20 16:24:04 +00:00
6294510504 2.5
Fixes:

- Render (F12) would choose the (hidden) info window in cases, disabled
  that.
- Browsing ID's (like Image in Image editor) failed when no ID was
  assigned yet.
2009-05-20 16:23:55 +00:00
8407c94f0b Fix segfault on Outliner.
Try to expand the RNA tree in Outliner -> User Preference crash blender.

RNA_struct_idproperties was not checking if ptr.data is NULL
and always try to access the properties type information.

Note: brecht double check this.
2009-05-20 15:59:57 +00:00
240ee1104c 2.5 UI:
* Added missing buttons validation for Modifier Tab.
2009-05-20 15:33:28 +00:00
a06caced79 2.5
Colorband (ramp) buttons back (now only in Node editor)
2009-05-20 15:20:24 +00:00
d6f71875bd 2.5
Undid fix from matt to prevent tog button alignment, this is not
working that way... made UI look very bad (like layer buttons)

The new code has 'toggle' and 'option' button types, with the
latter being the new style, and first for icon rows, layers, etc.

Purpose is that RNA or py api would allow to distinguish.
2009-05-20 14:47:48 +00:00
0a13c162b1 UI: added support for enable buttons in the panel header. 2009-05-20 14:46:49 +00:00
8f620ea5f0 2.5
- Made Normal (Sphere) button draw with nice AA
  (check in node editor)
- Bugfix in alignment code, collumns were not drawing OK
- Picker buttons draw swatches again, and made them work.
2009-05-20 14:32:15 +00:00
2e91f1b155 Assorted UI tweaks/cleanups 2009-05-20 13:56:22 +00:00
a47c673b55 2.5 Material:
* Added material "type" property, with Surface/Volume/Halo
  options, compatible with sim_physics, as requested for
  material buttons layout. Obviously the Volume setting
  does nothing currently.
* Deprecated MA_HALO flag in favor of this.
2009-05-20 13:34:04 +00:00
ac0766c64b Fix for [#18785] Crash rendering hair particle system 2009-05-20 12:13:37 +00:00
56b726917d 2.5
Fix: Node Editor backdrop drawing messed up viewport, making drawing of
UI elements not pixel accurate anymore.
2009-05-20 11:07:34 +00:00
f1286b15a3 RNA:
* Any Struct can now have ID properties, by creating a callback
  function to create/return an IDProperty.
* Wrapped PoseChannel ID properties.
* Note there is still no way to create ID Properties in 2.5, though
  the callback to get/create the initial group is now exposed through
  RNA_struct_idproperties.
2009-05-20 09:52:02 +00:00
d80911b867 RNA: ID properties were not being shown as RNA properties anymore, fixed.
Python: fix two warnings (initialize to NULL).
2009-05-20 09:17:21 +00:00
c0844b7938 BGE logic patch: fix another incompatibility with YF.
Previous patch was not sorting the state actuators. This was causing 
some problems with YoFrankie that relies on the order of actuators
when multiple state actuators are activated at once.

Active state actuators will now be sorted per object. This doesn't
change the fact that state actuators are executed before all other
actuators as before.

Incidently, made the logic loop faster.
2009-05-20 08:45:42 +00:00
a1cc5ef8eb fix for crash drawing the UI, normally this would cause a memory leak but for some reason it crashed with py2.6 and not 3.1. 2009-05-20 05:35:53 +00:00
Dalai Felinto
dc6ae673b1 Moving ScreenSpace methods from Rasterizer to KX_Camera (getScreenPos, getScreenVect, getScreenRay)
The modules were moved in order to access the camera internal matrixes. It will make then compatible with multiple viewports in a near future.
So far the problem I found was:
1) KX_Camera doesn't store the canvas viewport
2) RAS_ICanvas methods: GetDisplayArea and GetWindowArea are affected by multiple viewports (and they shouldn't).

Test file is here: http://www.pasteall.org/blend/68
2009-05-20 05:33:39 +00:00
fc9f893306 remove module that was never used. 2009-05-20 03:30:50 +00:00
42b5e49589 please dont mix tabs and spaces, failed with python 3.1 2009-05-20 02:17:53 +00:00
73904597e9 - Added an intro page for the BGE docs rather then using GameLogic
- Added notes on BGE stability and modules
- updated some examples to new api syntax
- include BGL Mathutils and Geometry modules in docs
2009-05-20 01:11:56 +00:00
40ae17d2f6 UI
* Fix buttons jumping around when resizing and zoom. Part of this was
  adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
  rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels.  V2D_LOCKOFS_X/Y is
  now taken into account in more places in the view2d code, to avoid
  zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).

* View3D/Graph/Image editors now use the same PanelType system as the
  buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.

* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
  object instead.
* Fix autotexspace -> auto_texspace in py script.
2009-05-19 17:13:33 +00:00
861398542f 2.5 Buttons:
* Some scene panel layout tweaks by William Reynish (Billrey). Thanks!
2009-05-19 16:23:18 +00:00
ecacef3682 Last minute mini feature:
Expanded the "10-timer" (ALT+CTRL+T) with two new test options:

- Draw entire window
- Anim step

The latter will only call animation system, no drawing.
Added this to match the testing menu in 2.5 too, so we can get good
reference performance tests.
2009-05-19 15:40:03 +00:00
2a055ca728 2.5:
* Added new modifier tab.
* Fixed problems when no object was selected after delete.

* Added initial Armature, Bone, Curve and Font panels, by William Reynish (Billrey). Thanks!
* Small RNA changes

* Commit revision 20240 and 20268 from trunk. ("Mouse wheel zoom lost after rendering.")
2009-05-19 15:38:36 +00:00
1b6bfa6b8a 2.5
Added new entry in 10-timer: 'Anim Step'. This will only call the
animation system itself, no drawing.
2009-05-19 15:37:50 +00:00
17d0c0917e 2.5
Brought back the "Ten Timer" test, a useful debugging utility
to keep track of drawing speed. Currently assigned like 2.4x to
ALT+CTRL+T

Added new option to also test speed of drawing entire Window.
2009-05-19 12:54:54 +00:00
1a16fb1953 BGE Py API
use PY_SET_ATTR_FAIL and PY_SET_ATTR_SUCCESS return values so the fake subclassing can know if a value failed to be set or if it was missing from the type. (with PY_SET_ATTR_MISSING)

Also noticed some other mistakes.
- KX_LightObject, setting the type didnt check for an int.
- KX_SoundActuator, didnt return an error when assigning an invalid orientation value
- KX_GameObject, worldOrientation didnt return an error value.
2009-05-19 07:16:40 +00:00
5bd4b25dd1 BGE bug #18762 fixed: softbody. An incompatibility between the soft body deformer and other types of deformer was causing the soft body to disappear in the game. This was the case when the soft body had an armature or simply vertex groups. 2009-05-19 06:48:36 +00:00
def33757e3 recorded game physics ipo's also have the same problem FBX export had with eulers rotations
http://www.graphicall.org/ftp/ideasman42/game_euler.png

- dont calculate handles for key added (it does them all at the end).
- was doing twice the number of curve lookup's per frame as was needed.
- test handles function that runs at the end was converting to ipo transformation values for no reason.
- when adding new curves set them to linear interpolation.
2009-05-19 05:07:52 +00:00
2ac81cc7ad BGE soft body: give access to the soft body collision margin in the Advanced panel. By default the collision margin is set to 0.25, which causes the soft body to somewhat float above the ground. You can decrease this value to get more realistic collision. Note that the algorithm may become unstable with lower margin. 2009-05-18 21:32:03 +00:00
Dalai Felinto
379f02f6e6 CMake + MSVC debug build fix
Initializing lResult = 0;
and removing NOP (if(!lResult) lResult = 0;

That was discussed with Genscher and Benoit in IRC.
2009-05-18 21:05:21 +00:00
Dalai Felinto
d35a556d66 Bug fix for: [#18761] GLSL Negative light option in Blender does not work in the GE 2009-05-18 20:23:38 +00:00
96348bc772 Commit revision 20062 and 20109 from trunk, also fix a small memory
error on interface, was try to free an incorrect pointer.
2009-05-18 19:47:04 +00:00
4022380dc6 2.5 UI:
* Added new Buttons Tab "Bone" for Armature objects. 
* Validation of buttons selection, when object selection is changed.

* added missing notifier for camera type and small layout change to the panel.
* more shading color changes for menu and checkbox.
2009-05-18 18:20:29 +00:00
0cd511eee8 2.5
Text drawing in 3D window fixed, using BLF default font (yes, nice AA'ed
fonts too :)

Solved it by gathering all strings that needs to be drawn for an object,
and then draw in end of object drawing, in pixelspace. Also cleaned up
some of the code for projecting 3d coords, much nicer now (mat stored in
region-view3d)
2009-05-18 16:42:34 +00:00
9c8f09d2a0 bug in copy weight group since 2.44, accessing free'd memory. 2009-05-18 14:20:16 +00:00
65bd48c896 [#18778] Lattice Vertex Groups Don't get deleted
fixed 'Copy Group' for lattice too.
2009-05-18 11:15:24 +00:00
b1a393e815 Bugfix #18733 & #18609 (revisited)
New imbuf scaling code, advertised as "quick and quality" gave
inacceptable noise and rounding errors. 

Check this bugreport for images that show it well:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=18609&group_id=9

For release, better disable this code and fall back on perfectly
working old code. :)
2009-05-18 10:34:26 +00:00
cb96dc40e8 Sensor objects were initialized as invisible, which conflicted with initializing the invisible setting from the outliner render object (which it seems nobody knew about).
Added an 'Invisible' button to make this more clear, it seems like a display option but its also related to logic because the actuators can toggle this after the game starts.

Without this its annoying to add UV's only to set the invisible flag.

Sensor objects were not clearing the softbody gameflag
2009-05-18 10:27:09 +00:00
07fc2aa526 BGE #18665: Servo control and relative motion
Servo control motion actuator did not work as expected when the object
is moving on a moving platform. 

This patch introduces a new Ref field in the servo motion actuator
to set a reference object for the velocity calculation.
You can set the object during the game using the actuator "reference"
attribute; use an object name or an object reference.

The servo controller takes into account the angular velocity of the
reference object to compute the relative local velocity.
2009-05-18 08:22:51 +00:00
3bda88babf cmake: apply patch to link with correct python library in win32 debug mode. 2009-05-18 07:53:13 +00:00
bd7b92bfb5 Need to export the mesh-object into the bind-pose otherwise Maya complains the FBX has errors. 2009-05-18 04:33:33 +00:00
5a16f0b60c Bugfix for FBX export for animations
in 2.48 constant interpolations meant that wasnt a problem but since it now uses linear interp. you can notice errors with animated characters because the 2 eulers are not compatible.

Added optional euler_compat argument to matrix.toEuler(eul) and quat.toEuler(eul) so when getting the euler rotations from a list of matrices the animation curve will be continues.
Also added euler.makeCompatible(euler).

- warning silenced for imagepaint.c
2009-05-18 04:11:54 +00:00
d128e16561 2.5 - Bones can now have custom properties (as ID-Props)
Still need to find a way to enable RNA access for these though, since RNA access to ID-Props stored in data seems to be broken...
2009-05-18 02:25:33 +00:00
e67e7049f9 Graph Editor: Attempts at Improving Curve Drawing
* Trying a slightly different approach with curve drawing. Now curves aren't drawn darker down the list, as that approach proved to have massive contrast issues all around. However, it's not completely back to the old rainbow style, as the colours are still grouped in 3's and 4's, only that they now use hue offsets...

* Unselected curves are now drawn less opaque. However, selected curves still leave some brightness to be desired... 

* Bugfix - Deselecting keyframes in graph view now deselects the curves too.
2009-05-18 02:23:20 +00:00
9a40f4d2a6 BGE: bookmark option on controller to make them run before all other controllers.
A new bookmark button is available on the controller UI. 
When set, the controller is guaranteed to execute before all
other non-bookmarked controllers, provided it is scheduled 
for execution. 

This is useful for initialization scripts that run once at startup or
scripts that must set some prerequisite for the other controllers at
the start of each logic frame.

This feature is also available at python level with the "bookmark"
attribute. It can be changed during the game.

Note that if several script are bookmarked, their relative order of 
execution is not guaranteed. Make sure they don't depend on each other.
2009-05-17 21:50:31 +00:00
Dalai Felinto
9ce8a67690 BGE Dome: removing of size option and adding tilt option.
- Size adjustments can be accomplished with warp mesh data now. So we get a free spot in the GUI for a tilt option.

- Tilt option to tilt the camera (for planetarium domes).
Angle is in degree from -180 to +180. It's needed for planetarium domes (as this one http://domejunky.blogspot.com/2009/05/dome-corrected-bge.html ).

- This is the last commit regarding dome code I expected to 2.49. I consider this feature full implemented now. (working on docs now)
2009-05-17 20:37:13 +00:00
41acd3b81c While testing YoFrankie with the new API attributes found some issues...
- corrections to docs
- disallow calling controller.activate(actuator) when the controller is not active. (Raise a SystemError)
- Added 2 new attributes, CValue.name - deprecates CValue.getName(), KX_GameObject.children deprecated KX_GameObject.getChildren(), (same for getChildrenRecursive()).
2009-05-17 16:30:18 +00:00
7eeb8ac01c Color proofing support with lcms (http://www.littlecms.com/).
Enable with WITH_LCMS (options have been added for scons).
lcms is very common on linux package managers, so no need to add in extern (IMHO). Libs for windows can be added to /lib

Code is mostly a proof of concept with hardcoded path for icc profile (taken from the lcms test suite).

Adding this now to svn so it doesn't rot on my hard drive. People interested in pushing it forward should feel free to dig in the code or poke me about it.
2009-05-17 16:19:13 +00:00
351086dbb8 Don't create or truncate file when checking for writeable.
That was a nasty bug, would truncate current image file on disk when opening menu to load a new one.
2009-05-17 16:10:39 +00:00
65796e2c07 Patch #18758 for bug #17423 by Matt D. (foom) Thanks!
"Mouse wheel zoom lost after rendering."
2009-05-17 15:09:03 +00:00
3ea1c1b4b6 BGE: new sensor object to generalize Near and Radar sensor, static-static collision capbility.
A new type of "Sensor" physics object is available in the GE for advanced
collision management. It's called Sensor for its similarities with the
physics objects that underlie the Near and Radar sensors.
Like the Near and Radar object it is:
- static and ghost
- invisible by default
- always active to ensure correct collision detection
- capable of detecting both static and dynamic objects
- ignoring collision with their parent
- capable of broadphase filtering based on:
  * Actor option: the collisioning object must have the Actor flag set to be detected
  * property/material: as specified in the collision sensors attached to it
  Broadphase filtering is important for performance reason: the collision points
  will be computed only for the objects that pass the broahphase filter.
- automatically removed from the simulation when no collision sensor is active on it

Unlike the Near and Radar object it can:
- take any shape, including triangle mesh
- be made visible for debugging (just use the Visible actuator)
- have multiple collision sensors using it

Other than that, the sensor objects are ordinary objects. You can move them
freely or parent them. When parented to a dynamic object, they can provide
advanced collision control to this object.

The type of collision capability depends on the shape:
- box, sphere, cylinder, cone, convex hull provide volume detection.
- triangle mesh provides surface detection but you can give some volume
  to the suface by increasing the margin in the Advanced Settings panel.
  The margin applies on both sides of the surface.

Performance tip:
- Sensor objects perform better than Near and Radar: they do less synchronizations
  because of the Scenegraph optimizations and they can have multiple collision sensors
  on them (with different property filtering for example).
- Always prefer simple shape (box, sphere) to complex shape whenever possible.
- Always use broadphase filtering (avoid collision sensor with empty propery/material)
- Use collision sensor only when you need them. When no collision sensor is active
  on the sensor object, it is removed from the simulation and consume no CPU.

Known limitations:
- When running Blender in debug mode, you will see one warning line of the console:
  "warning btCollisionDispatcher::needsCollision: static-static collision!"
  In release mode this message is not printed.
- Collision margin has no effect on sphere, cone and cylinder shape.

Other performance improvements:
- Remove unnecessary interpolation for Near and Radar objects and by extension
  sensor objects.
- Use direct matrix copy instead of quaternion to synchronize orientation.

Other bug fix:
- Fix Near/Radar position error on newly activated objects. This was causing
  several detection problems in YoFrankie
- Fix margin not passed correctly to gImpact shape.
- Disable force/velocity actions on static objects
2009-05-17 12:51:51 +00:00
96aa60cee3 cmake: apply ADD_SUBDIR patch. 2009-05-17 12:25:06 +00:00
d4116adf11 Bugfix #18676
Texture "map to" Ambient did work now (previous fix) but not for
ambient occlusion yet.
2009-05-17 10:30:13 +00:00
6dad6bb9bf Bugfix #18756
Texture nodes: on file load, the preview render signal was ignored.
Found out it ignores it all the way, inserting refreshes all over, not
using the 'afterqueue'. Will live with that for now, in 2.5 it's nicer
supported anyway.

Just added another refresh line on the proper signal to make it look nice
on file loads.
2009-05-17 09:56:48 +00:00
20042dbba5 2.5 Buttons:
* New scene buttons layout.
* Minor changes in object buttons and scene RNA.
2009-05-17 09:25:30 +00:00
1588bf4dbd 2.5 - 2 Bugfixes:
* Long Keyframes get shown again in DopeSheet. Some theme cleanouts cleared the theme colours for these.
* An error is now presented when there are problems trying to resolve a path to keyframe some settings now (instead of silently giving up).
2009-05-17 06:57:48 +00:00
cd3e447bb8 Same tooltip whether snap button is press or not (it used to have a different one when turned on). 2009-05-16 23:47:17 +00:00
d1f71a3456 Bugfix: Changing ShadowBufferSize didn't update 3d view - reported by nudelZ via IRC (simple update call was missing) 2009-05-16 21:16:04 +00:00
aaa96cde65 2.5 UI:
*changed the 3d-view grid color, it was very difficult to see the difference between grid and background in orthographic view. 

*changed the radio buttons shading a bit.
2009-05-16 17:30:13 +00:00
71586623d9 2.5
Make GE compile again, it still called old BMF_font
2009-05-16 13:56:40 +00:00
10ed9a4f64 setting up the BGE Python sys.path for importing modules wasnt working for library paths. 2009-05-16 13:19:23 +00:00
ffbd75e571 * Fix for simple bug in voxel data texture 2009-05-16 13:17:21 +00:00
0f933eb847 * Fix for another OpenAL compile error on MSVC. 2009-05-16 12:56:09 +00:00
b063d2f621 replace Py_BuildValue("OOO", Py_None, Py_None, Py_None) with a function that makes and fills the tuple,
since some scripts call rayCast many times in a single logic tick,
contrived benchmark shows this to be about 20% faster.
2009-05-16 06:57:38 +00:00
cebf6cb22d NLA SoC: Code for basic evaluation of NLA strips done
In theory, actions can now be evaluated in NLA, though in practice, we don't have an NLA Editor to create data to use this yet! Next up, transitions...

Some notes:
* Recoded the way the 'accumulation' methods work (i.e. blend, add, etc.), adding a few new ones. It should now be more obvious how these work.
* Some assorted code cleanups done too (removing unneeded vars/args)
2009-05-16 01:00:41 +00:00
006ad4aaac BGE Py API Bugfixes
KX_GameObject.getVelocity() would set an error but nor return an error value when an non vector argument was given.
KX_PythonSeq_Type was not initialized with PyType_Ready which could crash blender when inspecting the type.
2009-05-16 00:49:28 +00:00
Ken Hughes
83006e51f8 Scripts
-------
Fix some typos in script tooltips and descriptions-- no code changes.
2009-05-15 21:27:13 +00:00
ef8f92ffe6 BGE: fix a compatibility problem since logic patch with YoFrankie (and other games I guess). State actuators will now execute before any other actuators to make sure that the actuators link count are up to date when they execute. 2009-05-15 20:51:32 +00:00
58db6df069 * Fix for compile error on MSVC.
* Remove alut from makefiles and cmake.
2009-05-15 18:21:27 +00:00
120ef02027 2.5 Buttons:
* Cleanup of scene, lamp and camera panels.

* Small RNA lamp changes.
2009-05-15 16:24:08 +00:00
070f32f778 NLA Branch: Merge from 2.5 20116:20214 2009-05-15 13:35:29 +00:00
e295cfd4d5 NLA Branch: Setting up evaluation system for action strips
* Refactored F-Curve Modifier stack evaluation into functions which can be reused for F-Curve Modifiers on NLA-Strips 
* Started setting up temporary accumulation buffer system for use when evaluating strips
2009-05-15 13:23:03 +00:00
009dea9577 Bug/patch #18714: fix game engine sound on OS X Intel, patch by
Ken Hursh and myself.

* Get rid of dependency on ALUT. It is really only used to
  load a WAV file, and apparently crashing doing so on OS X Intel,
  (perhaps due to endian issues?). There was already own code
  for doing this on some system, so now it uses that. That code
  had it's own endian issues which are now fixed, along with
  better checks to avoid crashing on corrupt or unsupported files.

* Also get rid of some unecessarily complicate #ifdefs.

* According to the bug report OS X Intel OpenAL only works with
  static openal linking still (WITH_BF_STATICOPENAL for scons).
2009-05-15 12:34:01 +00:00
b4d46e5ded UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
  This means the layout engine now works at button level, and makes it
  easier to write templates. Otherwise you had to store all info and
  create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
  These can contain regular buttons, and can be put in a Free layout,
  which means you can specify manual coordinates, but still get nested
  correct inside other layouts.

* API was changed to allow better nesting. Previously items were added
  in the last added layout specifier, i.e. one level up in the layout
  hierarchy. This doesn't work well in always, so now when creating things
  like rows or columns it always returns a layout which you have to add
  the items in. All py scripts were updated to follow this.

* Computing the layout now goes in two passes, first estimating the
  required width/height of all nested layouts, and then in the second
  pass using the results of that to decide on the actual locations.

* Enum and array buttons now follow the direction of the layout, i.e.
  they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
  RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
  opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
  row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
  buttons).

* Moved some more space variables into Style.
2009-05-15 11:19:59 +00:00
b8657fd648 Name attributes added since 2.48a more consistently.
BL_ActionActuator::blendin -> blendIn
BL_ActionActuator::end -> frameEnd
BL_ActionActuator::property -> propName
BL_ActionActuator::start -> frameStart
BL_ActionActuator::type -> mode
BL_ShapeActionActuator::blendin -> blendIn
BL_ShapeActionActuator::end -> frameEnd
BL_ShapeActionActuator::frameProperty -> framePropName
BL_ShapeActionActuator::property -> propName
BL_ShapeActionActuator::start -> frameStart
BL_ShapeActionActuator::type -> mode
KX_CameraActuator::xy -> useXY
KX_ConstraintActuator::property -> propName
KX_GameActuator::file -> fileName
KX_GameObject::localScaling -> localScaling
KX_GameObject::worldScaling -> worldScaling
KX_IpoActuator::endFrame -> frameEnd
KX_IpoActuator::startFrame -> frameStart
KX_IpoActuator::type -> mode
KX_RaySensor::property -> propName
KX_SCA_DynamicActuator::operation -> mode
KX_Scene::objects_inactive -> objectsInactive
KX_SoundActuator::filename -> fileName
KX_SoundActuator::type -> mode
KX_TouchSensor::objectHit -> hitObject
KX_TouchSensor::objectHitList -> hitObjectList
KX_TouchSensor::property -> propName
KX_TouchSensor::pulseCollisions -> usePulseCollision
KX_VisibilityActuator::occlusion -> useOcclusion
KX_VisibilityActuator::recursion -> useRecursion
SCA_2DFilterActuator::passNb -> passNumber
SCA_PropertyActuator::property -> propName
SCA_PropertyActuator::type -> mode
SCA_PropertySensor::property -> propName
SCA_PropertySensor::type -> mode
SCA_RandomActuator::property -> propName
2009-05-15 03:26:53 +00:00
e8c0440660 minor change - mistake in joystick fix, util function for getting attrs from BGE types 2009-05-15 02:03:27 +00:00
0e423e5bb6 BGE PyAPI
[#18701] Issues with camera.pointInsideFrustum method
- note in docs that the projection matrix is not correct for first logic tick.

Renamed...
KX_Camera.isViewport -> KX_Camera.useViewport
KX_Lamp.quat_attenuation -> KX_Lamp.quad_attenuation

Deprecated KX_Camera.getProjectionMatrix(), KX_Camera.setProjectionMatrix() for projection_matrix attr

Added most missing docs reported by the doc-checker script
2009-05-14 23:06:05 +00:00
a20a2ebb9f [#18749] BGE: Crash on joysticksensor.getAxisValue()
negative index would be used when the joystick was not found, crashing python api, initialize these as 0 now.
2009-05-14 21:06:48 +00:00
2df94626c4 2.5:
* Renamed Local Lamp to Point Lamp, as discussed in IRC.
* Small layout changes to the lamp panel.
2009-05-14 19:41:45 +00:00
aee6d32005 Fix makefile for file browser. 2009-05-14 19:18:00 +00:00
978dce4266 Fix snapping bug in 2.5 2009-05-14 19:08:15 +00:00
2ae34a9816 2.5 compile errors.
Wrong include name (lower case) and missing include folder in scons.
2009-05-14 18:54:41 +00:00
23251ba286 Fix for bug #18622
Snapping has to be reinit after changing mode during transform.

Needs to be fixed in 2.5 too, but a tad differently.
2009-05-14 18:32:27 +00:00
ba6bec56f9 2.5 filebrowser
- drawing code cleanup
- use of BLF_font in own string drawing, needs to be aligned with uiStyles still.
- thumbnail scaling now done on graphics card via new glaDrawPixelsTexScaled (slightly modified glaDrawPixelsTex)
2009-05-14 18:08:14 +00:00
d95a109990 BGE modifier: generate correct physic shape, share static derived mesh, share display list.
This commit completes the support for modifiers in the BGE.
- The physic shape is generated according to the derived mesh. 
  This is true for all types of shapes and all types of 
  objects except soft body.
- Optimization for static derived mesh (mesh with modifiers
  but no armature and no shape keys). Replicas will share
  the derived mesh and the display list: less memory and
  faster rendering. With this optimization, the static 
  derived mesh will render as fast as if the modifiers were
  applied.

Known Limits:
- Sharing of mesh and display list is only possible between
  in-game replicas or dupligroup. If you want to instantiate
  multiple objects with modifiers, use dupligroup to ensure
  best memory and GPU utilization.
- rayCast() will interact with the derived mesh as follow:
  Hit position and hit normal are the real values according
  to the derived mesh but the KX_PolyProxy object refers to
  the original mesh. You should use it only to retrieve the
  material.
- Dynamic derived mesh have very poor performance:
  They use direct openGL calls for rendering (no support
  for display list and vertex array) and they dont't share
  the derived mesh memory. Always apply modifiers on dynamic
  mesh for best performance.
- Time dependent modifiers are not supported.
- Modifiers are not supported for Bullet soft body.
2009-05-14 13:47:08 +00:00
0035345136 Bugfix, sorta :)
Removed option to choose rendering to yafray. New yafaray is better, and
already is being linked as option on the blender.org download page.
2009-05-14 12:36:07 +00:00
34f99fa4b9 Bugfix #18743
Render: raytracing materials with transp-shadow + SSS crashed
2009-05-14 11:36:52 +00:00
a1e73e55c7 updated BGE doc checker script for classes now being in GameTypes.py 2009-05-14 10:59:38 +00:00
a74d2574ee Bugfix #18725
Particles using group-duplication, with Metaballs in group, enter eternal
loop in our code now. This is a non-supported case... metaball code doesn't
support recursions. Added a provision in code to catch this case, and print
an error in console to denote this.
2009-05-14 09:32:47 +00:00
d257586fe6 BGE Py API
scene.active_camera can now be set so you can more easily set the current camera from python scripts without using an actuator.
ConvertPythonToCamera utility function to get a camera from a python string or KX_Camera type.
2009-05-14 07:59:44 +00:00
d2cff7307d [#18685] dark pixels created when during texture "full baking"
fix/workaround - offset by a 500th of a pixel to avoid baking missing pixels that are between 2 faces, its still possible pixels could be between faces but much less likely then it is currently with pixel aligned UVs.
2009-05-14 02:21:50 +00:00
5f78efe19c print warnings when python attributes and methods conflict with game properties. 2009-05-14 00:10:25 +00:00
240aa6d34d * More updates to game engine type docs from Roelf de Kock
* FBX Bugfix, was exporting all animation curves as 'Constant' type (no docs for this so could only guess), Thanks to Sander Brandenburg for spotting this problem.
Also improved keyframe removal to work on animation curves an angle
2009-05-13 22:52:31 +00:00
c7519789b8 BGE: 1-liner patch to put the Always sensor in non pulse mode by default. I've seen enough games with Always sensors in pulse mode while they should not; this patch should prevent this common mistake. 2009-05-13 17:02:39 +00:00
f5bacc6c8a BGE API cleanup: motion actuator. Apply patch from Moguri. 2009-05-13 16:48:33 +00:00
Ken Hughes
77f321d15f Python API
----------
Fix problem with ShrinkWrap PROJECT_OVER_NORMAL setting.
2009-05-13 15:41:33 +00:00
df1879783a use epy deprecated field and link to attributes 2009-05-13 12:26:54 +00:00
24f326fb01 Moved game engine types into GameTypes.py because every type put into a module giving lots of references to KX_GameObject.KX_GameObject and having to write in links like L{CListValue<CListValue.CListValue>}.
Looked into ways around this but epydoc has no way to import a class without its module and the @include field is maked as 'TODO'.

Also removed the outdated 'WhatsNew' section and linked to the 2.49 release notes.
2009-05-13 10:15:19 +00:00
b22605c4df BGE #18691: Blenderplayer fullscreen messes up desktop on OS X Leopard. Applied patch #18705 by sbn. I cannot compile osx but the patch seems perfectly alright to me. Can OSX users confirm that it compiles well on the various OSX version? 2009-05-13 06:53:21 +00:00
82b4975ccf BGE #18732: Python Light options don't work with GLSL materials. Commited patch from dfelinto and moguri, thanks for the good work. 2009-05-13 06:42:15 +00:00
c19baf85cc [#18694] Added support for Wavefront OBJ groups for both the import and export scripts
from Paolo Ciccone (pciccone) 

Im not that keen on this functionality since vertex groups in blender are for weight painting and OBJ's groups are more like sub-objects, The conversion between these is a poor approximation (one vertex group per face).
But this is still useful for using blender with poser so accepting these 2 patches.

Made some changes from the patch
*Export*
- vgroup off by default, since this is mainly useful for corner cases
- findVertexGroupName() - changed how exporting selects a vertex group for a face, use the highest combind weight for each group instead of  the number of checking how many times the verts are in a group because they could have a zero weight.
- findVertexGroupName() - would fail if a faces verts were not in any groups, now return a (null) group
- Allow modifiers to export with vgroups

*Import*
- disable by default
- ignore (null) groups
- fixed a problem where the patch broke SPLIT_GROUPS
- move the group definition out of global namespace, breaks importing as a module.

--- Patch submission info
The import/export scripts included with Blender 2.48 don't save/preserve groups defined in OBJ file. This presents a
couple of issues: users loading an obj file with groups are not able to use a rather important set of data. When the
file is then saved the groups are lost bringing up both the issue of data loss and loss of functionality as groups are
used for rigging and morph target creation for Poser/DAZ Studio and all compatible applications. Of course other
animation/modeling packages that use OBJ files might be affected.

The solution that I present here simply patches the excellent python scripts written by Campbell Barton and Jiri Hnidek.
The new code implements the preservation of groups by creating Blender vertex groups during import and by re-writing
those groups in the OBJ file during export. Of course group ownership is idetermined at the face/polygon level and not
at the vertex level.

This rather simple solution makes Blender instantly one of the better tools to create Poser Morph targets (Full Body
Morphs) and conforming figures and clothing.  Of course it's also adding a more complete support for the whole OBJ spec.

The patches are fitting well inside the established logic, have a minimal impact and are totally transparent to the
user. See the attached video (about 7 minutes long) for more details.

I noticed that the original scripts are formatted with tabs. I think it would be a good idea to follow the standard
Python recommendation and convert the scripts to use spaces. I didn't want to do it on my side as it would generate
a patch that replaces the whole file, not something that I wanted to do with my first submission :) But it would help
if people with access to SVN could do it.

Here is a short video that demonstrates the updates:
http://www.paolociccone.com/blender_obj_scripts.html

Cheers!
----
2009-05-13 00:20:14 +00:00
9147124ac2 Mixed declaration and code. That should teach me to ignore warnings. 2009-05-12 23:53:55 +00:00
f790744faf Fix crash when missing int argument for -s -e and -j. 2009-05-12 23:41:46 +00:00
a70440d918 [#18735] Particle vertex group API for Python
from Alberto Santos (dnakhain)

Changed "None" to "" for returning an unset vertex group.
"" is a valid name for a vertex group this is asking for trouble.
2009-05-12 21:41:04 +00:00
3c0f6b65fb [#18711] Particle render API for Python
from Alberto Santos (dnakhain)
2009-05-12 21:27:01 +00:00
7d923df2bf [#18728] Particle (newtonian) physics API for Python
patch from Alberto Santos (dnakhain)
2009-05-12 21:13:29 +00:00
5a0de728b0 BGE performance: allow to create display list on meshes with modifiers but without armature and shape keys. These modified meshes are static and can be put safely in a display list. As the rendering of modifiers is done in direct openGL call, it results is a bit performance boost. 2009-05-12 19:48:18 +00:00
03b6b14df4 2.5 Buttons:
* Added basic Halo material options
2009-05-12 19:28:49 +00:00
705764fe05 Fix face occlusion for projection paint, (was broken for all RC's but nobody noticed)
Its still not working right in perspective mode.
For bleed use a faster method then Barycentric weights function since the point is always on the edge.

last commit with memset in readfile.c missed one var.
2009-05-12 16:20:23 +00:00
b6fa9afccb [#13726] Segfault with (Re)Appending objects
fix this by freeing the lib-file-data after linking or appending, re-appending will be slower now
(as slow as appending for the first time).

Not strictly needed, set the memory for bhead's to zero in readfile.c since comparisons are done later on with this data making valgrind complain.

Added some missing headers too.
2009-05-12 15:28:07 +00:00
5e0d2c896e Graph Editor Bugfix: Drivers for Materials now get shown 2009-05-12 11:36:33 +00:00
732c3ee66f BGE bug #18596: No ipo dynamics is 2.49rc1. 2009-05-11 23:05:13 +00:00
Ken Hughes
75b7bcab77 Python API
----------
Patch by Jean-michel Soler (jms) to support ShrinkWrap and SimpleDeform 
modifiers.
2009-05-11 22:27:06 +00:00
b75268d412 problem with unloading modules, py modules would be refreshed but external modules that were pyc or pyo's would be kept.
This made it not refresh the module when taking an external BGE Module and making it internal because the external pyc would never be freed so the internal text wouldn't get used until restarting blender.
2009-05-11 22:17:58 +00:00
24906dc962 BGE #18724: Modifier cause crash in 2.49RC2. My bad, I was too quick to fix the soft body problem in revision 20119. This time I tested against modifiers, soft body, armatures and replace mesh. 2009-05-11 22:07:30 +00:00
e847bcf784 BGE Doc updates thanks to Roelf de Kock
--- Notes from Roelf, maybe some other BGE devs could help resolve these
Here is what I have so far. I've left "TODO's" were there needs to be some more comments.

The following things also need to be resolved:

-KX_VehicleWrapper.getWheelOrientationQuaternion looks like it should return a quaternion but if I look at the code it looks like it returns a rotation matrix.

-I still need to find out what exactly KX_VehicleWrapper.getWheelRotation is. I've got the return type but I would like to add some explanation for what it actualy means (and units if any).

-BL_Shader.setNumberOfPasses ignores the parameter but from the comment in the code it looks like the parameter that is being set (it is harcoded to be =1) in setNumberOfPasses is not used. So I'm not sure if this method should be documented at all.
2009-05-11 21:35:38 +00:00
0aeaf08242 Ugh, yet another try to fix [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render.
Hopefully it's now fixed for good.
2009-05-11 19:19:36 +00:00
f487a96302 2.5:
* Added empty buttons
* Added missing empty notifiers
2009-05-11 17:34:31 +00:00
Ken Hughes
c24a81a293 Remove incorrect "w" attribute from Eulers, gave warning in epydocs. 2009-05-11 16:57:54 +00:00
0c6ec76a4c Fix Makefiles for gameengine. 2009-05-11 15:34:46 +00:00
ee1c29028d BGE: Add MT_Vector3 support for Py attribute macro system. See KX_PYATTRIBUTE_VECTOR_... 2009-05-11 12:41:48 +00:00
7002faac31 Another Noise Tool svn commit is complaining about mixed line endings so after 16 attempts I wont include the full message 2009-05-11 12:38:24 +00:00
99849b659d Fix for bug #18683: GLSL refresh issue when adding lamp. There's still
cases where this goes wrong, as noted in the release logs, this is just
a temporary fix, in 2.5 can solve it properly with notifiers.
2009-05-11 12:06:53 +00:00
69fca66a81 Graph Editor Bugfix: 'HomeKey' (View All) wasn't correctly calculating y-extents
It was only using the y-extents of the last F-Curve it encountered
2009-05-11 11:51:30 +00:00
1a76f8a9f3 F-Curve Colouring: Attempt at a new auto-algorithm
This new algorithm groups F-Curves into groups of 3-4 with similar colours, since triplets of related settings are more likely to be encountered. 

The colours get darker down the list. Blocks of related F-Curves will alternate between being boldly and weakly shaded.

I've left the old method still there but commented out. This new method could still be improved, as some of the colours chosen don't really stand out that well IMO. 

Testing and suggestions welcome as always :)
2009-05-11 11:41:08 +00:00
02c81ff540 2.5 RNA: Curve
* Changed the font align booleans into 1 enum.
2009-05-11 11:31:10 +00:00
9f012ead0c made the material button use the active objects material 2009-05-11 08:40:50 +00:00
f1e89051c7 2.5 - Restored 'Render Anim' button!
After quite a bit of searching, I finally found where the various UI functions were wrapped for use in Py Layouts. 

For the reference of others, check out editors/interface/interface_api.c
2009-05-11 06:55:11 +00:00
0a17250dca going out on a limb and removing this without asking anyone.
nobody seriously uses this format for graphics these days, and if they did, the export from blender is unlikely be to be useful, its just different views of the mesh edges projected into a 2D xfig file (quantized to int's too).
2009-05-11 05:47:14 +00:00
a220ae2f60 2D Cutout Image Importer
from Kevin Morgan (forTe)

imports images as quads in the 3D view

made some changes
- images that fail to import give an error popup rather then a script error
- extension input is only shown for batch directory importing
- extension comparison is now case insensitive
- importing images from "/" failed, (bug in Blender.sys.dirname), use os.path.dirname since os is needed for batch import in other places.
- disable Esc for quitting because escaping from the file selector would quit the script too.
2009-05-11 05:35:32 +00:00
2ed242656a 2.5 - RNA Bugfix 2 (for Keyframing):
Now properties in nested structs should be able to be keyframed (i.e. AO in World, and SSS in Materials). Added an extra method to RNA for this to work.
2009-05-11 05:18:49 +00:00
dcee43b449 bolt wizard from Aaron Keith (Spudmn), edits from Brendon and myself.
Minor changes are...
- default size is smaller then it was but still too big IMHO, presets are huge.
- deselect all objects and make the new bolt active
- place the new bolt at the 3D cursor location
2009-05-11 05:10:09 +00:00
8e3356793a 2.5
* Broke compiling on previous fix...
* Starting fix for nestled structs...
2009-05-11 02:26:18 +00:00
5c96cd0319 RNA Bugfix: (Brecht, please check over these fixes...)
Fixed one of the causes of keyframes not being able to be inserted. For ID-types where inheritence of the basic wrapping of the struct (i.e. for Lamp blocks, shadow and other lamp-type specific settings were only defined in subclasses of the Lamp struct), the RNA_id_pointer_create() function now performs additional refinement of the PointerRNA so that the pointer will be resolved correctly to allow access to these settings.

The other case which is unresolved for now is nestled structs. The RNA_path_from_ID_to_property() needs modification for this, but dunno how yet.
2009-05-11 02:07:40 +00:00
1a8bbba7bd new script to copy the active object to all other selected objects transformation.
When turning many assets into DupliGroups there was no way to do this other then manually copying the loc/size/rot for each object manually.
2009-05-11 00:56:48 +00:00
da3bdefb7a update script templates for new BGE api attributes 2009-05-11 00:19:55 +00:00
9cc61dd9c8 use the same sequence mapping types as CListValue, hopefully this means it will build on different python versions 2009-05-10 22:33:21 +00:00
a417334026 Linux compilation problem 2009-05-10 22:06:11 +00:00
89c2d80d32 Linux compilation problem, better fix 2009-05-10 21:30:30 +00:00
a6721e549d changes to get benoits logic updates building on scons with gcc 2009-05-10 21:22:25 +00:00
386122ada6 BGE performance, 4th round: logic
This commit extends the technique of dynamic linked list to the logic
system to eliminate as much as possible temporaries, map lookup or 
full scan. The logic engine is now free of memory allocation, which is
an important stability factor. 

The overhead of the logic system is reduced by a factor between 3 and 6
depending on the logic setup. This is the speed-up you can expect on 
a logic setup using simple bricks. Heavy bricks like python controllers
and ray sensors will still take about the same time to execute so the
speed up will be less important.

The core of the logic engine has been much reworked but the functionality
is still the same except for one thing: the priority system on the 
execution of controllers. The exact same remark applies to actuators but
I'll explain for controllers only:

Previously, it was possible, with the "executePriority" attribute to set
a controller to run before any other controllers in the game. Other than
that, the sequential execution of controllers, as defined in Blender was
guaranteed by default.

With the new system, the sequential execution of controllers is still 
guaranteed but only within the controllers of one object. the user can
no longer set a controller to run before any other controllers in the
game. The "executePriority" attribute controls the execution of controllers
within one object. The priority is a small number starting from 0 for the
first controller and incrementing for each controller.

If this missing feature is a must, a special method can be implemented
to set a controller to run before all other controllers.

Other improvements:
- Systematic use of reference in parameter passing to avoid unnecessary data copy
- Use pre increment in iterator instead of post increment to avoid temporary allocation
- Use const char* instead of STR_String whenever possible to avoid temporary allocation
- Fix reference counting bugs (memory leak)
- Fix a crash in certain cases of state switching and object deletion
- Minor speed up in property sensor
- Removal of objects during the game is a lot faster
2009-05-10 20:53:58 +00:00
6f5ef6044d remove unneeded vars and wasn't returning on some errors 2009-05-10 15:23:18 +00:00
c32a3bd73b 2.5 Buttons:
*Added initial material buttons (Material Color, Ray Transparency, Ray Mirror, Subsurface Scattering)
Only works for default material atm. 

*some layout tweaks to the lamp panels.
2009-05-10 12:12:05 +00:00
136d4c34ba deprecate controller.getActuator(name) and controller.getSensor(name) for
controller.actuators[name] and controller.sensors[name]

Made a read-only sequence type for logic brick sensors and actuators which can access single items or be used like a list or dictionary.
We could use a python dictionary or CValueList but that would be slower to create.

So you can do...
 for s in controller.sensors: print s

 print controller.sensors["Sensor"]

 print controller.sensors[0]

 sensors = list(controller.sensors)

This sequence type keeps a reference to the proxy it came from and will raise an error on access if the proxy has been removed.
2009-05-10 01:48:14 +00:00
Dalai Felinto
f155da0039 BGE Dome: Reducing FBO size to warped meshes.
Commit 20099 started using a FBO way too big.
According to Paul Bourke this is how it's done in other Engines:

Projectors HD:
1920x1050 - buffersize = 1024; FBO size = 2048
1400x1050 - buffersize = 1024; FBO size = 2048

Projectors XGA:
1024x768 - buffersize = 512; FBO size = 1024

Now in Blender Game Engine we are using:

Projectors HD:
1920x1050 - buffersize = 1050; FBO size = 2048
1400x1050 - buffersize = 1050; FBO size = 2048

Projectors XGA:
1024x768 - buffersize = 768; FBO size = 1024

(I guess I should be committing code to the ge_dome branch instead of the trunk. I feel bad doing all those adjustments in a hurry to 2.49 final release in the trunk. That is ok, right?)
2009-05-09 21:54:22 +00:00
Dalai Felinto
4a2341fe9a BGE Dome: Allowing FOV different from 180º for Truncated Domes
*) a small note:

In the end it turned out that we have upright and downright domes out there.
So I may rearrange the order of the gui later:
(1 = fisheye, 2 = truncated up, 3 = truncated down, 4 = envmap, 5 = spherical panoramic)

I don't plan to do a doVersion() for that, so if you are using it already keep in mind that the modes may change before 249 final release.
2009-05-09 21:04:03 +00:00
df01af5a1f Methods didn't check for zombies which could crash in the case where a method for an object is kept.
func = ob.getMass
 ...remove ob...
 func() # crash

2 More refcount fixes spotted by Benoit too
2009-05-09 18:18:04 +00:00
355b585447 More refcount errors spotted by Benoit, one with python getting a list item so scene.objects["OBfoo"] would always mess up refcounts. 2009-05-09 17:24:21 +00:00
cfc21667b9 BGE: repair soft body - include this in RC2 please 2009-05-09 16:59:25 +00:00
5d6b249c9b refcounting bugfix, gameOb.getParent() and gameOb.parent both added a reference when they should not have. 2009-05-09 16:29:00 +00:00
acb4d58120 2.5 Buttons:
* Added more lamp buttons and cleaned up the layout
2009-05-09 10:33:06 +00:00
1304d230a3 NLA-SoC: Merge from 2.5 20114:20115
(Testing testing)
2009-05-09 09:21:21 +00:00
9e5bd4bb98 2.5 - Warning fix in own code 2009-05-09 09:18:54 +00:00
4e10be01c7 NLA-SoC: Merge from 2.5 branch 19863:20113 2009-05-09 08:59:41 +00:00
029c27b0be 2.5 Bugfixes:
More work on getting these marker-dependent tools working. They should finally work now :)
2009-05-09 02:37:12 +00:00
5fa80e74a1 2.5 Buttons:
* More Lamp options: Shadow and Spot (WIP, incomplete)
* Added initial lattice panel
2009-05-08 21:52:57 +00:00
fc1036d206 Add support for attach a file with metrics information to the font.
Fonts like Type 1, have one file with the glyph image and another
file with metrics and kerning information, this try to search if the font
have this information and load (try open the same file but with the .afm
and .pfm extension).

Also add a function to load the same information from memory, just in case
that in some point we add a font like this.
2009-05-08 21:24:58 +00:00
749a908331 Cleanup blendfont.
Now that we only work with Freetype2, I don't see any point to keep
wrapping the functions.

Also remove the reference code, it's something that we don't go to used.
2009-05-08 19:47:40 +00:00
cf8a37a3bb Fix Copy & Paste not working inside Blender.
My last patch remove the code that check if Blender is the owner
of the selection, that is why stop working.
2009-05-08 19:37:14 +00:00
Dalai Felinto
1d11df1708 BGE Dome: Truncated Dome are back (Upright and Downright) + GLEW_EXT_framebuffer_object check before generating FBO
After last commit (20099) warping meshes got slower (more quality == less performance). Since we don't need an extra warping for truncated domes, It's better to handle them directly in openGL without the need of warping it.

I'll talk with some Dome owners to see if we need both Upright and Downright modes. I may remove one of them by 2.49 them.

*) also: a proper GLEW_EXT_framebuffer_object check before generating FBO (for warping meshes).

**) next in line (maybe after RC2): tilt option to tilt the camera up to 90º upward.
2009-05-08 18:59:08 +00:00
bf2daa56c1 2.5 Buttons:
* Split the buttons_data.py into separate files, this makes it easier to maintain them. 
Notes: Added an extra modifier file, because modifiers are for different object types.

* Added basic lamp buttons and Sun/Sky settings.
As the camera buttons they only work for the default light object for now.

* Some minor code cleanup
2009-05-08 18:17:57 +00:00
f8b929b8e2 Added include dir for blenfont
Kent
2009-05-08 14:05:17 +00:00
4f0dc8abbf 2.5 - Restored Various Tools using Markers
* Added back a few Marker-API tools
* Restored column select tools using markers (some of these aren't working right yet though).
2009-05-08 12:51:36 +00:00
7e29e97c21 2.5 - Assorted animation code cleanups
* Replaced a few duplicated enums that were also defined for some RNA properties already with the RNA ones.

* Start of cleanup of markers code in preparation for getting the rest of the editing code involving markers working again
2009-05-08 10:50:32 +00:00
171969213f Tweaks to build systems. Just some small cleanups...
Kent
2009-05-08 03:49:48 +00:00
57beadf406 Second fix for [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render 2009-05-07 22:31:19 +00:00
cdba1ddd5d BGE Python owned proxies had a problem being decref'd twice, this would crash on freeing KX_Vertex/Poly Proxy types when python was compiled with debug options enabled.
add_mesh_torus.py wasnt tested from update, will go through all edited scripts and test :\
2009-05-07 22:06:27 +00:00
Dalai Felinto
e1c958c364 BGE Dome: Implementation of FBO to handle warp mesh rendering.
We are using an image twice as big to render the fisheye before warping.
It'll slow down warping meshes a little, but we get way more resolution.

Therefore I will bring Truncated Dome mode back in order to avoid using warping mesh for that.
2009-05-07 20:00:09 +00:00
1f5ccd1928 BGE: unfortunately VA+list still doesn't work on ATI card, so put a specific check for ATI. 2009-05-07 19:36:12 +00:00
f590ffdadc [#18645] Texture painting smudge brush darkens images - 2.49RC1
not fixed but the problem is now less bad when projection painting, bilinear interpolation was rounding down.
- added gameOb.attrDict to get the internal gameObject dict.
- mesh.getVertex wasnt setting an exception.
2009-05-07 14:53:40 +00:00
42557f90bd BGE performance, 3rd round: culling and rasterizer.
This commit extend the technique of dynamic linked list to the mesh
slots so as to eliminate dumb scan or map lookup. It provides massive 
performance improvement in the culling and in the rasterizer when 
the majority of objects are static.

Other improvements:
- Compute the opengl matrix only for objects that are visible.
- Simplify hash function for GEN_HasedPtr
- Scan light list instead of general object list to render shadows
- Remove redundant opengl calls to set specularity, shinyness and diffuse
  between each mesh slots.
- Cache GPU material to avoid frequent call to GPU_material_from_blender
- Only set once the fixed elements of mesh slot
- Use more inline function

The following table shows the performance increase between 2.48, 1st round
and this round of improvement. The test was done with a scene containing 
40000 objects, of which 1000 are in the view frustrum approximately. The
object are simple textured cube to make sure the GPU is not the bottleneck.
As some of the rasterizer processing time has moved under culling, I present
the sum of scenegraph(includes culling)+rasterizer time

Scenegraph+rasterizer(ms)       2.48      1st round       3rd round

All objects static,            323.0           86.0             7.2
all visible, 1000 in 
the view frustrum

All objects static,            219.0           49.7             N/A(*)
all invisible.

All objects moving,            323.0          105.6            34.7
all visible, 1000 in 
the view frustrum

Scene destruction              40min          40min              4s

(*) : this time is not representative because the frame rate was at 60fps.
      In that case, the GPU holds down the GE by frame sync. By design, the
      overhead of the rasterizer is 0 when the the objects are invisible. 

This table shows a global speed up between 9x and 45x compared to 2.48a
for scenegraph, culling and rasterizer overhead. The speed up goes much
higher when objects are invisible.

An additional 2-4x speed up is possible in the scenegraph by upgrading
the Moto library to use Eigen2 BLAS library instead of C++ classes but
the scenegraph is already so fast that it is not a priority right now.

Next speed up in logic: many things to do there...
2009-05-07 09:13:01 +00:00
779bf435ef python3 compatibility for the BGE api, this only works with scons when WITH_BF_NOBLENDER is enabled.
Mathutils, Geometry and BGL modules are currently disabled with python3
2009-05-07 05:23:15 +00:00
c46fa2745a smudge on float images crashed 2009-05-07 01:27:58 +00:00
7325b8e2bf just a small tweak to the buttons window header buttons, seperating the global buttons like scene and world from the sub buttons like ob data and materials, also tweaked the object checks aswell 2009-05-07 01:20:43 +00:00
49fda9470d python is not being very helpful!
It seems 2.5 gives the version as a string, 2.6 as ints
2009-05-06 22:16:28 +00:00
3d60c4e746 [#18702] FBX exported hemi light crashes maya
- bugfix, off by 1 when clamping lamp types, caused blender to write an invalid lamp type
- error in last commit (renamed function)
2009-05-06 21:47:24 +00:00
cf93cad415 use the python version scons is running with by default on linux, will make it easier for people with new distros that only come with python 2.6 2009-05-06 21:41:14 +00:00
ee4e89ec53 Blender 2.5
MSVC projectfiles updates
* removed WITH_FREETYPE2
* update for several missing or moved files rna_fcurve.c, gpencil.c,...
2009-05-06 18:51:58 +00:00
94e9e954b1 [#18681] Mousesensor Over doesn't work in ortho mode of 3dview camera
bugfix, the clip near/far are scaled up for some reason, so use a range between 0 - clipfar for now.
2009-05-06 12:45:08 +00:00
c1e1091f02 moved py controller functions from SCA_PythonController to SCA_IController - the base controller class so python can get the sensors & actuators from any controller (not just SCA_PythonController types)
also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes.

an example of getting every sensor connected to an object.
 all_sensors = [s for c in ob.controllers for s in c.sensors]
2009-05-06 09:12:08 +00:00
25b415f310 Fix for [#18697] 2.49RC1: Keyed Particles fine in viewport but give me a crash during render 2009-05-06 08:33:40 +00:00
899c669557 [#18328] FBX exporter not exporting multi-texture materials properly
even though the format allows materials and textures to be written separately the textures wont load right in maya or 3dsmax unless each texture has its own material.
2009-05-06 06:01:09 +00:00
de4f811b4b - Export hard edge and face info
- Use Edges field rather then 2 vert faces (worked in some apps but crashed maya)
2009-05-06 04:24:01 +00:00
7a0841cbb6 dxfLibrary.py - modif in POLYLINE class 2009-05-06 02:19:16 +00:00
013afe4314 [#18690] mesh ripping allowed on multires
also fixed uninitialized variable use in the BGE when shaders are not supported.
2009-05-06 01:41:04 +00:00
33ce7d4bad 2.5: Missing include was causing crashes on startup in the drawing code for scrollbars 2009-05-06 00:18:06 +00:00
8858546ab4 2.5 - Scons compiling fix for BDiego's commit
Was missing includes for blenfont module in a few places.
2009-05-05 23:25:12 +00:00
31b52cf953 Bugfix: Data from hidden objects was still being taken into account for many NLA-editor operations
NOTE for Merging - do not port this commit, since the changes here are utterly irrelevant to the new system
2009-05-05 23:15:31 +00:00
405cf80eb8 Big, big commit!!
1) Remove WITH_FREETYPE2 from code, so now blender always need freetype2
2) Remove the old bmfont
3) Remove ftfont and bFTGL library
4) Implement a new BLF_draw_default function for place that still need/use
   the old BMF api.

I try to update both, scons and cmake, but I only can test with make, so
hope all work fine.

MSVC is broken, but I don't have Windows, things to search and fix are
any reference to WITH_FREETYPE2, FTGL and BMFONT (take in care that
blenkernel also have a BKE_bmfont.h, this don't have anything to do with bmfont).
        Always have to link/include the freetype2 library
        Remove any reference to libbmfont
        Remove any reference to libftfont
        Remove any reference to libbftgl (or libbFTGL)
2009-05-05 23:10:32 +00:00
362202cc14 Fix an undefined variable bug detected by valgrind. 2009-05-05 22:32:15 +00:00
4bc6749403 [#18695] Replace python errors with useful messages when no full python installation is found
from Philipp Oeser (lichtwerk)
2009-05-05 21:51:54 +00:00
2bce9ff1d1 DXF export with a single nurbs curve failed 2009-05-05 21:47:58 +00:00
71c38978e1 2.5 Buttons - Insert/Delete Keyframe Menu Tweaks
* Added 'Replace Keyframes' entry that appears in addition to delete, since it is often useful to be able to directly replace values instead of having to delete and reinsert keyframes. Internally, this just calls the Insert Keyframe operator.

* Separated the code to for Driver editing from the tests for keyframes, since they're independent.

* Added separators between keyframe and driver operations. This could be removed if the UI-mafia consider it overkill.
2009-05-05 09:56:22 +00:00
42bc76511d Cycles FModifier - Repeat Mirrored now works for cycles before the start of the keyframe range 2009-05-05 09:43:11 +00:00
9e8261a13b Disable importing module python controller scripts at conversion time because it can run BGE functions and crash since the internal state isnt setup yet.
face-select mode wasnt working when used with projection paint.
2009-05-05 05:57:08 +00:00
33322ad1ff 2.5 Buttons:
* Some minor code cleanup
* More tweaks to match the Layout Guidelines "Dependencies ".
2009-05-05 04:07:08 +00:00
08df158672 * More icon updates, thanks to Jendryzch. That's all the modifiers now, I think! 2009-05-05 02:24:58 +00:00
be2c21bcdb BGE logic: new sensor "tap" option to generate automatically on/off pulses
When enabled, this option converts any positive trigger from the sensor
into a pair of positive+negative trigger, with the negative trigger sent
in the next frame. The negative trigger from the sensor are not passed
to the controller as the option automatically generates the negative triggers. 
From the controller point of view, the sensor is positive only for 1 frame, 
even if the underlying sensor state remains positive.

The option interacts with the other sensor option in this way:
- Level option: tap option is mutually exclusive with level option. Both
  cannot be enabled at the same time.
- Invert option: tap option operates on the negative trigger of the 
  sensor, which are converted to positive trigger by the invert option.
  Hence, the controller will see the sensor positive for 1 frame when 
  the underlying sensor state turns negative. 
- Positive pulse option: tap option adds a negative trigger after each
  repeated positive pulse, unless the frequency option is 0, in which case
  positive pulse are generated on every frame as before, as long as the
  underlying sensor state is positive.
- Negative pulse option: this option is not compatible with tap option
  and is ignored when tap option is enabled.

Notes:
- Keyboard "All keys" is handled specially when tap option is set:
  There will be one pair of positive/negative trigger for each new 
  key press, regardless on how many keys are already pressed and there
  is no trigger when keys are released, regardless if keys are still
  pressed. 
  In case two keys are pressed in succesive frames, there will
  be 2 positive triggers and 1 negative trigger in the following frame.
2009-05-04 22:21:02 +00:00
e29e329885 [#18650] fbx export assigning textures to wrong materials...
also fixed an error that made this script fail when python wasnt found.
2009-05-04 21:49:25 +00:00
4ecff51bfe BugFix [#18597] Blender's text editor cant paste from SciTE in linux
Commit patch [#18597] Blender's text editor cant paste from SciTE in linux
Submitted by Campbell.

I made some changes to cleanup a little the code, atoms are now in the
System class. The getClipboard_xcout try to convert/request:
	1) Request for UTF8, if fail
	2) Request for COMPOUND_TEXT, if fail
	3) Request for TEXT, if fail
	4) Request for STRING

Test here with SciTE Version 1.77, firefox, xterm and text editor working
with both library's gtk/qt and all work fine.
2009-05-04 18:46:34 +00:00
b753d6fd2d 2.5 Buttons:
* Tweaked the scene buttons to be more consistent with the Layout Guidelines. http://wiki.blender.org/index.php/BlenderDev/Blender2.5/UIlayoutGuide

* Modifier panel is now also visible on non mesh objects, like curves, text etc.
2009-05-04 18:45:58 +00:00
Ken Hughes
40fa6b0f37 Fix some spelling errors. 2009-05-04 16:03:54 +00:00
eaf717c500 2.5 Data Buttons:
* Added camera buttons.
* Added poll to check on active object type.

ToDo:
* Lens Unit "lens" and "angle" don't update each other. Needs RNA fix. 
* Buttons only work for default camera now, needs better context.
2009-05-04 15:53:55 +00:00
0999cf406a Fix crash because XSetInputFocus fail.
Some WM send a WM_TAKE_FOCUS event before the window is really mapped
(for example, change from virtual desktop), because of this, the call
to XSetInputFocus fail and close Blender.
2009-05-04 15:31:28 +00:00
56fcb7d20f 2.5 RNA:
*Added missing notifiers for resolution and aspect ratio, so camera border updates while changing the values in camera view.
2009-05-04 15:19:11 +00:00
42d571bf19 Fix for msvc compile error reported by Wahooney - thanks 2009-05-04 14:41:25 +00:00
3226b33e48 python geometry function Geometry.BezierInterp(vec_knot_1, vec_handle_1, vec_handle_2, vec_knot_2, resolution)
can use 2D-4D vectors

Also made 3ds import give a message when no python installed
2009-05-04 13:01:18 +00:00
e4e70bfb91 2.5 - Bugfixes
* Loading files saved with 2.5 works again now without crashing. Was crashing when trying to load Grease Pencil data (even though there was none)
* Fixed some msvc compiler warnings in own code
2009-05-04 10:24:53 +00:00
22c2827d2d Cycles F-Curve Modifier: 'Mirrored' Option
Using this cycling mode option, the keyframe range will be repeated in reverse order every second repeat. Thanks for the idea mfoxdogg :)
2009-05-04 10:04:46 +00:00
2f7cd19ff5 print BGE Py api warnings only once to avoid flooding the terminal and slowing the game down too much, resets on loading scenes/blendfiles and restarting the game engine. 2009-05-04 08:55:54 +00:00
9248da811e gcc4.4 needed this to build 2009-05-04 08:17:18 +00:00
387df32933 * Icon updates and fixes
* Made the buttons space listen to and update for new active objects
* Cleaned up the Add Object menu
2009-05-04 07:04:48 +00:00
3abb8e8e68 BGE performance: second round of scenegraph improvement.
Use dynamic linked list to handle scenegraph rather than dumb scan
of the whole tree. The performance improvement depends on the fraction
of moving objects. If most objects are static, the speed up is 
considerable. The following table compares the time spent on 
scenegraph before and after this commit on a scene with 10000 objects
in various configuratons:

Scenegraph time (ms)              Before         After
(includes culling)

All objects static,               8.8            1.7  
all visible but small fraction          
in the view frustrum

All objects static,               7,5            0.01
all invisible.

All objects moving,               14.1           8.4
all visible but small fraction
in the view frustrum

This tables shows that static and invisible objects take no CPU at all
for scenegraph and culling. In the general case, this commit will 
speed up the scenegraph between 2x and 5x. Compared to 2.48a, it should
be between 4x and 10x faster. Further speed up is possible by making
the scenegraph cache-friendly.

Next round of performance improvement will be on the rasterizer: use
the same dynamic linked list technique for the mesh slots.
2009-05-03 22:29:00 +00:00
2aa3c932d0 BGE performance: use inline function as much as possible in scenegraph and logic to avoid function call. 2009-05-03 21:51:57 +00:00
20888482ae BGE: fix a crash with previous scene destruction speed up commit when sensors and controllers are cross connected between objects. 2009-05-03 21:42:39 +00:00
f67ffd137d fix for a problem with setUV2 reported by cthames on blenderartist
http://blenderartists.org/forum/showpost.php?p=1369757&postcount=35
there was an undocumented second arg but may as well allow a single vector arg like setUV()
2009-05-03 20:47:29 +00:00
d85bbb8070 on second thought its less trouble to make a python script that makes all the getset's in the array, apologies to Alex for suggesting this be dynamic :/
included python script to print out getsets as a comment
2009-05-03 19:47:13 +00:00
8a83aff9f5 [#18678] Swizzle properties for Mathutils.Vector
patch from Alex Fraser (z0r)

eg.
  - vec.xyz = vec.zyx
  - vec.xy = vec.zw
  - vec.xxy = vec.wzz
  - vec.yzyz = vec.yxyx

See http://en.wikipedia.org/wiki/Swizzling_(computer_graphics)

made some minor modifications to this patch.

tested access times and adding 336 attributes to vectors doesn't make a noticeable differences to speed of existing axis attributes (x,y,z,w) - thanks to python dict lookups.
2009-05-03 17:52:03 +00:00
03a0770df5 Bugfix #17929
Old bug (2.42): when using node material, transparent shadow did not work.
It was missing to set the proper 'pass flag'.

Do note an important difference with non-node materials for 'transparent shadow'. 
If there are no nodes, it uses the color from the unshaded material. When it has 
nodes, it uses the color output from the entire node tree, which is typically 
from shaded materials. The latter is because node shaders have no support for 
shade passes yet (it only outputs rgb + a).
2009-05-03 17:48:32 +00:00
56b8ce2ec1 Bugfix 18671 revisted
Node editor didn't support editing non-material texture node trees.
Campbell pointed me to fact it's been used already, like for brush
painting. However, this only worked via linking the texture to a
material... hackish stuff.

Now the Node Editor supports all other Textures too, with three extra
icon buttons to define which.

- Active Object: for textures linked to Materials or Lamps
- World: textures from Scene world.
- Brush: textures from active Brush 

The latter can only be set and used when in Paint or Sculpt mode:

- Paint mode: in Image window, Paint Tool panel, set active brush
- Sculpt mode: in EditButtons, Texture panel, select empty slot, add texture.

Note that refreshes of previews in Node Editor is not always happening on
switching contextes. Just click a socket to refresh view.
2009-05-03 13:22:26 +00:00
c35299363f Fix for bug #18659: glsl math material node, "tangent" option didn't work. 2009-05-03 13:17:37 +00:00
2e93dc4037 F-Curve Modifiers: Time-Modifying F-Modifiers Cleanup
Time-Modifying F-Curve Modifiers now get special callbacks to allow them to specify what frame they need to be evaluated on, instead of forcing a re-evaluation of the preceeding curve + modifier-stack. This should be more robust than the old way in general.

It still remains to be seen if some tweaks to this are still needed, as the full consequences of the propogation of modified time-spaces have yet to be fully explored. 

For now though, evaluation works by finding the last modifier on the stack which modifies time, and asks it what time it modifies the given time to. This modified time is used to evaluate the F-Curve data only. The modifier stack gets evaluated using the original time instead.
2009-05-03 13:00:59 +00:00
b89126dbe8 Bugfix #18676
Map a texture to Material Ambient factor didn't work. 
Probably not since 2.42 or so... :)
2009-05-03 12:06:43 +00:00
ab3339f380 NLA SoC: Initial commit of changes for the way NLA is evaluated
* Recoded the flags for NLA-Strips to take into account the new design directions
* Modified parts of the evaluation pipeline to reflect this
2009-05-03 11:46:57 +00:00
12a5c03d16 Bugfix #18671
Texture Nodes: the option to use nodes was also visible for textures
on world, lamp, brush. Since it only works for Materials now, I've made
the button disappear then.
2009-05-03 11:25:09 +00:00
22b501c791 fixes for bugs submitted by BGE users, fixes by myself and Mitchell Stokes
- when the attribute check function failed it didnt set an error raising a SystemError instead
- Rasterizer.getMaterialMode would never return KX_BLENDER_MULTITEX_MATERIAL
- PropertySensor value attribute checking function was always returning a fail.
- Vertex Self Shadow python script didnt update for meshes with modifiers.
2009-05-03 09:21:58 +00:00
b0ec497f39 [#18492] Old 3dView painting does't work anymore.
use flag the wrong way
2009-05-03 09:03:47 +00:00
99cc61edbc Fix for Bug #18658: | character in buttons allowing text input was being interpreted as the "menu-name | hotkey" delimeter used for menus, giving incorrect results.
This commit fixes the issue in 2.5 only. A similar fix will need to be backported/coded for trunk?
2009-05-03 02:27:36 +00:00
6b0f7c741e [#18191] VSE: when moving a project containing a relative path Audio RAM strip, it is still pointing old file
Its a bit silly its not using the name from the file selector alredy (which has been made relative), but this fixes the bug.
2009-05-02 21:11:48 +00:00
490dad89d5 fix for a painting bug where disabled culling & occlusion would not paint onto backfaces
also use the math floating point functions sqrt -> sqrtf, fmod -> fmodf etc.
2009-05-02 19:46:54 +00:00
40fc1d2af7 BGE PyController module type.
- Added support for any number of attributes, this means packages are supported automatically.
 so as well as "myModule.myFunc" you can do "myPackage.myModule.myFunc", nested packages work too.
- pass the controller to the python function as an argument for functions that take 1 arg, this check is only done at startup so it wont slow things down.

added support for
2009-05-02 15:09:06 +00:00
41f42099ac BGE Py API patch from Mitchell Stokes, add distance attribute to the radar sensor, dont use 'continue' because its a python keyword.
removed (ssizeobjargproc) it breaks py2.3
2009-05-02 04:53:01 +00:00
4cf8900c70 F-Curve Modifiers - Per-Modifier Muting:
It is now possible to mute individual modifiers so that they will not contribute to the final result.
2009-05-02 04:51:14 +00:00
4b025d6865 * Added a new F-Curve modifier type: Noise
Thanks Aligorith for making such an easy to use system!

http://mke3.net/blender/devel/2.5/fcurve_noise_modifier.mov
2009-05-02 04:20:36 +00:00
76cedc4b9a * Added a list of OS X volumes to the file selector bookmarks pane, consistent with the drive letters on Windows. Currently this list only gets refreshed on Blender startup, hopefully this can be worked on but for now at least it's better than having to manually navigate to /Volumes/...
http://mke3.net/blender/devel/2.5/fileselect_volumes.png
2009-05-02 03:09:40 +00:00
ef20036b84 BGE Py API patch from Mitchell Stokes, adds extra attributes and docs 2009-05-02 02:40:11 +00:00
07abb9dee2 BGE performance:
- Vast performance increase when removing scene containing large number of 
  objects: the sensor/controller map was updated for each deleted object, 
  causing massive slow down when the number of objects was large (O(n^2)).
- Use reference when scanning the sensor map => avoid useless copy.
- Remove dynamically the object bounding box from the DBVT when the object
  is invisible => faster culling.
2009-05-01 20:34:23 +00:00
e13a089d91 BGE: work around a problem with DBVT culling when graphic objects are rescaled. This happens when objects with very diverse scale are instantiated with dupligroup. The problem remains when the objects are rescaled during the game. The effect of the problem is an inefficient culling: objects can have a bounding box larger than needed. Patch to fix the problem is filed at Bullet forum. 2009-05-01 19:02:23 +00:00
672492f563 BGE: New function GameLogic.setMaxLogicFrame() to allow better control over the time spent on logic.
This function sets the maximum number of logic frame executed per render frame.
Valid values: 1..5

This function is useful to control the amount of processing consumed by logic.
By default, up to 5 logic frames can be executed per render frame. This is fine
as long as the time spent on logic is negligible compared to the render time. 
If it's not the case, the default value will drag the performance of the game
down by executing unnecessary logic frames that take up most of the CPU time. 

You can avoid that by lowering the value with this function. 
The drawback is less precision in the logic system to physics and I/O activity.
	
Note that it does not affect the physics system: physics will still run 
at full frame rate (actually up to 5 times the ticrate).
You can further control the render frame rate with GameLogic.setLogicTicRate().
2009-05-01 16:35:06 +00:00
1c6cd47f2b Fix linking issue with gameplayer.
Kent
2009-05-01 15:19:47 +00:00
742ddade12 [#18654] different behaviour if script is called from (1) Menu (2) TextEditor (3) ScriptsWindow [including crash!]
bugfix, simple NULL check
2009-05-01 14:19:56 +00:00
792449f8f0 2.5 - Restored access to the Image-Type setting
This has been wrapped under Scene.RenderData, and can currently be accessed under the 'Image' panel in the Scene settings. 

As in the old code, image types are only included if they are enabled when compiling. Also note that image-type specific settings have not been wrapped yet.
2009-05-01 11:57:14 +00:00
6ef603ffcf * Some tiny tweaks to the padding around buttons window 2009-05-01 06:24:52 +00:00
bb3fa18a95 add blendfile dirs to the sys.path without the scripts subdir 2009-05-01 04:55:40 +00:00
36d0e2649e BGE bug fix: when a dynamic object is parented to a compound shape and then unparented, it jumps at the position it had before the parenting. 2009-04-30 20:02:22 +00:00
2ec50d7bb2 BGE bug #18091: Hitbox of object X doesn't move along when object X is parented to object Y. 2009-04-30 19:00:17 +00:00
d576ee99ed 2.5
Cleanup of conventions for icon placement in menus.

Old code only allowed 1 icon per menu, forcing to pass on the sublevel
menu icon with exception handling.

Now sublevel icons are drawn automatically, allowing to add an icon
before name too. (Check shift+a menu)
2009-04-30 17:27:30 +00:00
3ee6c11e31 2.5
Two fixes:

- objects in editmode now update data on saving .blend
- uifonts and uistyles were not freed yet on reading files
  yet.
2009-04-30 16:44:00 +00:00
Dalai Felinto
8570071e40 supporting warp data files with tabs instead of spaces. 2009-04-30 15:27:38 +00:00
140a60539b 2.5
Bug reported by Joshua: quitting Blender via window header quit widget
didn't free editmode stuff.
2009-04-30 12:51:38 +00:00
fdf6ea916d added Geometry as a BGE module, removed its dependency on gen_utils.c 2009-04-30 12:45:13 +00:00
3c9e3e69ed 2.5
Transform helpline and experimental drawing code to indicate direction of motion for specific transformations.
2009-04-30 11:47:35 +00:00
a29551751c 2.5
Bugfix, thanks to report from M Fox: Saving file in editmode
could crash on load, because editobject pointer in scene was
not cleared on file reading.
2009-04-30 11:33:07 +00:00
b14dc8f3d9 enable game engine and player by default 2009-04-30 10:41:39 +00:00
4ff585569c 2.5 - Icons Add Object Menu
A little experiment in putting icons on this menu as per a mockup from William.

However, it appears that there is a minor bug here though with the menu drawing code. I've deliberately left the Mesh entry without an icon for now to illustrate part of the problem (note the placement of the icons for curves and surfaces)
2009-04-30 10:22:28 +00:00
Nathan Letwory
a8a0af4f6a SCons
* add missing arguments
2009-04-30 10:18:50 +00:00
de2cc4d14d Second trial to get an OK menu work to allow people to decide whether
or not to use a 2.5+ saved file in 2.49. Apparently the msvc linker
was choking on it?
2009-04-30 10:11:37 +00:00
81ea467091 BGE fux #17796: Glsl + bones + set smooth = bug on vertext groups. 2009-04-30 08:02:26 +00:00
b5b24ee521 BGE Python sys.path for the blenderplayer and blender
sys.path is the search path for python modules. This is useful so people making games can put all their scripts in a folder and be sure they will always load into the BGE.

for each blend file a scripts directory is added to the path
 /home/me/foo.blend
will look for modules in...
 /home/me/scripts/*.py 

It could also default to look for modules in the same directory as the blend file but I think this is messy.
Added a note in the tooltip about //scripts so its not such a hidden feature.

This works by storing the original sys.path, then adding the paths for the blendfile and all its libs,
when a new blendfile is loaded, the original sys.path is restored before adding the blendfiles paths again so the sys.path wont get junk in it.

One problem with this - when using linked libs the module names must be unique else it will load the wrong module for one of the controllers.

also fixed 2 bugs
- sys.path in the blenderplayer was growing by 1 for every file load in blenderplayer
- the relative path (gp_GamePythonPath), wasnt being set when loading files in the blenderlayer (as I wrongly said in the last commit).
2009-04-30 08:01:31 +00:00
Dalai Felinto
939290b59c BGE 2dFilters: Revert of part of own commit [rev. 19687]
Therefore we still need to find a better way to solve this problem:
[#18154] 2dFilter and motion blur should run only once to all the scenes:
http://projects.blender.org/tracker/?func=detail&aid=18154&group_id=9&atid=127
2009-04-30 03:46:31 +00:00
Dalai Felinto
5908e2aa77 BGE Dome update. Spurious black seams (finally) fixed.
The solution is a hack. It's a workaround for another bug (#18655).
Now it's working in all modes: fullscreen, maximized screen and gameplayer.

* small change to always set the perspective mode as true during dome mode.
2009-04-30 02:41:07 +00:00
d8625fb93b * trying out a little 'gripper' draw style for the screen splitter triangle 2009-04-30 02:14:03 +00:00
199341ad7b 2 BGE bugs from 2.48 fixed
- the gp_GamePythonPath relative path variable wasnt updated when loading new files.
- missing NULL check for scene crashed blender when it failed to load a file.
Both problems dont affect blenderplayer
2009-04-30 02:07:08 +00:00
1782be5c72 Not sure why this INCREF is needed since making a replica wont use the m_bytecode so why should it add a user?
Removed in 19974 but that crashes YoFrankie so adding back in for now.
2009-04-30 00:51:11 +00:00
a625f5e476 error in last commit 2009-04-29 23:59:59 +00:00
6a155b5c07 use BLO_sys_types.h instead, it's windows proof 2009-04-29 23:43:12 +00:00
1e7df58519 python modules in the game engine could point to builtin modules like GameLogic that was cleared.
I added module clearing before there was checks for invalid python objects, so now its not needed for BGE Builtin types at least.

also made the builtin modules get re-used if they already exist and clear all user modules when the game engine finishes so with Module-Py-Controllers the referenced modules are at least up to date when pressing Pkey.
2009-04-29 23:39:27 +00:00
537b080379 missing stdint.h include 2009-04-29 23:33:04 +00:00
Nathan Letwory
ebf631b3fe * instead of using okee() (breaking builds) use error() in 250 subversion handling in 2.49 2009-04-29 22:09:28 +00:00
Nathan Letwory
4d7017b423 * make sure header file agrees with editfont.c (unsigned long -> uintptr_t), following commit by Genscher r19983 2009-04-29 20:56:27 +00:00
Nathan Letwory
39caa9898c * fix linking problem for mingw with setenv/_putenv_s, here we use putenv("key=val"); 2009-04-29 20:09:08 +00:00
604f3e08d3 Possible fix for bug #18648: one armature disappears when joining
armatures. Not sure it actually fixes the problem because I can't
test this on Win 64, but this fixes use of unitialized memory at
least. Mat4MulMat34 only sets the 3x3 part of the 4x4 matrix, which
may lead to a NaN bone roll value.
2009-04-29 19:33:05 +00:00
a9aac77ccf Win64 fixes - I don't think that they introduced any bugs yet, but I want to be sure. Please report problems. 2009-04-29 19:13:32 +00:00
11dcf7461c Bugfix #18632
Duplicating an armature, with constraints having a local Ipo, didn't
make a copy of this Ipo too, frustrating its drivers too.
2009-04-29 17:41:41 +00:00
70bcdb817b was testing this, didnt mean to commit. 2009-04-29 17:01:35 +00:00
81dfdf8374 ifdef's for future py3 support, after this adding py3 can mostly be done with defines or batch renaming funcs (with the exception of CListValue slicing)
.
No changes for py2.x.
2009-04-29 16:54:45 +00:00
d6c525d624 attempt to fix for py2.3 2009-04-29 16:48:00 +00:00
11ad5f8389 Bug, reported by venomgfx:
Scrub frames in Sequencer image window stopped working. Was in a commit
from Joshua last july, with greasepencil fixes. No idea why he disabled
it, doesn't seem to harm gpencil at all (not in sequencer supported).
2009-04-29 16:41:18 +00:00
133c91dd2f Bugfix #18649
Grease pencil, floating panel, "Delete last stroke" crashed when there 
were no strokes. Simple NULL check added.
2009-04-29 16:16:08 +00:00
f56bfbdd0c Bugfix from own testing:
Blender crashed, when started in debug -d, with compositor, after render.
Reason was the BKE_image_print_memlist() which reads the ibuf->rect from
all images, but for Image types "VIEWER" that's not valid, this data is
coming from other sources.
2009-04-29 16:07:10 +00:00
3b19b6c33f 2.5+ file read provision for 2.49
I've managed to find a basic fail-safe method to prevent using the read
data with an OK popup. I then still will read the file, but wait for user
confirmation to continue, or just free the database.

The pupup tells the user that at least animation data will be lost.

For background renders of 2.5+ things are more tricky, so here I've added
a default failure to read, returning 0, which will typically gracefully
quit blender.
2009-04-29 15:25:13 +00:00
f8656d3510 BGE alternative run mode for python controllers.
Option to run a function in a module rather then a script from a python controller, this has a number of advantages.

- No allocating and freeing the namespace dictionary for every time its triggered
  (hard to measure the overhead here, but in a test with calling 42240 scripts a second each defining 200 vars, using modules was ~25% faster)

- Ability to use external python scripts for game logic.

- Convenient debug option that lets you edit scripts while the game engine runs.
2009-04-29 12:43:09 +00:00
988fbb88dc bugfix #18609
This fixes a commit from Peter, revision 12931, Dec 17 2007
He added quick image scaling code, derived from ppmqscale, 
http://libdv.sf.net

This implementation gave ugly banding. especially visible on
dark colors or byte images with very close colors.

Solution is to add correct rounding, seems to me normal for such
fixed point magic. Optimizing code and keeping quality is tricky
dudes! Results for scaling down in sequencer were bad for over a
year (2.47 and 2.48 both wrong).
2009-04-29 11:20:07 +00:00
32b70e333f needed this minor change to build on gcc 2009-04-29 11:16:26 +00:00
3bc02088e8 remove uneeded checks and testMethod from KX_ConstraintWrapper, typo in import_obj 2009-04-29 10:24:12 +00:00
f004c36e41 BGE: speed up mesh conversion by avoiding allocation/deallocation of material object on each face. The speed up is minor on optimized builds but considerable on less optimized builds, good for debugging large scene. 2009-04-29 10:06:38 +00:00
d110049d37 * First pass updating the default theme for the new UI controls and darker colours 2009-04-29 04:43:17 +00:00
a010139085 * Updated icons from Jendryzch. Thanks! 2009-04-29 02:47:28 +00:00
2d78dcfb61 fix so that torque can be applied to DYNAMIC game objects, this fixes the skategirl.
Note that skategirl needs a bit higher angular damping, perhaps the conversion formula needs to be tweaked better?
2009-04-28 23:26:35 +00:00
e4abebfa91 BGE: reenable object activation for static object, otherwise their physic shape is not updated when they move due to parent relation. 2009-04-28 18:56:48 +00:00
5e66971dd3 add note to Image.save method that all new buffers are saved as Targa 2009-04-28 18:53:15 +00:00
35c1b3134b etch-a-ton bugfix
cut and trim didn't set normal properly.
2009-04-28 17:55:48 +00:00
851e6d9e44 Bugfix #18637
Sorting of files didn't take numbers into account propertly, so it
ordered files like;

10.jpg
300.jpg
89.jpg
9.jpg

Quite simple to solve, almost moved report to the 'todo', but too
fun to leave this. :)

function name is BLI_natstrcmp() "natural string compare".
2009-04-28 17:25:50 +00:00
d3b20dddd7 Mathutils
- fix own mistake with matrix slicing that would crash blender (from recent commit).
- fix 3 memory leaks from ascotan r4717 in the Mathutils.Quaternion(...) function.
2009-04-28 15:28:02 +00:00
94c6cadfe2 BGE PyAPI
- renamed generic attribute "isValid" to "invalid" since BL_Shader already uses isValid.
- Moved deprecation warnings from CValue 
- removed unused KX_Scene::SetProjectionMatrix and KX_Scene::GetViewMatrix
- Added KX_Scene attributes "lights", "cameras", "objects_inactive", to allow access to objects in unseen layers (before the AddObject actuator adds them)
- KX_Camera deprecated cam.enableViewport(bool) for cam.isViewport which can be read as well.
2009-04-28 13:11:56 +00:00
eee8dd9086 - Updated BGE docs to match the game engines class inheritance more closely.
- Grouped deprecated functions for KX_Camera, KX_GameObject, SCA_ISensor, SCA_ILogicBrick, KX_Scene
2009-04-28 13:02:49 +00:00
d4f8b416e9 BGE soft body: change welding option to disable welding check by default: speeds up shape conversion. This is fine if the object has no duplicate vertices. Otherwise, bullet will be extremely slow and you can either set some welding or remove duplicates in the mesh. Welding is now displayed in linear scale: 0.0 -> 0.01, no need to use logarithmic scale ;-). Fix a bug with Bullet by which vertex array for soft body must have 3xfloat stride. 2009-04-27 22:21:42 +00:00
Dalai Felinto
fa826774a3 CMake files changes for FFMpeg update
This was broken since last month !!!
2009-04-27 22:14:51 +00:00
58cdd37f52 UI:
* Made separator item work horizontal & vertical.
* Add colon (:) automatic for int/float/enum/string.
* Added space variables to uiStyle and use them in the
  layout engine.

* Added initial World buttons by Thomas Dinges, thanks!
* Added some code for modifiers in the Object Data context.
  This will become a template though.
* Use a common poll() callback in the scripts to reduce code.
2009-04-27 18:05:58 +00:00
dc664e3925 TexVert sharing was disabled for flat faces, this is silly since a building or any other model with flat faces will often be able to share texverts.
Simple testcase with a subdivided cube used 1/3 as many texverts and spend half as much time in the rasterizer while profiling.
2009-04-27 17:53:41 +00:00
352eaccd5d BGE: Add soft body welding parameter to the Advanced Settings panel. The values are very small so I chose to use logarithmic scale. Should be fine, it's an advanced setting after all. 2009-04-27 16:44:02 +00:00
c56ee09c48 BGE bug #18624: Collision detection fails on parented objects. Partial fix, parented shape now moves with the parent but still the parent near detector detects the child only in the zone where it was parented. 2009-04-27 16:40:26 +00:00
c36fb8c913 2.5
Fix repeat crash with transform. Just remove stupid twmat, don't need to cache results in view3d.

Made it more safe too.
2009-04-27 15:43:35 +00:00
369c8b8055 [#18628] stuck triangle when projection painting -- 2.49RC1
Increasing the tolerance when making intersection comparisons fixed this.
There is also a problem where a pixel aligned quad would get a diagonal line down the face. offset the pixel locations a little to avoid this (crappy I know but will fix most cases).
2009-04-27 14:22:02 +00:00
7f21e7f4a3 2.5
Forgot to add new file!

This is the toolbar, it get overlayed on top of view, not changing
main window display.
2009-04-27 13:55:38 +00:00
9b82d1474f 2.5
Summary of ain features:
- Themes and Styles are now editable.
- CTRL+U "Save user defaults" now goes to new .B25.blend, so you
  can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it
  reads the regular .B.blend
- Press Tkey in 3d window for (unfinished) toolbar WIP. It now only
  shows the last operator, if appropriate.
  Nkey properties moved to the other side.

A lot of work was done on removing old themes for good and properly
getting it work with the 2.5 region system. Here's some notes;

- Buttons now all have a complete set of colors, based on button classifications
  (See outliner -> user prefs -> Interface
- Theme colors have been extended with basic colors for region types. 
  Currently colors are defined for Window, Header, List/Channels and
  for Button/Tool views. 
  The screen manager handles this btw, so a TH_BACK will always pick the
  right backdrop color.
- Menu backdrops are in in Button theme colors. Floating Panels will be in
  the per-space type Themes.
- Styles were added in RNA too, but only for the font settings now.
  Only Panel font, widget font and widget-label work now. The 'group label'
  will be for templates mostly.
  Style settings will be expanded with spacing defaults, label conventions, 
  etc.
- Label text colors are stored in per-space Theme too, to make sure they fit.
  Same goes for Panel title color.

Note that 'shadow' for fonts can conflict with text colors; shadow color is
currently stored in Style... shadow code needs a bit of work still.
2009-04-27 13:44:11 +00:00
e2582ba6c1 Fix for bug #18610: in the Game menu enabling "Record Game Physics to IPO"
made "Generate Display Lists" hidden (these work fine together).
2009-04-27 12:18:18 +00:00
22df42cdec Fix for bug #18032: AAO pixel cache + refraction artifacts, the pixel
cache can only be used for the first hit.
2009-04-27 11:49:40 +00:00
1d3c2b83a1 2.50: fix crashes in the text editor due to undo buffer. 2009-04-27 10:00:22 +00:00
9c3d628082 [#18616] Scons+MinGW compiling error with gaming engine enabled.
Attempt to fix building in windows with mingw
2009-04-27 07:07:22 +00:00
5d1d6ad4d1 Don't always activate a Bullet rigid body
If you want to keep a rigid body awake, please use the GUI 'No Sleeping' option for Rigid bodies.
2009-04-27 05:06:24 +00:00
d2ff190dfb Lower the vertex welding threshold, for removing duplicate/nearby vertices for soft bodies (this broke susanne softbody regression test) 2009-04-27 04:21:05 +00:00
f64265d714 Bugfix #18603: Clear User Transform does not work -- 2.49RC1
Modified the behaviour of Clear User Transform so that when there's no action, Clear User Transform now resets the entire pose to the rest pose. However, when there is an action, the pose on selected bones gets cleared to the pose defined in the action, not the rest pose.
2009-04-27 00:49:01 +00:00
310356a732 Shrinkwrap fix (before I only fixed normal projection)
nearest surface + nearest vertex fixed now
2009-04-26 21:33:22 +00:00
7a042dcc3a [#18623] projection paint alpha paintingacts as 1bit -- 2.49RC1
Also fixed...
- smear with alpha channels (had to disabled blending modes).
- using uninitialized memory in a few cases.
- negative index in an array bug.
2009-04-26 21:30:42 +00:00
ce3aabb4e7 Rewind own commit that aimed to make converting meshes faster at startup.
Some files probably need to have UV's welded so better do this even though it seems inefficient.
2009-04-26 21:23:59 +00:00
Ken Hughes
f8239c8ac7 Missing end-of-line. 2009-04-26 18:38:16 +00:00
af1c25c9d0 Fixed shrinkwrap bug:
shrinkwrap wasn't using the updated coordinates/normals of vertexs
	when the DerivedMesh had been modified by a previous modifier.

	before revision 19744, users would only notice a strange behaviour
	of shrinkwrap in projection mode (because it was using the wrong normals)
	(jpbouza reported this)

	after revision 19744 this bug was "bigger".

Anyway it's fixed now :)
2009-04-26 13:26:18 +00:00
ba563216e9 BGE: Fix Orthographic mode and viewport scaling
- the BGE now uses correct glOrtho projection whe camera is in orthographic mode
-
2009-04-26 12:23:30 +00:00
fc4ba5e131 When adding multiline text drawing I missed a case where the image pointer should have been checked - drawing text on a face with no image would crash blender.
Better tooltip for game actuator file field.
2009-04-26 09:41:39 +00:00
Nathan Letwory
fb7803c300 Amendment for 19924 - no setenv() on Windows, make it work with _putenv_s(). 2009-04-25 20:26:27 +00:00
dd21e9b626 patch from michael williamson, export multiple UV layers to lightwave
[#18575] remove unused local variables
2009-04-25 17:52:04 +00:00
113b438dce [#18611] console.py linewrap
from Jim Hi8ll (jthill)
2009-04-25 17:41:17 +00:00
5233069908 Running 2.48rc on my system segfaults when starting the game engine, only on the release, not for my own builds.
Setting the SDL video driver to dummy prevents the crash, this is recommended in the SDL docs if your not using the video driver.
2009-04-25 12:58:07 +00:00
b991b32458 BGE mesh modifiers: fix view frustrum culling for mesh with modifiers. Update the bounding box based on mesh extent after applying the modifiers. 2009-04-25 12:20:59 +00:00
3038fb1a01 [#18606] Writing to KX_GameObject.orientation causes crash
Own bug, conversion function to get an orientation from python - PyOrientationTo() ignored user input completely :| (breaking the orientation attribute)

Also made KX_GameObject worldOrientation writable and minor doc fixes.
2009-04-25 07:17:36 +00:00
0c482f7607 BGE API - small changes
- print CListValue errors only once.
- bge_api_validate_py.txt now validates modules as well as types.
- added missing functions and consts for epydoc modules. some of these in GameLogic.py still need sorting.
2009-04-24 20:27:04 +00:00
Ken Hughes
6b48e25ba4 Change scon's ordering of static libraries to resolve problem on Linux 64-bit builds. 2009-04-24 20:17:42 +00:00
252928ab36 BGE: removed support for time dependent modifiers, they don't make sense in the GE. Disable modifiers when Bullet soft body is used: bullet needs the original vertex array. 2009-04-24 19:49:15 +00:00
6028475441 patch from Thomas Dinges, falloff out of the stars struct into the mist. 2009-04-24 11:36:48 +00:00
a5f4d7cb53 BGE PyAPI epydoc errors fixed 2009-04-24 07:45:17 +00:00
b47c87d7fd just some fixes in rna descriptions 2009-04-24 01:27:17 +00:00
119d0e9145 Small comit, added the colour mode (BW,RGB,RGBA) and object type to rna, and added appropriate entries to the UI 2009-04-24 01:17:54 +00:00
b4abca0daa patch for paths_svg2obj.py by author J.M.Soler:
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_import_svg_en.htm
This patch adds support for Patterns.
2009-04-23 23:44:43 +00:00
efd1a69d6c Move texture draw to blf_util.c, now both font used it.
A little cleanup on the internal font, it's possible load the old
bmfont with: BLF_load_mem(name, NULL, 0) where name can be: helv,
helvb or scr.

Note that the internal font also support both draw, texture and bitmap,
by default always used texture.

Remove some old lang function that I left there and don't exist any more
because the locale are now in the RNA.

Small changes to Style's, so if we build without freetype2 by default
go back to the internal font, this is a little ugly (and have the old
problem of scale) but now blender always show text (need work a little
more there).
2009-04-23 21:57:41 +00:00
0feaedfa9a BGE bug #17950: crash when GE softbody is parented to a rigid body/soft body/dynamic object. 2009-04-23 21:19:42 +00:00
67b3e1a07b BGE bug #17863: Shaky game camera. 2009-04-23 20:30:01 +00:00
1b95d684af 2.5
Two small fixes;

- restrict collumns in outliner didn't work
- pulldown menu buttons had wrong AA color outline.
2009-04-23 15:14:19 +00:00
70f1b45430 Fix for part of bug #18496: issue with light state switching
when using Dome.
2009-04-23 13:30:34 +00:00
0d347e12ea [#11172] md2 export bug(s)
export with object transformations applied.
2009-04-23 11:59:13 +00:00
09c341c3bd Make: removing hidden directories from .app failed. 2009-04-23 09:59:19 +00:00
5eb4d89cec 2.5
Make: removing hidden directories from .app failed.
2009-04-23 09:59:03 +00:00
e948fe3078 - fix for python refcounting crashes, remember PyDict_GetItem and PyDict_GetItemString borrow a ref.
- the namespace dictionary wasn't being de-allocated for each run.
- clear every error after printing it to avoid stale PyObjects hanging about.
2009-04-23 09:15:42 +00:00
0a12af1f8e 2.5
Last commit from brecht with feature:

* Buttons window data context icon new changes depending on active
  object.

Forgot to check for ob==NULL, crashed files.
2009-04-23 08:13:25 +00:00
960581fcc9 == Sequencer ==
Fixes:
[#18489] Adding (add filter) nested strips 
causes Blender VSE to segfault on frame render.
[#18209] 3 VSE crash bugs with .blends 
(all left click and move mouse over Metastrip/Blend Mode related)

... and a new segfault I introduced with my last commit.

Also: memcache limiter refcounts are tested now in critical
      places, printing an error message,
      since doing refcounting right is, well, hard.
2009-04-23 07:40:01 +00:00
1ed95e0450 F8Key reloads all python scripts and redraws for quick testing
F7 runs test.py also for testing
2009-04-23 06:58:02 +00:00
ad8e98bccd == SEQUENCER ==
This fixes 

[#18079] Sequencer color correction does not apply on float image if "make float" is not applied

and closes

[#18582] bug fix #18079

by removing ibuf->rect on image load if ibuf->rect_float is used.
(Don't know, why the OpenEXR loader does that, but I fix this on sequencer
side for now...)
2009-04-23 06:07:51 +00:00
d00c3ef2d6 Small changes
- font->blur was uninitialized
- Use Ctrl+Alt+Shift+P to run scripts from the 3d view not Pkey. (still useful for testing)
2009-04-23 05:56:09 +00:00
Dalai Felinto
073abf7047 BGE Dome update:
* Enviroment Map implemented (replacing truncated mode 2).
 - Now it's possible to pre-bake animated (or static) EnvMaps to use with Cube Map textures.

* Enabling 2DFilter in Dome mode
 - no GL_DEPTH_BUFFER supported though.

* Tweaking GameSettings menu (centralizing buttons)
2009-04-23 02:27:11 +00:00
7ee587c04a * Tiny UI tweak, moved the checkbox labels closer to the boxes. 2009-04-23 01:53:11 +00:00
327881c838 [#18574] small bug - warning for sce.link() depreciated displays even when sce.objects.link() is used
Remove the warning since the func will sstay in 2.4x
2009-04-23 00:56:05 +00:00
Dalai Felinto
7ac233be8a BGE Rasterizer methods to handle Screen Space - (getScreenPosition, getScreenVect, getScreenRay)
getScreenPosition(obj):
 - Gets the position of an object projected on screen space.

getScreenVect(x, y):
 - Gets the vector from the camera position in the screen coordinate direction.

getScreenRay(x, y, dist, property):
 - Look towards a screen coordinate (x,y) and find first object hit within dist that matches prop.
- The ray is a call to KX_GameObject->rayCastTo from the KX_Camera object.

Patch [#18589] test files can be found there. Patch reviewed by Campbell
2009-04-23 00:49:38 +00:00
e8f5c75005 patch from Mitchell Stokes, comments only - KX_PYATTRIBUTE_TODO for missing attributes 2009-04-23 00:47:45 +00:00
6a270ecb94 BGE Python API
CListValue fixes
- Disable changing CValueLists that the BGE uses internally (scene.objects.append(1) would crash when drawing)
- val=clist+list would modify clist in place, now return a new value.
- clist.append([....]), was working like extend.
- clist.append(val) didnt work for most CValue types like KX_GameObjects.

Other changes
- "isValid" was always returning True.
- Set all errors for invalid proxy access to PyExc_SystemError (was using a mix of error types)
- Added PyObjectPlus::InvalidateProxy() to manually invalidate, though if python ever gains access again, it will make a new valid proxy. This is so removing an object from a scene can invalidate the object even if its stored elsewhere in a CValueList for eg.
2009-04-23 00:32:33 +00:00
d568794a98 Fix for bug #14410: multires + vertex colors crash rendering
or baking while in editmode.
2009-04-22 23:01:40 +00:00
1ca6768051 Fix for bug #18509: mesh deform modifier not working on load,
with cage on hidden layer.
2009-04-22 22:38:23 +00:00
90508ed125 BGE bug #17670: Python controlled mist doesnt work in textured mode. 2009-04-22 22:12:36 +00:00
6a5a94a8fe Add clipping option for bitmap draw mode and remove the "test code" from
space_info.c
2009-04-22 20:54:27 +00:00
fd108f1019 [#18586] [bug] Ray sensor doesn't return a hit object
Supporting len(GameOb) to see how many properties it has backfired since it can then evaluate as false.
2009-04-22 20:43:41 +00:00
76d000fd96 height=0; 2009-04-22 19:13:07 +00:00
f06802050d [#18587] bugfix #18425 (Window.EditMode() ignores undo information)
from Lorenzo Pierfederici (lento)
2009-04-22 19:04:00 +00:00
af02a0aa4e UI
* Headers and menus can now be created in python.
* Replaced the uiMenuItem functions to create menus with equivalent
  uiItem functions using a layout, removing duplicated code.
* More uiItem functions are now exposed to python.
* The text editor header, panels and one of its menus are now created
  in space_text.py.
* Buttons window data context icon new changes depending on active
  object.

Issues
* Icons are not wrapped yet, hardcoded ints at the moment.
* The ID browse template is unfinished.
2009-04-22 18:39:44 +00:00
48f483d14f BGE: some more cleanup, implement proper GetReplica/ProcessReplica workflow for touch/near/radar sensor. Remove duplicated code. 2009-04-22 18:20:41 +00:00
b22819f686 Bugfix #18039
Armature modifier didn't set amd->prevCos temp variable to NULL 
after freeing. Saving this in file will cause error or crash on
reading. Quite weird how it survived so long?
2009-04-22 17:35:37 +00:00
971cabc2d6 Bugfix #18058
Ray-transparent didn't pass on thread number to shading code, giving
"blothes" in render, when using node materials.

This also rewinds Campbells commit of feb 21, which tackled the error,
but not the cause.
2009-04-22 17:06:47 +00:00
f6d27e73ee BGE: some more cleanup, remove useless ReplicaSetName(), move code to ProcessReplica. 2009-04-22 16:58:04 +00:00
076d1910f5 BGE: some more cleanup in GetReplica/ProcessReplica of deformers: make them consistent with the other classes. 2009-04-22 16:26:22 +00:00
5553d2c014 BGE C++ API
PyObjectPlus::ProcessReplica() is now called when any of its subclasses are replicated.

This is important because PyObjectPlus::ProcessReplica() NULL's the 'm_proxy' python pointer I added recently.
Without this a replicated subclass of PyObjectPlus could have an invalid pointer (crashing the BGE).

This change also means CValue::AddDataToReplica() can be moved into CValue::ProcessReplica() since ProcessReplica is always called.
2009-04-22 14:42:00 +00:00
a8592d09d0 BGE C++ API
Some functions used
	ProcessReplica(replica);
others
	replica->ProcessReplica()

Use the second method everywhere so the PyObjectPlus's ProcessReplica() can be called from its subclasses.

Note that PyObjectPlus's ProcessReplica isnt used yet.
2009-04-22 12:16:41 +00:00
c09b1a985c bugfix #18187
Using "Key Alpha" didn't work when using MBlur render. The accumulation
code was assuming regular alpha then. Now it corrects for it.

Still it's a bit of a weak spot in Blender's render system. I will look 
in the future to make this a real post process; converting all RGBA 
buffers in the system, including for all passes, to "key alpha". 
Combined with that our compositor should become alpha type aware too. 
Everything in Blender assumes premul alpha, which still just will work 
best in general...
2009-04-22 11:54:43 +00:00
643d59bb9b Assorted 2.5 fixes:
- compiling errors in outliner.c
- incorrect comments
2009-04-22 10:07:12 +00:00
785b784e09 BGE Python API
improved how attribute errors are set so each classes py_getattro function dosnt need to set an error if the attribute doesn't exist.
Now py_base_getattro sets an error on a NULL return value when no errors are set to avoid setting errors at multiple levels.
2009-04-22 09:47:57 +00:00
95038048a2 [#18577] LightWave (.lwo) Exporter Object Names are Incorrect
patch from Philip Alldredge (cilcoder), slightly modified
2009-04-22 09:08:57 +00:00
Nathan Letwory
88c58d6b2d BGE
* the ternary form refused to compile properly with msvc, rewrite a bit.
2009-04-22 06:30:32 +00:00
1d03db80d5 branch from 2.5 for aligorith 2009-04-22 02:41:38 +00:00
0145a93f24 Patch from Mitchell Stokes for KX_Light to use attrdef's
Added type access to the SCA_PropertyActuator, added missing function in library docs.
2009-04-21 23:15:18 +00:00
221f589f51 BGE bug #18521 fixed: Dupligroups + Bullet Softbodies are broken. 2009-04-21 21:33:03 +00:00
e4127da1e3 rna functions are now included in epydocs,
only write the functions into the base rna structs and let epydoc show the inheritance.

examples
http://www.graphicall.org/ftp/ideasman42/html/rna.Mesh-class.html
http://www.graphicall.org/ftp/ideasman42/html/rna.Panel-class.html
http://www.graphicall.org/ftp/ideasman42/html/rna.Header-class.html
http://www.graphicall.org/ftp/ideasman42/html/rna.UILayout-class.html
2009-04-21 20:03:39 +00:00
094b3e81f6 Balance comment markers. 2009-04-21 18:41:45 +00:00
2db9f14ccd Documentation. 2009-04-21 17:58:28 +00:00
41eb029bb9 Old "divide by zero" bug and remove debug printf. 2009-04-21 17:40:39 +00:00
c5756a9822 Compile warnings, typos and some clarifications. 2009-04-21 17:37:07 +00:00
95b43536f6 Some Makefile changes still laying around. 2009-04-21 17:24:16 +00:00
a82a6bedc5 Fix for bug #17457. This bug relates to files that have missing multires vertex data.
The fix is, if the file was saved on the highest multires level, then mesh contains a copy of the vertices anyway, and we can just copy it back into multires.

Otherwise, multires is removed from the mesh to avoid a crash.
2009-04-21 16:58:25 +00:00
6c33cc9bae Bugfix #18550
"Copy constraints" should increase ipo user count.
2009-04-21 15:38:53 +00:00
60867ff106 2.5:
* Changed the buttons window contexts to be like the mockups:
  scene, world, object, data, material, texture, particles, physics
* Removed temporary C layout code for buttons and scene.
2009-04-21 15:30:54 +00:00
d999aef7d8 bugfix #18543
Using feature XRay + Transparent could crash on undo/redo, the
view3d afterdraw was still storing data here whilst it shouldn't...

Reason was that object got added twice actually... but only freed
once. Also caused weird flashy display.
2009-04-21 15:24:04 +00:00
5d0fb28f74 bugfix #18543
Using feature XRay + Transparent could crash on undo/redo, the
view3d afterdraw was still storing data here whilst it shouldn't...

Reason was that object got added twice actually... but only freed
once. Also caused weird flashy display.

Note to Brecht for merging: skip this one, I'll fix it in 2.5 too.
2009-04-21 15:22:41 +00:00
4cf2863a8f SHD_dynamic had gen_utils functions from Mathutils, removing 2009-04-21 13:44:24 +00:00
aff2a11110 Fix for missing include using CMake 2009-04-21 13:34:33 +00:00
ca78b6ee8b Bugfix #18519
MultiLayer save (F3) crashes when no rendering/layers exist, happens for
opengl preview render. It now survives, saving empty file and prints error.

Better solution for later: render profiles!
2009-04-21 13:30:58 +00:00
8b69260f00 hope this lets py2.3 build again 2009-04-21 12:48:49 +00:00
aa3c9ad0d8 needed to remove gen_utils functions from Mathutils.c 2009-04-21 12:42:37 +00:00
d11a5bbef2 BGE: Support mesh modifiers in the game engine.
Realtime modifiers applied on mesh objects will be supported in 
the game engine with the following limitations:

- Only real time modifiers are supported (basically all of them!)
- Virtual modifiers resulting from parenting are not supported: 
  armature, curve, lattice. You can still use these modifiers 
  (armature is really not recommended) but in non parent mode. 
  The BGE has it's own parenting capability for armature.
- Modifiers are computed on the host (using blender modifier
  stack).
- Modifiers are statically evaluated: any possible time dependency
  in the modifiers is not supported (don't know enough about
  modifiers to be more specific).
- Modifiers are reevaluated if the underlying mesh is deformed
  due to shape action or armature action. Beware that this is 
  very CPU intensive; modifiers should really be used for static
  objects only.
- Physics is still based on the original mesh: if you have a 
  mirror modifier, the physic shape will be limited to one half
  of the resulting object. Therefore, the modifiers should 
  preferably be used on graphic objects.
- Scripts have no access to the modified mesh. 
- Modifiers that are based on objects interaction (boolean,..)
  will not be dependent on the objects position in the GE.
  What you see in the 3D view is what you get in the GE regardless
  on the object position, velocity, etc.

Besides that, the feature is compatible with all the BGE features
that affect meshes: armature action, shape action, relace mesh, 
VideoTexture, add object, dupligroup.

Known problems:
- This feature is a bit hacky: the BGE uses the derived mesh draw 
  functions to display the object. This drawing method is a
  bit slow and is not 100% compatible with the BGE. There may
  be some problems in multi-texture mode: the multi-texture
  coordinates are not sent to the GPU. 
  Texface and GLSL on the other hand should be fully supported.
- Culling is still based on the extend of the original mesh. 
  If you have a modifer that extends the size of the mesh, 
  the object may disappear while still in the view frustrum.
- Derived mesh is not shared between replicas.
  The derived mesh is allocated and computed for each object
  with modifiers, regardless if they are static replicas.
- Display list are not created on objects with modifiers.
  
I should be able to fix the above problems before release.
However, the feature is already useful for game development.
Once you are ready to release the game, you can apply the modifiers
to get back display list support and mesh sharing capability.

MSVC, scons, Cmake, makefile updated.

Enjoy
/benoit
2009-04-21 11:01:09 +00:00
e1122a1b67 5th: another compile fix 2009-04-21 10:19:14 +00:00
3e7cbd5388 Blender Python API
- Removed the gen_utils.c dependency from Mathutils (since gen_utils wont go into 2.5 but mathutils will), repalced with python functions.
- removed Blender.Mathutils.Point, since it was not documented, the C api never used it, none of our scripts used it (and I never saw a script that used it).
2009-04-21 09:44:29 +00:00
6c5e18ca98 Fix compilation error in MSVC. 2009-04-21 09:38:27 +00:00
fc7a561de1 4th: another file corrupted 2009-04-21 09:31:07 +00:00
106b5a435c BGE: show profile in millisecond in addition to percentage. 2009-04-21 09:20:47 +00:00
cf9886b0d0 2nd try to merge sim_physics with trunk rev 19825
Please check if volumetrics are yet working
2009-04-21 08:49:06 +00:00
2d054e00b0 Blender Python API
use getseter's for quat and euler types attributes, python3 compatible module initialization for Mathutils and BGL.
2009-04-21 07:16:29 +00:00
70dae5f493 [#18557] incorrect alpha IPO behavior in game engine
from Louis-Dominique Dubeau (zenoparadox)
report contained fix, ancient bug from rev2.
2009-04-21 01:59:14 +00:00
720f7a8b69 use PyList_SET_ITEM instead of PyList_SetItem,
PyList_SetItem does error checking and decref's existing values, PyList_SET_ITEM is a macro for direct assignment, only for use on new lists.
2009-04-20 23:27:53 +00:00
217bbb7800 BGE Python API
Separate getting a normal attribute and getting __dict__, was having to do too a check for __dict__ on each class (multiple times per getattro call from python) when its not used that often.
2009-04-20 23:17:52 +00:00
2d0d06f642 BGE VideoTexture: fix bug with VideoTexture.materialID() since recent commit. 2009-04-20 21:20:33 +00:00
6afaab654d Bugfix for [#18554] Time + Scale Node Crash 2009-04-20 18:31:48 +00:00
449e9a454d Bugfix 18558
In OSX, using spin/extrude etc. buttons, with more than 1 3d window open,
should turn cursor in a Question Mark to indicate you have to tell which
window to use (yes weak, but that's 2.4x!). OSX didn't support that type
of cursor, so no hint happened. Now uses the 'hand' icon for osx... no
nicer one is there afaik.
2009-04-20 18:23:46 +00:00
ea51d03be8 UI: more scene buttons tweaks by Thomas Dinges. 2009-04-20 16:53:50 +00:00
141a229a79 Merge ICON_SNAP_PEEL_OBJECT and corresponding icon in blenderbuttons (need new icon though) 2009-04-20 16:31:46 +00:00
874c29cea8 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19323:HEAD
Notes:
* blenderbuttons and ICON_SNAP_PEEL_OBJECT were not merged.
2009-04-20 15:06:46 +00:00
d76a6f5231 Booleans: Fix for "no faces" error, reported by alxarch, thanks! 2009-04-20 13:18:54 +00:00
7555bfa793 UI: fix for back buffer option in scene buttons, by Thomas Dinges. 2009-04-20 13:16:17 +00:00
0c9de2396a 2.5
Node title and socket labels are now following Style/Font as well, and
scale correctly.
2009-04-20 12:03:55 +00:00
bc06159431 2.5
Fixes:

- HSV picker didn't work. Old option "No Hilite" for buttons made it not
  being checked for input anymore. Needs to be on attention list!

- Node editor wasn't drawing buttons correctly. Two things to keep track
  off:
  - Use wmLoadIdentity(), not glLoadIdentity()
  - I've added a wmPushMatrix() and wmPopMatrix() version for correct
    wm-compatible push/pop. Only one level for now.
2009-04-20 11:39:18 +00:00
4b45c57bb6 Drivers - Rotational Difference
Restored the code to get this working. I haven't tested this to verify it, but it 'should' work...


Also, deleted old gpencil.c file in editors, since it was causing compiling errors.
2009-04-20 10:45:25 +00:00
f2f95caf30 Forgot to add the new gpencil files! :) 2009-04-20 10:20:18 +00:00
74b12d1d6d 2.5
Patch from Joshua, converting Grease Pencil to 2.5.
All GP data now is an ID block, allowing re-use, link and append.
For better contextual control within 2.5, these GP ID's will get
linked to actual data, like NodeTrees, Scenes, Images or Objects.
That will ensure Undo works, and opens up exciting new use cases
as well. :)

Patch note: on reading files, GPencils linked from editors will
get moved to the main library, using standard naming (indicating
where it was used), and with "Fake User" set. That way the user
can manually relink the pencils where appropriate.
We can check on just linking GP to some default, like 3d window
pencils to Scene? Nice to experiment with.

Notes for Joshua:
- for reading old GPencil, it has to use old code as well, meaning
  to tread data as "indirect data, within another ID".
- Saving ID data means the chunk in file BHead needs the ID_GD code,
  and not "DATA", which indicates 'indirect data'. That's the file
  format spec.
- I've added do_versions_gpencil_2_50(), feel free to further tweak
  things here, like linking things to scene or so.
- Formerly GPencil saved 2.50 files won't convert gpencil
2009-04-20 10:13:55 +00:00
332e001989 Drivers: "Scripted Expression" drivers (i.e. PyDrivers) work again
Now it is possible to write a Python Expression using the variable names for driver targets (see mockup from initial commit) to substitute the appropriate values into the expression.

In the __global__ namespace for PyDriver evaluation, the following modules are available:
* __builtins__ - i.e. the builtin Python functions
* bpy - new Python API
* math or m - math module

For example:
Consider a driver with three targets, named: A, B, C
Now, you could write an expression like:
   C if A < 5 else B
or even:
   2*C if A < 5 or A > 20 else m.PI*B

Of course, you don't have to have three targets, the above was just an example.

TODO:
* Bring back way to load pydrivers.py
* Blender.Noise equivalent would be nice to have

P.S.  I hope I haven't made any terrible Python API coding errors here (i.e. mem leaks, etc.)
2009-04-20 09:17:43 +00:00
dee32d0b3f BGE Python API
- initialize pythons sys.argv in the blenderplayer
- ignore all arguments after a single " - " in the blenderplayer (like in blender), so args can be passed to the game.
- add a utility function PyOrientationTo() - to take a Py euler, quat or 3x3 matrix and convert into a C++ MT_Matrix3x3.
- add utility function ConvertPythonToMesh to get a RAS_MeshObject from a KX_MeshProxy or a name.
- Added error prefix arguments to ConvertPythonToGameObject, ConvertPythonToMesh and PyOrientationTo so the error messages can include what function they came from.
- deprecated brick.getOwner() for the "owner" attribute.
2009-04-20 09:13:59 +00:00
6482206078 Added some missing rna entries for scene, and added them to the scene buttons with some missing elements aswell 2009-04-20 04:58:22 +00:00
828581fa07 Drivers: Editing ops in the Outliner
In much the same way as Keying Sets are defined in the Outliner, you can now select items in the Datablocks view of the Outliner, and use the D/Alt-D hotkeys to Add/Remove drivers (repectively). This is useful for settings which don't have buttons yet (in the buttons window).
2009-04-20 03:52:13 +00:00
387aad7275 A bit more F-Modifier wrapping... 2009-04-20 03:29:45 +00:00
8a0a557294 Hopefully a working merge with trunk (could be one error left in raytrace.c - will check afterwards)
Merging 18706 - 19804
2009-04-20 00:19:16 +00:00
9078ce5da2 Scons epydos changed options
- no source code since this is only useful if the epydocs contain code, ours are only docstrings.
- set inheritance to included so you dont have to search up the classes to find available functions.
- SConstruct, isolate the exception for importing epydoc.
- Added a print to the SConscript files otherwise it looks like nothings happening.
2009-04-19 22:02:48 +00:00
Nathan Letwory
fcdbbee208 SCons / epydoc support
* properly detect if epydoc is installed.
  patch by Brandano
2009-04-19 21:26:29 +00:00
f5fc4ebdd8 BGE Python API
- More verbose error messages.
- BL_Shader wasnt setting error messages on some errors
- FilterNormal depth attribute was checking for float which is bad because scripts often expect ints assigned to float attributes.
- Added a check to PyVecTo for a tuple rather then always using a generic python sequence. On my system this is over 2x faster with an optmized build.
2009-04-19 21:01:12 +00:00
5146540095 changed some {} to {0}, these were causing errors on msvc. also got rid of some spurious prototypes I forgot to get rid off. 2009-04-19 20:09:31 +00:00
d78eec9319 2009-04-19 20:09:05 +00:00
084efe0703 added a python26.zip file, and also made scons pick which zip to use based on the python version 2009-04-19 19:36:04 +00:00
7144838606 Compile fixed for Win64.
Please check if that also compiles on win32.
2009-04-19 19:31:32 +00:00
b36514a3be Booleans:
- Enable e.g. subsurf before boolean modifier
- Fix editmode crash
2009-04-19 18:18:52 +00:00
904483c96c Booleans: Should work with modifier stack now. Please report (new) problems. Thanks 2009-04-19 17:47:09 +00:00
6bc162e679 BGE Python API
removed redundant (PyObject *self) argument from python functions that are not exposed to python directly.
2009-04-19 17:29:07 +00:00
fe08da3b4c BGE: fix Pyfrom_id to work on w64. 2009-04-19 17:26:03 +00:00
f1979f45ec RNA:
* Wrapped HeaderType/Header.
* Some tweaks to get type properties wrapped with less code.
* Made Panel space and region types enum instead of string.
2009-04-19 17:12:16 +00:00
7f15445629 Fix for libopenjpeg to enable win64 compile (is in their tracker and will most likely be included in next release) 2009-04-19 16:35:20 +00:00
7dbc9dc719 BGE Python API cleanup - no functionality changes
- comments to PyObjectPlus.h
- remove unused/commented junk.
- renamed PyDestructor to py_base_dealloc for consistency
- all the PyTypeObject's were still using the sizeof() their class, can use sizeof(PyObjectPlus_Proxy) now which is smaller too.
2009-04-19 14:57:52 +00:00
adff6aeb1c RNA: Generic Type Registration
The Python API to define Panels and Operators is based on subclassing,
this makes that system more generic, and based on RNA. Hopefully that
will make it easy to make various parts of Blender more extensible.

* The system simply uses RNA properties and functions and marks them
  with REGISTER to make them part of the type registration process.
  Additionally, the struct must provide a register/unregister callback
  to create/free the PanelType or similar.
* From the python side there were some small changes, mainly that
  registration now goes trough bpy.types.register instead of
  bpy.ui.addPanel.

* Only Panels have been wrapped this way now.  Check rna_ui.c to see
  how this code works. There's still some rough edges and possibilities
  to make it cleaner, though it works without any manual python code.
* Started some docs here:

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNATypeRegistration

* Also changed some RNA_property and RNA_struct functions to not
  require a PointerRNA anymore, where they were not required (which
  is actually the cause of most changed files).
2009-04-19 13:37:59 +00:00
8d2cb5bea4 BGE Python API
This changes how the BGE classes and Python work together, which hasnt changed since blender went opensource.
The main difference is PyObjectPlus - the base class for most game engine classes, no longer inherit from PyObject, and cannot be cast to a PyObject.

This has the advantage that the BGE does not have to keep 2 reference counts valid for C++ and Python.

Previously C++ classes would never be freed while python held a reference, however this reference could be problematic eg: a GameObject that isnt in a scene anymore should not be used by python, doing so could even crash blender in some cases.

Instead PyObjectPlus has a member "PyObject *m_proxy" which is lazily initialized when python needs it. m_proxy reference counts are managed by python, though it should never be freed while the C++ class exists since it holds a reference to avoid making and freeing it all the time.
When the C++ class is free'd it sets the m_proxy reference to NULL, If python accesses this variable it will raise a RuntimeError, (check the isValid attribute to see if its valid without raising an error).
- This replaces the m_zombie bool and IsZombie() tests added recently.

In python return values that used to be..
 return value->AddRef();
Are now
 return value->GetProxy();
or...
 return value->NewProxy(true); // true means python owns this C++ value which will be deleted when the PyObject is freed
2009-04-19 12:46:39 +00:00
d880257d16 Graph Editor: UI bugfixes
* Fixed a few alignment/size issues
* Number buttons work nicely again. Added temporary define for floating point limits here...
2009-04-19 12:26:31 +00:00
c94a8ad620 RNA - F-Curve Modifier Wrapping
* Separated F-Curve specific wrapping out to its own file
* Wrapped some F-Curve Modifiers (others to follow shortly)
2009-04-19 10:44:07 +00:00
92cea7c1b1 KX_MeshProxy "numPolygons" and "numMaterials" attributes were using the "materials" attribute function, error made recently when converting attributes. 2009-04-19 06:48:27 +00:00
d2ec468cd3 Hidden faces were not rendering displayed in the game engine, only the invisible face flag should be used for this.
Hiding faces is a editing option like selection and should not change rendering, it wasn't even working right because meshes without UVs ignored it.
I thought this was needed for compatibility with old files but just noticed this messes up 2 of the files in demos-2.42.zip
2009-04-19 06:29:15 +00:00
Nathan Letwory
e4611218ab BPy
* access to sample buffers count of Lamp
2009-04-19 00:09:47 +00:00
Nathan Letwory
faef9f0ac7 SCons
* some misc changes, mainly cleaning and style unification that were lying around
2009-04-18 17:16:08 +00:00
629c4bf8bf 2.5 MSVC9 projectfiles
* long time due: copy the executables to the install/msvc9 or install/msvc9d dir instead of keeping them in the source tree in the bin folder!
* copy the new ui scripts to the install dir
2009-04-18 10:08:19 +00:00
53fd3847bc BGE: restore a feature that was lost in 2.48: sharing of display lists between duplicated objects. 2009-04-18 09:14:51 +00:00
73f4401ac3 2.5 MSVC9 projectfiles
- added editors/keyingsets.c
2009-04-18 08:40:14 +00:00
Nathan Letwory
bac34bc7e7 2.5 / win64
* make sure right libname is used for gettext.
2009-04-18 00:26:15 +00:00
df8cf26404 Added m_zombie to the base python class (PyObjectPlus), when this is set all the subclasses will raise an error on access to their members.
Other small changes...
- KX_Camera and KX_Light didnt have get/setitem access in their PyType definition.
- CList.from_id() error checking for a long was checking for -1 against an unsigned value (own fault)
- CValue::SpecialRelease was incrementing an int for no reason.
- renamed m_attrlist to m_attr_dict since its a PyDict type.
- removed custom getattro/setattro functions for KX_Scene and KX_GameObject, use py_base_getattro, py_base_setattro for all subclasses of PyObjectPlus.
- lowercase windows.h in VideoBase.cpp for cross compiling.
2009-04-17 20:06:06 +00:00
90c6cf77f1 Fixing SND_Scene.h missing include problems with cmake + bullet 2009-04-17 13:42:40 +00:00
685beb686b UI: fix for mistake in last panel commit. 2009-04-17 13:37:03 +00:00
0db7c68106 UI:
* Forgot to finish this code yesterday, dragging panels was
  broken. This is fixed and new panels are now inserted after
  the last added one, inbetween others rather than at the end.
2009-04-17 11:59:25 +00:00
80e40d504c bugfix #18287
Texture nodes hang when nodes have a cyclic case.

Added a (temp?) provision to tag node->need_exec zero for cyclic
nodes, and added check for this in texture nodes. 
There was also a bug in 'tag changed' for texture nodes, which not
only tagged, but also called the tree exec (should not happen!).

In general the texture exec needs recode; it doesn't use the stacks
as provided per node, but recurses itself to previous nodes, giving
problems like this. Node execs should only do their own bizz, the
node system handles dependency and eval order nicely already.
2009-04-17 10:38:10 +00:00
6761cc00d4 let command line args override the 'blenderlite' target 2009-04-17 10:34:09 +00:00
1dd980768d Missing <stdlib.h> for abs() made this file not compile for me. 2009-04-17 10:24:44 +00:00
aed9f92734 packing from the UV window with margin had a problem with feedback, so running again and again would give different results.
Scale the margin by the combined area of all boxes to give predictable results.
2009-04-17 06:21:49 +00:00
0cda4903b1 [#18533] Little fix in Particle API doc
from Alberto Santos (dnakhain)
2009-04-17 02:33:14 +00:00
7cb8b3910d 2.5 Animation UI Tweaks:
* Added back backgrounds behind buttons for modifiers and driver targets
* 'Protect' toggle doesn't draw for F-Curves with no keyframes to prevent editing on anymore
* Inserting keyframes on objects using builtin keyingsets now use the right names
2009-04-17 02:13:35 +00:00
6386186d25 UI:
* Broke loading buttons_scene.py in last commit.
* Fix issue with space not being distributed equally
  in the layout engine.
2009-04-16 21:58:06 +00:00
Nathan Letwory
cd83474960 2.5 / SCons
* ui layout scripts were not copied to bundle on OSX
  patch by Stephan Kassemeyer on ML
2009-04-16 21:51:20 +00:00
38b6f8f167 UI:
* For new buttons spaces, automatically set horizontal/vertical
  align depending on size, instead of free.

* Cleaned up the UI panel API. There's now a new uiBeginPanel
  function which takes a panel type, and a uiEndPanel which takes
  the final size. uiNewPanel* functions will be phased out.
* Animate the re-alignment when a panel size changes, e.g. when
  enabling dupliframes.

* Load ui scripts from the release/ folder first if it is
  available. This makes it easier to edit ui scripts, since it
  will directly use the original files which avoids having to
  run the build system.
* Improve editing of panel types while blender is open. That
  means fixing some issues with lacking updates, overlaps, strange
  ordering. It even does an animation now when the panel resizes.
2009-04-16 21:39:45 +00:00
2c491b5d2e BGE: slow parent was causing scaling distortion, now use correct quaternion interpolation. 2009-04-16 20:13:13 +00:00
a565154a87 Removed space for target binary name 2009-04-16 15:49:31 +00:00
34dfeb7d50 Remove ftfont from Makefile, it's not there anymore. 2009-04-16 15:01:51 +00:00
82f710fb33 merged pyrna_py_to_param and pyrna_py_to_prop since they are almost the same 2009-04-16 13:21:18 +00:00
f47ab4f0ae 2.5:
* Added extra parameter to generic unique name finding function BLI_uniquename() for specifying the delimeter between non-unique parts of the name and digits.

* Driver target variables now get unique names by default.
2009-04-16 13:10:08 +00:00
23af7214d3 2.5:
* Also look in ./release for scripts instead of next to executable.
* Some warning fixes.
2009-04-16 13:01:50 +00:00
bc347d380d Drivers: Depsgraph building works again
Cleaned up the code for adding driver relationships in the Depsgraph (see! I said it was going to be easy). Now, adding drivers works nicely.
2009-04-16 12:49:12 +00:00
eed6adbb48 Drivers: UI working + bugfixes
* The UI for adding and modifying drivers is now functional, and reflects the new way they work. It has also been tidied up a bit (from the previous incarnation), with RNA buttons starting to be used (currently limited to the 'Path' settings).
* Fixed errors in RNA wrapping for drivers
2009-04-16 12:38:44 +00:00
26a8c63eae UI:
* Don't call generic layout hints templates anymore, i.e.
  TemplateRow becomes Row, etc.
* Added more general layout nesting, using uiLayoutSplit()
  and uiLayoutBox() functions, for which the sublayouts
  can then be accessed using uiLayoutSub(), to put items
  in those sublayouts.
* Some steps to make the layout decisions, like which items
  to put in which columns, independent of the width of the
  window or the text in the buttons. We want the layout to
  be stable under resizes and translations.
* Added an "expand" parameter to uiItemR, used now to expand
  enums into a row instead of using a menu.
2009-04-16 12:17:58 +00:00
Nathan Letwory
db7d0108c2 2.5 / SCons
* make sure makesdna and makesrna work on windows in directories with spaces in them.
2009-04-16 10:45:21 +00:00
079304d199 Animato - Drivers with Multiple Targets:
Drivers now support multiple targets which act as 'variables'. The targets have a short 'name' (see later), and reference some property (in much the same way as F-Curves do, using RNA-Paths) which acts as the 'value'. 

These named variables can then be used in a Python Expression which relates them to each other for more fine-grained control over the result of the driver. By using only the names of these variables in the expressions, we are able to define expressions/relationships in a much more readable way, as data access is separated from data use. This makes the underlying relationships easier to understand.

By default, if no Python Expression is given, the variables are simply averaged together, so old files won't break. :)

For example, check the following diagram (thanks Cessen/Nathan V from Peach team):
http://download.blender.org/ftp/incoming/250_drivers_mockup_cessen.png


TODO List:
* Depsgraph building for new driver relationships doesn't work yet. This needs to be recoded again, but this new system makes this much easier, since the targets are clearly defined (i.e. no need to parse py expressions to get list of objects)
* Graph Editor interface for editing these needs to be rewritten
* Python function for evaluating these expressions is needed (Campbell?)
2009-04-16 07:37:06 +00:00
32253dfaaf bpy_internal_import.c should build with py2.3 now, also gave bpy_internal_import functions better names. 2009-04-16 06:24:47 +00:00
88d394d47d Need to update the RNA pointers before running scripts 2009-04-16 01:42:53 +00:00
a7916f4a3d PoseLib: Fixed up RNA-properties for this operator so that it can be repeated using the exec() callback added in previous commit. 2009-04-16 00:53:22 +00:00
f2e40f7234 2.5 PoseLib/KeyingSets bugfixes:
* Replaced a quicky hack needed to get PoseLib working with a proper new group-naming option for KeyingSets. Now, all builtin KeyingSets will use the name of the data (i.e. Object or PoseChannel) as the name of the group new channels are added to

* Fixed a bug with LocRotScale builtin KeyingSet, which meant that scale keyframes were not getting added.

* TAB key (toggle original pose) now works again. Previously, events were flying past too quickly.
2009-04-16 00:33:40 +00:00
ec11cf9524 2.5
*****
Made selection operators use extend/exclusive (where appropriate)
2009-04-16 00:00:45 +00:00
bbdaa03d65 BGE bug #18168: Get local orientation of object using game engine python script system. Added localOrientation and worldOrientation. orientation attribute deprecated. Same for position and scaling. World attributes are read-only except for worldPosition. Add systematic check on NULL SGNode in all python functions. This is necessary to handle zombie objects (deleted by the game but kept alive by a reference in a list). 2009-04-15 21:17:08 +00:00
ebcd08eb4a RNA fixes provided by Thomas Dinges / DingTo - Thanks! 2009-04-15 21:03:23 +00:00
0c1bfa4a37 Merging Shrinkwrap Constraint!
+bvhtree cache (if the derived model doenst gets destroyed then the same BVHtree can be used)
	this was needed to allow shrinkwrap constraint to be usable.

It has been ready for a long time.. but only got merged now, for 2.49.
2009-04-15 19:33:25 +00:00
52a3d5c518 BGE Python API
Free python modules defined within the blendfile between loading scenes since they would end up accessing old GameLogic, Rasterizer modules as well as old game engine data in the module namespace which can cause problems.
2009-04-15 19:20:12 +00:00
b7e40b955f Optional margin for packing UV islands and the 'Pack Islands' menu item. Useful for baking with bleed enabled. 2009-04-15 18:20:19 +00:00
09015aa8ab 2.5
- Fun for testers: Added "Redo Operator" Panel in view3d 'nkey' region.
  It's going to be part of tools UI I know, but this will give good
  tests of what goes on with operators. I had to add small fixes in 
  Transform for it already. :)
  One important issue to note is that it lists every operator, also from
  non-3D-window ops. Needs checked or classified somehow.

- Fix: removed bad 2.4x hack from how pulldown menus were defined. Made
  widget code cleaner, and will show menus like SHIFT+A correct now.
2009-04-15 17:53:12 +00:00
f46f93ea13 This is patch [#18408] Build issues with make on Cygwin hosted MinGW (2.48.1)
submitted by Wayne Dennis

adds an include, changes pythonlib and does a little cleaning of dlltool stuff.

Kent
2009-04-15 16:23:13 +00:00
3616eb9031 Fixing more errors coverity found.
Imagepaint make sure ibuf exists before we use it.  This is CID# 545
editmesh_tools.c make sure were not indexing array with -1 This is CID# 137
	(also removed some trailing whitespace I found)

anim5.c	totlen could be -1 so check its > -1  This is CID# 134

Kent
2009-04-15 16:16:00 +00:00
41dd360420 2.5: Operator naming, reviewed some of the recent changes
by Shaul, did some minor tweaks.
2009-04-15 15:40:31 +00:00
4e4e8ef98f RNA:
* For RNA wrapped functions, the prototypes of the original
  function being wrapped is now generated as well. This is
  an extra check to ensure that the function is correctly
  wrapped. It's printed after the function is used to still
  get proper warnings in case the #include for it is missing.
2009-04-15 15:12:42 +00:00
8b1207d500 UI:
* Converted scene buttons layout code to use python.
2009-04-15 15:10:31 +00:00
874c9e8c58 UI:
* Added simple row template to layout buttons
  in a horizontal row, so you don't need to use
  columns for it.
2009-04-15 15:09:36 +00:00
ad164a5261 2.5
Fixed & upgraded tooltips to new drawing system.
Also fixed small error in menu shadows. Rounding of shadow below
menu went wrong.
2009-04-15 14:43:54 +00:00
514c78ba39 BGE MouseFocusSensor
- fix for multiple viewpors broke single viewport (both work now)
- python could get uninitialized values from m_prevTargetPoint and m_prevSourcePoint
- getting the RayDirection for python could crash blender trying to normalize a zero length vector.
- added python attributes
- removed unused canvas from the MouseFocusSensor class
2009-04-15 13:50:56 +00:00
677300f044 cmake support for python25_d.lib in debug on win32. other platforms should work as always 2009-04-15 13:11:08 +00:00
b68fb5df74 Action Constraint: Optimisation attempt
Following on from the methods added specially for PoseLib to only execute the F-Curves in a given Action Group, I've attempted to use this for evaluating Action Constraints on Pose Channels. This does rely on the F-Curves being in groups named according to name of the Pose Channel of interest, hence, we may need some way to be able to fine tune this later. 

Preliminary tests seem to be promising, with rigs with quite a few action constraints being slightly more responsive (subjective test though). Please test thoroughly.
2009-04-15 12:59:49 +00:00
1680f5f2b0 PoseLib: Fixed lingering bugs with Browsing (Ctrl-L)
* Bug with confirming was due to mixed up order for events handling and updates for drawing. Now events are handled before relevant updates are done for drawing, since these only get called when an event occurs.

* View manipulations work again, and in a much nicer way thanks to the OPERATOR_PASS_THROUGH flags :)

* Search seems to work much better now again too...
2009-04-15 12:38:04 +00:00
4c66f26230 PoseLib: Interactively browsing poses with Ctrl-L now mostly works again
This (most important part) of PoseLib now mostly works again. It even works for PoseLibs saved with the old animation system.

However, there are a few annoying bugs that need to be addressed still:
* When 'confirming' poses, the pose changes to the next one before PoseLib exits. I'm not quite sure where this is coming from yet...
* There are still a few minor bugs in the search-string code that will get ironed out
* AutoKeyframing doesn't work yet for this
2009-04-15 12:04:10 +00:00
e8f4d93221 Disable using KX_GameObjects in python that have been removed from the scene (zombie objects) by raising a RuntimeError when accessing methods, attributes or passing to a function.
Common cases of this are when python references an object from the AddObject actuator that has ended, or a scene has been loaded and the old objects freed.

This means some scripts will raise errors now in certain cases but better give the error early rather then failing silently with strange hard to track down behavior & crashes.

Added "isValid" attribute for checking objects are in a scene.

At the moment it uses the SceneGraph Node to check of the objects valid but it might be better to do this in a more generic way so scenes, meshes etc also have this check.
2009-04-15 10:57:28 +00:00
1f95600c5a Fixing linux compiling 2009-04-15 10:18:58 +00:00
19c869ab64 BGE Py Api
importing modules wasnt returning the error from the blender text if it failed.
2009-04-15 08:08:42 +00:00
34a617e308 [#7789] 3DS Import , Mesh not correct since Blender 2.44
There is a problem importing 3ds files where I cant find a way to check if the transforms are applied to the vertex locations or not.
Since 2.44 I made the importer assume they were not since you can manually remove transformations, but not reverse.

Nevertheless most 3ds files have the matrix applied, better not give a bad import by default.
Did some research and other 3ds importers (lib3ds for eg), have the same problem and just assume the transformations applied.

3dsMax imports both correctly so there must be a way to tell but I could not link it to the 3ds version or other mesh options.
Added an option to workaround this problem in rare cases where its needed.

- KX_GameObject.cpp & KX_Scene.cpp, clear the dict before removing the reference in case there is a circular reference.
2009-04-15 07:00:11 +00:00
efb7dd86ff Fix for own recent reference count error.
- The armature weakref list was  being incref'd twice then decrefed twice (incref and decref were used incorrectly), now only once. My 'fix' broke this.
- In bpy_pydriver_create_dict the 2 refs added from running PyDict_SetItemString twice were undone when clearing the dictionary (added comment)
- changed Py_XDECREF to Py_DECREF int BPY_pyconstraint_update and BPY_pyconstraint_target, Py_XDECREF checs for NULL value which would have crashed blender before it got to Py_XDECREF anyway.
- after every error is reported (PyErr_Print), remove sys.last_traceback and clear the error, I found this fixed certain crashes (usually when starting the game engine or exiting blender), so best do this all the time.

- header_text.c, CcdPhysicsEnvironment.cpp, KX_CameraActuator.cpp - remove some warnings.
2009-04-15 04:34:27 +00:00
c657313fee PoseLib: Operatorfied Add/Remove/Rename Tools
Changes:
* These still use the old hotkeys - Add (Shift-L), Remove (Alt-L), Rename (Ctrl-Shift-L)
* Outliner now shows PoseLib entry. Todo still is to use a different icon for this?

Notes:
* The code is now much simpler in many places :)
* Add and Rename operators require a string as input to set a new name for the Pose concerned. For now, I've just added a prop for this, which will hopefully be able to be filled in at some point.
2009-04-15 03:22:22 +00:00
4fe917ba26 update for DXF-Importer v1.12, DXF-Exporter v1.29 - 2009.04.11 by migius
- added DWG support, adapted Stani Michiels idea for binding an extern DXF-DWG-converter

The external DXF-DWG converter "dconvertcon.exe" 355kb comes from openDesignAlliance www.opendwg.org, is free, but not opensource, not GPL-compatible (can not be bundled with commercial programs), so must be downloaded and installed in Blender script folder by user. It is a DOS console application, can be started in background mode, works on Windows, and in Wine on Linux and OSX. Version 1.0 (2002) supports conversion between DXF<->DWG for autocad release: 2.5, 2.6, 9, 10, 11, 12, 13, 14, 2000, 2002.
2009-04-15 01:37:50 +00:00
2dbf73f6a0 2.5 PoseLib - First steps to get PoseLib to work in 2.5
* Cleaned up Keyframing API to get eliminate some of the problems faced during the original implementation of PoseLib, thus reducing code redundancy. 
* Added new Animato evaluation functions specifically for use by PoseLib. 
* Replaced parts of PoseLib code which relied on old animation system to the equivalent code for Animato. Notice the much cleaner + saner + compact code!

Next step is to operatorfy the PoseLib tools (while maintaining possibility for an API to some things) :)
2009-04-15 01:10:36 +00:00
a277b979f2 v1.29 - 2008.12.28 by Yorik van Havre
- modif POLYLINE to support bulge segments
2009-04-14 23:57:14 +00:00
494f0fa4e7 BGE bug #18522 fixed: Dupligroup offsets don't work in BGE. 2009-04-14 20:54:04 +00:00
bc355482ab BGE: Keep Sumo and ODE in sync with Bullet at API level, fix a compilation problem in MSVC. 2009-04-14 17:22:14 +00:00
c62dfc498d [#18517] Python scripts segfault on loading
own error, EXPP_incr_ret from a macro was an implicit decloration in BGL.c
For some reason this only crashed on 64bit linux

To my defence the BGE makes so many warnings that they become usless, need to improve the situation here at some point.
2009-04-14 17:19:09 +00:00
bcabc596c9 Bugfix #18108
Another bug in the 'radius per vertex' feature in curves.

If you set front/back face off for curves, and make it bevel or give
depth, the curves should draw as tubes. This feature didn't work in 2.48
either... 

Still unsure about this implementation, campbell can check!
2009-04-14 17:13:21 +00:00
5b3d7bfdf6 2.5
More cleanup!

- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
  Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
  (was only in use for radiosity buttons)

And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:

- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
  to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
  a several calls using different args.

Further just added the missing includes, and removed unused vars.
2009-04-14 15:59:52 +00:00
3511f8ef9f BGE Physics
Clamp objects min/max velocity.
Accessed with bullet physics from the advanced button with dynamic and rigid body objects.
- useful for preventing unstable physics in cases where objects move too fast.
- can add linear velocity with the motion actuator to give smooth motion transitions, without moving too fast.
- minimum velocity means objects don't stop moving.
- python scripts can adjust these values speedup or throttle velocity in the existing direction.

Also made copy properties from an object with no properties work (in case you want to clear all props)
2009-04-14 12:34:39 +00:00
3ef247eed9 FCurve Modifiers - "Limits" Modifier:
This new modifier clamps the values of the F-Curve to lie within specified bounds, much like Limit Location/Rotation/Scale constraints do. You can limit by time range(s) and/or value range(s).
2009-04-14 11:53:41 +00:00
2d17d86239 Action Code - Tidied up some code that wasn't working yet 2009-04-14 10:18:48 +00:00
1bc31fc7f9 BGE Bugfix
[#17678] "Mouse over" sensor broken when using viewports

Loop over all the scenes camera viewports and check the mouse is inside the viewport before casting a ray.
2009-04-14 03:08:09 +00:00
0b8661ab4d BGE: Occlusion culling and other performance improvements.
Added occlusion culling capability in the BGE. 
More info: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.49/Game_Engine#BGE_Scenegraph_improvement
MSVC, scons, cmake, Makefile updated.

Other minor performance improvements:
- The rasterizer was computing the openGL model matrix of the objects too many times
- DBVT view frustrum culling was not properly culling behind the near plane:
  Large objects behind the camera were sent to the GPU
- Remove all references to mesh split/join feature as it is not yet functional
2009-04-13 20:08:33 +00:00
6f12e584a9 SVN maintenance. 2009-04-13 19:33:22 +00:00
cf6a1630cf 2.5
Code revamp: moved the animation colors for widget to own struct, was
polluting the per-widget theme colors too much. Still WIP here... it
will go to Theme struct once I've removed all old colors.
2009-04-13 15:55:27 +00:00
2a6b1db9ad 2.5
Bugfix: loading 2.5 .blend files in different sized windows didn't correct
the screen size for it yet.
2009-04-13 14:39:43 +00:00
bf2ccf04a7 2.5
Makefile update for osx: copy ui scripts to .blender dir in .app folder
2009-04-13 14:22:22 +00:00
4263c13c39 Animato Bugfixes:
* Copying objects with animation data now works correctly. Previously, actions were not getting copied correctly, leading to loss of data in some cases.
* Action and Graph editors now display the name of the Action concerned (for 'Action' folder channels), making it easier to tell which AnimData blocks are sharing the same actions
* Added some code to make relative KeyingSets (converted from absolute ones) work better.
2009-04-13 11:15:43 +00:00
d91d64d807 [#18329] VRML import on indexedfaceset munges some colors (off by one)
Thanks to Ezra Peisach for including a patch in the report.
2009-04-13 06:50:02 +00:00
956d120098 Bullet integration uninitialised values.
Erwin, r16812 "Add Fh/Rot Fh to Bullet" - added this function
  ClosestRayResultCallbackNotMe(rayFromWorld,rayToWorld,body,parentBody)
  
  ...but parentBody was being ignored and the m_parent value wasn't being initialized.


Run memset() on CcdConstructionInfo which had some unset members for CreateSphereController() and CreateConeController().
2009-04-13 04:54:12 +00:00
1b73d3ce05 mesh proxy attributes from andrecastelo 2009-04-13 03:43:16 +00:00
b27e240124 Further simplified code for defining builtin KeyingSets (i.e. made the macros do more!) 2009-04-13 02:57:24 +00:00
b27436af7c 2.5 - Separated Keying Sets code out into its own file 2009-04-13 02:40:56 +00:00
f0fea32129 2.5 - Assorted tweaks in Graph Editor 2009-04-13 00:46:32 +00:00
a71016a1a3 additional op naming convention changes 2009-04-12 23:05:40 +00:00
e9937120b8 py3 needs print() 2009-04-12 22:53:54 +00:00
81e0f6f3ce curve op align to naming convention 2009-04-12 22:43:07 +00:00
0d682a369b armature ops aligned with naming conventions - small fix 2009-04-12 22:16:21 +00:00
066098dfec this should fix building with mingw 2009-04-12 22:05:09 +00:00
e625d9875e 2.5 MSVC projectfiles
- added missing files
- cleanup of some project settings
- RNA building has dependency issue: had to add interface_api.c to the makesrna project and makesrna and rna projects now include editors.
- added debug libraries for OpenExr, please update lib/windows/openexr to get them
2009-04-12 20:34:46 +00:00
8a7a98cbdd sequencer op names change 2009-04-12 20:32:42 +00:00
5b07f06136 fix some refcounting issues with PyDict_SetItemString 2009-04-12 20:19:27 +00:00
Dalai Felinto
8664e35adf 2DFilter bugfixes:
[#18154] 2dFilter and motion blur should run only once to all the scenes
[#18504] The GL_PROJECTION matrix is being reset by the 2dfilter.
2009-04-12 19:46:50 +00:00
17814e8bf1 editmesh_tools.c op name change 2009-04-12 17:54:07 +00:00
0780269f13 editmesh_mods.c op names change 2009-04-12 17:43:43 +00:00
095fe990e8 2.5
Patch provided by Thomas (DingTo). Fixes min/max limits in rna.
2009-04-12 17:28:41 +00:00
5bdd541f0c op names change 2009-04-12 17:28:16 +00:00
5b942b9d5b [#18516] Particle children API for python (Complete).
from Alberto Santos (dnakhain) 
----
This patch complete previous one that I submit with new variables relationated with Particle System children (With variables related to Rough, Kink and Branch).
2009-04-12 17:07:40 +00:00
17f35293ee PropertyActuator toggle option didnt run when the Value field was empty. 2009-04-12 16:10:43 +00:00
332032fb99 BGE Python API
Support for assigning any Type to a KX_GameObject

so you can do...
 gameOb.follow = otherGameOb
 gameOb[otherGameOb] = distanceTo
 gameOb["path"] = [(x,y,x), (x,y,x)]
 del gameOb[mesh]


* types that cannot be converted into CValue types are written into the KX_GameObject dict
* the KX_GameObject dict is only initialized when needed
* Python properties in this dict cannot be accessed by logic bricks
* dir(ob) and ob.getPropertyNames() return items from both CValue and Py dictionary properties.

Also found that CType was converting python lists to CType Lists but very buggy, would crash after printing the list most times.
Use python lists instead since logic bricks dont deal with lists.
2009-04-12 14:22:51 +00:00
5cb480cef4 2.5
Various ui fixes:

- panel drawing now correctly follows scaled view
- made imagewindow buttons using TH_PANEL color back (was too dark)
- click on open/close panel was wrong
- menu items disabling now draws correct
- curve/hsv widgets didn't draw on right locations
- numsliders have nicer interior slider decoration
- new type TOGBUT to enforce old style toggle button (not new type
  'option button' with checkmark
- (temp) disabled live updating while using Curve widget, was 
  too slow to be fun. Needs general solution :)
2009-04-12 13:40:29 +00:00
1fec143198 Graph Editor: Bugfixes
* Fixed bug with curves sometimes not being displayed. Will investigate further tomorrow.
* Copy/Paste buttons in header now work. I've ported these over to use operator buttons
* Ctrl-Alt-Shift-RMB now selects all the keyframes in multiple F-Curves at once
2009-04-12 13:19:21 +00:00
ee24c829b5 need strtoll defined as _strtoi64 to build on windows 2009-04-12 10:56:36 +00:00
5b306b7541 BGE Python API
added defines PY_SET_ATTR_FAIL, PY_SET_ATTR_MISSING and PY_SET_ATTR_SUCCESS

This is useful when objects that have user defined attributes (GameObject and Scene)
When calling setattr on the parent, a return value of PY_SET_ATTR_FAIL means the attribute exists but failed to be set, so don't set the custom attribute.
2009-04-12 09:56:30 +00:00
2db495d4e3 Anim Editors: A few more hotkey tweaks 2009-04-12 08:21:22 +00:00
db3abe9456 Graph Editor:
* Column select (ALT-RMB) works again, and in conjunction with 'extend' (i.e. SHIFT) to add to selection instead of just replacing
* Select all keyframes in curve (CTRL-ALT-RMB) now works
2009-04-12 08:17:46 +00:00
55d2b184ec added "toggle" an option for the property actuator.
much less hassle then setting up a property sensor and 2 assignment actuators, or through python.
2009-04-12 07:24:04 +00:00
dcb07e387d Action Editor: Selection tools cleanup
* Cleaned up the code for selecting keyframes
* Click-column-select (Alt-RMB) now works

* Also, moved a function used in both Action/DopeSheet and Graph editors to the Animation module
2009-04-12 06:47:25 +00:00
33170295c8 use long long rather then int for storing game logic properties.
There were also some problems with int to python conversion
- assigning a PyLong to a KX_GameObject from python would raise an error
- PyLong were coerced into floats when used with internal CValue arithmetic

Changes...
- PyLong is converted into CIntValue for coercing and assigning from python
- CValue's generic GetNumber() function returns a double rather then a float.
- Print an error when a PyType cant be coerced into a CValue

Tested with python, expressions and property sensor.
2009-04-12 06:41:01 +00:00
4cd088b105 BGE Py API
- setting the scene attributes would always add to the scenes custom dictionary.
- new CListValue method from_id(id)

so you can store a Game Objects id and use it to get the game object back.

 ob_id = id(gameOb)
 ...
 gameOb = scene.objects.from_id(ob_id)
 
This is useful because names are not always unique.
2009-04-11 20:58:09 +00:00
e0d794b31e Slight improvements in release creation.
Version string is compatible with all previous releases, but report
subversion if not 0.
Keep distribution dir so you can run from there without needed of unpack,
and make messages and cmds be in sync.
2009-04-11 19:04:59 +00:00
3f98b7ac35 Added back importing UI scripts rather then running,
The bug was todo with bpy.data and bpy.types becoming invalid, temporary fix is to re-assign them to the bpy module before running python operators or panels.
will look into a nicer way to get this working.
2009-04-11 16:17:39 +00:00
91d6e68830 changed parts x parts y and threads to be minimum of 1, thnx DingTo 2009-04-11 16:10:15 +00:00
37e53b2e1f bugfix from Moguri, AddReplica wasnt setting the light layer from the parent 2009-04-11 15:59:11 +00:00
c848ea953d 2.5 / RNA
API, added support for return values for RNA_function_call_direct and completed the code. Didn't test it though.

Returns works exact the same way as other parameters for format strings except you put a R in front of it. For instance for a function that accepts two vectors and returns a vector you use a format like "f[4]f[4]Rf[4]". 
I'm thinking about allowing arbitrary white space in the format string (or use comas as separators) to make it more readable. 
The return format *must* always come last and of course the corresponding argument you pass to the function has to be a pointer so that it can be filled with the return value.
2009-04-11 15:46:35 +00:00
a406c15d93 Python Api
own error with refcounting and raise an error when bpy.types cant generate a subtype (though it shouldn't happen)
2009-04-11 15:05:42 +00:00
f28a6a90f1 2.5
Styles/fonts will be saved in userdef, but not yet... forgot to
zero pointers on read, causing crash on .B.blend read saved in 2.5
2009-04-11 14:43:03 +00:00
8132ca62df hem.. other small fix 2009-04-11 13:24:02 +00:00
288f772350 2.5 / RNA
Committing quick RNA function calling RNA_function_call_direct* functions set à la fprintf.

It works like this (with ptr being an RNA pointer to some ID):

RNA_function_call_direct_lookup(ptr, "rename", "s", "MyCamera");

the format specifier would not be strictly needed but I prefer to keep this as it gives nice error handling in case some RNA function changes. 
Format strings are very easy and similar to python ones:
"b" for booleans
"i" for integers
"f" for floats
"s" for strings
"e" for enums (using int values)
"O" for pointers (using O as in py, we can change to P)
"N" special NULL parameter, valid to skip optional parameters
For bools, ints and floats you can use a special format specifier with [n] where n is the size of an array of that type. For instance "f[4]" to set a location/vector (it expects a pointer to float* holding the array).

Return values still have to be implemented.
Also I know the name is a bit long maybe we can cut it up at RNA_call_direct or simply RNA_call.
2009-04-11 12:44:01 +00:00
963e217c2a undo previous commit, changing running the script to importing it somehow made it crash when running the class functions. will look into this further. 2009-04-11 10:01:49 +00:00
59578bfad2 as per discussion with ton, the editmesh accessors now live
in blenkernel.
2009-04-11 08:26:51 +00:00
fc02e980f4 Drivers: Errors + UI Tweaks
* Invalid drivers are now tagged accordingly and are not evaluated until they are manually refreshed using the 'Update Dependencies' button
* Drivers with errors have a error warning shown in their UI
* Rearranged the UI buttons a bit for drivers, adding support for a 'remove' driver button.
2009-04-11 06:48:39 +00:00
9d922b4c24 Changed the script UI registration to import rather then run each python script,
this means it caches the compiled pyc files after importing fro the first time.

My times for importing 501 buttons_objects.py files were.
- running each as a script 1.9sec
- importing for the first time 1.8sec
- importing a second time (using pyc files) 0.57sec

Also added "bpy" to sys.modules so it can be imported.
2009-04-11 05:46:40 +00:00
c7b587105f UI:
* Added very basic loading of .py files on startup to define panels.
  It now executes all .py files in .blender/ui on startup. Right now
  this contains the object buttons, the C code for it is commented out.

  These files should get embedded in the blender executable as well
  eventually, that's a bit more complicated so this works for now.

* For scons and cmake it seems to copy & find the files OK, for make
  only "make release" works (same with scripts/ folder it seems).

* Added BLI_gethome_folder function in BLI_util.h. This is adapted
  from bpy_gethome, and gives the path to a folder in .blender like
  scripts or ui.

There's plenty of things to figure out here about paths, embedding,
caching, user configs ...
2009-04-11 02:18:24 +00:00
3ed5e21537 UI:
* Template slots are no longer specified per item, but are
  a state now, set with uiTemplateSlot.
* Some renaming of Layout functions for consistency.
* Fix for roundbox in stack template, now is always behind
  the other buttons.
* Improved python API for layout:
  http://www.pasteall.org/5008/python
2009-04-11 01:52:27 +00:00
9814ea4bcb RNA: python support for REQUIRED flag for function parameters. 2009-04-11 01:45:05 +00:00
344449e483 RNA:
* Added REQUIRED flag for function parameters.
* Made dupliframes/verts/faces/groups an enum, and make it editable.
* Enum bitflags were broken, fixed.
2009-04-11 01:43:50 +00:00
728767bad7 2.5 Drivers:
* Fixed bug with setting the active F-Curve
* UI for editing drivers now works
2009-04-11 00:29:21 +00:00
48514b3d52 Fix for: [#18499] Particle size can only be set in steps of 0.1
- Some button settings were wrong.
2009-04-10 21:07:32 +00:00
c1cf50be79 Mesh effector surface option:
- Most mesh particle effectors can now have their effection point taken per particle as the nearest point on the mesh surface.
- This is activated with the "surface" button in the effector field panel.
- Activating the option adds a "surface" entry to the modifier stack where the state of the mesh is read from.

For an example of usage see http://www.youtube.com/watch?v=3XkO1EAmJks.
2009-04-10 19:40:21 +00:00
5836cba0a5 Syntax error, unexpected ). 2009-04-10 18:47:33 +00:00
a55feb91de 2.5 / RNA
Corrected a description.
2009-04-10 18:03:24 +00:00
a14630c9d3 2.5
Quick hack to enable zoom in buttons window again.
It uses bad old conventions for fixed panel width still, view2d has
to be tweaked for new system. But, it shows layout to work. :)
2009-04-10 17:39:37 +00:00
2fff90bbb4 Added function name to many of the PyArg_ParseTuple calls in gameengine
This way python raises more useful messages.
2009-04-10 16:45:19 +00:00
4e81404d7e 2.5
Grand cleanup: 
- removal of FTF and ftfont dir
- removal of text.c which wrapped it
- wrapped old text drawing code temporarily, need to decide how 'style'
  will behave per editor when you draw strings outside interface code.... 
  wouldn't be very useful to set fonts locally all over?
2009-04-10 16:30:28 +00:00
a412ce0702 strip indentation from lines of OBJ files.
OBJ's from VMD's molecular visualization program had this.
2009-04-10 14:33:52 +00:00
6124933781 2.5
Nicer implementation of blurred font draw, moved to blenfont
module. Set it with BLF_blur(value). Current kernels implemented
are 3 and 5 only. Blenfont module can extend this once.
2009-04-10 14:27:29 +00:00
4ff661c989 X3D Import was broken because some arguments from VRML were missing. 2009-04-10 14:09:44 +00:00
d2cc19dcc6 2.5
More font style work;

- hooked up almost all ui buttons code to new font
  system, including text clipping
- panel headers scale now too to smaller fonts
- added further style hints, for shadow/emboss. Is all going to
  be in UI designer control!
- for fun; changed layout engine to spread vertical buttons in
  window width

Next: removal of all usage of old font system, using 'styles'.
Will also move font blurring to blenfont module.
2009-04-10 14:06:24 +00:00
a4c4ee2f99 2.5 Drivers - Widget Colours
* Widgets now get coloured when driven. The colour used is debatable, but I've just set it to a purplish colour so that it's easy to distinguish from animated/keyframes/highlight colours.

* New drivers are given generator F-Curve modifiers by default so that they at least show up in the view.
2009-04-10 13:16:50 +00:00
6593bbaca2 2.5 - Groundwork for Adding/Removing Drivers
Drivers can now be Added/Removed from buttons using the D/Alt-D hotkeys, and also through the menu. Driver settings (i.e. the target) are not set by default. To set those, go to the Graph Editor (see notes).

Notes:
* Buildsystem maintainers - I've added a new file "editors/animation/drivers.c"
* Widget colours for the driven-setting indications are needed 
* To see the new drivers, go into Graph Editor -> "Drivers" mode. Currently, there's a little bug there which prevents editing of the new drivers.
2009-04-10 13:08:12 +00:00
be8b7ead51 Action Editor - Part 2 of Code Cleanups
Nothing much to see here... there's still a few things to recode a bit nicer...
2009-04-10 12:06:31 +00:00
487561882d Animation Editors - Part 1 of Code Cleanups
* Fixed a few typos in the code
* Switched the meaning of the Ctrl and Alt modifiers when selecting keyframes. 
- Ctrl is now select all keyframes on one side of time cursor
- Alt is now select all keyframes at same time as a particular keyframe. 

TODO:
While testing these changes, I've found that this column-select is not working yet as the tolerances are too low. This will be rectified soon.
2009-04-10 03:34:20 +00:00
6121d4b9fe Particle effector falloff maxdist etc. didn't work like it was supposed to. 2009-04-09 23:43:25 +00:00
5031fe982e BGE API cleanup: ConstraintActuator. 2009-04-09 23:10:12 +00:00
ac45472a17 BGE Bugfix
The End key didn't work work at all for the keyboard sensor.
Removed getEventList() since it was added since 2.48a release.
2009-04-09 22:15:26 +00:00
b0cca7de26 BGE API cleanup: StateActuator. 2009-04-09 21:15:44 +00:00
09a5ffdf07 BGE API cleanup: sound actuator. 2009-04-09 20:40:12 +00:00
92e17f1fa9 2.5 / RNA
DNA_texture_types almost finished, missing still plugin type.
I noticed many texture share the same noise settings maybe this can be grouped into a common function.
Also testing out first commit.
2009-04-09 20:33:39 +00:00
79c30a0752 2.5
WIP commit for UI drawing.

- Hooked up Diego's new Font API
- Added Style definitions for fonts, currently it uses
  a different font for panel titles to show it.
- Styles are in Userdef now too, still not finished 
- Userdef "DPI" will offer global control over font size,
  to match monitor size/resolution. It's meant to scale
  widgets and headers too btw, later.
- Lots of code removed for old fonts, but that's unfinished.

On todo: too much to mention, will continue happily tomorrow!
2009-04-09 18:11:18 +00:00
46d8c1ebc7 talked to vekoon and he's ok about using pythons CFunction rather then our own pytype.
If printing PyTypes becomes important we can do it a different way which is still less then 10 lines.
2009-04-09 17:31:23 +00:00
bca1ca9d1e Added rna functions so they get included in a dir(rna_struct) from python.
Added a check that a panel panel is a subclass of bpy.types.Panel (need a better way to access this type)
2009-04-09 16:52:18 +00:00
4669fa48a8 Added GameKeys.EventToCharacter(event, is_shift) so you can get the character that would be types when pressing a key.
Last commit was made in the pydocs folder only, so this includes changes mentioned in rev 19620.
2009-04-09 16:00:45 +00:00
26568d0303 RNA: makefiles aren't working correct on Mac currently,
temporary workaround.
2009-04-09 13:32:14 +00:00
9196d88242 Experimental removal of pyrna_func_Type (ifdef'd out)
Since adding a new type gives quite a lot of extra boiler plate functions.

Return PyCFunction's main disadvantage is it does not have a uniqie name when you print it.
2009-04-09 13:20:48 +00:00
e14e66f041 BGE Py API
- added keyboard senser attribute "events" to replace getEventList()
- fix 2 memory leaks in the python api (was making a list but not returning it)
- setting readonly attributes didnt give a good error message.
2009-04-09 12:53:56 +00:00
84f3e7d94d 2.5 Bugfix: Trying to insert/delete keyframes on old-style buttons would crash
Fixed the problems with using uninitialised vars in the calls for inserting keyframes from buttons. Oldstyle buttons (i.e. those without any RNA links, such as the 3D-View header buttons) would crash otherwise.
2009-04-09 11:36:12 +00:00
3be2b8995e Remove redundant include GL/glu.h in KX_Dome.cpp. 2009-04-09 10:29:07 +00:00
65f65a729a key logging didnt work for alphanum keys -=_+ and |\ since revision 2 and nobody noticed! 2009-04-09 10:28:14 +00:00
c29d51f1e8 BGE Text - fix for tab drawing as an @ and not adding white space.
Tab width is always space*4.
2009-04-09 10:05:17 +00:00
eacf5b5d6d BGE Text
- multi-line strings for bitmap text 
- keyboard sensor now logs return and pad enter as "\n"

BGE std::vector use in Value.cpp and RAS_MaterialBucket.cpp
The size of a new list is known before making them, reduce re-allocs, though probably not a noticeable speedup.
2009-04-09 09:50:17 +00:00
a59ee83916 Animation Editors - Bugfixes:
* Collapse selected channels should now work for most channels. It still doesn't work for Action Groups for some reason...
* Objects are now deemed to only be selected in Animation Editors if the are selected (i.e. if they are active but not selected, they are no longer considered to be selected)
* Outliner updates when scrubbing the TimeLine. As a consequence, anim playback with an Outliner open is a bit slower now.
2009-04-09 07:26:49 +00:00
ba4ad93ead Python 2.3 wouldn't compile with BGL. 2009-04-09 01:52:29 +00:00
5b0d75e831 BGE API cleanup: 2DFilterActuator. 2009-04-08 21:40:55 +00:00
24f1355d4f Fix gcc compiling problem with C++ syntax in KX_Dome.cpp. 2009-04-08 20:10:27 +00:00
41b8259580 2.5: clipboard fix to only do the conversion to \r\n line endings on windows. 2009-04-08 18:48:17 +00:00
25d0720dc4 2.5:
* Fix to make python panels callbacks get the actual
  blender Panel as an argument, instead of any instance.
* Fix for callback validation in python 2.5, worked OK
  in python 3.0 but gave error in 2.5 because it's a
  method instead of a function there.
2009-04-08 18:45:41 +00:00
1ee970e03b small bge edits
- Only try and remove light objects from the light list.
- Only loop over mesh verts once when getting the bounding box
- dont return None from python attribute localInertia when theres no physics objects. better return a vector still.
- add names to send message PyArg_ParseTuple functions.
2009-04-08 17:40:09 +00:00
db33320df7 BGE patch #18350: Add sendMessage() to GameLogic. Added sendMessage to both GameLogic and KX_GameObject. 2009-04-08 16:57:08 +00:00
d979085614 2.5
- Updated panel tabbing code to at least make it work again
- And some more minor UI tweaks
2009-04-08 16:51:35 +00:00
9b3b52dfd6 RNA:
* Added the build system code to compile files named
  editors/*/*_api.c into the makesrna preprocessing.

  The reason to do this is to keep operators and API
  close together, but it doesn't fit well with the build
  system, especially Makefiles use an ugly hack here.

* Some fixes to pass an RNA AnyType through the API,
  this will give a PointerRNA, for use in the interface
  code for example.

* Added RNA wrapping of some UI template code as a test.
2009-04-08 16:40:46 +00:00
370850146f BGE patch #18051: add localInertia attribute to GameObject. 2009-04-08 16:25:00 +00:00
2074128fad Patch #18462: Fisheye (Dome) and Spherical Panoramic mode in BGE.
User guide:
http://wiki.blender.org/index.php/Dev:Source/GameEngine/Fisheye_Dome_Camera

Fixed two bugs from original patch:
- deleting a text will clear the warp field from Game framing settings
- removed spurious black dots along the edge of the cube map in the gameplayer 

Known limitation:
- resizing of the screen doesn't work in the gameplayer

Known bugs:
- Texture with reflexion are not rendered correctly
- Spurious problems with light
2009-04-08 15:06:20 +00:00
4b2072bec3 Animation Editors: Restored operators to expand and collapse channels
There are two operators: one for expanding channels and one for collapsing them. These operators each have a property, "All", which specifies if they should expand/collapse all channels regardless of selection.

TODO:
* A few of the sub-object channel types still needs to be supported by this.
2009-04-08 12:35:38 +00:00
0f4a07afb9 Builtin KeyingSets Bugfix:
* Builtin KeyingSet for Scale works now. Was using the wrong RNA-paths
* Added LocRotScale builtin KeyingSet
2009-04-08 12:01:23 +00:00
4b77f9504c Fixed scons and cmake after BGE scenegraph and culling improvements. 2009-04-08 08:22:03 +00:00
ad2c860baf Graph Editor: 'Ghost Curves' functionality from Apricot
This feature takes a 'snapshot' of the visible+selected F-Curves, and displays these in the background as 'ghosts curves' in the background. Such curves are drawn semi-transparent, slightly darker, and with dotted lines. 

To use, simply click the 'curve' button beside the Auto-Snapping selector. To clear, simply click that button again (with a different icon now). 

These 'ghost curves' are stored per Graph Editor instance, and are not saved to file (i.e. per session only). They are useful to be used as guides when refining the shape of existing curves.
2009-04-08 01:07:46 +00:00
c80133e1bc Added a message when people try build docs outside of blender 2009-04-07 23:22:20 +00:00
e063682ed3 gcc wouldn't compile using a reference 2009-04-07 23:21:30 +00:00
51b4145841 BGE Scenegraph and View frustrum culling improvement.
This commit contains a number of performance improvements for the
BGE in the Scenegraph (parent relation between objects in the
scene) and view frustrum culling.

The scenegraph improvement consists in avoiding position update
if the object has not moved since last update and the removal
of redundant updates and synchronization with the physics engine.

The view frustrum culling improvement consists in using the DBVT
broadphase facility of Bullet to build a tree of graphical objects
in the scene. The elements of the tree are Aabb boxes (Aligned 
Axis Bounding Boxes) enclosing the objects. This provides good
precision in closed and opened scenes. This new culling system
is enabled by default but just in case, it can be disabled with
a button in the World settings. There is no do_version in this
commit but it will be added before the 2.49 release. For now you
must manually enable the DBVT culling option in World settings
when you open an old file.

The above improvements speed up scenegraph and culling up to 5x.
However, this performance improvement is only visible when
you have hundreds or thousands of objects.

The main interest of the DBVT tree is to allow easy occlusion
culling and automatic LOD system. This will be the object of further
improvements.
2009-04-07 22:14:06 +00:00
486985762a etch-a-ton
Use head not tail normal for bone orientation.
Simplify roll to normal a bit.
2009-04-07 20:05:32 +00:00
14e3b041ba MSVC9 project file update 2009-04-07 19:57:30 +00:00
d012a222a2 Some users have odd joysticks with more then 8 axises, increased to 16 (so 4 joysticks)
Ideally there would be no limit but I dont think its worth the effort.
Also had a bug in last commit for the pytyhon api's "axisSingle" attribute, UI index starts at 1 not zero.
2009-04-07 19:21:48 +00:00
ca1c3be302 BGE Py API
- Added OpenGL access to the game engine as a module so you can import BGL directly.
2009-04-07 18:55:35 +00:00
bdfa61fbbe BGE api added place holder docs and CListValue docs. 2009-04-07 17:54:56 +00:00
afb2670246 Emacs has some rules about where and how to look for settings. 2009-04-07 17:17:47 +00:00
654a30aa2d 2.5
- Widgets now draw projected themselves, putting window/region matrix
  on 1:1 pixelspace. This allows zoomable buttons, but crispy.
- Note: text in smaller buttons dont get clipped correct now, WIP
- Fixed error with button types in some  menus.
- removed temp UI_2_50 define hack.
2009-04-07 17:08:26 +00:00
7c74d1dfa3 py <2.5 dont have lenfunc 2009-04-07 17:08:24 +00:00
18511c56d3 BGE Python API (small changes)
- Make BGE's ListValue types convert to python lists for printing since the CValue GetText() function didnt work well- printing lists as [,,,,,] for scene objects and mesh materials for eg.
- Check attributes are descriptor types before casting.
- py_getattr_dict use the Type dict rather then Method and Attribute array.
2009-04-07 16:00:32 +00:00
0482325805 RNA: fix for compile error on msvc, and a warning fix. 2009-04-07 15:20:12 +00:00
1534eca60f Updated bge_api_validate_py.txt to check for undocumented attributes
All types methods and attributes are now documented (except for some types have no epydoc .py files for at all)
2009-04-07 11:45:48 +00:00
5d64dd019e BGE Python API
Use each types dictionary to store attributes PyAttributeDef's so it uses pythons hash lookup (which it was already doing for methods) rather then doing a string lookup on the array each time.

This also means attributes can be found in the type without having to do a dir() on the instance.
2009-04-07 11:06:35 +00:00
c054ea0203 [#18407] Trouble w/ Bevel_Center.py
add python encoding info
2009-04-07 10:16:26 +00:00
59190778a8 New Bitmap draw mode for Freetype2 fonts.
The library can load any font supported by the Freetype2 library or
used the internal bitmap font.

With both types it's possible draw the text as texture or bitmap,
and using texture it's possible rotate, scale and clipping text.

Still have things to fix/add, but I think it's ready to move-on
and start droping the old api, most of (if it's not all) the
editors/interface/text.c will be remove, but some things still
has to be define, like:

 * Where is store the fonts ? (default font, panel font, filesel font, etc)
   I mean, every space have own fonts ? or we keep it on the context ?
   It's not a really problem from the blenfont side, because every font
   have reference number, so it's load only the first time.

 * What we do about gettext ?
   Keep the old system that call gettext inside the blenfont or replace
   it for _() in the Blender source ?
   Also things like pupmen has to be take care, if we want translate the menu.

Ok, time to sleep, back tomorrow to start moving the things :)
2009-04-07 08:42:28 +00:00
6b1ccddc0d bugfix #18196
Halos for objects (not particles) can get texture color, but they skipped
the alpha mapt-to channel when that was set. Actually bug from ehh 1995!
2009-04-07 07:46:58 +00:00
885fa49aa4 BGE Joystick Sensor
- Raised limit of 2 axis to 4 axis pairs (4==8 joysticks axis pairs)
- Added a new Joystick Sensor type "Single Axis", so you can detect horizontal or vertical movement, rather then just Up/Down/Left/Right
- added Python attribute "axisSingle" so you can get the value from the selected axis (rather then getting it out of the axis list)
- renamed Py attribute "axisPosition" to "axisValues" (was never in a release)

If we need to increase the axis limit again just change JOYAXIS_MAX and the button limits.
2009-04-07 06:23:45 +00:00
44877d0add 2.5 - Two Bugfixes:
* Insert Keyframe operator (IKEY) works in Pose Mode for bones again
* 'Parent type' is now correctly wrapped in RNA. Previously, it had been wrapped as a bitfield, while it was in fact a plain enum. I found out when trying to manually fix some bugs in the Set Parent operator...
2009-04-07 05:01:42 +00:00
816a9f3acb error in last commit 2009-04-07 03:20:59 +00:00
a127f259da Fix for: [#18027] Strange behaviour of Explode modifier in combination with SubSurf
- Explode didn't use the dmcache index for getting the particles emitter position.
- One "tri or quad"-comparison tested the wrong index. Leading to one quad converting into a tri.
2009-04-07 03:00:32 +00:00
767db1b716 RNA: Commit of the API patch by vekoon. This adds Functions to RNA,
which can be defined to call C functions with defined parameters.

* Parameters are RNA properties, with the same types.
* Parameters are stored in a ParameterList, which is like a small
  stack with the values. This is then used to call the C function.
* Includes Python integration.

* Only one test function is part of this commit, ID.rename.
* Integration with the editors/ module is not included in this
  commit, there's some issues to be worked out for that still.
2009-04-07 00:49:39 +00:00
7e23b7dc54 Texture effector nabla didn't have a correct initial value and it's button explanation needed some work. 2009-04-07 00:15:58 +00:00
b8270db75c Harmonic effector force wasn't working properly at all. A silly vector normalization where it shouldn't have been. 2009-04-06 23:23:36 +00:00
30ce01f23f Fix for: [#18354] Controlling with a texture the particles DENSITY parameter doesn't work.
If the density texture was taken into account with hair parent particles there were cases when there weren't any parents left to interpolate children from. Now a density texture is only taken into account for hair child particles.
2009-04-06 19:32:23 +00:00
445ca000bc bugfix #18398
When using 'angle' display for camera, the 'lens' ipo didn't update this
button. Implementation still lacks a bit... having both variables in the
camera struct is asking for troubles. Put on the re-think list for 2.5!
2009-04-06 18:08:15 +00:00
88ab62c031 2.5
- fixed pixel offset error for listview (outliner)
- removed a lot of old drawing code
- put back special widgets Normal, Curve, Colorband
2009-04-06 15:44:30 +00:00
6e91947cda 2.5
Bugfix.
File window uses new layout pointer, but doesnt set it to zero here, 
giving memory issues on 2.5 file reading.
2009-04-06 15:07:01 +00:00
46a440c7a5 BGE Python API
- added a module for the BGE - GameTypes, only contains types.
- added KX_PYATTRIBUTE_DUMMY attributes for KX_Light, KX_PolyProxy, KX_VertexProxy, so all types should give correct results from a dir().
- added a script to check for missing methods in the epydocs - bge_api_validate_py.txt
2009-04-06 13:27:28 +00:00
960fa534b7 BGE Epydocs were missing some functions
renamed KX_Light -> KX_LightObject
added some missing controllers
2009-04-06 13:13:25 +00:00
64fe09ab20 - remove debug printf
- remove test for importing the module rather then creating a new one (didnt mean to commit)
- added constants for the mouse sensor to use.
2009-04-06 12:47:15 +00:00
51f6d6cbda Graph Editor - Ctrl-LMB (Click Insert Keyframes) Operator
Now it is possible to add more keyframes to the 'active' F-Curve by simply Ctrl-LMB clicking in the graph space. 

NOTE: more advanced polling callbacks are needed in the Graph Editor...
2009-04-06 12:07:33 +00:00
fdceee0088 Bugfix #18266
Mipmap creation for render crashed, in this case:
- use Curves tool on an Image, which is UV mapped on object
- Save the image to disk, under new name
- Render (F12)

This fix is only for the crash, there's something not well coded
for Curves tool, how it manages float buffers. That's for 2.5.
2009-04-06 09:05:37 +00:00
c10d1c2853 Python ref-counting fixes 2009-04-06 08:17:04 +00:00
e430816cde Add back bitmap draw mode, right now only internal font, tomorrow
freetype2.
2009-04-06 04:12:31 +00:00
a95f97cb28 cast needed to get things compiling again on my machine.
Kent
2009-04-06 01:43:01 +00:00
fe562f0dd4 Fix for: [#18482] Mixed object and halo visualization for particles needs "Emitter" to be activated. 2009-04-06 00:43:59 +00:00
ab467e7238 2.4x Bugfix #18279 - Copy Vertex Group Location doesn't work with subsurf modifier 2009-04-06 00:22:58 +00:00
58b1e04fe0 Fix for: [#18371] VParent breaks fur effects.
-Virtual parents were not randomly selected due to optimization in child particle distribution code.
-Wave-kink had a wrong matrix multiplication.
-Amount of virtual parents wasn't scaled properly to the amount of children rendered.
-Calculating virtual parents is now thread safe.
2009-04-06 00:10:52 +00:00
9a1e1912e1 2.4x Bugfix - #18188: "Clear user transform" does not work as described
For the record, "Clear user transform" is supposed to restore selected bones to the transforms defined by Actions/NLA, not back to rest position.
2009-04-06 00:04:04 +00:00
b4e4ccf92d BGE PyAPI can now import text (within the blend-file)
Previously this only worked with the Blender API.
- bpy_internal_import small C file that Blender scripting and the game engine use.
- Tested with blender, blenderplayer, loading files
- Needed to use a hack to override the Main struct since the game engine doesn't set G.main
- when the sandbox is set, only internal scripts can be imported.
2009-04-05 19:37:13 +00:00
3dacfbb231 BGE Python API
- action attribute wasnt checking for NULL (own fault)
- KX_Scene getCamera wasnt checking for NULL
- CListValue had asserts for not yet implimented functionality, this would close blender. Better to print an error if the user manages to run this functions (I managed to by CListValue.count([1,2,3]))
2009-04-05 14:55:50 +00:00
033a63f858 BGE Bugfixes (mostly in the py api)
KX_PolygonMaterial and KX_BlenderMaterial - Added a print function (would raise a python error on printing)

* Crashes *
KX_GameObject SetParent - Disallowed setting a parent to its self, caused a recursion crash.
KX_MeshProxy "materials" attribute was segfaulting because of my recent change - I was wrong, you do need to check material types (no idea why since they are both PyObject * at the base)
KX_VisibilityActuator - Wasn't initialized with PyType_Ready() making it crash on access (own fault) 

* Crashes because of missing NULL checks *
KX_PolygonMaterial's "gl_texture" attribute wasnt checking for a valid m_tface
KX_GameObject - added checks for GetPhysicsController()
KX_RayCast::RayTest - didnt check for a valid physics_environment
KX_SceneActuator's getCamera python function wasnt checking if there was a camera.
2009-04-05 14:01:49 +00:00
c99b9d7922 Animato - RNA Wrapping:
RNA-Paths + Array Indices for Keying Sets, F-Curves, and Drivers are now editable. We could disable these later if need be, it is useful to be able to edit these (especially for debugging purposes now).
2009-04-05 11:26:33 +00:00
7d4dc4f0f5 - fixed errors with bge epydocs
- changed epy_docgen.sh so inherited attributes & methods are included inline for each type, removed source option since its not useful and makes the download bigger.
2009-04-05 10:03:23 +00:00
f8cc272575 added experimental KX_GameObject attributes "sensors", "controllers" and "actuators" 2009-04-05 08:48:51 +00:00
77da8461f3 Make materials use PyAttributeDef's 2009-04-05 07:41:03 +00:00
3fa7717b57 2.4x - Grease Pencil: Swapping the order of args for gpencil_frame_delete_laststroke() to be more consistent with the rest of the Grease Pencil API. 2009-04-05 06:54:47 +00:00
53e721305e BGE Python API
- made camera use PyAttributeDef's
- removed unneeded duplicate matrix type checks
- fixed own bug (added since 2.48a) that broke a converting 4x4 matrix to a PyObject
2009-04-05 06:08:41 +00:00
04ef5a492a Made KX_MeshProxy use PyAttributeDef. simplified getting the 'materials' attribute (no need to differentiate between types)
Added KX_GameObject 'meshes' attribute to replace getMesh(i)
2009-04-04 15:54:07 +00:00
9982217a72 Fix for: [#18273] reactor particle spowns to earlier.
Particle life "rand" value could be set above "1.0" allowing for negative particle lifetimes.
2009-04-04 14:34:39 +00:00
d84dc44835 Fix for [#18017] reactor particles affected by a curve guide emit at a wrong position. 2009-04-04 12:48:40 +00:00
cb26c7e75a BGE Py API, mistake when redoing set action as a static function. 2009-04-04 11:02:13 +00:00
b6114be5e3 include PyObjectPlus method in __dict__ 2009-04-04 09:54:05 +00:00
a35a8f7a38 - should fix compiling with older python versions (<2.5)
- made the isA() function accept python types as well as strings.
- renamed _getattr_dict to py_getattr_dict
2009-04-04 08:20:52 +00:00
c31f806c99 fix for [#18484] Bullet Crash (possibly because of overlapping rigid body balls)
simple missing negative index check.
2009-04-04 04:56:05 +00:00
6be6921184 moved more attributes from getattr into PyAttributeDef's 2009-04-04 02:57:35 +00:00
3906a62cc1 2.5: Added basic insert/remove keyframes from UI buttons.
- I key over a button inserts a keyframe.
- Alt+I removes a keyframe.
- With right mouse button a menu with these options pops up.
- Buttons are colored green if the property is animated, yellow
  if it is on a keyframe. I followed the colors from the UI
  mockups, but the flicker on keyframes seems too distracting in
  practice?

- This only works for properties on the ID itself at the moment,
  path callbacks need to be filled in for all structs but mesh
  still.
- It doesn't work when you're over a related label, that needs to
  be made to work.
- I made it insert keyframes outside of any keyingset. Not sure
  how this is supposed to integrate?
2009-04-03 23:30:32 +00:00
29f5c7dd5d MSVC9 project file. 2009-04-03 19:19:02 +00:00
07930c0b09 BGE API cleanup: RandomActuator. 2009-04-03 19:09:52 +00:00
3b23224061 Fix for [#18372] object-particle in other layer not editable correctly. 2009-04-03 18:13:51 +00:00
30568b9e4e 2.5
Next part of UI drawing migration coding.

Now all calls go via the new wrapper; apart from some special types
(Colorband, HSV picking, Curve, Normal) they draw OK.

Also added new menu system, nicer shadow, and using same AA code.
Used dark theme suggestion from William btw. Don't get afraid, it'll all
be tweakable. :)

Next steps:
- move over all special button types
- make external calls for AA draw (nodes for example)
- remove old draw code
- make new colors save in theme

I also have to check on how to treat icons in buttons; this is a bit
cumbersome in cases.

Then the layout system comes back on agenda, will go over this with 
Brecht tomorrow.

So; all WIP, be patient!
2009-04-03 16:26:03 +00:00
e6985d31b5 Some users could not build with python 2.5, hopefully this fixes it. 2009-04-03 15:08:38 +00:00
bc789af5a9 Cleanup of particle object visualization code. No new features and hopefully no new bugs. 2009-04-03 14:54:29 +00:00
fd2b115678 Python BGE API
- Initialize python types with PyType_Ready, which adds methods to the type dictionary.
- use Pythons get/setattro (uses a python string for the attribute rather then char*). Using basic C strings seems nice but internally python converts them to python strings and discards them for most functions that accept char arrays.
- Method lookups use the PyTypes dictionary (should be faster then Py_FindMethod)
- Renamed __getattr -> py_base_getattro, _getattr -> py_getattro, __repr -> py_base_repr, py_delattro, py_getattro_self etc.

From here is possible to put all the parent classes methods into each python types dictionary to avoid nested lookups (api has 4 levels of lookups in some places), tested this but its not ready yet.

Simple tests for getting a method within a loop show this to be between 0.5 and 3.2x faster then using Py_FindMethod()
2009-04-03 14:51:06 +00:00
e30cb79aaa Major cleanup of particle render & drawing code. No new features and hopefully no new bugs. 2009-04-03 14:50:54 +00:00
5934757089 Bug fix: hair or child particles didn't react to density texture. 2009-04-03 14:41:31 +00:00
3598f96838 Automatic consistency check of generated vs commited .mo files.
Yeah, this should had gone to trunk, but as the first patch was applied here,
let's follow on and wait for merge.
2009-04-03 12:11:09 +00:00
60bd7d12fc fix for last commit, needed some additional checks 2009-04-03 04:36:38 +00:00
d573e9c539 BGE Python api
Added the method into the PyType so python knows about the methods (its supposed to work this way).
This means in the future the api can use PyType_Ready() to store the methods in the types dictionary.
Python3 removes Py_FindMethod and we should not be using it anyway since its not that efficient.
2009-04-03 04:12:20 +00:00
Dalai Felinto
0499d98311 Setting ignore_deprecation_warnings as 1 by default in GamePlayer
(in the embed BGE it is still 0)
2009-04-03 03:52:19 +00:00
8ca30120a2 made grease pencil delete a frame if you delete all the strokes in it. 2009-04-03 03:16:31 +00:00
b22705f169 BGE Python
- Bugfix for running dir() on all BGE python objects. was not getting the immediate methods and attributes for each class.
- Use attributes for KX_Scene (so they are included with dir())
- Override __dict__ attributes for KX_Scene and KX_GameObject so custom properties are included with a dir()
2009-04-03 02:16:56 +00:00
8a840c35be MSVC9 project file update. 2009-04-02 21:53:52 +00:00
879a7529fd Add clipping option to the internal font. 2009-04-02 20:01:37 +00:00
742cf72631 2.5
Added number slider drawing.
Color for dark part will be themeable. :) (optional rgb?)
2009-04-02 18:16:15 +00:00
f408689e72 2.5
Some more work on UI drawing code, added a generic structure
for how widgets will be defined. It's still a wrapper on top
of old buttons. Docs follow still.

Some visual improvements;

- more button types supported (check render buttons)
- pressed state is shown
- better 'panel' triangle AA, and new divider style

Still a lot of work here. I expect the next days/weeks to
be much more coding too, had to catch up with a lot of other
Blender stuff. There's more (excitement) going on than code. :)
2009-04-02 15:01:11 +00:00
e9ad9f894e 2.5: weight paint mode fix for corrupted layer data, and added
a customdata layer specifically to store weightpaint colors
instead of abusing the vertex colors layers.
2009-04-02 14:38:40 +00:00
2178fcea6e Script written for apricot, poly reduces based on known topologies, keeping edge loops unlike edge collapsing poly reduction.
Example
http://www.graphicall.org/ftp/ideasman42/unsubsurf.gif
2009-04-02 11:30:27 +00:00
da39179afd [#17963] NearSensor segmentation fault
bugfix in bullet
Caused by using the index from closestAxis4 before checking its -1
2009-04-02 08:33:45 +00:00
941a8a2504 [#18472] [patch] Speeding up Blenderplayer's profile drawing
from Mitchell Stokes (moguri)
2009-04-02 06:59:27 +00:00
686b92f7b4 [#18477] Prevent .svn directories being included in OS X app bundles
from James Crosby (sheep)
2009-04-02 06:46:56 +00:00
655177aebd [#18452] Particle children API for python.
from Alberto Santos (dnakhain)

"This patch adds a few new variables relationated with Particle System children such as children amount, render amount,
child clumping..."
2009-04-02 06:39:09 +00:00
fcc23faa3a Added getitem/setitem access for KX_GameObject
ob.someProp = 10
can now be...
ob["someProp"] = 10

For simple get/set test with an objects 10 properties, this is ~30% faster.

Though I like the attribute access, its slower because it needs to lookup BGE attributes and methods (for parent classes as well as KX_GameObject class).

This could also be an advantage if there are collisions between new attributes added for 2.49 and existing properties a game uses.

Made some other small optimizations,
- Getting and setting property can use const char* as well as STR_String (avoids making new STR_Strings just to do the lookup).
- CValue::SetPropertiesModified() and CValue::SetPropertiesModified(), were looping through all items in the std::map, advancing from the beginning each time.
2009-04-02 05:38:05 +00:00
4bb41c3dcd UI: various panels fixes.
* Fix sometimes non-working close/open button.
* Fix panels being a bit out of the view on startup.
* Fix too large totrct region for view2d.
* Fix wrong panel order when changing vertical <-> horizontal.
* Fix wrong panel positions after switching contexts.
* Fix an access of freed memory when collapsing panels.

* Free align mode works again.
* Animations work again.
2009-04-02 01:39:33 +00:00
ecdd332021 forgot to add bpy_panel_wrap.c 2009-04-01 22:02:22 +00:00
7e5057809f 2.5: Temporary compile fix. Campbell, bpy_panel_wrap.c seems to be missing. 2009-04-01 15:23:46 +00:00
f3b84c9d52 2.5: added generic WM_operator_redo for use as invoke callback, similar
to WM_operator_menu for example, but popping up the redo menu. This is
useful for operators like particles rekey, which makes no sense without
specifying the number of keys.
2009-04-01 14:02:06 +00:00
3224efc384 Python Panels WIP
- Register python panels
- Added a generic class checking function BPY_class_validate() for panels/operators.
- No button drawing yet

Brecht, Added RNA_enum_value_from_id() and RNA_enum_id_from_value() to rna_access.c to do lookups between identifiers and values of EnumPropertyItem's, Not sure if these should go here.
2009-04-01 12:43:07 +00:00
48e4a48340 BGE API cleanup: ReplaceMeshActuator mesh attributes now returns a KX_MeshProxy. Fix a bug in KX_MeshProxy where the Python type was not set right. 2009-04-01 08:59:36 +00:00
1e2f736d3a [#18479] 'Consolidate into one image' does not calculate/use 'pixel margin'
Thanks to Dusan Stevanovic for pointing out the fix.

Also noticed alpha wasn't being rendered, enabled texface alpha.
2009-04-01 07:13:55 +00:00
d1dd9fd9f0 [#18478] Unwrap (smart projections) should accept values grater than 0.25 for island margin (it works just fine when changed in original script)
increased value as suggested.
2009-04-01 02:02:26 +00:00
3a28a74505 Animato - Support for 'BuiltIn' and 'Relative' Keying Sets
When inserting keyframes in the 3D-View (support will be extended to other editors in due course) using the IKEY hotkey, the menu which appears will now consist of 3 parts: 
* 'Active Keying Set' - this option allows you to use the user-defined KeyingSet which is active for the current scene (i.e. the one seen in the TimeLine/Outliner headers)
* User defined Keying Sets - a list of all such available KeyingSets is included, and entries can be chosen from there
* Built-In Keying Sets - see later...

To achieve this, several changes needed to be made first:
* Added support for 'relative' in addition to 'absolute' Keying Sets. Relative Keying Sets are Keying Sets which operate on data from the current context (i.e. a 'location' KeyingSet will add location keyframes for selected objects/bones/nodes as opposed to location keyframes for some particular object). The is a tentative 'templates' requirement system here, which still needs to be fully fleshed out.
* Added support for builtin Keying Sets (i.e. 'Location', 'Rotation', 'Scaling', and 'LocRot' as a few initial demonstrations), which replaces the temporary Insert Keyframe operator for the 3D-View (IKEY). These are effectively relative Keying Set definitions which are included in Blender by default and stored in a list separate from user-defined ones. Volunteer help in defining a few more of these for other editors will be welcome soon.
* Removed/replaced much of the crappy temporary Keyframing operator code, though a few tweaks could still be done.
2009-03-31 22:36:13 +00:00
441f26a170 Clean up for the imminent migration from SVN to GIT. 2009-03-31 22:34:34 +00:00
4861ddf350 Small cleanup, all this options are now in the User Preferences, RNA. 2009-03-31 21:19:23 +00:00
f6f47a08eb BGE API cleanup: DynamicActuator, ReplaceMeshActuator, TrackToActuator. 2009-03-31 21:03:15 +00:00
1f0e5f5807 [#18455] The new FFMPEG version gives the wrong color
ffmpeg format switched from RGBA32 to BGR32, it's no longer needed to swap color planes.

NOTE: this commit also attempts to fix the big endian case, but since I don't have a machine to test it, I'd appreciate if someone else would.
2009-03-31 19:39:17 +00:00
8518f6e660 BGE API cleanup, patch from Moguri: RaySensor, NetworkMessageActuator, NetworkMessageSensor. 2009-03-31 19:02:01 +00:00
74e6231ff4 == etch-a-ton ==
Correct joint-guided roll to use the previous bone, not the following (that was silly). Also made first bone use view axis (since it has no previous), this is much nicer that using rotation correction only. Using the joint roll option makes it MUCH more orientation independant.
2009-03-31 14:29:58 +00:00
f78ee08b67 [#18473] SCons build fails when linking blender when WITH_BF_OGG enabled
fix for linking on linux
2009-03-31 08:13:21 +00:00
97af551cb7 [#18439] Controlling the bevel shape for a text object with a curve no longer works.
own fault, broke rev16702.
Curves created by fonts didnt have their radius set. Forgot do do this when making radius calculated with the curve (like tilt)
2009-03-31 06:22:25 +00:00
22ad99783a [#18277] Segfault crash by editing mesh with subsurf+ParticleInstance modifiers
Marked as fixed but was still using uninitialized variables.
2009-03-31 00:58:02 +00:00
466628778c Add back the others font: helvb 8/10/12 and scr 12/14/15. 2009-03-30 19:48:18 +00:00
e5bc44bcb2 Make cmake work out of the box for win64 systems (disabling openal and fixing zlib)
Command: cmake -G"Visual Studio 9 2008 Win64" ../blender-2.5-svn-folder
2009-03-30 18:42:36 +00:00
54ddfe1c48 2.5:
* Fix ANIM button, didn't work and was leaking memory.
* Transform ops: Edition -> Editing.
2009-03-30 18:26:58 +00:00
dbdb5893b2 2009-03-30 18:21:17 +00:00
fe33fb23d9 UI:
* Added support for RNA pointer buttons. It's like the existing
  ID pointer buttons but with an icon, and autocomplete works.
  There's some drawing issues currently but don't want to
  interfere with the refactoring here. Also todo is support for
  things like vertex groups or bones.
2009-03-30 17:31:37 +00:00
5e4242dab0 Add back helv 12 font, the old BMF_MINIMAL is now BLF_INTERNAL_MINIMAL, but
don't found any place that really use it.
2009-03-30 16:49:21 +00:00
ac2de0f28d Hide full retarget panels behind rt -1 (not ready for large scale use and not too well documented yet. Doesn't affect etch-a-ton. 2009-03-30 15:26:14 +00:00
b7886e27df MSVC 2008 compile fixes 2009-03-30 14:11:32 +00:00
03759bc248 Adding missing files to vcproj:
/source/blender/blenfont/intern/blf_font_helv10.h
/source/blender/blenfont/intern/blf_internal.c
2009-03-30 14:07:59 +00:00
8766bda89e 2.5: fix for crash in EM_EndEditMesh when using 3d view header. 2009-03-30 13:53:48 +00:00
78a3db7d64 2.5
*******
ported some of the scene buttons to the new system
	- added RNA_SceneRenderData struct to rna
	- added a warning print to uiItemR when it can't find the property
	- what is not there is due to relating entry not being in RNA
	- anim button does not work

Im commiting this so we have much more wider test area then text and object buttons
2009-03-30 08:17:43 +00:00
89b906db9f editmesh accessor functions. most editmesh access now goes through:
EditMesh *EM_GetEditMesh(Mesh *me);
void EM_EndEditMesh(Mesh *me, EditMesh *em);

as discussed on the mailling list, this is to facilitate migration to bmesh.
next step is to merge this this to the bmesh branch.  this was done in the 2.5
branch to prevent too great a divergance.

also, made makesdna/makesrna work on cygwin/msvc2008/scons.
2009-03-30 07:28:37 +00:00
22fec544c8 Add blender internal font.
This is the old bmfont library but using textures.

I made small test in the space Info and work fine,
commit now to finish tomorrow from work.
2009-03-30 05:32:46 +00:00
e4ee708cef Added back old code for transform seq overlap in an '#if 0',
since the loop that works around t->data being freed can sometimes shuffle strips that are not being transformed (eg, when extending or with locked strips)
2009-03-30 01:16:28 +00:00
c1b41b20b0 r19455 to Re-enable vertex welding for soft-bodies failed even on simple cases like a cube with scrambled mesh data.
Please test before committing.

m_vertexArray has no doubles now and is not aligned to 3, using m_triFaceArray to get the verts for each face.
2009-03-30 00:40:19 +00:00
b182778e71 Applied patch #18446, to do versions on damping
Re-enable vertex welding, only for soft bodies. They require it. Future versions could expose such vertexWeldingThreshold.
2009-03-29 19:54:05 +00:00
9d4543bd29 Add snapping parameters to transform operators (only Translation, Resize and Rotation, since those are the one ones that support it). 2009-03-29 19:52:53 +00:00
6705b6f96e UI:
* Added a PanelType and HeaderType for registering panels
  and headers in regions. When the region draws, it will
  then automatically draw the ones that were registerd with
  poll and draw callbacks.

  Used for text header, properties and object buttons now.
2009-03-29 19:44:39 +00:00
9b7f44ceb5 UI:
* Added support for soft/hard range in the buttons code. Currently
  it works by only allowing to drag or click increment in the soft
  range, but typing a number value allows to go outside it.

  If the number is outside the soft range, the range will be extended,
  rounded to values like:
  .., 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0, 20.0, 50.0, ..
2009-03-29 18:44:49 +00:00
30fa7a7286 Only apply advanced setting of angular/linear factor to rigid bodies (with angular rotation). The setting broke 'dynamic'-only objects. 2009-03-29 18:34:35 +00:00
d57811ada1 BGE API cleanup: CDActuator, ParentActuator, VisibilityActuator done. Thanks to Andre. 2009-03-29 15:17:55 +00:00
64f2dd52cb 2.5 MSVC 9 projectfiles
- update for editors/armature
- update for RNA_context
2009-03-29 08:40:43 +00:00
714ed61233 missed PyLong_FromSize_t -> PyLong_FromSsize_t in bpy_ui.c 2009-03-29 08:31:04 +00:00
03144fd57a - renamed CURVE_OT_select_inverse -> CURVE_OT_select_invert
- TEXT_OT_scroll_bar and TEXT_OT_scroll ops had the lines property default/min/max args swapped around.
2009-03-29 06:13:15 +00:00
b450313b8d - python api was returning incorrect int values from rna because it was using PyLong_FromSize_t rather than PyLong_FromSsize_t, this messed up the default values in documentation.
- renamed POSE_OT_select_hierarchy "add_to_sel" property to "extend"
- some property names were wrong (giving errors in the console at startup)
2009-03-29 04:34:20 +00:00
931527e648 - use clear, set, add, enable, disable and toggle as a prefix in operator names
- use select as a suffix eg UV_OT_loop_select -> UV_OT_select_loop
- Each select all operator was using slightly different wording...
  select_all, deselect_all, de_select_all, select_de_select_all -> select_all_toggle

- selection -> select
- POSE_OT_select_connected -> POSE_OT_select_linked to match other operators
- NODE_OT_delete_selection -> NODE_OT_delete since its not used in other operators
- ANIM_OT_previewrange_define -> ANIM_OT_previewrange_set to match other operators
- NODE_OT_fit_all -> NODE_OT_view_all to match other operators
- View2D_OT_* -> VIEW2D_OT_* to match VIEW3D
- View2D_OT_view_downscroll -> VIEW2D_OT_scroll_down more logical
- removed MARKER_OT_mouseselect_extend and made extend a boolean property of MARKER_OT_mouseselect
- MARKER_OT_mouseselect -> MARKER_OT_select
- GROUP_OT_group_remove -> GROUP_OT_objects_remove more logical since its removing objects from groups
- MESH_OT_removedoublesflag -> MESH_OT_remove_doubles
- redundant words MESH_OT_split_mesh -> MESH_OT_split,  OBJECT_OT_object_delete -> OBJECT_OT_delete

renamed selection operator properties
 extend_select -> extend
 column_select -> column
 select_children_only -> children_only
 ... Since these are all in the context of selection operators there is no need for the extra 'select' in the property name.
 
Updated docs
http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
2009-03-29 02:15:13 +00:00
4a164ce520 Shuffle only selected sequence blocks. 2009-03-28 22:01:07 +00:00
145a441357 Correctly cancel operator is there's no transform data.
Don't access RegionView3D if region is of the wrong type.

Correctly draw extra transform stuff (like snap and pet circles) in multiple 3d regions.
2009-03-28 20:46:38 +00:00
02191a1d39 Moved EXR settings to OS related zone.
It had its own "which OS" conditionals, so please check the moving did
change the result.
2009-03-28 19:31:22 +00:00
a5f32714f7 Remove exception for sequencer in after_trans by rewriting the update code. Please don't start adding exceptions like that in transform without asking first. 2009-03-28 16:45:22 +00:00
ce6c77b569 Sequencer crashed when trying to draw waveform because of commented out failsafe. 2009-03-28 16:25:33 +00:00
e42070d20f - made epydoc generator write a list of words used in descriptions
- fix spelling mistakes in rna docs (and some comments)
2009-03-28 11:44:07 +00:00
fdc6df9253 game engine compile fix for MSVC, game engine team might want to check. 2009-03-28 11:09:53 +00:00
6b3935f8eb - Added the Nurb struct as well as collections for BPoints and BezTriples
- Added nurb collection for curve objects
2009-03-28 10:52:51 +00:00
6fd597b304 removed unneeded arg from makeknots() and replaced some numbers with defines 2009-03-28 05:51:18 +00:00
f61ce664bc Tooltip fix, there is no such thing as "Tadius interpolation" 2009-03-28 04:25:21 +00:00
afec404962 BGE API Cleanup: GameActuator (patch from Andre) 2009-03-27 22:11:30 +00:00
059c2a10c4 BGE API cleanup: AddObject, DeleteObject and Scene actuator added. 2009-03-27 21:54:16 +00:00
e392eb4d9c Fixed a couple of null issues spotted by coverity.
CIDS: 42 and 470

Kent
2009-03-27 16:27:48 +00:00
607d86167c * sequencer transform needs t->data not to be freed by postTrans so special_aftertrans_update can use it.
* text header needs a static char* so text is not rendered as gibberish. (until labels own their own strings)
* epy_doc_gen.py - write out a graphviz representation of the data api.
2009-03-27 06:06:11 +00:00
2c585ae28e remove ODE, build systems and BGE are ignoring it already. 2009-03-26 20:17:05 +00:00
d585d85cc1 Some small cleanups and reorganization. 2009-03-26 18:45:39 +00:00
b68aceda2f 2.5: Remove OOPS code from the outliner space, as discussed
this can be brought back as a new space if someone decides to
work on it.

This also fixes remaining issues with the outliner tree open
and close buttons not working sometimes.
2009-03-26 14:05:33 +00:00
1eaff737fd RNA: particle wrapping is a bit more complete now. 2009-03-26 13:56:32 +00:00
c7d82ec96e F-Curve Modifiers: Experimental 'Additive' option for Generator Modifiers
This setting means that instead of blindly replacing the existing values, the generator modifier will instead apply its effects on top of any existing modifiers (and/or curve data). 
Thus, it is now possible to apply effects such sin/cos-based oscillations on top of keyframed motion.
2009-03-26 11:12:39 +00:00
bba2bdf41e Added attributes for Ipo Actuator settings (replacing all methods) 2009-03-26 01:42:01 +00:00
Dalai Felinto
c53577a118 scons+msvc update for the FFMpeg recent updates 2009-03-25 23:09:17 +00:00
d93fd9ffc1 UI:
* Screen level regions created for menus are now a separate
  CTX_wm_menu in the context, so they don't interfere with
  existing regions.
* Fix context in popup menus to always come from the area
  and region the popup was opened from.
* Removed some unused context stuff: tasks and reports.
  The places that were using context reports were using it
  wrong anyway.
* Fix F6 closing immediately after editing a button, by
  making uiBlockSetFlag not clear existing flags anymore.
* Don't use ":" in boolean X/Y/Z buttons.
2009-03-25 20:49:15 +00:00
985a4c1e5e RNA:
* Test with constructing RNA paths from pointer + property, based on
  a callback per struct. For animato we'll need to be able to do this,
  for keyframing from buttons, unless we can somehow derive the paths
  from the interface code, which seems like an unnecessary burden.

  However constructing such paths is not always quick, and we need a
  fast way to find out if a property is animated for drawing buttons,
  so this may not be the best solution.

  See rna_mesh.c for some callbacks created as a test.

* Added BLI_sprintfN to mallocN a new string using printf style
  formatting.
2009-03-25 20:29:01 +00:00
232edfa34e RNA: fix for texture patch compile on MSVC, mixing declarations and code. 2009-03-25 18:21:48 +00:00
346ea41766 2.5
Before everyone starts complaining, yes the arrows on the
number buttons were flipped. :)
2009-03-25 17:12:25 +00:00
2e48c4059a 2.5
WIP commit for new system to draw widgets and use themes or styles.

Not really interesting stuff to see in code now, the current 
structure will change quite a lot, this to make it hook up well
to the existing system.

What works quite well is a new full opengl vector method to draw 
scalable and pixel-aligned anti-aliased buttons.

http://download.blender.org/institute/rt3.jpg
http://download.blender.org/institute/rt4.jpg
2009-03-25 16:58:42 +00:00
a26a3f423f RNA: texture types Clouds/Wood/Marble/Magic/Stucci wrapped,
patch by Sven von Brand, thanks!
2009-03-25 14:42:47 +00:00
ae76d25e65 RNA: make svn props and file ending consistent. 2009-03-25 14:35:36 +00:00
8b3c2c0762 UI:
* Fix for F6 redo and similar popups closing when moving
  mouse outside of the popup while interacting with buttons.
* Simplify F6 redo popup code by using generated layout.
2009-03-25 14:34:17 +00:00
8f57a92e55 Added makesrna for INC, fixing the 'make' building 2009-03-24 19:50:24 +00:00
616897d0db Bad crash in volume snapping code when duplis where involved.
Found out using Coverity's scan report.
2009-03-24 19:39:43 +00:00
6020d2cb45 Changed missing line ending style for TEX_ files
in sculptmode.c move initalization of a var to fix an issue
where index of array could be -1.
Found by coverity.

Kent
2009-03-24 19:39:02 +00:00
c78b460fce Use Benoits attributes in KX_GameObject.
Deprecated..
getPosition, setPosition, getOrientation, setOrientation, getState, setState, getParent, getVisible, getMass

* swapped set/get to get/set in KX_PYATTRIBUTE_RW_FUNCTION macro to match pythons getsetattrs.
* deprecation warnings in the api and notes in epydocs.
* added 'state' attribute
* gameob.mass = 10 # now works because its not checking only for float values.
* dir(gameob) # includes attributes now
2009-03-24 19:37:17 +00:00
5d48e04307 Renumbered the texture nodes because they were clashing with the other nodes.
This will break compatibility with previous texnode testing builds (but not
with any released versions)
2009-03-24 18:51:21 +00:00
51ce279300 Started wrapping nodes in RNA. Only shader nodes have all their options wrapped;
TEX and CMP to follow.

Also, renumbered the texture nodes because when I first wrote them I thought
they could share ID numbers with the SH and CMP nodes. D'oh!
2009-03-24 17:40:58 +00:00
ce8badeb18 Fix for bug #18423: BGE lights in overlay scene also affected
other scenes, for texture face / multitexture materials.

Fix for bug #18428: BGE lights on hidden layers were still used,
for all material types, now they have no effect
2009-03-24 15:45:08 +00:00
dbe675195d Fix for bug #18438: TEX_valToNormal.c array size error.
Error pointed out by Dan Eicher, thanks!
2009-03-24 13:39:50 +00:00
6da5e62ee8 2.5
*******
results of a review of my previous commits by brecht
2009-03-24 12:16:58 +00:00
688db0f251 [#18260] FMOD Removal
from Jorg Muller (nexyon)

also removed references to CVS in install
2009-03-24 09:09:10 +00:00
a85ee03a13 BGE rna epydocs, add a list of all references to this struct from other properties
http://www.graphicall.org/ftp/ideasman42/html/rna.Object-class.html
2009-03-24 06:53:57 +00:00
5e44eba342 fix for [18443] Object.GetSelected() returns empty when run from command line 2009-03-24 03:53:20 +00:00
3d5cc2724e RNA: fix some warnings, return with void value in a void function. 2009-03-23 20:19:09 +00:00
80319e5b51 Added BF_PROFILE (same name as in scons files) option.
Set it to true to build with -pg

Also I added CCFLAGS to final link of targets.  Not sure why it wasn't there before.

Kent
2009-03-23 19:52:49 +00:00
617bb7ac45 Another patch by GSR
Just some minor cleanups.

Kent
2009-03-23 18:11:46 +00:00
c561886809 irix/scons: use $LCGDIR/sdl instead of $LCGDIR/SDL.
Fixed bug #18293: SDL files under lib for irix-6.5-mips are included twice
2009-03-23 17:50:41 +00:00
8c873312cf Python:
* Fix for not printing syntax error when running script
  from the text editor, and crash on exit. Campbell, please
  check if this is OK?
2009-03-23 14:39:37 +00:00
e04b27ca42 Python
* Add support for setting RNA pointers.
* Fix __repr__ for structs and properties, it was printing
  a garbage string here, but not sure I did what was intended.
2009-03-23 13:28:42 +00:00
9310c92e53 RNA:
* Allow pointers to be editable, did SpaceTextEditor.text as a test.
* Changed PROP_NOT_EDITABLE to PROP_EDITABLE, and added
  RNA_def_property_clear_flag.
* Removed rna_dependency.c test code.
2009-03-23 13:24:48 +00:00
62a3e867df RNA: added CloudsTexture as an example. 2009-03-23 11:10:07 +00:00
34014e859f RNA: Code for Texture inheritance, some cleanups. 2009-03-23 11:08:01 +00:00
4a07876562 Speedup for bullet physics mesh conversion
Was adding each face with a remove doubles option that made conversion increasingly slower for larger meshes, this would often hang blender when starting with the BGE with larger meshes.

Replace btTriangleMesh()->addTriangle() with btTriangleIndexVertexArray()

YoFrankie level_1_home.blend starts a third faster, level_nut about twice as fast.

- previous commit was also incorrect using the original meshes vert locations rather then the vert locations that came from the derived mesh.
- Softbody is relying on removing doubles at 0.01 to give stable results, this no longer works but seems a bit dodgy anyway. Maybe some post-processing filter could fix up a mesh for bullet softbody.
2009-03-23 06:00:21 +00:00
baf12bf3a3 2.5
*******
- added descriptions to view3d operators
- fixed up the object select menu
- fixed a few typos
2009-03-23 03:14:56 +00:00
438ba310ed Finished porting etch-a-ton to 2.5
Changes: Gestures are now Shift-ActionMouse (doing it with SelectMouse required a bit of juggling and triggered a display glitch that I'll try to debug later)

Everything else should be as functional as in trunk, apart from the dotted rubber band line which doesn't update while the view is rotated and only the current area getting redrawn while drawing (the later should be easy to fix).
2009-03-23 01:01:44 +00:00
fe1169f635 2.5
******
ported object ops to new naming conventions
2009-03-22 23:41:05 +00:00
bd13f30224 MSVC project files updated for ffmpeg 0.5 and armature. You must also update lib/windows. 2009-03-22 23:39:36 +00:00
a498017986 2.5
*******
added decriptions to object and groups operators
2009-03-22 22:07:52 +00:00
e3d0dfc9eb BGE API cleanup: add support for attribute set/get through functions only. 2009-03-22 21:36:48 +00:00
fa765a554c only write tex plugin and envmap data to file if texture is the right type. This takes care of lingering errors with missing texture plugins after texture type is changed 2009-03-22 21:06:08 +00:00
1914ed72b2 Speedup for bullet creating convex hull meshes
In a simple test with ~12000 verts, overall BGE startup time went from ~4.5 sec to a bit under a second.

- before adding each vert it did a check for a duplicates.
- Using RAS_Polygon verts can give a lot of duplicates because the verts also store UV's and normals.
- Was increasing the array one item at a time, now resize the array once.
- Use the blender mesh mvert array rather then RAS_TexVert's, so needed to include some DNA headers.
2009-03-22 21:04:28 +00:00
615c5232c7 == FFMPEG ==
Updated ffmpeg to release version 0.5
updated x264 to today's daily build
thanks to ben2610 for first patches (but you got hddaudio.c wrong :)
2009-03-22 19:19:21 +00:00
d5d2d1fece removed edgecode from the game engines RAS_Polygon class since its not used 2009-03-22 17:03:55 +00:00
ae5c7e7edb RNA:
* As an example, added the Material Shader Node.
2009-03-22 14:49:13 +00:00
3bf71fbe38 RNA: basic code for Node inheritance. 2009-03-22 14:46:45 +00:00
7c86a10aba F-Curve Modifiers - Envelope: Bugfixes
* Envelope modifier now works correctly. Previously, the mapping was being done in the wrong order.
* Extra controls for modifiers now only draw when the F-Curve is the active one, so the view will be less cluttered in other cases.
2009-03-22 09:54:13 +00:00
b995f4329a First part of operatorizing etch-a-ton in 2.5
Polyline, selection and a couple of others work. (note that polyline is shift-click because click is taken by 3d cursor. Needs a way to overwrite lower maps).
2009-03-22 00:30:18 +00:00
935f10dc45 get rid of warnings, fix for a refcount error 2009-03-21 16:03:26 +00:00
6ab2d7ad65 - lazy subtype initialization rna, was initializing every type in bpy.types at startup, which is slow and doesn't allow access to dynamically added types.
- bpy.types isnt a module anymore, defined as its own PyType, getattr looks up the rna collection each time.
- refcounting fixes
- fixe epydoc generation with undefined values
2009-03-21 06:55:30 +00:00
b4209c5656 F-Curve Modifiers: Envelope Modifier
Got the basic envelope modifier code working, including primitive drawing of relevant helper info in the graph view. It doesn't work in a very intuitive way yet, so I will recode it soon.
2009-03-21 03:49:22 +00:00
90a58790b2 Compiling fix for etch-a-ton commit - I've moved BIF_freeRetarget() to be before the single place that seems to use it. 2009-03-20 23:11:44 +00:00
1af7bd439a merge more etch-a-ton code. nothing works, but it compiles. Will try to get it working this week end. 2009-03-20 18:00:51 +00:00
884cfe25d3 2.5: add rna_context.c, missed that in last commit. 2009-03-20 14:52:58 +00:00
99d9596328 2.5
Makes older python's compile.
2009-03-20 10:51:58 +00:00
483ee1157e fixes for...
[18429] Typo in IPO Actuator

[18377] Crash fo yofankie (G.curscreen==NULL)
		/* No screen, happens when saving a blendfile in background mode,
		 * then loading in the game engine
		 * just assume we need the mesh info */
2009-03-20 06:12:22 +00:00
bcddeaa699 2.5 compiles again with scons. Commented out some lines referring to code in the missing file rna_context.c 2009-03-20 03:32:56 +00:00
a1e05f4617 patch from Banlu Kemiyatorn
* when joining only 2 faces dont check they are convex
* allow edge rotate for non planer faces
- Both were very annoying especially when sub-surf modeling with edge loops
2009-03-20 02:26:02 +00:00
1b94cb752c Context
* Made it based on string lookups rather than fixed enum, to make
  it extensible by python scripts.
* Context callbacks now also have to specify RNA type when returning
  pointers or collections. For non-RNA wrapped data, UnknownType can
  be used.
* RNA wrapped context. The WM entries are fixed, for data context
  only main and scene are defined properties. Other data entries have
  to be dynamically looked up.
* I've added some special code in python for the dynamic context
  lookups. Tried to hide it behind RNA but didn't find a clean way to
  do it yet. Still unused/untested.

* Also minor fix for warning about propertional edit property in
  transform code, and fix for usage of operator poll with checking if
  it was NULL.
2009-03-19 19:03:38 +00:00
Chris Want
77e0199dc3 Makefile updates for Blender 2.5 (from GSR) 2009-03-19 01:50:45 +00:00
3aab50f775 * removed warnings and fixed some python refcount errors
* operator class names
- Changed 'name' to '__label__' (since __name__ is already used for the class name)
- Changed 'properties' to '__props__'

* added a PyObject_GetAttrStringArgs(), utility function which Id like to see in pythons C api.
PyObject_GetAttrStringArgs(pyob, "someattr", "foo", "bar") /* pyob.someattr.foo.bar */
2009-03-18 22:22:58 +00:00
43d4e3fa7e Graph Editor: F-Curves which can only take integral values are now drawn stair-stepped using the sampling code. 2009-03-18 10:58:18 +00:00
41b2a2a530 * Volume rendering / multiple scattering - normalisation
This changes the effect of the multiple scattering approximation to be more 
physically plausible (and easier to use) by making it conserve energy. 
Previously, the multiple scattering could show wildly different results 
based on the spread settings, often outputting much more light than was put 
in (via lamps), which is physically incorrect and made it difficult to use 
by requiring a lot of tweaking of the intensity value.

This fixes it to some extent with a simple normalization, where it scales 
the light energy after multiple scattering to be the same as what was
previously there in the light cache via single scattering. This means that 
using the default intensity of 1.0 should give good results by default, 
although you can still use it to tweak the effect.

Note: This will render differently if you've already set up a .blend using
multiple scattering with the old code, so you'll need to tweak older files. 
Setting the intensity back to the default 1.0 should be good though.


* Smaller thing - fixed the camera view vector stuff up a bit in light 
cache, it now gives much more similar results to non-light cache when using 
anisotropic scattering.
2009-03-18 03:52:17 +00:00
aeb2225a28 2.50: some warning fixes. 2009-03-17 22:27:15 +00:00
2a373f6c44 Fix for bug #18419: game engine debug drawing interfered with alpha blending. 2009-03-17 22:03:21 +00:00
d52400bfbd 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r18677:19317
Notes:
* Sequence transform strip uses G.scene global, this is commented
  out now, should be fixed.
* Etch-a-ton code was most difficult to merge. The files already in
  2.5 got merged, but no new files were added. Calls to these files
  are commented out with "XXX etch-a-ton". editarmature.c and
  transform_snap.c were complex to merge. Martin, please check?
* Game engine compiles and links again here for scons/make/cmake
  (player still fails to link).
2009-03-17 21:44:58 +00:00
c5bc4e4fb1 New icon and button for Peel Object option for volume snapping.
Use snap point to get default embedding depth (for overlapping volumes).
2009-03-17 21:26:09 +00:00
1ac0d54fea F-Curve Modifiers: Cycles Modifier
* Added GUI and fixed bugs in the Cycles Modifier. This replaces the old Cyclic Extrapolation settings, giving more fine-grained control over the results. You can now specify whether the keyframes are repeated before and/or after the range independently, also, the maximum number of cycles on either side can be controlled.

* TODO: it would be nice to have the last value held for cyclic+offset.

* Deleting modifiers now works
2009-03-17 06:37:50 +00:00
2b05a83729 Fixed a problem in how volumes were interpreting textures, and removed
associated workarounds in point density texture.
2009-03-17 05:33:05 +00:00
b68f5d7e96 F-Curve Modifier - Generator: Buttons for builtin-function mode (i.e. sin, cos, etc.) 2009-03-17 00:31:10 +00:00
772e5fbfb0 fix crash with missing image sequence 2009-03-16 21:39:12 +00:00
929c3fe91a failed building with python 2.5 and older 2009-03-16 17:02:58 +00:00
28f6d223d0 This is patch:
[#17974] two small fix for blender 2.48 (memory leak and uninitalized vars)
Submitted By:
Pavel Nemec (nemecp) 

(changes delete to [] and sets to vars to NULL)

Kent
2009-03-16 17:02:19 +00:00
26ff236fb4 Patch by gsr: [#18411] Improved makefiles for translation files
Makes it so it uses wildcards instead of hardcoding the po files
and also only builds files if missing/changed.

Kent
2009-03-16 16:35:29 +00:00
16fe92f868 2.5 PyAPI
Support for subclassing blenders operator, to be registered as a new operator.

Still need to... 
* add constants like Operator.FINISHED
* wrap context (with rna?)
* poll() cant work right now because there is no way to access the operatorType that holds the python class.
* Only float, int and bool properties can be added so far.

working example operator.
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/WinterCamp/TechnicalDesign#Operator_Example_Code
2009-03-16 15:54:43 +00:00
133e8827b7 F-Curve Modifiers - Generator: Finishing off most of UI
* Finished code for Expanded Polynomial and Factorised Polynomial UI's.
* Started UI code for 'Builtin Function' mode. There are still 4 controls to add there to use something other than simple mapping
* Finished/fixed up verification code for these so that values get initialised ok.
2009-03-16 11:43:02 +00:00
ae0f349346 F-Curve Modifiers: Basic GUI for Generator Modifier working
* Currently, this only works for the 'Expanded polynomial' mode, but this will be expanded to include the other modes too. Now you can modify the values and interactively see the graph in the view change. 

* Disabled the backdrops (modifier 'panels') temporarily, as ROUNDBOX UI elements currently swallow all events, which is not good.

Note: the code here still uses the old-style UI definition code since the new stuff is still under heavy construction.
2009-03-16 11:11:44 +00:00
7d2703c805 Merging etch-a-ton branch in trunk.
Slightly out of date documentation in wiki, I'll be updating that tomorrow.

http://wiki.blender.org/index.php/User:Theeth/etch-a-ton
2009-03-16 02:55:42 +00:00
89459e4a51 Custom python wasnt building without BF_PYTHON_LIBPATH set 2009-03-16 02:39:56 +00:00
8522b08e05 F-Curve Modifiers: Generator Modifier Code
* Rewrote the Generator modifier to be more efficient and support more options
* A few UI tweaks for this, but the UI for this is still not yet functional though.
2009-03-16 01:12:37 +00:00
Nathan Letwory
1e1b88c118 BGE
* getting state of RMB was impossible due to wrong check.
2009-03-15 23:40:59 +00:00
9ad4cd89c2 RNA:
* Fix a dependency issue in Makefiles.
* Fix use of uninitialized variable in makesrna.
2009-03-15 11:30:02 +00:00
863a0e246f Fix for typo which broke compiling 2009-03-15 10:43:17 +00:00
329aa658c9 F-Curve Modifiers: Groundwork for getting these working
- Completed cleaning up the drawing code so that F-Curves with modifiers now get drawn to reflect this.
- Added a temporary operator to add modifiers (hotkey Ctrl-Shift-M)
2009-03-15 10:39:02 +00:00
6508ad460f 2.5
fix compile error with python on MSVC.
2009-03-15 08:58:33 +00:00
dff4852671 flat and smooth shading descriptions were replaced 2009-03-15 03:11:05 +00:00
cc59417cae RNA:
- Added an autogenerated C++ API, basically a simple layer over the C
  API, but with the advantage that it fits the object oriented RNA
  model better. Read-only still like the C API.
- Had to rename "protected" property in Action Group because it is
  a C++ keyword, called it "locked" since that seems more consistent
  anyway?
- It's not used anywhere, so here's some example code I used to test it,
  to get an idea of how it would be used:

http://pasteall.org/4582/cpp

- Also, ID names are now editable.
2009-03-14 23:17:55 +00:00
e7e655ce74 2.5 filebrowser
- drawing tweak for background lines
- long and short display now behave the same, only difference is column width now.
TODO still:
- add additional columns (access rights - mode1-mode3 and owner) for non-Windows platforms
2009-03-14 18:15:28 +00:00
d297058910 return operators as a PyCFunction rather then having our own callable operator type 2009-03-14 13:43:30 +00:00
b907b9fd9b 2.5 filebrowser
* added filter buttons to header
* changed large icon for movie files to match small icon
* fixed small stack corruption in interface_draw.c (Matt, check if this is ok)
* moved nice display of file size to storage.c, where string is created.
2009-03-14 13:12:11 +00:00
2aa71b4226 2.5
*******
small commit, tweaked the emboss based on the object buttons, made it really subtle but still make it easier to read compared to no emboss, a new way will be needed for menus to work aswel
2009-03-14 09:06:31 +00:00
59b08278b4 * File browser
Columns view now displays nice human-readable file sizes
2009-03-14 05:21:57 +00:00
856cdeade7 * UI tweaking 2009-03-14 03:24:23 +00:00
e0b629fe71 update v1.12 - 2009.03.14 by migius
d3 removed all set()functions (problem with osx/python<2.4 reported by Blinkozo)
 d3 code-cleaning
 d2 temp patch for noname BLOCKS (*X,*U,*D)
2009-03-13 23:35:15 +00:00
54a55827ec merging trunk 19093:19274 2009-03-13 18:04:38 +00:00
4c3d64116e 2.5: UI Layout Engine, initial code.
* As a test, used by:
  * Object buttons, tried to make it match the mockup.
  * Text window header.
  * Text window properties panel.
* Panel interaction with view2d is still problematic, need to make
  this work properly still.
* Templates are very basic, the ones there are simple but already
  can follow the object buttons mockup quite closely.
* It's based on a three level system: panels, templates and items.
  To get an idea of what that means in practice, see:

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/UI_LayoutEngine#Panels.2C_Templates_and_Items
2009-03-13 13:38:41 +00:00
39acb4efa4 Makefiles: fix definitions of NAN_OPENEXR_* variables on linux, patch provided
by GSR
2009-03-13 10:22:49 +00:00
a4793a3b4a 2.5 Python api
- rearranged modules bpyui -> bpy.ui, bpy -> bpy.data, remove bpydoc
- new module bpy.types, stores a list of all struct types
- added __rna__ attribute to types - eg bpy.types.World.__rna__ so you can access the rna data from a type. (so bpydoc.structs isnt needed anymore)
- removed unused subtyping method (use python subclassing rather then C PyTypeObject)
2009-03-13 07:50:07 +00:00
432171fd99 2.5 filebrowser
- better encapsulation for fsmenu to make it easier to remove global later.
- cleaned up fsmenu code to use just one global
- on file_exec current directory gets added to recent.
- save last 10 recent files in .Bfs too.
2009-03-12 19:36:59 +00:00
8420089d8b RNA:
* boolean/int/float_set_array now works for non-array
  properties as well, just setting the value with the first
  element of the array.
2009-03-12 15:28:00 +00:00
a1a91f9c8b 2.5
Makes Ghost compile for Make. Apparently the 'debug' directories are
still in use?
2009-03-12 09:15:49 +00:00
52dc350c09 2.5 filebrowser
- add refresh filelist operator and button in header
2009-03-12 06:40:03 +00:00
c3cf187123 * More UI control tweaks 2009-03-12 05:56:02 +00:00
9d766c35ad 2.5 filebrowser WIP commit
- cleaned up warnings (mostly unneeded variables)
- new icons for filebrowser (large refresh and parent icons missing though)
- fixed error in large icon drawing due to texture coordinates calculated outside subpart of texture.
- removed library loading stuff from filelist
2009-03-11 23:22:07 +00:00
a37cec2802 BGE patch 18368: Modulus (ie %) expression controller in BGE. Implement a cache for the expression for better performance. 2009-03-11 22:11:52 +00:00
Nathan Letwory
dc57b90f83 * small typo fix. 2009-03-11 20:25:31 +00:00
Nathan Letwory
c8583cac70 2.5 / Area management
* Add Area Swap: hold alt and drag with LMB from either actionzone. Release LMB on area you want to swap with. I added a matching cute cursor for this (and to make it a politically delicate issue, it's white on black).
  Note, there are still some error totblocks that I haven't been able to track down properly yet, so that's still a bit WIP.
2009-03-11 20:22:06 +00:00
64512d3e8e WIP PyAPI from winter camp discussions, make subtypes of the base RNA python type, eventually allowing us to have python defined RNA classes in
python - lux/pov/renderman materials, lamps etc as well as operators.

At the moment there are 2 ways to do this, The first is like subclassing from python, another (disabled) method copies the base PyTypeObject struct 
and makes some changes.

The PyType is stored in the RNA Struct for reuse, right now there are no access functions - needs to be improved.

Added a python script for printing all blend file data to the console which helps testing the api.

dir(rna) wont work for python 2.x now, use rna.__dir__() instead.
2009-03-11 17:28:37 +00:00
ce637a0046 * Patch by Raul F Hernandez
This adds a header to the voxel data texture's data file format, to 
auto-fill the resolution settings upon loading a file. I don't have a data 
file of the right format to test with, so I'll trust it works and wait for 
confirmation!

It also adds a 'still frame' setting, to pause the voxel data sequence on a 
specified frame, throughout the course of the rendered animation.
2009-03-11 05:32:11 +00:00
0ac3e70160 removed extra space in text.
Kent
2009-03-11 02:58:18 +00:00
891c3bc663 Simplified vpaint/wpaint radial control calls. Removed also some unused radial control code. 2009-03-11 00:52:00 +00:00
33509e8510 Changed vertexpaint and weightpaint to use the standard Brush struct, so they too work with the brush panel.
Note: these modes are only using color/alpha/size from Brush, so there's more integration work todo yet.
2009-03-11 00:43:08 +00:00
47311475ba * More render data RNA 2009-03-11 00:24:34 +00:00
bb406cbf48 Added a brush panel that can be eventually be used for all the paint modes. For now, just sculpt and texture paint are set up to use it (vpaint and wpaint don't yet use the Brush type.) 2009-03-10 23:38:16 +00:00
f7f0222a76 2.5 filebrowser
(WIP commit)
- added categories SYSTEM, BOOKMARKS and RECENT to left panel (recent files not filled yet)
- selection for bookmarks now works by storing draw position, might do that for the file list too
- removed fsmenu button and Bookmark button from UI region
2009-03-10 23:14:41 +00:00
a1082a6d32 Switch to non-array parameters.
Add mising property find checks and remove uneeded param.
2009-03-10 18:10:24 +00:00
943d85131a remove decimation and opennl libs from gameengine.
Kent
2009-03-10 16:06:59 +00:00
d17ca2179d Addes libopenjpeg (jpeg2000) support to the Makefiles
Kent
2009-03-10 16:04:29 +00:00
d42e3c7be9 * More 2.5 UI tweaks - text/controls/file browser 2009-03-10 08:54:35 +00:00
4a089890df [#18388] PLY Import fails if line ending is not \n
bugfix, read the header as ascii text - open(filename, 'rU'), only the body as binary.
2009-03-10 06:58:42 +00:00
691b9292a4 2.5 filebrowser
Some UI tweaks and fixes
* fixed some overlapping buttons (Matt, feel free to change button arrangement if you like), the Bookmark (B) button should probably be removed eventually from the current place and the fsmenu button as well, now that we have the directories on the left panel.
* fixed initialisation of params->display 
(aligorith: thanks for fixing, I did reset the #defines, since it was just missing the correct value in the initialisation)
* fixed bug when area became too small (crash)
* fixed bug (last file missing in long display)
* fixed selection when mouse outside tiles.
2009-03-09 21:17:19 +00:00
711d70ec46 View2D fixes for File Browser: Scrollbars now draw correct.
Elubie, please check on the values for params->display. They were being set to zero by default...

Also, set the correct panning locks for the various views
2009-03-09 09:15:23 +00:00
99ef543e56 * fixed the pulldown text embossing, looked awful on dark themes 2009-03-09 08:56:36 +00:00
0fd155f78e * fun 2.5 UI commit from seoul airport!
A few UI goodies from on the plane:
- fixed the sliders for non-rounded themes
- Made properties with rna subtype of 'percentage' automatically display a '%' 
character *after* the numerical value, where it belongs. It would also be really great 
to add a ° - degree symbol after angle and perhaps rotation subtypes. This works 
fine with international fonts but not with oldskool bitmap fonts (not part of ascii). I 
wonder if there's a way to get around this?
- Added nice embossing effects on buttons, labels and pulldowns (there you go, brecht :)
- and cooler looking tooltips

And did some work on the file browser. Andrea, I hope this is ok, let me know if 
there are problems and I can work on fixing it up :)
- added some new icons for file types, that are now shown in list view.
icon designers, please feel free to update and make nicer ones!
- tweaked the default colour theme and did some graphical fiddling to make the 
various views look nicer
- rearranged the buttons on the header and swapped the 'P' button for an up arrow 
button, this needs a nicer icon too.
- added outliner style alternating bands to the list view to see info grouping better. 
This has a small prob in columns view though, can fix that.
2009-03-09 08:31:45 +00:00
a04e5795a0 * test commit, some updated icons 2009-03-09 07:51:33 +00:00
06d455f428 Add support to lock individual axis during rigid body simulation, for translation and rotation. This makes it easier to do 1D or 2D physics (tetris, blockout)
todo: create some example/demo.blend.
2009-03-09 07:12:16 +00:00
6475e462fa Graph Editor: Frame numbers in horizontal scrollbar are no longer restricted to 1.0 frame intervals. 2009-03-09 07:00:40 +00:00
6e85d00055 Fix: The debug lines of Physics Debug Visualization were drawn incorrectly when using overlay scenes (it was using the wrong camera) 2009-03-09 05:01:16 +00:00
abb338ddf9 upgrade to latest Bullet trunk, fix related to vehicle anti-roll, added constraint visualization.
This commit doesn't add new functionality, but more updates are planned before Blender 2.49 release.
2009-03-09 04:21:28 +00:00
e4ce0d629e BGE patch: undo patch about removing blenderplayer console in Windows: it interferes with scripts that write to the console. Back to previous state: console cannot be disabled in Windows. 2009-03-08 17:23:36 +00:00
f73d7c697c * Updated slider design
Still a bit of a work in progress, will look a little weird on non-rounded themes, but will fix that when back home in .au!

The slider now fills the entire button, dragging on it changes the value, clicking edits it. You can also ctrl-click on either side of the slider 'edge' to increment or decrement in small amounts. There's one temporarily in the render buttons for testing.
2009-03-08 17:12:59 +00:00
155c1fb49a compiler fix part 1
[[Split portion of a mixed commit.]]
2009-03-08 16:50:11 +00:00
403b3763a8 2.5 filebrowser
still WIP commit, so Matt can do UI design
- cleaned up filebrowser drawing and selection
- selection bugfix
2009-03-08 13:14:12 +00:00
c20b4d6618 RNA:
* boolean/int/float_get_array now works for non-array
  properties as well, just filling in a single value.
2009-03-07 15:23:03 +00:00
d7479f99b0 Share enum types with rna and small bugfix because Ton needs to make keymodifier bitflag work. 2009-03-07 10:28:08 +00:00
dfe94557a9 New include file to share enum types between RNA and operators
Start with proportional falloff modes.
2009-03-07 10:26:29 +00:00
63456cefda added python api function to register an operator into a keymap
example...
bpyui.registerKey( C, bpyui.spaceTypes.SEQ, 0, "Sequencer", "SEQUENCER_OT_view_selected",  bpyui.keyTypes.A, bpyui.keyValTypes.PRESS, 0,0, {})
May want to split this into multiple functions.
2009-03-07 09:46:33 +00:00
35f0de00e4 * Some more icon updates and tweaks, thanks jendrzych! 2009-03-07 08:52:30 +00:00
4cf9fa3e59 Animation Editors: Copy/Paste Keyframe changes
As was discussed by the team the other day, copying keyframes (to copy/paste buffer) in DopeSheet/Graph Editor no longer relies on the selection status of the F-Curves, but rather on the selected keyframes only. This should be less confusing...

However, pasting keyframes still relies on having F-Curves selected to aid in the channel-matching process. There is still a lot of room for improvement in this area though (as noted in the code!).
2009-03-07 04:24:28 +00:00
c07acfb4fd Transform fun
extracting params in split transform operators.

work in progress still, but lots of fun with operator replay (F6)
2009-03-06 15:50:15 +00:00
78af62bec8 Addes jpeg2000 support to cmake.
I also did some small tweaks.  removed ifdef's for pluginapi
didn't need them there.
Fixed it so the filesel shows jp2 as image files.
(I'm going to do makefiles next)

Kent
2009-03-06 15:46:13 +00:00
Nathan Letwory
aeef01559e 2.5 / SCons
* make sure we can still compile WITH_BF_PYTHON=0
2009-03-06 14:58:37 +00:00
3ecf8d3a90 Fix bug with transform NumInput in 2.5 (used uninit var). 2009-03-06 14:12:12 +00:00
e6d742a69f RNA:
* Enum default value is now automatically the first item if it
  is not specified or 0.
* Otherwise if it's not in the items an error will be printed.
2009-03-06 10:22:12 +00:00
Nathan Letwory
d0267ccf6d 2.5 / Area management
* implementation of a proposal from during Wintercamp:
  - with SHIFT-LMB drag of area corner the area gets
    duplicated into a new window.
    This is the old "Rip Area" operator with a new,
    better name. The old menu and hotkey are now gone.
    This means we have currently split, join and now
    duplicate/copy area into new window in the area
    actionzones.
2009-03-05 23:19:44 +00:00
caf4be7def small commit to allow bpy_operator.c to compile in msvc 2009-03-05 17:47:33 +00:00
c3df168539 PyRNA API: some RNA types were crashing on looping, also return None rather then an RNA struct when the ptr->data is NULL 2009-03-05 16:24:30 +00:00
51b3bba1c0 Update MSVC9 project file for VideoTexture 2009-03-05 15:35:15 +00:00
ab8e9ba3dd VideoTexture: reactivate VideoTexture for scons/cmake/makefile compilation systems, fix video streaming, fix camera support in Linux, add multi-thread cache service, fix crash when a VideoFFmpeg object could not be created.
The multi-thread cache service is activated only on multi-core processors.
It consists in loading, decoding and caching the video frames in a 
separate thread. The cache size is 5 decoded frames and 30 raw frames.
Note that the opening of video file/stream/camera is not multi-thread:
you will still experience a delay at the VideoFFmpeg object creation.
Processing of the video frame (resize, loading to texture) is still done
in the main thread.  Caching is automatically enabled for video file, 
video streaming and video camera. 

Video streaming now works correctly: the videos frames are loaded
at the correct rate. Network delays and frequency drifts are automatically
compensated. 
Note: an http video source is always treated as a streaming source,
even though the http protocol allows seeking. For the user it means that
he cannot define start/stop range and cannot restart the video except
by reopening the source. Pause/play is however possible.

Video camera is now correctly handled on Linux: it will not slow down the BGE.
A video camera is treated as a streaming source.
2009-03-05 15:16:43 +00:00
a7c4009267 Make RNA an Operator dir() work in py 2.5 - 3.0
removed epy docstrings from RNA python api, since Python can get this info from rna. (could be redone in python if getting doc's on RNA is needed)
epy_doc_gen works again
2009-03-05 12:09:30 +00:00
7b197fcfdd MSVC9 project file update for Bullet upgrade. 2009-03-05 09:50:16 +00:00
Nathan Letwory
0229621b51 2.5 / PyRNA
* a collection of small changes after review together with Campbell.
2009-03-05 08:53:29 +00:00
63ae590f44 Boolean vectors and arrays! 2009-03-04 15:30:47 +00:00
36c3ed2350 run script in the text editor is back. UI scripts dont work yet. 2009-03-04 13:26:33 +00:00
7d5ef14d5f Some compiling tweaks for cmake / osx 10.5 2009-03-04 08:58:24 +00:00
151317e990 Fix build: don't use Character stuff, it wasn't meant to be included in Blender/extern/bullet2 distro. 2009-03-03 14:31:10 +00:00
0f040e2f26 2.5 filebrowser
- WIP commit
- bookmarks toggling (region collapsing needs to be done still)
- switching between display types in header (long filenames needs to be done still)
2009-03-03 13:15:40 +00:00
ead30e5bc1 2.5 filebrowser
bugfix: create directories to store thumbnails if they don't exist.
2009-03-03 10:24:06 +00:00
Nathan Letwory
981dde56b4 (which was the wrong one. of course) 2009-03-03 10:22:00 +00:00
Nathan Letwory
dbbe764a24 2.5 / SCons / Win64
- add a very preliminary config.
2009-03-03 10:21:11 +00:00
982a5cc60d Upgraded to Bullet 2.74. The upgrade introduced a few bugs, which need to be fixed before Blender 2.49.
In particular, the Bullet vehicle seems broken, and some soft-body demos don't work.
No new features or benefits are added yet, but a few improvements are planned before Blender 2.49 release.

Please update the build systems, and add those 3 files:
extern/bullet2/src/BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp
extern/bullet2/src/BulletCollision/CollisionDispatch/btGhostObject.cpp
extern/bullet2/src/BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp

I'll watch the Blender mailing list, in case this commit causes some issues.
2009-03-03 03:41:24 +00:00
63b4879c9e And another commit to cleanup a little, this is the last,
next commit add internal font and we can go ahead and remove
ftfont and bmfont.
2009-03-02 21:02:39 +00:00
c2fdac64c4 * errors in bpyui draw scripts were segfaulting
* added PyLineSpit(), useful for debugging so you can easily find the 
line of the python script running.
2009-03-02 20:18:29 +00:00
f8ef887880 minor update to be compatible with Bullet 2.74 physics:
btPoint3 has been deprecated, it was already a typedef to btVector3
replace std::vector by btAlignedObjectArray when storing Bullet objects, because MSVC STL implementation has some bugs, preventing to contain aligned objects
(btVector3 is 16-byte aligned, to allow SIMD)
2009-03-02 17:43:35 +00:00
24e8d7aa74 scons error 2009-03-02 17:24:40 +00:00
4902b6e8e0 2.5: fix for compiling Carbon clipboard code, forgot to update this line. 2009-03-02 14:34:33 +00:00
1a380356fc 2.5 MSVC9 projectfiles
- space_text update
2009-03-02 13:55:53 +00:00
fc192338c0 * some more rna stuff in materials 2009-03-02 13:34:34 +00:00
143fb8e131 2.5: bugfix, new text space was not initialized correct. 2009-03-02 12:43:54 +00:00
acc8d06b77 Cleanup a little before add internal font (bmfont). 2009-03-02 05:20:48 +00:00
06629033b3 Pose Channels - changing settings in RNA updates them correctly again 2009-03-02 01:22:02 +00:00
d52212c73e 2.5 - Various animation bugfixes for samples 2009-03-02 00:55:10 +00:00
Nathan Letwory
cc2e3980f8 * fix linking problem when building WITH_BF_PLAYER=True 2009-03-01 21:23:04 +00:00
892a667959 Limit cascading rotations (rotation on each child of a chain) to Individual Center mode, as I thought I had done at first. :| 2009-03-01 15:03:45 +00:00
6888f540e8 Graph Editor: Baking (Alt-C) operator now works as expected
In the process, added some really basic drawing code for curves containing such data. Note: the endpoints don't draw right yet though.
2009-03-01 11:47:29 +00:00
d9c9108a6e Graph Editor: Added operator to 'bake' keyframe-based F-Curves to be composed of samples.
This operator can be activated using the 'Alt-C' hotkey for now, and operates on selected + editable F-Curves. This is currently still highly experimental, and does crash

I've implemented this as a way to test out the FPoints/samples code, which will be used to provide better support of the dense F-Curves which result from importing Mocap/BVH data. These should use considerably less memory + have a few additional benefits over keyframes when they're working in a stable fashion.
2009-03-01 11:27:31 +00:00
db472a3d14 View2D: Removed the hacks from commit 19005 as they weren't actually needed. The keymap currently contains some special method for coping with this. 2009-03-01 06:22:03 +00:00
7f8b81c5d4 2.5 - Animation related tweaks
* Scrollers for zoomable views are now always shown again. The previous method was quite bad for these, as there would be flickering as the view was zoomed + panned. Also, the old method was not suggestive of the drag-zoom features on the scrollers, which was provided by the shaded bars. (Non-zoomable views will still only show scrollers where appropriate).

* Insert-Key in 3d-view (i.e. the 'temp' operator which still needs to be ported to use builtin relative keyingsets) had a bug where the wrong keyframe were being inserted (rotation in instead of location, scaling instead of rotation) for bones.
2009-03-01 05:45:44 +00:00
31750bf1de 2.5 - Text Editor bugfix
KM_TEXTINPUT event matching was not correctly working for standard number keys (and chars such as @ # $ % ^ & etc.), which were being ignored. 

Ton - you might like to check this commit. It works fine here now, but it might not be the intended way.
2009-03-01 01:50:21 +00:00
6cc89b9d4e 2.5: Text Editor back.
There was very little structure in this code, using many globals
and duplicated code. Now it should be better structured. Most
things should work, the main parts that are not back yet are the
python plugins and markers. Notes:

* Blenfont is used for drawing the text, nicely anti-aliased.
* A monospace truetype font was added, since that is needed for
  the text editor. It's Bitstream Vera Sans Mono. This is the
  default gnome terminal font, but it doesn't fit entirely well
  with the other font I think, can be changed easily of course.

* Clipboard copy/cut/paste now always uses the system clipboard,
  the code for the own cut buffer was removed.
* The interface buttons should support copy/cut/paste again now
  as well.
* WM_clipboard_text_get/WM_clipboard_text_set were added to the
  windowmanager code.

* Find panel is now a kind of second header, instead of a panel.
  This needs especially a way to start editing the text field
  immediately on open still.

* Operators are independent of the actual space when possible,
  was a bit of puzzling but got it solved nice with notifiers,
  and some lazy init for syntax highlight in the drawing code.
* RNA was created for the text editor space and used for buttons.

* Operators:
    * New, Open, Reload, Save, Save As, Make Internal
    * Run Script, Refresh Pyconstraints
    * Copy, Cut, Paste
    * Convert Whitespace, Uncomment, Comment, Indent, Unindent
    * Line Break, Insert
    * Next Marker, Previous Marker, Clear All Markers, Mark All
    * Select Line, Select All
    * Jump, Move, Move Select, Delete, Toggle Overwrite
	* Scroll, Scroll Bar, Set Cursor, Line Number
    * Find and Replace, Find, Replace, Find Set Selected,
	  Replace Set Selected
    * To 3D Object
    * Resolve Conflict
2009-02-28 23:33:35 +00:00
d4adc43fc1 BGE patch #18309 commited: Add an addObject() method to KX_Scene. 2009-02-28 22:25:23 +00:00
56977d62d4 BGE patch #18181 commited: Fixing some blenderplayer arguments (-c, -w, -f). 2009-02-28 21:44:24 +00:00
9265150942 MSVC9 project file: add ffmpeg avdevice lib to linker for the blenderplayer. 2009-02-28 21:37:49 +00:00
6c409ed541 BGE API cleanup: apply patch from Moguri: Near, Radar, Touch sensor updated. 2009-02-28 21:00:27 +00:00
Nathan Letwory
2469305376 2.5 \ Python API
* put back #if PY_VERSION_HEX check again, so we without Python 3.0 can still compile
  - Campbell, please don't remove it again, ok?
2009-02-28 15:28:18 +00:00
bab4cd6991 Python experimental UI API
Can draw panels in the scripts space containing RNA and operator buttons.
* Added bpyui.register() so scripts can draw buttons and panels into the scripts space type.
* wrapped drawBlock, drawPanels and matchPanelsView2d
* Operator buttons take a python dictionary used to set the button defaults.
* BPY_getFileAndNum utility function to get the filename and line number python is currently running.
2009-02-28 13:27:45 +00:00
0f8969640c Bugfixes for armature operators - parent + align operators weren't working correctly, since the active bone wasn't being accounted for in the right way. 2009-02-28 10:23:36 +00:00
924ff0dc98 2.5: updated MSVC9 project files
- blenfont
- editors: sculpt changed to sculpt_draw
- some RNA additions (rna_animation.c)
- fixed some game engine include directories
2009-02-28 09:59:27 +00:00
6f7a43217b 2.5 - Various animation bugfixes
* When inserting keyframes, newly created groups are no longer created with expanded + active flags set. The former should work better and keep the views less crowded by default when there are many F-Curves.
* Fixed crash when trying to select action groups. This only seemed to happen in one of the BBB files...
* Settings that have been tagged in RNA as being un-animateable are now ignored when creating Keying Sets.
* Removed some un-needed old code from keyframing code. I've still left in the old-style builtin KeyingSets from about 2.48, since those will be useful reference when setting up the new builtin KeyingSets.
* Removed obsolete correction factor for Visual Keying -> object rotations.
2009-02-28 09:58:58 +00:00
541d49bc2c * blender doesn't need the -w anymore to start in a window
* NULL can be used instead of () args for calling python functions from C.
2009-02-28 09:25:42 +00:00
badbba7266 Making y2 for File the same that Add Timeline etc 2009-02-28 07:45:16 +00:00
8d3dcfb104 BGE Python API
* Scene's and GameObjects can now be printed (raised an exception)
* Added GameLogic.getSceneList()
2009-02-27 23:53:09 +00:00
71cedc8c1b Running the OBJECT_OT_mesh_add operator outside the 3d view would crash. 2009-02-27 21:27:03 +00:00
e872843c85 blender.desktop file from Rudolf Kastl 2009-02-27 18:49:25 +00:00
b992a449f1 Restore the #if around the ui_module declaration, this made compiled fail
with python 2.5 (< 3.0).
2009-02-27 14:10:44 +00:00
66c2f1c2a3 added defAutoButR() and blockSetFlag() and some flags for the experimental python UI, which just wraps C the functions. 2009-02-27 10:22:40 +00:00
Nathan Letwory
c9653cc083 [18327] Fix crash when activating nodes
- faulty linking and header file lead to crashing whenever nodes were used.
2009-02-27 00:08:16 +00:00
4d92526401 build blenderplayer without opennl and decimation 2009-02-26 12:43:24 +00:00
fd1adb58eb better remove t1_generate_luts.c rather then in scons. 2009-02-26 09:14:10 +00:00
c785532bec Py BGE API
Python dir(ob) for game types now includes attributes names,
* Use "__dict__" rather then "__methods__" attribute to be Python 3.0 compatible
* Added _getattr_dict() for getting the method and attribute names from a PyObject, rather then building it in the macro.
* Added place holder *::Attribute array, needed for the _getattr_up macro.
2009-02-26 09:04:06 +00:00
b49b02842a update to build with python 3.0.1 which removed Py_InitModule3, added richcompare functions to the operator api. 2009-02-26 05:50:19 +00:00
936a6eeda8 small errors in touch sensor and gameObject 2009-02-26 05:17:54 +00:00
f87194820b openjpeg contained a C file with a main() function, user reported it was overriding blenderplayers.
remove this file from building, other build systems should do this too.
2009-02-26 04:40:00 +00:00
6bfb8ca6b0 - Attributes for the collision sensor: propertyName, materialCheck, pulseCollisions, objectHit and objectHitList.
Removed a check in Python API touch.setProperty() for the property name on the sensor owner before allowing the name to be set - it makes no sense and isnt checked when creating the sensor.
- SCA_DelaySensor.py indent error making epydoc fail.
2009-02-26 04:17:23 +00:00
8fa180a9b1 * Fix for a small bug where multiple scattering wasn't being enabled properly.
* Also a MSVC compile fix
2009-02-26 00:13:40 +00:00
dff781c2a8 Continue snapping cleaning job.
Snap to armature correctly in edit mode and when posed.
Merge snap and embed in skeleton sketching. Ctrl key does both, depends on the snap mode (volume or other). Snaps to other strokes in all snapping mode except Volume.
2009-02-25 20:07:45 +00:00
9ac7c8e91a 2.5: Particle edit mode more functional now. Transform, brush
editing, paint cursor, radial control, mouse/border/circle/lasso
select, mirroring, bad level calls fixed, etc.
2009-02-25 19:29:58 +00:00
97e70ef3c4 forgot this file- remove Sumo from the menu if its disabled. 2009-02-25 17:20:41 +00:00
a4ad52f1aa New Pulse option for the collision sensor (off by default wont change existing logic)
Previously only the first collision would trigger an event (no collisions a negative event ofcourse)

With the Pulse option enabled, any change to the set of colliding objects will trigger an event.

Added this because there was no way to count how many sheep were on a platform in YoFrankie without running a script periodically.

Changes in collision are detected by comparing the number of objects colliding with the last event, as well as a hash made from the object pointers.

Also changed the touch sensors internal list of colliding objects to only contain objects that match the property or material.

- pulse isnt a great name, could change this.
2009-02-25 17:19:30 +00:00
c3078c94fb 2.5
SHIFT+A add armature didn't add a bone yet. :)
2009-02-25 14:50:40 +00:00
c0a6cb950d 2.5
Four new operators for Armature editmode, by Arystan D.

- Extrude (Ekey)
  Extrude forked (shift-E when mirror on)
- CTRL+click extrude
- Delete selected (Xkey)
- Duplicate (shift-D)
2009-02-25 13:48:39 +00:00
7fffb0b630 Building the game engine with Solid/Sumo is now optional for scons using WITH_BF_SOLID.
Now Sumo is has been deprecated for a while we might want to remove it for 2.5.
2009-02-25 12:07:51 +00:00
f58b4eedca Animato Conversions:
Action Channels (for bones only) are now converted to the new Action Groups, restoring expand/collapse functionality for these, which was quite helpful.
2009-02-25 11:26:16 +00:00
e6b05abd00 Outliner/Datablocks view: IKEY/Alt-IKEY Hotkeys work for Inserting/Deleting keyframes via KeyingSets 2009-02-25 10:55:03 +00:00
3767070c8a Anim-Channel Filtering: If an object only has animation-data attached to one of its Material datablocks, they will now get included too.
This makes it possible to edit keyframes for material animation where no object-linked animation exists. However, this is provided that the material is linked to an object!
2009-02-25 10:27:08 +00:00
fc070ca31c 2.5
Bugfix in compositor: code that duplicated the nodetree and merged
viewer images back lacked handling the case when a viewer was not
set active yet.

This fixes eternal loops in compositor after removing Viewers.
2009-02-25 09:54:41 +00:00
669dd229f4 2.5
Bugfix: commit of last week that moved object_handle_update() out
of the view3d code into event loop caused render to crash. This
update should not be called during render. In future it'll even
be thread-locked or better; solved by giving objects an 'owner'
for storage of updates.

This solves a lot of crashes on render.
2009-02-25 09:36:25 +00:00
c77af31166 Minor speedups for the BGE
* Where possible use vec.setValue(x,y,z) to assign values to a vector instead of vec= MT_Vector3(x,y,z), for MT_Point and MT_Matrix types too.
* Comparing TexVerts was creating 10 MT_Vector types - instead compare as floats.
* Added SG_Spatial::SetWorldFromLocalTransform() since the local transform is use for world transform in some cases.
* removed some unneeded vars from UpdateChildCoordinates functions 
* Py API - Mouse, Ray, Radar sensors - use PyObjectFrom(vec) rather then filling the lists in each function. Use METH_NOARGS for get*() functions.
2009-02-25 06:43:03 +00:00
2eb85c01f3 remove warnings for the BGE
- variables that shadow vers declared earlier
- Py_Fatal print an error to the stderr
- gcc was complaining about the order of initialized vars (for classes)
- const return values for ints and bools didnt do anything.
- braces for ambiguous if  statements
2009-02-25 03:26:02 +00:00
aa7c45c190 Snaping cleanup, removing a lot of duplicate code.
Snapping to armatures: non-editmode armatures only, rest pose only, ... (this is mostly work in progress code).
2009-02-24 21:25:36 +00:00
56e9c87309 building the game engine without SDL works again 2009-02-24 17:34:41 +00:00
d9862517fb Added return statements to a couple of functions that didn't have
them and removed an extra ;

Kent
2009-02-24 16:51:55 +00:00
adaa4b0fd0 Making KX_GameObject names read only.
This was committed in revision 2832 but never accounted for existing object name hashes which existed since revision 2.

Its possible to update the names elsewhere but unlikely anyone ever used this successfully so removing.
2009-02-24 12:38:56 +00:00
c2145c67e8 Made animation-editor copy/paste operators use reports-api for reporting errors instead of console prints. 2009-02-24 11:23:04 +00:00
57cf62745f DopeSheet/Graph Editors: Restored Copy/Paste operators
The channel-matching code when pasting still needs improvements to work really nicely...
2009-02-24 11:18:24 +00:00
33aee345ed fix for segfault when the replace mesh actuator references a mesh that has no object in the current scene. 2009-02-24 09:49:28 +00:00
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
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
b46128d7b1 Added rna timeline to cmake build 2009-02-24 03:14:57 +00:00
03ce51bb89 Gave RNA to timeline markers. Updated both Scene and Action RNA for standard and pose markers. 2009-02-24 03:06:23 +00:00
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
7c830b75f1 merging trunk 17520:19093 2009-02-23 21:00:42 +00:00
b9ecc4962b 2.5
Weightpaint could crash, wrong check for editmode mesh.
2009-02-23 17:30:00 +00:00
576cb47945 2.5
Added more strict poll() to radial control for texture paint.
I'd advise to use wherever possible G.f checks in the polls for now, 
easier to get this solved later.
2009-02-23 16:31:58 +00:00
8416db896c ADR_CODE conversion done for particle systems. Fixed typo in particle rna. 2009-02-23 14:55:23 +00:00
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
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
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
ce5428cf4a Graph Editor: Tweaking the drawing of the channel colours for F-Curve channels.
I'm not happy with this yet, but it seems a reasonable compromise. There is a commented-out method included here too.
2009-02-23 06:22:47 +00:00
ee49a9596c brought back the sculpt buttons in the NKEY panel 2009-02-22 22:00:35 +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
674aae36b6 * Added radial control for texture paint (in both view3d and image)
* bugfix: for older files, initialize the brush curve on file load
2009-02-22 19:31:25 +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
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
7c8d98acb8 Animation Editors: Drawing stuff
* Added basic panels (Info, Drivers - where applicable, Modifiers) for editing active F-Curve/driver in Graph Editor. The buttons layouts here are really really rough, and have only got a few buttons to be sufficient for debugging purposes. Unfortunately, I don't have time to tweak these nicely now. 

* Fixed indention errors with Action Groups used in Material actions

* Changing mode in the Graph Editor now recalculates colours
2009-02-22 09:30:18 +00:00
5d7b27144f Animation Editors: Added Tab-Key to toggle editability of selected channels.
Ton - Currently, I've had to add a new operator to set this, since it is not possible to specify via keymaps whether the invoke or exec should be called by default for an operator. 
(See corresponding mail on 2.5 mailing list for details about this)
2009-02-22 05:55:37 +00:00
cfe7aadec4 Graph Editor: Selecting F-Curve channels + keyframes now sets active F-Curve correctly. 2009-02-22 05:34:47 +00:00
874f8008a2 Animation Editors: Bugfixes for channel selection tools
* Ctrl-Shift select for Action Groups works again
* Clicking on a channel's data will select it, and also make it the active one in the list now
* Selecting keyframes in F-Curves will select the F-Curve channel too now (+ make it active)
2009-02-22 04:13:29 +00:00
f2f734c9a5 2.5
View3D: background image buttons back. Again nice
to use blend or size or other sliders for live
updates. :)

Note that 'load' doesnt work yet, the operator for
image load only does space-image now.

Also note that with a built-in 4-split option, we
can also encode a way to show 3 different pics.
2009-02-21 19:17:31 +00:00
93c367dc29 2.5: fix for last commit, for case sensitive OSes. 2009-02-21 18:43:28 +00:00
95fffbb57f 2.5
Useful goodies: most buttons for Image window back.
Not every button works! But what you can do:

- press Nkey to show/hide options
- use curves, with realtime updating
- image properties panel, load, browsing layers,
  setting types
- paint panel
- plus new paint color picker panel! (why it wasn't
  there in 2.4x is probably obvious, but now it can!)

Hrm... radial control should be added here too, and a nice
paint size cursor?
2009-02-21 18:33:09 +00:00
f9ab4481ab 2.5
Support for listview/buttons region in ImageWindow.
Now all code is in this commit :)
2009-02-21 15:31:01 +00:00
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
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
59b44cda51 Graph Editor: NKEY panel - added code to retrieve 'active F-Curve'
Currently, this is just used to print the 'name' of the active F-Curve in a panel for verification purposes. This is the recommended way of getting this info.
2009-02-21 11:22:06 +00:00
a9654c3e6a Graph Editor: Started adding the missing NKEY panel stuff
Only a dummy pannel for now. I'll add some basic examples of relevant buttons + ways to use them soon.
2009-02-21 10:38:58 +00:00
87bdbab544 * Added back 'Insert Key' operator for DopeSheet editor
* Fixed button spacing problems in TimeLine
2009-02-21 05:04:12 +00:00
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
994f915b3c 2.5 - Fixed compiling for scons + mingw
jesterKing: please check on this, since it seems to be basic typos only? See my mail to the list for details of the error.
2009-02-21 03:26:03 +00:00
7260e8fe29 bugfix [#17941] Attempting to change path of audio to relative fails. 2009-02-21 03:02:39 +00:00
Nathan Letwory
64dd45ef43 2.5 / Scons | Building on 64bit Windows
* add preliminary support for building Blender on 64bit Windows with _msvc_. The SConstruct should automatically detect if you are on a 64bit Windows and if you have that 64bit build is assumed. If you're not, 32bit build is assumed.
  NOTE: this is still very much wip, so your mileage may vary. Do please report on b25 taskforce ML in case of trouble.
  NOTE2: many of the libs are being linked in statically
  NOTE3: hopefully I didn't break anything for other build platforms (mingw, linux, osx).
  NOTE4: comes after NOTE3
2009-02-20 22:08:02 +00:00
d56fd6d4ce 2.5: Fix build temporarily, seems there was a file missing
in the graph properties panel commit. Ton, please check.
2009-02-20 20:43:22 +00:00
ebd2b1212d 2.5: Particle Edit, work in progress commit.
* Still incomplete and some operators don't work, refresh issues, etc.
* Made Hide/Reveal operators consistent for various modes.
2009-02-20 20:39:27 +00:00
39c2b438a9 2.5
Graph Editor: added region for buttons (properties), so we can
check drivers again! Works like view3d, press NKEY. No buttons
there yet though... no time anymore today, it'll require some
RNA magic probably.
2009-02-20 19:11:35 +00:00
Nathan Letwory
cdf70e0f84 2.5 - temporary hack hack
#if 0 main body of EdgeSlide for now - 64bit msvc compiler chokes on it.
 - added a goto line combo to make the function complete.
2009-02-20 18:36:27 +00:00
be5cd1596d 2.5
View3d: 

- using layerbuttons in header allows SHIFT for extend
- added operator for layer hotkeys, works as for 2.4x
2009-02-20 18:01:33 +00:00
a774ccb21d Small tweak to get cmake working again.
Kent
2009-02-20 17:20:20 +00:00
408e6d54db 2.5
Animsys bugfix: files didn't read or write all supported animdata
structs yet (key was missing for read, crashing). Now it supports
all 10 implemented ID types:

OB CU KE MA TE NT LA CA WO SCE
2009-02-20 16:39:39 +00:00
236adb4ef3 2.5
Small fixes for animsys:

- Blender 2.4x allowed drivers to exist without object target, these
  got converted resulting in error prints. Now they get skipped.

- Animdata struct was not created for objects with poses, but without
  action/nla linked. 

- An action-channel-constraint-ipo gets inserted in drivers differently
  than a pose-bone-constraint-ipo. Not sure yet how... but it makes a
  different depsgraph relation. 
  Error is of course in depsgraph, that'll get tackled. For correct
  driver eval I've made 'object update ob' also been called for
  the 'object update data' tag.
2009-02-20 16:18:37 +00:00
b428760874 DopeSheet/Graph Editor: Restored Duplicate Keyframes operators (Shift-D) for both of them 2009-02-20 11:17:33 +00:00
35de68c672 2.5
Bugfix: on closing wm, it was using a free'd pointer to screen.
2009-02-20 10:39:31 +00:00
2d088f5c8b 2.5 Userprefs/Themes version patching
Brought back many missing conversions. Dunno why so many of them weren't present.
2009-02-20 06:30:47 +00:00
5330d8408d started RNA-ifying scene->render data 2009-02-20 06:05:00 +00:00
be83d8d07a 2.5 - Moved version-patch for animation related settings/theme-colours in .B.blend files to the < 250 check.
Hopefully, this solves the issues with the default keyframe interpolation mode being initialised to 'constant' on some old .B.blend files.
2009-02-20 06:04:06 +00:00
c666a790df Aha! I've finally found those elusive RNA API functions that prevented the ANIM_OT_keyingset_add_destination() operator from being able to be used. 2009-02-20 05:59:15 +00:00
8145489a7d Add clipping text option to blenfont also add an enable/disable
function for aspect and rotation (and the new clipping).

Update source/Makefile to point to the new libed_sculpt_paint.
2009-02-20 05:42:44 +00:00
72e99d9182 KeyingSets: Added two operators which wrap the internal (blenkernel) KeyingSets API functions
These operators - ANIM_OT_keyingset_add_new() and ANIM_OT_keyingset_add_destination() - are designed for use from PyAPI or through some other means, and as such, have not been assigned any hotkeys. 
They should only be used when all the relevant settings can be supplied to them, which in ideal circumstances would be through some script used by a rigger to define all the necessary Keying Sets for their rig for example.

Whether we will be building many of the utilities for the PyAPI like this remains to be seen. 

Note: the second one doesn't work yet, as there are problems with accessing certain operator props.
2009-02-20 05:42:09 +00:00
8e41a21607 2.5:
* Image painting back. 2d paint, 3d paint and projection, undo,
  pressure, repeating paint operations, etc should all work.
  Drawing cursor needs a bit of work, only gets shown when enabling
  texture paint mode now.

* Move sculpt, image paint, and vertex/weight paint into a single
  sculpt_paint module. Doesn't make much difference now, but nice
  to have it together for better integration and consistency in
  the future.
2009-02-19 23:53:40 +00:00
95f91f2a46 MSVC9 project files: reactivate VideoTexture module in BGE; it that was disabled for some reason. 2009-02-19 23:15:27 +00:00
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
2cb5af58a6 2.5
- Mesh Rip back (Vkey). For those who keep wondering how
  it works: just put mouse cursor somewhere close to the
  selection, press V and mouse mouse away from it. Feels
  like real rip!

- Made extrude sorta work, no menu/options yet though.
  But it does transform!

- Added an short event->mval[2] with region coords, 
  easier coding for the guys :)

- Fill operator standard delivers 'beauty' now
2009-02-19 19:03:53 +00:00
dd78ca15c7 2.5
Made sliders behave correct in SpaceGraph and SpaceAction.
- no slider draw when all is visible
- sliders update correct when visibility changes.

Still an issue here to tackle; view2d->tot is used incorrect...
it's set on window size now (??), it should be the boundbox of 
the entire contents. That allows correct slider draws and ops
like 'view home'.
Will poke Joshua tomorrow. :)
2009-02-19 17:13:04 +00:00
6bf9f383dc 4 new function, boundbox, width, height and rotation.
The rotation is through glRotatef and as you can see it's ugly,
the freetype2 allow apply a transformation (2x2 mat) to the glyph
before load, so I want to try using that.
Another thing to add is the 4x4 mat to get the scale and size from
there.. but I need commit this now to continue from my home.
2009-02-19 16:39:36 +00:00
f377be3783 2.5
Assorted smaller fixes:

- Fix: modal keymaps for editmode in view3d were not set again
  when you copy areas or go fullscreen.

- Improved "redo last op" (F6) to search back in history for
  a redoable operator. Operator also used wrong pupmenu type.

- On creating new FCurve editor, the channel rainbow colors are
  set correct.

- EditMesh: fixed code for Spin/Screw, correct props, init and
  error reporting. (Spin hotkey ALT+R temporary)

- recompiled all to check for uninitialized variable warnings.
  (compile flag should be -O for this). Fixed some proto's.
2009-02-19 16:22:07 +00:00
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
c597863783 "object" and "objectLastCreated" attribute for actuators, deprecates getObject/setObject() & getLastCreatedObject()
also removed some warnings
2009-02-19 10:34:51 +00:00
521a18f5a2 2.5
- Fix in ESC for render output window; it didn't check the 'full' and
  'prevspace' flags correct. In some cases it left the screen in 'full'
  mode on ESC.

- Added modal handler on a render, which catches the ESC while render,
  to prevent that ESC to be passed on to the image window.
  This handler can be further elaborated later to prevent edit accidents
  while render is in progress. 
  I already notice some derivedmesh/customdata free errors on render now
2009-02-19 10:21:17 +00:00
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
b6b910f864 RNA: fix for bug in particle code, hopefully this solves the crash? 2009-02-18 21:28:04 +00:00
66698e9d71 2.5
Cleanup of saving code for Image window.

Little extra: added poll() check for buttons, greying out inactive
menu items or buttons. You can see it work in Image menu.
(Item 'save image' is grey when it wasn't saved, then you have to
use the 'save as' item).

Carefully designing poll checks is worth a trial once. :)
Do note that cpu time for polls should be totally minimal.
2009-02-18 18:08:33 +00:00
1a9e68bde5 2.5
Patch from Arystan:

- bugfix in mouse select posemode
- Lkey 'select linked' for both pose as editmode armature.
2009-02-18 14:13:06 +00:00
1090b0c598 2.5
Several things in one commit; could not split this up easily,
one job invoked another, and so on. :)

- Added pulldowns for save/load .blend file in top bar.

- To enable "Save" without further popups (save over) 
  I've added a signaling function in window header to
  indicate a succesful save.

- On any undo push it now signals 'file changed'. This
  goes by notifiers nicely, but now registers only the
  undopushes, which is quite unreliable. "Changed" state
  shows in header as "Blender*" and for OSX with the
  standard close button black dot.

- Made screencast show a button in top bar indicating such,
  and allowing quit. No hotkey for quit yet... but ESC will
  keep casting now.

- Fixed new BLF_init(), which should be in WM_init() and not
  on any .B.blend read.

- Fixed CTRL+F3 "Save Screenshot", which was still using old
  fileselect code.
2009-02-18 13:29:54 +00:00
915e989f9d 2.5
Added ghost display state hint 'modified file'.
Only supported in osx though (close button in bar gets dot).
2009-02-18 13:21:44 +00:00
c396a4ec15 Shift-A adds Armature Object (in Object Mode) or Bone (in Edit Mode) again. Still todo, is to have Shift-A in Object Mode add single-bone armature again. 2009-02-18 09:28:04 +00:00
3f72758da2 Bugfix for Record Transform Animation
Only selected objects are now keyframed.
2009-02-18 06:25:57 +00:00
d38babbee9 * More icon naming updates 2009-02-18 06:03:14 +00:00
f5de61816b * Cleaned up naming of icon ID constants. This helps fix bad icons in the graph editor among others. 2009-02-18 05:54:37 +00:00
7d2582de09 more uninitialized variables and auto-complete could copy a string over its self. 2009-02-18 05:49:51 +00:00
21925c6f47 uninitialized variable used in mesh_foreachScreenVert__mapFunc 2009-02-18 04:43:12 +00:00
ba59754a1d * More icon updates 2009-02-18 04:36:07 +00:00
7a96881795 disable texture clamping while painting. 2009-02-18 03:56:16 +00:00
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
d00b18c718 working yet preliminary (like everything) screw mesh. in irc there was a discussion about setting the screw axis outside of the function, but someone else should do that. 2009-02-18 03:01:45 +00:00
bf5e267c97 2.5
*****
added add_primitive_bone, removed operator from previous commit as it was not needed
2009-02-18 02:13:36 +00:00
4a2155e3ab 2.5
******
added a ARMATURE_OT_bone_add operator, ita generic operator to add a bone it behaves the same way as the old add bone (making a bone not set the tail but have it selected), commiting this so other add bone ops like add bonre pinative or making new armature
2009-02-18 01:50:26 +00:00
94e583b476 RNA:
* Added Particle wrapping patch by Roelf de Kock. It's not
  complete yet and I haven't reviewed it, but committing anyway,
  will get to it later.
* Added "Percentage" subtype for floats. Doesn't really do
  much besides making auto rna buttons into sliders rather than
  numeric inputs, but can later display in % rather than 0.0-1.0.
2009-02-17 21:07:01 +00:00
ec8c8f08ba 2.5: Image space, two fixes:
* With one item in ID databrowse list, you couldn't activate it.
* Render result without render image now displays grid at size
  according to render settings again.
2009-02-17 20:37:23 +00:00
573e14c592 2.5: CMake update for blenfont module, also some flags for scons
to make it compatible with makefiles and ftfont module.
2009-02-17 20:16:09 +00:00
473d00943b And another scons fix, hope now work!! 2009-02-17 19:57:05 +00:00
38410b63a6 2.5: Text edit mode operators back. Took me a while getting
them nicely repeatable, and splitting up the big edit_text
operator into individual operator so it's all nicely scriptable,
documented, configurable, etc..

* Insert Text, Line Break, Insert Lorem
* Toggle Case, Set Case, Toggle Style, Set Style, Set Material
* Copy Text, Cut Text, Paste Text, Paste File, Paste Buffer
* Move, Move Select, Delete
* Change Spacing, Change Character

Notes

* Text (datablock) to Object doesn't work yet, will need to
  implement text editor context for that.
* Some shortcut keys don't work because screen/wm overrides them,
  ctrl+x, ctrl+left/right. That override goes top down which works
  well for some cases, but here we need to override in the other
  direction.
* There's no unicode support in RNA, or the user interface code
  for that matter, but text strings can contain these characters.
  At the moment it stores a UTF-8 string in char arrays, which is
  supposed to be nicely compatible with ascii. Seems reasonable to
  add support for UTF-8 in the interface code, python bindings, ..
  eventually?
2009-02-17 19:55:20 +00:00
8c8792bb12 2.5: fix to make blenfont module compile with scons. 2009-02-17 19:37:47 +00:00
bd33237830 Fix scons build for blenfont, patch by skejoe. 2009-02-17 19:09:14 +00:00
16a61743e1 Making the things compiled!!
I change the #if 0 with #if WITH_FREETYPE2, also fix a lot of typos, etc.
This is the basic but now it draw text!!, I am using the "User Preference"
space to test the library, nobody is working on that and the option are
in the outliner now so...

TODO-next: using the 4x4 mat, string size, bounding box, aspect and rotate.

Notes: I update the Makefile, missing some include and other things so
maybe scons, cmake and msvc also need update ?
2009-02-17 16:56:29 +00:00
9aa7e981bd 2.5
Bug: cleanup in space_file copy I did missed a NULL check :)
2009-02-17 16:33:08 +00:00
9322bddf2c 2.5
Fix for the 'repeat last operator' option. It didn't work yet well
outside editmode. Now undo/redo has to fully keep the UI alive,
even when called from within a running popup.

Another fix: when regions collapse/hide they were not effectively
disabled, still accepting events. (like Nkey in 3d window).
2009-02-17 15:53:52 +00:00
9185f7931a 2.5
Bugfix: passing on uninitialized var to a function made msvc halt.
Strange that gcc didnt complain :)

Brecht: check if this 'a' was needed as counter or so?
2009-02-17 14:56:07 +00:00
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
7a66002753 2.5
Node/Composite tinkering:

- titles in headers and on collapsed nodes back
- backdrop option draws again (no scroll operator yet)
- added preview option in blur, filter and mix nodes. 
  Just for fun while working :) Probably every node
  should get this...
2009-02-17 13:37:06 +00:00
8020515ab2 2.5
Small fixes for filewindow;
- on resize area/window, the load button disappeared. 
- made scrollers indicate what direction works
- mousewheel scroll switches to horizontal automatically now

(assuming we keep filelists horiz, previews vertical scrolled)

View2d got hacked a bit by me for it; i guess for some cases
the scroll value should become customizable. Will come back
later!
2009-02-17 13:11:09 +00:00
ba3cacc33f Visual Keyframing - Restored code to make this work, but it may still be flaky
NOTE: upon further testing, quick-record-animation feature does not work with auto-ik yet. Although it would be desireable to have, it is not a priority at this point, since adding that would require a bit of reworking of that code for something it wasn't intended for.
2009-02-17 10:58:40 +00:00
6eae888d49 PoseChannel Transforms - AutoIK Restored
- Auto-IK works again now. 

- Quick-animate feature works with Auto-IK now. 
- Also disabled the checks for existing animation data for this, making it easier to use/discover. At least we've got undo to cover for the cases where the user didn't intend to do this.
2009-02-17 09:34:21 +00:00
e81fde5aa4 Record Transform Animation - Quicky feature which makes it super-easy to animate stuff quickly
To use, simply enable Auto-Keyframing and start the animation playback from the TimeLine.
Then at any time while the playback is still running (and Auto-Keyframing is still enabled), select any object/bone and start moving it around. 
You can also select other objects/bones and move them around using standard transform tools (grab/rotate/scale), or exit transform for the active/selected object(s), and move on to other objects instead. Repeat until satisfactory!

This is similar to the old 'Record IPO' functionality (and/or is closer to the 'Mouse Recording' in 3DSMax), except it's much cooler, and is more flexible at the same time. It's
"good for quick and dirty tests, or things with timing, where it's easier to do it real time" - William Reynish, or "handycam effect or eyes animation" - Pepeland.


Additional Notes:
- for now, the objects that are used for this currently need some animation data already. This limitation is temporary.
- eventually, 'samples' (i.e. baked-data) not keyframes will be made by this tool as samples are more suitable for such large sets of densely spaced points
2009-02-17 08:55:50 +00:00
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
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
25ab515951 bugfix [#18003] Rev-17473: Scene sets doesn't work in links 2009-02-17 03:43:56 +00:00
312c822945 spin mesh is alt Rkey - ton, please check and advise regarding screw_mesh and defaults. F3 fails while pressed continuously 2009-02-16 20:04:01 +00:00
2415040b9f 2.5
Patch from Arystan Dyussenov (A624), two operators for armatures;

- select hierarchy up/down, using bracket [ ] with or without
  shift, and for editmode and posemode.

Good work, thanks!
2009-02-16 17:18:24 +00:00
46417e1362 WIP, low level python UI functions, so far tested popup menu to work with bpyui.pupMenuBegin, menuItemO and pupMenuEnd functions.
And a popup block with python callback with bpyui.pupBlock, beginBlock, popupBoundsBlock and endBlock funcions.

These functions should not be accessed by scripters directly.
2009-02-16 16:17:20 +00:00
3b6218405b 2.5
Some small fixes:

- handler operator exec gave too quick a warning for invalid area
  (set area context to NULL is OK :)
- 4-split 3D view with clip option didn't reset clip when 4-split
  was disabled
- creating a new 3d view didn't initialize buttons region correct.
2009-02-16 15:08:06 +00:00
27d52217ca 2.5
Cleanup of wm_event_types.h, removed all old "allqueue" defines.
2009-02-16 14:28:33 +00:00
4154e48c05 2.5
Proper integration of File-selecting in WM. The communication
flow was flawed. :) Main problem was that filewindow can change
the screen context entirely, and should not do this directly on
a call inside an operator. Another problem was that the operator
ownership was handed over to SpaceFile, which is asking for 
problems if you want to execute the operator with proper context
later on.

Solution is simple; window handlers already are valid owners of
operators and can manage context, so instead of directly talking
to the 'file space', you give the operator to a new handler this
way:

    WM_event_add_fileselect(C, op);

This handler then listens to events (OPEN, EXEC, CANCEL) sent
by the WM or by the filewindow itself. This way local context
operators (like "open new image in imagewindow") will survive
a full-window fileselector fine, and in future also secondary
windows browsing files.

Two bugfixes included in this commit too:
- Add sequence menus in Sequencer used wrong context.
- When handler executes operators, it sets stored context now
  by first checking if this is still valid.
2009-02-16 12:14:04 +00:00
f6df8e1860 F-Curve names: Experimental style 2
In this commit, I've experimented with the way in which F-Curve names (seen in DopeSheet/Graph Editor) are put together. 

Now, F-Curve names are assembled in the form:
<array-index> <property-name> (<struct-name>)
i.e.  "X Location (Bone)", "Y Location (Object)"
"Specularity (VeryLongMaterialName)", etc.  

The goal of this experiment was to hopefully make it quicker to do a left-margin scan and identify the defining differences between closely related F-Curves. 
- This has the benefit of no (potential) need for horizontal scrolling back and forth to see and compare the end portions of names, and also to avoid the important parts of the name getting pushed out of the standard viewable area by some owner-struct long names. 
- The downside is the loss of the clear hierarchial layout closely related to the RNA-paths used internally, that was provided by the old method. Also, this method also looks rather awkward on first glance, but if it improves efficiency of use, why not :)
2009-02-16 09:48:38 +00:00
5452c4e146 Tweaked tooltips drawing - the previous correction I applied here for the width was too excessive. That was based on some bug which seems to have disappeared now. 2009-02-16 09:03:32 +00:00
7f4fa8971a 2.5: Restoring Auto-Keyframing for Transforms
Auto-Keyframing does not work anywhere else yet, and probably won't for a while.
2009-02-16 03:01:56 +00:00
b2c04faa06 Graph Editor Transform Bugfix:
Now grabbing a single handle (auto/aligned) works correctly. One line of missing code mean that the handle recalculations were getting skipped.
2009-02-15 23:48:05 +00:00
95207cec00 2.5
Added RNA wrapping for F-Curve colour settings
2009-02-15 23:28:30 +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
915baae622 BGE bug #18137 fixed: When two actors collide in this blend file the blender crashes. 2009-02-15 19:07:27 +00:00
e05742b64d added back sequencer RMB select Ctrl/Alt modifier keys. 2009-02-15 17:24:09 +00:00
121c8c2584 2.5
Accidentally closed comment twice, that doesnt compile!
2009-02-15 14:01:27 +00:00
b35092f03c thought the hashes were my own mistake from typing python in the wrong window but turns out the pre-processor uses them. 2009-02-15 13:53:26 +00:00
66d3dcf150 2.5
Anim playback now uses "Sync" option, skipping frames to match
real time (as set by the frames/sec button).

This is a quicky for tests with audio. Note that the real time
in seconds to update sound to in ED_update_for_newframe() would be:

(scene->r.cfra / FPS) + screen->animtimer->duration

Also this can have a slight inaccuracy, the time between the timer
handler and the ED_update_for_newframe() notifier is not known,
but in general nearly zero. A better implementation is possible, but
thats for later. :)
2009-02-15 13:09:19 +00:00
50f789e9e8 2.5
Graph editor: added refresh tagging on initialize; this is called
on browsing space types, as well on read files or switch screens.

(Makes the fancy fluorescent rainbow colors in channels appear!)
2009-02-15 11:41:22 +00:00
844db37559 Graph Editor: F-Curve Colouring
Now F-Curve channels in channels region are drawn with the same colour as their respective curve is drawn in the curves area. I've had to make a compromise to store such colour info in F-Curves themselves, which is not terribly ideal if the F-Curve gets reused in some way. However, for now, this will do (special tweaks can be made to make this work better though).

I've also added a colour-determination mode per curve which should in future allow more control over this. By default, all curves still use the old 'rainbow' style. The available types area:
* Old Rainbow - Colour is determined 'automatically' using a magic method which uses curve position + total curves to generate a colour.
* Auto RGB - Color is determined using the 'array index' stored in F-Curve for data-access. An unresolved issue with this is that all the curves with this will end up with exactly the same colour, leading to confusion (i.e. all location.x and scale.x properties could potentially all be the same red colour).
* Custom colour - self explanatory

Currently, there's a minor bug when loading old files where the colours don't get initialised yet. For now, just clicking in the Graph Editor after file-load will solve any of these problems.
Ton: it looks like area->refresh() isn't getting called after file read.
2009-02-15 10:58:24 +00:00
394b3fcede Keying Sets: Added 'remove selected from active set' (Alt-K) operator in Outliner
* Cleaned up the helper functions for the Outliner operators which deal with Keying Sets
* Fixed a few minor bugs in the Keying Sets API that won't show up with the current tools, but may crop up later
* Added a new method to find a 'matching' path in a Keying Set. Now adding a new path to a Keying Set will firstly check if there is any similar path already, and skip adding another path.
2009-02-15 07:00:13 +00:00
c56d635318 2.5
*******
- made the armature selection ops use the new editbone/pchan context loops and a little house cleaning
2009-02-14 23:21:39 +00:00
a0fada6f18 added error reporting to edit mesh 2009-02-14 21:31:34 +00:00
aba3c36e33 2.5
Test: making screencast movies inside Blender!
Hotkey: CTRL+F3. Stop with ESC

Keep in mind it's unfinished :)

Just nice to see how simple cleaner code with the new event 
system and job manager can be put to work!

- it uses currently output directory and image/movie 
  settings from scene. No buttons for this yet.
- Framerate is hardcoded 10 fps
- Thread job takes care of open/write/close movie
  or save image files.
- For speed it uses glReadPixels from backbuffer. Have
  to consult Brecht for nifty triple buffer trick.
- On file reads it stops now.
2009-02-14 18:31:19 +00:00
7dce015c90 2.5
Making screenshots back. CTRL+F3 does full window now.
Filewindow doesn't show image type, nor does single-area
work now. Need this commit for test in render crashes... :)
2009-02-14 16:43:02 +00:00
05cdff9bf1 2.5
FileWindow:

It appeared all load/save went via 1 call, so the 'OK save over' menu
popped up on loading files too.
Added check in the function for saving... bit weak, could become an
argument for ED_fileselect.

Also renamed file operators to conform to others.
2009-02-14 14:25:48 +00:00
3f425dfc71 2.5
Node editor: adding node sends proper redraw now, and calls
the old 'auto connect' to make it link to active node.
2009-02-14 13:18:18 +00:00
891a2022c5 2.5
View3D: snap menu (SHIFT+S) back.

All options are own operators, a (temp?) menu collects them all.
Note that the operators have a full name, for the menu it seems
too much; still I'd prefer a way to name operators in a way
it fits everywhere. That will make a unified translation system
possible for example.

Also: this code was needed to get 'center view' (numpad dot) in
editmode to work.

Last note; it uses old transform code to gather vertex info.
This is fully local to this C file, and quite simple to replace 
in future with new transform.
2009-02-14 13:07:09 +00:00
699f8fe104 2.5
- Localview in 3d window back.
  Note: it puts entire area on localview, so it works nice for
  4-split views as well.

- Added 'save over' menu in filewindow F2 operator. Mostly to
  comply to 2.48... such things can be on the review list.
2009-02-14 10:03:24 +00:00
d875386b06 2.5 Bugfixes:
* Removed unnecessary define for context loop (editable posechannels)

* Fixed crash in animation-channel filtering - missing check for no world animation.
2009-02-14 07:52:25 +00:00
f3fac33688 2.5 - Adding context iterators for visible/editable (selection is irrelevant) for bones and pose-channels.
I'm not totally sure that these are needed, though it does make some tools simpler.
2009-02-14 07:27:12 +00:00
11d96459cf Bugfix: 'Legacy' Insert Keyframe operator works again... It's future is still uncertain though. 2009-02-13 21:40:07 +00:00
47b9a44063 2.5: Curve edit mode add vertex and add menus now work. Also
fixed an issue where sublevel menus did not get right operator
context.
2009-02-13 17:37:01 +00:00
62494990e6 2.5: update cmake for rna_animation.c. 2009-02-13 16:05:42 +00:00
09547c508e 2.5: Keyingsets now can construct rna paths including pointers
and collections, which means keying for example object game
settings or constraint properties should work.
2009-02-13 14:48:38 +00:00
d2b1febce1 select left/right of active sequence strip 2009-02-13 14:16:56 +00:00
023ea476fd 2.5
Bugfix: menus in "screen space" could go wrong because the code
accidentally used window->winid instead of screen->mainwin id.
(the first is window id, the 2nd wm subwindow id. On start both
are one, which made it not appear immediately).
2009-02-13 13:55:57 +00:00
1d5115c251 2.5
feature restored: window title shows file name, 
if saved/loaded.
2009-02-13 13:33:01 +00:00
4d0f30f475 2.5
Feature restored: save file for the first time automatically names it
untitled.blend, prevents to accidentally save over last saved
file.
2009-02-13 13:04:48 +00:00
8817fb93c4 Keying Sets: Insert/Delete Keyframe Operator Buttons
* Insert/Delete keyframe buttons in the TimeLine work again. These now use two new operators which only insert keyframes for the active Keying Set. 
* Renamed the old insert/delete keyframe operators. These now have the "*_old" postfix on their names. What happens with these temp operators is yet to be seen.
* Added insert/delete keyframe buttons beside the operator buttons for Keying Sets in the Outliner->Datablocks view
2009-02-13 09:46:08 +00:00
c8f04eba48 Animato: Various improvements
* Scene and World AnimDatas are now included in animation editors
 
* Keyframes for integer-value settings now get the FCURVE_INT_VALUES flag set for their F-Curves, which restricts those curves to only having integer-values. F-Curve displays have been altered accordingly, but some editing tools may still need tweaks to work with this.

* Fixed notifiers for Insert Keyframe -> Active Keying Set.
2009-02-13 06:33:07 +00:00
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
cec4a29977 Keying Sets: Wrapped KeyingSets in RNA
* The settings of KeyingSets can now be viewed/modified through RNA. 
* Shuffled RNA wrapping for AnimData over to its own file 
* Moved insert-key flags to DNA_anim_types.h, as they're now used for KeyingSets.
2009-02-13 01:51:33 +00:00
ed7e211c2d KeyingSets: Fixing crash when adding KeyingSets and no group name is supplied 2009-02-12 23:25:36 +00:00
c5d8155aeb Compilation fix: added missing ; 2009-02-12 22:24:51 +00:00
763a98f4c0 2.5: Most curve/surface editmode operators back:
* Hide, Reveal
* Separate, Duplicate, Delete
* Set Weight, Set Radius, Set Spline Type, Set Handle Type, Set Smooth
* Tilt, Clear Tilt
* Smooth, Smooth Radius
* De(select) First, De(select) Last, De(select) All, Select Inverse,
  Select Linked, Select Control Point Row, Select Next, Select Previous,
  Select More, Select Less, Select Random, Select Every Nth
* Switch Direction, Subdivide, Make Segment, Spin, Extrude, Toggle Cyclic
* Specials Menu

Not working correct yet:

* Add Vertex (ctrl click)
* Add Menu
2009-02-12 22:12:21 +00:00
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
cfa511ab9e Dummy commit...
* Added comment for what needs to be done to get KeyingSets fully functional
* In previous commit, also made group-locking be taken into account when drawing curves as locked
2009-02-12 11:04:08 +00:00
4075c60133 KeyingSets: First working prototype
To use KeyingSets, simply Outliner-select items in the Datablocks view and press K to add to the active KeyingSet. Then keyframes can be inserted by choosing the 'Active Keying Set' option when inserting keyframes.

Important notes on the current implementation:
* Only properties directly inside some ID-block that is close to the root (i.e. main -> objects -> "someobj" -> location, or main -> materials -> "somemat" -> colour) can be accessed for now, as I haven't got the code for building the inner-parts of the paths working yet. Help on getting this working is welcome (hint to Brecht).  
* Properties that can be safely included include simple properties "object -> Dupli Verts", entire arrays "object -> Location" or individual array elements "object -> Location -> y"

---

Also added typo fix for KeyingSet freeing. It was freeing the KeyingSet instead of it's paths.
2009-02-12 10:41:57 +00:00
517d9b882a 2.5
Bugfix: node editor crashed when using bitmap fonts, still had a 
call commented out, happened during migration to get things linked.
2009-02-12 09:18:35 +00:00
48594a3a70 own error in last commit. 2009-02-12 06:36:06 +00:00
a150242f8e Commit to continue tomorrow from work. 2009-02-12 05:02:42 +00:00
a5f26d4c14 reveil -> reveal 2009-02-12 03:48:56 +00:00
b96180ec17 * Added description string to operator types, should be set along with ot->idname when defining ops.
* User interface uses this as a tooltip when NULL or "" is given.
* Python doc generation includes this description 
* Python defined ops take the description as an argument.

* NULL check to image_ops.c, was crashing on exit when there was an image open.
2009-02-12 03:39:56 +00:00
12811a096c Graph Editor: Experimental variations of curve display
* Uneditable F-Curves are drawn with dotted lines (and no handles)
* Muted F-Curves are drawn with a greyish colour. I'm not sure how visible this will be under some other colour schemes. Perhaps this needs as separate theme colour?
2009-02-12 01:47:45 +00:00
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
9733eebd60 KeyingSets: More work on preparing the UI
KeyingSets can now be added/removed. Next up, the code for the operators to add items to Keying Sets.
2009-02-12 01:11:29 +00:00
9ad8f1cf6a 2.5
******
ported selection_invert for both edit armature and pose mode
2009-02-11 23:50:06 +00:00
b8e6e01cfd 2.5: Curve edit mode. Transform works again, and editcurve.c is
partly operatorized though nothing hooked up yet.
2009-02-11 23:02:21 +00:00
51fc28efc7 2.5: Image window, some small changes:
* Added notifier for edited images.
* Fix main region emboss drawing when showing render.
* Don't go fullscreen with fileselect for now to work
  around context getting lost, so open/replace works.
* Save operators are more complete now, but still lack
  confirmation and choosing image type.
* Pack operators work correctly now (but not unpack).
* Setting white/black point for curves.
* Time cursor for record composite.
2009-02-11 19:16:14 +00:00
294a3a2b6d One last bit of personal education -- added OPERATOR_CANCELLED on sanity check failures. 2009-02-11 17:46:10 +00:00
2e79e4e975 2.5
Smaller jobs, all in one commit!

- Moved object_do_update out of view3d drawing, into
  the event system (currently after notifiers).
  Depsgraph calls for setting update flags will have to
  keep track of each Screen's needs, so a UI showing only
  a Sequencer doesn't do objects.

- Added button in "Properties region" in 3D window to set
  or disable 4-split, including the 3 options it has.
  (lock, box, clip)

- Restored legacy code for UI, to make things work like
  bone rename, autocomplete. 

- Node editor now shows Curves widgets again

- Bugfix: composite job increased Viewer user id count

- Bugfix: Node editor, not "Enable nodes" still called
  a Job, which didn't do anything

- Various code cleaning, unused vars and prototypes.
2009-02-11 16:54:55 +00:00
f3c67b070f First operator done as a test and to get to know the ropes. "Select Parent" in pose mode. Had to move the command to Shift-P, as naked P is taken up by some crazy person's script command. 2009-02-11 16:17:34 +00:00
1a039aaf71 2.5: fix crash due to keyingset commit, ot->idname should always be set. 2009-02-11 14:56:35 +00:00
7d3c88772b Keying Sets: Initial commit of skeleton code
When fully implemented, these will be the clearest demonstration of 'Everything is Animateable', as they will allow users to define an arbitary group of settings through selecting items in the Datablocks (RNA-Viewer) View of the Outliner to define custom 'sets'. Such Keying Sets are known as the 'absolute' ones, which are created for a custom purpose.

Of course, 'builtin' Keying Sets will still be provided. Such built-in ones will not work on any particular paths, but will use context info to maintain the legacy method of inserting keyframes (via IKEY menu).

Currently, KeyingSets cannot be created/edited through the UI, though the backend code is in place to do this.
2009-02-11 12:19:42 +00:00
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
ba32199b23 2.5
******
-ported (de)select all for editarmature and pose mode
	- please review my loops and notifiers as i think they are pretty ugly
2009-02-11 03:46:14 +00:00
50a6d77fc0 Names from uiMenuItemEnumO were not being used.
Changed some of the sequencer menus to use uiMenuItem's
2009-02-11 02:09:41 +00:00
b77da4893d 2.5: Image window operators, quite a few of these still have
missing parts and are work in progress.

Set 3D Cursor
Set Tile
Sample Color
New
Open
Replace
Reload
Save (As)
Save Sequence
Pack
Unpack
Record Composite

The file select operators have context issues still. They need
to get the image space in the context on exec() but it's not
there currently, not sure how to solve that yet.

Also added name parameter to uiMenuItemEnumO, and fixed "mute"
argument in ED_update_for_newframe calls in fluidsim bake.
2009-02-10 23:17:58 +00:00
1195c22207 DopeSheet/Action Editor: Fixed display and expand-widget of 'Group' channels 2009-02-10 23:08:53 +00:00
7e1e4dbb13 Setting svn-property 'eol-style' to 'native' for all animation-related files. No more need to do save overs in text editors or with fancy UNIX tools. 2009-02-10 22:45:20 +00:00
2c82163d5b commit to continue in my home.
Also I remove some of the #if 0.
2009-02-10 21:41:14 +00:00
e4ce4a00a0 2.5
Fifth attempt! Previous commit was wrong file :(
2009-02-10 18:50:40 +00:00
12c17347cb 2.5
Fourth trial to get the invisible character gone!
(I have to add/remove enters to get it committed even)

Thanks to Thomas for retyping the faulty line entirely :)
2009-02-10 18:36:34 +00:00
a216695ee7 2.5
snprintf should be BLI_snprintf
2009-02-10 18:33:32 +00:00
da775a3698 2.5
Made GE compile again
2009-02-10 18:06:26 +00:00
517b6cc3cb 2.5
Third attempt to get the invisible character going!
2009-02-10 17:56:15 +00:00
1496136224 2.5
File Window:

- Added PKEY parent directory
- Made "P" button work
- Removed confused theme colors for text, it caused
  selected text to print greyish.
2009-02-10 17:53:10 +00:00
ca1b1e07d7 A few more files with dos line endings.
Kent
2009-02-10 17:06:43 +00:00
9b76b5e103 2.5
Bugfix: Node operators were called in empty node editor, causing
NULL reading. Prevented it from happening with more strict poll()
2009-02-10 15:51:33 +00:00
25440893dd 2.5
*** Proof of concept! ****

3D window Panels back, in own designated region for now.
Activate or hide it with Nkey.

Note that Background Image doesn't work yet,  Transform
Orientations probably need tests by Martin, Sculpt options
have to be recoded there by Nicholas.

The UI design sessions will of course review all of this!
We'll have to solve a lot of related topics;
- navigation (where) and context (what)
- non-overlapping layouts vs floating panels/bars
- properties vs tools (toolbars)
- drop panels and make nice (semi-automated) list views?

I've also done experiments with making the main 3d view
stay 'behind' the buttons region. That makes popping buttons
in and out less distracting, but also makes it obscuring
the view... it's not in this commit, it didn't work proper :)
To get that work it has to be handled by the internal
compositor, then it even can have fancy transparency in back.

Anyhoo, time enough to play with this a while. Especially for
Image window (paint) it can work well too.
2009-02-10 15:38:00 +00:00
f7a6588632 Graph Editor: Visibility toggles
F-Curves can now be hidden/shown in the Graph Editor in one of 3 ways:
* Specialised VKEY toggle hotkey, which alters the visibility of all selected F-Curves 
* The setting toggle operators (Shift-W, Alt-W, Ctrl-Shift-W)
* Checkmark (*1) boxes in front of names of F-Curves

This allows irrelevant curves to be hidden from the keyframes area only if you want them hidden. By default, all curves are visible. Also note that a separate hotkey is used now for toggling visibility (VKEY) instead of lumping it under select-all (AKEY) as in the past, which was a major cause of confusion.

Notes:
1) I've used the ICON_BLANK011 and ICON_BLANK012 icons, which in the current icon set are two states for a checkbox type thing. These defines should probably get renamed sometime, but I'll leave that up to Matt.
2009-02-10 11:37:14 +00:00
6f2d5b8e8a Graph Editor: Restoring 'View All' (HomeKey) and Auto-Set Preview Range ('Ctrl Alt P') 2009-02-10 10:42:04 +00:00
c519d69a60 Armature Parenting: Fixing up this operator to use the new context iterators properly 2009-02-10 09:55:46 +00:00
ca418381fd 2.5
Bugfix: CTRL+W "Save file" still gave a 'save over' popup when the
file didn't exist yet. It then attempted to free the operator twice.
2009-02-10 09:49:36 +00:00
3bcb1ebdfe 2.5: Silencing MSVC warnings in a few files (many files still have many to clean out some other day). 2009-02-10 09:18:04 +00:00
8243e65ed8 2.5
*******
- ported make/clear parent for editbones (paent_set, parent_clear to align with naming conventions)

Aligorith and Kaito please look over this and make sure everything is right
2009-02-10 06:12:35 +00:00
2d248a39c7 Some theme colour tweaks 2009-02-10 03:27:33 +00:00
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
d262cde5f8 * Some more icon file updates (thanks jendrzych), and associated UI tweaks. 2009-02-10 02:39:19 +00:00
181068454f Graph Editor - Drawing Tweaks
* Handles now draw with anti-aliased lines for a 'tidier' appearance at certain scales
* Added new drawing code for 'samples'
2009-02-09 23:46:13 +00:00
97c5d50cff 2.5:
Added missing colour/theme entries from Graph Editor in RNA
2009-02-09 23:06:29 +00:00
2249c61d03 2.5 Bugfixes:
Adjusted ranges for subdivide operators (Mesh + Armature). 
* The Mesh one was causing lockups as its range started from 0. Now it starts from 1.
* Tweaked the soft-limits for subdivide operators to be easier to use (1-10 instead of 0-100)
2009-02-09 22:59:26 +00:00
283926aa2d 2.5: UV Editor module porting pretty much finished now, only missing
still is mirror transform. This commits adds the remaining operators:

* UV mapping operators (U key menu): cube, sphere, cylinder, etc.
* Hide/Show operators.

And solves most XXX's, including:

* Fix bad includes and calls into space image.
* Aspect ratio correction.
* Create UVs if they don't exist yet on unwrap.
* Assign image to UVs.
* Drawing proportional edit circle.
2009-02-09 20:58:31 +00:00
c02bc1ce53 2.5
Bugfix: enter editmode had wrong notifier reference pointer,
caused redraws to skip.
2009-02-09 18:06:45 +00:00
8f712f86b9 2.5
- Render: scene buttons RENDER and ANIM now work
- Nodes: text drawing for socket names back
2009-02-09 16:52:33 +00:00
f33309b028 2.5
- Added depsgraph tag for object-change in AnimData, so the
  new animsys doesn't have to all objects anymore. 
  (Still WIP, depsgraph has to do this much better)

- Bugfix in notifiers; only 1 notifier was handled for
  frame updates

Result: 2 windows, displaying 2 scenes, now can be edited
independently, and play independent. Not when they share
data, of course. :)
2009-02-09 15:50:09 +00:00
c58d336a33 Keyframe-related bugfixes:
* Deleting keyframes should be safer now
* Graph Editor no longer crashes on F-Curves with no keyframes/samples
* Silenced console prints that occurred when an F-Curve had now keyframes.
2009-02-09 11:05:34 +00:00
2b818935fe Graph Editor: Drawing tweaks for previous commit
* Group channels are drawn with better indention now
* Colors for group channels in Graph Editor are now initialised properly
* When selecting individual keyframes in Graph Editor, it is now possible to see which curve it belonged to, as the 'active' and 'selected' flags are set on that curve only.
2009-02-09 10:33:05 +00:00
59736af8fc Animato: Added 'experimental' grouping schemes for F-Curves
When inserting keyframes on previous un-animated Objects/bones, F-Curves will be added into Action Groups into either "Object Transform" or <PoseChannel Name>. Ob->Material settings are not grouped for now to illustrate what's possible.

Old files are currently not patched to use do this, as it's still not clear whether this will be ideal.
2009-02-09 10:04:11 +00:00
b9063b27a9 Just commit so I can continue tomorrow from work.
All the code have #if 0 / #endif so nothing to worry about.
2009-02-09 07:15:22 +00:00
9dec5e8fa3 DopeSheet: Bugfix for View All (HomeKey)
Removing an old line of temporary code I forgot to remove
2009-02-09 04:47:34 +00:00
eb848445fb 2.5 - Assorted View2D-Related Cleanups
* Removed Sequencer's own 'border zoom' tool. There is a generic one in View2D that should be used instead.

* Changed the hotkey for View2D's version of borderzoom to Shift-B

* Fixed a few hotkey mentions entries in old menus

* Added set start/end frame operators for TimeLine. (SKEY and EKEY)

* Fixed various issues in Graph Editor 
- channels area is now drawn wide enough to show the 'protect' toggles without needing to scroll
- new Graph Editors have 'auto-snap' enabled by default
2009-02-09 04:39:25 +00:00
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
52e1121669 2.5 - Animation UI tweaks
* Frame-change (scrubbing) now works when using LMB select. It now uses ACTIONMOUSE, so it doesn't conflict with selection. However, the check for exiting the modal op currently needs to check for LEFTMOUSE and/or RIGHTMOUSE instead of ACTIONMOUSE otherwise errors occur.

* Renamed the 'DopeSheet Editor' entry to simply 'DopeSheet'
2009-02-09 03:06:52 +00:00
85231e5fd4 * Some more 2.5 theme updates 2009-02-09 02:54:40 +00:00
0139d9d121 2.5
Fixed memory leaks when closing Blender without exiting Armature EditMode first.

Ton/Brecht - mesh editmode (and a few others I think) are still leaking in this case.
2009-02-09 01:33:50 +00:00
5e0c553b15 Armature Editing: Subdivide Operators
* Added back the Subdivide tools. Use the Alt-S hotkey (for now) to get a menu with the subdivision options. There are also two standalone operators which are not used yet.

* Fixed the PoseMode checking callback to make sure that it doesn't override any tools in EditMode.

* Fixed an old comment in transform code, and a few warnings in editarmature.c
2009-02-09 01:27:44 +00:00
7d6e7914de Armature Tools - Ported Switch Direction (Alt-F)
This is one of the few armature tools where it is currently not that easy/desireable to port to use context-loops exclusively, since they depend on working with 'chains' of bones from the tips to the roots, which cannot be easily done using EditBones.
2009-02-08 23:41:21 +00:00
ecf5250cf3 == Sequencer ==
Fix for the transform fix. It's getting late...
2009-02-08 19:54:11 +00:00
7877fb2f83 == Sequencer ==
Fixed proxy scale problems in transform effect
2009-02-08 19:28:12 +00:00
eb929804d2 2.5
Added CTRL+W save Blender file.

It's the first user of the uiPupMenuSaveOver() function,
which I've recoded to accept an operator pointer.
This is required because the operator property 'filename'
has to be set to work. Other 'save over' users will
require running operators too I guess.
2009-02-08 19:15:59 +00:00
270b724b8d == REDCODE ==
Fixed 64bit issues. sizeof(unsigned long) = 8 on 64 bit machines, 
shame on me...
2009-02-08 19:13:29 +00:00
3fcc36d0b0 2.5: RNA auto pointer type detection didn't find right types. If
two RNA structs have the same DNA structs it should use the first
defined one, could be smarter but for now this makes it work again.
2009-02-08 14:56:43 +00:00
8c5c7ebb0b 2.5
Scene browse button now works.
Note that animsys currently executes animation for the entire
database, so multiple scenes in multiple windows don't work yet.

Various fixes:

- crash on invoking filewindow when mouse outside (active) window
- removed obsolete error prints (set screen error, copy data error)
- displist fix for loading files with curve/nurbs, the select-outline
  then didnt draw immediately.
- outliner allows scene activating
2009-02-08 12:16:35 +00:00
fa8d5608dc Animato Conversions:
Added a few Material->Mode bitflag conversions as an example for Roland to extend to the remaining settings. There are currently still quite a few settings missing from RNA to be able to convert all of these.
2009-02-08 11:28:20 +00:00
dd23d47fca Action Editor - Tweaking code for refreshing.
Although there is currently code in place to listen to notifiers + tag updates for regions, these don't actually result in any changes yet. Everything still relies on 'manual' redraw tags for the entire area to have refreshes.
2009-02-08 11:06:26 +00:00
d7f5eab6cb Action Editor - Added back ID browsing buttons. Only browse/delete works for now. 2009-02-08 10:21:38 +00:00
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
608e6f1d3e edit_tools ops - starting from 4key up to 8key, ctrl and alt. ton: please check if working (especially uv and color functions) 2009-02-07 23:20:36 +00:00
4f3768af49 Update MSVC9 project files 2009-02-07 20:47:23 +00:00
59e96a2831 BGE Py API cleanup: Camera Actuator. 2009-02-07 20:35:16 +00:00
2f0f8c8bae 2.5
- Screen browse button back

- Several fixes in using screens in more windows.
  Still has loose ends, but things are definitely more stable!
2009-02-07 19:37:29 +00:00
f78aa0ab65 2.5
F6 menu "redo last operation" now works, mostly :)

Try it in editmode on add-UV-Sphere, or Subdivide, those work
fine. Transform ops have some feedback issues or so.

This is a temporary commit; brecht will take this further with
nice code (event system doesn't make menus as active region
but sets the original context instead, as stored in ui handler.)
2009-02-07 16:43:55 +00:00
d28a05080c 2.5
Edit Mesh: Knife Cut back.

I've put it for now under ALT+CTRL+LMB, modeless direct cutting.
Options for polyline input and snapping is for later. At least
this works cool :)
2009-02-07 15:44:16 +00:00
875a08884b 2.5
- Node editor: link cut back, now under ALT+LMB, to prevent
  accidents. Note it now nicely intersects the real curved
  noodles with a line you draw!
- To make above work, replaced ogl curve draw with own bezier
  code.
- Added new WM standard operator callback for lines-gesture,
  the Lasso gesture now draws a closed line.
- Both callbacks have optional property 'cursor' to make it
  give modal info. For future also linestyle or color can be
  defined.
- Changed 'pin' icon in Image header to something that looks
  less scary... but there's no pin icon yet?
2009-02-07 14:03:34 +00:00
d21a4780da 2.5
Bugfix in ctx itterator: CTX_DATA_COUNT() didn't free memory.
2009-02-07 13:39:54 +00:00
df048070ec 2.5
Hrmf; the patch provided for setting UserDef opengl lights didnt even
work. It was setting flags zero, which just disabled any saved light.
2009-02-07 11:04:13 +00:00
2a638fa3cd View2D bugfix:
The previous fix for zooming only worked as lucky coincident. It was the flag that was wrong, not the var.
2009-02-07 10:39:20 +00:00
19896992ff 2.5
- Added back CTRL+X "reload start-up file".
  (Original name 'erase all' is a bit misleading, but we can
  go over all naming conventions later :)
- Added memfree for triple buffer data.
2009-02-07 10:00:46 +00:00
86f200a510 Started converting over the sculpt header menu to the new system. Added operator and menu items for brush curve presets. 2009-02-07 03:21:28 +00:00
591ab657d6 2.5: UV Editor, more operators.
Border Select
Circle Select
Pin
Select Pinned
Unwrap
Minimize Stretch
Pack Islands
Average Islands Scale
Snap Cursor
Snap Selection
2009-02-07 01:27:46 +00:00
d3dd4f6a86 2.5 MSVC9 projectfiles
update for renaming space_ipo -> space_graph
2009-02-06 21:18:36 +00:00
709976a4af 2.5: fix triple buffer memory leak on exit. 2009-02-06 19:58:15 +00:00
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
02d594aba0 2.5
- Corner node 'size' widget works again
- Proper preview events added on linking nodes
2009-02-06 18:38:10 +00:00
09099111e3 Added Scale, fixed bugs incl. patch #18037 2009-02-06 18:09:35 +00:00
f8492383fd Finish Material, Sound and World adr conversion sections. Moving on to particle adr codes, but I have to wrap particle dna first. Ugh. 2009-02-06 17:32:57 +00:00
1b0a49478a 2.5: Enable triple buffer drawing by default (if it doesn't work
or flickers, kick me). Also removed proxy texture test since it
does not seem to be implemented well by all drivers.
2009-02-06 16:51:09 +00:00
84e2de8ca7 2.5: ID datablock button back, previously known as std_libbuttons. The
way this worked in 2.4x wasn't really clean, with events going all over
the place and using dubious variables such as G.but->lockpoin or
G.sima->menunr. It works as follows now, for example:

xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID**)&sima->image, ID_IM, &sima->pin, xco, yco,
	sima_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_DELETE|UI_ID_ALONE|UI_ID_PIN);

The last two parameters are a callback function, and a list of events
or functionalities that are supported. The callback function will then
get the ID pointer + event to handle.
2009-02-06 16:40:14 +00:00
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
14f180fa04 2.5
Node editor: 

- Linking sockets back.
- Removed obsolete code 
- Add node gives correct pointers for Render stuff
2009-02-06 16:34:05 +00:00
61fdeb1b2f 2.5
View2D bug: zooming failed in node editor due to check for wrong
variable (keepzoom instead of keepofs :)
2009-02-06 16:31:18 +00:00
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
1646f053a5 2.5
Compo node fixes:
- adding new composite in scene crashed, wrong pointers passed on to
  addnode function
- scene render-layer node now gets default scene ID pointer, which
  can be viewed/edited with menu in node
- on using headerbuttons in node window, display refreshes now
2009-02-06 13:07:02 +00:00
9d5958f061 2.5
Bugfix for Bugfix for 2.5 - Bugfix #18251!

- the call to GPU_default_lights has to be done after windows opened,
  in case you have no .b.blend saved it crashed
- further this function is only called on .B.blend reading, so it's
  correct to reset the lighting to user-def.
2009-02-06 12:33:15 +00:00
586d660b21 2.5
Bugfix: on reading multiple pre-2.5 files, the keymaps were generated
again, causing items to be added double.
2009-02-06 11:11:42 +00:00
0355dcc618 2.5 - Armatures Code
* Brought back recalculate bone roll (Ctrl N). This should be quite a straightforward example of a cleaned-up + ported armature tool. 

* Cleaned up a few warnings
2009-02-06 10:48:00 +00:00
2756060a64 2.5
Converted all countall() calls in armature code to armature_sync_selection()
2009-02-06 10:04:44 +00:00
4b0313bf82 2.5 Armature Editing - Restored 'Align Bones' (Ctrl Alt A)
* I've had to remap 'Duplicate window' to Ctrl Alt W instead...

* Fixed some bugs with armature context iterators for X-Axis Mirroring. Now, the code there checks for mirrored bones in the right way. 
For details on how to write tools that need to cope with this option, refer to the 'Align Bones' operator. I'll port another simple operator as another good example soon. 

Additional notes:
Currently, armature_sync_selection() is really buggy (not part of this commit), and needs further attention.
2009-02-06 01:39:55 +00:00
6a669d00b2 Patch #18015, adds "Value to Normal" node 2009-02-06 01:21:38 +00:00
fbdd75a475 Added compose/decompose, fixed bugs. 2009-02-06 00:55:38 +00:00
e1b92bc166 2.5
Safe method to move render results to the displayed image.

It now allocates a single image for display, and on each
refresh callback from render, it copies the refreshed 
section over to this image, in 32 bits. While rendering
that image then only shows progress updates, as usual.
This also now works for scenes in composte and results
for composite.

This should solve reported crashes for MBlur or SSS.
2009-02-05 19:28:28 +00:00
0a3697ccf7 2.5 - Bugfixes for Pose 'Clear' Operators
* Fixed context iterators for PoseChannels. The actual selection test was missing (but layer visibility was getting checked). Also added check for hidden bones here too.

* Removed unnecessary defines added by mfoxdogg in BKE_context.h

* Removed the old hacks in 'Clear ...' operators for ensuring that object animation (ipos/actions) don't overwrite poses. These are no longer necessary, since normal animation calculation is only done in a separate step on frame-changes now.
* Removed the manual checks for layer visibility from 'Clear ...' operators, since that's taken care of by context iterators.
2009-02-05 05:51:21 +00:00
6947624afa 2.5
*******
-ported clear loc,rot,scale operators to pose mode operators
	- for some reason when animated and you clear anything, the whole aramture clears. somthing to do with the depsgraph stuff that was directly ported  from clear armature()
2009-02-05 05:13:08 +00:00
f89e3d2517 2.5 - Context API access for Bones (EditMode and PoseMode)
* Added selected, selected+editable, and active to access EditBones for Armature Operators to use. These take into account X-Axis Mirror too, so there is really no need to check that sort of thing anymore in tools. 

* Added a quick testing operator for verifying that these loops filter the data correctly. I've dumped this in armature_ops.c for now. It can be activated using the TKEY hotkey in Armature EditMode only. This should be removed once we have a few more functional tools.

* Ported over cleaned up roll-calculation tools from AnimSys2
* Removed a few ugly stubs from posemode code
2009-02-05 03:28:07 +00:00
61a6e1957a flip_editnormals is back, alt+3key 2009-02-05 01:32:37 +00:00
66f90c47d4 * Added range function for Multires's level RNA
* Removed RNA for old multires in Mesh, the old mesh->mr struct should never be used (except for loading old files)
* Dealt with sculpt + render (just needed to force multires update)
* sculpt memory leaks fixed
* Entering editmode now always exits paint modes (previously, only happened if editmode was called from the header button)
2009-02-05 01:12:47 +00:00
5fc657cdc6 Bugfix for 2.5 - Bugfix #18251
The patch was pasted in the wrong place, thus destroying all custom OpenGL solid light setups too.
2009-02-04 22:33:24 +00:00
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
edab22d9ee Fixed CMake for RNA, also removed the aggregate return warning for CMake 2009-02-04 18:25:41 +00:00
b4e914ce12 2.5
Bugfix #18251

Patch from Konrad Kleine

After read-home file (or restore factory settings) the opengl
lights have to be reset.
2009-02-04 18:02:50 +00:00
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
1b27cd70e5 2.5
Render back! And not only back, even full threaded now. :)
Current state is unfinished, but too much fun to not to
commit for review and test!

WARNING: because render is in a threaded job, it will
use data as can be edited in the UI. That'll crash in many
cases of course... the idea is to limit UI usage to viewing
stuff, especially for the Image Window to inspect layers
or zoom in/out.

What works now;
- F12 render (no anim)
- ESC from render
- ESC pushes back temporary Image Window
- Render to ImageWindow or full-screen.
- Executing composites, and edit composites after render.

Note that the UI is 100% responsive in a render, you can 
switch screens, slide area dividers around, or even load
a new file during render. :) It's quite stable even.

I'll collect all crash reports especially to get a good 
picture of where the protection is required at least.

Also added: XKey "Delete Objects", to get things crash...
unfortunately it didn't for me.
2009-02-04 17:40:50 +00:00
df7e766032 UI
* Changed uiPupMenuOperator usage to uiPupMenuBegin/End (simpler,
  no need to build a string). Also made transform orientation and
  subdiv type enums instead of ints for this.
* Added an icon argument to many of the uiMenu calls, and added a
  uiMenuItemIntO.
* Move auto rna button creation out of outliner code, now is
  uiDefAutoButR for individual buttons and uiDefAutoButsRNA for a
  whole block.
* Implemented uiPupBlock(O). Pressing F6 gives a menu with the
  properties of the last operator to test. I tried to make a redo
  last operator out of this but couldn't get the context correct
  for the operator to repeat in. Further the popup block also has
  some issues getting closed while editing buttons.
* Fix uiAfterFunc memory leak on Ctrl+Q quit.
* Fix handling of RNA number button dragging and sliding for RNA
  buttons with range -inf/inf.
2009-02-04 11:52:16 +00:00
0341e762b2 Assorted fixes:
* Added examples of how to patch up MTex adrcodes for Animato. It appears many of the settings there in RNA are still undefined though!

* Added undo push for the Outliner tweaks I made

* Removed some outdated comment
2009-02-04 11:47:05 +00:00
00c9745720 2.5
* Outliner 'select' (i.e. blue/grey highlights for tree items) works again in both normal Outliner + RNA views.

* Fixed bugs/MSVC warnings in animation code
2009-02-04 09:09:31 +00:00
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
9c84d2a424 2.5
*****
fixed up the view navigation menu using the enumitems call, also made view numpad's enum "type" instead of "view" to be more inline with other operators and rest of blender
2009-02-04 05:15:39 +00:00
407731e9ba mark and clear seam, set and unset sharp and vertex smoothing is now ctrl/alt 1, 2 and 3 - still a bit vague of op naming 2009-02-04 02:58:21 +00:00
4286730d34 dropdown for bone creation method and swap params in panel instead of having all of them visible all the time. 2009-02-04 02:55:24 +00:00
08b1d58738 Allow enter/exit editmode in background mode. (asking for trouble doing this but the checks are simple) 2009-02-03 12:31:40 +00:00
267a555fef 2.5
As creator of the Ipo I also reserve to right to kick it out
definitely :) To honour the wonderful contributions from Joshua
here it is; renamed space_ipo to space_graph!

Note; make, cmake and scons should work, msvc will require some
work now!
2009-02-03 12:04:05 +00:00
afe28a1a61 2.5
- removed undefined operators from view3d menu, the error prints
  ("undefined operator") is currently a real error; later on when
  operators are more dynamically defined it can be feature.

- made uiMenuContext() work locally, only on the items as defined
  after this call.
2009-02-03 10:41:48 +00:00
658ac7225f RNA: some fixes for yesterdays commit, use of uninitialized
variables and errors in foreach macro.
2009-02-03 10:14:29 +00:00
54690ca46a 2.5
*******
small fix the view menu context was not being set properly causing the invoke of clipping border and border zoom to be skipped
2009-02-03 09:34:42 +00:00
4509994673 2.5
*******
- rebuilt most of the view menu with a couple empty sub menus
	- seperators go all screwy when there is an unknown operator in the menu
	- using this method, the operators invoke function is skipped, this is evident with clipping border and border zoom
	- original menus are still in the code just if'd out for furture reference and such

- to cater for this menu, view numpad op has been made into much smaller atomic operators, pan and orbit and the ortho/persp toggle has been put into individual operators

- fixed the mem leak in the make parent menu
2009-02-03 03:54:03 +00:00
548735433f Fix for select multi loop commit, probably missed this file. 2009-02-02 19:59:22 +00:00
284db61572 RNA: C API
* RNA_blender.h is now generated along with the other files. It is not
  used anywhere yet, and still located quite hidden next to the other
  rna_*_gen.c files. Read only access for now.
* Inherited properties are not copied from the base anymore but
  iterated over. Patch by Vekoon, thanks!
* Array get/set callbacks now do the whole array instead of getting an
  index. This is needed for some layers for example so python can set
  the array as a whole, otherwise the check that one layer has to be
  enabled at all times gets in the way. Also nicer for the C API.
* Also some changes to returning pointers to make the API cleaner, got
  rid of the type() callback and instead let get() return PointerRNA
  with the type included.

The C API looks like this currently:
http://users.pandora.be/blendix/RNA_blender.h
2009-02-02 19:57:57 +00:00
eb00687cde 2.5
Editmesh ops:

- MESH_OT_select_multi_loop
  (based on selection it makes loops)

- MESH_OT_select_linked
  added boolean 'limit' for linked limited by seams
- MESH_OT_select_linked_pick
  same as above

The 'limit' option used to work only for facemode,
with a toolsettings option.
So it had no own hotkey... i made it work for
edges & vertices too, need to find hotkey later.
2009-02-02 19:31:43 +00:00
c290302450 2.5
Bugfix: mouse key checks should use KM_PRESS checks now.
Interface toggle button didnt work for that reason. :)
2009-02-02 16:30:03 +00:00
a18f623ed2 2.5
Small bugfix, key-release event should be only set after a tweak
fails. Such keymap items better not respond to any key-release!
2009-02-02 15:39:37 +00:00
8fd6f6433f 2.5
Sanitized the 'tweak' event.

Original idea was to have WM event system generating it 
automatically. However, I first tested it via a handler
and operator, to check what kind of configurations would
be useful. It appeared to not work nice, also because
that inserting a tweak operator in a keymap is confusing.

Now 'tweaks' are generated automatically, and can be
catched by keymaps as any event. The current definition
of tweak is:

- if Left/Middle/Rightmouse pressed
    if event wasn't handled by window queue (modal handlers)
       start checking mousepositions

- while mousepositions are checked
   - escape on any event other than mouse
   - on mouse events:
     - add tweak event if mousemove > 10 pixels
     - stop checking for tweak if mousebutton released

- Tweak events have a define indicating mousebutton used
  EVT_TWEAK_L, EVT_TWEAK_M, EVT_TWEAK_R  

- In keymap definitions you can use _S or _A to map to
  action or select mouse userdef.

- Event value in keymap should be KM_ANY for all tweaks,
  or use one of the eight directions:
  EVT_GESTURE_E, _SE, _S, _SW, _W, _NW, _N, _NE 

- And of course you can add modifier checks in keymaps for it.

- Because tweaks are a result of mouse events, the handlers get
  both to evaluate. That means that RMB-select + tweak will work
  correctly.
  In case you don't want both to be handled, for example the 
  CTRL+LMB 'extrude' and CTRL+LMB-tweak 'lasso select', you will
  need to set the first acting on a EVT_RELEASE, this event only
  gets passed on when tweak fails.

The current system allows all options, configurable, we had in 2.48,
and many more! A diagram of what's possible is on the todo. :)

Also in this commit: lasso select editmesh failed with 'zbuffer 
occluded select'. Also circle-select failed.
2009-02-02 14:13:14 +00:00
c67952a475 Animato RNA wrapping:
It's about time that the RNA wrapping for various parts of the animation system were cleaned up for my recent changes. I've moved some code around (and/or deleted a file or two) in the process.
2009-02-02 11:51:10 +00:00
7c48f1994a patch for paths_svg2obj.py by author jms:
This patch solves some major problems of the svg script :
- reading of the inkscape svg format
- parsing of the scientific numbers
- redundant arc data in the same path for only one command "a"
- blending of curves after several files import and at the end a more correct management of the current point.
2009-02-02 00:31:46 +00:00
9c2e4571cc 2.5
Committed two posemode operators. Hide/Unhide.

For people who want to check on adding operators, only 
check the changes in armature directory, rest is to 
get things to work, and a small bugfix :)
2009-02-01 19:53:24 +00:00
a00aa16d7e 2.5
Hrmf, I try to make a local operator-only commit possible, but I
keep finding other small todos :)

- added two more standard poll callbacks for pose and armature
- fixed operator naming in editmesh_mods.c
2009-02-01 18:07:02 +00:00
df68580aeb 2.5
Preparing for volunteer to work on operatorifying armature code.
Just new C file and calls to assign operators and keymaps.
2009-02-01 17:33:10 +00:00
494575fabf sculpt operator was setting default array value from stack variables that were then freed, making sculpt defaults use invalid memory.
Since these values defaulted to zero, a NULL default array will do, but for new operators that need to be initialized from an array, only static arrays should be used.
2009-02-01 14:24:44 +00:00
dafc620a75 2.5 filebrowser
small fix for selection of bookmarks/favorite folders
2009-02-01 13:52:11 +00:00
3783d7fcbb 2.5 MSVC9 projectfiles
updates: 
* project blenfont added
2009-02-01 13:40:07 +00:00
6aab3e7267 2.5
Paint mode (VPaint WPaint) was too easy to enter, I made the
operators having a more designated poll() to check stuff.

Now CTRL+TAB hotkeys will work in editmode for select type,
and outside editmode for wpaint or posemode.

Also fixed select type operator to so it works for facemode.
2009-02-01 13:24:19 +00:00
dce3c08b2c made some mesh operator names and values more consistent with object mode + other minor changes.
- percentage -> percent, and always a float.
- renamed selectconnected to select_linked
- removed _mesh prefix for MESH_OT_* operators.
- renamed select_swap -> select_invert (matching object and sequencer operators)
2009-02-01 12:40:27 +00:00
00e2d763ff 2.5
Moved 'redo last operator' stuff to WM level, with a 

  WM_operator_repeat()

Code in screen_ops was not checking all operator stuff
correctly, so repeat menu (F3 now) crashed in cases.
2009-02-01 12:00:00 +00:00
b3c3af2156 - Converted mesh face popup menu to use brecht's toolbox function (like the image view toolbox)
Rather then having a hard coded popup menu with events that call other operators exec functions, operator names are given to the toolbox where it displays the operator name and shortcut.
This means the real operator is registered rather then the one that called it.

Im not sure about the location for the operator though, at the moment its called VIEW3D_OT_editmesh_face_toolbox() in view3d_header.c since the image editor toolbox is in the header file too.
In a way it makes sense because this menu should eventually be in the header.
- Change shortcut to Ctrl+F as it is in 2.4x

- Added a number of operators that were not being registered - MESH_OT_fill_mesh, beauty_fill, convert_quads_to_tris, convert_tris_to_quads, edge_flip, mesh_set_smooth_faces, mesh_set_solid_faces

- Renamed redundant MESH_OT_mesh_set_smooth_faces() to MESH_OT_faces_shade_smooth(), same for solid.
2009-02-01 04:22:18 +00:00
beb22eccfb missed renaming the operator keymap strip and exec function, also made some functions static 2009-02-01 03:12:31 +00:00
2755d48d4e - Change 2 operators from using int properties into enums.
- Renamed MESH_OT_mesh_selection_mode_menu to MESH_OT_mesh_selection_type since the operator doesnt have to be accessed from a menu.

Shaul, you might want to look over this, using enums means WM_menu_invoke can be used instead of writing an invoke function for each operator.

Added error messages to WM_menu_invoke if no enum "type" property is found.
2009-02-01 02:37:12 +00:00
75f7f1f21a edit mode selection menu - ctrl+shift+tab 2009-02-01 01:04:00 +00:00
744d3283e3 vert to sphere - S + ctrl + shift keys 2009-02-01 00:18:45 +00:00
306b3de751 selectrandom mesh , temp using space key 2009-01-31 23:57:04 +00:00
51ded6696a 2.5
Big commit, but mainly adminstration.

- Enabled ot->flag OPTYPE_UNDO to work.
- Removed all redundant ED_undo_pushes, but I'd
  recommend everyone to check it while testing. :)
- Added view manipulations as OPTYPE_REGISTER,
  although this will flood the redo stack a bit...
  Nevertheless; for a "redo last action" panel we
  can simply check if both flags are set for redo.

- Bugfix in editmode undo: selectmode was cleared,
  so you couldn't select after undo
- Bugfix in mixing tweaks and keymaps... solution
  works but is weak, need to think over a while.
2009-01-31 19:40:40 +00:00
59534ac589 2.5
Edit Mesh
Added the two other 'select similar' ops, for edge and face.

For testing fun I've put these ones as first keys using the
modifier order feature. So it's now:

SHIFT+G :     similar vertex
CTRL+SHIFT+G: similar edge
SHIFT+CTRL+G: similar face

Not very useful here; but I think this can work well to map
a double amount of options under mouseclicks. Power user 
config stuff!
2009-01-31 16:54:37 +00:00
db2bb765f9 2.5
Edit Mesh

- "Select Similar" for vertices back.
  (Put under Jkey for now)
- renamed operator righthand_faces to consistant_normals
  gave it boolean property for 'inside'.
2009-01-31 15:21:26 +00:00
2a7eb7aadf 2.5
Crash fix on file read: one event-free too many :)
2009-01-31 15:09:33 +00:00
94d31640de 2.5
Fake commit, but for history I have to write the log!

Fixed CTRL+Q quit-blender. It was using ancient code
still, and since I always use APPLE+Q I never noticed :)
2009-01-31 13:33:23 +00:00
86a2a0f694 2.5
Edit Mesh:

- Added back "Edge Shortest Path select"
  It now also does regular selection, more fun! 
  It's mapped to CTRL+click now, and makes or clears selections 
  between current and previously activated edge.
  Seam/Sharp/etc marking is a toolsetting mode still. These
  options cannot become properties easily, because the tool
  uses the properties of selected edge to clear...

- Removed a whole bunch of G.f flags, related to mesh drawing.
  It's all now local in me->drawflags. Here's the list of
  removed old globals:

G_DRAWEDGES
G_DRAWFACES
G_DRAWNORMALS
G_DRAW_VNORMALS

G_ALLEDGES
G_HIDDENEDGES

G_DRAWCREASES
G_DRAWSEAMS
G_DRAWSHARP
G_DRAWBWEIGHTS

G_DRAW_EDGELEN
G_DRAW_FACEAREA
G_DRAW_EDGEANG
2009-01-31 13:30:56 +00:00
607a56cb7a 2.5
- Made standard border operator calls bail out on zero sized borders
- Fixed compile warning in call to BKE_animsys_evaluate_animdata()
2009-01-31 10:00:08 +00:00
b5230890ec - sequencer select handle menu functions back
- sequencer border zoom (Shift+B) or from the header.
- added includes for blender.c and outliner.c
- editfont.c got rid of warning
2009-01-31 09:58:38 +00:00
a60413abd1 2.5
Edit mesh:
- fixed compile, shul only committed the function declaration, not 
  the code for 'make fgon'. 

- Put the Fgon option under:
  ALT+F: make fgon
  SHIFT+ALT+F: clear fgon
  (note, SHIFT+F = fill :) 

- Fixed loop select to use two booleans, as Martin pointed me
  correctly at! Using 1 variable was lazy coding.
2009-01-31 09:23:17 +00:00
5ed79ee9d9 make and clear fgon MKEY and shift+MKEY. ton: please check, it doesn't do what it should right now 2009-01-31 03:23:41 +00:00
babb973964 delete menu is back with XKEY. 2009-01-31 02:37:50 +00:00
05e04c5e45 delete menu is back DKEY. seperating may be needed to delete_mesh 2009-01-31 02:31:58 +00:00
c63fcd2799 Fix revision: 18690, bug #17850
The problem was that Qt convert the text to the type
STRING or UTF8, that is why Blender can't get the text,
now should be work fine.
2009-01-30 21:01:18 +00:00
1e1c193092 Sculpt:
* Brought back axis locking
* Fixed flipping stroke add/sub with shift key at start of stroke
* Fixed a crash in stroke exec
2009-01-30 20:35:37 +00:00
a7b0df894e 2.5
Edit Mesh: Fkey back, add edge-face or fill 'edge net'
Make fgon will be different operator.
2009-01-30 19:14:50 +00:00
30ee0806fb 2.5
Edit Mesh Loop select back; 
the versions with ALT+Select (edgeloop) or with
ALT+CTRL+Select ('ring'). Hold shift for extend.
2009-01-30 18:53:54 +00:00
6d2a30ece8 Update the view3d depth buffer cache after rotating, moving, or scaling the view (for sculptmode) 2009-01-30 18:27:25 +00:00
480be71514 2.5
- Edit mesh: Add ctrl+click add vertex or extrude.
  I've made it not move the 3d cursor in that case.

Also found out tweak events conflicted with existing
keymap definitions; on tweak failure (= no mousemove) 
it now passes on the mouse event as 'mouse down' for 
the remaining keymaps to check.
These then actually respond to mouse-up instead of down...

The location in the keymaps where tweaks get generated
remains important. Examples:

1 - 'select' mouse-handler, operator return pass-through
2 - tweak handler checks, and makes tweak event
3 - grabber responds to tweak event

1 - ctrl+mouse tweak handler checks, makes tweak event,
    or passes event on
2 - if tweak event, it runs lasso
3 - else when passed on, ctrl+click extrude happens

In the first case, select works on mouse-down, immediate.
In the second case, extrude happens on mouse-release, even
though the keymap defined mouse-press.

This will make designing nice balanced keymaps still not
simple; especially because you can't tell operators to
pass on the key... although we can add the convention that
select-mouse operators always pass on to enable tweaks.

Still a good reason to wait with custom keymaps
when this is fully settled!
2009-01-30 18:18:41 +00:00
128c8167af 2.5: Fix for windows editmode tab crashes. This was due to
use of function pointers in the context callbacks. Apparently
MSVC decides that some of these functions are the same and
makes them into a single function with the same address. I
couldn't figure out if this was a compiler bug or according
to the C spec. Regardless, that means this method can't be
used, so now it uses separate CTX_DATA_DEFINES.
2009-01-30 16:45:25 +00:00
b50ef7af14 2.5
Edit mesh: Separate options back. Use SHIFT+P for it, PKEY has been
stolen! :)
2009-01-30 15:01:14 +00:00
1122b60f31 2.5
Animsys: added integrated copy of animdata in copy_libblock().
-> by default animdata-copy should relink ID data like Action,
   and put a facility to really duplicate it in other code.
   (single_user_animdata or so)
2009-01-30 14:23:31 +00:00
6009523659 2.5: Added simple toolbox menu in image window as a test,
can uses same menus as header now since code doesn't depend
on being in the header anymore.
2009-01-30 12:58:00 +00:00
8036342ea8 2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to
  organize things a bit and indicate what should be used when.

* uiMenu* functions can now be used to create menus for headers
  too, this is done with a uiDefMenuBut, which takes a pointer
  to a uiMenuCreateFunc, that will then call uiMenu* functions.

* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
  specific to making popup menus. Will convert the other
  conformation popup menu functions to use this too so we can
  remove some code.

* Extended uiMenu functions, now there is is also:
  BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.

* Converted image window headers to use uiMenu functions, simplifies
  menu code further here. Did not remove the uiDefMenu functions as
  they are used in sequencer/view3d in some places now (will fix).

* Also tried to simplify and fix bounds computation a bit better
  for popup menus. It tried to find out in advance what the size
  of the menu was but this is difficult with keymap strings in
  there, now uiPopupBoundsBlock can figure this out afterwards and
  ensure the popup is within the window bounds. Will convert some
  other functions to use this too.
2009-01-30 12:18:08 +00:00
445bbdf75d Outliner: Updated the tree-building code to work for Animato
* Note to Icon Designers - we need a new icon for 'Animation data' I think. Currently I'm using the old IPO icon...
* Should F-Curves get shown in the Outliner?
2009-01-30 10:08:58 +00:00
59caae4384 Animato:
* Drivers view in Graph Editor now displays drivers only, instead of displaying normal Animation data.

* 'Materials' channel is now only shown under an Object when there are Materials with animation data...

* Hid more debug prints behind debug flag. These should be removed...
2009-01-30 08:10:31 +00:00
0409977aa8 [#18241] Very minor bugfix and typo correction for wavefront obj exporter and importer python scripts
from Michael Judd.

Also removed .keys() for a loop in impor_obj.py since its the default dictionary iterator.
2009-01-30 02:01:16 +00:00
e7d62464b7 Animato: Hiding all debug prints behind -d flag, as they were causing too many slowdowns on complex rigs with Action Constraints. Many of these prints should eventually be removed, though some of them will still be useful. 2009-01-29 23:27:24 +00:00
1cec028c91 fix remaining bug in straighten command
restrict snapping to exact (poly) points when snapping to the currently drawn stroke.
2009-01-29 22:45:59 +00:00
e109310ad7 Just a minor change to a comment in constraints code. It appears that Action Constraints are in fact working now (I was probably testing old code last night). 2009-01-29 22:24:16 +00:00
63ad011e97 'scons blenderlite' failed because blf expected freetype 2009-01-29 21:41:43 +00:00
5f9ee2cbfe 2.5
- Made WM_cursor_wait() work without context or pointers,
  like old waitcursor(). Only use when operations entirely
  block UI. It will set waitcursor for all open windows.

- Cleanup in mesh tools, removing old cruft, and prepare
  for more goodies for shul to work on!
2009-01-29 18:54:22 +00:00
2869ce6cfa Animato: Groundwork for getting Action Constraint functional again
Currently this still works really badly, but I'm not sure of the exact cause yet.
2009-01-29 11:22:34 +00:00
b1a001942a include Py_CmpToRich for python versions lower then 3 2009-01-29 10:22:03 +00:00
3701fe8f36 Silencing MSVC warnings in code that I maintain 2009-01-29 10:19:43 +00:00
004fa8c52b scons compiling fixes for new blenfont module 2009-01-29 09:57:28 +00:00
595983cd28 Animato: Added base-code for converting the ugly old bitflag settings
Only object layers have been done for now. The implementation of this should provide a good indicator for how this should be done. Unforunately, the code for animating layer visibility is not that straightforward, since scene->base->layer (not set) settings need to be synchronised with the object->layer (set by Animato) settings.
2009-01-29 09:40:49 +00:00
ca36e04362 python3 couldn't generate epydocs because python3 needs richcompare functions for C defined PyTypes (it seems). 2009-01-29 09:38:52 +00:00
12616b7e24 Added CMake files needed for new blenfont module.
Note to bdiego: this module seems to depend on ftfont, which is only compiled with the INTERNATIONAL build setting, however it seems blenfont should work regardless of that setting.
2009-01-29 06:35:04 +00:00
6e08a165bb Moving Language code from interface/text.c to blenfont library.
I go to start commit the new code here and then replace one
by one bmfont and ftfont, this do nothing right now, but it's
more easy keep the files here to work from the studio and my home.

I only update the Makefile and SConscript (but JesterKing a double
check never is bad), so please check the msvc and cmake files.

The new library is libblenfont.a
2009-01-29 05:19:27 +00:00
54059f0ac1 * Brought back special normal recalc for sculpt (only recalculates modified faces/verts)
* Means that full object recalc isn't done, so multires works more as expected now
* Moved mesh element cache back to sculpt session (from sculpt cache), really makes more sense there
2009-01-29 03:50:46 +00:00
2176f69602 Animato: Conversion code + drawing tweaks
* Recoded the conversion code so that all data gets converted. Previously, some IPO's and Actions (notably the ones used for Action Constraints) were not ported across.

* Made F-Curve drawing use more saturated colours to make them more visible. I'm not sure whether this works well in practice.

* Restored some horizontal bounding-box checks to optimise drawing.
2009-01-29 03:43:04 +00:00
b18defbffb 2.5:
* Automatic shortcut keys in menus now compare operator properties as well.
  Implemented IDP_EqualsProperties for this.
* I imagine all these compares may be a bit slow, for this case it's not
  so bad though because it only happens for one menu when it is opened.
2009-01-28 23:29:27 +00:00
59147ad983 Animation Editors: Tweaking/Refresh Issues
* Added 'select-tweak' functionality to DopeSheet
* Added proper notifiers for Graph Editor updates
2009-01-28 22:51:42 +00:00
ce2446e3db * Was missing checks for scene->ed which crashed blender when using the sequencer for the first time.
* Added WM_OT_tweak_gesture operator for select, drag
* Sequencer select operator now returns OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
2009-01-28 22:36:34 +00:00
7114486e8b 2.5:
* UV Editor Transform, translate, rotate, scale, live unwrap, snap, gesture,
  etc work.
* Also for selection operators, used OPERATOR_FINISHED|OPERATOR_PASS_THROUGH
  instead of just OPERATOR_PASS_THROUGH to make gestures work, seems more
  correct to me.
2009-01-28 21:43:43 +00:00
db9accc1d1 2.5:
* Fix using enter key for selecting item in a submenu.
* Fix some non working buttons in nodes.
* Fix memory leak when using glsl.
* Change triple buffer proxy test a bit, hopefully this succeeds
  on more cards now.
2009-01-28 19:42:49 +00:00
4e232753c0 2.5
Some drawing tweaks for animsys:

- added notifier ND_KEYS type, to send proper notes around.
  now insert-key redraws fcurve/action view
- made slider-draggers disappear when view is total or bigger.

Also experimented with making sliders go away entirely, but
this conflicts too much with current code for channel lists.

Ali: I think you have to make call that calculates the 'tot'
for channels, and run this in region listener, including the
totRect update for view2d.

The 'minsize' for channels also fails when there's a slider,
it always doesn't fit then :)
2009-01-28 18:26:47 +00:00
f29a20043c 2.5 MSVC9 projectfiles
updates: 
* windowmanager/wm_draw.c
* editors/space_ipo: ipo_draw.c, ipo_edit.c and ipo_ops.c
2009-01-28 18:02:15 +00:00
8006134a9c 2.5
Made 'select-tweak-grab' work in 3d window, fcurve and nodes.
For nodes it works with both left/right, the others follow
user preset for select.

Tweak is a WM event, which also follows user preset for 
tablet-style tweaks (release = apply).

You enable tweak events with an operator WM_OT_tweak_gesture.
Keymap entries can assign to left/middle/right button or to
action/select button tweaks.
2009-01-28 15:39:39 +00:00
3f06164471 2.5
Joshua asked me to check depsgraph drivers; i've added the
very minimal case, but further I'm stuck, need help.
Also made region listeners for Graph Editor work for all.
2009-01-28 13:16:43 +00:00
56d2dc7e7f bug fix softbody wind
-compensating factor 1000 that comes from 
pdDoEffectors() since Aug 2008
-give  particles and soft body vertices the same 
polarity on force fields.
2009-01-28 12:34:22 +00:00
e687e6ccd2 2.5
Bugfix in last commit: the read-file hotkey (enter) has to be in
the window handler queue, so it nicely exits all queues without
using free'd data.
2009-01-28 12:28:50 +00:00
4a1a8271c1 2.5
Filewindow: restored some usability issues :)
(Andrea: Hope you're OK, I needed to test stuff, and 
file open was a pain!)

- F1: shows last saved/opened file now
- Enter key loads, ESC cancels
- Hilites on mousemove now show same theme colors as before
- Enabled intended roundbox draw (was added to UI api)
- Tweaked roundbox hilites to nicely surround text
- Text was drawing too close to collumn dividers
- Brought back missing glDisable(GL_BLEND), messed with draw
- On file-open, mouse position is used to show active file
2009-01-28 11:27:25 +00:00
5b14573d0b Graph Editor: Restoring most tools
* Copy/Paste still needs to be cleaned up to be functional. Auto-set preview range + View All also need some work to become functional...
* Smooth has been moved to Alt-O hotkey, as Shift-O was taken for Sample 
* Renamed a few operators for DopeSheet to be more in line with Graph Editor ones, and to be less obscure.
* The 'join' and 'remove doubles' tools are not likely to be restored. I think that a few of the new tools cover this lack anyway. We can restore them if there is a real need.

* Record tool needs a rethink to be genuinely useful, so it's not included here anymore.
A note for anyone wanting to play with implementing this: store the sampled points using the new FPoint type in the FCurve instead of using BezTriples, as FPoints are used for storing sampled/baked data.
2009-01-28 09:55:36 +00:00
9e8a60c796 use wine for cross compiling 2009-01-28 09:32:31 +00:00
0494683f44 Graph Editor: Bringing back editing tools
* Snap + Mirror Keyframes (Shift-S and Shift-M)
* Set Handle/Interpolation type
* Snap current frame to selected keyframes (Ctrl-Shift-S) from the DopeSheet

* Toggle visibility of all handles (Ctrl H) from AnimSys2 branch also ported
2009-01-28 06:32:47 +00:00
7ced134325 Graph Editor:
Added some more buttons and a few menu entries in the View menu that simplify the viewport.
2009-01-28 03:22:37 +00:00
a0fa83a9dc Graph Editor - Restored all Transform tools
I've ported the transform tools for this editor as they existed in the AnimSys2 branch (minus some of the experimental pivot options which were not useful enough yet).

Hotkeys are:
* GKEY - transforms points as always
* RKEY - rotates points (only useful for a single 'knot') 
* SKEY - scales points
* EKEY - like in the DopeSheet, the 'extend' translation tool only moves all the keyframes on the same side of the current frame indicator as the mouse

Useful tweaks ported from AnimSys2 include:
* Auto-snapping is on by default for time-values on the keyframes only. Handles are not snapped (or shouldn't be).
* Rotating/Scaling new keyframes using default handles (i.e. Auto-Handles) now works, as the handle is now converted to aligned so that changes can be seen.
2009-01-28 02:56:58 +00:00
623659f72f Animato - Driver + ShapeKey bugfixes
* ShapeKey conversions should now go to the correct places
* Added fix for drivers to prevent crashes when no driver object is provided (Franky from BBB seems to have one such driver for some reason).
* Temporarily disabled a check when evaluating drivers for whether the driver is tagged for evaluation. Drivers still need to be correctly tagged AND ordered by the Depsgraph to work correctly.
2009-01-28 00:50:56 +00:00
561a9b3d4c svn merge -r 17502:18705 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2009-01-28 00:43:46 +00:00
7eae2080f2 Fix for bug #18087: Editing of object name and modifiers did not
work in editing buttons if the object data was linked.
2009-01-27 22:09:23 +00:00
5542f25331 Fix for bug #18167: setting Constraint.Settings.SCRIPT checked for type
Object rather than Text so did not work when assigning a text to it.
2009-01-27 21:26:31 +00:00
a21cdd9369 Fix for bug #18183: crash when using "Bake Constraints" script. The constraint
remove function was not working correct, this code uses a pretty bad hack, did
not clean it up, but at least it should work now.
2009-01-27 21:19:19 +00:00
2e610b3fb2 Fix for bug #17961: crash with material copy/past and GLSL. 2009-01-27 20:17:32 +00:00
4977609832 Fix for bug #18066: made UV Unwrap > Reset same as the default UV
coordinates when creating a new layer.
2009-01-27 19:59:12 +00:00
764168d62a 2.5
Added support in threaded compositor to copy the viewer
image safely away, prevents crashing especially for
people using blender -E or redrawing viewer while it
composites.

(Note; reloading images in nodes, render result, and
probably other cases have to be checked still)
2009-01-27 19:32:44 +00:00
92b0cbd6da Was missing TRUE so I included extra header that had it,
also fixed a call that had wrong number of args.

Kent
2009-01-27 18:36:58 +00:00
ed55fc125c 2.5
Bugfix; preventing crash on dividing by zero int.
2009-01-27 18:10:14 +00:00
6a31e2d26c 2.5
Crash in node editor, when you start a new composite.
Was missing check for scene pointer
2009-01-27 17:54:49 +00:00
c0ee40ab10 2.5
Compositor now uses threaded jobs.

- updates happen per preview node! Check this file for
  fun: http://www.blender.org/bf/composite_image.blend
  (any compo node could get preview!)
- had to ensure the composite data gets fully copied before
  it executes thread, so editing is not frustrated.
- put back node buttons (missing init)
- added WM_jobs api call to check for running job,
  illustrated with red light icon in 'use nodes' button.
- added another callback to WM_jobs, to initialize.
  use this init to ensure you only do it when job really
  starts.
- added an extra notifier option for WM_jobs, to signal
  finished job (like redraw image view)
- fixed file read error, it copied the screen it read,
  instead of using it.
- commented out annoying prints for missing ops in imagewin
2009-01-27 17:12:40 +00:00
b602fd8b1c 2.5
Make space_ipo compile for make
2009-01-27 12:49:44 +00:00
43c1532af9 Animato - Bugfixes + More conversion code
* BorderSelect in Graph Editor now works. Was a silly 1 char missing typo.
* Added conversion code for lamps and hooked up code for constraints.
2009-01-27 11:31:30 +00:00
f7721284bc Quick fix - Alt-B in Graph Editor works again... normal BKEY still doesn't though 2009-01-27 11:14:02 +00:00
8078bc65d6 Graph Editor:
* Cleaned up code for borderselect with BKEY. There's still a bug here where y-values don't seem to be getting properly checked, so nothing seems to happen.

* Set up some code for transforming keyframes. It currently uses the wrong code though (i.e. it uses the code for Action Editor which is 1D not 2D, and doesn't have some of the special checks needed). More work on this later.
2009-01-27 11:09:30 +00:00
2c1214f696 2.5
Fix: icons didnt show for uiMenu api.
2009-01-27 08:36:09 +00:00
d95d110d8d [#17850] Copying text from Eric4 to Blender crashes Blender
The crash is caused by calling XGetWindowProperty when xevent.xselection.property is zero.
Not a proper fix because clipboard can paste the data without trouble.
2009-01-27 08:17:35 +00:00
83ea582478 Graph Editor - Selection Tools
* Mouse-Select and DeSelect All work again
* Added access to constraint 'influence' value
2009-01-27 05:04:23 +00:00
6e6bd16bf1 * Struct-ified user preferences RNA 2009-01-27 04:37:12 +00:00
8aabcdb883 2.5 - Bugfixes for loading ManCandy
* Objects parented to bones now load correctly again (so Mancandy no longer looks like he had a run-in with a lawn mulcher). Was caused by a typo. I'm not sure how that got in there (or who did it)

* Action/Graph Editors would crash when loading files with Materials with some drivers.
2009-01-27 02:31:39 +00:00
d17b0d738b 2.5
******
small commit just porting the makeparent menu to use the new menu contsruction system
2009-01-26 23:58:56 +00:00
5917d0892c Graph Editor: Added files + Bugfixes
* Copied files containing code for tools from Action Editor to use as a base for the Graph Editor's tools. The toolsets are now very similar, so it should just be a case of making a few tweaks here and there. Currently all of these tools are #if-def'd out, as there are still a few things to clean up.
(BUILDSYSTEM MAINTAINERS BEWARE!)

* Tweaked some UI stuff (width of mode selector in header, names in the spacetype choosing menu)

* Fixed a few bugs which were causing crashes when loading old files with IPO Editors open.
2009-01-26 23:18:27 +00:00
a17eade622 - Made embbed point rely on last embbed preview (when holding down shift and moving mouse around) for finding the proper depth. This makes it much easier to do polylines on partially occluded areas: just shift-hover a visible section than move to where you want along the volume before clicking to place a point (this sounds complicated but it isn't).
- Replace Cutout command by Straighten. Fonctionnality is the same except that it now keeps points in between cuts, just straightens them.
2009-01-26 22:43:12 +00:00
63cedd8bd8 Added some code in sculpt and RNA for textures with type none. Hopefully fixes the problem with sculpt not working in 2.5. 2009-01-26 21:32:22 +00:00
5df6f4d257 2.5
Added add-primitive for Curve objects.
Shift+A, works as usual in our outside editmode.
2009-01-26 15:23:29 +00:00
14ad6ae4dc 2.5
Bugfix: having multiple windows didnt read events anymore for other
windows. Caused by too much security escapes in event handlers.
2009-01-26 15:22:10 +00:00
a34e2e1427 Animato/2.5 - Graph Editor (i.e. the new 'IPO Editor')
This commit brings back the drawing code for the 'Graph Editor'. I've decided to call it this, as currently it can show either F-Curves for Animation stored in Actions, or F-Curves for Drivers.

Currently, it shows all curves, since some of the necessary filtering code (i.e. for limiting curve visibility) hasn't been put in place yet. At least this serves as good proof that we can have F-Curves from multiple sources at least.

It should be noted that the code still has to be modified to work with some of the new Animato features, such as F-Curve Modifiers (cycles are an example of one of the features that use this). Also, a nicer way to set the colours of the curves needs to be investigated.

Notes:
* Fixed a few bugs in RNA User-Preferences wrapping

* The keyframe drawing uses the new-style drawing for handles from AnimSys2. There's a minor bug that sometimes occurs, where a distorted handle gets drawn at the origin of the grid on the first run. Hints anyone?

* Removed most of the old data from SpaceIpo struct, as the new code uses that. Maybe later, the directories/files at least should get renamed.

* Removed ancient hack for NVidia/TNT drivers. It is probably no longer needed, but could be restored if someone needs it.
2009-01-26 11:33:16 +00:00
bf05827319 * Added WM_operator_filesel which can be used for an operators invoke function (like WM_operator_confirm).
It opens the files selector if "filename" property has not been set, else it executes the operator directly. Brecht, you might want to check, currently only sequencer add operators use it.
* Added back Effects menu back, replaced SEQUENCER_OT_add_color_strip with SEQUENCER_OT_add_effect_strip.
* Made sequencer header use operator UI functions.
* gcc complains when char's are used as array indicies when they are not explicitly signed/unsigned, corrected previous change for vpaint to silence this error.
2009-01-26 09:13:15 +00:00
8762737400 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17853:HEAD 2009-01-26 08:34:40 +00:00
9146687ffc let the game engine compile, if WITH_FFPEG is not defined (so we don't have video textures in that case) 2009-01-26 06:31:06 +00:00
784d8ee37a 2.5 DopeSheet/Action Editor
* Made the various datatypes in the DopeSheet get shown again (NOTE: some of the types that don't get conversions to Animato yet may need some further checking).
* Did some code cleanup to allow F-Curve channels to always show RNA-based names correctly
2009-01-26 04:13:38 +00:00
1ed26fffb8 Volume rendering: multiple scattering
This is mostly a contribution from Raul 'farsthary' Hernandez - an approximation for 
multiple scattering within volumes. Thanks, Raul! Where single scattering considers 
the path from the light to a point in the volume, and to the eye, multiple scattering 
approximates the interactions of light as it bounces around randomly within the 
volume, before eventually reaching the eye.

It works as a diffusion process that effectively blurs the lighting information 
that's already stored within the light cache.

A cloudy sky setup, with single scattering, and multiple scattering:
http://mke3.net/blender/devel/rendering/volumetrics/vol_sky_ss_ms.jpg
http://mke3.net/blender/devel/rendering/volumetrics/sky_ms.blend

To enable it, there is a menu in the volume panel (which needs a bit of cleanup, for 
later), that lets you choose between self-shading methods:

* None: No attenuation of the light source by the volume - light passes straight 
through at full strength
* Single Scattering: (same as previously, with 'self-shading' enabled)
* Multiple Scattering: Uses multiple scattering only for shading information
* Single + Multiple: Adds the multiple scattering lighting on top of the existing 
single scattered light - this can be useful to tweak the strength of the effect, 
while still retaining details in the lighting.

An example of how the different scattering methods affect the visual result:
http://mke3.net/blender/devel/rendering/volumetrics/ss_ms_comparison.jpg
http://mke3.net/blender/devel/rendering/volumetrics/ss_ms_comparison.blend


The multiple scattering methods introduce 3 new controls when enabled:
* Blur: A factor blending between fully diffuse/blurred lighting, and sharper
* Spread: The range that the diffuse blurred lighting spreads over - similar to a 
blur width. The higher the spread, the slower the processing time.
* Intensity: A multiplier for the multiple scattering light brightness

Here's the effect of multiple scattering on a tight beam (similar to a laser). The 
effect of the 'spread' value is pretty clear here:
http://mke3.net/blender/devel/rendering/volumetrics/ms_spread_laser.jpg

Unlike the rest of the system so far, this part of the volume rendering engine isn't 
physically based, and currently it's not unusual to get non-physical results (i.e. 
much more light being scattered out then goes in via lamps or emit). To counter this, 
you can use the intensity slider to tweak the brightness - on the todo, perhaps there is a more automatic method we can work on for this later on. I'd also like to check 
on speeding this up further with threading too.
2009-01-26 02:42:17 +00:00
3d39996f0f Added radial control support to vpaint and wpaint. Added undo pushes as well. 2009-01-25 21:02:52 +00:00
3c088f3434 2.5
Simple toolbox-style menu system. Brecht will review it
though, and/or check on way to use it for menus.
I tried to avoid uiBlock and rna stuff all over. :)

Quick image test:
http://www.blender.org/bf/rt.jpg

Examples you can read in:
- editors/screen/screen_ops.c:testing123() (press F5)
- editors/object/object_edit.c:object_add_primitive_invoke()
  (press SHIFT+A)

Concept is simple:

uiMenuBegin(): returns a handle.
uiMenuEnd(): puts it all to work.

In between you can add items like:

uiMenuItemVal(): a name, icon, retval (use uiMenuFunc()) 
uiMenuItemO(): an operator + icon
uiMenuItemEnumO(): an operator, property name, value

Sublevels go easy too:

uiMenuLevel(): creates item for sublevel, with function pointer.
     Inside that function you can use all menu calls again.
     Levels can go as deep you want.

uiMenuLevelEnumO(): creates operator sublevel for an enum
2009-01-25 20:22:05 +00:00
99e549480b == Python: Space Handler Scriptlinks ==
Bugfix (patch #18216)

I made a mistake on my previous try to fix this. I fixed something, tested, decided I should move the call to run spacehandlers to a better place, but missed removing the old call (ugh). Thanks Steven Truppe (rocketmagnet) for emailing me about it and for the patch.
2009-01-25 17:49:39 +00:00
cfd9342600 2.5
Use proper function to check if prop is defined instead of relying on default.
2009-01-25 17:08:56 +00:00
8b793524ff make operator names more consistent
ANIM_OT_toggle_time -> ANIM_OT_time_toggle
SCULPT_OT_toggle_mode -> SCULPT_OT_sculptmode_toggle
UV_OT_select_inverse -> UV_OT_select_invert
NODE_OT_toggle_visibility -> NODE_OT_visibility_toggle
OBJECT_OT_toggle_editmode -> OBJECT_OT_editmode_toggle

toggle was used last in other operators eg- VIEW3D_OT_vpaint_toggle and VIEW3D_OT_wpaint_toggle.

'invert' was used everywhere else.
2009-01-25 15:41:17 +00:00
31fc0ff995 * added operators SEQUENCER_OT_lock, unlock, reload, refresh_all, view_all, view_selected.
* sequencer transform now does overlap checks.
* removed old transform functions from sequencer_edit.c
* shuffle_seq moved to kernel, now moves strips to the end of the last sequence of itschannel (if all channels are used). 2.4x would remove the strip.
* most of the 'Strip' menu items now call their operators in the header menu, some for view and select too.
2009-01-25 14:53:41 +00:00
2ae25bdba9 Animato - Bugfix for Conversion of Object Rotations
Yet another attempt to fix this problem (hopefully the last). Resolved a few typos (previous code was adjusting times not values).
2009-01-25 11:45:40 +00:00
af4270eb68 Did some refactoring with brush and sculpt to make radial control easier to add to other modes. 2009-01-25 07:28:11 +00:00
de6d5b1540 Animato - Bugfixes + Nicer names in Action Editor
* Action Editor/Dopesheet now displays names retrieved from RNA in the form - "<Struct/OwnerName>.<PropertyName>.<ArrayIndex>"
i.e. "HeadBone.Location.X"
i.e. "Cube.Rotation.Y"
i.e. "Material.Diffuse Color.G"

For now, the first part of the name may be unclear as it is easy to confuse Material channels with Object ones if the material was called "Object1" or so (theoretrical example only). This will be explored further.

* Also, fixed crashes when loading some old files with 'Object' Action Channels in their Actions
2009-01-25 04:02:31 +00:00
91644c4249 fix syntax error 2009-01-25 01:32:00 +00:00
Nathan Letwory
e04a8a15c6 2.5 / MSVC
* make MSVC happy. M_PI is defined for MSVC, but these constants are available only after
  doing #define _USE_MATH_DEFINES before including math.h.
  Good to remember for in the future (no need to define our own M_PI's).
2009-01-24 23:37:34 +00:00
a7116440a0 Fixed a drawing error in radial control and a warning in sculpt.c. 2009-01-24 23:20:25 +00:00
fb87cfbb1b More radial control work.
* Added a rotation setting to brush (and brush RNA)
* Brought back strength and rotation modes for radial control
* Brought back brush texture for radial control
* Turned off display of sculpt brush during radial control operator
2009-01-24 22:58:22 +00:00
3e6b5804fd editmesh face menu back, ctrl-pkey 2009-01-24 22:21:12 +00:00
f1948b363d BGE patch 18211: Bug Fix for: [#18175] error on anaglyph view of a splitted viewport. 2009-01-24 21:19:35 +00:00
Nathan Letwory
ca5fe954f4 * make sure openjpeg stuff compiles and links properly.
- since we use this only as statically linked, I took out
    some confusing #ifdefs.
2009-01-24 18:09:03 +00:00
d62955bcac Added back old sculptmode FKEY radial control. (Moved fullscreen to F11KEY for now.)
Notes:
* So far, only size mode ported and tested, still strength and rotation to do
* Brought this back for sculptmode first, still to do are particle edit, vpaint, wpaint, texpaint, and I guess image paint?
* Changed the wm paint cursor slightly, to take a customdata pointer.
* Still need to bring back brush texture display in the cursor
2009-01-24 16:59:55 +00:00
2edfe5307b 2.5
- writeimage.c back, put in space_file now...
- renamed fluidsim.c to distinguish from bke version
2009-01-24 14:24:59 +00:00
7f780bffd6 2.5
Made API for elbeem sane; it was prototyping and exporting
functions from old src/ !

Note; elbeem.h is not exported anymore.
2009-01-24 13:47:20 +00:00
0ac35ca7c1 2.5
- Brought back code for particle edit and fluidsim
- Sanitized code from globals and bad level calls,
  so its ready to come back working.
- Fixed cirle selecting (Ckey now)
- Enabled undo for editmode curve, armature, particle
  and lattice

(another commit following)
2009-01-24 13:45:24 +00:00
e71d531238 Animato - Shapekeys work again
The RNA-wrapping for the 'value' (internally kb->curval) was set to be not editable, thus preventing Animato from writing to it. Removing the flag makes shapekeys more functional again (there are still a few non-functional cases).
2009-01-24 11:35:14 +00:00
e42ed36b3b Animato - Insert Keyframe for PoseChannels
Added temporary entries to the quick-hack insert-keyframe operator menu. Action Editor doesn't get refreshed properly yet though.

Proper keyingsets will be coming/remimplemented tomorrow or later this week.
2009-01-24 10:58:34 +00:00
10e39a2331 jpeg2000 commit missed the 2 most important files. 2009-01-24 10:19:29 +00:00
f53ecfa403 2.5 - Pose-Channel (i.e. PoseMode bone) Transforms work again
In the brief tests I did on a few rigs, this seems to work ok. Martin may want to check on the code for any cleanups that may be needed here.

Coming soon will be some modifications to the primative insert-key operator added earlier, so that Animato can be used to animate characters!
2009-01-24 10:03:19 +00:00
a727277a25 my last commit broke transforming metastrips, use find_id for scene lookup. 2009-01-24 09:55:31 +00:00
4b257e956f Animato - FCurve Modifier Bugfixes
* FModifier data is now allocated correctly, solving crashes on loading files containing IPO-curves with cyclic extrapolation
* Fixed memory leaks with FModifiers and their data not being freed correctly. Not sure exactly why the old code didn't work for this.
2009-01-24 08:21:39 +00:00
744e38cc74 Added back a line removed in r18642 so the macro CFRA can access scene. 2009-01-24 06:08:46 +00:00
8543337597 added back extend (Ekey) to sequener transform, works with nested metastrips too. 2009-01-24 05:38:25 +00:00
e68b7e6d87 * operators for toggling, making, separating metastrip's. (tab, m, alt+m)
* transform support for metastrips
* active strip is set to NULL if its freed again.
2009-01-23 23:14:02 +00:00
36b7ff81d2 Animato - More compatability work
* Absolute shapekeys work again. For now, the 'speed' curve isn't converted yet (same goes for 'Curves'). Those were kindof hacky, since they manipulated time in weird ways. Probably the clamping to 0.0-1.0 range can go though.

* Materials, Textures, Cameras, and local-constraint IPO's are now converted properly to the new system
2009-01-23 23:11:12 +00:00
fc7af897b7 Prevent overdrawing to trigger when starting a stroke by snapping to an existing point.
Overdrawing copies point type from start and end point (better for polyline)
misc renaming some structs and vars (cleanup mostly)
2009-01-23 21:34:51 +00:00
55150edc92 [#18164] jpeg2000 patch, with some fixes from Peter too.
Support for jpeg2000 and writing DCI Cinema standard files.

Notes
* 12 and 16bit channel depths are converted from/to blenders float buffer.
* Grayscale/RGB with alpha supported.
* Theres an option to save color channels as YCC rather then RGB.
* Quality 100 saves lossless
* The UI is a bit weired because of the DCI standards need to be given to the encoder.
2009-01-23 21:08:01 +00:00
c86579b11e 2.5: multiple small fixes
- wm draw method is now initialized correct when reading older
  files, but the SDNA bug causing the problem is still unsolved.
  is due to // char pad[8]; not being recognized as commented.
- triple buffer proxy texture test follows spec better now,
  was disabling triple buffer unnecessarily on some drivers.
- some cmake compile fixes related to sequencer pthread usage
  and removed bad level calls lib for player.
- show outliner header buttons in oops mode as well until that
  can be switched in the UI.
- fix region data free issue for tooltips
- warning fixes
2009-01-23 20:36:47 +00:00
4531e8e6a7 2.5
File reading of 2.50 files fixed.
- it now exits nicely from queues without using free'd memory
  (checks CTX_wm_window(C) to be NULL)
- code that matched current (ghost) window with new situation
  lacked setting a pointer good.

Overall cleaned some parts too; like context clears now all
wm related pointers when you set a new wm, window or area.
2009-01-23 17:42:36 +00:00
66437a62a7 2.5
Font object + editing back.

Was quite some work due to a myriad of globals all over!
Works nicely 100% local now.

To enable a single textedit operator, I've added a new
keymap entry KM_TEXTEDIT, which gives all keyboard events
to the handler. Also had to add a new keymap-add function
to force a keymap handler in beginning of region handlers.
In future this can be used to prioritize handlers.

Also: split off the arrow keys (frame change) to a separate
region level handler. Can be set with default flag in
regiontype->keymapflag ED_KEYMAP_FRAMES
2009-01-23 14:43:25 +00:00
f4133b730c fix for eternal loop that could happen when resizing the view. 2009-01-23 14:08:02 +00:00
87dd972773 2.5
*****
small commit, just added a couple missing notifiers to the timline buttons
2009-01-23 10:51:13 +00:00
69310fb107 2.5: WM Compositing
* Triple Buffer is now more complete:
  - Proper handling of window resize, duplicate, etc.
  - It now uses 3x3 textures (or less) if the power of two sizes
    do not match well. That still has a worst case wast of 23.4%,
    but better than 300%.
  - It can also use the ARB/NV/EXT_texture_rectangle extension
    now, which may be supported on hardware that does not support
    ARB_texture_non_power_of_two.
  - Gesture, menu and brushe redraws now require no redraws at all
    from the area regions. So even on a high poly scene just moving
    the paint cursor or opening a menu should be fast.

* Testing can be done by setting the "Window Draw Method" in the
  User Preferences in the outliner. "Overlap" is still default,
  since "Triple Buffer" has not been tested on computers other than
  mine, would like to avoid crashing Blender on startup in case
  there is a common bug, but it's ready for testing now.

  - For reference "Full" draws the full window each time.
  - "Triple Buffer" should work for both swap copy and swap exchange
    systems, the latter still need the -E command line option for
    "Overlap".
  - Resizing and going fullscreen still gives flicker here but no
    more than "Full" drawing.

* Partial Redraw was added. ED_region_tag_redraw_partial takes a
  rect in window coordinates to define a subarea of the region.
  On region draw it will then set glScissor to a smaller area, and
  ar->drawrct will always be set to either the partial or full
  window rect. The latter can then be used for clipping in the 3D
  view or clipping interface drawing. Neither is implemented yet.
2009-01-23 03:52:52 +00:00
9872e5882c Animato: Added conversions for Camera data and Texture IPO's
Most of the settings have been converted, however, there are a few which are not easy to convert.

* For textures:
- tex->noisedepth  - undefined in RNA?
- tex->noisetype   - undefined in RNA?
- tex->stype       - undefined in RNA?
- tex->noise_basis2 - is noted in RNA as undefined... 

* For Cameras:
- "CAM_LENS" define was used for either 'ortho_scale', or 'lens' depending on camera type. This is currently difficult to ascertain using current code... I'll revisit this later
- cam->YF_aperature - undefined in RNA 
- cam->YF_dofdist - undefined in RNA
2009-01-23 03:41:05 +00:00
b7f0add801 remove doubles op, ton: is this working properly? 2009-01-23 03:07:07 +00:00
6f24a2a559 Animato:
* Removed a few excessive debug prints
* Fixed crash on loading "Frankie" from BBB due to missing check for Driver without a target
2009-01-23 02:59:21 +00:00
2e7f3bb99c Animato Bugfixes:
* Fixed bug in with RNA-paths. String identifiers (i.e. some_collection["somekey"]) were not getting handled at all due to wrong indices it seems. I don't know of any other code using this, so hopefully there aren't any unintended bugs caused by this. 
This means that bone animation now works again.

* Added a few more sanity checks to file-reading code, and heaps of extra prints everywhere else for debugging purposes (these will be removed in due course).
2009-01-23 02:50:04 +00:00
94a4a2066a 2.5 MSVC9 projectfiles
updates: 
* windowmanager/wm_jos.c
* editors/datafiles/preview.blend.c
2009-01-22 18:09:59 +00:00
8a95c67a50 BGE API cleanup: shape action actuator. 2009-01-22 17:40:47 +00:00
3e6a1bc60b New Operators, duplicate is shift+d, Add operators are accessible from the header.
SEQUENCER_OT_add_duplicate(mode=1) 	
SEQUENCER_OT_add_image_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_movie_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True) 	
SEQUENCER_OT_add_sound_strip(name='', start_frame=0, channel=1, filename='', replace_sel=True)

Some of these use the file selector, Note that sound isn't working yet because editsound.c functions are not yet in 2.5 and Operators dont have a way to recieve an array of strings so SEQUENCER_OT_add_image_strip only adds 1 image at the moment.
2009-01-22 15:52:04 +00:00
d5f69e8552 2.5
- warning cleanup (wrong casts, unused vars, missing protos)
- removed old cruft from node_edit.c
- cleaned wm_jobs.c a bit
2009-01-22 15:46:35 +00:00
9cc59fb0c3 2.5
Added WM Jobs manager
- WM can manage threaded jobs for you; just provide a couple
  of components to get it work:
  - customdata, free callback for it
  - timer step, notifier code
  - start callback, update callback
- Once started, each job runs an own timer, and will for
  every time step check necessary updates, or close the
  job when ready. 
- No drawing happens in jobs, that's for notifiers!
- Every job stores an owner pointer, and based on this owner
  it will prevent multiple jobs to enter the stack. 
  Instead it will re-use a running job, signal it to stop
  and allow caller to re-initialize it even.
- Check new wm_jobs.c for more explanation. Jobs API is still
  under construction. 
  Fun: BLI_addtail(&wm->jobs, steve); :)

Put Node shader previews back using wmJobs
- Preview calculating is now fully threaded (1 thread still)
- Thanks to new event system + notifiers, you can see 
  previews update even while dragging sliders!
- Currently it only starts when you change a node setting.

Warning: the thread render shares Node data, so don't delete
nodes while it renders! This topic is on the todo to make safe.

Also:
- bug in region initialize (do_versions) showed channel list in
  node editor wrong.
- flagged the channel list 'hidden' now, it was really in the
  way! This is for later to work on anyway. 
- recoded Render API callbacks so it gets handlers passed on, 
  no globals to use anymore, remember?
- previewrender code gets now so much nicer! Will remove a lot
  of stuff from code soon.
2009-01-22 14:59:49 +00:00
a017982074 Animato - Basic version patching support
This is work-in-progress patching support for converting animation saved in old system to work in the new one. 

* Only IPOs/Actions directly attached to Objects + Shapekeys are converted for now. More types will follow...
* This is currently done as a step outside of do_versions() due to problems with various pointers not having been resolved yet, but which are necessary for correct resolution of issues such as drivers... However, the current code does illustrate how the data should be converted to give best results/compat between the two systems.
* Still need to get the converted data working with depsgraph correctly. Currently, some of my testfiles work, but the BBB files still don't.
2009-01-22 10:53:22 +00:00
3cdac8e9f7 * Fixed some crashiness with sculpt file loading
* Added undo push for toggling sculpt mode
* Little optimization for brush texture, was generating quite large textures unecessarily
2009-01-22 04:22:26 +00:00
d95ad1a445 Undo in sculpt mode works now. Also removed some unused old code in sculpt.c 2009-01-22 01:58:38 +00:00
faa871117f Brought back sculpt smooth brush. Also added a new brush flag for setting whether to use brush spacing. 2009-01-21 22:40:28 +00:00
c6715de1e9 misc bug fixes and display adjustments 2009-01-21 22:20:16 +00:00
e609d0cb25 Brought back rake mode for sculpt (turns the brush texture with the direction of the brush stroke.) 2009-01-21 21:17:32 +00:00
bf72c26c57 Brought back textures for sculpt mode. These are stored in Brush DNA now, as well as the three texture modes (drag/tile/3D). 2009-01-21 20:03:41 +00:00
446ed90fd6 2.5 filebrowser
cleaned up selection code
new operators: 
- highlight file under cursor
- select all/nothing (AKEY)
- border select (BKEY)
changed selection to be invoked by LEFTMOUSE
2009-01-21 19:28:28 +00:00
cf9d0cf2e8 2.5 MSVC9 projectfiles
updates: 
* windowmanager/wm_draw.c
2009-01-21 19:11:20 +00:00
b9682a7ec8 sequencer operators duplicate, delete, separate images. 2009-01-21 18:47:09 +00:00
b4bef32bd9 * Fixed a minor CMake error for WITH_YAFRAY option
* Removed two unused sculpt DNA fields
* Restored brush spacing option to sculpt
2009-01-21 18:44:36 +00:00
73cffd9aad == Scripts ==
- Scripts Help Browser: error parsing doc info wrapped in triple single quotes, like done in the 3ds importer. Thanks Jean-Michel (jms) for informing me about it.
2009-01-21 15:45:31 +00:00
8bd7aa0a01 BGE API cleanup: action actuator. 2009-01-21 13:54:53 +00:00
e017235adc sequencer header buttons, not linked up to anything yet. 2009-01-21 12:39:56 +00:00
88e244ebb9 basic transform for sequencer strips
can transform the strips or move their handles
Still todo, click-drag transform, metastrips support, snapping, markers overlap checks and constrain to valid channels.
2009-01-21 07:01:20 +00:00
09357a91ce Animato - Quick bugfix
Added missing 'break;' 's skipped during the sprint towards the "first working prototype" stage. The temporary Insert Keyframe operator should now work correctly for rotation/scaling keys now by not adding extra keys.
2009-01-21 06:14:37 +00:00
4cb1302ee2 2.5
*******

just a small commit, addeed a few more error, warning reports
2009-01-21 02:24:12 +00:00
8d4a9081cc 2.5: WIP commit for WM compositing.
* Drawing code from wm_event_system.c split into separate wm_draw.c file.

Now there's 3 different draw methods implemented, not sure what survives
or will be added but is useful for debugging.

* Draw All: redraws everything each time, for reference.
* Draw Overlap All: what the code did before this commit, only draw
  regions marked for redraw, and anything that overlaps them.
* Triple Buffer: copies/retores all area regions into a texture, and
  blits that before drawing. Menus, brushes, gestures, etc are redrawn
  always on top of that.

Currently "Draw Overlap All" is set hardcoded to be used still. Triple
Buffer code is not complete, it doesn't handle window resize yet. Cards
that don't support non power of two textures can need quite large
textures as well, this could be split into multiple smaller ones.
2009-01-20 21:55:48 +00:00
5ddc9ed1da 2.5
cleanup image window apsect ratio correction mess (still disabled, this just cleans fonction call locations and name)
2009-01-20 20:44:36 +00:00
228c0c760f 2.5
EditMesh snap still had stubs instead of proper editmesh calls
Misc correction for 2D edit with NDOF (not testable without ndof support)
2009-01-20 19:58:05 +00:00
d9a0a477a4 2.5
Redraw at the end of transform even if not cancelled, to make sure all special transform draw doesn't stay on screen.
2009-01-20 19:18:22 +00:00
e5cf8cf052 2.5
Two bugfixes:
- area-full (ctrl+up) crashed on area-edge
- view3d view-icon and axes color wrong.
2009-01-20 19:03:26 +00:00
e673edd388 2.5 MSVC9 projectfiles
updates: 
* several new files added to editors/space_sequencer
* several new files added to editors/preview
2009-01-20 19:00:00 +00:00
bd9e896e96 2.5
View3D four-split: added box-clip for the three ortho
windows. Is all on by default, waiting for headers and
buttons to come back.

Also: hotkey for foursplit now also removes it (toggle)

Also: window_to_3d() function only did delta's, 
renamed it to window_to_3d_delta  and coded a 
real window_to_3d()
2009-01-20 18:31:11 +00:00
81763d8cf0 2.5
Couldn't leave to finish this; four-split 3d view now
syncs the ortho views to a box-view. Brings back good
old Amiga Sculpt4D feeling! :) What's not done is to
use the box to clip away invisible stuff.

Note that it still allows to switch top-bottom, 
left-right or front-back. The 4th window is entirely
free.

Test: use shift+alt+ctrl+S. In due time will all go
the headermenu, configurable, of course.
2009-01-20 14:23:32 +00:00
b8df9948ab WIP, operators SEQUENCER_OT_add_color_strip and SEQUENCER_OT_add_scene_strip
but no menu to access them yet, for now can access them with R and Tkey
2009-01-20 14:19:39 +00:00
f03cf5122b needed this include path to build 2009-01-20 12:20:01 +00:00
822203e4cf Animato - More work on Action Editor
* Added back Auto Preview-Range tool (i.e. set preview-range from keyframe extents)

* Restored delete keyframe tool. For now, this doesn't delete empty F-Curves, even though its keyframe-api counterpart still does. I still need to figure out how to do this in the best way.

* Fixed crashes when selecting keyframes in 'object' summary channels

* Removed prototypes for a few unused/depreceated functions...
2009-01-20 11:56:45 +00:00
b5904f10a8 missing comma 2009-01-20 11:54:00 +00:00
e20e4a7afd 2.5
- Previewrender code back, commented out a lot of bad cruft,
  nothing works or is linked even!
- Added NC_GROUP notifier type, used in editgroup.c and 
  listened to in 3dview and outliner
2009-01-20 11:09:26 +00:00
8c479bc933 Animato - Restoring most of Action Editor
* Streamlined the filtering code to remove a few redundant options, which required tweaking the code for most tools 

* F-Curves are simply displayed using their full paths right now. This should eventually be the UI-string stored in RNA, but right now there are still a few missing things.

* There are a few tools which are not available yet which were available in 2.5 before Animato was added:
- Copy/Paste
- Rearrange channels

Also, the DopeSheet is not totally functional (in terms of displaying animation data for sub-object data yet). That will be added tomorrow.

* Added 'Action Group' pointer to F-Curves, as it will be handy for allowing Bone channels to still remain grouped as they were before with the Action Channels. However, reintroducing such a structure to the data-storage is not anticipated...
2009-01-20 11:07:42 +00:00
42c8b6a684 2.5
******
small commit, just a few error reports
2009-01-20 11:03:53 +00:00
5cf8612d4b 2.5
*****
- made Group operators more atomic, no menus, able to build on top of each other
	- add/remove selected from group will be done later
	- new notifier is needed, ton will code
	- Group Create adds the object to the new group, and a string can be passed to it toi make a custum named group from Py, etc
	-keymaps remains the same (ctrl-g, create group - alt-ctrl-g, remove object from all groups)

- Added 2 more operators , GROUP_OT_objects_remove_active (alt-shift-g) , GROUP_OT_objects_add_active (ctrl-shift-g)
	- adds/removes object from groups that are attached to the active object
2009-01-20 10:50:36 +00:00
2fd331475f Wrapped constraint dna. There are a couple of things left to look at, all noted, but 99.5% of constraint uses are taken care of. 2009-01-20 03:55:30 +00:00
989a7e5b20 2.5
******
- Ported , add selected to group (Ctrl-G), remove selected from group(Alt-Ctrl-G)
	- add selected now has a add new entry which will put the object into a new group
	- remove selected now has an ALL option which removes the object from all groups
	- remove code is currently very messy, this will have to do until a better solution arrises, menus return strings instead of numbers perhaps

- add/remove to/from group of active object still need to be done
2009-01-20 03:41:23 +00:00
999d9d146e Added back some functionality to the sequencer
- removed static vars _last_seq, last_imagename and last_sounddir, replacing them with with vars in the "Editing" struct. didnt manage to get the active sequence to load so currently thats lost when loading.
- removed flag SEQ_ACTIVE
- Added operators cut, mute, unmute, deselect_all, select_invert, select, select_more, select_less, select_pick_linked, select_linked and borderselect.
2009-01-19 21:42:18 +00:00
c3434c8d61 2.5
Bugfix for previous View3D split commit: on file read, the area-
spacetypes are not set yet, needs BKE_spacetype_from_id() there.
2009-01-19 18:50:35 +00:00
33ab2636df subdivides are now grouped in a menu - WKEY 2009-01-19 18:36:54 +00:00
1c590a4d06 2.5
Quick bugfix; transform calls initTransformOrientation for all
spacetypes, it now returns except for view3d.
(Crash in grabbing nodes)
2009-01-19 17:28:53 +00:00
bc63213844 2.5
View3D has been split now in a local part (RegionView3D) and a
per-area part (old View3D). Currently local is:

- view transform
- camera zoom/offset
- gpencil (todo)
- custom clipping planes

Rest is in Area still, like active camera, draw type, layers,
localview, custom centers, around-settings, transform widget,
gridlines, and so on (mostly stuff as available in header).

To see it work; also added new feature for region split, 
press SHIFT+ALT+CTRL+S for four-split. 
The idea is to make a preset 4-split, configured to stick
to top/right/front views for three views.
Another cool idea to explore is to then box-clip all drawing
based on these 3 views.

Note about the code:
- currently view3d still stores some depricated settings, to
  convert from older files. Not all settings are copied over
  though, like custom clip planes or the 'lock view to object'.
- since some view3d ops are now on area level, the operators
  for it should keep track of that.

Bugfix in transform: quat initialize in operator-invoke missed
one zero.

Als brought back GE to compile for missing Ipos and channels.
2009-01-19 16:54:41 +00:00
9b049d89a1 set min/max for added prims according to 2.48 2009-01-19 16:46:41 +00:00
753029f3d1 adding vpaint to Cmakelist 2009-01-19 16:14:02 +00:00
89b7dfb5fb 2.5 - More work on getting file read/write support for Animato running
* Reorganised all animation-related file-writing code to be in the same area in the code, and clearly marked which parts of code are only used to ensure we can load old files to version-patch.

* Added file reading code for new datatypes, so it is possible to load the quit.blend file saved from the previous session. Version patching to work with the new system has yet to be done...

* Assorted whitespace fixes in places I skimmed through...
2009-01-19 02:26:46 +00:00
ff52dcbf0d Bugfix: Transform Snap
Would crash if snapping from a mesh in edit mode to a group instance including that same mesh.

Reported by UncleZeiv on IRC
2009-01-18 22:09:29 +00:00
6d85a0feba 2.5
Transform orientations (Alt-Space and in header)

enum for transform operator parameter.
2009-01-18 21:36:38 +00:00
54a0f4167b 2.5 filebrowser
fix typo in #include
2009-01-18 19:12:13 +00:00
40aa25a9f0 2.5 filebrowser
fixed missing return statement
2009-01-18 18:35:24 +00:00
2c5bf52214 2.5 filebrowser
* slightly improved drawing code
* temporarily added creation of thumbnails within thread in the background until thread job manager is available in WM.
* fixed missing icons in thumbnail view
2009-01-18 18:24:11 +00:00
332517957d 2.5 MSVC9 projectfiles
updates: 
* RNA: rna_space.c and rna_vpaint.c
* DNA: DNA_anim_types.c
* blenkernel: anim_sys.c, fcurve.c
* editors: space_image several files added
* editors: uvedit several files added
* editors: gpencil: several files added
2009-01-18 15:37:09 +00:00
d862db2e4f 2.5
*******
added RNA for the Vpaint settings
2009-01-18 11:05:56 +00:00
97692a3bf5 Changes to functions from blender/windowmanager/intern/wm_event_system.c
Python operator api was using WM_operator_name_call() which was confusing things too much.
Added WM_operator_call_py() which ended up being a very small function and split out operator creation into wm_operator_create()

Python operator now runs the poll() function and raises an error if it fails.

Eventually there should be error messages for poll that python can use to give the exact reason for failing (eg - library linked data, no active object...)
2009-01-18 10:46:26 +00:00
53ae509cc5 2.5 - AnimSys Data management stuff...
* Removed nAction struct. We'll be using good ol' bAction structs again, but putting new data in a different list. Apart from that, the data is similar enough to do so.

* Rearranged code in DNA_action_types.h while renaming the structs to avoid confusion over what is currently in use...

* Added freeing and AnimData execution loops for many other ID-types too. (NOTE: I've added AnimData in NodeTree struct too, but it's not clear to me where the relevant data-management calls should go in Nodes code).

* File writing code should now only write the new data to files
2009-01-18 10:41:45 +00:00
711d04a499 Made modal operators print their operator string after executing
(when in debug "-d" mode only)

copy & paste duplicate and transform operations can now be copied from user input and pasted into ./test.py and run with the Pkey (fixed some minor bugs preventing this)

Would be nice if the "mode" setting used a proper RNA Enum rather then an int. 

# example, duplicate and transform
bpyoperator.OBJECT_OT_add_duplicate(mode=1)
bpyoperator.TFM_OT_transform(mode=1, options=0, values=(-1.23989, 0.570745, 0, 0), constraint_orientation=0, constraint_mode=0, constraint_matrix=(0, 0, 0, 0, 0, 0, 0, 0, 0))
2009-01-18 07:35:44 +00:00
abfc78afaf 2.5
******
-ported some of the Object mode select menu to use uiDefMenuButO
	- select random/layer still uses the hard coded value as no sutible popup exists
	- select by type suffers from random crashes, somthing to do with Context
	- need some way of doing sub menu's using the operator's invoke
	- the old menu is just #if'ed out
	- and did a little hous cleaning aswel

- added some undo pushes to the select operators
2009-01-18 01:26:20 +00:00
0f4f89f19a 2.5: uv editor
- mouse select, loop select, select linked, unlink selection operators.
- added edge selection mode.
- fix 2.45 bug with unitialized theme colors, which caused the active face
  and face centers to be not drawn.
2009-01-17 22:14:08 +00:00
a6edbba8ec 2.5
- Added shift+d duplicate for object and editmode mesh.
  Note it uses WM_operator_name_call(), which is fine now,
  but in future might put again 2 undo's and operators on
  the stack. 
  Will have to spend some time on how Macros will work!

- added itterator CTX_selected_editable_objects()
  (named it first "edible" but that was too funny!)
  Also cleaned object_edit.c to use this correctly.

- added CTX_wm_view3d(), especially for hybrid tools
  that *can* use view3d, but don't have to.
  
- moved debug -d print for operators to the real invoke call
2009-01-17 18:35:33 +00:00
69e49c6f0c Make sculpt data more like vpaint/weightpaint. SculptData is now in scene->toolsettings, moved the RNA to reflect that too. 2009-01-17 16:58:05 +00:00
5caec606de 2.5
Made 'select linked' in mesh editmode work (LKEY).
Also added counterpart work with boolean (SHIFT+L).

Brecht: thanks for easier rna property defs :)
2009-01-17 16:11:12 +00:00
25c2ee5d93 RNA: warning fix for mac gcc. 2009-01-17 15:28:34 +00:00
f705bdaa89 2.5
Cleanup warnings from Joshua's commit (mostly unused variables,
but also used functions that were not prototyped).

Two bugfixes; passing on &ob->adt instead of ob->adt

But; the DNA system is now messed up, with two structs using
the same ID (nAction and bAction), that goes horrible wrong!
2009-01-17 14:56:12 +00:00
932131be53 RNA: made naming of animateable flags for properties more clear. 2009-01-17 13:54:56 +00:00
023765eb48 2.5 - AnimData fixes
* Made AnimData blocks be stored as pointer instead of directly in the ID-datablock, so that fewer files will need to be recompiled everytime some animation settings change.

* Tried to fix some of the compiler errors that pop up in Yafray code. If this commit doesn't fix it, just disable Yafray code for now (WITH_BF_YAFRAY=0 for scons)...
2009-01-17 05:36:58 +00:00
ee180ff5ac Added new CMake build option, WITH_YAFRAY. Set to disabled by default. 2009-01-17 03:51:13 +00:00
9b558b2116 Added a brush cursor to sculpt mode. 2009-01-17 03:31:56 +00:00
44e5b7788b 2.5: Blender "Animato" - New Animation System
Finally, here is the basic (functional) prototype of the new animation system which will allow for the infamous "everything is animatable", and which also addresses several of the more serious shortcomings of the old system. Unfortunately, this will break old animation files (especially right now, as I haven't written the version patching code yet), however, this is for the future.

Highlights of the new system:
* Scrapped IPO-Curves/IPO/(Action+Constraint-Channels)/Action system, and replaced it with F-Curve/Action. 
- F-Curves (animators from other packages will feel at home with this name) replace IPO-Curves. 
- The 'new' Actions, act as the containers for F-Curves, so that they can be reused. They are therefore more akin to the old 'IPO' blocks, except they do not have the blocktype restriction, so you can store materials/texture/geometry F-Curves in the same Action as Object transforms, etc.
* F-Curves use RNA-paths for Data Access, hence allowing "every" (where sensible/editable that is) user-accessible setting from RNA to be animated.
* Drivers are no longer mixed with Animation Data, so rigs will not be that easily broken and several dependency problems can be eliminated. (NOTE: drivers haven't been hooked up yet, but the code is in place)
* F-Curve modifier system allows useful 'large-scale' manipulation of F-Curve values, including (I've only included implemented ones here): envelope deform (similar to lattices to allow broad-scale reshaping of curves), curve generator (polynomial or py-expression), cycles (replacing the old cyclic extrapolation modes, giving more control over this). (NOTE: currently this cannot be tested, as there's not access to them, but the code is all in place)
* NLA system with 'tracks' (i.e. layers), and multiple strips per track. (NOTE: NLA system is not yet functional, as it's only partially coded still) 

There are more nice things that I will be preparing some nice docs for soon, but for now, check for more details:
http://lists.blender.org/pipermail/bf-taskforce25/2009-January/000260.html

So, what currently works:
* I've implemented two basic operators for the 3D-view only to Insert and Delete Keyframes. These are tempolary ones only that will be replaced in due course with 'proper' code.
* Object Loc/Rot/Scale can be keyframed. Also, the colour of the 'active' material (Note: this should really be for nth material instead, but that doesn't work yet in RNA) can also be keyframed into the same datablock.
* Standard animation refresh (i.e. animation resulting from NLA and Action evaluation) is now done completely separate from drivers before anything else is done after a frame change. Drivers are handled after this in a separate pass, as dictated by depsgraph flags, etc.

Notes:
* Drivers haven't been hooked up yet
* Only objects and data directly linked to objects can be animated.
* Depsgraph will need further tweaks. Currently, I've only made sure that it will update some things in the most basic cases (i.e. frame change).
* Animation Editors are currently broken (in terms of editing stuff). This will be my next target (priority to get Dopesheet working first, then F-Curve editor - i.e. old IPO Editor)
* I've had to put in large chunks of XXX sandboxing for old animation system code all around the place. This will be cleaned up in due course, as some places need special review.
In particular, the particles and sequencer code have far too many manual calls to calculate + flush animation info, which is really bad (this is a 'please explain yourselves' call to Physics coders!).
2009-01-17 03:12:50 +00:00
9bcdb4b758 2.5: various warning fixes. 2009-01-17 00:51:42 +00:00
de9495e519 Fixed a crash in sculptmode. Also replaced a degree sign with an underscore in view3d, not sure how that got in there. 2009-01-17 00:26:46 +00:00
8777182952 RNA: forgot to rename some values in the keymaps in last commit. 2009-01-16 23:58:10 +00:00
c1cf33c8aa RNA
* Added more compact property definitions, with a single function.
  Only used by operators at the moment, would need to tweak regular
  expressions a bit more to use it also for other RNA definitions.

* The operator properties defined now were completed a bit more but
  still have many issues that need to be adressed, specifically;

  * Some properties that should be booleans or enums are defined as
    ints, note that ints are only for numeric values, not bitflags
	or multiple choice.
  * Soft/hard limits and default values of many properties are not
    well defined still,
  * Inconsistent naming, especially for example mouse locations or
    bounds are named differently in different places. Also mouse
	locations and other vector like properties should become a single
	vector property instead of multiple X/Y properties.
  * Almost no properties have descriptions, these would be good to
    have for docs and tooltips.

So, please verify that the properties of the operators you wrote are
well defined.
2009-01-16 23:53:11 +00:00
16aa62e058 Command Gesture - Polygonize
New command option to turn continuous strokes into polylines.
2009-01-16 20:24:31 +00:00
ef93f8a36e Added transform locking. Fixed a bad UI string. Added access to posing data. 2009-01-16 18:04:01 +00:00
8252daa40b Removed matrices from sculpt session and into the sculpt cache. 2009-01-16 16:55:40 +00:00
bae2de3f1a minor corrections 2009-01-16 10:51:30 +00:00
e6b8687237 added ops for subdivide, subdiv multi, subdiv smooth, subdiv fractal 2009-01-16 04:48:33 +00:00
2a4682bff5 Fix sculpt memory leaks 2009-01-16 03:24:12 +00:00
ffeb60e1e5 Added a view3d function to read cached depth buffer, before was in sculpt.c where it didn't belong. 2009-01-16 01:56:11 +00:00
087b8b104a 2.5
*****
 - ported BorderZoom , shift-b
	- currently disabled in camera view as to not conflict with setting render border
2009-01-16 00:58:33 +00:00
54fa55394b Added some temporary error prints for get_depth in sculpt 2009-01-16 00:44:46 +00:00
ce3dca24d1 have had few requests to use blender for performing background tasks
- visualizing data, rendering scenes automatically and character rendering on a server.

This example script shows how you can run blender in background mode, parse arguments from the command line to generate a simple scene and render/save it.
2009-01-15 22:16:29 +00:00
09683a7c7d Cleaning of the small part of sculpt still in blenkernel, more to come 2009-01-15 21:07:44 +00:00
2784d5b995 2.5
- Finished adding primitives in Mesh editmode. 
  For test pleasure: hotkeys CTRL 0-9 add them.

More fun for testers: 
 
- F3: gives menu of all registered ops. You can use
  it too, it then execs it again, and makes it the
  last executed operator.
  
- F4: executes last registered operator without menu.
2009-01-15 18:28:40 +00:00
c0ecbfce0e blender was crashing if no argument was given after '-t'
mesh.faces.deltete(...) with an empty list no longer returns an error.
2009-01-15 18:06:06 +00:00
2b96a86298 Brought back grab brush in sculpt mode, also removed old BrushAction struct. 2009-01-15 16:57:17 +00:00
6e8645a6d1 RNA
* Attempt to fix CMake build on some systems were it could not
  find the rna_*_gen.c files, now it specifies full path.
2009-01-15 16:18:32 +00:00
004eacad0c 2.5
SHIFT+A add object back, no primitives in it though... later!
2009-01-15 16:07:39 +00:00
237cd7a7a7 2.5
- Depricated another bunch of globals; all the totobj,
  totmesh, totvert, and so on.
- All code that needs such totals now count it themselves,
  these stats were not supposed to be reliable
- Editmesh now stores and manages own totals.
- Todo: make a scene->stats that tracks notifiers.

Bugfix: selecting failed in editmesh, backbuffer stuff was
too late, already using index ranges before it was set.
2009-01-15 15:01:39 +00:00
c54cad0a32 2.5
Added new lib ed_uvedit in linking path for Makefiles
2009-01-15 10:55:48 +00:00
890838dce8 2.5
*****

small commit, ported make dupli real
2009-01-15 10:02:45 +00:00
c55f1b234c Tweak scons linking order priority to fix compile on windows. 2009-01-15 05:51:00 +00:00
ac91b159ae disallow identifiers with spaces 'cap end' wasn't working with the python api and made doc generation fail 2009-01-15 05:41:25 +00:00
4c17156c9e Brought back anchored mode for sculpt brushes. 2009-01-15 05:09:33 +00:00
52135dd4fa 2.5: Space Image ported back
Organized as follows:

uvedit/
	uv editing related code
	uvedit_draw.c: drawing code
	uvedit_ops.c: operators, just a few done
	uvedit_unwrap_ops.c: will be operators for unwrapping
	uvedit_paramatrizer.c: lscm/abf/stretch/pack

space_image/
	space_image.c: registration and common getter/setters
	image_draw.c: drawing code, mostly functional
	image_panels.c: panels, all commented out
	image_render.c: render callbacks, non functional
	image_ops.c: operators, only view navigation done
	image_header.c: header, menus mostly done but missing buttons

Notes:
* Header menus consist only of Operator and RNA buttons, if they
  are not implemented they're displayed grayed out. Ideally the full
  header could work like this, but std_libbuttons looks problematic.

* Started using view2d code more than the old code, but for now it
  still does own view2d management due to some very specific
  requirements that the image window has. The drawing code however
  is more clear hopefully, it only uses view2d, and there is no
  switching between 'p' and 'f' view2d's anymore, it is always 'f'.

* In order to make uvedit operators more independent I move some
  image space settings to scene toolsettings, and the current image
  and its buffer is in the context. Especially sync selection and
  select mode belonged there anyway as this cannot work correct with
  different spaces having different settings anyway.

* Image paint is not back yet, did not want to put that together with
  uvedit because there's really no code sharing.. perhaps vertex paint,
  image paint and sculpt would be good to have in one module to share
  brush code, partial redraw, etc better.
2009-01-15 04:38:18 +00:00
2213fa1c52 RNA
* Work around bScreen/Screen DNA name patching, so bScreen does not
  require manual callbacks to be written for properties.
* Added SpaceLink and SpaceImage RNA.
* Fix issue initializing ID property arrays with default values.

DNA
* Some DNA changes for space image.
* And a fix for corrupt clone image pointer in reading brushes.
2009-01-15 04:22:23 +00:00
f08032e8f9 UI: various changes
* View2D to region now returns ints instead of shorts.
* Use "Numpad" instead of "Pad" in automatic keymap menu info.
* Menus can now use buttons other than BUTM and SEPR, in
  particular TOG and ROW are now supported instead of flipping
  bits manually.
* Added a simpler uiDefMenu* api for making menus now, and it
  only supports Operator and RNA buttons at the moment, will be
  used in next commit. Not sure how this will evolve .. makes
  menu code look cleaner anyways.
* Ensure that interface code doesn't crash when getting unknown
  Operators and RNA properties, and display their buttons grayed
  out in that case.
2009-01-15 04:13:38 +00:00
ad50055610 Action Editor header menu structure ported, but menu items not yet linked up to functionality. Just wanted to get this committed in case I skid off a cliff in the snow tomorrow. 2009-01-15 03:12:21 +00:00
caa9e7b133 Brought back the layer brush in sculpt mode. 2009-01-15 03:10:01 +00:00
18b1bc88f7 edit mesh primitives: ctrl+1 to ctrl+6. monkey does not show and tube,cone and cylinder show with problems 2009-01-15 03:05:19 +00:00
ba755e3265 Brought back symmetry for sculpt mode, also added RNA for sculpt flags. 2009-01-15 02:36:24 +00:00
509ca83ef1 BGE patch 18065: gameobj mass writeable + setmass actuator. This patch allows to change the mass of a dynamic or rigid body object during the game. Two methods are available: in a Python script by setting the mass attribute of the game object; by logic brick with the Edit Object->Dynamics->Set Mass actuator. The mass can only be set on dynamic objects and must be a positive floating point value. 2009-01-14 22:33:39 +00:00
029bbb3489 2.5
Editmesh: add primitive basics back. Had to clean up a load of
crap there... but it's sorta in control, so I think Shul can
pick it up again.

Test: ctrl+0 adds plane, or ctrl+9 adds grid.

Notes for Shul:
- i've added a transform function, which gets correctly passed
  on to the add_prim function, should work for all object 
  transforms. Only the code inside add_prim might be needed
  to check (it uses 4x4 mat now, not a 3x3)

- The old code with buttons has been ifdeffed out, check for
  user input and make it rna properties, which get read
  in the exec(), and handed over to the add_prim. Set them
  default now to the values from old buttons.

- Operator naming is preferred lower case, I gave this
  a new name.

- check a bit on formatting code, but don't use the old code
  as example! Look also at ED_keymap_mesh() for example.
2009-01-14 19:26:11 +00:00
0d05b2c767 Added missing sculpt/brush RNA properties.
Also a few more tweaks to CMake/gcc warnings.
2009-01-14 18:48:16 +00:00
2a976811a9 Tweak the CMake warnings a bit. For example, function declarations with no parameters being declared without void in the parameter list were throwing too many warnings to be useful. Same for implicit casting of function return values from one numeric type to another. 2009-01-14 18:03:47 +00:00
2ecb371950 Removed a second declaration for BLI_uniquename.
Also supressed cmake/gcc warnings about unused parameters since these are everywhere (sometimes with good reason, for callbacks)
2009-01-14 17:36:13 +00:00
8eb035f64f Fixed warnings in sculpt, also brought back brush curve. 2009-01-14 17:22:30 +00:00
fd37c07e28 2.5
Bugfix;
- do not set active base/object yourse, but use ED_base_object_activate
- view3d buttons was reading NULL pointer.
2009-01-14 16:54:36 +00:00
247f3c9e7d Added better gcc warnings in Cmake. 2009-01-14 16:40:11 +00:00
30e851b8a5 2.5
A small round of warning cleanups; unused variables, missing
headers and some const types.
2009-01-14 16:37:52 +00:00
9aec7aaf6c 2.5
GPencil code back!

Joshua will probably take this further. I've added XXX notes
where fixes are required. Also note that ED_gpencil.h has
all old exports, which is probably not needed, most can go
to gpencil_intern.h

Also added Makefile fixes for sculpt
2009-01-14 16:13:50 +00:00
3e756ca0a6 Moved some more sculpt data into operator properties, also the test brush is now properly created so you can edit its state in the RNA viewer. Added an RNA property for the brush sculpt tool as well. 2009-01-14 15:29:29 +00:00
126b9ca1a6 2.5
Hrmf; sconscript apparently can't do emtpy dirs!
2009-01-14 13:18:10 +00:00
b4df27c50d 2.5
Still old editNurb here... last part
(I committed in parts, have gpencil restored here and can't 
commit that yet!)
2009-01-14 13:06:09 +00:00
3b56ee7880 2.5
Still old editNurb here...
2009-01-14 13:05:10 +00:00
efc4ccc974 2.5
Still some old editNurb here...
2009-01-14 13:04:48 +00:00
ea2d6fe0d0 2.5
Another one back: editcurve.c

- removed global editNurb everywhere
  (cu->editnurb now has listbase with edit data)
- also added 'active bpoint' and 'active nurb' in
  Curve struct
- editmode in/out works, mouse/border select works
2009-01-14 12:26:45 +00:00
07e85b265d Moved a couple more sculpt settings into operator properties, including shiftkey for flipping stroke direction in or out 2009-01-14 03:02:44 +00:00
9b1199d6a3 Noticed that sculpt was quite slow because of string lookups in RNA, so added a separate sculpt stroke cache for some values that usually aren't even changed except at stroke initialization. 2009-01-13 23:21:05 +00:00
00c12e0906 BGE patch: dynamically update the coumpound parent shape when parenting to a compound object.
This patch modifies the way the setParent actuator and KX_GameObject::setParent() function
works when parenting to a compound object: the collision shape of the object being parented
is dynamically added to the coumpound shape. 
Similarly, unparenting an object from a compound object will cause the child collision shape
to be dynamically removed from the parent shape provided that is was previously added with 
setParent.

Note: * This also works if the object is parented to a child of a compound object: the
        collision shape is added to the compound shape of the top parent.
      * The collision shape is added with the transformation (position, scale and orientation)
        it had at the time of the parenting.
      * The child shape is rigidly attached to the compound shape, the transformation is not
        affected by any further change in position/scale/orientation of the child object.
      * While the child shape is added to the compound shape, the child object is removed from
        the dynamic world to avoid superposition of shapes (one for the object itself and
        one for the compound child shape). This means that collision sensors on the child
        object are disabled while the child object is parent to a compound object.
      * There is no difference when setParent is used on a non-compound object: the child
        object is automatically changed to a static ghost object to avoid bad interaction
        with the parent shape; collision sensors on the child object continue to be active
        while the object is parented.
      * The child shape dynamically added to a compound shape modifies the inertia of the
        compound object but not the mass. It participates to collision detection as any other
        "static" child shape.
2009-01-13 22:59:18 +00:00
7f5073729f Bullet bug fix: bad pointer in btCompoundShape::addChildShape() - patch submited to Bullet forum. This bug fix is needed in preparation of the setparent coumpound shape patch. 2009-01-13 22:21:04 +00:00
Nathan Letwory
0162ded15a 2.5 / Keymap definition
* For some reason builds on Windows would crash when tabbing into edit mode with default .b.blend
  Problem is that it is not very clear why it happens. The debug trace I managed to get pointed at
  SCRIPT_OT_run_pyfile being run when pressing TAB.
  Changing the way how this quickhack for running scripts is added made the crash go away, but this
  points at a potential problem in the creation of keymaps. The original form is the plenty used:
  
  RNA_string_set(WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0)->ptr, "filename", "test.py");

  But changing that to:

  km = WM_keymap_add_item(keymap, "SCRIPT_OT_run_pyfile", PKEY, KM_PRESS, 0, 0);
  RNA_string_set(km->ptr, "filename", "test.py");

  Properly prevents the execution of the script operator. It looks like somewhere
  something goes wrong, but no idea what, yet. Probably a good thing to investigate now!
  Apparently this doesn't happen on Linux (and probably not on OSX either).
2009-01-13 21:18:05 +00:00
a42f9163bf Now that modal sculpt does stuff, added exec code. For this, added new Stroke RNA. For now, it's just 3D brush location, but lots more will be added (e.g. tablet pressure)
Pressing f4 to redo a stroke now works as expected.
2009-01-13 20:50:07 +00:00
d494cd5c6e Added missing sculpt header 2009-01-13 20:38:43 +00:00
b22fecea79 2.5 MSVC9 projectfiles
* added new files in editors/object and editors/space_sequence
* added seqeffects.c in blenkernel
2009-01-13 20:30:22 +00:00
1300df4469 More sculpt work. Very very basic sculpt operators implemented, one for toggling the mode, the other for the brush. This just allows entering sculptmode and drawing using a simple brush. (Note the operator is still modal, no exec yet.) 2009-01-13 19:57:36 +00:00
Nathan Letwory
fecac53522 2.5 / Nodes
* add a list area for material/texture/scene selection.
2009-01-13 19:28:18 +00:00
Nathan Letwory
469b19d231 2.5 / SCons / Temporary Hack
* curve, gpencil, physics and preview don't have sources yet, so scons fails on that. Disabled for now
  Ton, when you actually put something in those dirs, remember to uncomment them in the editors/SConscript.
2009-01-13 19:01:39 +00:00
Nathan Letwory
5ecbf408c3 2.5 / Nodes
* forgot to revert this with previous commit
2009-01-13 17:10:56 +00:00
76cc2fef78 2.5
Added last few remaining modules in editors. Then the msvc
maintainer can already start typing! Only uv_paint is not
added, not sure how far Brecht is locally already.
2009-01-13 16:18:18 +00:00
b71bc3a2f3 patch from Thomas Dinges, update URLs in help scripts 2009-01-13 15:48:27 +00:00
b8dac71bda 2.5
- restored three more C files: editlattice, editkey
  and editgroup
- editmode lattice working, (mouse select works)
- accidentally removed yesterday 3d cursor drawing
- removed global editLatt entirely now.
2009-01-13 15:18:41 +00:00
b3d8cbd113 fix from sirdude i patched and fixed my linkage erros in linux 2009-01-13 13:13:04 +00:00
25483d10bd 2.5
Added poselib.c back, non functional entirely still.
2009-01-13 12:32:01 +00:00
d263911eac 2.5
Renamed sequencer file to conform editor specs.
Couldn't yesterday, svn refused for some reason :)
2009-01-13 11:41:52 +00:00
806bc87a97 2.5
******
small commit
	- ported Select Linked (shift-L)
	- it does have IPO for now
2009-01-13 09:48:25 +00:00
0066b6a8aa fix for big in yesterdays commit, color values were not initialized 2009-01-13 05:55:48 +00:00
4e1ad1aaaa 2.5
*******

- Ported  ObData to center, center new and centur cursor
	- its currently 1 operator
	- no warning or error popups until its figured out how best to do so
	- possibly full of ugly code and things done worng way, had a hard time trying to understand this code

- some more house cleaning and removal of unused functions
2009-01-13 05:31:33 +00:00
6cfbb0017a * Little feature, blend texture can have extrapolation modes (like repeat).
This should probably go in trunk, but I'll stay away for now with all the 2.5 work on.
2009-01-13 02:39:46 +00:00
d8a269541f edit mesh operators for edit mesh view 2009-01-13 02:09:58 +00:00
ae25863d6c 2.5
* Tweaked a few incorrect comments in Constraints code
* Made Sequencer use View2D system correctly (only looked at the 'time-grid' thing so far).
2009-01-12 22:54:30 +00:00
ab39a3f2b7 Added pthread include for windows scons 2009-01-12 19:14:33 +00:00
03fc5696dc 2.5
12k lines of sequencer back! Only seqaudio.c skipped for now.
Notes:

- it only draws now, nothing refreshes or edits.
- fixed bug in view2d.c with vertical grid step being 0.0f
- render code and fileselect code is #ifdeffed out
- sequence evaluation code moved to blenkernel, so it can
  be used for render without bad level calls

General note; sequencer code is very untidy, mixing styles too
much. Tried to clean it some, but it would be nice if formatting
is kept consistant from now on.
2009-01-12 19:02:08 +00:00
Nathan Letwory
ca45efba28 2.5 / SCons / Nodes
* quick "typo" fix before anybody notices.
2009-01-12 18:07:55 +00:00
Nathan Letwory
4cc7971c15 2.5 / SCons
- make sure WITH_BF_PYTHON=False is respected.
2009-01-12 16:55:46 +00:00
d0b953d860 can now add sequencer effects with the python api
also fixed crashes when incorrect args were used

cross = 13; track= 5; frame = 1 # no effect constants 
scene.sequence.new((cross, seq1, seq2), frame, track)
2009-01-12 15:58:32 +00:00
Nathan Letwory
415b9d2e84 2.5 / Nodes / SCons(mingw)
* chop the nodes library into smaller parts
  - the addition of texture tree pushed the limits for scons/mingw
  - This should still have everything compile nicely, but please,
    maintainers of other build systems should check. The only interesting
    change for them is the difference in headers.
2009-01-12 15:25:17 +00:00
1521260229 2.5
Quick fix; redraw 3d view when using header buttons
2009-01-12 09:04:53 +00:00
ae15fc5e46 [#18082] make uvcalc_follow_active_coords.py bypass the gui and accept arguments when called from another script
from Bill N (slow67)

Also made uvcalc_quad_clickproj.py and uvcalc_follow_active_coords.py add UV's if they didn't exist.
2009-01-12 04:07:06 +00:00
Nathan Letwory
99d10b7f76 2.5 / Nodes
* [Use nodes] added. For future improvements: a panel which enumerates
  materials, textures and scenes for selection and editing in the opened
  node-editor without having to set it in Buttons (or 'global' scene).
2009-01-12 01:02:52 +00:00
Nathan Letwory
6dc63e054f 2.5 / Nodes
* XKey for deleting selected nodes.
2009-01-12 00:14:37 +00:00
Nathan Letwory
85c4e8fd2a 2.5 / Nodes
* add nodes through header menu (no way to link them yet, though ;)
  Note: the adding needs to be properly operatorfied still.
2009-01-12 00:00:59 +00:00
Nathan Letwory
ab33f8f0c0 2.5
* when reading an old .blend 2.5 crashed on creating input node menu. type->name is for some reason NULL, so add simple check to prevent from happening again.
2009-01-11 23:48:53 +00:00
a1912243b6 this pretty ugly hand coded
just to prevent this slips on first 'release'
2009-01-11 22:42:21 +00:00
e278b92f5d Fixed an apparent typo, was checking for vertex paint twice. 2009-01-11 21:42:39 +00:00
87d5d0aa10 2.5
Testing commit; this puts back support for swap-exchange graphics
cards, which I had hoped to have faded out... but it appears it
still does it for intel and some atis.

This only swap-exchanges properly for areas/regions, not for
menus or the 'action zone triange'. Let's see if it works!

You enable it with starting with commandline option -E
2009-01-11 18:35:16 +00:00
fd4c399a87 2.5
Use context to get selected objects for transform
2009-01-11 18:27:41 +00:00
278d6758ea == Scripts ==
- Scripts Help Browser: Brendon Murphy requested and Kevin Morgan implemented a "run script" button.
- AC3D importer: option to store emis color from .ac file in mirror color in Blender (the exporter has the option to export mirror color as emis). Patch by Francesco Brisa.

Thanks for the contributions.
2009-01-11 16:13:00 +00:00
f4c2a9fa7c 2.5 MSVC9 projectfiles
small update: 
* added editors/space_ipo(ipo_draw.c
* added editors/object/editconstraint.c
2009-01-11 15:15:15 +00:00
7cd4e2781a RNA
* Finished DNA_lamp_types.h, DNA_world_types.h and DNA_sound_types.h.
* Renamed "parent" struct property to "nested", and also remaining "from"
  usage to "base".
* Added a NEVER_NULL subtype for pointers and use it for all properties
  that apply.
* Make sure all structs have a description, and fix any other DOC_BROKEN
  descriptions, also many other naming consistency improvements.
2009-01-10 22:57:33 +00:00
6ab86a7572 2.5
Transform operator replay support for constraints.

Code isn't nice, will have to split some properties to separate what's part of the "saved data" from operator arguments.
2009-01-10 19:45:48 +00:00
1beef956ca 2.5
Instead of many commits, here 1!

- Constraint edit code back
- Removed XXX stubs for constraints
  (make parent follow path works)
- Removed XXX stubs for armature
  (make parent deform, do center, etc works)
- Found a bad uninitialized global Scene * in code, especially
  in kernel it wreaked havoc.
- added missing include in blenkernel/brush.c
- fixed Nicholas' fix for editmode subsurf crash
  (It needed to check for editmode)
2009-01-10 19:34:23 +00:00
3c2b772a23 2.5
Transform draw callback: constraints, snapping, prop circle
2009-01-10 18:33:16 +00:00
c6ed4b0c20 2.5
Bugfix; 64 bits alignment error in vpaint. tsk to me!
2009-01-10 17:38:29 +00:00
619e5423fb 2.5
Removed another bad global "editbutvweight", a value from buttons
used to paint weights with, or to set weights. Is now part of
weightpaint struct in scene.
2009-01-10 17:20:34 +00:00
446933c73f 2.5
Added custom data pointer to custom region_draw_cb
Also removed the test with green rect.
2009-01-10 16:49:22 +00:00
f26d9b8771 2.5
rename transform mode enum to something proper
2009-01-10 16:46:29 +00:00
dd97c08006 2.5
- Weightpaint back (CTRL+TAB or menu)
  Also weightpaint is sortof non-modal, allowing to use all existing
  hotkeys while in paint mode. Only leftmouse is overridden.
- Made vpaint and wpaint entirely local, stored in scene (and saved!)
- Small bugfix (also in 2.48): on weightpaint mode, all armature objects
  in 3d window were drawing as active poses. Now only the armature 
  deformer is.

Nice point for the UI agenda: are paint modes on ACTION mouse? Only then
you can combine it with SELECT mouse...
2009-01-10 14:19:14 +00:00
a7932f7452 2.5
Popup menus were tagged with wrong direction, so arrow keys or
scrollwheel didn't work.
2009-01-10 14:03:00 +00:00
9f0afbe804 added more parent properties for grouped rna stricts 2009-01-10 03:44:02 +00:00
9f742a0ba1 Don't change point type on overdrawn when there's only one. 2009-01-09 22:13:59 +00:00
07599ab3b2 limit overdraw to at least start or end near another stroke (otherwise, all strokes that crossed others replace them entirely). 2009-01-09 20:50:13 +00:00
7e76ce5d67 missing test for start of line caused crashes. 2009-01-09 20:35:37 +00:00
f1c4b4e7c5 Last version of overdraw didn't work great with polylines. Fix this and misc wrong initial values. 2009-01-09 19:25:10 +00:00
e60be63d23 added rna property "parent" so nested RNA structs can access their parent RNA struct
This is used for generating docs so a nested RNA struct such as MaterialRaytraceTransparency are listed under Material rather then in the global struct list)
These RNA structs are used for grouping properties and don't correspond to a C structure.
2009-01-09 16:08:47 +00:00
2fe5005bbb 2.5
New: Custom region draw callbacks.

For Martin: an example is now in space_view3d/view3d_edit.c
On middlemouse rotate view, it draws a small square in center.

It works likes this:

#include "ED_space_api.h"

handle= ED_region_draw_cb_activate(region->type, drawfunc, type)

and to stop it:

ED_region_draw_cb_exit(region->type, handle)

drawfunc is of type (const bContext *C, ARegion *ar)
currently it gets called only as type REGION_DRAW_POST, later we
can add more (PRE, POST_XRAY, POST_2D, etc).

For correct usage, these calls should return leaving view transform
unaltered.
2009-01-09 15:04:52 +00:00
c7fa55eebd 2.5
Vertex Paint back!

Added WM level "paint cursor" system, which manages a custom painting
cursor for tools or modes. 

- Activate it with WM_paint_cursor_activate(). That function wants two
  callbacks, a poll(C) to check whether there's a cursor in given context
  and ARegion, and a draw(C, x, y) which gets called when appropriate.
- While paintcursor is active, the WM handles necessary redrawing events
  for all regions, also to nicely clear the cursor on region exit.
- WM_paint_cursor_activate returns a handle, which you have to use to
  end the paint cursor. This handle also means you can register as many
  custom cursors as you want.

At the moment, vertex paint mode registers only a mousemove handler,
all other events are still normally handled. This is stuff for the 
future todo.
2009-01-09 13:55:45 +00:00
a93e253103 2.5 - IPO Editor
Porting relevant drawing code over from AnimSys2. It is currently not hooked up to anything else yet, so don't expect any curves to draw for a while. I'll need this for validating that my recorded animation system will work. ;)
2009-01-09 06:25:14 +00:00
50428d3a2f Removed more bad function calls in sculpt. 2009-01-09 05:33:28 +00:00
89ac0d91ae Cleaned up some missing functions in sculpt. 2009-01-09 05:24:11 +00:00
690c60f9fc More sculpt cleanup, removed sculpt_data and sculpt_session functions,
both of which used G(lobal)
2009-01-09 00:38:48 +00:00
0572f1a5f6 * fixed an incredibly silly typo-bug in light cache 2009-01-08 22:49:03 +00:00
879aa81743 2.5 filebrowser
cleanup of space initialisation
fix for filebrowser opening with wrong parameters from window pupmenu after having been opened with F1.
2009-01-08 18:47:16 +00:00
133ddcff04 display overdrawn stroke in gray, to easily see what is being replaced. 2009-01-08 18:23:48 +00:00
38e263171e 2.5 MSVC9 projectfiles
* update of RNA project after reorganisation
* added editors/space_view3d/vpaint.c and editors/mesh/editdeforn.c to projectfiles
2009-01-08 18:20:47 +00:00
a8f8bf1dc5 2.5
Transform editbones
2009-01-08 17:12:50 +00:00
a6c0b968ba 2.5
Crash when loading certain files with armature. Use scene from context instead of local var (which can be null).
2009-01-08 16:52:30 +00:00
b5fcf3daff RNA: don't pass RNA type in RNA_id_pointer_create, can be found automatically. 2009-01-08 15:33:34 +00:00
8140c76ac6 RNA: fix crash in python code, forgot to update this part in a previous commit. 2009-01-08 15:29:09 +00:00
bebe874a5b RNA
* The generated code is now split into multiple files instead
  of a single big one. Scons, make and cmake are updated to
  deal with this.
2009-01-08 13:57:29 +00:00
b08f15aa08 2.5: make and cmake fixes for recent changes. 2009-01-08 13:54:39 +00:00
8e095b0e64 RNA - Action Wrapping
Removed flags used for Action Editor from wrapping for Action. These do not belong here!
2009-01-08 11:14:58 +00:00
b2eb7f3664 2.5
******
- Ported set/clear slow parents
	- currently there is no keymap entries

- removed some unused functions and some tidying up
2009-01-08 02:50:37 +00:00
c6b6910c16 2.5
Fix compile errors
Remove stubs that duplicate code and set armature lib priority correctly (needs to link with mesh)
2009-01-08 00:24:59 +00:00
1240b0272d adjust strokes by redrawing over them
(has to be turned on in the panel because it can give unexpected results sometimes right now)

http://vimeo.com/2753749

http://blenderartists.org/~theeth/bf/etch-a-ton/adjust.ogv
2009-01-07 21:46:10 +00:00
ff1db49e34 RNA
* DNA_userdef_types.h, done. Patch by Nathaniel Garbutt, thanks!
2009-01-07 21:05:51 +00:00
Nathan Letwory
bd456965b9 2.5
- make sure source compiles (redefinition of functions)
2009-01-07 20:40:27 +00:00
e4ce05dda7 2.5
Two more files, vpaint.c and editdeform.c
No functionality working related to this yet, tomorrow!

(Added editdeform.c in mesh after all, it's doing hardly no lattice
 stuff, and it seems out of place in anim_api)
2009-01-07 19:23:22 +00:00
7c251bffaf 2.5 MSVC9 projectfiles
updates:
- booleanops.c and booleanops_mesh in blenkernel
- screendump.c in editors/screen
- keyval.c in editors/interface
- RNA: rna_pose.c
2009-01-07 18:04:14 +00:00
1bb2b174cb Fixed subsurf crash reported by mfoxdogg, was caused by not using an
editmesh for derivedmeshes when in editmode.
2009-01-07 18:03:12 +00:00
389dc100cc 2.5
More files back in the 2.5 repo:
(Note, boolean stuff moved to blenkernel)
2009-01-07 17:25:17 +00:00
6bb75d2d19 2.5
Add notifiers to transform to insure all windows of the correct type are redrawn.
2009-01-07 16:52:18 +00:00
78e2c81153 2.5
Add missing notifiers to node select, for proper redraw with multiple node windows.
2009-01-07 16:49:11 +00:00
637ffd1dfb 2.5
More globals discovered; lattice deform stored static
deform array and a matrix. Tsk!
2009-01-07 16:05:55 +00:00
fd969911c5 Fixed cmake for pose rna 2009-01-07 15:04:13 +00:00
bf9080d9c1 2.5
Finished a couple of XXX todo's in drawing code,
attempt to fix subsurf crash... didnt work yet!
2009-01-07 14:46:50 +00:00
1ff595a28e Conflicts resolved. Hadn't used the Resolve command last time. Brilliant. 2009-01-07 13:10:31 +00:00
fc12ec2317 don't raise exceptions on some errors unless debugging 2009-01-07 11:27:17 +00:00
5ef7b1f76f 2.5
* Compiling fixes for RNA - removed duplicate RNA wrapping for posechannels, removed some irrelevant code, and fixed some errors.

* Commented out/removed some evil old stuff from pose-code
2009-01-07 09:41:32 +00:00
a811d802dd Changes/cleanup for sculptdata and brushes. Summary:
* Removed texfade, wasn't a very useful option (same result can be created with the falloff curve)
* Removed CurveMapping from sculptdata, moved instead to Brush
* Removed rake field from sculptdata, moved to Brush.flag
* Moved Anchored flag from sculpt to Brush, same for direction field
* Removed BrushData, replaced usages with the regular Brush type
* Removed hardcoded brushes and brush_type from sculptdata, replaced with a pointer to the current Brush
* Made sculpt tool type settable in Brush
* Changed symmetry and axis lock fields to flags
2009-01-07 04:38:30 +00:00
23e3fdb28b Finally committing useful rna for action types. This includes actions, action channels and action groups. I broke both pose channels and pose off into their own rna. Links also updated in Object rna for both Action and Pose stuff. 2009-01-07 04:06:52 +00:00
5296928728 confusion between Inline and externproto nodes 2009-01-07 03:34:12 +00:00
9dca31e74d 2.5 filebrowser
reverting unfinished code that accidentally was committed with last commit.
2009-01-06 23:17:30 +00:00
d0047abdbe Commented out a few more tablet functions. 2009-01-06 22:49:08 +00:00
4ef6bb5559 2.5 filebrowser
fixes for crashes that seem to have been introduced by changes in context handling.
TODO: initialization for windowtype pupmenu if a previous SpaceFile was there.
2009-01-06 22:48:58 +00:00
Nathan Letwory
cd6a9198d0 2.5 / Sculpt / SCons
* add SConscript to have it build with this buildsystem too :)
* commented out GHOST_Types.h - I guess any stuff that was used from it should be
  properly done through event system (WM).
2009-01-06 22:42:39 +00:00
ad3d552226 2.5 MSVC9 projectfiles
update: editors/sculpt files
2009-01-06 22:41:47 +00:00
a2e645bf71 Brought back sculpt code. Commented out a lot of things, so it compiles.
Does nothing more impressive than that for now.
2009-01-06 21:23:42 +00:00
3476db534d 2.5 filebrowser
fix for error in sdna building, wrongly recognized struct and alignment fix.
2009-01-06 20:20:37 +00:00
3813874ef7 Added RNA for Multires modifier. 2009-01-06 20:15:23 +00:00
b01ed287e9 Fixed a warning (missing include) 2009-01-06 19:59:17 +00:00
7ca7f8fcd9 2.5
3D view drawtype change operator

No more pressing Z a couple of times for nothing.
2009-01-06 19:58:42 +00:00
35f0149bb9 2.5
Small context bug when switching screens, Context didn't get updated
well. (solves crash in windows, on exit full screen file browser)
2009-01-06 19:49:45 +00:00
fc28d3cf75 2.5 filebrowser
further cleanup:
- moved struct FileList* back to SpaceFile
- fix for memory related errors and freeing operator in file_free
- removed wmSubWindowSet, we're not doing OpenGL select in filebrowser
- removed drawing of load button when invoked from windowtype pupmenu
2.5 MSVC projectfiles:
- slipped in removal of multires_firstlevel.c in blenkernel
2009-01-06 19:22:29 +00:00
9b3727b5e0 Fix crasher on non-reset pointer. Mostly happened panning view while drawing. 2009-01-06 19:00:22 +00:00
25e5765f47 Got rid of old multires code, brought in multires modifier from
soc-2008-nicholasbishop branch.

Note: any old code with multires_test() or multires_level1_test() can 
just be deleted, not needed by the multires modifier.
2009-01-06 18:59:03 +00:00
02003021a6 2.5
Made ED_screen api calls:
- ED_screen_full_newspace()
- ED_screen_full_prevspace()

Which now gets called by F1 operator, to move to 
full-screen-sized browser. For testing fun its default 
now. Might become user setting. Also have to check
on opening a temp window for this (and for render).
2009-01-06 18:52:18 +00:00
1c933cdb78 2.5
Cleaned area prevspace, and made exported API for it.
Also added operator-free on 'cancel' in filewindow.
2009-01-06 18:14:37 +00:00
f6f309d2d1 In the panel, next to the number of joints, display the name of the current bone while sketching joints. Displays "Bone offset" when the next bone is not connected. Displays "Done" when all joints have been draw (note: you can draw more joints then needed, the retargetting algo will use the most useful ones).
Convert gesture is back. This time, it's a 3 straight line that cross itself once gesture (like drawing a triangle and recrossing the first line).
2009-01-06 18:10:13 +00:00
e99d12508e 2.5
File window: load now happens with proper free of operator.
still a bit of mystery how main handler loop survives after
a file load... will investigate once. :)
2009-01-06 17:38:44 +00:00
650c63ec22 2.5 filebrowser
- some more cleanup, use UI_text functions for text output rather than BMF_ directly
- removed some debug prints and some unused variables
2009-01-06 16:47:01 +00:00
12f099bd91 2.5
FileWindow: fixes for Make and Scons, and removed
(commented) unused vars, and adding include files.
2009-01-06 16:15:43 +00:00
7e7fff7f63 2.5
fix wrong parameter list, I should have read those warnings a bit better!
2009-01-06 15:58:37 +00:00
b1cb844e05 2.5 - Start of filebrowser.
- basic drawing of list and thumbnail view (switchable through 'favourits' icon in header)
- selection of files and directories (bookmarks) works with the RMB (right mouse button)
- load operator for files still unstable (no check for correct file type) and incomplete. (WM_operator_free missing)
immediate TODOS:
- fix load file operator
- finish drawing of buttons in header
- drawing of detailed list with all file info.
- finish selection and execute operators (LMB and MMB execute)
later todos:
- parent dir
- keymap for all the shortcuts
- append/link and databrowse
- ...
2009-01-06 14:42:54 +00:00
10e6566aeb 2.5
Bugfix: some old dangling globals still crash lattice.
Editmode lattice has to be coded still, but now Mancandy
loads again :)
2009-01-06 12:30:44 +00:00
70c5417ed6 Added support for EXTERNPROTO's and fixed a bug where relative Inline URL's that included a path didn't load 2009-01-06 12:30:28 +00:00
fbd3eb99f2 2.5
small cleanup of header include guards.
2009-01-06 10:31:25 +00:00
745d895a85 2.5
Bugfix: the area level Refresh callback was not getting Context set,
it was NULLed still. This fix allows bone selecting and seeing updates 
in the action editor. Not other way around though, will investigate.
2009-01-06 10:30:34 +00:00
e01b5a0252 2.5
Bugfix: WM gesture manager was not assigning gesture to the 
context-defined region, making border select calls from a
header not work.
This fixes Node header option "Border select".
2009-01-06 10:09:39 +00:00
aa95fc1768 2.5 MSVC9 projectfiles
updates:
* stubs.c was moved from editors/screen to python
* RNA: rna_action.c
* Armature: all in editors/armature added.
2009-01-06 09:08:43 +00:00
823aa30cba string extraction wasnt working + minor changes 2009-01-06 08:58:45 +00:00
701091322a 2.5
Transform Numeric Input: Inverse

Press "/" to toggle inverse value (1/N).
Makes it easy to scale down by specific values (you can just type S / 7 to scale down by 7, for example).
This doesn't give full fraction input (X/Y).

Suggestion from a talk with Gwenouille on ba.org
2009-01-06 02:27:07 +00:00
21b80568b6 Changed "opacity" property for brushes to "strength", since brushes will
be used for sculpt as well as painting (and particle edit too?)
2009-01-06 01:37:12 +00:00
0d9feca157 Added RNA for color ramps, as well as color-ramp properties for material
and color.
2009-01-06 00:56:20 +00:00
c16c6c0536 2.5
******
small commit, ported cameratoview3d, please check i have the correct naming and notifier
2009-01-06 00:19:47 +00:00
be67aac493 since material ray/mirror/halo properties are now in their own RNA structs remove their prefix.
material.raytrace_transparency.ray_transparency_depth -> material.raytrace_transparency.depth

Also renamed...
ray_mirror to reflect,
mode_ray_mirror, mode_ray_transparency, mode_halo to "enabled" matching the SSS struct.
2009-01-05 23:53:37 +00:00
Nathan Letwory
8a8585cda9 2.5 / Nodes / Border select
* bring border select (BKey), works in editor, but draws
  badly only in header when initiated from menu, so that's
  commented out for now.
2009-01-05 23:53:04 +00:00
9986642d27 2.5 scons fix
Priority for armature module was too low, and causing errors when linking with gcc
2009-01-05 23:08:59 +00:00
964b928cd6 More RNA properties for Material, including specularity and strand
settings. The DNA for Material is a real mess, should really be cleaned 
up.
2009-01-05 23:06:22 +00:00
833cc9c0c8 2.5
- Armature editmode back
- Armature pose and editmode selecting with mouse back
- Posemode only works with 3d window header now.
2009-01-05 19:32:04 +00:00
3aae2de773 2.5
Cleanup:
- Makefile was using confused link order, now all intern and
  and extern libs are put after blender and editor libs
- Old stubs.c in editors/screen removed. The leftover python 
  stubs calls were moved to python module.
2009-01-05 17:20:40 +00:00
42a006629f added rna_action.c to cmake 2009-01-05 17:09:30 +00:00
Nathan Letwory
6dedaf2dc2 2.5
Fix linking for msvc.
2009-01-05 16:54:28 +00:00
c74ffeb700 File structure and stubby for wrapping action dna types. 2009-01-05 16:31:00 +00:00
c6d5604c82 2.5
More linking issues with armature commit, but we'll get there :)
2009-01-05 16:15:23 +00:00
73f852b3ac 2.5
Linking errors in other compilers; if-nulled the reeb stuff now.
2009-01-05 16:02:31 +00:00
41ee139c16 Yeah, and then the game engine too! 2009-01-05 15:48:24 +00:00
aba83e417f 2.5
Typo in stub for meshlapacian.c
2009-01-05 15:35:49 +00:00
1fe21f7e8f 2.5
Put back Armature/Pose code, including 'heat weight'.
I've added reeb.h to get things compile, but Martin will
cleanup files and put back?

Now where to put all vertexgroup code.... I guess mesh?

Note for msvc: yep, another new dir to add! :)
2009-01-05 15:19:31 +00:00
49b5edddd4 left testing lines uncommitted by mistake 2009-01-05 10:54:26 +00:00
df20a12728 2.5 - Animation Fixes + More Porting work in Action Editor
* Added crash fixes for loading old files with Actions/Armatures in them. Was caused by usage of some old globals still and the functions in question not performing NULL checks on the validity of the data they're given.

* Added back reorganise action channels tools (shift/ctrl-shif pageup/down) for Action Editor. These are only available in 'Action Mode' only.

* Tidied up Action Editor/Dopesheet tools code - removed various unused things, and also, added an API call in anim_deps.c to send the correct notifiers, since I anticipate that they're likely to require a few context checks which would be better to centralise than copy+paste everywhere.

Note to Ton: could you have a look at this notifier stuff here? I'm not sure which ones I should be sending...


* Also added a few assorted comments in various places
2009-01-05 09:54:39 +00:00
7de52578c0 * Added notifiers for camera rna
* Some tweaks to rna property descriptions
2009-01-05 05:42:48 +00:00
c5908d38ca Added RNA for Subsurface Scattering in Material. 2009-01-05 05:09:20 +00:00
039fadf669 Added RNA properties for Mist and Stars in World 2009-01-05 04:10:59 +00:00
55f450379e Added RNA for ambient occlusion 2009-01-05 03:44:19 +00:00
ee7a52b7fe added static python option for mingw 2009-01-05 03:26:18 +00:00
91be2ba9b5 2.5 - Various Cleanups/Fixes
* Animation channels - cleaned up the code for selecting channels (removed various TODO stuff that's going to be replaced by something better later). Also, added back the ctrl-shift select feature for groups, which should be extended for other channels too at some stage.
* Outliner - added missing flags to do-versions, and replaced the width calculations with the rna-width version for now, as that uses constant width of 100 with OL_X*indention
2009-01-05 00:38:17 +00:00
33dd818310 2.5 MSVC9 projectfiles
updates:
* RNA: several files (rna_cloth, rna_object_force.c, rna_particle.c, rna_scriptlink.c, rna_text.c, rna_texture.c, rna_userdef.c)
* complete removal of verse and cleanup of WITH_VERSE from projectfiles
* deleted projectfiles for BL_src - not needed anymore.
* editors/mesh: mesh_intern.h was renamed from editmesh.h, new file mesh_ops.c
* editors/util: editmode_undo.c, undo.c and util_intern.h added
* editors/animation: anim_channels.c  added
* editors/space_action: action_edit.c  added
2009-01-04 19:39:35 +00:00
6ec52fc1b5 RNA
* DNA_cloth_types.h, patch by Roelf de Kock. The gravity[3] member
  is not being parsed correct by makesdna.c and will give issues
  even when trying to fix it. Worked around it for now in RNA by
  wrapping it manually, but this should really be fixed in the DNA
  genetics code, added a comment about it in DNA_cloth_types.h.

* Handle vertex groups and uv layers more consistent now. They are
  all exposed as strings now. Reason is that indices don't really
  say much, and a direct pointer is not always possible because for
  example a uv layer in a material can be used for multiple objects
  and so there is no single pointer. In python it is not too hard
  to use either since the strings works as a key for lookups.

  For the user interface we can later think of some method to
  generate popup menus in a way that works for vertex groups,
  uv layers, bones etc.

* This also fixes the XXX's in rna_modifier.c, I think that can be
  marked done.
2009-01-04 19:25:24 +00:00
df6caaed1e 2.5
Small cleanup in region-based cursor handling. 
- callback was in spacetype, now in regiontype
- made screen listener catch ND_MODE notifier and 
  call the active region cursor callback, if it's there.
2009-01-04 19:17:34 +00:00
Nathan Letwory
49631b6e40 2.5
- fix warnings for append_qt (missing param)
2009-01-04 19:16:13 +00:00
3009e10151 2.5
Missing call to free mesh octree in post transform function.
Was breaking x-mirror
2009-01-04 19:11:56 +00:00
d19e758964 2.5
Fix compile error with AVI support
2009-01-04 19:10:57 +00:00
Nathan Letwory
7cd56835a3 2.5 / global cleanup fix
- RenderData was missing from append_movie/avi
2009-01-04 18:26:43 +00:00
Nathan Letwory
9e7643aa7c 2.5 / Cleanup
- remove Verse support. This will be brought back in The Future (probably jiri + me)
  This means 5k lines less in blenkernel.
- fix two small errors for global cleanup, now compiles properly with FFMPEG enabled too.
2009-01-04 18:16:34 +00:00
3aeb63cad2 2.5
WM: added area-listener, which can be used to tag refreshes for
either the drawing call, or use the new ED_area_tag_refresh() 
function which will automatically call, after all notifiers
were handled, an the spacetype->refresh() you provided.

Added for Joshua, after reviewing Action/Dopesheet requirements.

Joshua: I've made two dummy functions in space_action.c:
- action_listener()
- action_refresh()

Wich now does a printf on activating a new object.
2009-01-04 17:45:54 +00:00
f7cb86df3a 2.5
Think global, act local!

The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.

Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
  meant for permanent, but it can probably stick there until we
  cleaned the anim system and depsgraph to cope better with
  timing issues.
- Game engine G.scene should become an argument for staring it.
  Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
  is too tightly wrapped to do it easily.
2009-01-04 14:14:06 +00:00
e64b8599e1 C files reference "libredcode/format.h", which only exist in extern/libredcodec/format.h, so for now adding "extern/" as an include when redcode is enabled lets it compile,
noticed there are some win32 ifdef's that don't do anything.

should be fixed properly but this at least compiles for now.
2009-01-04 07:56:51 +00:00
74f9e98c82 * Enabled disabled drawing for 'locked' buttons
(made with uiBlockSetButLock())
2009-01-04 07:50:41 +00:00
0feedfe591 2.5 - Outliner/RNA Viewer View2d Fixes (Part 1)
Cleaned up the View2D setup stuff here, by removing all the hacky manual setting of tot and cur rects. Now the Outliner and RNA are scrollable again.

However, in the process, I uncovered a few rather nasty bugs that must've been around for ages. 
1) The width-calculation code depends on te->xend for calculating the max-extents, but that is not set until drawing of channels commences. This is far too late, as it is needed for the setting of the 'tot' rect's extents, so that we can have horizontal scrolling, and an accurate horizontal scroller! I noticed that RNA version of this currently hacks around this by using constant width of 100, but that's not a great final solution.

2) There's some minor pixel offset twitching going on with the restriction columns when the view is resized. Also, for RNA, the buttons sometimes cause a few drawing artifacts. Will check on this in part 2.
2009-01-04 04:21:32 +00:00
125057c430 no idea how this happened :S 2009-01-04 02:39:22 +00:00
f2b1c96d02 2.5
*******
- Ported show/hide objects as the clear/set restrictview operators (request of kaito)
	- clear is not using a context loop as there is none currently available
	- set uses a popup menu for hide select and hide unselected

 hotkeys are H and Alt-H (set, clear)

- ported the undo calles, to use ED_undo_push where available
2009-01-04 02:34:34 +00:00
475a64fc91 * Added support for displaying disabled RNA buttons
The functionality already existed via the RNA system, this
commit makes disabled buttons draw greyed out, and not respond to clicks
(previously, they would drag/edit/etc but then reset to the previous value)
2009-01-04 02:09:41 +00:00
Nathan Letwory
610a56843e 2.5 / Nodes / Transformations
- after talking with Martin P (theeth), I have now shuffled code around
  so that there is no more exception code for nodes in the wrong places.
  This means node editor now also use entirely common translation.
  As proof of concept, there is now also resize and rotate support. It already
  works, but there need to be a bit more thought in how those
  actions are initialised for node editor. Probably some way to tell
  what to use as pivot point, etc.
2009-01-04 01:08:01 +00:00
3817b1f018 Some tweaks to menu drawing 2009-01-04 00:05:40 +00:00
4a8fdd8064 Fixed a couple of properties in Modifiers. 2009-01-03 23:14:33 +00:00
ecc5f17e4d 2.5
Transform operator replay

Basic support working. Only saves mode and values, not constraint setup.

Removed event pointer from TransInfo (it's not available in operator exec). Replaced checks to event->modifiers to a functional modifier bitfield in TransInfo (that is, instead of checking for Shift, it checks for MOD_PRECISION) to make it remappable later.

Misc:
	X-Mirror for mesh now working with transform
2009-01-03 22:15:59 +00:00
166d957c5a Added more RNA MTex properties 2009-01-03 21:10:48 +00:00
31cdeab07e Added some sub-structs to Material RNA for halo and ray transp/mirror
settings. Material RNA shows much cleaner in the RNA viewer now.
2009-01-03 20:20:09 +00:00
3f58b37683 2.5: fix "repeat last", and display of operator properties
in rna outliner.
2009-01-03 20:03:39 +00:00
927adad8e2 Added RNA for MTex, also property for mtex array in Material RNA. 2009-01-03 19:39:39 +00:00
Nathan Letwory
666f82a0a9 2.5
- Make sure shader, composit and texture ntrees have an id.name. This is to ensure
  that node trees in Material, Scene and Texture are properly identified through RNA
2009-01-03 18:43:11 +00:00
3c1a588396 2.5
Snapping for editmesh remove a silly bug and make it work with PET. In that case, you can only snap to other object, not to the edit mesh.
2009-01-03 17:21:32 +00:00
92ab0c0369 [#18142] Blender FBX export outputs broken vertex colors when using vertex paint
from Kevin Hsu (caywen) 
use fix suggested in report
2009-01-03 14:02:14 +00:00
23ba8345c1 missed this one last time 2009-01-03 12:39:36 +00:00
7d5847defb 2.5
* Start of Action/Pose syncing code (in anim_deps.c) This is currently not hooked up yet, as we still need to figure out where these should get called (due to a few dependencies they have - i.e. visibility syncing of channels is turned on/off by setting in appropriate views).

* Also added assorted comments/changes to rna/dna
2009-01-03 11:35:39 +00:00
38fcc20580 2.5 - Silenced various compiler warnings 2009-01-03 10:03:26 +00:00
10cce9cec6 Started RNA for MTex 2009-01-03 08:08:44 +00:00
2a7fbc2e27 * Added notifier updates for RNA modifier data 2009-01-03 07:25:22 +00:00
1439a5dc32 Renamed RNA EnvironmentalMap to EnvironmentMap 2009-01-03 07:20:11 +00:00
f873a0a132 * Added icons for RNA modifier data to datablocks outliner view 2009-01-03 06:34:40 +00:00
4b320c26a3 2.5 - Action Editor: IPO Curve Protect works now
* Added the relevant filtering necessary for this to work, into the animation-channel filtering code. 
* Updated most of the keyframe-editing tools to respect this
* Renamed keyframe-editing API loopers (added ANIM_ prefix) for consistency
* Added function for mapping keyframes to/from NLA-mapping for Ipo-Curves in addition to the one for IPO blocks. As a result, renamed the latter for consistency.
2009-01-03 06:01:11 +00:00
61f7ba6fa2 * Added some notifications to object/lamp/material RNA properties
For now, I've made a distinction between (eg.) ND_LIGHTING and ND_LIGHTING_DRAW,
with the 'draw' variety being properties that get displayed in the 3D View

* Also did some cleaning in lamp RNA, moved sun/sky settings to its own struct
2009-01-03 05:41:58 +00:00
9f7b9f3355 Added RNA for EnvMaps. Also some more properties for Textures. 2009-01-03 05:18:11 +00:00
2163a16496 Exiting editmode crashed on this old multires line. 2009-01-03 02:22:51 +00:00
acc2c24e79 Changed a couple pointer properties to the texture type. 2009-01-03 02:11:27 +00:00
fcad4f4112 Added a bunch of RNA properties for textures. 2009-01-03 01:55:37 +00:00
de32cba536 After more careful reading of RNA docs, added underscores to enum identifiers. 2009-01-03 01:37:57 +00:00
Nathan Letwory
bdf6a002aa 2.5 / Nodes
* add Context accessor for selected nodes
* node translation uses transform code
* put transform defines in an enum (mode and numinput flags)
2009-01-02 23:58:03 +00:00
25aaa7b92e Made the basic RNA changes for Tex(ture), no properties wrapped yet. 2009-01-02 23:05:28 +00:00
9ce30005de BGE bug #18070 fixed: 2dFilter actuator is always pulsed. 2009-01-02 22:15:05 +00:00
10702bf93f BGE API cleanup: more bricks converted to attributes. 2009-01-02 22:09:57 +00:00
012b33d30d Added RNA for Shrinkwrap, Mask, and SimpleDeform modifiers. That's all the modifiers for now. 2009-01-02 19:22:43 +00:00
a6721c60d9 2.5
From the anti-globalization department: 
G.obedit terminated!

Wherever possible, use CTX_data_edit_object(C) to get this
now. It's stored in scene now, and the screen context has
it defined.
2009-01-02 19:10:35 +00:00
cc569504d0 BGE API Cleanup: update the python attribute definition framework.
* Value clamping to min/max is now supported as an option for integer, float 
  and string attribute (for string clamping=trim to max length)
* Post check function now take PyAttributeDef parameter so that more 
  generic function can be written.
* Definition of SCA_ILogicBrick::CheckProperty() function to check that
  a string attribute contains a valid property name of the parent game object.
* Definition of enum attribute vi KX_PYATTRIBUTE_ENUM... macros. 
  Enum are handled just like integer but to be totally paranoid, the sizeof()
  of the enum member is check at run time to match integer size.
* More bricks updated to use the framework.
2009-01-02 17:43:56 +00:00
16ca4b572e RNA
* DNA_object_types.h done.
* Scriptlink skeleton added.
* Fix cmake compile.
2009-01-02 16:58:09 +00:00
6b73bc9b06 RNA
* Finished last Lattice properties, is done now.
* Some tweaks to Mesh structs naming.
2009-01-02 14:48:03 +00:00
70fe666456 2.5
- Lasso select back (CTRL+LMB), object centers only, 
  and for editmesh. See template in wm_operators.c

- Circle select for editmode back. Currently it still
  uses Ckey, and is only a temporary mode, not persistant.
  Persistant circle select can be added later with 
  tweak gesture keymap? We'll see. :) The old circle
  select was actually annoying that it was so sticky.
2009-01-02 14:11:18 +00:00
a371f5513a RNA
* Added skeleton code for particle/object_force/userdef.
* More Object properties wrapped.
* Added User Preferences display in outliner.
2009-01-02 13:47:33 +00:00
326b3122cf 2.5 - Action Editor: Toggle settings
* Added back enable (Ctrl-Shift-W), disable (Alt-W), and toggle (Shift-W) operators to channels view. They are separate operators which use the same backend code.

* Fixed icon-drawing for IPO-curve 'protect' buttons. After doing this, I've realised that many tools will need some alterations to take this into account. That commit will come later.
2009-01-02 11:06:27 +00:00
ad4e1df46b 2.5
Bugfix in OSX ghost!
The GHOST_TWindowState was set to 'invisble' always... which is a
state now handled correctly in Blender. It caused the window to not 
refresh when resizing.
2009-01-02 10:58:30 +00:00
a167816d8b Added RNA for the ParticleInstance, Explode, and Bevel modifiers. 2009-01-02 10:19:58 +00:00
7eefa2a7b9 2.5
*******
small commit, after some help from ton i have fixed the clear transformation modifiers, they now redraw correctly, they was missing a depsgraph tag, also did a little tidying up
2009-01-02 09:57:05 +00:00
52214a5e88 * renamed some of the RNA sound identifiers
* was missing a MEM_freeN in previous commit
2009-01-02 09:35:33 +00:00
e150f5ba8e Added RNA for the MeshDeform, Cast, and Smooth Modifiers. Also some changes to pointer types in other places. 2009-01-02 08:03:20 +00:00
5d23eaa8f4 python support for reporting with operators.
* errors in python called operators are raised as errors
* Python defined operators errors are reported as errors (not full traceback yet)
* added BKE_reports_string, same as BKE_reports_print but it returns a string rather then printing it.
* WM_operator_name_call optionally takes an initialized report struct
2009-01-02 07:54:38 +00:00
cf43c6b0a1 Added RNA for the UVProject modifier.
Had a couple problems with this one; the uv layer and the projectors. The projectors in particular is confusing; I figured this would be one of the cases handled by RNA automagically, but maybe I need to define custom functions for it? Anyway, marked the code with XXX.
2009-01-02 07:29:35 +00:00
95753c04f5 2.5 - Silencing more MSVC warnings 2009-01-02 06:03:53 +00:00
9832821750 Added RNA for the Displace modifier. Once again, not sure how to handle uvlayer. 2009-01-02 05:20:44 +00:00
332e4718f5 Added RNA for the Array modifier. 2009-01-02 04:45:13 +00:00
8925b024cb Made CMake build a little faster by not rebuilding the DNA and RNA stuff when building creator. 2009-01-02 03:42:16 +00:00
88e00344fc Added RNA for the Boolean and EdgeSplit modifiers. 2009-01-02 03:38:15 +00:00
af2304f3cb 2.5
********
- added clear location/rotation/scale/origin
	- each action is a seperate operator
	- Drawing is delayed as the tag_region_redraw does not seem to have an effect perhaps a transformation notifier is needed
	- for the view to update just do some transformation, like press G

 - changed the shortcut key for area rip to alt-ctrl-r so it dosn't conflict with clear rotation
2009-01-02 03:16:38 +00:00
ada3868efd Added RNA for Hook modifier. 2009-01-02 02:37:54 +00:00
d812fc0bd0 Fixed up the range and UI ranges for the modifiers I've done. 2009-01-02 02:25:29 +00:00
96d80b28b2 2.5 Animation Channels - Borderselect Tool
Added BorderSelect operator for animation channels.
2009-01-02 01:28:05 +00:00
f4a4279611 Added RNA for Armature modifier 2009-01-02 01:28:02 +00:00
e6838f621d 2.5 - Animation and View2D
* Added back deselect all (and invert all) tools for Animation Channels (i.e. channel list in Action Editor).

* Resolved all MSVC warnings (I came across) in View2d code. Also, added a new API method to get the coordinates (in 'view' space) of a listview 'cell' given the row + column the cell is in.

* Tidied up a few comments here and there
2009-01-02 00:56:48 +00:00
c32fbee896 Added RNA for Wave modifier.
Note: I didn't set up the property for uvlayer_tmp (used when the wave is modulated using UV texture coordinates.) Wasn't sure how to do this properly.
2009-01-02 00:53:49 +00:00
8d82334b57 Added RNA for decimate modifier. 2009-01-01 23:47:32 +00:00
990ac1477d Added RNA for Curve modifier. 2009-01-01 23:32:49 +00:00
b01c390d23 Added RNA for Mirror modifier. 2009-01-01 22:43:58 +00:00
99dd981329 Added RNA for the Build modifier. 2009-01-01 21:49:04 +00:00
14776f4873 Added RNA for the Subsurf and Lattice modifiers. 2009-01-01 21:16:16 +00:00
112385660a RNA
* Object has some more properties wrapped, mostly game related.
* Scene frame changes now send a notifier.
* Added functions to create/free operator properties for calling
  operators. This also simplifies some duplicated code that did
  this. Ideally though this kind of thing should use the properties
  pointer provided by buttons and keymap items. Example code:

PointerRNA ptr;

WM_operator_properties_create(&ptr, "SOME_OT_name");
RNA_int_set(&ptr, "value", 42);
WM_operator_name_call(C, "SOME_OT_name", WM_OP_EXEC_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
2009-01-01 20:44:40 +00:00
Nathan Letwory
ddabed9c96 2.5 / Nodes - menu header items aligned 2009-01-01 20:31:13 +00:00
a0c6a4c712 Added Sound Listener rna. 2009-01-01 20:22:17 +00:00
Nathan Letwory
0f666dc53e 2.5 / Nodes
* zoom in/out added also as menu entry
* view all operator is now only executed, not invoked.
2009-01-01 20:08:57 +00:00
c2b222d7bb Added bSample rna, and tweaked a couple of things in Sound rna. 2009-01-01 19:34:41 +00:00
1ae7f038cd 2.5
Removed AUX buffer for OSX, was taking too much OGL memory, 
and since AUX was not used for other platforms, its benefits
faded away in the course of the time (it was just drawing
always).
2009-01-01 19:19:50 +00:00
81243af057 2.5
- View3D backbuffer select is back ("occlusion select").
  It doesn't use the old 'afterqueue' yet, which ensured backbuffers
  to draw immediate after swapbuffers. Will with that.
2009-01-01 19:18:03 +00:00
Nathan Letwory
d130a1ec28 2.5 / Nodes
* invoke View all through header menu :)
2009-01-01 19:03:40 +00:00
e2e282989e 2.5
- Put back vertex/edge/face select 
- Mode menu allows going in/out editmode

- Tested some tweak event stuff in WM, made tweak event follow
  user preset for 'action' or 'select' mouse.
  (Wanted to try this for transform, but better get advise from
  Martin first :)
2009-01-01 18:05:12 +00:00
Nathan Letwory
029b0c3ecf 2.5 / Nodes
* HOMEKEY enabled (view all), made into operator.
2009-01-01 16:27:02 +00:00
abd4934d1a fix for a memory leak in NMesh (deprecated api) while looking at bug report...
[#18139] Memory Leaks while using Py_BuildValue
2009-01-01 16:18:54 +00:00
fc7944f436 RNA
* Added support for sending notifiers and updates when setting
  RNA properties. Per property, there is a notifier NC_/ND_ flag,
  and a function that is called. Currently only used for
  Object.loc/rot/size.
* RNA_property_update that does this is not automatically called
  in every _set function, it has do be done separate, and is being
  done by buttons with RNA data.
* Perhaps for python there could be a trick to accumulate these
  flags rather than update each time, though for now the python
  RNA code could just do them everytime. Did not add these calls
  in the python code yet because it needs context, not sure where
  to get that from?
2009-01-01 15:52:51 +00:00
a1961436f5 2.5
- Made scrollwheel behave uniform for zooming. It uses the UserDef
  to map what's in our out. Use keymap entries WHEELINMOUSE and
  WHEELOUTMOUSE to trigger this. Also removed the feature to store
  in event->val the direction, it was conflicting with KM_ANY.

- Added more default poll callbacks, use for generic ops things
  like ED_operator_object_active.
2009-01-01 14:57:04 +00:00
e9a3b4f85d 2.5
- Edit mode Mesh undo/redo back
  (undo for editmodes needed recode, todo for curve/lattice/etc)
- Added border select for edit mesh
- Added Akey (de)select all for edit mesh
- Added notifiers for mode changes.

This is also the first trial to dynamically add/remove
keymap handlers, based on modes. For that reason the Object
keymap was split in 2, modal and non-modal. On TABkey, the
view3d listener removes and adds maps.

The view3d keymap still handles generic mouse/border selection.
Internally it will verify modes.

The modes are not  re-implemented still... have to move this
to scene context.
2009-01-01 13:15:35 +00:00
a1c4d1c735 2.5 - Assorted bugfixes
* Dopesheet - clicking on keyframes in Object channels (if they came from Object-Data such as Lamps, etc.) would crash. I noticed this error in AnimSys2 yesterday

* Action Editor - do versions code now totally reinitialises the Action Editor View2D data (for the timespace), since I found a few files where there appeared to be some weird settings set.

* RNA Browser (Outliner->Datablocks) would crash when the Area was ripped (using Alt-R hotkey) as seen in mfoxdogg's 2.5 Tour 2
2009-01-01 08:08:55 +00:00
c0621a1b7e 2.5 - Action Editor
* Fixed 'mute' icons for IPO-Curve channels. Added define for icon-button widths instead of magic numbers there too.

* Restored View All (HomeKey) and Auto-Set Preview Range (Ctrl-Alt-P). These tools both use the max extents of the keyframes to determine their (time)range.
2009-01-01 01:47:36 +00:00
c2de1373d1 2.5:
First commit for 2009!

Started of porting of Animation Editor Channels stuff.
This code will be used for both the Action and IPO editors, so any existing code involving this has now been moved to the Animation module.

* Added mouse-click operator for this channels view. Note: the selection stuff currently uses temporary toggling code only (i.e. it only toggles the selection of the channels in the editor, but does not update status of rest of database).
* Fixed bugs in View2D listview functions. Reduced the amount of code needed, and makes the code here simpler.
* Renamed action_edit_keyframes.c to action_edit.c, since channels are not handled there anymore.
* Dopesheet now refreshes correctly when object selection elsewhere changes.
2009-01-01 00:18:23 +00:00
ea42e70cb9 2.5
- Transform for editmesh (including PET and editmesh snap) X-Mirror doesn't seem to work, but the option isn't accessible in the UI, so...

- Replacing G.obedit with obedit from context in view3d_header (other files will have to be done too, I just happened to stumble on that one while fixing other things).
2008-12-31 22:43:29 +00:00
2dfd34994f BGE API cleanup: introduction of a generic framework to link Python attributes to logic brick class member. See KX_PYATTRIBUTE macros in PyObjectPlus.h. 2008-12-31 20:35:20 +00:00
471fc09479 2.5
My last one for 2008: global undo/redo back :)
Happy 2009 all!
2008-12-31 18:52:15 +00:00
0f93d129f4 Added new RNA file to cmake. 2008-12-31 18:30:52 +00:00
da893e08c1 2.5
Previous commit crashed transform in object mode.
2008-12-31 18:18:38 +00:00
0371e6cb21 2.5
Added extend-select for edit mesh.

Note for operator design; you cannot give operators hardcoded 
properties like "SHIFT" or "ALT", that conflicts with the idea
of keymaps. Instead the properties have to be functional, like
setting 'extend' on or off.

I also think mouse select could get these operators:

- activate/select, option 'extend'
- activate/select on object center, option 'extend'
- activate/select, with menu, option 'extend'

and of course loop-select, group-select, and so on.

BTW: border-select could also get 'extend' option :)
2008-12-31 17:50:00 +00:00
b54d8f3c57 2.5: forgot to add this file in last commit. 2008-12-31 17:12:17 +00:00
c9b60a7b64 2.5
So, editmode mesh is back! :)
At the moment only TABkey works and mouse select, 1 vertex at a
time. More will follow of course.

Note for the devs:
- G.editMesh has been removed, be careful with old code.
- EditMesh now is property of Mesh itself
  Although it means unlimited editmodes, for migration purposes we
  better stick to 1 "obedit" per scene, which is in Context too
- G.obedit will get removed soon, so use CTX_data_edit_object(C)
  Or if you can't, just scene->obedit for now
- Also removed the CTX_data_edit_mesh(), this has no meaning 
  anymore. EditMesh is not context senstitive anymore, only the
  edit-object for time being is.
- Martin: I've already tucked some EditMesh pointer in T and
  removed all G.editMesh there.
2008-12-31 17:11:42 +00:00
b65a3e9337 RNA
* DNA_text_types.h done, patch by Roelf de Kock.
* Minor naming fixes in RNA-RNA.
2008-12-31 15:02:40 +00:00
ba91587183 RNA
* Store RNA collections different in ID properties, using a generic
  ID property array, using the patch provided by Joe.
* Fix bug accessing registered operator properties in the wm from the
  outliner.
* In the outliner, only use the RNA icon for RNA data, and use dot
  again for unknown icon.
* Also, show pointer properties data in the second column, and auto
  expand two levels when opening them.
* Added small RNA_struct_defined_properties function to get only the
  defined properties without builtin and undefined id properties
  (for py operators).
2008-12-31 13:16:37 +00:00
28d0bab8ed View2D:
Added methods for easier checking of visiblity/position of items arranged in some regular table format (i.e. columns and/or rows).

Last commit from me for 2008!
2008-12-31 10:44:00 +00:00
58c5fd7066 Added WITH_PYTHON as a cmake option 2008-12-31 05:20:35 +00:00
834fda50d9 Volume rendering
* Fixed an old problem where if both the camera and a solid surface were 
inside a volume, the volume wouldn't attenuate in front of the surface (was 
visible in the blender conference art festival clouds animation:

http://mke3.net/blender/devel/rendering/volumetrics/vol_shade_cam_inside.mov

* Initial support for refracting solids inside volumes. I might be able to 
make this work better, but not sure at the moment. It's a bit dodgy, 
limited by the code that does the recursive ray shading - it's really not 
set up for this kind of thing and could use a refactor very much.
2008-12-31 05:08:04 +00:00
d1e836f75c Finally got CMake compilation to work.
Made sdna and srna work more like how the scons build system is doing it, with separate bf_rna and bf_dna libs being built.
2008-12-31 04:47:01 +00:00
c556bbd67d Added some more directory includes for CMake. 2008-12-31 04:37:01 +00:00
de52934331 * Added different icon types to the outliner 'datablocks' view
Brecht, please let me know if I haven't done the right thing with the RNA stuff - I thought it was easier to ask for forgiveness than approval in this case :)

* Added a cute 'RNA' icon
2008-12-31 03:05:08 +00:00
eee013d9b9 use higher precession pi 2008-12-31 02:13:38 +00:00
c6f15859ae Added some missing directory includes for CMake. Still some linker errors to resolve. 2008-12-31 00:53:01 +00:00
22f05adc3a RNA
* The RNA viewer is now more integrated with the outliner, as
  a "Datablocks" view, with a tree structure.
* Still some issues to be solved with persistence, and also
  memory usage is problematic when expanding a million vertices
  in a mesh for example, though it will not build closed parts
  of the tree.
2008-12-30 21:28:27 +00:00
445208d9d1 2.5: tweak scons linking priority for editmesh. 2008-12-30 21:25:56 +00:00
47796b75ff 2.5
Undo editmode and global undo code back. 
It's now called ED_undo_push() btw, but don't worry, for operators
this is going to be a simple operator flag, so you can remove the
old calls from all tools (but keep them when you directly change
data outide modifiers).

Will put undo back functional tomorrow
2008-12-30 19:01:12 +00:00
cbceb6c8b2 BGE API cleanup: more consistent type check on set attribute (mouse and keyboard so far). Check type after name so that the user get a type error when assigning a wrong type to a built-in attribute. 2008-12-30 16:44:34 +00:00
14d1538941 2.5 MSVC9 projectfiles
updates:
* editors/mesh: added all files
* editors/transform: transform_input.c
* RNA: rna_fluidsim.c
2008-12-30 16:04:27 +00:00
1402534ebc 2.5
EditMesh: further cleanup, made derivedmesh itterator functions
work by gathering all related data in local ViewContext struct.
(scene, editmesh, region, view3d, obedit).
Also removed bad inclusion of view3d_intern.h in mesh module.
2008-12-30 16:03:29 +00:00
Nathan Letwory
3fd28ca440 2.5
* remove a stray ;
  - it would be an empty statement, which is a proper statement, but not so nice when doing still declarations :) MSVC will complain.
2008-12-30 13:46:20 +00:00
25fac7b001 2.5
Editmesh code cleaned and compiling/linking. A whopping
20k lines back! :)
Not that it does stuff... editmode in/out has to be done,
and loads of operators. Also linking/exporting editmesh
calls has to be reviewed.

Also: added a blender_test_break() mechanism in BKE.
2008-12-30 13:16:14 +00:00
446492c266 2.5
******
- ported Make track , and Clear track (ctrl-t, Alt-t)
	- make track is a direct port does not use context data loops
	- make Track crashes as Constraints have not been ported yet

- added select_extend to mouse select so now you can use shift again
	- Still does not use Context data loops as this get all messed up, kaito can you look into it 
	- currently only works with 1 modifier key at a time so ctrl+alt does not work, until i can figure out how best to achieve this
2008-12-30 10:37:52 +00:00
15518e20c0 2.5 - Action Editor stuff
* Added old theme-set version patch for new Dopesheet channel colours
* Removed warnings in action_edit_keyframes.c. I need an example of how to add error reports for the code that this concerned.
2008-12-30 10:10:44 +00:00
cbc3c7e878 script was adding UV's rather then vertex Colors (this was correct before uv & vcol layers existed) 2008-12-30 08:25:36 +00:00
d6e8cd4232 2.5: fix compile error on mac, and a few warnings. 2008-12-30 07:32:14 +00:00
bd97dd0846 mistake in previous commit, stopped CurNurbs from appending 2008-12-30 05:00:19 +00:00
090807066c 2.5
*******

Small commit, moved selection Operators to Object editor (object_edit.c) as per kaito's request

- normal selection and border/circle select are still in view3d as they depend too much on view3d
2008-12-30 03:38:18 +00:00
81d788471f 2.5 - Bugfix for old Outliner/Oops views
Old oops views were not being converted to Outliner views), so the View menu was empty.
2008-12-30 03:28:01 +00:00
Nathan Letwory
11e50fb581 2.5
* make bpy compile with msvc again. The forward declaration of the array with no length was a problem. Instead, I switched the tables and made the function a forward declaration.
2008-12-30 00:35:31 +00:00
2629095828 2.5 - Transform Code for Animation Editors (Part 1)
Remove context pointer from transform code. Solved the need for this by modifying the code that needed it.
2008-12-30 00:28:11 +00:00
Nathan Letwory
e114c195a6 * remove unused var 2008-12-29 23:42:39 +00:00
34b53def70 2.5
Transform house cleaning. Gattering input methods in specialized code. It's not missing much before it can be used standalone (for example, to use the mouse to specify remove doubles threshold interactively).

Note to Aligorith: Transformations using INPUT_NONE (most Time* stuff) would use a cleanup.
2008-12-29 20:37:54 +00:00
ec29a844f9 == RNA ==
Ongoing work in rna_ipo.c: wrapping BPoint and BezTriple, since they are used in IpoCurve.

These are declared in DNA_curve_types.h, so rna_curve.c is a better place for them. I prefer to test things better and have someone who knows well this data check the wrapping first, though.
2008-12-29 18:38:29 +00:00
e51827246d RNA
* DNA_object_fluidsim.h: done, patch by Nathaniel Garbutt, thanks!
  Some changes to make it more complete and adding inheritance to
  better hide irrelevant and reused properties.
* Also added all derived types for modifiers, but only fluid is
  filled in currently.
* Some files converted from DOS to UNIX line endings.
2008-12-29 17:36:06 +00:00
1c663bbc7e First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. 
To make porting of game code easier, the properties have usually the same type and use than
the return values/parameters of the get/set methods. 
More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up

Old methods are still available but will produce deprecation warnings on the console: 

"<method> is deprecated, use the <property> property instead"

You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu.

PyDoc is updated to include the new properties and display a deprecation warning
for the get/set methods that are being deprecated.
2008-12-29 16:36:58 +00:00
d91daaa5f6 MSVC project file update for ffmpeg device lib, release build 2008-12-29 14:26:36 +00:00
1f1f79955a 2.5: fix a crash with invalid data left in context after file read,
now it clears screen/area/region/uiblock.
2008-12-29 13:48:03 +00:00
0a8a00cd10 2.5: Error reporting
* Added a report list to operator, to which they can report errors and
  warnings. When the operator ends, it will display them with a popup. For
  python these should become exceptions when calling operators.
* Added a function to make a popup menu from a report list.
* Also added a utility function to prepend a string before the reports to
  indicate what they relates to. Also made the report functions used
  BLI_dynstr to simplify the code.
* Made file reading and writing report errors to the user again using this
  system, also replacing the left over uncommented bad level error() calls.
2008-12-29 13:38:08 +00:00
d51bc24384 The 'struct' keyword was missing, breaking compilation here (scons). 2008-12-29 13:02:18 +00:00
1580b6bc17 2.5
More notifier cleanups: 

NC_SCENE|ND_OB_SELECT : scene level object selections changed
NC_SCENE|ND_OB_ACTIVE : scene level, new active object

NC_OBJECT|ND_BONE_SELECT : object level, bone selection changed
NC_OBJECT|ND_BONE_ACTIVE: object level, new active bone

I've made view3d listen to these, so operators that change
selections don't have to tag own region for redraw anymore.

Also enabled selecting/activating in outliner again.

BTW: Added it in space_action, but Joshua has to code the
proper refresh still :)
2008-12-29 12:15:42 +00:00
3e29ff7204 * was using __members__ to get a list of attributes, has been deprecated in python for a while now. use a "__dir__" method instead. now dir() works for rna and operator types.
* added array support for bpyoperator doc generation
2008-12-29 12:04:25 +00:00
2c4c7004ae 2.5 - Action Editor: Copy/Paste
This can be activated using Ctrl-C/V and the buttons on the header.

It still uses an ugly global copy/paste buffer for now. In future, we could investigate alternative methods...
2008-12-29 11:04:55 +00:00
1d42afe561 2.5
Made Makefiles happy with new transform library.
2008-12-29 09:24:42 +00:00
b928d90021 2.5 MSVC9 projectfiles
updates:
* editors/transform: added all files
* editors/animation: keyframes_general.c
* editors/space_node: node_state.c
note: had to remove WITH_VERSE from editors, due to BIF_verse not beeing ported (yet?)
2008-12-29 09:19:37 +00:00
a91e79ba70 2.5 - Action Editor Transforms now work again
Note: there were some crashes that would occur if context was not reset everytime the modal callback was run. Probably there's something about the context info we need to be more careful about.
2008-12-29 07:19:16 +00:00
d249110213 2.5 Transform - Resolving more warnings, etc 2008-12-29 06:22:45 +00:00
fc243ed361 2.5 Transform Code - Preparing for Action Editor Support
* Fixed up most of the relevant Fixme's for Action Editor and/or some animation stuff

* Added keymap for action editor transforms to transform keymap.

* Added context pointer to TransInfo struct. This was needed to avoid passing context to everything. As such, renamed the old 'context' setting to options.
2008-12-29 06:06:59 +00:00
c3ccc8a5ac 2.5
Widden some #if 0 to completely remove harmful code.
2008-12-29 04:23:41 +00:00
6f8cc8a8ad Forgot this new file in last commit 2008-12-29 04:14:27 +00:00
65fbab9f4d added RNA access to operators pointers to be documented with epy_doc_gen.py.
eg: print (bpyoperator.VIEW3D_OT_viewnumpad.rna.__members__)

docs for bpyoperator
http://www.graphicall.org/ftp/ideasman42/html/bpyoperator-module.html
2008-12-29 03:24:13 +00:00
b6b61681ef 2.5
Transform:
First working port of the transform code:
- Object mode only (other conversions need to be ported)
- Contraints (global and local only) working
- Snap (no edit mode, obviously) working
- Numinput working
- Gears (Ctrl and Shift) working
- Only grap, rotate, scale, shear, warp and to sphere have been added as hotkey, but the rest should work too once accessible
- No manipulator
- No drawn feedback other than moving stuff and header print (no constraint line, snap circle, ...)
- No NDOF support

I've only tested Scons support, though Makefil *should* work, I *think*.

Misc:
-QuatIsNull function in arith
-Exporting project_* and view[line|ray] functions from view3d
2008-12-29 01:41:28 +00:00
97a82102d4 2.5 - Action Editor / Animation Stuff:
* Brought back clean (OKEY), sample (Shift-OKEY), and delete (XKEY/DELKEY) tools for the Action Editor. 
Currently clean uses a predefined threshold (as a rna-prop, though it's still lacking the popup to set this when it is called)

* Added new file for 'destructive' keyframe operations/tools. 

* Got keyframing.c compiling. Now, some of these tools need to be operatorised. Also, the API there might change when enough of the system is stable for RNA-IPO work to take place (so that it can be tested).
2008-12-29 01:19:25 +00:00
Nathan Letwory
87cae4caed 2.5 / Nodes
* enable more code (button callbacks, will probably undergo revision)
2008-12-29 00:55:23 +00:00
aa1c405b7a 2.5
********
-ported the selection functions to use context data loops
-removed unused functions
-added select by layer (alt-numpad *), hardcoded to layer 2 until appropriate popup is available
- normal select is still the same, need to untangle it badly, and add extend to it for multiple selection, group selections, activations etc etc
2008-12-29 00:45:00 +00:00
Nathan Letwory
b8ab364bd5 2.5 / Nodes
* patch reading of old files so nodes open up properly.
2008-12-29 00:03:05 +00:00
Nathan Letwory
4b3a37db14 2.5 / Nodes
* header: better positioning of buttons, new drawing style was mixing up for old positions.
2008-12-28 23:49:51 +00:00
e8bf295ec9 More button code cleaning and tweaks
* now the rounded and round shaded themes use the same drawing backend
* fixed a problem with menu and number button triangles not accounting for buttons zoom
2008-12-28 23:14:37 +00:00
750bb40de3 2.5 Outliner - Mouse Clicks work again
A typo in the outliner_active poll() callback meant that the events were being skipped.
2008-12-28 22:26:02 +00:00
Nathan Letwory
2529d90985 2.5 / Nodes
* Operator to toggle node visibility (hide/unhide)
2008-12-28 21:41:33 +00:00
Nathan Letwory
2eaf79a53d 2.5 / Nodes
* shift-select operator, inheriting from normal select operator.
2008-12-28 20:49:37 +00:00
f4d5da91f4 Tweak here.. tweak there.. and hope that the damn focus bug is fixed now!!
Also check that this bug cause (with some window manager) that blender
work really bad, for example change from one area to another with a popup
menu open make the view hmhm "blink" (show and unshow the menu when you move
the mouse) and when you return the menu is open.. also other things that
now work fine.
2008-12-28 19:16:07 +00:00
9b2dec9631 2.5
Recode of 'select all objects by type' to show
how to use itterators.
2008-12-28 18:10:24 +00:00
7209837f2e 2.5
fix for win32 firing size event with undefined size.
2008-12-28 15:28:09 +00:00
149651b2f2 2.5
Quick bugfix: notifiers was reading NULL pointer after a file read.
2008-12-28 14:41:33 +00:00
Nathan Letwory
f7307c13e3 2.5 / Nodes
* tag region for redraw after select.
2008-12-28 13:24:44 +00:00
f9fd3d7139 minor changes and error checking.
tested first PyOperator, basics work now, invoke/exec can be used to make an operator that edits RNA or calls other operators.
2008-12-28 13:03:37 +00:00
1e463b22eb 2.5 - Action Editor:
* Added set-extrapolation operator. For now, this uses the Shift-E hotkey.
* Removed some unused code from keyframes_edit.c
2008-12-28 11:51:41 +00:00
f3fe2d0559 2.5
- New icons code crashed when using old (smaller) files, added a check
  and warning print for this case.
2008-12-28 11:28:44 +00:00
7a7fb5add9 2.5 MSVC9 projectfiles
updates:
* BPY_python: bpy_opwrapper.c, bpy_util.c
* editors/space_action: action_edit_keyframes.c
* editors/space_node: node_ops.c, node_select.c
2008-12-28 11:27:54 +00:00
3b7d1afbd8 2.5 - Version patch for reading old .blend files (for some animsys2 changes) was being done for the wrong sub-version. 2008-12-28 11:08:56 +00:00
f7a29be3b8 just silenced a warning, thx kaito for pointing it out 2008-12-28 10:49:58 +00:00
c8d38e7305 2.5
*******
small commit - Select By Type Operator ( ctrl-numpad * )
2008-12-28 10:30:05 +00:00
d8fa5f3db7 include order is important here :/ 2008-12-28 08:49:41 +00:00
f7f9d6a68d missing bpy_compat.h for <3.0 py 2008-12-28 08:46:38 +00:00
625f477554 PyOperator invoke function now receives the wmEvent and default properties as 2 python dictionary args.
the Python invoke function can then edit the properties based on the event, once its finished the properties are copied back to the operator.

python exec and invoke functions can now return RUNNING_MODAL, CANCELLED, FINISHED, PASS_THROUGH flags

Still need to look into how python operators can make use of invoke/exec for a practical case. (Need to bring back the popup menu's)
2008-12-28 08:41:49 +00:00
61b3c4fefc 2.5 - Action Editor: Bringing back more operators
* Added 'set handle-type' operator. Currently, all possible handle types are all set using a menu and HKEY. This will need to be reviewed at some point, but I think it should be easier for users to remember 1 hotkey for this, rather than 4 scattered around the place.

* Added 'set interpolation' operator. This uses the Shift-T hotkey as before (for now). As in AnimSys2, this sets per-keyframe interpolation.

* Remapped toggle frames/time-codes operator to Ctrl-T key. This may still change, but the TKEY needs to be free for transform tool here.
2008-12-28 08:15:29 +00:00
fb32420330 2.5 - Reworked the icon system a bit
* After several hours of manual dragging and typing the icon file is now 
enlarged and completely reorganised logically, rather than scattered 
throughout. This should provide a lot more room for growth, and is  a 
lot easier to work with (also allowing more space for toggle buttons 
that require two icon slots next to each other). The icon grid has now 
25 x 24 icons - hopefully this might last us for a couple more years :)

Some of the naming of icon defines is a bit ancient and can be cleaned 
up a bit further. Other devs, if when bringing spaces back, it's 
finding the wrong icon, or missing a define, try and look to see if 
it's already existing in the new icon file, or drop me a note and I'll 
fix it up.

Note: after these changes, older custom blender 2.4 icon 
files won't work and will need to be updated to the new layout.

* Enlarged the icons themselves from 15x16 pixels to 16x16 pixels (icon 
designer request). This is a more standard size, and is easier to fit 
stuff in proportionally.

* Added a bunch more of jendrzych's icons that weren't added previously 
since there wasn't space in the icon file (including a few more 
modifier icons)

* Tweaked the outliner somewhat, so that instead of just showing a 
generic 'object' icon for all objects, it shows 'object type' icons, 
per object type. This makes the outliner a lot more useful for browsing 
at a glance - a huge row of identical 'object' icons doesn't really 
give much useful information. See here:

http://mke3.net/blender/devel/2.5/outliner_obtypes.png
2008-12-28 07:39:23 +00:00
452f1d1ea9 2.5
- Action Editor: Snap Current Frame to Selected Keyframes
- Change time operator - removed old unnecessary code
2008-12-28 04:13:18 +00:00
bb02d1fd4f 2.5
******
Ported object selection tools
 - (de)select all
 - invert selection (ctrl-i)
 - select random ( numpad *)

each selection tool is own operator , mouse selection is seperated again to own operator

select random has the hard coded fac of 50 as there is no number popup developed yet

to be ported: select by layer and select by type
2008-12-28 01:28:31 +00:00
Nathan Letwory
e3ddc08e5f * hrmpfs :] 2008-12-28 00:42:01 +00:00
Nathan Letwory
12b7905411 * clean up some warnings. 2008-12-28 00:38:12 +00:00
Nathan Letwory
872d191113 * /W4 accidently slipped through. 2008-12-28 00:18:59 +00:00
Nathan Letwory
4e94930715 2.5 / Nodes
* WIP selection operator.
  - selection is made, but redraw is still missing.
2008-12-28 00:08:34 +00:00
Nathan Letwory
ad480556e5 2.5 / SCons
* make sure we can build WITH_BF_PYTHON=False
2008-12-27 20:22:22 +00:00
b97ee36f8d 2.5
Anim playback part 1 (needs more test, will do after commit)

- added the update_for_new_frame() back
- proper evaluation of time change notifier in WM level
- fixed redraw flushes for menus while animation plays.
2008-12-27 17:43:05 +00:00
b7c7057f3e * converting operator props to strings was using a float as in int.
* PyOperators were always calling the python functions with default args.
* Made operator prints only happen when G.f & G_DEBUG is enabled.
2008-12-27 16:35:15 +00:00
f0f451fc16 2.5
Notifier system upgrade, based on Brecht's doc.
Implementation notes:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataNotifiers#Implementation

In short: let's try to strictly communicate in a notifier what happened.
The listeners then can act themselves. It also means that a frame-changed
notifier doesn't send out redraws, the editors themselves can decide.
2008-12-27 16:09:56 +00:00
0714d28236 python operators (in bpy_opwrapper.*)
This means you can define an operator in python that is called from C or Python - like any other operator.

Python functions for invoke and exec can be registered with an operator name.

keywords are read from the python exec() function, then used to create operator properties. The default python values are used to set the property type and defaults.

def exec(size=2.0, text="blah"): ...

is equivalent to...
prop = RNA_def_property(ot->srna, "size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_default(prop, 2.0f);

prop = RNA_def_property(ot->srna, "size", PROP_STRING, PROP_NONE);
RNA_def_property_string_default(prop, "blah");


TODO -
* make use of events
* return OPERATOR_CANCELLED/OPERATOR_FINISHED.. etc
* add support for array args
* more testing
2008-12-27 14:52:49 +00:00
86886cbc55 2.5 - Action Editor
* Started porting back keyframe editing tools for the Action Editor/Dopesheet. Currently, only Snap (Shift-S) and Mirror (Shift-M) are functional.

* Added keyframe-editing API method for ensuring that all IPO-curves are left in a valid state after modifiying the values of their keyframes.

* Added operator-register flags for most of the operators. Only mouse-select doesn't have it for now (as there's not much useful info stored, and no exec callback).
2008-12-27 11:44:00 +00:00
032adf70d9 2.5
*******

Made the framework for selection operations ( invert selection, select random) to be handled by a single operator, atm only normal/mouse selection is possible

to be ported
 - invert selection
 - select random
 - select by layer
 - select by type
2008-12-27 10:54:32 +00:00
b6ac77f602 2.5 - Assorted comments, and made the default size of the Action Editor more sensible. 2008-12-27 05:24:03 +00:00
a2369a5e01 run python when starting blender like 2.4x does (was start/stopping python for each script before)
This way python can call the operator to run other scripts
eg...
 bpyoperator.SCRIPT_OT_run_pyfile(filename = "myop.py")
2008-12-27 04:55:45 +00:00
017cb7a394 View2d: Tweaked operators/keymaps to allow so that view will scroll when zooming the view is not possible. 2008-12-27 04:30:26 +00:00
8bd12ebc3e 2.5
******

Set the render border operator

- Hotkey same as old (shift-b)
- behavior is the same as old, even draws the same
2008-12-27 01:29:56 +00:00
Nathan Letwory
27a9ac81c6 2.5 / Nodes
* bring back more code that got lost after careless revision jumping.
2008-12-26 20:50:06 +00:00
Nathan Letwory
5fdda0bb05 2.5
* when tracking a crasher I did svn update to specific revisions, updating back and forth somehow made some of my changes disappear in bitheaven. Bringing back aspect once again (rest of todays commit will follow soon).
2008-12-26 20:44:27 +00:00
Nathan Letwory
ec66752f49 2.5
* fix some warnings to satisfy scons/msvc
2008-12-26 20:39:29 +00:00
82cf2aebba RNA:
* Added support for using pointers + collections as operator properties,
  but with the restriction that they must point to other type derived from
  ID property groups. The "add" function for these properties will allocate
  a new ID property group and point to that.
* Added support for arrays with type IDP_GROUP in ID properties.
* Fix bug getting/setting float array values.

Example code for collections, note the "OperatorMousePath" type is defined
in rna_wm.c and has a float[2] property named "loc".


Defining the operator property:

prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);


Adding values:

PointerRNA itemptr;
float loc[2] = {1, 1},

RNA_collection_add(op->ptr, "path", &itemptr);
RNA_float_set_array(&itemptr, "loc", loc);


Iterating:

RNA_BEGIN(op->ptr, itemptr, "path") {
	float loc[2];

	RNA_float_get_array(&itemptr, "loc", loc);
	printf("Location: %f %f\n", loc[0], loc[1]);
}
RNA_END;
2008-12-26 20:38:52 +00:00
254fc41b56 UI: fix potential crasher in UI panel commit. 2008-12-26 20:25:02 +00:00
da078552d4 2.5
- Added 3d cursor operator (no exec, waiting for vector property!)
- Added default editor callbacks, for the poll() function.

Example:

   ot->poll= ED_operator_view3d_active;

I'll add later more, per module, such as OBJECT_active, which
can be called without WM active
2008-12-26 19:07:31 +00:00
6086c31fd3 2.5
Brought back 'smooth view'. Took some hours to untangle it all,
code was spread all over, instead of localized in 1 call. Tsk!
Still not perfect, but at least more in control. For the hackers;
check void smooth_view() in view3d_view.c, here all 3d view
stuff should be handled, so it can optionally use animating.

For the users: 'smooth view' now plays at a maximum of 30 hz,
and doesn't block anymore. So even slow animated views remain
responsive if you press many numpad keys.
2008-12-26 18:15:46 +00:00
Nathan Letwory
ce733db5cb 2.5 / Nodes
* fix icon scaling -> SpaceNode aspect.
* bring back a bit more code
2008-12-26 18:00:38 +00:00
f10e828b1e 2.5 MSVC9 projectfiles
updates:
* rna_sound.c
2008-12-26 17:37:16 +00:00
2431c6667c * Added bSound to rna (still need to do bSample and bSoundListener structs)
* rna epy doc-gen was failing when trying to sort None
2008-12-26 16:50:05 +00:00
21b45f3b00 2.5 MSVC9 projectfiles
updates:
* new file editors/interface/interface_panel.c
* new files in editors/space_node
* new file editors/space_buttons/buttons_scene.c
* new files in editors/space_script
* new files in editors/object
2008-12-26 15:52:59 +00:00
e4b20f0180 2.5: various warning fixes. There was one actual bug in a few different
places, using sprintf with strings like ID names as the format string
(note that this name can contain a % character).
2008-12-26 14:19:25 +00:00
63f84cf26d crash when running operators with no window 2008-12-26 13:50:32 +00:00
bf956bb475 2.5
Timers: added extra 'event type' argument to call to add a timer:
WM_event_add_window_timer(win, event_type, interval)

This way other timer systems don't generate overhead on the queues.
(button timers were creating unused animation-playback operators)
2008-12-26 13:29:47 +00:00
2335092456 UI: Panels
* API and usage is basically the same still.
* Panels were moved to region level. I first thought of keeping them at area
  level, but having them at region level it's simpler to handle events and do
  drawing, and also to integrate with view2d. They can still become area level
  overlapping regions, if we make a floating (or docked) region that can
  contain panels.
* Added back a few panels from the scene buttons for testing.

Issues still:
* The view2d handling and alignment refresh of panels is not correct yet in the
  buttons window. 
* I did not yet bring back the block handlers system. It was basically a system
  that stored which panel was open and where the events for that panel would go.
  Just a few functions, but not sure how it fits in 2.5.
* There was a case where dragging panels would not properly remove the window
  level handler, but could not redo anymore even though I don't think I fixed
  it.
* Some text in the panels goes past the end of the button, that is due to the
  checkmark button drawing, not related to this commit.

Other UI code changes:
* Renamed interface.h to interface_intern.h for consistency.
* Fixed some issues with freeing of blocks when they changed due to context.
* uiDrawBlock now takes a context pointer (mostly for block drawextra).
2008-12-26 13:11:04 +00:00
7715e45a7a removed ED_ prefix from script operator.
python operator api was crashing when unknown operators were called.
2008-12-26 12:39:53 +00:00
d6704568f8 2.5
Operator calls: extended WM_operator_name_call() with options whether to
call the exec() (operate immediate) or invoke() (check user input) entry.

This will allow python to use it more efficiently, but also solves the
dreaded pulldown case that showed another menu for confirmation.

New names to learn: :)
WM_OP_EXEC_DEFAULT
WM_OP_INVOKE_DEFAULT

on todo still: allow hotkey definitions to do same.
2008-12-26 12:21:06 +00:00
1d176259cb 2.5 -
Renaming operators to follow new naming convention set out by Ton
2008-12-26 11:33:41 +00:00
c0475a7859 2.5: fix/workaround for crashes with open recent popup, due
to usage of free'd area/region.
2008-12-26 11:32:20 +00:00
5006875f53 2.5
- fix Makefile for space_script
- renamed operators for modules i maintain. (stripped ED_)
2008-12-26 11:11:21 +00:00
34baf51dcb 2.5 - Action Editor: All Keyframe Selection Tools Ported
User Notes (for using tools whose behaviour has changed):
* Mouse Selection Tools: 
1) Click on keyframe to modify its selection. Holding the 'Shift' modifier when doing so, will result in keyframe selection being toggled instead of replacing existing selections.
2) Click on either side of the current frame indicator while holding the 'Alt' modifier. This will select only all the keyframes on the relevant side of the current frame indicator.
3) Click on a keyframe while holding the 'Ctrl' modifier. This will select all the keyframes that fall on that frame.

* Borderselect Tools 
1) BKEY selects all the keyframes within the specified range (as per normal)
2) ALT-BKEY will select either all the keyframes in the frame-range specified or the channel range specified, depending on which axis of the select region was larger. This method is prejudiced towards frame-range selection.

Code Notes:
* Finished porting over all of the remaining keyframe selection tools, and recoded the ported ones to make them easier to use (after running into some technical limitations)

* Simplified the way to check if 'animation context' is valid by moving a necessary check into that function.

* Refactored internal keyframe-looping tools to reduce the amount of code needed per tool to edit keyframes, removing a lot of the unnecessary bulk. Now, the ipo/icu_keys_bezier_loop functions recieve a few more arguments (1st arg is pointer to generic customdata, and another defines a validation callback which makes it easier to reuse some of the select callbacks).

* Added 'totrect' adjustment for number of channels being shown in Action Editor, so that scrolling will be limited to where there is data (and also so that scroller displays more relevant context info). 
For this to work, filtering channels now returns the number of channels extracted. This may come into use for other tools if there's such a need.

* I still need to port over some code for markers, which is required for some of the tools which use them. For now, those tools do nothing.

* Grease-Pencil editing mode in Action Editor is currently non-functional (code is commented out due to missing dependencies). This is currently pending the re-implementation of Grease Pencil in 2.5
2008-12-26 10:55:07 +00:00
1dbbffb4be My very first commit (kinda cool ) just to test my commit rights and to go through the motions of commiting
just a single comment to seperate the ED_VIEW3D_OT_viewnumpad operator code from the rest so its easier to read
2008-12-26 10:31:44 +00:00
0054e6d354 * added RNA_property_as_string to rna_access.c - can print most types except for pointers and collections.
* WM_operator_pystring to print the python func+args for an operator
* call WM_operator_print(op) in wm_operator_invoke(), simple echo mode should be moved later.
2008-12-26 03:56:52 +00:00
Nathan Letwory
27d0394ba4 2.5 / RNA
* two more small warning fixes.
2008-12-26 02:06:54 +00:00
Nathan Letwory
1d3670417b 2.5 / RNA
* assorted fixes for resolving compile warnings
* in rna_armature setting for envelope weight was bug, since it was setting dist instead.
2008-12-26 02:02:06 +00:00
Nathan Letwory
2a2e720586 2.5 / RNA / Nodes
* some work on node types.
2008-12-26 01:37:05 +00:00
Nathan Letwory
9104f67ff9 2.5 / SCons
* Silence warning
  - there's no blc lib anymore :) Player won't build now anyway, as some bad level calls need to be cleaned up.
2008-12-26 00:12:25 +00:00
Nathan Letwory
d464148259 2.5 / RNA / Material
* Flare settings
* some code reorganisation for readability.
2008-12-26 00:10:29 +00:00
Nathan Letwory
161e491c5b 2.5 / RNA: Material
* Ray Transparency settings
2008-12-25 22:00:27 +00:00
Nathan Letwory
ab369c29aa 2.5 / Nodes
* almost all header menu drawing is back, no real actions yet, though.
2008-12-25 20:41:14 +00:00
Nathan Letwory
b917e1ac66 2.5 / Nodes
* fix warnings for msvc
2008-12-25 20:14:52 +00:00
Nathan Letwory
d438a86f06 2.5 / Nodes
* header menu drawing
2008-12-25 18:29:56 +00:00
Nathan Letwory
00fd6c5b00 2.5 / SCons
Make sure we can build WITH_BF_PYTHON=False
2008-12-25 16:02:35 +00:00
de9437e57a * temporary PKey in the script and 3D view runs "./test.py" (for testing PyOperators that need to run in the user interface context atm)
* added ED_SCRIPT_OT_run_pyfile that takes a filename argument.
* RNA_property_string_set didn't add a value to ID props if the prop wasnt there (like ints, floats and bools do)
* bpy_operator.c - raise an error when unknown keyword args are passed to any operator .

Examples of bpy operator api...

bpyoperator.ED_VIEW3D_OT_viewhome(center=1)
bpyoperator.ED_SCR_OT_frame_offset(delta=10)
bpyoperator.ED_VIEW3D_OT_make_parent(type='OBJECT')

At the moment there is no way to stop the operators .invoke() function from running so ED_VIEW3D_OT_make_parent still opens the menu even though it doesn't need to.
2008-12-25 14:17:54 +00:00
d7e8becefe View2D: Border-Zoom tool
From the Christmas goodie-bag, I've added the border-zoom tool (also known as 'Zoom to Border'). This can be activated using the Shift-ZKEY hotkey (Note: this probably won't be the final hotkey choice, but I'm trying to keep Shift-BKEY free for data-editing tools). 

With this method of zooming, you define a border for the current viewable area to 'fit' into.
* drawing the region with LMB will zoom in the view by focussing in on the defined region 
* drawing the region with RMB will zoom out of the view by shrinking the view into the defined region
2008-12-25 11:09:25 +00:00
46d505194b * PyOperators now parse args using the PyRNA api (wraps ID props internally),
this means it can reuse the function for converting python to RNA types - giving more useful errors.
* Incorrect enum args lists valid values in their exception message (used for PyRNA and PyOperators).
* remove bpy_idprop.c and bpy_idprop.h

PyOperators are not usable since they run outside the UI loop atm.
2008-12-25 10:48:36 +00:00
aa56346b12 * disable back buffer selection drawing while projection painting (was redoing for every update while painting)
* remove unneeded return from game engines py api - ConvertPythonToGameObject
2008-12-24 21:53:15 +00:00
Nathan Letwory
0d7027ecab 2.5 / SCons / BGE
* this should bring back BGE with scons building. Tested on scons/msvc, will test scons/gcc in a bit
  NOTE: this is not WITH_BF_PLAYER yet.
2008-12-24 21:33:51 +00:00
Nathan Letwory
13e8e936b3 2.5 BGE
* dna property types had define names renamed for RNA, do that here too.
2008-12-24 21:23:07 +00:00
febb2c21e4 2.5
Further simplifying making operators with menus;
now you can add an 'invoke' callback:

    WM_menu_invoke

which will automatically generate a menu with choices and assign
it to the property 'type'.
What also helps typing is the new RNA_enum_is_equal() function.

Here's a paste of the now committed 'clear parent'. Note the
undo push will become a flag too.

http://pasteall.org/3660

(Brecht; fixed small bug in RNA_enum_is_equal!)

To evaluate: solving dependencies for multipe scenes... probably
will make a more generic flush call.
2008-12-24 18:06:51 +00:00
cbebe4ad46 * bpy curve api wouldn't give correct errors for bad arguments when appending nurbs.
* the radius on the curves first point was ignored. 
* mesh_edges2curves.py was giving all points a tilt of 1.0
2008-12-24 15:46:26 +00:00
3c612bc0e2 2.5
Fix: popup menus were not freeing operators.
Made a new Popup menu call for this case:

uiPupmenuOperator(C, maxrow, op, propname, menustr);

It will set enum "propname" to the menu item and call operator,
register it optionally and free it. Use it in "invoke" calls.

Next: automatic menu generating for enum properties!
2008-12-24 14:52:17 +00:00
9bb7babd2c 2.5
Made nodes compile for Makefile and mac.
It has a hack for intel cards in node previews... not sure if that is
still valid? commented it out.
2008-12-24 11:17:45 +00:00
e60e7f3667 2.5
Removed global "workob" from BKE, should now by passed on as an arg.
2008-12-24 11:08:15 +00:00
bc5b56e2a8 RNA
* RNA_enum_is_equal function to quickly compare with enum identifier name.
2008-12-24 10:50:39 +00:00
Nathan Letwory
c34d2f4449 * scream about all warnings with scons/msvc 2008-12-24 10:43:39 +00:00
Nathan Letwory
486de068b2 2.5 - node editor
Commit of WIP code (what code isn't wip, these days ;)
- only drawing code as basis to work further from (and have less conflicts between different systems I work on)
2008-12-24 10:33:10 +00:00
1d0ae96049 2.5
Makefile was missing the new object module, thanks Joilnen for finding
the missing commit!
2008-12-24 10:13:11 +00:00
3a4ead8f0f fix for own mistake - [#18119] Texture Paint: "clone from layer" button not drawn in buttons window 2008-12-24 02:06:34 +00:00
a65fabc553 2.5 - Action Editor
Select Left/Right (Alt-Select) works again.
Fixed compiling errors from previous commit.
2008-12-24 00:05:56 +00:00
Nathan Letwory
1062946cad * comment out /WX until I have commited nodes code :) 2008-12-24 00:05:06 +00:00
754590d0d8 2.5 - Action Editor Select Tools
Ported the following tools 
* borderselect
* invert selection

Note: while porting these, I noticed a few issues with some stuff that still needs to be cleaned up.

Events handling in scrollers won't work yet, for the useful select all in frame(-range) or select all in channel(s). We should probably review ways to expose this more clearly in the UI too.
2008-12-23 23:34:19 +00:00
e48a4db4f0 2.5 scons compile error fix for bsp lib 2008-12-23 22:40:25 +00:00
Nathan Letwory
521fe6739a 2.5 / SCons
New priorities for most libs, at least core. This is still for Blender proper, BGE and such still to come.
2008-12-23 21:20:34 +00:00
Nathan Letwory
eb186d18dc 2.5 / SCons
Blender builds and links on Linux. For now without BGE and its player, 
but that will come. Priorities are still a mess, so expect more commits 
soon.
2008-12-23 20:13:31 +00:00
b38f6e7d18 2.5
Object: converted the old horrible editobject.c, now as file:
editors/object/object_edit.c

Still lots of WIP, I've operatorified "Make Parent". Check here
the new API at work: http://pasteall.org/3650/c

IMPORTANT NOTE FOR BRECHT:
game property defines were clashing with RNA, i've renamed game
defines for now.
2008-12-23 19:47:33 +00:00
Nathan Letwory
93d9e7749d 2.5 / SCons
I did a very drastic cleanup for the different libgroups, there's now only a few left. It compiled with scons/msvc, will be testing in a bit on linux, too.
If you get any problems, please reply to this commit message on the taskforce ML.
2008-12-23 16:07:24 +00:00
efe6acb58a Fix for makefiles (was missing rna include)
Kent
2008-12-23 15:53:46 +00:00
7563e5e454 2.5 MSVC9 projectfiles
* update for editors/animation editors/space_outliner and editors/screen
* also fix compile error when INTERNATIONAL is set (will likely be solved with new font API)
2008-12-23 12:25:44 +00:00
00d2cf3ddb 2.5 Action Editor - Brought back Select All (AKEY)
Now, selecting keyframes with mouse behaves more like before.

Note: this still mostly uses old code, since other parts of code also call this. For later, it'd be nice to store as RNA prop, method of selecting.
2008-12-23 11:58:02 +00:00
67888ee34b 2.5 Action Editor Bugfix - Select keys now works
It is now possible to select individual keyframes again in the Action Editor.

* Temporarily disabled markers keymap in Action Editor, as it was stealing all the events. Waiting for solution from Ton...
* Fixed a crash and wrong coordinate conversion errors
2008-12-23 11:42:14 +00:00
87c05f7836 2.5 Action Editor - Big WIP Commit
* Brought back backend for editing keyframes IPO/IPO-Curves. Did some refactoring work here that will still have to be verified when operators using them are added.

* Animation channel filtering code now returns the number of channels filtered (for Action Editor to set totrect of channels - TODO still!)

* View2D - made function to check if mouse is in View2D scrollers an API function

* Renamed keyframe related files. The old names were too clumsy.

* Started porting click-select operators for Action Editor. These don't work currently, as the events are being stolen by the markers. This needs to be fixed ASAP.
2008-12-23 11:02:39 +00:00
58da63cd3e 2.5
View3D Numpad operator, by Michael Foxx. Yay!
Todo: use same call for view3d pulldown.
2008-12-23 09:59:02 +00:00
5a96981cc6 improved PROTO support, works for many testfiles now. 2008-12-23 06:47:43 +00:00
76c035bd11 2.5: Data Context
* Worked out data context implementation more, now with initial context
  callbacks implemented for the screen and 3d view.
* For collections, switch from iterators to simpler ListBase. Though that still
  means it uses LinkData* rather than the actual Object* for example, since
  those can only be part of one list. So I added a macro as well to make
  iteration easier when possible.

CTX_DATA_BEGIN(C, Object*, ob, selected_objects) {
	printf("object name: %s\n", ob->id.name);
}
CTX_DATA_END;
2008-12-23 02:07:13 +00:00
8d6c2e6ec0 Initial commit working on an updated consistent colour scheme -
following these guidelines:
http://wiki.blender.org/index.php/BlenderDev/ColourMeaning
2008-12-23 02:03:08 +00:00
cc9d3786f8 2.5: fix a crash switching to space types with old space data. 2008-12-23 01:08:02 +00:00
892be750e5 2.5 - Bugfixes
* View Pan Operator now stores area, etc. values from context in case user moves out of view
* Moved the invalid-context check for Action Editor so that mode can still be changed when there's no data to show.
2008-12-22 22:59:48 +00:00
Nathan Letwory
261d130872 * bring back some drawing code for node editor (grid, roundbox emboss) 2008-12-22 20:53:38 +00:00
be1d06a2c5 Volume rendering:
* Multithreaded volume light cache

While the render process itself is multithreaded, the light cache pre-process 
previously wasn't (painfully noticed this the other week rendering on some 
borrowed octocore nodes!). This commit adds threading, similar to the tiled render - 
it divides the light cache's voxel grid into 3d parts and renders them with the 
available threads.

This makes the most significant difference on shots where the light cache pre-
process is the bottleneck, so shots with either several lights, or a high res light 
cache, or both. On this file (3 lights, light cache res 120), on my Core 2 Duo it now 
renders in 27 seconds compared to 49 previously.

http://mke3.net/blender/devel/rendering/volumetrics/threaded_cache.jpg
2008-12-22 20:28:02 +00:00
3b0c42136b 2.5
Our precious outliner is back! :)
Currently no operations are active there, nor notifiers to refresh
other windows. Be patient!

You can switch to RNA with the 'view' menu. 
Later we'll sort out how much of both get integrated in 1 system, or
have both options, or make designated 'data view' for rna? ALso the
old Oops... bring back?
2008-12-22 19:31:23 +00:00
05fc2aa9da pose_grab_with_ik_clear(): fix bug with memory used after being freed. 2008-12-22 16:56:14 +00:00
6158762797 WIP - support for VRML PROTO's 2008-12-22 15:05:07 +00:00
9e38e6aeb0 2.5
Better implementation of own window timers, not using ghost.
That makes blender's WM nice in control, and gives callers
of timers the opportunitie to evaluate time passed since
previous step. This system also only generates one timer 
event per main loop (events - handlers - notifiers - draw)

Small fix: allow keymap modifier to give KM_ANY to ignore
modifier keys, this to have TIMER keymap work.
2008-12-22 12:57:53 +00:00
5e443fd45d 2.5 - Commented out unused code in keyframing.c. This will be restored later. 2008-12-22 11:28:02 +00:00
fe29e6699c 2.5:
Brought back basics for Action Editor header. The contents of the menus have yet to come, but at least now the Action Editor 'looks' functional.

Fixed mistake in previous commit for TimeLine header (button collision).
2008-12-22 11:12:48 +00:00
601fb5e6fa Bugfix - Fixed crashes in Action Editor on Ctrl-L due to missing NULL checks. 2008-12-22 10:52:17 +00:00
cedb19ef3e 2.5 - Animation tweaks - bringing back more code
* Action Editor - IPO curve names are shown properly again. Added anim_ipo_utils.c (old editipo_lib.c) file back. This will need to be removed when I port IPO system to RNA.

* Keyframing code - uncommented more of the code that's now working

* Made the 'preview range' button on timeline header draw more clearly
2008-12-22 10:15:02 +00:00
bac4d10174 2.5
Small area/space api fix: space->new() callbacks now require
Context pointer. Too many cases you want to initialize stuff...

Also: added dummy draw function for NLA channel region, was
too ugly.
2008-12-22 10:09:56 +00:00
fa12c089b1 2.5 MSVC9 projectfiles
* small update for anim_keyframes_draw.c and space_action/action_draw.c
2008-12-22 10:07:13 +00:00
2474329ba8 2.5 - Action Editor Bugfixes
* Restored y-position translations needed for gla-stuff, as gla stuff sets viewport + matrices!
* Fixed alpha-problems with icons. The ft-font drawing was turning off GL_BLEND when it was done, which screwed up the icon drawing (previous names were drawn with 'standard' fonts only)
* Removed Context arg from drawing funcs. Passing anim-context instead. 
* Properly initialised new theme settings ported over from animsys2.
2008-12-22 09:43:54 +00:00
42def9a351 2.5
Cleanup

- for portablity we can keep the old ugly defines for retrieving
  active object, cfra and so on. But, they will use 'scene' not
  G.scene.
- fixed code that uses those defines.
- some unused variables/functions removed
2008-12-22 09:43:29 +00:00
6d31872298 2.5
Removed unused variables and commented out unused function.
It's very helpful for code porting work to keep commits 
warning free! If you compile debug, also disable O2 to get
these warnings.
2008-12-22 09:10:02 +00:00
5959df8bf8 2.5 - Action Editor / Dopesheet
Initial commit of drawing code for Action Editor / Dopesheet. By default, the Dopesheet is now enabled (like in AnimSys2). There are still a few unresolved problems (like bad alpha blending for icons, and keyframes still not being drawn). However, these will be resolved in due course.
2008-12-22 08:13:25 +00:00
3c1204024b started some cleanups in button drawing code.
* Made normal 'rounded' theme use the same fake AA outline as round shaded
* Made rounded theme respect the 'button outline' theme colour - it never did before.
2008-12-22 06:55:24 +00:00
e898bcad79 * Fixed alignment in round shaded buttons 2008-12-22 05:51:34 +00:00
1c3e358fd8 View2D - View alignment flags are now taken into account in curRect_Validate()
Alignment flags are now checked for after keeptot settings, as these flags are of even greater importance. This is necessary for the syncing of the channels region and timeline areas in Action Editor (and later NLA Editor).
2008-12-22 00:11:33 +00:00
48a93c3ea6 2.5 - Bugfix for interactive slider in timeline not correctly updating view. Also, added note in playback code that it needs to use preview-range settings not global frame range (I'm leaving this as-is for now, since it's still likely to change). 2008-12-21 23:39:52 +00:00
f1e0cf36f8 2.5
Animated screen! (unfinished, now only draws, no animation code yet).
Fun though to see it all work. :)

NOTE: Mac ghost has timer bug, the GHOST_ProcessEvents() doesnt wake
up for timers.

NOTE2: Added while loop in wm_window_process_events() to force Ghost
giving all events to Blender. Timers otherwise don't accumulate...
might be needed to fix in ghost too.

I tend to think to code own timer, this ghost stuff is totally different
per platform.
2008-12-21 19:58:25 +00:00
05aa83ad1e 2.5
Enabled cool hidden feature from Brecht: "interactive" mode for buttons,
which executes button handling on each change.
Try sliding the current frame, or even: type in values there! Cooool! :)
2008-12-21 17:44:27 +00:00
4bb20689c5 2.5
Added 'header print' feature back.

ED_area_headerprint(ScrArea *sa, const char *str);

Give it a NULL string to disable the feature.
On each call it tags the header for redraw.
2008-12-21 17:18:36 +00:00
eb8e220f26 2.5
- Added default Circle 'gesture' operator callbacks.
  As test, added in view3d window as Ckey, paint over object centers.
- Fixed notifier for gesture, to only cause redraws in own region.
2008-12-21 16:24:19 +00:00
bdb3e2eb2b 2.5 MSVC9 projectfiles
* update for view3d_draw and view3d_select
* update for bpy_operator
2008-12-21 16:20:28 +00:00
c694c8f39e 2.5
- Bugfix: loading files should close running handlers and subwindows, gave
  memory leaks that way.
- Bugfix: space image copy function didn't do curvemap
- Cleanup: moved view operators from view3d_select to view3d_view
2008-12-21 12:43:34 +00:00
b163840dfb Adding back python 3.0 calls, they didn't build with py2.x because I missed including bpy_compat.h, tested building with 2.6 2008-12-21 12:40:02 +00:00
ad4d061091 View2D - Vertical (within area) syncing for channel lists to stay in sync with the relevant keyframes...
I still need to work out how to get this to work correctly as soon as an Action Editor instance is created.
2008-12-21 11:56:42 +00:00
841f376a1c 2.5
- View3D: added ALT+B clipping operator. Note this needs a call to
  the new function view3d_operator_needs_opengl(C) to ensure you 
  can use opengl functions. Event handling by default doesn't set
  opengl per subwindow, it's also forbidden to draw then!

  We might consider to tag operators that need opengl...

- Forgot to include creator.c fix for loading builtin vector font
2008-12-21 11:05:43 +00:00
f44d8c2780 2.5
New Python code: Fixes for Makefile and compat hacks for py 2.3 
Campbell should check though!
2008-12-21 10:56:14 +00:00
db77f6abd7 2.5 - Ported new-style 'sphere' drawtype for empties from animsys2. This draws in a much simpler/cleaner way, with only 3 disks, which should help distinguish it from standard geometry. 2008-12-21 10:52:57 +00:00
170b748c81 2.5 - Compiling 'hacks' for py
* Unicode calls in bpy_idprop.c were causing linking errors here. Probably Py-libs for windows would need recompiling with unicode before we can enable this. For now, commented out the offending calls.
2008-12-21 10:36:29 +00:00
3eaca525f2 2.5 - Object name display in 3d-view now highlights on frames with keyframes again.
* Re-exposed relevant parts of anim_keyframing.c code that doesn't have external dependencies. 
* Added get_active_posechannel() to blenkernel api for poses/posechannels to solve the only missing link I found. This should have been moved there ages ago!
2008-12-21 10:33:24 +00:00
c288eab363 2.5
Brought back WIN32 hack to disable glScissor before swapbuffer.
Joshua was reporting swapbuffer glitches...
2008-12-21 09:58:32 +00:00
4a86a07f8a wip operator py-api
"operator.ED_VIEW3D_OT_viewhome(center=1)" calls the operator, converting keyword args to properties.
Need a way to run scripts in the UI for useful testing.

Still need to deal with operator exceptions and verifying args against operator options. 

Added temporary WM_operatortype_first() to allow python to return a list if available operators, can replace this with something better later (operator iterator?)
2008-12-21 08:53:36 +00:00
449e7777f7 2.5 - Restored Preview Range tools
Set and Clear Preview Range (Ctrl P and Alt P respectively) now work again for all Animation Editors.
2008-12-21 08:45:13 +00:00
df274a8b58 2.5 - Time operations to Animation Module
Moved time_ops.c contents to anim_ops.c, as the operators there are applicable to all other Animation Editors too. anim_ops.c will therefore contain all operators which will apply to all Animation Editors (i.e. change frame, frames/seconds display toggle, and soon Preview Range tools).

As such, added new global 'Animation' keymap like for View2D and Markers, which will ensure that these tools can be accessed in an uniform way across editors. 
Note that the order that these things are added is important, as the Animation ones will often 'steal' events from the View2D and Markers ones if placed before the others. To prevent that, we'd need to be able to set boundboxes here...
2008-12-21 08:02:24 +00:00
e2cca3320a 2.5 - Animation Editors - Filtering API
Brought back the Filtering API for Animation Editors. This is the 'backbone' of the current Action/Dopesheet Editor code, so it is essential to have this working.
2008-12-21 04:11:19 +00:00
62f4d2884c incorrect spelling 2008-12-21 03:43:01 +00:00
12439031c9 2.5 - Animation Editors - common drawing stuff
* Fixed current frame number drawing in Animation Editors, so that the little frame number indicator box gets shown (animsys2 feature).

* Made all Animation Editors draw markers and preview range
2008-12-21 03:14:01 +00:00
f288a43457 define WITH_CCGSUBSURF isnt used anymore 2008-12-21 03:11:32 +00:00
4d2ae9431b 2.5
View3D: ported selection code, another 2000 lines :)
Border select (BKEY) in 3d window now works. For lasso
and circle I have to add WM support still.
2008-12-20 18:43:21 +00:00
eb1d0e139f Bugfix since rev 2, BLO_setversionnumber() was using sizeof(array), which gives the sizeof the pointer, not the array.
On a 64bit system I assume this would set 8 chars of a 4 char array.

Turns out this isnt such a problem since BLO_setversionnumber isn't used anymore but way as well commit.
2008-12-20 17:09:45 +00:00
1550573360 2.5
- View3D: selecting added. Note it nicely respects user preset, by using
  the keymap define SELECTMOUSE.
- Added missing initialize of default vector font, so text draws.
2008-12-20 15:42:48 +00:00
08db8198c4 2.5:
- fix crash opening submenus
- fix disappearing main menu when going into submenu
2008-12-20 14:15:58 +00:00
5f7ad70811 2.5
Put back armature drawing code.
The BIF_editarmature.h is a placeholder... need it to get it work.
2008-12-20 13:29:35 +00:00
cc80111b2b 2.5
* fix lost declaration and missing includes after blenlib cleanup.
* bump warning level to W3 for Debug in a few libraries for MSVC9 projectfiles. Others will follow.
2008-12-20 12:43:53 +00:00
851f437361 2.5
- Ported over view3d header buttons.
  Most of the options don't work :) but some do!
- Fixed makefiles for new animation module
- added icon definitions in resources to match current trunk.
2008-12-20 12:36:14 +00:00
95e458fd03 view3d operators ED_VIEW3D_OT_viewhome and ED_VIEW3D_OT_viewcenter for Home, Shift+C and PadPeriod keys. 2008-12-20 11:33:16 +00:00
019c15c1c9 2.5 MSVC9 projectfiles
* update for editors/animation
2008-12-20 10:19:24 +00:00
ebb6628a01 2.5 BLI_blenlib cleanup
DONE:
* moved almost all declarations from BLI_blenlib.h into their own proper header files.
* BLI_blenlib.h still includes all the declarations for convenience and to avoid changes in existing code
* split util.c into several files, where it wasn't done already
*    DynamicList -> dynamiclist, 
*    ListBase    -> listbase, 
*    String utility functions -> string.c
* removed a few unused macros and functions, if they're needed back, they're still in svn ;)
TODO:
* btempdir global
* further cleanup in the code of the different modules (especially util.c)
2008-12-20 10:02:00 +00:00
c67d26602f id prop update function was receiving a tuple when it only needed a single arg 2008-12-20 08:41:46 +00:00
6343d4e233 2.5 - Start of porting of Animation Editors
* Added new 'Animation' submodule under Editors. This will be used to house all code + features that are used by many different Animation Editors (Action/Dopesheet and IPO) as well as other parts of Blender. 

* Added back some of the core code need by the Action/Dopesheet editor, which will also be used by IPO Editor.
* Brought back file for keyframing management code (i.e. keyframing.c), but there's still quite a lot of missing stuff that I'll need to restore, so in the meantime, it's #if 0'd out.

* Moved markers code to this new module (I'm not sure whether SVN will recognise this change, as TortoiseSVN doesn't seem to have any obvious copy/move commands)
2008-12-20 08:24:24 +00:00
630c16feb7 patch [#18110] [patch] Update blenderplayer.exe -h text
from Mitchell Stokes (moguri)
2008-12-20 07:12:38 +00:00
5881922bc5 Add G_FILE_IGNORE_DEPRECATION_WARNINGS option to G.fileflags in preparation of BGE python API cleanup 2008-12-19 20:35:53 +00:00
4a3630751d Cleaner code for gestures.
Command gesture (for flatten and cutout) now needs to intersect a line in two points and end in a pig tail (loop and intersect itself).

This is easier than the cross three times and self interesect once of before.
2008-12-19 19:47:25 +00:00
3b15fd4707 2.5
View3d: added zoom with padplus/minus and scrollwheel.
2008-12-19 19:27:41 +00:00
3bda5490f7 2.5: globals cleanup
* G.version removed, use BLENDER_VERSION
* G.order removed, ENDIAN_ORDER
* G.vd, G.sipo, G.buts, G.sima, .. removed.
* G.qual removed
* G.simulf removed (was unused in 2.4x)
* error() and some other unused stubs removed
2008-12-19 19:11:02 +00:00
12ad72ba8f 2.5
Two bugfixes:
- new WM_error() needed 'struct' in definition 
- fixed crash rrors reading files with curves.
2008-12-19 18:48:41 +00:00
a3d3619898 2.5
- CTRL+O "open recent file" is back. Need it for testing :)
- Added a simple WM_error() to replace old error()
2008-12-19 18:28:37 +00:00
7729ddd424 2.5 MSVC9 projectfiles
updates for briging back view3d.
2008-12-19 18:11:17 +00:00
Nathan Letwory
ed259629c8 * little swap-eroo to get things compiled with msvc.
- first the declarations, then the code! :)
2008-12-19 17:59:54 +00:00
4db8d5a365 2.5
Moved GPU init to the right location, it has to be called per
window you open. Now rip and add-window gives good views. :)
2008-12-19 17:26:15 +00:00
663612c70c 2.5
View3d: middle mouse rotate, translate, zoom.
(using default mouse map)
2008-12-19 17:14:02 +00:00
92b1d3f946 2.5: blenloader/ cleaning:
- removed context usage, should not be in this module
- remove G.main usage, now is passed along
- still some globals in use here, goal is to get rid of those too,
  so that it's possible to load/save blendfiles without having to
  think about some global state.
2008-12-19 16:36:15 +00:00
62a03ea1b6 2.5
All of the view3d drawing code is now 'Context' free.
The idea is:

- ED_region_do_draw() sets and freezes drawing context
- regiontype draw() callback then can pass on other relevant 
  context stuff as function args.

Also cleaned up the WM opengl wrappers, to mimic opengl state;
no reason to give window pointer anymore.
2008-12-19 14:14:43 +00:00
63195b0179 2.5
Compile fix; MAXFLOAT is not defined uniformly on platforms.
Note for the coders: 

ED_types.h: has editor wide defines and structs
ED_util.h: has editor wide functions

Both includes also are containing old cruft to get things
to compile (and work), for later cleanup.
2008-12-19 12:48:30 +00:00
d92b45d558 2.5
Drawing code for space_view3d module.
It's still not cleaned, have to check on context usage still.
Also missing is editmodes, armatures, and probably more.

Known issue: splitting to 2nd window gives bad opengl lighting.
Picture for fun:
http://www.blender.org/bf/rt2.jpg

Current stat: brought back almost 10k lines! :)
2008-12-19 12:14:58 +00:00
c752ec9fc4 2.5
Merged 'backend' changes from AnimSys2. Many of these changes are necessary for the Dopesheet and other changes I'm currently still stabilising. Those will come in due course.
2008-12-19 11:45:46 +00:00
242695011e some initial rna description tweaks 2008-12-19 06:05:00 +00:00
4ea449129e string args were given in wrong order. 2008-12-19 05:09:17 +00:00
b6121d2423 epy doc generator that runs inside blender2.5, in background mode.
Automatic support for...
* cross references to struct types
* extracts descriptions/names
* RNA "base" types are converted to python subclasses
* number min/max, string max length, array's, array lengths, valid enum types, readonly flag.

interesting pages (abusing autobuilder ftp :/)
http://www.graphicall.org/builds/builds/autobuilds/rna/class-tree.html
http://www.graphicall.org/builds/builds/autobuilds/rna/rna.Sequence-class.html
http://www.graphicall.org/builds/builds/autobuilds/rna/identifier-index.html

docs are generated in source/blender/python/doc
2008-12-19 05:05:23 +00:00
04428d6750 added "description" and "readonly" properties to RNA Structs (also accessible via python)
Many descriptions are not written, grep for DOC_BROKEN if you have some spare time to write struct descriptions.
2008-12-19 04:06:24 +00:00
3c9ae035fb Typo was making actuator.getExecutePriority() crash 2008-12-19 03:26:41 +00:00
d9de6fca6c 2.5: Change blenloader module to use the Report system for reporting errors. 2008-12-19 00:50:21 +00:00
ea81c58429 2.5: fix small memory leak when closing window with X-button rather than Ctrl+Q. 2008-12-19 00:43:37 +00:00
dfb8b21340 2.5: fix for crash reading regions of inactive spaces in an area. 2008-12-19 00:18:16 +00:00
9178dc8596 Small RNA changes
* rna_validate_identifier now checks identifiers are not python keywords such as if, and, from (builtins like max, object and sort are ok)
* rna_validate_identifier prints an error explaining why it fails
* renamed Struct's "from" to "base" - to point to the struct inherited from.
* renamed ImageUsers's "pass" and "layer" to "renderPass" and "renderLayer"
* use the identifier as the key for ENUM's (matching structs and properties)
2008-12-18 23:34:19 +00:00
1dcbafa4e4 2.5 - Assorted tweaks for anim editors before porting AnimSys2 stuff over to this branch 2008-12-18 23:23:09 +00:00
a755342b14 Bugfix for crash with loading fluidsim files, reported by Gimble3d and nudelZ 2008-12-18 22:08:57 +00:00
54cc5c493d 2.5
remove unnecessary include dependency.
2008-12-18 20:08:24 +00:00
93cc4629e3 2.5: fix for crashes due to access to free'd memory in joining areas,
ripping areas and duplicating windows.
2008-12-18 19:41:36 +00:00
af746acaad 2.5
Adding back internal files for file/imagebrowser.
2008-12-18 19:21:30 +00:00
1d3a42451d 2.5 MSVC9 projectfiles
updates: 
* context.c and report.c in blenkernel (moved from wm)
* view3d_draw in editors 
* rna for sequence
2008-12-18 18:49:38 +00:00
a3f583ecf3 Removed ugly call to G.curscreen in derivedmesh.
Just to prevent crashing for now.
2008-12-18 18:34:37 +00:00
c7f6f25a9d 2.5
Drawing and viewing code for view3d back (no not objects :).

Quick test: converted 2250 ugly lines of code in 2.5 hours.
With about 300k lines todo, this will be 333 hours = 30 days? Whoa!
2008-12-18 17:38:21 +00:00
e8e903cd53 2.5
- WM subwindows now get freed on every ED_region_exit(). Was not
  a leak, but it's cleaner this way (and saves some kilobytes!).
- fixed debug print for operators (on blender -d) to print correct
  subwindow id.
2008-12-18 14:53:39 +00:00
9ca1760525 2.5
Missing context.h for apple compiling.
2008-12-18 11:25:17 +00:00
dae839639d View2D: More bugfixes
* Added flags to View2D to specify whether the view should have pixel offsets applied (this is able to be specified per axis, just in case the need arises). Currently, this is only used for headers, where the UI elements were not as smooth + round as they could be

* Fixed IPO/Action/NLA so that new instance will show channel lists by default and with scrollers

* Fixed Outliner zoom-in/out on changing windowsize. I didn't notice this on my previous custom .B.blend file, but the problem was apparent in the default setup.
2008-12-18 09:20:29 +00:00
ced396ce6d Use the identifier for struct property access too
struct.properties['pulse_false_level'] instead of struct.properties['Pulse False Level']
2008-12-18 07:22:28 +00:00
96bad930de Added checks so invalid struct and property identifiers while preprocessing,
Changed curve '3d' property to 'planer' and set to a negative bool.
2008-12-18 06:43:03 +00:00
a196d283ed Use the identifier rather then the struct name to access a collection of structs.
bpydoc.structs.keys() - ['Actuator', 'ActuatorSensor', 'AlwaysSensor', 'AndController'.... etc
now reads...
bpydoc.structs.keys() - ['Actuator', 'Actuator Sensor', 'Always Sensor', 'And Controller'...

This is more correct since an identifier is supposted to be unique when a name might not be.
2008-12-18 05:28:17 +00:00
ecc4e55b66 2.5
Context API

This adds the context API as described here. The main practical change
now is that C is not longer directly accessible but has to be accessed
through accessor functions. This basically adds the implementation of
the API and adaption of existing code with some minor changes. The next
task of course is to actually use this design to cleanup of bad level
calls and global access, in blenkernel, blenloader.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Context

Error, Warning and Debug Info Reporting

This adds the error reporting API as described here. It should help
clean up error() calls in non-ui code, but eventually can become used
for gathering messages for a console window, and throwing exceptions
in python scripts when an error happens executing something.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/Reports
2008-12-18 02:56:48 +00:00
241dbe6e85 2.5: Fix crash moving area to fullscreen with tooltips. Happened
because C->window->screen and C->screen were different, now made
sure they are set at the same time.
2008-12-18 01:48:24 +00:00
04ef5be177 FFmpeg upgrade to revision 12758 (avformat version 52.13): support libavdevice for video capture in VideoTexture module (BGE). Makefile, CMake, scons updated. FFmpeg binaries will have to be rebuilt for certain OS (irix), win32 binaries already up to date. You MUST do a clean rebuild after this patch. Scons users: pay attention that the config/<os>-config.py files have changed, adapt your user-config.py in consequence 2008-12-17 20:52:39 +00:00
7a5186c53f 2.5
Added operator for moving area to 'full screen'.
This is instable with tooltips on... fishy stuff then goes on,
which Brecht will first look at. :)
2008-12-17 19:40:19 +00:00
6634ed9a87 2.5
Added screen-set notifier. Works for arrow keys now. For those who
know the messy old code, admire the simple 2-function call method
now :) Only context setting is messy a bit, that'll be solved.

Also: removed redundant code, and move freeing window handlers up
one level; windows can keep their handlers while screen switches.
2008-12-17 17:33:45 +00:00
065155a17d UI:
* Changed pupmenu function name and added back some standard popups.
2008-12-17 16:53:56 +00:00
3051647c98 2.5
Patch from Michael Fox; adding operator + key definitions for arrow keys, 
to change frame.
2008-12-17 16:21:14 +00:00
d6b677ba42 2.5
Small commit, too much fun to not do separately:

- removed notifier restriction to go only to own window, so multiwindow
  setups redraw correctly. (when other windows show other scenes we have
  to handle still).
- fixed cursor type outside of window (got stuck to area-move cursor).
2008-12-17 15:51:32 +00:00
07d63eb679 2.5
- Made a nice generic 'OK confirm' implementation for operators.
  Just use in operator type definition this line:

  ot->invoke= WM_operator_confirm;

  It will autmatically use operator name for asking OK. It will
  also use properties (if set before).

  Note for Brecht: the test okee_operator() you coded could better not
  be used in operators themselves.

  In future we can also add menus that get automatically generated
  based on operator properties. Like 'add constraint' showing the
  constraint types.

- Added this confirm call for most of the keys you'd expect it for.
  (user settings, delete marker, rip area, split region, etc).

- Cleanup: moved ed_markers.c to the util/ directory, it doesnt belong
  in space_time. Also made separate function for the marker keymap
  definition.

- removed ancient redraw notifier from ghost event level (every key
  press gave full screen draw)
2008-12-17 15:38:40 +00:00
616edcca12 View2D: Cleanup of presets and fixed errors in various views
Now, preset view configurations are only to be used if they define all (scrollers not included) relevant settings for the view they are set for. This should be less confusing than in the previous situation with V2D_COMMONVIEW_TIMELINE stuff.

One implication of this though, is that all Animation Editors (for example), will have to define their own version of the relatively commonly shared info. However, given the great diversity in the range of settings each have, this should not be too much of an issue.

Also, added a 'standard' view config for main 'window' regions. At this stage, it is recommended that this view config should be used only as a placeholder template on which a set of custom settings could be based. I've put it into use for the buttons window/scripts window/info window so far.
2008-12-17 10:25:02 +00:00
Nathan Letwory
3c886d7c38 * commit r17900 by Genscher was wrong.
- Instead of defining such defines for the entire codebase in Blender.py, add
    the right checks and definitions to the places where it matters.
  - Only check+set WITH_BULLET instead of also GAMEBLENDER=1
  - NOTE: No global defines allowed in BlenderLib.
2008-12-17 05:40:40 +00:00
9776749438 Reverting revision 17417 which broke cloth collisions which check also in blenkernel/intern for WITH_BULLET 2008-12-17 00:41:07 +00:00
7714f17eca Applying scons compiling fix for windows/mingw (to get compiler warnings to show up). This has already been applied in other branches too 2008-12-16 22:57:15 +00:00
0611154cfe Flatten and Cut Out tools for correcting errors in strokes.
Ogg Video: http://blenderartists.org/~theeth/bf/etch-a-ton/gesture_command.ogv
Vimeo: http://vimeo.com/2546077
2008-12-16 21:07:12 +00:00
c1379f6613 UI:
* Added support for defining properties for operator buttons, with
  uiButGetOperatorPtrRNA. Needed to cleanup a hack that was there
  for operator properties in RNA, now a separate OperatorProperties
  type is used for storing operator properties, instead of being part
  of the Operator type itself.
* Allow selecting menu items with mouse release instead of press again.
* Fix some cases with hanging tooltips in the UI.
2008-12-16 20:03:28 +00:00
962870b235 2.5
More notifier and redraw cleanup

- notifiers are not filtered anymore, apart from window/screen notifiers,
  they get to all regions.
- fixed drawing of 'action zones' in areas.
- added support for basic multilayer draw, like for action zones now,
  and future other area decorations (tabs, region handlers)
  check: ED_area_overdraw_flush()
         ED_area_overdraw()
- bugfix in UI redraw tags, it was calling region pointer in free'd
  data
- added notifier for marker-changed
- added keymap for markers to ipo window
2008-12-16 18:42:12 +00:00
e34528e1a6 UI:
* Only open tooltip when the mouse is still over the button.
* Remove an unnecessary redraw call, though the two mentioned
  in the previous commit seem to be working OK (it's for action
  buttons when you move the mouse away from the button, holding
  the mouse button down).
* Fix missing alt key in key event strings.
2008-12-16 17:36:51 +00:00
6c2750a6fe Added "bpydoc" to the global namespace of python scripts, making documentation available no matter what data is open in the current blend file, Directory type was also missing from the subtype enum causing the test rna-dump script to fail. 2008-12-16 16:32:48 +00:00
67dfe58f8c 2.5
Test for Brecht: this line makes drawing buttons fine. 
However note:

- redraws on lines 3107 and 3024 don't do anything
- tooltip timer is messing with redraws too, if you
  have tooltips on, it continuously sends redraws.
- I would code tooltip to reset on any mouse move, 
  and only start timer when mouse is still completely.
  That would make them appear much more quietly.
2008-12-16 13:49:51 +00:00
626e5c8b42 2.5
More notifier cleanup;

- removed view2d sync notifier, its data operations are too complex
  for UI hints/notes, direct calls work too :)
- updated missing gpl header in region file

Noticed weird delay on menu refreshing now... will check.
2008-12-16 13:19:02 +00:00
882d85a968 Patch from Banlu Kemiyatorn
replace VecMulf(var,-1) with new VecNegf(var) function.
2008-12-16 12:32:10 +00:00
6fe19cfc85 2.5
Work on getting notifiers in shape.

- Most important: local (to own region or area) redraw notifiers 
  have been depricated. This is not a good or correct notifier anyway. 
  Notifiers should be signals to other areas.

- Instead use these 2 functions:
    ED_area_tag_redraw(area);
    ED_region_tag_redraw(region);
  It seems to me good convention to keep the area/region redraw tag
  itself protected everywhere, for future improvements.

- Also added a basic WM function that checks overlapping regions,
  and flushes redraws to underlying regions. This makes menus and
  buttons allow to only send local region redraws.
  (Brought back two "swapbuffer indicators" to test this. 

- Todo: area 'action zone' redraws, and fixing other notifiers...
  sending data pointers in a notifier seems to be bad idea.
2008-12-16 12:28:00 +00:00
4da3c4b9d5 fix for [bf-blender-Bug Tracker][18089] scons compiling bug
and removed unused vars
2008-12-16 11:26:55 +00:00
f518fa8ea7 View2D: Presets for Initialising Views
Improved the View2D API so that initialising View2D data in init() callbacks (called on new regions and also on resizing regions) for regions is easier. 

Added a few preset view configurations for use when initialising new views. Views with the V2D_IS_INITIALISED flag set will not be reinitialised in the init() callbacks. Currently, some of these configurations will set/override all settings (like V2D_COMMONVIEW_LIST and V2D_COMMONVIEW_HEADER), while other ones serve a more supplimentary role (i.e. V2D_COMMONVIEW_TIMELINE only sets the x-axis settings, relying on the region to have already set the relevant y-axis settings). 
The future of such supplimentary configurations is yet to be seen, as I'm currently not sure whether they will cause the code to become too confusing, as you'd have to keep track of which settings belong/are set where. So far, only a few areas have been ported to use this. Tomorrow I'll check on a few more.

As this commit touches a lot of files, hopefully there aren't any critical bugs I've missed here.
2008-12-16 11:24:24 +00:00
998e682fc3 UI: added the following functions to create buttons for RNA properties and for
operators. RNA property buttons will automatically fill in the label, min/max,
etc if they are not specified. Operator menu buttons will look up the key
combination in the handlers and add it automatically.

uiDefButR, uiDefIconButR, uiDefIconTextButR
uiDefButO, uiDefIconButO, uiDefIconTextButO

uiDefButO takes a context pointer to do the key lookup, don't really like this..
2008-12-16 07:55:43 +00:00
99575d31ff 2.5: Fix crash in sequencer reading code. 2008-12-16 07:53:59 +00:00
1c1c89262e WM: changed WM_operator_call to take an argument, which specifies in
which context to run the operator: WM_OP_DEFAULT, WM_OP_REGION_WIN,
WM_OP_AREA or WM_OP_SCREEN. This also replaces WM_operator_call_rwin
since it is more general.

This is useful for buttons and popup menus to run operators, and also
used by a new function to lookup the keymap item for that operator in
the right context.
2008-12-16 07:44:21 +00:00
d272300da9 UI: bring back function to convert keyboard event to string, and
make the key event button work again.
2008-12-16 07:32:12 +00:00
Chris Want
024b4b3dda B
Linking of blenderplayer was failing with unresolved symbols
(initVideoTexture) when building without FFMPEG. Needs
testing with SCons and Makefiles.
2008-12-15 20:53:45 +00:00
89101d51bc 2.5
Undo last commit to save screen redraws on are switching, 
seems some initialize is missing.
2008-12-15 19:41:46 +00:00
98d710bd16 Depricated Image Select window, so it doesnt crash :) 2008-12-15 19:29:53 +00:00
6283b0c8c5 UI: getting popup menus to work again, just the internal interface
and event handling code still, how it integrates with operators and
handlers is not worked out yet. For testing, Ctrl+Q quit now shows
a confirmation popup using the following call:

okee_operator(C, "WM_OT_exit_blender", "Quit Blender");
2008-12-15 19:19:39 +00:00
aad5e49701 2.5
Small improvements;

- switch spacedata now doesn't cause full screen refresh and draw
- cursor switching is not part of SCREEN_CHANGED notifier, this
  makes area dragging ugly.
2008-12-15 18:43:18 +00:00
628f02d574 2.5
Added notifiers for timeline syncing. Works for Timeline window
only now.
Note that I've removed the malloc-free in a Notifier... notifier
system is still under probabtion :)
2008-12-15 18:09:55 +00:00
Chris Want
b99f74c8e8 Make sure that WITH_OPENEXR is defined when sources are configured
with OpenEXR in the CMake system. This is a compilation fix from
Miguel A. Figueroa Villanueva for building Debug versions of Blender
using OpenEXR (thanks!).
2008-12-15 17:47:57 +00:00
a16df53619 2.5
Mouse cursors now work again

- centralized screen-level cursor changes, no more operator
  running for it.
- spacetypes have callback to check/set individual cursor
  types. Use notifier SCREEN_CHANGED to make sure it works
  on mode changes etc.
- new calls WM_cursor_modal() and WM_cursor_restore() to
  make temporarily cursor types during modes.
- used above for view2d cursors.
2008-12-15 16:54:47 +00:00
c13bb258b1 RNA:
Added some functionality to make inspecting all RNA structs possible. Not used
yet, but can be tested by replacing this line in space_outliner.c:

RNA_main_pointer_create(G.main, &cell.ptr);

with:

RNA_blender_rna_pointer_create(&cell.ptr);
2008-12-15 13:46:50 +00:00
a1e0868018 2.5
- depricated area "headbutofs" and "headbutlen", which is now fully
  replaced with view2d handling. 
- needed to add header default V2D_ALIGN_NO_NEG_Y, V2D_LOCKOFS_Y seems
  to not do anything atm :) 

- new: running blender in debug (blender -d) will print the current
  handler and operator in use (not mousemove)
2008-12-15 13:23:55 +00:00
d48f4b6012 2.5: added support for setting RNA properties in keymap item,
which will then be set when the operator is called, example:

kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, 0, 0);
RNA_enum_set(kmi->ptr, "dir", 'h');

kmi= WM_keymap_add_item(keymap, "ED_SCR_OT_region_split", SKEY, KM_PRESS, KM_SHIFT, 0);
RNA_enum_set(kmi->ptr, "dir", 'v');

There is a hack I had to do here, since properties are defined
as member of wmOperator, will try to fix later, committing now
so it can be used already.
2008-12-15 13:10:29 +00:00
b4aef16733 2.5
Testing toy for space editor devs: press F5key in header or channel list
(or any 'alignment constrained' region to flip it to other side.
2008-12-15 11:59:42 +00:00
21ca594625 View2D: Simplification and documentation of settings
I've gone through and simplified some of the redundant options while documenting the various settings (in the code and also in the Wiki Doc), to make it clearer how to use each option.

'Preset' view-types have yet to be fully implemented, but started groundwork for this. Only some commonly used view configurations will be defined using this method. For all others, they still need to define all relavent view settings themselves (as there's too much variation in terms of the various editor's use of View2D).

IPO Editor now draws with channels on the left, like all other anim editors. Now, how to make this wider...
2008-12-15 11:58:57 +00:00
f7106acde8 2.5
funtion WM_keymap_add_item() now returns keymap-item, so you can use it
to set default properties for operators with WM_keymap_property_set().

Brecht will fill in this function, requires rna magic!

Example: an operator ED_OB_OT_add_primitive can be configured with
keymap like this:

WM_keymap_property_set(keymapitem, "Primitivetype", "Sphere");

Similar conventions we can use later for button/menu calls.
This will make creating operators easier, allowing a developer to group
tools functionality nicely.
2008-12-15 11:45:17 +00:00
4a6d3b2ded RNA:
* DNA_sequence_types.h done, patch by Roelf de Kock, with various changes,
  mainly the use of inheritance for different sequence types and hiding the
  separate Strip struct.
2008-12-15 10:48:04 +00:00
4d21036829 bugfix #17989
Patch from Xavier Thomas.

Compositor, filter node, had shifted output when used on single-value
buffers.
2008-12-15 08:37:39 +00:00
d99686a783 Touch/NoOverwrite options were not disabled for video. 2008-12-15 08:29:31 +00:00
7124d321d8 * msvc compile fix 2008-12-15 05:49:56 +00:00
Ken Hughes
ba6972eb4d Python API
----------
Bugfix #18044: missing return statements in getter for displacement modifier
caused incorrect values to be returned.
2008-12-15 05:30:09 +00:00
ed7bf5a479 2.50: added sequence.c in blenkernel for sequencer functionality
that is not supposed to be in the editor but at blenkernel level
to avoid bad level calls. Added sequencer free and strip iterator
functions there and used them to make sequencer data load/save
work again.
2008-12-15 05:21:44 +00:00
e7c0666d96 DXF exporter, dxf-library.py updated
v1.28 - 2008.12.13 by Steeve/BlenderArtists
- bugfix for EXTMIN/EXTMAX to suit Cycas-CAD
2008-12-14 21:26:24 +00:00
b1e07d13ec 2.5
Small fix: in the ghost part of WM event handling, a function was
setting 'active subwindow' and registering headers to be drawn active
for this or not. It should be nicely inside the handler queue, so
it doesnt get executed on modal window-handlers. 

(This solves flashing area headers while dragging area edges)

Still needed to resolve how screen handling goes... via handlers
with operators? On my list to keep track of. :)
2008-12-14 19:04:20 +00:00
c794e13ba3 bugfix in pickMeshRayFaceWeight() in bpymodules/BPyMesh.py 2008-12-14 18:39:58 +00:00
5858ce4495 2.5 MSVC9 projectfiles
update for space_action, space_nla,  space_script, space_sequencer, space_text,space_sound.
2008-12-14 18:12:30 +00:00
84b293fbc3 2.5
OSX crashed on double-click the Finder Blender icon

Removed 7 years old hack to get the correct arguments for this case, it
was a terrible hack anyway. Needs proper code.
2008-12-14 18:04:31 +00:00
cc51a4f211 2.5
And area-joining is memory-error free again!
2008-12-14 17:48:52 +00:00
ec00764dd2 2.50: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17434:HEAD 2008-12-14 17:32:24 +00:00
131fa2e00c 2.5
Fix for crash on joining (previously splitted) areas.
Reason was the stored regions in pushed 'spaces' not being copied.

next: free running handlers on area join/split.
2008-12-14 17:25:46 +00:00
8be23f9490 2.5
Basics for the remaining 6 spacetypes. 

Note: Andrea prefers to merge SpaceImaSel with SpaceFile
for that I'll provide a good readfile.c patch later
2008-12-14 14:43:08 +00:00
965f872c3e Fix for memory leak and perhaps other issues on switching space types
in an area, the handlers (UI and keymap) were not removed.
2008-12-14 13:59:34 +00:00
d2a09da73f Fix scons warning for space_file, also sorted items alphabetically. 2008-12-14 13:42:25 +00:00
3c14eba045 UI: fix for delayed UI callback functions, to avoid it being
called recursively.
2008-12-14 13:38:24 +00:00
Nathan Letwory
914a0aa8f4 * missing include path 2008-12-14 13:24:22 +00:00
8beed4b033 2.5 MSVC9 projectfiles
update for space_info and new files in space_file.
2008-12-14 13:03:33 +00:00
a4b6ee672d 2.5
- Added file space (too) :) Andrea was first, this is more
  complete.
- Suggestion from Joshua: move all standard header buttons to
  1 function, makes it all easier, less code, and less area/space 
  stuff needs to be exposed.
2008-12-14 12:16:55 +00:00
21e01ccac3 2.5
Second attempt at fixing crashing when merging spaces after splitting them.
2008-12-14 11:55:49 +00:00
fd1c8aa62e View2D: More scroller related things
* Scrollers now keep corners free for drawing widgets if there are horizontal and vertical ones in use. They draw a rect which covers up all of the excess over-flowing drawing that was previously masked by the vertical scrollers.

* Tweaked the behaviour of the scroller zoom-handles again as they still weren't behaving correctly on vertical scrollers. This was partly caused by a typo, but also wrong checks...
2008-12-14 11:50:28 +00:00
f436bc8327 added missing directory for space_file to Makefile, sorry 2008-12-14 11:43:38 +00:00
Nathan Letwory
af0ab8b72b * add space_file sconscript reference too. 2008-12-14 11:41:16 +00:00
dcdca963b0 2.5:
Fixed more crashers in screen/region/area/spacetype freeing code... 

Hint to Ton: watch how you're getting the pointer to the next item in the list when freeing the list ;)
2008-12-14 11:39:00 +00:00
a3c77e4d9e 2.5
Skeleton for bringing back SpaceFile.
Code to initialize the SpaceFile struct missing still, I think this is the right time to cleanup there :)
2008-12-14 11:25:00 +00:00
36fb509f96 View2D: Bugfixes...
* Headers were twitching when moved again due to a hack I had made for the TimeLine
* Properly fixed TimeLine init so that grid will start in the right place.
2008-12-14 10:57:52 +00:00
3a58eddec5 2.5
The basics for InfoSpace.
Also added InfoSpace data to area by default, older files allowed to
have nothing here (space empty). (prevents reported crasher in switching
space info to others).

Also: added ifdeffed code in readfile.c to debug missing memory frees
from data read from files. (instead of "data from SCR" it will print
the actual struct names).
2008-12-14 10:52:48 +00:00
616ab233fa == MSVC9 projectfiles ==
* lots of updates for space types/ editors: ipo, view3d, node and image
* rna: update for constraints and armatures
2008-12-14 10:33:18 +00:00
7e6c5b912d 2.5
Added freeing functions in outliner space, this makes blender quit
without memory free errors in my test .b.blends.

Note: I'll move current rna viewer to new SpaceData editor, then I
can bring back original outliner stuff. Proposed menu name is
"Data Viewer". Probably better not not expose name 'rna' in UI?
2008-12-14 10:08:00 +00:00
93f3eaafea 2.5 - Fixed crashes when merging areas 2008-12-14 09:11:31 +00:00
ffc0089b7b View2D: Cosmetic changes and bugfixes
* Scrollers now draw using nice rounded+shaded style everywhere

* When scrollers 'bubble' completely fills a scroller or is completely out of view, the view zooming using the handles is now only activated if the mouse is within a quarter of the total length of the scroller on either end of the scroller. Otherwise, pan is activated. This should make the scrollers more usable in anim editors.

* Fixed drawing of gridlines in TimeLine - needed to adjust ymin value of cur and tot rects to accomodate for the new mask/cur adjustments as old TimeLines didn't draw with 'real' scrollbars. Also, adjusted min/max values to fit these new tot/cur rect y-sizes.

* Tidying up vars and fixing errors in declaring new View2D types in preparation for simpler method of initialising views...
2008-12-14 08:32:21 +00:00
5f55aa43d0 * Compile fixes for voxeldata.c (thanks jms)
* Fixed a typo in the patch that made trilinear interpolation really slow

* Replaced the patch's trilinear interpolation code with the existing trilinear code from pbrt / light cache (first stage of unifying this voxel interpolation code)
2008-12-14 02:22:29 +00:00
ba8ea9ec63 2008-12-13 23:11:12 +00:00
b9713d19e4 adding hint
Building on NSIS_Installer fails when path to NSIS tools is not set
2008-12-13 23:04:36 +00:00
213f30078c 2.5
Added missing basic callbacks for region drawing of view3d and 
ipo channels.
2008-12-13 19:08:44 +00:00
2493644509 2.5
Added basics for oour precious Buttons Window. The one that will be
(OH NO!) vertical one day? ;)
2008-12-13 19:00:54 +00:00
04e264a7a2 2.5
The basics for Node Space.... no complaints sofar :)
2008-12-13 18:09:49 +00:00
e0ab792cf6 2.5
Added basic code for Space Image. Now let's check if this
commit has all it needed :)
2008-12-13 17:44:30 +00:00
f8aa295596 projection paint cleanup (nothing to see here)
* BarycentricWeightsPersp2f was calling BarycentricWeights2f, and re-weighting. Changed so the re-weighting isnt needed.
* replaced tri_depth_2d with VecZDepthOrtho and VecZDepthPersp
* project_paint_occlude_ptv_clip now calls project_paint_occlude_ptv to remove duplicate code.
2008-12-13 16:11:52 +00:00
e6897deec1 2.5
Bugfix in the "map cur with mask to region". Division had to be switched. :)
2008-12-13 11:34:03 +00:00
4de30b2304 View2D:
* Grid calculation now takes separate args for x/y units and clamping
* Timeline now gets V2D_LOCKZOOM_Y flag to prevent zooming in y-axis
2008-12-13 09:25:47 +00:00
c2f037da07 and the new voxel data files.. 2008-12-13 05:43:10 +00:00
92f5c719ae * Volume Rendering: Voxel data
This commit introduces a new texture ('Voxel Data'), used to load up saved voxel 
data sets for rendering, contributed by Raúl 'farsthary' Fernández Hernández 
with some additional tweaks. Thanks, Raúl!

The texture works similar to the existing point density texture, currently it 
only provides intensity information, which can then be mapped (for example) to 
density in a volume material. This is an early version, intended to read the 
voxel format saved by Raúl's command line simulators, in future revisions 
there's potential for making a more full-featured 'Blender voxel file format', 
and also for supporting other formats too.

Note: Due to some subtleties in Raúl's existing released simulators, in  order 
to load them correctly the voxel data texture, you'll need to raise the 
'resolution' value by 2. So if you baked out the simulation at resolution 50, 
enter 52 for the resolution in the texture panel. This can possibly be fixed in 
the simulator later on.

Right now, the way the texture is mapped is just in the space 0,0,0 <-> 1,1,1 
and it can appear rotated 90 degrees incorrectly. This will be tackled, for now, 
probably the easiest way to map it is with and empty, using Map Input -> Object.

Smoke test: http://www.vimeo.com/2449270

One more note, trilinear interpolation seems a bit slow at the moment, we'll 
look into this.

For curiosity, while testing/debugging this, I made a script that exports a mesh 
to voxel data. Here's a test of grogan (www.kajimba.com) converted to voxels, 
rendered as a volume: http://www.vimeo.com/2512028

The script is available here: http://mke3.net/projects/bpython/export_object_voxeldata.py

* Another smaller thing, brought back early ray termination (was disabled 
previously for debugging) and made it user configurable. It now appears as a new 
value in the volume material: 'Depth Cutoff'. For some background info on what 
this does, check:
http://farsthary.wordpress.com/2008/12/11/cutting-down-render-times/

* Also some disabled work-in-progess code for light cache
2008-12-13 05:41:34 +00:00
9f06ed1b36 RNA: start of wrapping for Constraints
Still need to find out how to get the variable struct-type for constraint->data to work correctly. Any ideas brecht?
2008-12-12 23:30:23 +00:00
e83b5fabbf View2d: Removing some debug code I left in... 2008-12-12 23:28:47 +00:00
56557f223f 2.5 - Assorted View2D related fixes
IPO Editor Fixes:
* Grid now draws correct. Fixed typo in gridline calculations preventing drawing from occurring. Also, set the right arguments to the appropriate View2D calls.
* Limited Ton's cur<->mask mapping 'hack' to Outliner only, as it was causing problems with the drawing of the grid. Perhaps there's still some faulty code in curRect_validate that should be changed instead...
* Horizontal scroller draws frames now by default. However, the values are still offset a bit, so will need further investigation.

Outliner Fixes:
* Fixed overlapping text problem with RNA-path and menus. Now RNA path draws as a label beside the menus, so there shouldn't be any more problems there.
* do_versions code now sets all appropriate flags, as old OOPS views could cause errors with scroller drawing + view manipulation operators which depend on flags being set.
2008-12-12 23:25:54 +00:00
Nathan Letwory
f3dc0ba876 * spacetype time -> spacetype ipo 2008-12-12 20:59:59 +00:00
e8effb2d0f started whiping cmake into shape for 2.5 still need to figure out
the rna stuff but its close.  Need to get it working for
blender then copy over same to game engine.

Kent
2008-12-12 20:41:30 +00:00
Nathan Letwory
0956f78d69 * To have IPO editor get both compiled and link, we also make sure it is actually built and linked to. 2008-12-12 20:11:45 +00:00
f2884fed5c 2.5
Another make file...
2008-12-12 19:19:09 +00:00
aa40953210 Projection Painting, merge from branch
Additions/Features...
 - Painting onto multiple images at once.
 - Clone with an offset similar to the gimp, also an option to clone between UV layers, (not both offset and between layers atm)
 - Stencil layer, similar to The Gimp's quickmask.
 - Face mask mode - (painting onto only selected faces).
 - Texture brushes (so image and texture-node brushes too)
 - Seam bleed so you don't see gaps when painting over UV seams (new option set in the panit panel)
 - Occlusion (only point onto the first face under the paintbrush, can also be used for masking out parts of the model to paint onto) - (new option set in the paint panel)
 - Muti-threaded, each thread operates on its own bucket.
 - Support partial updates to speedup OpenGL texture refreshing.
 - Support tile based multiple undo's
 - Support float image buffers.
 - Backface culling (new option set in the paint panel)
 - All color blending modes - Add/Multiply.. etc.
 - Airbrush rate. (used to be broken) 
 - Improve the way paint is mixed when painting, so painting with 0.2 alpha will not accumulate above 0.2 alpha on the image as you paint.
 - Option to use normals to fade out strokes on the edge of a surface to avoid ugly edges. (same as Vertex Paints "Normal" option) 

Known Problems
 - Not directly related to painting but changes in selection flags are not updated on the final derived mesh.
 - Smear tool has some distortion when in perspective mode. 
 - While in perspective view any faces with 1 vert behind the viewpoint, will be completely ignored.
 - Painting can be initially slow while buckets are being initialized, a number of solutions exist.
 - Size 1 brushes don't work yet.
 - When painting onto large faces its still possible to get artifacts.
 - Spatial optimizations are needed to skip occluded faces and test pixel occlusion. (will look into using blenders BVH )
2008-12-12 18:59:17 +00:00
3b9781ba0d 2.5
Scons was missing WM includes
2008-12-12 18:56:15 +00:00
a46ddac1a9 2.5
- Added rudimentary support for Ipo window
  (Joshua can check on view2d issues for this? :)

- removed ED_area.h, added ED_space_api.h
2008-12-12 18:47:12 +00:00
696ef1afd2 minor changes 2008-12-12 18:31:34 +00:00
6f78cdd79f view.c
* Renamed view_autodist to view_mouse_depth
 * Accept args for mouse location and pixel distance around the hotspot used to lookup the depth.
 * removed persp(PERSP_VIEW) within this function, since it didnt set the view back.

imagepaint.c
 * normal falloff now works as Brecht suggests. Normal limit of 80 will blend between 80 and 85deg,  70deg limit blends between 70-80deg.
 * convert normal falloff to radians on initializing rather then on every comparison.
 * Ctrl+Click setting the cursor in its own function.
 * projection painting wasnt accounting for an exception for too high pressure values on first touch in windows for some tablets.
 * removed grease pencil benchmark function
2008-12-12 17:56:19 +00:00
faf7965b3c 2.5
- found fix for time-space view2d when increasing height of area,   it has min/max Y zoom stored based on size of area... needs 
  smarter way.

- outliner: header file added, area switch menu + dummy pulldown. 
  this will become template for other space types...
2008-12-12 17:10:54 +00:00
2fa23a0594 2.5
Fixes in view2d:

- mask/slider rects were calculated wrong 1 pixel (was overlapping)
- found bug with outliner stretching on area-edge-dragging. It required
  an extra mapping of the 'cur view' via mask to actual region.
- added v2d sanity check for uninitialized v2d's
- removed cruft in do_versions for headers (gets catched with above)
- added header-view2d-initialize function, for new-space calls

Fixes in areamanager:

- fixes in 'new space' for time/outliner/view2d
  (unfinished)

For Joshua:

- Making time window higher shows it doesn't update 'cur'. Not sure
  what kind of v2d flag should be checked or set?
2008-12-12 16:29:33 +00:00
05e5e00bc9 View2D: Cosmetic tweaks for scrollers
Scrollers now draw in the 'rounded + shaded' style as much of the rest of Blender now. This is just a rough draft of what they could look like (vertical scrollbers in particular highlight the need for a complementary version of gl_round_box_shade).
2008-12-12 11:41:05 +00:00
e02c15151f 2.5
Removed notifier SCREEN_CHANGED from creating menus or tooltips.
This one is used to re-initialize spaces, areas, regions in screen.
2008-12-12 10:55:36 +00:00
7f3a34d16c 2.5
Resolved cyclic calls for editors. 
Now there's a space_api/ module, here you can use functions calling
other editor modules. The functions in the module are only used by
the WindowManager module to initialize space types.

Note for sconzers and MSVC and cmake: the proper linking order for
editors is:

- space_api
- space_xxx
- object / mesh / transform / etc
- interface
- util / datafiles
- screen
2008-12-12 10:18:26 +00:00
e94dae4c03 VRML/X3D
* Improved compatibility with VRML files
* Extract strings so they dont get modified for parsing, filename URL's with {} [] dont break importing anymore.
* Cameras were rotated incorrectly
* inline files were not opened with GZip
* Animation Support - currently only loc/scale/rot (scale untested)
* Lists of image URLs now use the first image from the list since there is no support for dynamic switching.
* use imagemagick to convert GIF's so they load in linux. (WIP - could be extended, At least it should not break anything)

BPyMathutils angle2ToLength function could be simplified (pointed out by brecht)
2008-12-12 05:46:07 +00:00
6f6eee0923 2.5 - Fixed crashes when closing windows 2008-12-11 23:05:18 +00:00
1ecf855276 VideoTexture.ImageMirror: if the mirror is horizontal in mesh coord, take the Y axis as the up direction for the UV map. If the mirror is not perfectly vertical(horizontal), the projection of the Z(Y) axis on the mirror plane is the mirror Up direction. 2008-12-11 23:02:33 +00:00
b7426ab4e2 2.5 - Compiling fix (ED_newspace not defined yet) 2008-12-11 22:30:24 +00:00
a10752f4bc UI: restored mechanism to only call button/block callback functions
after the menus are closed, to avoid conflicts with those callbacks
manipulating their own area or region.
2008-12-11 20:30:41 +00:00
7a1100c8b5 2.5
Today's progress; half working, but i better commit to prevent
conflicts tomorrow :)

- added storage for regions in spacedata
- added space switching (unfinished, gives mem-free errors)
- bugfix: icon of timewindow gave error on split-area
- cleaned interface_icons.c a bit, no warnings
- first work on space new() callbacks, they have to make regions too


NOTE: probably files saved with 2.5 crash now. Have to look at
patching this.

NOTE2: the Makefiles required libeditor screen twice... scons too?
2008-12-11 19:35:27 +00:00
d39b43aa20 2.5
TimeLine window pulldowns work sorta (for the options that were coded :)

Still trying to bring back code without recoding uiDefButs. In future these
will get directly operator stuff linked. For time being made a simple 
operator call function, like:

WM_operator_call(C, "ED_MARKER_OT_add");

and for forcing operator to run in the main region-window:

WM_operator_call_rwin(C, "ED_MARKER_OT_add");

These calls also work for modal operators, like marker grab in this case.
2008-12-11 15:38:16 +00:00
045306ae49 2.5
Small fix: Screen state  updating should be blocked while menus are open.
Caused draw errors for activated headers. Todo is: bring back separation
between window-handlers and screen-handlers, to solve this?
2008-12-11 14:59:57 +00:00
3c0c5e04bb RNA - Finished wrapping Armatures + Bones
Notes: 
- I'm not sure whether we want to move out the PoseMode hide flags from here, but PoseChannels directly get most of their flags from here.
- Some of the settings for Bones have not been exposed, as they are mostly internal flags or used only by transform
- I'm not sure whether we should be exposing EditMode settings like head/tail/roll directly here...
2008-12-11 10:36:40 +00:00
9fa6b03ea7 View2D: Various Fixes + Header Support
Added support for panning headers using View2D of the header regions (only done for TimeLine, as only that one has buttons on it). 
Currently, this uses some do_versions magic to initialise the View2D rects required, however, I'm not sure if all the information was safely ported over yet (notably height and position of rects due to alignment issues).

In the process, I noticed a few bugs with the current View2D code:
* UI_view2d_curRect_validate() is now called after UI_view2d_size_update(), as the size of the 'mask' rect is closely related to the size of the 'cur' rect (especially when zooming is locked).
* Fixed a bug in UI_view2d_curRect_validate() which meant that if the 'cur' rect was slightly larger than the 'tot' rect, and keeptot was set, the view would flicker between the two closely related positions.
2008-12-11 03:50:50 +00:00
f00a75272e UI:
* Added context pointer to function callbacks for buttons and blocks.
* Added a uiBlockSetHandleFunc, which will be called with the button
  return value. This seems kind of redundant with uiBlockSetButmFunc,
  but the latter uses a2 to pass the value.
2008-12-10 19:22:10 +00:00
64f9c67ca8 2.5
- Brought back (most of) buttons in TimeLine window.
  They don't work yet though! Waiting for Brecht to commit callbacks
  for menus and ui-blocks

- Area headers hilite again when mouse is inside.
2008-12-10 17:58:18 +00:00
acce05c7e4 2.5
Fix: on quit with a ghost event, windows were freed without freeing screens.
2008-12-10 15:12:46 +00:00
54c4ed469a 2.5
Cleanup in area/region management

- more intelligence in area management for adding handlers and setting
  data correct. Space/Region type callbacks only have to do own things.

- added option for adding default handlers to areas/regions. (flag in
  type definition)

- ensured that region-types store the minsizes for regions.

- added boundbox check for handlers; note that it accepts pointer to
  boundbox, because handlers don't get reset on area-resizing or
  view changes. Example: view2d handlers use mask rect.

- handlers get now added on correct context levels (example frame change
  also worked in header)

- removed ->refresh() callback. Context refreshing is Listener.
  
- the ->init() is being called on all WM level actions, also after a
  file read, moving areas, re-opening areas etc. 

- fixed bug: crash on exit was caused by cleaning up Screen too late.

- UI_view2d_size_update() removed from draw callback, is init()

- regions now store (winx, winy) subwindow size.
2008-12-10 13:56:54 +00:00
1fdb9da2a7 RNA - Wrapped a few more Armature/Bone settings
* I've only got a few more Armature settings to go (path stuff)
* Bones have still only got name + layers so far
2008-12-10 12:00:36 +00:00
6dc2714c78 fix for [18069] open nurbs curve snaps end to centerpoint
made nurbs surface curves use the same number of points as nurbs curves.
2008-12-10 11:42:26 +00:00
2ef5af67ca merge from trunk - r17500 to HEAD 2008-12-10 09:45:48 +00:00
a8726cd9c3 View2D - Bugfixes
Fixed a few typos in View2D code, which included the zoom-locking flags not being checked for correctly by the zoom operators. 

This commit does NOT fix the problems with the Outliner 'cur' rect expanding/contracting as the view changes size. I still haven't found the cause of this, but it might be related to the off-by-1 errors with UI-widgets that brecht noted in TimeLine header...
2008-12-10 09:07:15 +00:00
2f39ae3b2e move the paint buttons from the image view and buttons window into one function. 2008-12-10 05:41:21 +00:00
4a9ee46c14 UI: don't use operators anymore for handling user interface events, but rather
a special UI handler which makes the code clearer. This UI handler is attached
to the region along with other handlers, and also gets a callback when all
handlers for the region are removed to ensure things are properly cleaned up.
This should fix XXX's in the UI code related to events and context switching.

Most of the changes are in interface_handlers.c, which was renamed from
interface_ops.c, to convert operators to the UI handler. UI code notes:
* uiBeginBlock/uiEndBlock/uiFreeBlocks now takes a context argument, this is
  required to properly cancel things like timers or tooltips when the region
  gets removed.
* UI_add_region_handlers will add the region level UI handlers, to be used
  when adding keymap handlers etc. This replaces the UI keymap.
* When the UI code starts a modal interaction (number sliding, text editing,
  opening a menu, ..), it will add an UI handler at the window level which
  will block events.

Windowmanager changes:
* Added an UI handler next to the existing keymap and operator modal handlers.
  It has an event handling and remove callback, and like operator modal handlers
  will remember the area and region if it is registered at the window level.
* Removed the MESSAGE event.
* Operator cancel and UI handler remove callbacks now get the
  window/area/region restored in the context, like the operator modal and UI
  handler event callbacks.
* Regions now receive MOUSEMOVE events for the mouse going outside of the
  region. This was already happening for areas, but UI buttons are at the region
  level so we need it there.

Issues:
* Tooltips and menus stay open when switching to another window, and button
  highlight doesn't work without moving the mouse first when Blender starts up.
  I tried using some events like Q_FIRSTTIME, WINTHAW, but those don't seem to
  arrive..
* Timeline header buttons seem to be moving one pixel or so sometimes when
  interacting with them.
* Seems not due to this commit, but UI and keymap handlers are leaking. It
  seems that handlers are being added to regions in all screens, also in regions
  of areas that are not visible, but these handlers are not removed. Probably
  there should only be handlers in visible regions?
2008-12-10 04:36:33 +00:00
ce5b9d21a7 tweaks to brush falloff and alpha, giving nicer looking strokes. 2008-12-10 03:13:48 +00:00
6651af413d When not using quick mode, automatically select the last drawn stroke. 2008-12-09 21:25:30 +00:00
2b9a6251d1 Reeb graph filtering
Add exception to normal nodes preservation when that node is the root node. In that case, pruning the arc is A-OK and in fact needed.
2008-12-09 20:46:25 +00:00
b205ec4f18 2.5
Area Manager: revised how an area subdivision gets managed. Originally
the 'spacedata' would store regiondata too, but this already became
impractical (like having view2d data in region is useful). So I left
that part how it is. See new diagram:

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager

This means that regions in an Area define location/size or constraints
for how they get arranged. The "RegionType" which is linked to this 
defines its functionality. 

For fun, test, and code validation: two temporary hotkeys added.
SKEY: splits current region horizontally
SHIFT+S: splits vertically

Note - in outliner - that "context" sticks to the Area as whole, the region
here only defines view. That's the purpose. :) For two outliners with different
context you open 2 areas.
Also note that dragging screen-edges shows the region-alignment type (split
with percentage).
2008-12-09 15:59:43 +00:00
42f792309f bugfix - [#18063] Projection paint branch: draw tool "drops out" when model extends beyond view borders
reported by michael williamson.

Was caused by point inside triangle test using an error limit that didnt adjust for different size triangles.
2008-12-09 14:30:05 +00:00
cd47292745 ImageMirror: add clip attribute to limit clipping distance of mirror rendering 2008-12-09 14:16:10 +00:00
b9e04c67dc RNA: Start of RNA wrapping for Armatures
Wrapped most of Armature settings, but bones are not yet complete.
2008-12-09 11:29:40 +00:00
4251912b54 * tablet pressure changing opacity while painting didnt work
* pixels with <= the current opacity are not painted onto, speeds up painting especially with low spacing. (only when airbrush is disabled)
* use qsort rather then own crufty sorting function
* grouped projection painting functions together.
2008-12-09 08:21:53 +00:00
aef61a7000 wip commit to work on at home, nothing to see 2008-12-09 07:19:55 +00:00
13c634c7ba 2.5 - Swapped order for adding View2D keymaps in TimeLine so that they can still work. 2008-12-09 06:23:40 +00:00
12fbd936dd Fix mistake in last commit.. it's pic + 1 ;) 2008-12-09 04:57:42 +00:00
9e1da805e1 * Added back the GR: field for volume materials, limiting lighting to a certain group 2008-12-09 04:27:34 +00:00
1adb5b5442 patch from Mitchell Stokes
#18045] [patch] A patch that exposes the rest of the motion functions of KX_GameObject to Python.

*applyForce	=> setForce
*applyTorque	=> setTorque
*applyRotation	=> setDRot
*applyMovement	=> setDLoc
2008-12-09 04:13:23 +00:00
cac797eff6 Commit patch [#18057] by Dalai Felinto (dfelinto)
This implement the option of playback an animation using the
step value in the render panel (or -a -j).

Tested here and work fine, about the ffmpeg/avi bug it's my
fault, I don't think in "step + video format", so now it's
in my todo-list :)
2008-12-09 04:02:18 +00:00
93efabc0d9 Off by one error at the end of reeb and sketch iterators causing despair and dismay. 2008-12-09 00:46:05 +00:00
caf58fe4b2 == Python Space Handlers ==
- Old feature request: now space handlers can report release events, too. For that a new space handler type was added, here's the header for it:

# SPACEHANDLER.VIEW3D.EVENT.ALL

These scripts report both "presses and releases". For release events, Blender.eventValue is zero and Blender.link == Blender.SpaceHandlers.VIEW3D_EVENT_RELEASE. Check the API_related bpy doc for more info.

- Bug fix: left mouse clicks could be reported twice.

Important: for both the feature and the fix, to make the code nicer and to let space handlers become available in more situations, I moved the check for space handlers in space.c. Now it happens before checks for grease pencil, sculpt and left/right mouse button swapping. If this causes any problem (it shouldn't), please report.

PS: Thanks to Steven Truppe, who asked for this and even sent me a patch, but to preserve compatibility with existing event space handler scripts I did things in a different way.
2008-12-09 00:18:30 +00:00
ab40dd4053 2.5
Stupid error made blender not compile!
2008-12-08 19:16:47 +00:00
dc50e7fd3c 2.5
Minor cleanups.
2008-12-08 16:43:19 +00:00
02e23c16dd 2.5
Part one of wrapping up area/region management.
Read design doc here:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/AreaManager

This commit:
- brings keymap storage to WM, based on names/types. This structure
  allows rna-ifying it too, so you can browse keymaps etc.
- creating areas and regions works slightly different now, wich
  regiontypes stored in areatype.

Todo:
- better callbacks and structure for defining which handlers need to
  be added.
- using region types to validate regions
- proper implementation of local region data
- code method for customizing keymaps. Current idea is that you have
  to indicate an entire keymap to be custom, to prevent too complicated
  merging problems of default and custom maps (like order, multiple keys
  for same operator, disabling options, etc).
2008-12-08 15:02:57 +00:00
11e15bf689 View2D: Tweaks to make handles work better with no-clamping of bubble 2008-12-08 00:48:27 +00:00
af52f24fe4 fixing compile error 2008-12-08 00:40:27 +00:00
a09835a8f4 View2D: Modal Ctrl-MMB-drag Zoom Restored
Added back the Ctrl-MMB-drag zoom.
* It uses RNA-props for delta amounts to be added to the cur rect, as opposed to storing a transform factor like the others.
* Made the operator another repeatable one
* The user-pref Continue/Dolly/Scale options are still respected. Currently, this is not stored as an RNA-prop for repeated behaviour, as it is not necessary for this operator to function correctly (and also, this data would fall under 'context' info more)

Removed clamping of scroller 'bubble' to bounds of scroller, as it produced a confusing display when using handles to zoom view.
2008-12-07 23:54:41 +00:00
63b8fca5b3 View2D: Minor tweaks to scrollbar drawing
Handles on ends of bubble are now drawn as rects. When that axis is zoomable, the handles are darker than when they are not.
2008-12-07 22:19:41 +00:00
69298b7b76 * layer mask (similar to the gimp), uses a UV layer's image as mask for painting.
* cloning between layers was broken
* Added buttons for selecting the souce clone/mask layer in the UV layer list.
2008-12-07 19:24:41 +00:00
Nathan Letwory
f4d823fa02 * blenderlite works now on windows too.
- when WITH_BF_SDL=True entry-point is mainCTRStartup (due to SDL)
  - with WITH_BF_SDL=False this should be just main
2008-12-07 13:22:50 +00:00
ed015907df View2D: Scroller Manipulations
Implemented operator to work with scrollers. This should work reasonably well, but as always, more testing is needed.
* LMB-drag can now be used to initiate manipulations of scrollbars (so they can be dragged as per normal)
* By clicking on the 'dark regions' on the ends of the scroll bubble, it is possible to zoom the view (in a way similar to Sony Vegas scrollbars)

Tidied up code of other operators
* Re-labelled the current zoom operators, as there is still a modal click-drag zoom tool to be ported still
* Marked all of the existing view manipulation operators as redoable. Scrollers manipulator is not allowed to be redoable. 

Assorted changes:
* Added more flags for Outliner on reading old files, to prevent more weird things happening as code expects certain flags these days
2008-12-07 12:15:04 +00:00
Nathan Letwory
efdb726cf3 * put the PyRNA testing bit inside the DISABLE_PYTHON define, so we can use blenderlite as target too 2008-12-07 10:55:33 +00:00
00cc0f6852 split code for applying each paint tool into its own function. 2008-12-07 08:54:42 +00:00
b7fc71a3e2 View2D: Renamed a few API methods to follow standard naming conventions, and added define to use when an argument to these methods is irrelevant. 2008-12-07 06:21:06 +00:00
d2bfb9ae1d View2D: TimeCode display when displaying 'Seconds' not 'Frames'
When time grids are drawn in 'seconds' not 'frames' (use the TKEY to toggle this in Timeline for testing), times are now printed in a timecode format similar to SMPTE. It deviates from SMPTE in several respects, otherwise the timecodes will collide with the current grid spacings (Note: this will be subject to review in future). 

* Hours will only be shown when they are needed. This shouldn't cause too many problems, since it is highly unlikely to get sequences, etc. that long.
* Frames are only shown when zoomed in close enough. When they are shown, display of minutes is generally ommitted unless significant. 
* I've used the semicolon (;) character as the delimeter between frames and seconds. This seems to be the convention in Final Cut Pro, Vegas, and Quicktime...

---

Also in this commit:
* added UI_view2d_status_enforce() call to the end of UI_view2d_totRect_set(), so that the caller will not have to worry about doing so.

* swapped the order of V2D_GRID_(NO)CLAMP defines so to be more consistent with older versions of Blender. Default (0) is now no-clamping.
2008-12-07 03:42:25 +00:00
6d8a2dd9ef * added an option not to use projection painting (use existing 3D paint)
* further tweak limits to get rid of some face clipping problems.
2008-12-06 19:19:54 +00:00
d138a6d43c * fixed crash when a mesh with no UVs was painted.
* fixed more bugs in face clipping, clip_line wasnt working when the line was horiz/vertical. unning exactly on the clipping rectangle bounds.
* testing if a point was inside a triangle didnt work if the point was touching the triangles edge, added IsectPT2Df_limit(...) for this rather then using 3 point/line intersection checks.
...Cant find anymore bugs in face clipping now :)
2008-12-06 17:53:08 +00:00
5d8cfef713 2.5
Mainwindow had wrong subwindow rect definition.
2008-12-06 16:22:21 +00:00
2b7098820d * Patch from Michael Fox to set the normal angle (was fixed at 80 before)
* Fixed another face clipping bug (some artifacts still when using screen aligned faces)
* Removed Soften and Warp buttons on the panit panel since they are not used for projection painting
* added do_versions to initialize bleed and normal values
2008-12-06 13:42:55 +00:00
45cc5197e3 View2D - Bugfix for grid calculation for 'frames'
Grid calculations for frames and seconds were mixed up, meaning that grid was often off.
2008-12-06 10:25:51 +00:00
afb45ae7cf View2D: Code cleanup - UI_view2d_status_enforce()
This commit *should* bring UI_view2d_status_enforce() (formerly known in pre 2.5 as test_view2d) under control again. 
I've attempted to reduce the amount of duplicated code here, so hopefully there won't be any nasty bugs that will show up in some of the other views when they are ported.

Summary of changes:
* Restored V2D_KEEPZOOM flag which I had previously removed, having misunderstood its function.
* Fixed bugs with resizing Outliner window
* Outliner width is now columns + 1 again. Documented reasons for this (otherwise, stuff gets covered by scrollbars, but we cannot see it)
2008-12-06 09:25:42 +00:00
5a5ae824ce WIP fixes, still need to tidy up more.
* fix from last commit, threaded memarena wasnt used currectly in one case. (crashing blender)
* add a remove doubles and point on line test to face poly clipping function (fixes some cases where buckets are aligned with faces)
2008-12-06 01:21:42 +00:00
2746034295 BGE bug #17731 fixed: No sleeping Button disables dynamics of an object if it's parented+unparented 2008-12-05 23:13:23 +00:00
Nathan Letwory
8a04f039ad * seems like cur and tot were mixed up, thus preventing panning from working 2008-12-05 18:41:28 +00:00
1159ccfd4d Use MEM_*alloc for some of the main arrays rather then MemArena (was waisting too much memory) 2008-12-05 13:00:14 +00:00
1b9eabeef6 * Added other noise basis types to point density turbulence
* Fixed a bug in 'ignoring volumes in AAO'
2008-12-05 04:06:41 +00:00
5e60414961 View2D API: Cleaning up API + New Methods
* Cleaned up flags defined for View2D, and added some for defining the alignment of the view's data in the 'tot' rect (i.e. which quadrant(s) the view data is allowed to reside in). 

* These flags are used in the new UI_view2d_totRect_set() function, which sets the new size of the 'tot' rect (i.e. the maximum viewable area). Currently, is only used for Outliner, but channel-lists also require this.

* Added API method to reset 'cur' (current viewing region) to 'default' viewing region - UI_view2d_curRect_reset(). Currently, 'keepzoom' is not respected. I'll check on whether this is needed when I recode UI_view2d_status_enforce(), which is badly in need of a cleanup.
2008-12-05 02:03:37 +00:00
Nathan Letwory
e4a8a39f9d * silence a warning 2008-12-04 20:34:37 +00:00
Nathan Letwory
b087c8adf2 * rename some view2d defines to be clearer and more in line with the rest of view2d defines. 2008-12-04 20:28:59 +00:00
149d231d69 VideoTexture: new ImageMirror class for easy mirror (and portal) creation
The new class VideoTexture.ImageMirror() is available to perform
automatic mirror rendering.

Constructor:

  VideoTexture.ImageMirror(scene,observer,mirror,material)
    scene:    reference to the scene that will be rendered.
              Both observer and mirror must be part of that scene.
    observer: reference to a game object used as view point for
              mirror rendering: the scene will be rendered through
              the mirror as if the active camera was at the observer 
              location. Usually the observer is the active camera
              but you can use any game obejct.
    mirror:   reference to the mesh object holding the mirror.
    material: material ID of the mirror texture as returned by 
              VideoTexture.materialID(). The mirror is formed by 
              the polygons mapped to that material.

There are no specific methods or attributes. ImageMirror inherits 
all methods and attributes from ImageRender. You must refresh the
parent VideoTexture.Texture object regularly to update the mirror 
rendering.

Guidelines on how to create a working mirror:
- Use a texture that is specific to the mirror so that the mirror 
  rendering only appears on the mirror.
- The mirror must be planar; the algorithm works well only for planar
  or quasi planar mirror. For spherical mirror, you will get better
  results with ImageRender and a camera at the center of the mirror. 
  ImageMirror automatically computes the mirror orientation and 
  position. The mirror doesn't need to be rectangular, it can be 
  circular or take any form provided it is planar.
- The mirror up direction must be along the Z axis in local mesh
  coordinates. If the mirror is not vertical, ImageMirror will 
  compute the up direction as being the projection of the Z axis
  on the mirror plane.
- UV mapping must be set right to get correct mirror rendering:
  - make a planar projection of the mirror polygons (Unwrap or projection from view)
  - eventually rotate the projection so that UV up direction corresponds to the mesh Z axis
  - scale the projection so that the extreme points touch the border of the texture
  - flip the UV projection horizontally (scale -1 on X axis). This is needed
    because the mirror texture is rendered from the back of the mirror and
    thus is reversed from the view point of the observer. Horizontal flip 
    in the UV map restores the correct orientation.

Besides these simple rules, the mirror rendering is completely automatic. 
In particular, you don't need to allocate a camera for the rendering, 
ImageMirror creates dynamically a camera for that. The reflection is correct
even on large angles. The mirror can be a dynamic and moving object, the 
algorithm always computes the correct camera position based on observer 
relative position. You don't have to worry about mirror position in the scene: 
the algorithm automatically computes the camera frustum so that any object 
behind the mirror is not rendered.

Warnings:
- observer and mirror are references to game objects. ImageMirror keeps
  a pointer to them but does not increment the reference count. You must ensure 
  that these game objects are not deleted as long as you refresh() the ImageMirror
  object. You must release the ImageMirror object before you delete the game
  objects. To release the ImageMirror object (normally stored in GameLogic),
  just assign it to None.
- Mirror rendering is automatically skipped when the observer is behind the mirror
  but it is not disabled when the mirror is out of sight of the observer.
  You should only refresh the mirror when you know that the observer is likely to see it.
  For example, no need to refresh a car inner mirror when the player is not in the car.

Example:

  contr = GameLogic.getCurrentController()
  # object holding the mirror
  mirror = contr.getOwner()
  scene = GameLogic.getCurrentScene()
  # observer will be the active camere
  camera = scene.getObjectList()['OBCamera']
  matID = VideoTexture.materialID(mirror, 'IMmirror.png')
  GameLogic.mirror = VideoTexture.Texture(mirror, matID)
  GameLogic.mirror.source = VideoTexture.ImageMirror(scene,camera,mirror,matID)
  # to render the mirror, just call GameLogic.mirror.refresh(True) on each frame.

You can download a demo game (with a video file) here:

  http://home.scarlet.be/~tsi46445/blender/VideoTextureDemo.zip

For those who have already downloaded the demo, you can just update the blend file:

  http://home.scarlet.be/~tsi46445/blender/MirrorTextureDemo.blend
2008-12-04 16:07:46 +00:00
2e517db96a Small fix for repeat-last-operator:
- Context in WM wasn't set for regions yet, done now. So repeat works on
  per-region ops too.
- Debug print was printing the wrong repeated op.
  (repeat-op could show menu naming the op to repeat)
2008-12-04 09:37:42 +00:00
cb92e781f4 View2D: Scrollbars will now pan the view when MMB-dragged on 2008-12-04 09:33:12 +00:00
6fe9a03456 View2D: Scrollbar tweaks
* Added back vertical scale markings for vertical scrollbars. Currently untested (until IPO Editor can be put back in). Also, there was a special exception for the Sequencer, which will need to be checked when the time comes too.

* Fixed the display of frame numbers in scrollbars. Was caused by error in using an int, where a float was required (this is one place MSVC gives better warnings than GCC). 

* Outliner horizontal scrollbar now displays a more useful range. The previous range was based on screen width, not width of content. 

* Outliner horizontal scrollbar now draws with bevel-highlight line again. Was missed out in a previous commit.

* Added simple toggle Frames/Seconds operator to TimeLine to test if the View2D code is working right for this. This uses the same hotkey (TKEY) as it's counterpart (with a menu for input) did in previous incarnations of Blender.
2008-12-04 05:37:55 +00:00
efe8ad86e3 View2D: Units on Scrollers (XAxis only)
Added back units on scrollbars for anim editors (i.e. Timeline). Vertical scrollbars have yet to be done, but there's no way to test yet.

Using markers and current frame indicator (and value) as guides, it is clear that there is still some inaccuracy with the drawing of the grid or the frames/markers are drawn wrong! Will investigate further.
2008-12-04 02:01:42 +00:00
2a1d37ddc2 RNA:
* DNA_key_types.h: wrapped KeyBlock.data, and added back position
  and current value, now done.
2008-12-04 01:58:14 +00:00
8fc5d6e7de RNA
* Remove some unnecessary defining of struct types for pointers.
* Review of DNA_key_types.h and added Key for Mesh and Curve.
2008-12-04 00:07:47 +00:00
853f2b0647 Tweaked tooltip box drawing so that ends of tooltips don't fall of the end of the box 2008-12-03 23:21:01 +00:00
48cd47ab58 2.5 - compile fixes for Elubie's commit 2008-12-03 22:35:38 +00:00
6241b8a57f RNA
* rna for DNA_key_types.h, also linked to key member of Lattice, others need to be checked.
2008-12-03 21:18:10 +00:00
10232f2c86 Forgot this file in my last commit. 2008-12-03 21:13:47 +00:00
Nathan Letwory
e58fab0d49 * make function to map mouse into region coords 2008-12-03 20:57:23 +00:00
Nathan Letwory
d141a485b0 * check mouse coords in right space. 2008-12-03 20:45:26 +00:00
8360dc066c RNA
* Added a function to define booleans negative, to turn negative
  properties into positive ones gettin rid of the no_ prefix, and
  also got rid of the use_ prefix for two booleans.
* Also made the function for enum bitflags separate, this is quite
  rare so don't need to bother with this in most cases.
* Removed svn:executable flags from some files.
2008-12-03 20:17:12 +00:00
a9374c5941 2.5
Fun commit for test: the Repeat Last option.
Only the split-area Operator is now added on stack, so that's the only 
one that works. Just split an area, and press F4 to repeat it anywhere.
2008-12-03 19:33:42 +00:00
757fe56314 2.5
Another view2d fix: buttons now get clipped for region and mask, so
sliders will work fine, but also buttons overlapping region edges.
2008-12-03 18:14:52 +00:00
a9529ea727 * added uvco_to_wrapped_pxco to get the pixel x/y from a UV that could be outside 0-1 range.
* use 80deg rather then 90 for the "Normal" painting option, since painting faces that are very close to 90d to the view gives some artifacts.
* Brecht modified the Barycentric weights function to use a signed area. so BarycentricWeightsSimplePersp2f and BarycentricWeightsSimple2f these funcs are not needed anymore.

2 bugs with seams fixed
* triangle faces seams were not being filled correctly - causing visible seams
* the pretend 3D location for seam pixels was too close to the face edge - causing some pixels to be occluded by the adjacent face.
2008-12-03 17:36:50 +00:00
edc06b0b5b A couple of small fixes to clear up some warnings.
BOP_Merge2.cpp 
	had same variable name at different scopes so I renamed a couple.
resources.c 
	added include that was missing.  (This maybe was going to move? the old one
	was commented out)
ed_markers.c
	initalized a var that needed it.

Kent
2008-12-03 17:36:30 +00:00
4e6b6dd3f9 2.5
- Tooltips now respect view2d view (rna viewer).
- Bugfix in viewd.c UI_view2d_view_to_region() (typo)
2008-12-03 17:11:50 +00:00
f8afbdce4f * remove warnings
* style fits with blenders more
* use rctf and rcti and rctf types rather then float[4]
* some loops were confusing, use for loops rather then while or do/while
2008-12-03 16:17:59 +00:00
880710cfb0 2.5
Fix crashing in pop-up menus when click.
There's something wrong still in handling menu itself, need Brecht
too look at that... probably a wrong return value somewhere.
2008-12-03 15:49:41 +00:00
1c81b97481 2.5
Error in commit that made notifier calls easier; forgot to add the
check for global vs local notifiers.
2008-12-03 15:05:06 +00:00
444e1d198e 2.5
Fix: the main button handler was swallowing all events. Now every button
type returns 'handled' only if it did something, so other events get nicely
processed.

This will enable MMB pan in dataviewer.
2008-12-03 14:22:42 +00:00
167ac3606b 2.5
- Made view2d manipulations redraw on area level
- simplified call to send Notifiers:

  WM_event_add_notifier(bContext *C, int type, int value, void *data)

  This brings back more control to WM, no context messing within
  operators. :) Handlers that execute operators will be responsible
  for delivering correct contextes.

  In general: should lead to making context not exposed, but only 
  readable via some callbacks.
2008-12-03 13:44:16 +00:00
d8ed4c389c 2.5 fixes
- View2d bug: it was taking sliders into account for setting the 
  window matrix, which it shouldn't (glViewport does). This caused
  error offset in drawing, like for current-frame scrolling.

- Current frame scrolling in TimeWindow back on window level.
  (used to crash, but that was fixed in WM)

- Made UI_view2d_region_to_view accept ints, no shorts

- removed debug function in interface_ops.c
2008-12-03 13:14:01 +00:00
92cbb4b033 View2D - assorted wip changes (nothing to see here) 2008-12-03 09:06:30 +00:00
f4c581aa01 missed saving a small change 2008-12-03 07:51:12 +00:00
cefae5e1b4 fix for [#18040] FBX writes incorrect relative paths.
http://projects.blender.org/tracker/index.php?func=detail&aid=18040&group_id=9&atid=125
2008-12-03 07:45:52 +00:00
aed82a1863 Added Blender.sys.relpath(path, start='//')
similar to os.path.relpath but uses blendfile path rather then the current working directory.

Also use python exceptions rather then providing our own ones.
2008-12-03 06:09:07 +00:00
2acd106492 added a function to resolve case insensitive paths in BPySys and an option to use it in BPyImage
- Useful when loading files with saved in windows on a *nix system.
2008-12-03 02:03:51 +00:00
8f1847e4c3 RNA: review of commits in the past days, check the diffs for the
many small changes, but the two bigger ones are:

* Sensors and controllers now use inheritance, rather than pointing
  to the data in a separate struct. Had to add some new RNA define
  functionality to support this better.
* DNA_meta_types.h was marked as done but still missing many things,
  now completed.
2008-12-02 23:45:11 +00:00
28786f55e6 Retarget bug: missing angle cost on last bone. 2008-12-02 21:29:31 +00:00
d27c9f9d76 2.5
- after closing button (having used it), it sends empty mousemove for 
  invoking new modal handler on same button. Don't know better solution
  for now, at least this way WM handles everything. :)

- experiment: moved button handlers to area level, that way it respects
  handlers on higher hierarchical level, like moving area edges.
  Als interesting is that you can have a button active (texteditor) and
  use a similar button in other area.
  This can also be done on region level even.

On todo: proper notifier events for redraw! Don't want all areas to draw
on simple refreshes
2008-12-02 18:49:58 +00:00
6a6b386832 Made PyRNA props iterable, so you can do things like...
for ob in bpy.objects:
	print(ob.name)

for i, lay in bpy.scenes["Scene"].layer:
	print('%d %d' % i, lay)
2008-12-02 15:27:10 +00:00
9f27be3b2d Added RNA functions from PyRNA
* RNA_property_enum_value
* RNA_property_enum_identifier
To get an enum string from a value and a value from an enum.

BPy_StructRNA types (objects, meshes, images etc) can now be used as dictionary keys.
2008-12-02 14:36:35 +00:00
54908979c5 Lots of stuff; couldn't commit in parts because of refactor work.
* Changes in interface/ module

This commit brings back the way how buttons/menus work under control
of WM event system. The previous implementation extended usage of
handlers and operators in an interesting but confusing way. Better to
try it first according the design specs. :)

Most obviously:
- modal-handler operators are not stored anymore in regions/areas/windows.
  such modal handlers own their operator, and should remove it themselves.
- removed code to move handlers from one queue to another.
  (needs review with brecht!)
- WM fix: the API call to remove a modal handler got removed. This was a
  dangerous thing anyway, and you should leave that to the event system.
  Now, if a handler modal() call gets a cancel/finish return, it frees 
  itself in event system. WM_event_remove_modal_handler was a confusing 
  call anyway!

Todo:

- allow button-activate to refresh after using button 
- re-enable arrow keys for menus
  (do both after commit)

- review return values of operator callbacks in interface_ops.c

* Fixes in WM system

- Freeing areas/regions/windows, also on quit, now correctly closes 
  running modal handlers
- On starting a modal handler, the handler now stores previous area
  and region context, so they send proper notifiers etc.

* Other fixes

- Area-split operator had bug, wrong minimal size checking. This
  solves error when trying to split a very narrow area.
- removed DNA_USHORT_FIX from screen_types.h, gave warning
- operators didn't get ID name copied when activated, needed for
  later re-use or saving.
2008-12-02 14:22:52 +00:00
c4fe6d0f00 RNA - Wrapped a few more simple Object transforms.
Note: Rotations are still exposed directly in radians. We should probably do some wrapping around this, perhaps at UI-level?
2008-12-02 10:10:07 +00:00
628d7013e2 View2D - Some more tweaks...
* Improved scrollbar drawing a bit more - only cosmetic lines
* Added new view2d view-matrix api method to only use 'cur' coordinates on one axis, for use when drawing markers, etc. that need to be glued to a certain time but stay fixed in space in another dimension. This should improve the sitation for drawing markers
* To aid testing, adding markers now sets the marker to have frame number as it's "name". This will need to be removed later...
2008-12-02 09:43:23 +00:00
f8d5883a5b mingw was giving errors...
source\blender\python\intern\bpy_rna.c:1018: error: initializer element is not constant
source\blender\python\intern\bpy_rna.c:1018: error: (near initialization for `pyrna_prop_Type.tp_get

Assign get generic get/sets before PyType_Ready runs
2008-12-02 09:35:29 +00:00
6780c0b12a * rna_property completed
CAUTION: some defines like PROP_INT in DNA_property_types.h are the same 
as enums in RNA_types.h, and may be encounter hidden errors in future.
2008-12-02 01:05:23 +00:00
Nathan Letwory
accfa06ede * after discussion with cambo on IRC, change the #ifndef's to #undefs instead:
Pre-Python 3.0 has strings default non-unicode, so checks and handling should be done so too.
2008-12-01 23:38:22 +00:00
Nathan Letwory
d1e75c215b * make sure there are no redefinitions (I'm using py2.5 and ie PyUnicode_Check define exists 2008-12-01 22:20:18 +00:00
23a77e7688 RNA
* DNA_packedFile_types: added rna definitions for packed files
* also experimentally filled in correct struct 'PackedFile' in image rna for testing.
* updated MSVC projectfiles (also for rna_curve.c and rna_vfont.c)

Note:
I removed PackedFile->flags, I did grep through source and a complete recompile of blender trunk svn without them too, so they obviously aren't needed anymore. A bit of cleaning up :)
2008-12-01 21:23:58 +00:00
31ffe5b65e RNA: Added missing *srna's to curve functions. 2008-12-01 21:19:36 +00:00
Nathan Letwory
d18f26f679 * add debug symbols when building BF_DEBUG=True 2008-12-01 21:13:49 +00:00
a821b7e5d1 == MSVC9 projectfiles ==
- update for several new rna files.
2008-12-01 20:53:01 +00:00
1ebf257bf4 RNA: Curves and VFont
Implemented RNA wrappers for curves and VFont. Only issue I could
not yet solve is related to struct CharInfo curinfo; . This particular
line proved to be hard to wrap and I therefore marked it as a TODO
should someone want to fix this issue.

I also cleaned up makesrna.c a bit by unifying brush/meta parts
under one call just the way it is done in the case of other
wrappers.
2008-12-01 19:02:27 +00:00
6a73a27d81 PyRNA structs and properties can now be subtyped to add functionality in python.
rna_actuator.c was missing an enum
2008-12-01 16:59:18 +00:00
Nathan Letwory
7c94f5314b * ray_mirror naming for property grouping 2008-12-01 14:36:14 +00:00
5a8e8906bb RNA:
Implemented RNA wrapper for ModifierData.

Note that actual interface to access data of any specific modifier is
still missing. I also marked a couple of parts as TODO that should be
reviewed to decide whether or not to expose those specific parts
via RNA.
2008-12-01 13:01:48 +00:00
1a354bd310 View2D - Zoom + More Scrollbar work
* Added basic (non-modal) zoom operators that use a uniform scale factor, with zoom centered using the view center as scaling point. Use Scrollwheel up/down and Pad +/- to use this.

* Added back the 'button'/bubble for the scrollbars. I've added dark lines on either end of it for some later work on zooming widgets.
This is not the final form they'll take. I still need to decide how to handle those scrollbars which act as grid-markers too (showing timescale, etc.), before trying to integrate that with some fancy scrollbar drawing (rounded, etc.)

Assorted changes:
* Moved vertical scrollbar for Outliner to right hand side
* Made Timeline use standard scrollbars, and turned on various clamping options
* Fixed ortho-matrix corrections for scrollbars, and added pixel offsets
* Made Timeline markers sit more snugly on the scrollbar. They were a bit far out...
* Fixed memory leak with view2d keymaps not being freed when Blender exited
2008-12-01 11:37:05 +00:00
3ff7c28e7b * Added checkmarks to 'table buttons' as used in RNA viewer. Helps to distinguish them
a bit better.
2008-12-01 06:53:00 +00:00
12a45b3174 RNA: brush wrapping
Wrapped most of brush. Brush is still missing a link to texture and to
BrushClone. Also PAINT_TOOL_DRAW etc. flags found on DNA_brush_types.h
need to be associated to a brush somehow. Currently they are linked
to a brush via ImagePaintSettings.

Also changed identifiers in metaball wrapping to conform with the
standards.
2008-12-01 06:52:18 +00:00
669c7a9922 RNA
* Tiny updates/fixes to Ipo wrapping.
2008-12-01 00:48:54 +00:00
70fd53b469 View2D - Another WIP commit
* Start of basic scrollbar drawing. This will be improved. Only Outliner shows these for now, as although the Timeline should show them, the old files didn't have them turned on. 

* Tidied up the view-panning operator
- Fixed naming convention
- Added user-adjustable properties (deltax, deltay in screenspace)

* Added ctrl-scrollwheel (horizontal) and shift-scrollwheel (vertical) scroll operators. These use the view-panning code too. 
Unfortunately, I haven't been able to figure out why the WHEELMOUSEDOWN events don't seem to be triggering the operators!
2008-12-01 00:20:19 +00:00
3f0d3e0a50 RNA
- Minor updates to Camera and start of Ipo (+ IpoDriver and IpoCurve) wrappings.
2008-11-30 23:27:10 +00:00
e66fff7906 * added rna_world with porperties of two first panel in the current UI 2008-11-30 22:48:43 +00:00
cfa5c7c396 RNA: Support for Metaballs and Metaelements. I did not figure out a way to test latter but hopefully it works as well. 2008-11-30 20:18:55 +00:00
255bc067ec * changed NULL properties into UnknownProperty
* added rna_property.c and rna_actuator
* enabled access to properties and actuators from object
Note that because we have RNA_Property in the RNA itself, you can find 
properties in gamelogic of and object under the name of RNA_GameProperty
2008-11-30 19:52:21 +00:00
9cb9bf7da3 RNA:
* DNA_image_types.h done, except for some properties not being editable.
2008-11-30 18:39:49 +00:00
a141e44e55 RNA
* DNA_lattice_types: added rna definitions for lattice u,v,w and some flags
* updated MSVC projectfiles
2008-11-30 16:38:56 +00:00
42aa747ec0 RNA
* DNA_radio_types.h: done. (patch by Jorge Bernal). Also adds
  some #defines in the radiosity DNA since it was using hardcoded
  values.
* Added an "UnknownType" which has no properties, useful as a
  placeholder for pointers that have no defined type yet.
* Sort a few lists in the code alphabetically.
2008-11-30 15:55:14 +00:00
5464c2e4a8 * controller structs, bController, bExpressionCont and bPythoncont RNFied\n*controllers are available in objects\n* some typos in rna_sensor 2008-11-30 14:40:00 +00:00
3a22ddeb04 PyRNA epydoc style docstrings.
examples...

RNA Lamp: Lamp
==============
@ivar rna_type: RNA type definition. *readonly*
@type rna_type: PyRNA PointerProperty
@ivar name: Unique datablock ID name. (22 maximum length)
@type name: string
@ivar adapt_thresh: Threshold for Adaptive Sampling. in (0.000, 1.000)
@type adapt_thresh: float
@ivar area_shape: Shape of the Area lamp
@type area_shape: enum in [SQUARE, RECTANGLE]
@ivar area_size: Size of the area of the Area Lamp. in (0.000, 100.000)
@type area_size: float
@ivar area_sizey: Size of the area of the Area Lamp. in (0.000, 100.000)
@type area_sizey: float
- snip

RNA Object: Object
==================
@ivar rna_type: RNA type definition. *readonly*
@type rna_type: PyRNA PointerProperty
@ivar name: Unique datablock ID name. (22 maximum length)
@type name: string
@ivar data: Object data. *readonly*
@type data: PyRNA PointerProperty
@ivar fake_user: Saves this datablock even if it has no users
@type fake_user: bool
@ivar library: Library file the datablock is linked from. *readonly*
@type library: PyRNA PointerProperty
@ivar loc:  in (-inf, inf)
@type loc: float[3]
2008-11-30 14:00:14 +00:00
141f5f73f2 scons build dir was assumed to be relative, this isn't always the case. also, defined BF_PROFILE_FLAGS for win32-ming. 2008-11-30 13:25:59 +00:00
3c4132177f completed, remaining sensors added, random, radar, message, joystick and others 2008-11-30 12:00:03 +00:00
743f3b7222 == MSVC projectfiles ==
== MSVC projectfiles ==
- update for python RNA API
- update for editors: ed_util.c
- fixed RNA_rna library project, doesn't need the c files included in rna.c
2008-11-30 11:55:44 +00:00
6580e96e8e 3 another sensors added: delay, actuator, porperty 2008-11-30 09:00:32 +00:00
43b26b72ab View2D - Initial commit of Pan-View Operator
* Moved View2D data from space-data to ARegion (aka regions). This has been done because drawing occurs in regions not areas anymore. The View2D struct is currently stored in the ARegion struct (not as pointer), given that most of the regions in use will be 2D anyway (only the 3d-view's "window" region is the exception).
Added version patch code for outliner and timeline only for now. Headers are also likely to need this.

* Added separate keymap for View2D operators. All regions that use View2D will need this added. This includes headers too. 

* Pan view operator (ED_View2D_OT_view_pan), currently works for Outliner and Timeline. Use MMB-drag as before. 
- It currently doesn't exposed any parameters for redo (via RNA-ID-Props), but only uses some customdata. Suggestions on what these parameters could be are welcomed. 
- I've yet to implement the necessary axis-locking features for this panning (which is required in Timeline for example to prevent vertical panning, which moves the markers out of view).
2008-11-30 06:15:33 +00:00
970fa83fab Added Group type to RNA 2008-11-30 05:07:57 +00:00
18f3e5d69f PyRNA
Can now assign RNA arrays from python lists of bools/ints/floats
 eg -> rna.scenes["Scene"].layer = [True] * 20

Also added exceptions when trying to set readonly properties.
2008-11-30 03:52:07 +00:00
bc99bbde21 mistake in comparing pointers. (causing memfree prints) 2008-11-30 02:30:34 +00:00
244cce0bd0 RNA: some fixes for lamp UI text. (Michael Fox) 2008-11-30 01:31:05 +00:00
d953e940d3 RNA
* Added more DNA_color_types.h, starting from patch by Sebastian Skejø.
  What's missing is write access to some things like point location,
  hard to retrieve the CurveMapping for proper update still..
* Added all datablocks as ID pointer in Main already, now only have to
  change the type from ID to the specific type. Also added filename
  to Main, which is basically the only non-internal property.
* Fixed setting shadow buffers size in lamps, also ensured it to be a
  multiple of 16.
2008-11-30 00:57:32 +00:00
Nathan Letwory
d86b38cd61 * no write access to bScreen and ScrArea and such
- maybe this will be phased out anyway, but might be handy for querying though.
2008-11-29 23:27:07 +00:00
bc68cb7985 added all sensor types without their properties and full RNAfy bNearSensor, bMouseSesnsor, bTouchSensor, bAlwaysSensor 2008-11-29 22:16:23 +00:00
e2fb12ea18 Step 3/3, merging subdivision/bone creation methods using iterators
This also adds a special Embedding option called "Peel Objects". This option makes the embedding snap consider objects as whole, taking the first and last hit of each of them to calculate the embedding point (instead of peeling with first/second, third/fourth and so on). This option is useful if you have mecanical pieces with lots of details (as single objects) and want to put bones in the middle (think of adding bones to a mecha, for example).
2008-11-29 20:37:10 +00:00
fc20b87768 RNA
Adding support for Cameras. Work in progress, I'm still learning about RNA.
2008-11-29 19:53:49 +00:00
2b7e390967 RNA
* Fix sensor data pointer code, also made sensor type non editable,
  would need to do more work than just setting the type.
* Fix a fairly obscure bug related to inheritance and sorting.
* Complete DNA_ID.h wrapping, just a few extra properties and the
  Library struct, most of this is internal.
2008-11-29 19:08:46 +00:00
2ff4ac139b PyRNA - can write variables now (float, int, bool, enums, strings - but not pointers, RNA limitation too).
also fixed reading enums.
2008-11-29 17:58:17 +00:00
6fbeed1355 Changed vector math to use library functions. 2008-11-29 16:52:06 +00:00
3b59a18f53 more rna_sensor codes 2008-11-29 16:07:49 +00:00
cc0fdf24a9 * Fix Makefiles to compile python.
* Tweak SConscript priorities to link ed_util.
* Added RNA_struct_is_ID function for python.
2008-11-29 15:43:53 +00:00
78218d89d6 2.5: work on bringing back SpaceTime options
- RMB select, also with SHIFT
- RMB tweak for translate
- SHIFT+D dupli
- BKEY border select/deselect
- AKEY (de)select all
- XKEY delete
- GKEY grab

Added some XXX comments for future todos, especially for when other
spaces come back with time markers.

Also added ED_util for putting in all to-be-cleaned cruft

Context conflict: input methods for Markers can conflict with other
spacetypes. It was solved in pre-2.5 with manually tweaking it all over, 
but I would prefer one keymap for all marker stuff. Needs some thinking... 
could be solved with a boundbox check for bottom part of 2d window.

Tweak issue: both tweak styles are possible:
- Hold mouse button, move, operator ends on mouse release
- Hold mouse button, move, operator ends on mouse click

Problem is that modally handled operators use fixed keymaps... like ESC,
SPACE, ENTER, or press/release mousebutton for 'assign'. There's a lot 
to say for making this all consistant, or become part of 1 general keymap?
Should also be possibe to define 'tweak' defaults for Tablet different 
than for mouse...
2008-11-29 15:10:31 +00:00
Nathan Letwory
f07f6f6fa0 * scrarea verts 2008-11-29 15:04:19 +00:00
97dcbbf886 RNA
* Added more lamp properties. (patch by Michael Fox)
* Fix a number of warnings in the RNA code.
* Converted DOS line endings to UNIX.
* Added some information on defining ID structs, and fixed use
  of "ID" inheritance for some non-ID structs.
* Added text on naming conventions to the RNA documentation, and
  applied it to the current code.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA#Naming_Conventions
2008-11-29 14:35:50 +00:00
Nathan Letwory
4fc369564a * more work on screen 2008-11-29 13:57:19 +00:00
f23894c365 Python RNA API
* Matches the C/RNA api structure
* Thin wrapper ~(600 lines)
* No functions specific to any blender object type.
* Defines 2 types, BPy_StructRNA and BPy_PropertyRNA.
* Python 3.0 target (compatible with python 2.4,5,6) 
* http://wiki.blender.org/index.php/BlenderDev/Blender2.5/PyRNA - continue docs/discussion here.

Todo
* Collection iterators
* Write access to data
* Define how constants should be accessed (as strings or some special type)
* Solve the "Python keeping invalid blender pointers" problem.
  This cant just be solved in the py api - we need blender to notify when ID's are removed 

Examples
Here are some examples that work with the current implementation of the api.

 rna.lamps["Lamp.006"].energy -> (1.0)
 rna.lamps["Lamp.007"].shadow -> ("NOSHADOW")
 rna.materials.keys() -> ['flyingsquirrel_eye', 'frankie_skin', 'frankie_theeth']
 rna.scenes["hud"].objects["num_text_p2_4"].data.novnormalflip -> False
 rna.meshes["mymesh"].uv_layers.keys() -> ['UVTex', 'UVTex']
 rna.meshes.items()

For a dump of yo-frankie level see - http://pasteall.org/3294/python

Notes
* Added python back, can only execute scripts from the command line with -P script.py
* bpy_interface.c is just enough functionality to run a python file.
2008-11-29 13:36:08 +00:00
d1c0d0aa2c == MSVC projectfiles ==
- update for RNA_sensors.c
- added missing projectfile fpr DNA_DNA lib
2008-11-29 11:30:39 +00:00
344d9f1e6a add initial codes for rna_sensors 2008-11-29 02:01:39 +00:00
Nathan Letwory
228ce647e0 * add material, node and screen RNA to project files 2008-11-29 01:33:22 +00:00
Nathan Letwory
6cb554fa96 * start RNA_screen
* nicer RNA names for NodeTree and Node
2008-11-29 01:04:15 +00:00
Nathan Letwory
001f9558a3 * add diffuse shader properties for material 2008-11-28 16:00:50 +00:00
bdf6711b70 * Some extra sanity checks for point density 2008-11-28 07:12:32 +00:00
c8098f953d View2D - Commented and finished off cleaning up code added so far 2008-11-28 04:01:35 +00:00
Nathan Letwory
d6769d513e * RNA for raytrace mirror properties. 2008-11-28 00:14:27 +00:00
963b1f7f07 Bugfix: loading a .blend (via commandline now) while current config
had more windows, it left the non-active windows empty. The window-match
code is unfinished (need to bring all editors back), for now it just
follows rule to copy active screen in loaded file to other windows.

Also: added time marker icons (wrong location, view2d stuff still)
Also: bug in random green/purple area code, stopped at 10 subwindows :)
2008-11-27 17:58:46 +00:00
d6aff38426 Patch to allow pre-2.50 Blenders to read newer files.
Since we'll reshuffle a lot in UI code, making new Screens totally 
incompatible, this patch saves the Screen chunk in Blender files
with a new identifier (ID_SCRN), causing it to be not read in old
Blender binaries. Pre-2.50 blender already has a facility to recover
from this (it keeps old UI), including for .B.blends (it opens 
default simple screen)

For the latter reason, it might be advisable to have the .B.blend 
for 2.50+ saved as another name? Then you can use both for while.

(Note: commit is just 3 lines of code, other files are comments I
added for documentation of other stuff)
2008-11-27 16:00:59 +00:00
6b5c948457 Blender 2.5 bugfix! :)
- keymaps in windowmanager (temporary) have to set to NULL on load.
2008-11-27 14:27:33 +00:00
Nathan Letwory
af30c87dee * make sure Material and bNodeTree datablocks show up properly in RNA Viewer.
- documentation was a bit outdated and missing a step, so I updated http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA#Struct to reflect the current state.
2008-11-27 13:36:28 +00:00
Nathan Letwory
651a94886e * add beginning of Material RNA and Nodetree+Node RNA 2008-11-27 00:23:22 +00:00
d9950d2fd4 minor changes, (some comments and less warnings) 2008-11-26 23:57:44 +00:00
2fdc41ccf4 Added access for start/end frames in RNA. 2008-11-26 23:13:59 +00:00
8e8e2c3ba9 RNA
* Added support for auto generating enum properties that are defined as
  bitflags mixed with other flags (use for shadow type in la->mode now).
2008-11-26 22:52:01 +00:00
e384ad573a RNA
* Made auto collection wrapping work for ** arrays.
  (Mesh.mats, still points to ID since there is no Material yet).
* Added sorting of RNA structs/properties before writing.
2008-11-26 22:24:26 +00:00
6a51ba54cd VideoTexture: new ImageRender class for Render To Texture
The new class VideoTexture.ImageRender() is available to perform
render to texture in the GE.

Constructor:

  VideoTexture.ImageRender(scene,cam)
    cam  : camera object that will be used for the render.
           It must be an inactive camera.
    scene: reference to the scene that will be rendered.
           The camera must be part of that scene.
  Returns an object that can be used as a source of a VideoTexture.Texture object

Methods: none

Attributes:

  background: 
     4-tuple representing the background color of the rendering
     as RGBA color components, each component being an integer 
     between 0 and 255. 
     Default value = [0,0,255,255] (=saturated blue)
     Note: athough the alpha component can be specified, it is not
           supported at the moment, the alpha channel of the rendered
           texture will always be 255. You can however introduce an
           alpha channel by appending a FilterBlueScreen() filter, it
           will set the alpha to 0 (transparent) on all pixels that were
           not rendered.

  capsize:
     2-tuple representing the size of the render area as [x,y] number of pixels.
     Default value = largest rectangle with power of 2 dimensions that fits in the canvas 
     You may want to reduce the render area to increase performance. For example,
     a render area of [256,128] is probably sufficient to implement a car inner mirror.
     For best performance, use power of 2 dimensions and don't set any filter: this
     allows direct transfer between the GPU frame buffer and texture memory
     without going through the host.

  alpha: 
     Boolean indicating if the render alpha channel should be copied to the texture.
     Default value: False
     Experimental, do not use.

  whole:
     Boolean indicating if the entire canvas should be used for the rendering. 
     Default value: False
     Note: There is no reason to set this attribute to True: the rendering will
           in any case be scaled down to the largest rectangle with power of 2
           dimensions before transfering to the texture.

Attributes inherited from the ImageBase class:

  image : image binary data, read-only
  size  : [x,y] size of the texture, read-only
  scale : set to True for fast scale down in case the render area dimensions are not power of 2
  flip  : set to True for vertical flip. 
  filter: set a post-processing filter on the render.

Notes:

* Aspect Ratio
For consistent results in Blender and Blenderplayer, the same aspect ratio used
by Blender to draw the camera viewport (Scene(F10)->Format tab->Size X/Size Y) 
is also used during the rendering. You can control the portion of the scene that
will be rendered by "looking through the camera": the zone inside the outer dotted 
rectangle will be rendered to the texture.
In order to reproduce the scene without X/Y distortion, you must apply the texture
on an object or portion of object that has the same aspect ratio.

* Order of rendering
The rendereing is performed when you call the refresh() method of the parent 
Texture object. This happens outside the normal frame rendering and will have no 
effect on it.
However, if you want to use ImageViewport and ImageRender at the same time, be 
sure to refresh the viewport texture before the render texture because the latter
will destroy the frame buffer that is used by the former to update the texture.

* Scene status
The meshes are not updated during the render to texture: the rendered texture
is one frame late to the rendered frame with regards to mesh deformation.

* Example:

  cont = GameLogic.getCurrentController()
  # object that receives the texture
  obj = contr.getOwner()
  scene = GameLogic.getCurrentScene()
  # camera used for the render
  tvcam = scene.getObjectList()['OBtvcam']
  # assume obj has some faces UV assigned to tv.png
  matID = VideoTexture.materialID(obj, 'IMtv.png')
  GameLogic.tv = VideoTexture.Texture(obj, matID)
  GameLogic.tv.source = VideoTexture.ImageRender(scene,tvcam)
  GameLogic.tv.source.capsize = [256,256]
  # to render the texture, just call GameLogic.tv.refresh(True) on each frame.

You can download a demo game (with a video file) here:

  http://home.scarlet.be/~tsi46445/blender/VideoTextureDemo.zip

For those who have already downloaded the demo, you can just update the blend file:

  http://home.scarlet.be/~tsi46445/blender/VideoTextureDemo.blend
2008-11-26 17:47:42 +00:00
15e193f253 BGE update: helper functions for VideoTexture render to texture feature. 2008-11-26 17:38:54 +00:00
650ac62919 BGE bug fix: culling algorithm didn't used the correct camera. 2008-11-26 17:35:53 +00:00
e988a9276c MSVC9 project file update for TEX nodes 2008-11-26 17:34:10 +00:00
c508db5659 MSVC9 project file update for blenderplayer 2008-11-26 17:23:22 +00:00
402fbd95cc 2 things:
* Patch #17998
* tex_input_vec now takes 3-vector as first argument (was 4-vector).
2008-11-26 13:07:24 +00:00
d6ba347266 * Added a new Timeline menu entry: Playback -> Sync Playback to Frames/Sec. It's
more convenient and sensible to find this feature, than over in the audio settings 
(dropping frames in playback is not just for audio!)
2008-11-26 00:47:38 +00:00
00fae51fc1 * Added 'Particle System' entries as children of particle system modifiers in the
outliner. Clicking on one activates it and takes you to the object buttons - it's a 
lot better to see what's going on than a little < 1 Part 5 > that gives very little 
indication.
2008-11-25 23:14:00 +00:00
03f9b73216 Bringing back icons:
Part 3/3: new icons
- Icon set done by jendrzych! Great job!
- cleaned up unnecessary includes and removed commented out code
- preview icons (for materials, textures,..) don't work yet, have to be ported to new event system
2008-11-25 19:23:54 +00:00
9ba909e9f9 Bringing back icons:
- Part 2/3: renaming file according to new convention
2008-11-25 18:32:51 +00:00
0f9b0688e2 Bringing back icons:
- Step 1/3: move relevant files to branch
2008-11-25 18:27:41 +00:00
376ba4ac14 * fix path to openexr on irix
* added missing define in storage.c
2008-11-25 12:53:13 +00:00
Nathan Letwory
cac2a438ae * make sure Bullet is enabled when WITH_BF_BULLET=True 2008-11-25 08:00:58 +00:00
96d3d8426e use const where possible and removed some unneeded args (4.3% speedup) 2008-11-25 03:39:30 +00:00
9efb9adac7 minor changes
* less calls to BKE_image_get_ibuf when switching between images
* remove thread debug prints
* use own pixel blending funcs (IMB_blend_color isnt needed in some cases), slightly faster without this.
2008-11-24 22:06:09 +00:00
bd08d9e1a2 allow building without python 2008-11-24 21:57:58 +00:00
d467158158 Second step out of three for merging sketching subdivision methods with graph subdivision methods.
Graph subdivision uses graph arc iterators.
2008-11-24 19:24:49 +00:00
f7de8cee28 More testing with new system:
- Added markers (partially) back, ed_markers.c (temporary in spacetime,
  where to put general stuff like this?), and added ED_markers.h for api.

- Mkey in timewindow shows marker (no icon, doesnt work yet).
  (Adding operators gets easy :)

- Noted some conflict for operator storage... with markers being used all
  over, added it to the screen level.

- More todos: view2d is stored in space, for time, etc. With regions we
  could move this over, but better todo as post 2.5 project. Multiple 2d
  views in area would be cool though.
2008-11-24 18:59:59 +00:00
933ac8db12 Link pole controls to the parent of the bone with the IK constraint.
Presumably, this should give better result, but tests where not conclusive.
2008-11-24 17:48:40 +00:00
2a8484bc24 RNA
* Disable editable pointers for now, difficult to support well.
* Swap parameters in RNA_access.h functions to make it more
  consistent.
* Rename rna members for operators to wmOperatorType.srna, and
  wmOperator.ptr, to make the distincton a bit clearer.
• Removed the RNA_int_default and similar functions, they're too
  confusing. RNA_property_is_set can still be used to achieve
  the same goal.
* Add functions to create RNA pointers.

Some example code for RNA data access and operator properties:
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNAExampleCode
2008-11-24 15:51:55 +00:00
Nathan Letwory
0c625e20ad * make sure this compiles with msvc too.
- note: there is no round() in msvc math.h, so I used floor(val+0.5)
2008-11-24 14:16:04 +00:00
f1474648d3 patch #8583: Add support for gcc on irix
to compile blender with gcc on IRIX, IRIX_USE_GCC needs to be set to true in
user-def.mk.

Other changes related to irix:
 * compile solid from extern/
 * don't build plugins (yet) with "make release" when using gcc (the shell
   script used assumes MIPSpro is installed)
 * use statvfs instead of statfs on irix, like done on solaris
 * use external libs from $(LCGDIR) instead of /usr/freeware
 * use glew header files from $(LCGDIR)/glew instead of the ones installed on
   the system (this applies to other platforms as well)
 * ffmpeg support currently is disabled on irix
2008-11-24 14:15:05 +00:00
b863bf98e5 RNA
* Wrap most user editable data in DNA_mesh_types.h and DNA_meshdata_types.h.
  Still needs to be improved in some areas though, especially how to deal
  with data layers (expose per element or as array, or both?), and data in
  face corners (bmesh type data structures are more logical here).

Tweaks to RNA defining to make some cases easier:
* Added range callback function for int/float.
* Added 'skip' callback for listbase and array iterators to skip items in
  the collection.
* Extra error print when calling wrong define_property_*_sdna functions.
* Also made button code respect non_editable flag, is quick change though,
  need to add support for properly graying out etc.
2008-11-24 12:12:24 +00:00
10c58adba9 File had to be deleted in Brecht's RNA commit for Operator storage. 2008-11-24 10:47:20 +00:00
41ac50b3d3 Work on gesture, some more cleaning.
- Added standard "tweak" gesture operator, which can be set per region, to
  generate EVT_TWEAK events. You can configure tweaks for any mouse button
  and have handlers for such events check for modifiers etc.
  It even stores tweak direction (8 directions). Might be fun to experiment 
  with tweak gestures N, S, etc. :) 
  In general it can be used to replace the current tweak code in 2.48 
  (std_rmouse_transform). 
  
  Test added: on screen level it now adds LMB tweaks, if tweak-South it splits
  the area. Will be removed of course. 

- Added to Border operator a property to store event used to end border with.

- Moved the "AZone" triangle drawing to the right context (area). It was on
  screen level, not respecting area-redraws. Also cleaned up drawing for it,
  and moved the "swap buffers indicator" square to look nicer. Those squares
  are only for test!

- event-match function had bad code for checking for event-value. Made a 
  "KM_ANY" define so keymaps can be defined ignoring event values.

- Gesture todo: lasso, "real gesture" (like blender now has)
2008-11-24 10:45:36 +00:00
360d9acc0b backface culling wasnt working as it should in perspective view with the "Normal" option enabled. 2008-11-24 07:08:51 +00:00
a51f17bc30 painting onto faces was broken when the UV's or faces were flipped, reversing the order that LSCM and many other tools give. 2008-11-24 05:58:00 +00:00
5a87cfe4f8 * changed "Normal" falloff to only fade out at more extreme normals
* tooltip was wrong
2008-11-24 03:06:27 +00:00
6adeff5778 * brush and airbrush match The Gimp, where the total color applied to a pixel during a stroke is limited by the brush opacity. With the airbrush option enabled it will accumulation over the opacity level (as it did before, irrespective of the settings).
* float buffer support for all painting operation and undo.
* only run brush_sample_tex() for textures brushes.
* redraw the brush outline even when nothing is painted.
2008-11-24 02:13:24 +00:00
af6b221107 == MSVC 2.50 projectfiles ==
- fixed dependencies and some glitches for RNA
- still WIP, but Blender Release and Blender Debug should compile now.
2008-11-23 20:06:47 +00:00
0cf9844d00 Only paint in the view clipped area when view clip is enabled (space defined by Alt+B). 2008-11-23 17:06:35 +00:00
1a28bf797e [#18021] Rotating gets locked to axis after trackball rotate mode is entered
Reset transform restriction flags when switching to other transformations while running.

Also don't draw constraint if no constraint flag is on (old annoyance).
2008-11-23 15:27:53 +00:00
8a4a2d96d0 Fix bug with name templating text buttons (wrong event). 2008-11-22 22:22:38 +00:00
6ae70999b9 Cache the armature template graph while in editmode.
Display the number of joints in the selected template in the sketch panel
When using selected bones as template, turn off Connected if bone has a parent that is not copied.
2008-11-22 17:58:49 +00:00
f747629133 maximum polyline between clipped rectangle and triangle was 6, but in some cases 7 points were set. set the maximum size of the polyline at 8 to be safe. 2008-11-22 15:09:16 +00:00
923fb888d6 fix for painting onto faces from a side view in perspective mode, they would have jaggie clipping applied that looked bad.
The reason for this was with transforming screenspace points outside the face into UV space and when the bucket bounds was enough outside the face.
For faces viewed side on, this transformation would be applied incorrectly (a bit like trying to apply a projection matrix to a point behind the view), the buckets UV space coords would be incorrect and the wrong pixels would be initialized for that face.

solution is to clip the screenspace face with the bucket before getting the UVs. This should also be a bit faster since the clipped polyline will have a smaller bounding box.
2008-11-22 14:54:49 +00:00
c6da2a59d8 RNA
* Added RNA for operators. This still uses ID properties internally,
  but through the RNA API now. The OP_get/set_* API that was used is
  replaced by the RNA API. Currently RNA properties for operators are
  defined at runtime since it means operator registration can be done
  in a single function.
* Changed the existing operators to use this system, I haven't defined
  user interface names yet though. I also think there need to be some
  conventions on which properties to expose to make these operators
  usable in macros, for example if mouse coordinates should be stored
  or not.
* When using ID properties through defined RNA properties, it now
  checks that the ID property actually matches the RNA property and
  removes/overwrites it otherwise. This ensures that you can safely
  get/set arrays for example without having to worry that some
  external thing may have changed the length.
* Documentation now has some information on RNA + ID properties.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-21 19:14:38 +00:00
1dca0e1c46 This is patch [#17896] Irix Build Files
Submitted By:
Timothy Baldridge (tbaldridge)

Add's scons support for irix.

Kent
2008-11-21 17:22:17 +00:00
bef72facd5 * smudge tool wanst working (forgot to set the precious mouse location)
* VecWeightf and Vec2Weightf didnt have return types defined.
2008-11-21 06:17:26 +00:00
ecfeed042d * added option "Normal", same as the vpaint option, gives more natural looking brush strokes.
* faces that were ignored were also not taken into acount when checking UV seams - causng bleed not to work properly in some cases.
* commented early pixel filling loop exit that fails in some cases.
2008-11-21 03:09:48 +00:00
129585285c RNA
* More ID property support. What was already possible was showing
  ID properties as RNA properties. Now it is possible to define
  RNA properties and have an ID property automatically created the
  first time it is set (if not set it retuns the default).

* Added support for defining RNA structs and properties at runtime.
  This is useful for python and plugins, and could also be used
  for operators, not sure yet what is best there, they could be done
  in preprocess for speed, but not sure how to do that while keeping
  operator registration a single function.

* Added quick functions to get/set properties based on names, to be
  used for operators.

* Added some simple support for inheritance, was already doing this
  but having it as a feature simplifies things. Two things were added
  for this: when defining a struct you can give a 'from' struct whose
  properties will be copied, and structs like ID, operator, modifier,
  can define a refine callback that will return the more specific type
  of the struct like ID -> Object, Mesh, .. .

* Added simple windowmanager wrap with only the registered operators
  list, used for testing RNA for operators.
2008-11-21 02:23:46 +00:00
c6ff0ec49d Change name templating to &S and &N (less potential bugs).
It now also accepts lower case versions (&s and &n).
2008-11-20 22:23:01 +00:00
0f3e985aca merging trunk 17485:17520 2008-11-20 21:57:21 +00:00
520a5b0926 Crasher fix.
If vertex groups had % in them, the function making the menu string would crash (in release only).
2008-11-20 21:45:22 +00:00
935ed8a53b commit yesterday broke scaling in the sequencer (dumb mistake)
also changed 3 if's into a switch statement for selecting the interpolation.
2008-11-20 00:34:24 +00:00
6df8cf842a * Allow for light linking/overrides in volume materials 2008-11-19 23:27:47 +00:00
9bb9859753 draft for arc iterators to unify code.
Just moving code to work home, nothing to see here.
2008-11-19 20:01:13 +00:00
28da9ad12e svn merge -r 17201:17502 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-11-19 19:28:12 +00:00
a1b2c0c0fb Code shuffle to make a bit more structure.
- operator definitions, callbacks, registry to WM and handlers for it are
  now always in a file xxxx_ops.c or xxxx_operators.c, in the bottom you
  will find the registry and handler code.

- fixed some confusing naming conventions "rip_area vs area_join" etc. Now
  stick to convention to first name subject, then operation (like UI :).
  So it's area_rip, screen_add, and so on. 

- Nicely put exported calls (outside module) together in bottom: this using
  names such as ED_screen_duplicate(). 

- Moved Operator-Property API to new C file.
2008-11-19 16:28:11 +00:00
fd8c94fdb1 2.5: gesture code in WM
- Simplified and cleaned previous border code
  It was a bit too complex, too many data manipulations

Original idea was to have WM API calls to manage border, circle, lines, 
lasso, etc. This now means that WM provides callbacks for custom operators,
so it's very easy to make them. Check bottom of screen_edit.c for an
example. 

Currently two borders were coded; with and without cross hair.
Press Bkey in any area-region to test it (note: time window has wrong matrix!)

Some specs to note:
- gestures are in region space, and draw 'over'. That latter still needs some
  work when we do real composites.
- only the active region is redrawn.
- on todo is the generic gesture engine for 'tweak' or like how currently grab
  gestures in Blender work. These will be configurable per area-region, and WM
  then will send the proper "Gesture Event" with properties (N, S, E, W, etc)
  to which you then can assign operators. Such events will be generated with low 
  priority, so other handlers who swallowed mouse events have preference.
2008-11-19 13:16:05 +00:00
5ab1256f5b * use utility function brush_painter_paint that runs the project_paint_op in a callback, (hopefully making tablets work properly)
* removed own interpolation function, use bilinear_interpolation_color instead.
2008-11-19 07:57:25 +00:00
14a0718a8a * fix - constant colour output in point density wasn't working 2008-11-19 05:30:52 +00:00
e6a4f4cf29 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17471:HEAD 2008-11-19 03:43:03 +00:00
f8e56e96bf Split up the following imbuf functions in 2...
void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);

Added...
void bicubic_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void neareast_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
void bilinear_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);

This is needed so for projection painting but generally useful if you want to get the interpolated color of a pixel in an image without having a destination imbuf.

While editing these I noticed the functons are a bit dodgy, they assume the input ImBuf has matching float/chr buffer to the output.
2008-11-19 03:28:07 +00:00
ecde558252 Started work on an updated UI theme 2008-11-19 03:15:52 +00:00
a4776347ea bicubic_interpolation - dont use pow(val, 3.0f) at all, do (val*val*val) instead,
Tested overall speedup is about 5x when scaling 4096x4096 -> 4000x4000 in the sequencer.

There were some artifacts in the resulting image but double checked and the old code gives the same problems.
Added back old code with #if 0's since its a bit more readable.
2008-11-19 02:07:23 +00:00
5c6fd58a79 Some improvements brecht suggested, only noticable change is faster multithreading
General optimizations
* Precompute 1/x when dividing by x multiple times.
* Use float constants like 0.0f instead of 0.0, avoids conversions from float to doubles and back.

ProjectPixel
* make pixel (and similar pointers elsewhere) a union with a float and unsigned int pointer to reduce the number of casts a little. generally there are a lot of casts going on in the code, makes it hard to read.

project_paint_begin()
* the perspective case checks with (*projScreenCo)[3] > 0.001) for faces behind the view. - Changed to use the clip start from get_view3d_viewplane 
* removed arbitrary check for brush size to disable threads.

imapaint_paint_sub_stroke_project()
* Make clone tool use IMB_blend_color to reduce the code and support blend modes.

imapaint_paint_sub_stroke_project_mt()
* Make threaded and non threaded mode use same function (just dont start threads when its set to 1)
* removed PIL_sleep_ms, was not needed and slowed down threading (my bad!, was copied from bake code).
2008-11-18 13:51:51 +00:00
13ac9079cc Cleanup of area-rip operator
- moved from WM to Screen code (it uses active area)
- less code :) result of cleaning some calls
- added WM_window_open() to WM API for this
- now opens new window on top of area, and leaves old screen unaffected
  (simple, atomic, the 'do not think for user' convention :)
2008-11-18 13:51:02 +00:00
c3da1af01c RNA minor changes
* Added start of lamp wrapping (code by Michael Fox).
* Add back Object.data, was crashing with unknown data type.
* Added support for using consecutive variables like float r, g, b;
  as an array without writing a manual get/set function.
* Also note the RNA documentation is updated now to be more
  about how to define RNA and use it, including some diagrams.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-18 10:57:06 +00:00
bbc00befe7 some scons command line args were not working since recent changes-
scons CCFLAGS="-O0 -ggdp3" 
for example would pass on the args including the "'s to scons, causing the build to fail.
2008-11-18 05:47:19 +00:00
52ab2f5200 Added option to use another UV layer as a clone source, to paint from one uv layer's image and UVs into the active layer. 2008-11-18 03:28:50 +00:00
e5b51109e9 * Exclude volume materials from AO 2008-11-18 01:53:52 +00:00
a54dc97c13 * Added buttons for accessing options "occlude", "backface cull" and "bleed", note that bleed is 0.0 by default, before it was always 2.0;
* use a faster method of getting a pixels screenspace location.
* check if its possible to break out of pixel to bucket/face intersection early - ~7% overall speedup (ignoring redraw time).
* removed scanline intersection function (added back incase they were needed but it looks like there not)
* speedup for painting with only 1 image (use a loop without context switching checks)
* more commenting + cleanup
2008-11-18 00:17:13 +00:00
9ba822c4d7 Fix leak on exit (it's not a real fix, still uses silly global mem) 2008-11-17 23:02:53 +00:00
c08d374df2 merging trunk 17457:17485 2008-11-17 22:19:05 +00:00
826c6d935d QuatOne was so wrong is would make Hamilton cry.
Thankfully, very little code used it, the only exception being the retarget code in etch-a-ton.
2008-11-17 22:13:45 +00:00
2d0a005aaa Template retarget now works with normal conversion (not in Quick mode that is). 2008-11-17 21:11:12 +00:00
497c9b4ce7 Use grease pencil manhattan distance threshold for strokes. 2008-11-17 21:03:41 +00:00
139f6bb1aa New option for roll correction.
Calculate new roll based on the angle to the normal of the joint (cross produce of the two bones).

This works best in some cases but not in others, so it's an option for now.

I'll have to see if I can iron the left over kinks, then it can be made the default (with Align to view an added option).
2008-11-17 20:38:04 +00:00
8c84a43385 2.5 getting-back-into-coding commit :)
- cleaned up join and split operations. Most noticable is operator callback
  design, which should make a design based on user-less exec() first, then
  wrap invoke() and modal() around it. The exec() should be callable with
  only Context and properties.

- split now works again; and inversed as previously, if you drag from a
  triangle (action zone) inside area it subdivides area as expected.

- dragging from triangle outside area, over an edge, joins areas

- split has been simplified, it had too many options... it could just work
  simpler (now)

- 'action zone' now is an operator itself, a widget sending an ACTIONZONE event,
  which can be handled by others (so other gestures can be added in action zone
  too)


Still evaluating:
- context gets set where?
- code structure confuses... what are proper functions for operators?
- what is WM... should low level screen stuff more there?
- when do you send event, notifier? 
- files grow to large, will clean


Oh yeah and docs, docs, docs. Coming! :)
2008-11-17 18:54:03 +00:00
623421d580 RNA
* Added support for ID properties, mapped as follows:
	* IDP Int = RNA Int
	* IDP Float, Double = RNA Float
	* IDP_String = RNA String
	* IDP Group = RNA IDPropertyGroup Struct
	* IDP_Array = RNA Array

* PropertyRNA and StructRNA are now defined private for the module,
  to force external code to always use accessor functions.
2008-11-17 18:44:06 +00:00
3a1cfa5015 Added BF_PROFILE_LINKFLAGS, Compiling with BF_PROFILE=1 was also throwing a python error. 2008-11-17 10:43:12 +00:00
0bee65b624 Fix compilation on OS X
Patch by dfelinto
2008-11-17 00:54:45 +00:00
3a44c76246 DXF-Importer: updated version v1.12 - 2008.11.16 by migius
- remove try_finally: cause not supported in python <2.5
 - add Bezier curves bevel radius support (default 1.0)
2008-11-16 23:52:29 +00:00
6ea6edfa32 2.5: patch to comment out some more bad level calls in the game engine,
apparently msvc is more strict here, provided by Jean-Michel Soler.
2008-11-16 21:13:53 +00:00
a10d4192b5 disabled painting to offscreen buckets, was causing priblems when zooming in on large models. also simplified backface test. 2008-11-16 18:25:15 +00:00
369bdcc702 == MSVC project files ==
updated VisualStudio 9 projectfiles for blender 2.50
notes:
- still WIP
- dependencies have to be reviewed
- gameengine has been removed from build for now, needs to be added back at some point
- time, outliner and view3d editors have been added, other editors will have to be added when ported
2008-11-16 16:53:37 +00:00
a0a7018363 * fix "dot drawing" problem - draw lines inbetween updates when redrawing the view like how existing painting works. (this means slow systems wont have the problems when they would only see dots as they dragged their mouse around)
* bucket resolution is now set from the brush size so there is around 9 buckets under the brush - (previously was fixed to 128x128).
* brush sizes below 40 disable multithreading, since threads only speeds up cases where each bucket has enough pixels in it for each core to spend some time.
* make smear use bicubic pixel lookups so a low Spacing value works as expected.
* smear tool was darkening pixels a tiny bit.
* fix for simple mistake causing ProjectPaintImage arrays not to be thread safe.
2008-11-16 15:26:15 +00:00
d840fbc9ba 2.5 branch: Makefile for videotexture pointed to wrong include path (BIF_gl.h) 2008-11-16 11:13:19 +00:00
63d3829144 svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17443:HEAD 2008-11-15 16:55:37 +00:00
db434c3434 * clone tool didnt work when the object was not at the center point.
* added clone button to the paint editbuttons (was only in the image window before)
* ctrl+clicking to set the 3d cursor also sets its depth to the face its over (much more useful when cloning and rotating the view)
* support for painting and cloning for tiled textures (for UV's outside 0-1)
* more consistant veriable names, merged image arrays into a ProjectPaintImage type to be less confusing.
2008-11-15 16:20:37 +00:00
da1738377f 17973Patch by dfelinto, and also fixed a bug in 2d-filters 2008-11-15 12:10:16 +00:00
e6a903c06e cleaned some code and split volume precaching into a new file 2008-11-15 04:16:46 +00:00
a92969e8f1 made undo on multiple images works 2008-11-15 02:58:47 +00:00
a2cc29d221 RNA
* Rename cname to identifier.
* Rename PropertyEnumItem to EnumPropertyItem.
* Wrapped min/max/step/precision, pointer type for RNA.
* Draw FLT_MAX a bit better in buttons.
2008-11-14 18:46:57 +00:00
d2023e070c Pkey toggle sketching panel
(it used to do select parent, but that's already done with [ and ] for children, no need for a second key).
2008-11-14 17:33:15 +00:00
1462aa4bc3 tile based undo's now works while projection painting.
TODO - float buffer support & for some reason painting on multiple images at once dosnt restore the tiles to the right image then undoing.
2008-11-14 17:30:55 +00:00
a2175968a7 RNA
* Added RNA list viewer. This is currently drawn in the outliner
  window, the UI is limited but it is just intended to test RNA
  at the moment.
* Added UI names for currently wrapped properties.
* Made iterating collections a bit more convenient.
2008-11-14 17:05:25 +00:00
6eda50f8d9 Merging trunk 17342:17457 2008-11-14 16:09:23 +00:00
59ac45dd12 Reset max cost to FLT_MAX (this fixes a bug with early culling)
Optimization when number of buckets == number of joints
2008-11-14 15:46:51 +00:00
4a8e571e8d RNA
* Added accessor functions for structs and properties instead of
  direct access, in preparation of wrapping ID properties.
* Added more error prints for wrong defines.
* Wrap RNA data structures with RNA.
* Disable dependency code for now to avoid confusion.
2008-11-14 14:34:19 +00:00
8ba404b0d7 RNA Tweaks:
* Added an error for RNA enums without items.
* Added to scene layer set callback.
2008-11-14 11:15:53 +00:00
8d5c14b20d Volume rendering:
* Use a slightly better (but still not exact) approximation for the view
vector when pre-shading the light cache. This still doesn't give exactly the
same results as non-light-cache shading, but it's better. Will investigate
getting a better view vector when there's more time - or if anyone has a
simple formula to derive shi->view from shi->co that would be great to 
hear about too :)
2008-11-14 06:01:06 +00:00
9c30c74bd5 Stroke conversion wasn't quite ok with unaligned armatures.
Last bugfix before sleep I swear.
2008-11-14 03:52:04 +00:00
7cce946de7 copy over pthread dll to the install dir with cross compiling,
eventually should copy more libs but for now this makes blenderlite work 
- (used for automatic blender builds on graphicall)
2008-11-14 03:21:06 +00:00
7401c57fb3 Transform Roll Fixes for editbone. Special case for rotation, we don't need to guess in those case and the result is better if we use the real rotation. 2008-11-14 03:13:40 +00:00
fece3f5e97 Bugfix:
Grease Pencil crashed after duplicating a screen-area, and deleting a layer from the original screen-area. The duplication code was not reassigning some pointers.
2008-11-14 02:13:10 +00:00
ff0c599c4b update for compiling cross compiling win32 on linux, had a lot of trouble with makesdna, the only way I could build and link was as a
win32 binary.
Still unable to link blender.exe
and run with wine.
2008-11-13 23:12:38 +00:00
dc4ef17eea ==Armature==
Fix the roll mess in transform. Since roll is based on an automatically calculated up axis, transforming bones would mess up bone orientation. This code automatically adjusts the roll value to keep bone orientation as consistant as possible. That works all around in transform for all transformations.

Doesn't work with x-axis mirror though as that doesn't use transform elements (fixing it would be nice for later)

Most interesting is that it works with the mirror tool (obviously), so you don't have to fix all the rolls after mirroring one side of an armature.

It could be made an option if someone presents a good enough point for that, but I can't see why you'd want the previous mess instead.

NB: this also ports a utility fonction from etch-a-ton to set bone roll from an up axis.
2008-11-13 22:35:40 +00:00
e76f7e7930 Normal Orientation on EditBones uses roll for Z axis. 2008-11-13 21:44:32 +00:00
3d6be3536f Fix saving and loading of the template variable (it incorrectedly counted as a user). 2008-11-13 18:57:10 +00:00
bb6d39687a svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17405:HEAD 2008-11-13 13:34:43 +00:00
1f3e4771b1 simple workaround slowdown with painting onto multiple parts of an image at once, just use a grid of boundboxes per image.
was also running undo calls when it shouldnt,
2008-11-13 13:17:04 +00:00
fb4ff9e514 * use the existing function to only update a part of the image, should increase speed a lot, except when painting on seams from opposite parts of the image. - can speed this up with multiple boundboxes - TODO.
* use brush spacing and airbrush settings
* draw a circle while in texture paint mode.
2008-11-13 11:30:34 +00:00
a2da0911a6 * Fixed a float -> int conversion rounding error in volume rendering,
which was manifesting in little dark dots
2008-11-13 10:43:02 +00:00
c838ee9592 Removed support for nested texture trees, minor ui enhancements 2008-11-13 09:57:11 +00:00
934b21f5d9 for scons on linux and other *nux systems
only install locale data if international is enabled, only install fonts if freetype is enabled.
2008-11-13 02:18:35 +00:00
a35345f8ba 2 utility functions added for projection painting.
* BLI_linklist_index() - to get an items index in a  LinkList
* BLI_memarena_use_malloc() - BLI_memarena_use_calloc alredy existed but there was no way to switch back to malloc.

also added texnodes to cmake
2008-11-12 22:35:58 +00:00
b3c238e8bc 2.5: merge with trunk, previous merge was only up to yesterday.
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17416:HEAD
2008-11-12 22:03:11 +00:00
bdfe7d89e2 Merge of trunk into blender 2.5:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r12987:17416

Issues:
* GHOST/X11 had conflicting changes. Some code was added in 2.5, which was
  later added in trunk also, but reverted partially, specifically revision
  16683. I have left out this reversion in the 2.5 branch since I think it is
  needed there.
  http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16683
* Scons had various conflicting changes, I decided to go with trunk version
  for everything except priorities and some library renaming.
* In creator.c, there were various fixes and fixes for fixes related to the -w
  -W and -p options. In 2.5 -w and -W is not coded yet, and -p is done
  differently. Since this is changed so much, and I don't think those fixes
  would be needed in 2.5, I've left them out.
* Also in creator.c: there was code for a python bugfix where the screen was not
  initialized when running with -P. The code that initializes the screen there
  I had to disable, that can't work in 2.5 anymore but left it commented as a
  reminder.

Further I had to disable some new function calls. using src/ and python/, as
was done already in this branch, disabled function calls:
* bpath.c: error reporting
* BME_conversions.c: editmesh conversion functions.
* SHD_dynamic: disabled almost completely, there is no python/.
* KX_PythonInit.cpp and Ketsji/ build files: Mathutils is not there, disabled.
* text.c: clipboard copy call.
* object.c: OB_SUPPORT_MATERIAL.
* DerivedMesh.c and subsurf_ccg, stipple_quarttone.

Still to be done:
* Go over files and functions that were moved to a different location but could
  still use changes that were done in trunk.
2008-11-12 21:16:53 +00:00
8449f0d776 == MSVC projectfiles ==
update for texture nodes
2008-11-12 21:03:42 +00:00
ae3bb90975 fix bad level call in texture nodes
BIF_preview_changed wasn't needed after all.
2008-11-12 21:02:45 +00:00
bc53b942fe Added stubs to fix linker errors in texnodes 2008-11-12 20:11:54 +00:00
913fd3c730 Sensible defaults with do_version
Auto names for name templating. When turned on, N will be incremented everytime (after a stroke has been converted) and S will be set to "l" or "r" (or "L or "R" if it already contains a capital L or R) depending on which side of the X axis the stroke started on. Experimental, there might be some bugs left.
2008-11-12 19:16:46 +00:00
0509409c6b Bah, two more files! 2008-11-12 19:14:46 +00:00
8030cb03fd Patch #7897 Texture Nodes!
Robin (Frrr) Allen did a decent job on this, so we can also welcome him
as a member in the svn committers team to maintain it!

I do the first commit with some minor fixes:
- get Makefiles work
- fix rounding issue with tiles on unit faces
- removed UI includes from tex node

A nice doc in wiki is here:
http://wiki.blender.org/index.php/User:Frr/TexnodeManual

On the todo for Robin is:
- When using one or more Texture-input nodes, you cannot edit them by activating
  (as works now for Material nodes).
- The new "output node" option fails on the default case, when only one
  output node is active. It then shows often a blank menu. Will get fixed asap.
- When using a NodeTree-Texture as input node, the menu for 'active output'
  should not show. NodeTree should ignore other nodetrees to keep things sane
  for now.
- On a future todo is proper usage of "Dxt" and "Dyt" texture vectors for
  superior antialising of checkers/bricks.

General note; I know people are dying to get a full integrated shader system
with nodes. In theory we could merge this with Material Nodetrees... but I 
rather wait for a solid and very well thought out design proposal for this, 
also including design ideas for unifying with a shader language (GPU, CPU).
For the time being this is a nice extension of current textures. :)
2008-11-12 19:03:50 +00:00
Nathan Letwory
3fd3a13efc set default path to the version that creates a working binary of Blender, when building with mingw. Now there is no need to do extra copying/config changing 2008-11-12 16:04:14 +00:00
Nathan Letwory
999f312d62 Change the LCG_DIR usage to BF_name_LIBPATH where possible. FFMPEG can't be done like that yet, needs some extra thought to handle differences between vc and mingw setup 2008-11-12 07:48:53 +00:00
c63c99d49e Option to have painting multi-threaded.
Each thread process the next free bucket the brush is over until they are all done.
2008-11-12 05:56:37 +00:00
bf747a30af * Added a button to the volume material controls 'Alpha' to generate an
alpha channel based on the volume's transmission properties, allowing you
to use it in comp etc.

I'd rather not have this button at all, and make it just work properly 
by default, however it causes problems with overlapping volumes when 
'premul' is on (stoopid thing..) so for the time being, there's the 
button. I'll try and fix this up later on when I have more time.
2008-11-11 23:24:10 +00:00
Nathan Letwory
b8fb31e236 Remove BGE defines from highest level and define only there where needed. This prevents scons from doing complete rebuilds when toggling BGE related options. 2008-11-11 22:48:47 +00:00
Nathan Letwory
7e4db234ce previous commits showed that the absolute path problem was even deeper. This should fix yet again some of the problems with giving them to BF_BUILDDIR 2008-11-11 21:37:53 +00:00
Nathan Letwory
418ee26c0e spaces -> tabs 2008-11-11 20:47:45 +00:00
Nathan Letwory
7850320ed2 fix for another place where absolute paths for BF_BUILDDIR where a problem (generating results in the wrong place) 2008-11-11 20:46:46 +00:00
Nathan Letwory
7f3b158030 fix problem with giving absolute paths to BF_BUILDDIR 2008-11-11 20:26:53 +00:00
Nathan Letwory
2961cdcdea Fix typo that prevented CC_WARN from being added to build commands 2008-11-11 20:01:45 +00:00
78a1c27c4a Port of part of the Interface code to 2.50.
This is based on the current trunk version, so these files should not need
merges. There's two things (clipboard and intptr_t) that are missing in 2.50
and commented out with XXX 2.48, these can be enabled again once trunk is
merged into this branch.

Further this is not all interface code, there are many parts commented out:
* interface.c: nearly all button types, missing: links, chartab, keyevent.
* interface_draw.c: almost all code, with some small exceptions.
* interface_ops.c: this replaces ui_do_but and uiDoBlocks with two operators,
  making it non-blocking. 
* interface_regions: this is a part of interface.c, split off, contains code to
  create regions for tooltips, menus, pupmenu (that one is crashing currently),
  color chooser, basically regions with buttons which is fairly independent of
  core interface code.
* interface_panel.c and interface_icons.c: not ported over, so no panels and
  icons yet. Panels should probably become (free floating) regions? 
* text.c: (formerly language.c) for drawing text and translation. this works
  but is using bad globals still and could be cleaned up.

Header Files:
* ED_datafiles.h now has declarations for datatoc_ files, so those extern
  declarations can be #included instead of repeated.
* The user interface code is in UI_interface.h and other UI_* files.

Core:
* The API for creating blocks, buttons, etc is nearly the same still. Blocks
  are now created per region instead of per area.
* The code was made non-blocking, which means that any changes and redraws
  should be possible while editing a button. That means though that we need
  some sort of persistence even though the blender model is to recreate buttons
  for each redraw. So when a new block is created, some matching happens to
  find out which buttons correspond to buttons in the previously created block,
  and for activated buttons some data is then copied over to the new button.
* Added UI_init/UI_init_userdef/UI_exit functions that should initialize code
  in this module, instead of multiple function calls in the windowmanager.
* Removed most static/globals from interface.c.
* Removed UIafterfunc_ I don't think it's needed anymore, and not sure how it
  would integrate here?
* Currently only full window redraws are used, this should become per region
  and maybe per button later.

Operators:
* Events are currently handled through two operators: button activate and menu
  handle. Operators may not be the best way to implement this, since there are
  currently some issues with events being missed, but they can become a special
  handler type instead, this should not be a big change.
* The button activate operator runs as long as a button is active, and will
  handle all interaction with that button until the button is not activated
  anymore. This means clicking, text editing, number dragging, opening menu
  blocks, etc.
* Since this operator has to be non-blocking, the ui_do_but code needed to made
  non-blocking. That means variables that were previously on the stack, now
  need to be stored away in a struct such that they can be accessed again when
  the operator receives more events.
* Additionally the place in the ui_do_but code indicated the state, now that
  needs to be set explicit in order to handle the right events in the right
  state. So an activated button can be in one of these states: init, highlight,
  wait_flash, wait_release, wait_key_event, num_editing, text_editing,
  text_selecting, block_open, exit.
* For each button type an ui_apply_but_* function has also been separated out
  from ui_do_but. This makes it possible to continuously apply the button as
  text is being typed for example, and there is an option in the code to enable
  this. Since the code non-blocking and can deal with the button being deleted
  even, it should be safe to do this.
* When editing text, dragging numbers, etc, the actual data (but->poin) is not
  being edited, since that would mean data is being edited without correct
  updates happening, while some other part of blender may be accessing that
  data in the meantime. So data values, strings, vectors are written to a
  temporary location and only flush in the apply function.

Regions:
* Menus, color chooser, tooltips etc all create screen level regions. Such menu
  blocks give a handle to the button that creates it, which will contain the
  results of the menu block once a MESSAGE event is received from that menu
  block.
* For this type of menu block the coordinates used to be in window space. They
  are still created that way and ui_positionblock still works with window
  coordinates, but after that the block and buttons are brought back to region
  coordinates since these are now contained in a region.
* The flush/overdraw frontbuffer drawing code was removed, the windowmanager
  should have enough information with these screen level regions to have full
  control over what gets drawn when and to then do correct compositing.

Testing:
* The header in the time space currently has some buttons to test the UI code.
2008-11-11 18:31:32 +00:00
44f94f7927 * Compile fix for RNA + makefiles.
* Fix for bug in collection string lookup function.
2008-11-11 18:28:00 +00:00
6b86f835f8 MSVC90 project files: Tune projects build order to allow error-free build from clean state. 2008-11-11 16:48:34 +00:00
4a4b0732e5 Various changes made in the process of working on the UI code:
* Added functions to generate Timer events. There was some unfinished code to
  create one timer per window, this replaces that with a way to let operators
  or other handlers add/remove their own timers as needed. This is currently
  delivered as an event with the timer handle, perhaps this should be a notifier
  instead? Also includes some fixes in ghost for timer events that were not
  delivered in time, due to passing negative timeout.
* Added a Message event, which is a generic event that can be added by any
  operator. This is used in the UI code to communicate the results of opened
  blocks. Again, this may be better as a notifier.
* These two events should not be blocked as they are intended for a specific
  operator or handler, so there were exceptions added for this, which is one
  of the reasons they might work better as notifiers, but currently these
  things can't listen to notifier yet.
* Added an option to events to indicate if the customdata should be freed or
  not.

* Added a free() callback for area regions, and added a free function for
  area regions in blenkernel since it was already there for screens and areas.
* Added ED_screen/area/region_exit functions to clean up things like operators
  and handlers when they are closed.
* Added screen level regions, these will draw over areas boundaries, with the
  last created region on top. These are useful for tooltips, menus, etc, and
  are not saved to file. It's using the same ARegion struct as areas to avoid
  code duplication, but perhaps that should be renamed then. Note that redraws
  currently go correct, because only full window redraws are used, for partial
  redraws without any frontbuffer drawing, the window manager needs to get
  support for compositing subwindows.

* Minor changes in the subwindow code to retrieve the matrix, and moved
  setlinestyle to glutil.c.
* Reversed argument order in WM_event_add/remove_keymap_handler to be consistent
  with modal_handler.

* Operators can now block events but not necessarily cancel/finish.
* Modal operators are now stored in a list in the window/area/region they were
  created in. This means for example that when a transform operator is invoked
  from a region but registers a handler at the window level (since mouse motion
  across areas should work), it will still get removed when the region is closed
  while the operator is running.
2008-11-11 15:18:21 +00:00
3bb5fc9c7d * RNA: utility function to retrieve strings. It will use a fixed
size buffer if it's big enough, and otherwise allocate memory.
* Added BLI_dynstr_appendf() to construct strings easily in printf
  style, this should make it easier to construct menu strings for
  example.
2008-11-11 15:03:26 +00:00
483136c8e4 Adjusted scons files so disabling quicktime, python and sdl also removes their includes when building.
writefile.c had usless include.
2008-11-11 14:14:22 +00:00
58b861170c svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17335:HEAD 2008-11-11 12:56:57 +00:00
aac928d5bc last commit before some optimizations.
setting RT to 123 will paint from grease pencil (for benchmarking).
2008-11-11 12:35:52 +00:00
8a61376c65 wasnt setting the struct size for normal brush types (was testing smear + clone but not paint)
some disabled WIP too
2008-11-11 09:24:34 +00:00
5161c2ee3a attempt to make executing an external command work with python 2.4 & 2.5, it seems that only py 2.6 wanted list args for subprocess.Popen 2008-11-11 08:21:09 +00:00
db67426dbf fix for [#17959] NURBS Circle: pie-shaped deformation, sticking to object origin 2008-11-11 05:03:03 +00:00
13fe65cf46 removed some warnings 2008-11-11 04:42:15 +00:00
a331848092 * float image buffer support
* bicubic interpolation for the clone tool
2008-11-11 03:43:21 +00:00
8b32ad784b Median center didn't use TD_NOCENTER properly, making it work incorrectly with hinge bones (and with chain rotations). 2008-11-11 03:12:31 +00:00
a00e63a542 bicubic_interpolation function was re-calculating a variable it didnt need to - (was calling 32 pow()'s per pixel, now only 8 - approx 3-4x speedup on my system). 2008-11-11 01:13:05 +00:00
773824bbea VideoTexture: support VideoTexture in blenderplayer 2008-11-10 22:17:40 +00:00
3c69864540 Chain rotations for objects and pose bones (for teamto)
This commit adds an exception for rotations (standard rotation and tracball) to still work on children of transformed objects and bones in an expected fashion. That is, you can select a chain of finger bones and rotate to flex them all at once.

Notes:
[1] This could be expended to other transformations if needed.
[2] Center of transformation is determined using the same principle as hinge bones (transformed children aren't taken into account)
2008-11-10 21:23:54 +00:00
61a83d2fba Add MSVC90 project files - part 3. Extern and Intern projects are merged in projectfiles_vc9\blender\blender.sln solution, you just need to open that solution to compile everything with VS2008. 2008-11-10 21:22:22 +00:00
5443d2d86b Dual Links for control bones: Control bones that start and end on specific joints will do the same after retarget.
Template Renaming: Fix renaming to handle contraints properly

Template Renaming with Action constraints video available online: http://vimeo.com/2206779 and http://blenderartists.org/~theeth/bf/etch-a-ton/retarget_fingers_action.ogv
2008-11-10 19:43:11 +00:00
c27a8da6dd Add MSVC90 project files - part 2. 2008-11-10 16:09:25 +00:00
8eec6cecc0 Add MSVC90 project files - part 1. 2008-11-10 15:36:58 +00:00
d63f1d6ab9 missing comma made scons arg BF_CXX_LIB_STATIC not work 2008-11-10 13:36:44 +00:00
8fc7d4640c Bugfix #17965
Most Surface (NURBS) tools in buttons didn't add undo pushes.
2008-11-10 10:05:09 +00:00
ac224d0b89 Patch #17971 by Nathan Vegdahl:
Makes colorband GUI display proper color interpolation

(for real this time)
2008-11-10 05:42:07 +00:00
3b2f996c25 Point Density
* Fixed a stupid crash caused by last commit that worked fine on the mac
(but never should have...)

* Fix for using child particles with the new particle age color options
2008-11-10 00:14:35 +00:00
2de476c88f VideoTexture: Preserve alpha channel if present in video, images and sequences. Better detection of end of video. 2008-11-09 21:42:30 +00:00
Nathan Letwory
0a8e8c8c9e * add Brecht's small patch to make values to BF_QUICK and BF_QUICKDEBUG function as partial search entries.
- this means you can do BF_QUICK=bf_ and it would build all libs that contain bf_ in their name. This makes
    it easier to use, since you don't have to remember the exact names

* Update documentation to mention scons-local.
2008-11-09 21:00:49 +00:00
16443062a9 * clone tool didnt work when objects center was not 0,0,0
* made backface culling work as expected in perspective view.
2008-11-09 14:34:32 +00:00
4caedd34d7 Perspective mode painting works again
SeamBleed in perspective mode mostly working (some small artifacts but generally looks ok)

Added BarycentricWeightsPersp2f and BarycentricWeightsSimplePersp2f for getting weights from verts with perspective matrix applied.
2008-11-09 12:59:01 +00:00
7403fc923f triangles were could not be painted onto at all (serves me right for testing with subsurf) 2008-11-09 04:08:08 +00:00
74d1a04f30 changes to projection painting
* initializing a bucket only initializes pixels from that bucket (was initializing all pixels in intersecting faces before which made large faces slow to paint onto)
* removed scanline functions, they are not as useful when initializing small areas. 
* UV seam checking also sets the seam flag on the adjacent face to avoid double lookups.

TODO - uv seam bleed doesn't work in perspective mode.
2008-11-09 02:47:30 +00:00
a972107b03 Point Density texture: colouring
This introduces a few new ways of modifying the intensity and colour output 
generated by the Point Density texture. Previously, the texture only output 
intensity information, but now you can map it to colours along a gradient 
ramp, based on information coming out of a particle system.

This lets you do things like colour a particle system based on the individual 
particles' age - the main reason I need it is to fade particles out over time.

The colorband influences both the colour and intensity (using the colorband's 
alpha value), which makes it easy to map a single point density texture to 
both intensity values in the Map To panel (such as density or emit) and colour 
values (such as absorb col or emit col). This is how the below examples are 
set up, an example .blend file is available here:

http://mke3.net/blender/devel/rendering/volumetrics/pd_test4.blend

The different modes:

* Constant
No modifications to intensity or colour (pure white)

* Particle Age
Maps the color ramp along the particles' lifetimes:
http://mke3.net/blender/devel/rendering/volumetrics/pd_mod_partage.mov

* Particle Speed
Maps the color ramp to the particles' absolute speed per frame (in Blender 
units). There's an additional scale parameter that you can use to bring this 
speed into a 0.0 - 1.0 range, if your particles are travelling too faster or 
slower than 0-1.
http://mke3.net/blender/devel/rendering/volumetrics/pd_mod_speed.mov

* Velocity -> RGB
Outputs the particle XYZ velocity vector as RGB colours. This may be useful 
for comp work, or maybe in the future things like displacement. Again, there's 
a scale parameter to control it.
http://mke3.net/blender/devel/rendering/volumetrics/pd_mod_velrgb.mov
2008-11-09 01:16:12 +00:00
f0a23dce9a Generalized unique_editbone_name to be useable if a name change after the bone has been added to the list (this could probably simplify some code in editarmature, I haven't done that yet).
First pass for retargetting template's renaming magic. For now, in new retargetted bone's name: %S (side) and %N (number) will be replaced by user defined strings.

Will need to experiment on how useful that is and how it could be better.
2008-11-08 22:05:11 +00:00
Nathan Letwory
d5ae032a60 * typo fix 2008-11-08 13:39:37 +00:00
Nathan Letwory
d1248ff6d8 === BPy API ===
* add two optional arguments to control click step and precision of Number buttons.
2008-11-08 13:38:21 +00:00
Nathan Letwory
fecdd60453 * use msvc proposed names when building on win32 2008-11-08 12:01:55 +00:00
e3ca8765be VideoTexture: forgot to commit MSVC project file, strange that nobody noticed... 2008-11-07 20:13:07 +00:00
Nathan Letwory
0a825b4d72 * fix typo found by brecht 2008-11-07 19:49:55 +00:00
Nathan Letwory
ade1495f0e * fix for typo found by brecht 2008-11-07 19:48:12 +00:00
4114ce7407 Correct stroke normal alignment for retargetting (transform into edit armature local space) 2008-11-07 19:44:02 +00:00
Nathan Letwory
6eaaf2ce72 === SCons ===
* merge the recent scons changes from trunk, so this means that the same rules now apply:
  - scons-local available
  - platform default configs updated
  - check your user-config.py if you have made a full copy of default config

Note: BGE and blenderplayer still not working, but that is normal ;) (so turn them off!)
2008-11-07 19:21:52 +00:00
37c1fd2303 [#17958] Windows path fix for image_edit.py script.
Modified to work in linux too,  on my system subprocess.Popen(appstring) only works when appstring is a list.

Blenders __import__ didnt support keywords like pythons causing the subprocess module to fail for me.
added keywords to blenders c/api import to match pythons.
2008-11-07 15:16:30 +00:00
8b2811d9d5 VideoTexture: VideoTexture.materialID() can now take texture image name.
You can specify a image name (starting with 'IM') instead of a material
name in VideoTexture.materialID() and return the material ID matching
this texture.
The advantage of this method is that is works with blender material
and UV texture. In case of UV texture, it grabs the internal material
corresponding to the faces that are assigned to this texture. In case
of blender material, it grabs the material that has an image texture
matching the name as first texture channel.
In both cases, the texture id used in VideoTexture.Texture() should be 0.

Ex:

matID = VideoTexture.materialID(obj,'IMvideo.png')
GameLogic.video = VideoTexture.Texture(obj, matID, 0)
2008-11-07 10:54:32 +00:00
f7135d981a simple mistake broke clone tool. 2008-11-07 06:50:19 +00:00
7e8ba5c84d RNA
* Added more error prints for wrong definitions, for cases that
  would laters cause problems compiling or crash at runtime, and
  also made messages more clear.
* Added some skeleton code for main/ID/mesh/vertex types for testing.
* Added support for automatic arrays as collections using SDNA.

* Changed how pointers to data work. Now they are always wrapped
  in a PointerRNA struct, which contains the data pointer and type,
  and also the data pointer and type of the ID datablock that this
  belongs to, since for example a vertex on it's own may not have
  enough information for some operations, it also needs the mesh.

* Added some code for defining dependencies with RNA, and looking up
  data with paths like: scenes[0].objects["Cube"].data.verts[7].co.
  Note sure either will end up being used, this is experimental.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA
2008-11-07 02:58:25 +00:00
5567f3dded VideoTexture: comment was misplaced after previous commit. 2008-11-06 23:52:47 +00:00
7b15e8cd64 Bugfix #17524
The problem is that the audio_fill_seq function try to load the hd file
if the sequence don't have it, but it join the two string (directory path +
file path) without the / (Linux... \ Windows), so the result is a wrong path.

 I change the the strncpy and strncat function for a BLI_join_dirfile (like
the reload_sequence_new_file) and all work fine now.

 Also note that the "them go" that Luca report is (or what happen here) the
ctrl+z function, and now both case work fine here.

(interesting.. date from Feb 05.. 2006 ;)
2008-11-06 18:49:53 +00:00
87538be426 VideoTexture: fix compile error when FFmpeg is disabled. 2008-11-06 16:01:17 +00:00
4d460369c0 WIP commit before some optimizations,
fix for possible divide by zero.
added BarryCentricWeights2f(), returns weights for points outside the triangle.
2008-11-06 08:01:11 +00:00
e76e271e29 Sketch Retargetting: template selection from dropdown (listing all other armatures) instead of silly object name input. 2008-11-06 03:31:25 +00:00
f018a3b5bb added support for smear brush type 2008-11-06 02:08:41 +00:00
d99550e35e merging 17300:17342 2008-11-06 01:30:24 +00:00
Nathan Letwory
f3d1be5638 * While making changes to btools.py and Blender.py, I completely forgot about the name changes.
Here they are.

  Platform managers, double check that the compiler flag options still work.
2008-11-06 00:28:26 +00:00
5b6708c278 support for brush blend modes (Mix, Multiply, Darken etc) 2008-11-05 23:24:52 +00:00
Nathan Letwory
76320b76ad Change remaining Copy() to Clone() 2008-11-05 23:23:04 +00:00
769a43d3c0 painting onto multiple images wasnt working, faces with different images are treated as seams even if their UV's match. 2008-11-05 22:27:45 +00:00
ce1625ebc0 VideoTexture: new VideoTexture.ImageFFmpeg to load and reload images.
The FFmpeg library allows to load image files. Although it is possible
to load images using the VideoFFmpeg class, it is not very efficient.
The new class VideoTexture.ImageFFmpeg is dedicated to image management.

Constructor:
-----------
VideoTexture.ImageFFmpeg('image_file_name')
  Opens the file but does not load the texture yet.
  The file name can also be a network address. It can also be a video
  file name; in that case only the first image is loaded.

Methods:
-------
refresh(True)
  Loads the image to texture. 
  You just need to call it once, the file is automatically closed after
  that and calling refresh() again will have no effect.

reload('new_file_name')
  Reloads the image (if new_file_name is omitted) or loads a new image.
  The file is opened but the texture is not updated yet, you need
  to call refresh() once to load the texture.

Attributes:
----------
status
  returns the image status:
    2 : file opened, texture not loaded
    3 : file closed, texture loaded

image
  returns the image data as a string of RGBA pixel

size
  returns the image size [x,y]

scale
  get/set the scale flag. 
  If the scale flag is False, the image is rescale to texture format
  using gluScaleImage() function, slow but good quality.
  If the scale flag is True, the image is rescaled using a fast but
  less accurate algorithm.

flip
  get/set Y-flip flag.
  Set to True by default as FFmpeg always provides the image upside down

filter
  get/set filter(s) on the image.

Example:
2008-11-05 21:53:22 +00:00
a405ed75fe Sketch retargetting. Templating from other armature objects.
Moving stuff home, saving doesn't work ok yet, will finish this later today, demo video when done.

Also a couple of bug fixes for crashing and some text reformulation and the like.
2008-11-05 20:15:32 +00:00
0ade815aff VideoTexture: fixing a crash when loading an image as a video file - yes it works, provided that you don't set repeat and also no need to refresh all the time. 2008-11-05 17:38:31 +00:00
aa1ba2f3fb svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17279:HEAD
somehow scripts line endings change is messing things up, these changes wont be included
error is:
svn: File 'release/scripts/scripttemplate_metaball_create.py' has inconsistent newlines
svn: Inconsistent line ending style
svn: Error reading spooled REPORT request response
2008-11-05 15:11:40 +00:00
b98b4e8be8 projection painting clone tool - gives a similar work flow to cloning in the gimp, Ctrl+Click to set the cursor source, then paint from this location.
todo...
* pixel interpolation.
* clone option can currently only be set from the image paint panel.
* only initialize clone pixels under the mouse.
* overlap between source/target while painting could cause problems. need to look into this.

also fixed some cashes in painting normally.
2008-11-05 14:45:54 +00:00
8916f84622 VideoTexture: Add support for GLSL. FIx small printout bug in Exception printout 2008-11-05 13:22:10 +00:00
3b2a07a866 uniform end-of-line format and set svn:eol-style property to "native" for all scripts 2008-11-05 11:42:34 +00:00
ea168748eb error in last commit, scanlines had extra offset causing overlapping lines between faces without seams 2008-11-05 05:08:07 +00:00
633e3e1323 * Updated the 'Consolidate into one image' script to support alpha 2008-11-05 04:48:08 +00:00
b1653b5f98 fix for pixels not being drawn in 2 cases.
1 issue was caused by detecting 2d horizontal line intersections for lines that had points equal to the horizontal Y value -  solved by detecting point on line cases.
Another was because the 2D bounding box for painting could have faces edges running along it - solved by adding a small margin to the bounding box.
2008-11-05 03:12:59 +00:00
Nathan Letwory
f59f5e67a5 * doing some warning cleaning
* accidently left priority tests around.
2008-11-04 23:46:01 +00:00
Nathan Letwory
beea73b110 * enable openjpeg building for win32/msvc
* add support for building redcode on win32/msvc, but disabled for now, as there are linking problems
  - I cleaned the redcode sconscript - the copying of headers within the source tree is not a clean solution
    This needs to be fixed later on. For now, lets use redcode from extern/ until a better way is found.
2008-11-04 23:04:15 +00:00
Nathan Letwory
2d80262759 === SCons ===
* BlenderLib now expects lists for all compiler related flags (release, profile, debug, warn).
  I changed the default config files, but do double-check your user-config files, esp. if you did
  a full copy of an old default platform config
2008-11-04 22:46:43 +00:00
a19366f34a * Changed the constant colorband interpolation to work left->right,
rather than right -> left. This is how it works now:

http://mke3.net/blender/etc/constant_ss.png
2008-11-04 22:16:57 +00:00
Nathan Letwory
9196723581 * remove redundant comment 2008-11-04 21:14:54 +00:00
571520e976 Properly unselect copied bones (it wasn't clearing active flag)
Remove double undo push
2008-11-04 19:10:54 +00:00
1886b7bf52 VideoTexture: fix RGB/BGR confusion, make code compatible with big endian CPU, add RGBA source filter. 2008-11-04 12:04:59 +00:00
aa7357b692 perspective mode now works with seam bleeding. 2008-11-04 10:17:43 +00:00
6eb3bf53dd VideoTexture: Bug report #17946: add (char*) casting to fix compile error with Python get-set method and module object. 2008-11-04 09:21:27 +00:00
c00b7f33e5 optional uv seem bleed so painting across seams wont give artifacts (like with baking), no UI yet, set to 2 by default.
Does not work yet with perspective view yet, there are still some issue with pixel alignment.
2008-11-04 05:29:36 +00:00
f5f0c8fb37 * Fixed a strange problem with the way textures are interpreted - was causing weird things with point density turbulence on
* Reverted the spin field once more..
2008-11-04 05:17:02 +00:00
ca80578e4e Simple warning fixes 2008-11-04 01:05:44 +00:00
1f83dffeb4 Added a new interpolation type for colorbands: Constant
This can be useful for toon shading etc.

Example: http://mke3.net/blender/etc/constant_ss.png
2008-11-04 00:15:27 +00:00
b7fdf2ab50 Add's GSR's INT64_C fix and removes dos line endings...
Kent
2008-11-03 23:35:41 +00:00
ec462b8cea Added Lattice vgroup support to shrinkwrap and simple deform modifier. 2008-11-03 23:17:36 +00:00
5be471d29c fix for compile error in last commit + some WIP functions. 2008-11-03 22:27:55 +00:00
86e8d54dcb Sketch Retargetting: Rolling bone perpendicular to stroke's normal is now optional.
Normal pointer added to reeb nodes (the last bone in a chain needs it and can't get it from the embedding).
2008-11-03 17:54:12 +00:00
6cc1466c61 Moving silence_log_ffmpeg to imbuf (it fits better there and fixes the link error in blenderplayer) 2008-11-03 13:33:11 +00:00
858e2ec776 Bugfix #17921
ALT+select face-loop on mesh with hidden faces ignored the hidden part.
Also caused errors on deleting faces that way.
2008-11-03 13:00:39 +00:00
8cecbf9cbd last commit broke projection painting in perspective mode. 2008-11-03 11:06:22 +00:00
2ff6d5c06e made scanling creation into its own function project_face_scanline,
speedup adding ProjectPixel's by interpolating the screen coords rather then getting the pixels worldcoord and projecting it into screenspace.
2008-11-03 09:59:08 +00:00
389588bb4f Reverted to the previous, more hackish version of the spin field.
There has to be a better way of doing this though... jahka? :)
2008-11-02 23:25:21 +00:00
336ae14ba9 merging trunk 17221:17300 2008-11-02 19:44:18 +00:00
17296efd62 VideoTexture: fix compile error with GLint in ImageViewport under osx, part 2 2008-11-02 18:41:24 +00:00
7d63f5a7fe VideoTexture: fix compile error with GLint in ImageViewport under osx. 2008-11-02 18:31:54 +00:00
db24487449 Makefile fixes for compiling with new videotexture code.
Also: buttons for logic, controllers, didn't line up correct when 
multiple objects were selected (too little space)
2008-11-02 18:12:45 +00:00
a775719e23 Bugfix #17942
Python dict error: when trying to access a Bone via a key, and the key
was not found, a wrong error message got printed. Fix provided by
reporter Gregor Riepl. Thanks!
2008-11-02 18:05:11 +00:00
2973bd8ea2 VideoTexture: use PyObjectPlus.h instead of Python.h for compatibility with Python2.3 2008-11-02 18:02:31 +00:00
d7aad35599 Sketch Retargetting:
Use stroke normal to align roll of the retargetted bones.

Unlike stroke conversion, the final roll is not forced to point exactly to the normal. Rather, It tries to align the X or Z axis of the bones (whichever is closest) to the stroke normal. Forcing the roll can invert knees while this rightly only makes one of the joints rotation axis perpendicular.
2008-11-02 17:43:55 +00:00
f180702a12 Quiet ffmpeg log by default. No more ugly stream info in console.
Starting Blender with -d turns info logging back on.
2008-11-02 16:28:34 +00:00
719e30f70a Disable completely OpenAL if WITH_OPENAL is OFF 2008-11-02 15:16:17 +00:00
407e38a744 Added bf_videotex to unix libraries (linking error) 2008-11-02 14:54:44 +00:00
12b2f1c83c Include path for numpy no longer needed. 2008-11-02 14:36:32 +00:00
fdc1ef2c25 Bugfix #17902
Black dots appearing in mirroring 3d beveled curves, when using orco
texture coords. Appeared there was memory read just outside of the 
allocation.
2008-11-02 14:03:47 +00:00
752920c531 python25.zip wasn't copied using cmake. Should fix win64 python e.g. "import random" problem 2008-11-02 12:50:11 +00:00
30016909c7 Bugfix #17920
When entering a wrong expression (or garbish) in a Nkey panel button,
the cursor jumps to the place where the button was clicked. On failure
the button could return a B_NOP, not a 0
2008-11-02 12:27:25 +00:00
a4f8f06479 Fix for two proxy + undo related crashes:
* When making a proxy, the lib linked IPO driver was also changed to
  point to the proxy object, and after undo this local proxy object
  was replaced so the pointer became invalid. In fact it is not needed
  at all to change this because the IPO code maps the pointer to the
  local proxy object already.
* Undoing the make proxy operation would crash because the proxy_from
  pointer in the library linked object would still point to the removed
  object. Now it clears all these pointers before undo, because on each
  undo memory file read they will be set again anyway.
2008-11-02 00:25:39 +00:00
68f50e0c6b VideoTexture: remove numpy dependency. 2008-11-01 22:28:27 +00:00
3c9520f92f svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r17236:HEAD 2008-11-01 22:04:41 +00:00
e72d6c7bfa VideoTexture: fix NULL pointer crash when material name is not found. 2008-11-01 20:18:15 +00:00
b24c6ef70d Adding include path for numpy to sconscript. There must be a better way to do this. 2008-11-01 17:44:12 +00:00
19cdef1f71 VideoTexture: typo in linux code 2008-11-01 17:26:34 +00:00
e6a2ab319f VideoTexture: AVFormatContext::pb is not a pointer for avformat library older than 52 (linux uses 51) 2008-11-01 17:15:17 +00:00
4870db578b Bug #17912: fix for some SSS floating point precision issues, and also
fix a divide by zero in the subsurf code found in the process.
2008-11-01 17:07:24 +00:00
58d0dc21aa Getting video texture closer to compiling under linux 2008-11-01 17:06:36 +00:00
0aff409d54 Bugfix #17913
Bah... fix for envmaps just before 2.48 release gave good looking envmaps 
only when there was no sky involved...

The alpha in environment maps should be reset to 255... something that was 
never done before, but also didn't show errors until other fixes in image 
rendering were done.
2008-11-01 16:09:36 +00:00
bd81d96b78 Video Texture: missing newlines at the end of several files. 2008-11-01 15:58:49 +00:00
5cb16c2d03 Video Texture: remove support for capture device, the linux ffmpeg repository is not ready yet. 2008-11-01 15:42:03 +00:00
5b205ce852 Speedup collecting pixels from a faces UV, was using 'point-in-tri' (IsectPQ2Df) for every pixel in the UV Bounds of a face, replace this with intersection tests that use scanlines to get the x-range of pixels for each Y increment. 2008-11-01 15:35:07 +00:00
00b02f055a Patch 17909: 2D Filter texture coordinates changes, by Dalai Felinto:
* The second opengl texture coordinate (gl_TexCoord[1]) are now filled
  in as well, and will give canvas coordinates from 0.0 to 1.0. The
  first texture coordinates still give the coordinates in the texture
  that is being used, which may not match the canvas exactly, so both
  coordinates are needed.
* Also optimization to allow using smaller texture sizes with multiple
  smaller viewports.
* Print the detailed GLSL shader errors (once), for easier debugging.
2008-11-01 14:00:16 +00:00
54401d36aa BGE Video Texture: fix constant initializer problem with Exception description. Uniformized the line ending. 2008-11-01 12:48:46 +00:00
5cdbbe3a92 * Tweaked the spin force field a bit. It worked great for its purpose
before, but wasn't playing nice with the other force fields (was 
overwriting the velocity rather than acting as a force). This version is 
slightly different, but will work a lot better with other force fields too.
2008-11-01 12:45:19 +00:00
b590b121d3 fix a bug in matrix.invert() for 2x2 matrices
reported by Hans in http://blenderartists.org/forum/showthread.php?t=139748
2008-11-01 11:35:08 +00:00
48fb0edc78 Fix Cmake for MSVC 32bit 2008-11-01 11:15:13 +00:00
21a0e55c50 RNA compile error and warning fixes for MSVC. 2008-11-01 00:23:08 +00:00
7f24dbe5fc RNA / Data API
This is the first code for the Data API, also known as RNA system in the
2.5 Branch. It does not include a user interface, and only wraps some
Scene properties for testing. It is integrated with Scons and Makefiles,
and compiles a 'makesrna' program that generates an RNA.c file.

http://wiki.blender.org/index.php/BlenderDev/Blender2.5/DataAPI
http://wiki.blender.org/index.php/BlenderDev/Blender2.5/RNA

The changes are quite local, basically adding a makesrna module which
works similar to the makesdna module. The one external change is in
moving genfile.c from blenloader to the makesdna module, so that it can
be reused by the RNA code. This also meant changing the DNA makefiles.
It seems to be doing dependencies correct still in my tests, but if
there is an issue with the DNA not being rebuilt this commit might be
the one causing it. Also it seems for scons the makesdna and makesrna
modules are compiling without warnings. Not a new issue but this should
be fixed.

The RNA code supports all types as defined in the Data API design, so
in that sense it is fairly complete and I hope that aspect will not
have to change much. Some obviously missing parts are context related
code, notify() functions for updates and user defined / ID properties.
2008-10-31 23:50:02 +00:00
a8c4eef326 VideoTexture module.
The only compilation system that works for sure is the MSVC project files. I've tried my best to
update the other compilation system but I count on the community to check and fix them.
 
This is Zdeno Miklas video texture plugin ported to trunk. 
The original plugin API is maintained (can be found here http://home.scarlet.be/~tsi46445/blender/blendVideoTex.html)
EXCEPT for the following:

The module name is changed to VideoTexture (instead of blendVideoTex).

A new (and only) video source is now available: VideoFFmpeg()
You must pass 1 to 4 arguments when you create it (you can use named arguments):

VideoFFmpeg(file) : play a video file
VideoFFmpeg(file, capture, rate, width, height) : start a live video capture

file:
In the first form, file is a video file name, relative to startup directory.
It can also be a URL, FFmpeg will happily stream a video from a network source.
In the second form, file is empty or is a hint for the format of the video capture.
In Windows, file is ignored and should be empty or not specified.
In Linux, ffmpeg supports two types of device: VideoForLinux and DV1394. 
The user specifies the type of device with the file parameter:
   [<device_type>][:<standard>]
   <device_type> : 'v4l' for VideoForLinux, 'dv1394' for DV1394; default to 'v4l'
   <standard>    : 'pal', 'secam' or 'ntsc', default to 'ntsc'
The driver name is constructed automatically from the device types:
   v4l   : /dev/video<capture>
   dv1394: /dev/dv1394/<capture>
If you have different driver name, you can specify the driver name explicitely 
instead of device type. Examples of valid file parameter:
   /dev/v4l/video0:pal
   /dev/ieee1394/1:ntsc
   dv1394:ntsc
   v4l:pal
   :secam

capture: 
Defines the index number of the capture source, starting from 0. The first capture device is always 0.
The VideoTexutre modules knows that you want to start a live video capture when you set this parameter to a number >= 0. Setting this parameter < 0 indicates a video file playback. Default value is -1.

rate: 
the capture frame rate, by default 25 frames/sec

width: 
height: 
Width and height of the video capture in pixel, default value 0.
In Windows you must specify these values and they must fit with the capture device capability. 
For example, if you have a webcam that can capture at 160x120, 320x240 or 640x480, 
you must specify one of these couple of values or the opening of the video source will fail.
In Linux, default values are provided by the VideoForLinux driver if you don't specify width and height.

Simple example
**************
1. Texture definition script:

import VideoTexture

contr = GameLogic.getCurrentController()
obj = contr.getOwner()
if not hasattr(GameLogic, 'video'):
	matID = VideoTexture.materialID(obj, 'MAVideoMat')
	GameLogic.video = VideoTexture.Texture(obj, matID)
	GameLogic.vidSrc = VideoTexture.VideoFFmpeg('trailer_400p.ogg')
	# Streaming is also possible:
	#GameLogic.vidSrc = VideoTexture.VideoFFmpeg('http://10.32.1.10/trailer_400p.ogg')
	GameLogic.vidSrc.repeat = -1
	# If the video dimensions are not a power of 2, scaling must be done before
	# sending the texture to the GPU. This is done by default with gluScaleImage()
	# but you can also use a faster, but less precise, scaling by setting scale
	# to True. Best approach is to convert the video offline and set the dimensions right.
	GameLogic.vidSrc.scale = True
	# FFmpeg always delivers the video image upside down, so flipping is enabled automatically
	#GameLogic.vidSrc.flip = True

if contr.getSensors()[0].isPositive():
	GameLogic.video.source = GameLogic.vidSrc
	GameLogic.vidSrc.play()


2. Texture refresh script:

obj = GameLogic.getCurrentController().getOwner()
if hasattr(GameLogic, 'video') != 0:
  GameLogic.video.refresh(True)

You can download this demo here: 
http://home.scarlet.be/~tsi46445/blender/VideoTextureDemo.blend
http://home.scarlet.be/~tsi46445/blender/trailer_400p.ogg
2008-10-31 22:35:52 +00:00
77b4c66cc3 Preparation to VideoTexture: everything but the VideoTexture module itself.
Rename PHY_GetActiveScene() to KX_GetActiveScene(): more logical name
Add KX_GetActiveEngine()

new KX_KetsjiEngine::GetClockTime(void) to return current 
render frame time: if the CPU does not keep up with the 
frame rate, up to 5 consecutive logic frames are processed 
between each render frame, so that the logic system stays 
accurate even if the graphic system is slow. For the video 
texture module, it is important to stay in sync with the
render frame: no need to update the texture for logic frame.

BL_Texture::swapTexture(): texture id manipulation
BL_Texture::getTex() : return material texture

Enable video support in ffmpeg for Linux.
2008-10-31 21:06:48 +00:00
8585813693 Update MSVC project files 2008-10-31 20:50:07 +00:00
Nathan Letwory
44efce4f66 * remove unreferenced var 2008-10-31 20:47:30 +00:00
Nathan Letwory
3f7535d3c3 * silence compiler about warnings for C++ files a bit more.
- from what I can see now, the larger part of warnings is now about conversions "possible loss of data" (ie. double to float, etc).
2008-10-31 20:35:14 +00:00
81dd05fd55 speedup occlusion by removing octree raytracing method and use the bucket's face list. 2008-10-31 17:12:45 +00:00
Nathan Letwory
027d86b9ff * doc update 2008-10-31 16:33:42 +00:00
25a2753877 This is coverity issue CID: 456
fixes a buffer overrun issue.

Kent
2008-10-31 14:15:35 +00:00
68cde07b99 corrections to the C_WARN and CC_WARN variables for scons config. I didn't actually changed what the flags were, just the format, but Platform Maintainers, please check. 2008-10-31 13:58:59 +00:00
80971310a3 paint onto the final derived mesh rather then the original mesh data, so painting onto a modified mesh (subsurf, mirror etc) works as expected. 2008-10-31 10:30:30 +00:00
d996f4e0b7 basic projection painting - should work without crashing and not be too slow.
does not use any opengl for calculations (2.5 friendly!) and free from screen pixel artifacts. raytracing is used for occlusion.
Details
* Uses a 2D screenspace bucket grid that store intersecting faces and a list of UV pixels to optimize lookups between the brush rectangle UV pixels
* Buckets and faces are initialized when a brush first touches them.
* on initializing all the faces used have their UV pixels are converted into screenspace and copied into the buckets for painting (if the pixel is not occluded by a ray cast).

still a lot to do - blend modes, float buffer, image wrapping, image texture filtering.

Add feature requests here
http://wiki.blender.org/index.php/Wahooney_re/Paint_Branch_Proposals
2008-10-31 05:51:16 +00:00
15579884b1 * Added a new turbulence type: Time. It's not entirely well tested, but so far working ok. It's smoother looking than 'velocity' but may need more in depth investigation. 2008-10-31 05:29:54 +00:00
457b1118a2 Fix compile flags in linux config to fit Nathan's changes.
Warning to others: Those flags are lists now, be careful and update other configs if needed.
2008-10-31 00:23:01 +00:00
Nathan Letwory
0bd7934be7 * Minimum SCons version is now 1.0.0
- Code has been changed to reflect this (ie. deprecated functions are not anymore used)
* clean up the C and C++ compiler flags mess.
  - in the environment construction of BlenderLib all the compile flag governing options have been split in the *C*, *CC* and *CXX* containing equivalents.
    C is for C compiler only flags. CC is for C and C++ compiler flags and CXX is for C++ compiler only flags.
    All the platform default config files need to be double checked and fixed wherever it looks necessary. Either DIY, or send me a note with needed changes.
  - a start for the BlenderLib parameter list has been made - all the SConscripts need to be checked and modified to hand in flags properly.
* A theeth request: make -jN settable in the config file.
  - I give you BF_NUMJOBS, which is set to 1 by default. In your user-config.py, set BF_NUMJOBS=4 to have 4 parallel jobs handled. Yay.
2008-10-30 23:55:07 +00:00
cfee0079d2 Lots of code cleanup and some new features.
Clean and split editbone duplication methods for easy reuse.

Copy and retarget selected bones to stroke conversion method.

This is the start of the infamous templating system.

A simple demo video is available: http://blenderartists.org/~theeth/bf/etch-a-ton/retarget.ogv and http://vimeo.com/2111535 (for those who dislike ogg/theora)
2008-10-30 19:58:11 +00:00
Nathan Letwory
dca18fc332 * Build aborts when giving options on command-line when WITH_BF_DOCS=True
- make sure epydoc generation doesn't get a fit over options given on scons command-line -> don't use arguments from command-line.
2008-10-30 18:56:20 +00:00
00f3021b68 Build fix (C90): Declaration after statement 2008-10-30 16:38:32 +00:00
baf98b098c Fix for dependency graph cycle print, regular "Parent" relation was
incorrectly printed as "Curve Parent".
2008-10-30 16:03:38 +00:00
4f39255759 Bugfix for [#17879] Speed vectors/velocity data not working on ALL fluids. 2008-10-30 11:51:15 +00:00
5fb8debada * Added a new, slightly experimental force field type: 'Spin'.
It works similarly to Vortex, but it's a more controllable - it 
doesn't send the particles off accelerating into space, but 
keeps them spinning around the Z axis of the force field object.

This is safe in the branch, but Jahka if you have any feedback, 
I'd be curious to hear :)
2008-10-30 09:26:30 +00:00
1a7bc63933 moving stuff home. first draft for template retargetting 2008-10-29 21:49:58 +00:00
0a8498953c merge trunk 17213:17221 2008-10-29 19:14:59 +00:00
35680bbda6 EditVert hash *is* used elsewhere in the code, so just to be safe, use a scratch array instead.
This is actually much safer than juggling values in the tmp union all the time.
2008-10-29 18:57:28 +00:00
4cee77b822 This is a fix for coverity issue CID: 517
Basically the code was referencing var[-1] it wasn't using it
but also did not need to be set in those cases.  So I moved
the assignments so it skips the -1 case.

Kent
2008-10-29 17:45:02 +00:00
22bcbc5742 fix for more disable python defines,
FTOCHAR didnt have brackets around the value. FTOCHAR(a+b) didnt work, FTOCHAR((a+b)) did.
2008-10-29 16:49:51 +00:00
19094597b3 merge trunk 17122:17213 2008-10-29 00:11:58 +00:00
481831bd27 merging harmonic-skeleton branch into trunk. All changes are hidden behind a disabled define, nothing to see here 2008-10-28 22:53:48 +00:00
4baa2d7800 merge 17206:17211 2008-10-28 20:26:38 +00:00
07a1971ced error in DISABLE_PYTHON defines 2008-10-28 20:19:25 +00:00
dca5192974 Fixes blenderplayer for dds stuff
Kent
2008-10-28 19:53:54 +00:00
ac4ff83ca6 added scons option BF_WITH_PYTHON (defined as DISABLE_PYTHON) 2008-10-28 18:47:13 +00:00
025e4b046a merge 17122:17206 2008-10-28 18:47:01 +00:00
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
705a248c75 Updated cmake so it has the option to use WITH_DDS
Kent
2008-10-28 18:33:34 +00:00
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
3db27c9acb Sketching: Gesture to flip stroke (circular arc intersecting the stroke twice).
Some name cleanup.
2008-10-27 23:25:08 +00:00
258784ae4b svn merge -r 17042:17201 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-10-27 20:14:45 +00:00
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
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
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
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
deea0fa2e7 * More improvements for light cache
Previously when using light cache, there could be artifacts caused when 
voxel points that were sampled outside the volume object's geometry got 
interpolated into the rest of the volume. This commit adds a (similar 
to a dilate) filter pass after creating the light cache, that fills 
these empty areas with the average of their surrounding voxels.

http://mke3.net/blender/devel/rendering/volumetrics/vol_lightcache_filter.jpg
2008-10-23 03:50:56 +00:00
ba829e5c36 Debugging tests paid off, fixed a ridiculously silly bug
that was preventing light cache from working on some 
people's systems (but went just fine on both my windows pc 
and mac). I have no idea how the original code even worked 
at all, it really shouldn't have.

But fixed now anyway! Thanks a bunch to Zanqdo for patience
in helping me pinpoint this.
2008-10-23 02:15:36 +00:00
ffe81354f8 removed debug stuff 2008-10-23 02:03:54 +00:00
5fabc7781b and more debugging 2008-10-23 01:52:04 +00:00
ee1a143947 more testing code 2008-10-23 01:40:49 +00:00
3a347c1caf Just adding some temporary testing code to help try and find a bug. 2008-10-23 01:14:30 +00:00
42075d5229 Snapping sketch to bone was using untransformed head/tail. Fixed. 2008-10-22 20:30:02 +00:00
229ae0275f Gesture for delete selected (experimental): figure 8 (gesture crossing on itself twice) 2008-10-22 20:17:11 +00:00
0033293b1e Correct handler for floating panel (close button wouldn't work)
Redraw event on floating panel buttons
Correct limit for Number of Fixed subdivision button
Fix off by one error in fixed subdivision loop.
2008-10-22 18:08:06 +00:00
c11c299d59 default opengl static locations was to try /usr/libGL.a, use the oprngl lib path instead - /usr/X11R6/lib/libGL.a 2008-10-22 16:43:38 +00:00
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
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
d4e2c48faa Part one of the release update commit 2008-10-22 11:48:26 +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
8a6c82684f * Did some small tweaks to how density is used with light
cache - it makes some very good improvements clearing up artifacts:

http://mke3.net/blender/devel/rendering/volumetrics/vol_lc_fixed.jpg
2008-10-22 09:26:18 +00:00
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
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
c62c61a413 * Fixed a bug in copying (making single user) a point density texture 2008-10-22 06:10:16 +00:00
09e4bb058c 2008-10-22 05:35:23 +00:00
0026247ee2 2008-10-22 05:33:45 +00:00
876368d859 * fix for point density - particle systems weren't being
deformed by lattices
2008-10-22 05:24:41 +00:00
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
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
febcbdcfcd Tweaked rendering inside a volume to always return alpha 1.0.
This fixes an issue which darkened the render from inside a 
volume with sky or premul on. Still need to find a good way to
get an alpha value back into the shader (for compositing etc)
without getting the render distorted by premul.
2008-10-22 02:59:33 +00:00
652e4b5225 Point Density:
Replaced 'Sharp' falloff with 'Soft'. This falloff type has 
a variable softness, and can get some quite smooth results. 
It can be useful to get smooth transitions in density when 
you're using particles on a large scale:

http://mke3.net/blender/devel/rendering/volumetrics/pd_falloff_soft.jpg

Also removed 'angular velocity' turbulence source - it
wasn't doing anything useful atm
2008-10-22 01:31:46 +00:00
6f656f6482 fix for a compile error with msvc 2008-10-22 00:26:19 +00:00
094fda8cd9 * Fixed a crash with using light cache on a plane (which doesn't really make sense, but shouldn't crash at least) 2008-10-22 00:09:12 +00:00
4936e09cdf add a way for external scripts to call X3D/VRML importer and deal with unknown node types. 2008-10-21 23:14:40 +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
a96863b65c Fixed Subdivision method (subdivide in a set number of bones).
Subdivision method cleanup (reuse more code)
2008-10-21 22:38:32 +00:00
7c1639f032 Auto Roll:
Bone roll to face the screen on painted strokes.
2008-10-21 17:59:56 +00:00
62c708624d Draw subdivision preview for quick strokes and selected strokes (those that would be converted).
Preview can be slightly off for quick strokes since subdivision will be affected by stroke smoothing applied only when a continuous stroke is finished.
2008-10-21 16:40:42 +00:00
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
1df683a38b more python 2.3 compat, should be the last of it. 2008-10-21 09:08:46 +00:00
f99c02a06b Duplicating bones in EditMode didn't set the custom-shape and bone-groups too. 2008-10-21 08:53:39 +00:00
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
b12d9bfa9c * reimplemented some things, hopefully may fix some problems zanqdo was having 2008-10-21 08:21:36 +00:00
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
97a7b05068 fixed a crash in volume shadows 2008-10-21 06:10:36 +00:00
d335c2dfcf * fixed a memory leak that was happening during preview render 2008-10-21 02:04:29 +00:00
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
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
ff2fcdf34e py 2.3 compat for lightwave_import and wizard_curve2tree 2008-10-21 00:21:02 +00:00
bc55102eac renamed WITH_BF_BPYDOC to WITH_BF_DOCS, added SConscript for building BGE docs too. 2008-10-20 23:21:01 +00:00
07f072457d * fix for crash after latest light cache commit 2008-10-20 23:12:42 +00:00
0107b2729a Add undo push for quick strokes conversion 2008-10-20 20:16:33 +00:00
ff3924ce2f Quick Strokes option
When turned on, edit mode armature act as usual, but LMB can be directly used to paint strokes or poly lines which will be directly converted to bones once ended (with RMB).

Esc now cancels the current stroke instead of ending it (more useful with quick strokes).

Video online:

http://blenderartists.org/~theeth/bf/etch-a-ton/quick_strokes.ogv
2008-10-20 18:55:09 +00:00
fd1dcada60 fix for [#17871] PLY file import: blender seems to loose vertex color information
use Mesh rather then NMesh
2008-10-20 13:36:18 +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
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
81c21128bb A few warnings missed in previous sweep 2008-10-20 09:24:25 +00:00
9d2fc97827 New volume rendering feature: Light Cache
This was a bit complicated to do, but is working pretty well now, and can make shading significantly faster to render.

This option pre-calculates self-shading information into a 
3d voxel grid before rendering, then uses and interpolates
that data during the main rendering phase, rather than 
calculating shading for each sample. It's an approximation
and isn't as accurate as getting the lighting directly, 
but in many cases it looks very similar and renders much faster.
The voxel grid covers the object's 3D screen-aligned bounding box
so this may not be that useful for large volume regions like a
big range of cloud cover, since you'll need a lot of resolution.

The render time speaks for itself here:
http://mke3.net/blender/devel/rendering/volumetrics/vol_light_cache_interpolation.jpg

The resolution is set in the volume panel - it's the resolution
of one edge of the voxel grid. Keep in mind that the higher the
resolution, the more memory needed, like in fluid sim. The
memory requirements increase with the cube of the edge 
resolution so be careful. I might try and add a little memory 
calculator thing like fluid sim has there later.

The voxels are interpolated using trilinear interpolation - 
here's a comparison image I made during testing:
http://mke3.net/blender/devel/rendering/volumetrics/vol_light_cache_compare.jpg

There might still be a couple of little tweaks I can do to 
improve the visual quality, I'll see.
2008-10-20 07:08:06 +00:00
63f6932fa5 Reduced number of MSVC compiler warnings (mostly just casting issues). 2008-10-20 06:39:08 +00:00
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
a806c1eb7f merge 16951:17122 2008-10-20 00:48:10 +00:00
f1faacd7e1 Merge 16964:17122 2008-10-20 00:27:33 +00:00
1e17953d68 Adding undo push and redraw for convert calls. 2008-10-20 00:04:40 +00:00
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
Ken Hughes
a6b1c0a8cc Added WITH_BF_NOBLENDER to scons so that blenderplayer can be compiler by itself (false by default). Also added dependency for 'blender' on command line; seems 'blender' was intended to be a target, but would give the error "Do not know how to make target `blender' ". 2008-10-19 21:25:17 +00:00
18072f5583 modified OBJ import and export UI's to be less confusing with nicer layout. removed an unneeded workaround in fbx export. 2008-10-19 15:53:22 +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
49aa7edb77 Another WIP commit, nothing to see yet. 2008-10-19 08:25:10 +00:00
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
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
72e5ede546 Few tiny cleanups in Action Editor code (comments only) 2008-10-19 03:41:49 +00:00
ba72ff005c Self intersection detection for gestures.
Two new gestures:

- Merge: remove cuts on a stroke (gesture is a circle around the cuts to remove). The encircled points are changed to continuous points.
- Convert: convert selected strokes to bones (gesture is a stroke that loops back on itself once).

Note that all those different gestures are experimental. First, to get a good hang on recognition. Second, to try different things.
2008-10-19 03:33:53 +00:00
96f524ee98 Alt-C and Del/X for convert and delete (no confirmation, no undo, LIVE ON THE EDGE!)
Fix bug with mouse selection (would selected last stroke when clicking in empty space).
2008-10-19 00:35:00 +00:00
7d108a30ee Delete Gesture:
2 segments gesture, going back and forth over a stroke (intersecting twice, angle between segments > 120). Can delete more than one stroke at once. Stroke crossed only once are not deleted.
2008-10-18 23:54:09 +00:00
9dc10efa15 Gesture recognition:
- straight segments are extracted from the strock
- Cut gesture is now on straight strokes only

Trim Gesture:
- Two segments gesture. First segment indicates where the cut is, second indicates which side to trim.

Gesture / Stroke intersection bugfix: better code to deal with perspective (this is very brute force still).
2008-10-18 22:16:42 +00:00
a71cb63ce6 BGE bug #17858 fixed: [SHOWSTOPPER] BGE Memory leak. The memory leak has been identified and fixed in bullet. 2008-10-18 18:37:58 +00:00
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
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
1be4da60a2 * Fixed eekadoodle problem where faces with a zero index vert in the wrong place would reotate the UVs and VCols incorrectly
* Fixed an error that made IndexedLineSet and IndexedPointSet not load for x3d's
* Added support for opening gzip x3d/wrl files
2008-10-18 09:04:25 +00:00
0f49fd401f Skeleton Sketching
Cut gesture: drawing a line with RMB adds exact points (joints in the final skeleton) on strokes. Can cut multiple strokes at once as long as it cuts each one only once (this could be changed).

Shape of the gesture doesn't matter, but eventually it would be straight lines shapes for cuts.
2008-10-17 21:52:50 +00:00
efdbf4b1fc x3d and vrml importer for loading thes files as static scenes. x3d needs a full python install. VRML97 files can be imported without python.
for details on what is supported see
http://wiki.blender.org/index.php/Scripts/Manual/Import/X3D_VRML97#Compatibility
2008-10-17 19:06:24 +00:00
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
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
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
b3000c5529 non-working WIP commit to continue coding at home.
nothing to see here, move along!
2008-10-17 05:54:42 +00:00
16aaefb5c3 Bugfixes for sketching with multiple 3d view (correct update and poly line preview in all views).
Fixed a bug with correlation conversion (matrix application wasn't done at the correct place).
2008-10-17 04:17:16 +00:00
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
265dc12d0a First draft for sketching gestures.
Destures are done with RMB drag
ESC can now also be used to end a polyline.
2008-10-16 21:48:35 +00:00
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
005d7a2a9b Color fade out to indicate the direction of a stroke. 2008-10-15 21:25:42 +00:00
9dec209b7e Subdivision schemes for continuous strokes:
Subdivide in equal length bones
Subdivide by correlation (linearity limits)

Code borrowed in parts from the skeleton generator. Will be eventually reuse code more efficiently.
2008-10-15 19:31:32 +00:00
58ce460cf7 vrml exporting with images was broken. 2008-10-14 23:43:08 +00:00
8fcaa1782d cleanup epydoc errors 2008-10-14 22:31:10 +00:00
dcda0b9d86 == windows installer ==
small update for release 2.48 - no need to re-tag
2008-10-14 20:27:37 +00:00
718c0d5d70 Convert and Delete only selected strokes.
Convert no longer remove converted strokes.
Akey -> select all/deselect all strokes
2008-10-14 20:03:21 +00:00
Nathan Letwory
c6e2684c60 === Installer (win32) ===
* Fix for [#17651] Silent Install Issue
  - make sure silent install is really silent ( /S on command-line)
* Improve installer to check for msvc90.dll
* Improve installer to check for py 25 install (using registry)
2008-10-14 16:24:27 +00:00
55dafc125b resaved in the gimp, now loads with libpng 1.2.30 2008-10-14 14:10:49 +00:00
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
e1aff849e4 Collisions: CollisionModifier needs to be resetted for every loop 2008-10-14 11:54:07 +00:00
af7b777d22 Bugfix for regression from 2.46 on cloth collisions reported by Daniel Salazar via IRC 2008-10-14 11:50:30 +00:00
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
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
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
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
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
c515395067 bugfix: copy/paste bug merged from Bullet main repo into Blender, hope it still can make 2.48 2008-10-14 06:14:25 +00:00
e9b4080354 Embed point looks at last point, whether it was part of a continuous stroke or not (gives better results for poly lines)
Stroke selection (LMB and Shift-LMB).
	Selected strokes drawn in red.
	Eventually convert and delete will work on selection.
2008-10-14 01:25:30 +00:00
af73c8ef42 Skeleton Sketching
- Delete Sketch button
- During continuous strokes, when moving out from and back into an embeding, interpolate depth of the stroke like is done when snapping
2008-10-13 23:41:38 +00:00
f02f984142 Part two of the 2.48 release preparation!
(After this svn tag)
2008-10-13 10:03:17 +00:00
570c64474c Part one of the release 2.48 commit. 2008-10-13 10:01:52 +00:00
51d51991e5 * Added support for solid objects casting shadows within a volume.
Currently it only supports solid shadows - if it's a solid object, it will cast 
100% shadow. Support for transparent shadows can potentially be added down the
track.

http://mke3.net/blender/devel/rendering/volumetrics/vol_shad_internal.jpg
2008-10-13 06:46:23 +00:00
d6808c2b4b * Raytraced shadow casting for volumes
This is a first version and still has a couple of things undefined or
unimplemented, such as external objects casting shadows on or within volumes, 
however volume->solid shadows are going ok.

http://mke3.net/blender/devel/rendering/volumetrics/shadows_test_02.mov
http://mke3.net/blender/devel/rendering/volumetrics/vol_test_shad3.blend

As with other transparent raytraced shadows in Blender ,in order to make it work,
you must enable 'TraShad' on the material *receiving* the shadow. It would be 
nice to make this a bit easier to use, since there's not much chance you want a
volume material to be casting solid shadows, but that's a bigger issue in the 
renderer outside this scope.

The volume shadows are working from the same physical basis of absorption, and 
support coloured absorption:

http://mke3.net/blender/devel/rendering/volumetrics/vol_shad_absorption.png

They also work properly with multi-sampled (i.e. QMC) soft shadows:

http://mke3.net/blender/devel/rendering/volumetrics/vol_shad_sharp.png
http://mke3.net/blender/devel/rendering/volumetrics/vol_shad_soft.png

And by popular request the test file:
http://mke3.net/blender/devel/rendering/volumetrics/vol_test_shad_clouds.blend
2008-10-13 05:22:31 +00:00
602c784de3 missing calls to countall() on switching scenes in the outliner. 2008-10-13 03:55:59 +00:00
c0ddd5fd49 * New option for step size: Randomized
This is on by default, and trades random noise for banding. It jitters
the step size from 75% to 125% of its original amount, and since it
uses the threaded random seeds, shouldn't flicker during animation.

These two images took roughly the same time to render:
http://mke3.net/blender/devel/rendering/volumetrics/vol_stepsize_randomized.jpg
2008-10-13 00:35:58 +00:00
a6bd4480ee * A few volume rendering tweaks:
- modified point density so that it returns a more consistent 
density with regards to search radius. Previously larger radii 
would give much higher density but this is equalised out now.

- Added a new volume material option 'density scale'. This is an 
overall scale multiplier for density, allowing you to (for 
example) crank down the density to a more desirable range if 
you're working at a large physical scale. Volume rendering is 
fundamentally scale dependant so this lets you correct to get the 
right visual result.

- Also tweaked a few constants, old files won't render exactly 
the same, just minor things though.
2008-10-12 23:39:52 +00:00
84cf941c29 Added a -noglsl option to disable GLSL from the command line. 2008-10-12 18:32:26 +00:00
4e7b736097 Multiply by armature inverse matrix to make sure converted bones are where they should be. 2008-10-12 17:54:47 +00:00
6d7353321e First draft for converting sketches to armature.
- New Convert button in the bone sketching float panel
- Only adds straight bones between exact points (not continuous strokes) for now.
2008-10-12 17:33:03 +00:00
1a92054d57 hard limit in for bpy material was wrong 2008-10-12 15:35:17 +00:00
2202cd8781 correction to epydoc 2008-10-12 14:27:30 +00:00
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
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
2211b46084 svn merge -r 16866:17042 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-10-12 12:17:57 +00:00
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
21075b1a17 Using quad trees instead of binary ones give another 10% speedup 2008-10-12 11:38:28 +00:00
f8d6057808 in rare cases the screen cant be found for BPy's file/image selector 2008-10-12 11:31:11 +00:00
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
2ee4feda26 c3d_import needed encoding defined for python 2.5+ to run.
wav file reading minor fix checking array bounds.
2008-10-12 10:39:45 +00:00
167676dbfe read wave files block align value, rather then assuming 2 or 4. 2008-10-12 07:58:05 +00:00
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
012a98988f Bugfix:
Grease Pencil panel in Sequencer and Nodes were not able to be minimised.
2008-10-12 00:59:58 +00:00
0d71c0a9af fix for [#17783] problem when packing wav
"data" is aligned differently in this wave file and the buffer was read past its allocated length.

Fix this by searching for the buffer in increments of 2 (this finds the "data" for the wav file)
added a check not to allow the search to go past the buffer length, so corrupt wave files should not crash.
2008-10-12 00:51:55 +00:00
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
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
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
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
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
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
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
0de3899639 Bone sketching clean up
Armature edit mode only (panel accessible in Armature header menu)
Can be turned on or off
Ctrl also snaps to edit bones' head and tail
2008-10-11 19:53:39 +00:00
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
64a0bcd10a remove constraints from world, if not done yet 2008-10-11 19:32:53 +00:00
c40dfaa531 Fix for recent commit, should only do glFinish() on Windows. 2008-10-11 18:58:07 +00:00
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
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
b2a179c2ac Updated python license, this is compatible with current 2.5 and older.
http://www.python.org/download/releases/2.5.2/license/
2008-10-11 15:55:22 +00:00
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
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
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
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
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
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
69cf55a7d4 Sketch Embed: fix bug when used in edit mode. It's not supposed to be used in mesh edit mode, but at least now it doesn't crash. 2008-10-10 20:23:49 +00:00
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
d99fd92ffa Missing include, apparently only scons+mingw suffers this, strange. 2008-10-10 14:22:54 +00:00
2cfd53a76d Continuous Embedded Stroke: First point was incorrectly embedded because of missing variable assign. 2008-10-10 13:36:05 +00:00
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
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
3c27b8034b use BLI_strcasecmp instead of strcasecmp so it actually links under Windows 2008-10-10 05:17:47 +00:00
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
de4ed8ed56 Stroke embedding. When doing continuous strokes, use the depth hit closests to last, so you can start on a limb and then continue drawing inside it even if things overlap. 2008-10-10 02:59:09 +00:00
41ad6f9d0a fix for [#12255] Rename the File at File Window,the file is deleted
renaming a file on win32 would delete it because it didnt test if the 2 filenames were the same (case insensitive), and remove the 'to' file to make way for the 'from' file.
2008-10-09 22:44:52 +00:00
e5d1c5a176 == Python ==
Bug: [#17734] Loading a python script's help dosn't work

reported by Rian Tut (thanks).

Actual problem: scripts with spaces in their filenames were not supported by the code that registers scripts in menus and runs them. Added support w/o breaking eventual, rare scripts that parse the Bpymenus file. They will still need an update to support filenames with spaces, like done here for these scripts: Scripts Help Browser and Scripts Config Editor.

PS: tested on Linux. Please test on other platforms: just make sure scripts still appear in menus (the File->Export, for example), even after re-registering them (Scripts window -> Scripts Menu -> Update Menus) and that the Scripts Help Browser still works.
2008-10-09 22:28:44 +00:00
915377060f - Filter continuous strokes as they are drawn instead of only when ending a line.
- Pair depth hits per object, to stay consistent if you have an object instead another one (say, if you're drawing on a coat and at one point the hand starts, you don't want to pair the first hit on the coat with the first hit on the hand).
2008-10-09 21:39:26 +00:00
bf3e539865 Sketching embedding.
Hold down Shift to embed points inside a mesh (or on a mesh, if there's no volume).

Done by gathering all the ray hits under mouse, sorting by depth and using the first two. Eventually could probably use hardware based depth peeling. Ray hit method could use bvh or some other accelerator too.

Eventually, will have a mechanism to keep consistent depth while painting continuous lines (painting over a partly obscured mesh shouldn't jump to the top one).
2008-10-09 20:45:33 +00:00
0d23e34362 Reverted bugfix #17709
I misread report, didn't know vertex bevel weights existed even!
2008-10-09 17:18:33 +00:00
c58e94daec bugfix #17709
SHIFT+CTRL+E 'bevel weight' didn't support vertex selection mode yet.
2008-10-09 17:00:53 +00:00
46ee3ee54c Bugfix #11712
Definitely one of the oldest bugs ever (1995 or so). 
Case is a path (child on path, or deformer, or motion modifier) where the
child is far away from path (300 units or so). In that case you can see
the path jumping to another position a bit after a few frames.

Reason:
For interpolating path positions, I was using bspline code still having a 
very ancient constant 0.1666f. 
Floats have higher precision, like 0.16666666. That solved it :)
2008-10-09 14:28:17 +00:00
44c01e2621 Bugfix for [#17333] Fluid bake memory issues provided by Andre Pinto 2008-10-09 12:19:16 +00:00
158d8022bc Bugfix #8911
Image counter can be set to zero when unlinking images, whilst they can
be in use for texture. This is a temporary solution to prevent errors!

(Now image unlinking doesn't set zero users anymore)
2008-10-09 10:59:48 +00:00
9ca5b78d1a BGE bug fix: fix several bugs and inconsistencies in sound actuator:
- support stopping of loop sound
- support stopping by python
- keep state of actuator in sync with audio device. 
  The lack of state sync was causing several other problems:
  - actuator stop playing the sound
  - sound chopped before the end
  - not possible to pause sound
2008-10-09 06:06:11 +00:00
4bd7fa9e2e This is patch [#17773] seq plugin crash -> use not converted to float with ibuf1 & ibuf2
Submitted by Rob Hausauer (paprmh) 

See the link for details:
https://projects.blender.org/tracker/index.php?func=detail&aid=17773&group_id=9&atid=127

Kent
2008-10-09 04:11:33 +00:00
837211077c * fix for silly bug in point density with no object in the object field 2008-10-09 01:15:54 +00:00
2e9d07b33b Grease Pencil:
Added comments a few + stroke simplification code (hidden behind rt and userpref, adapted from theeth's etch-a-ton code). This shouldn't have any other adverse effects.
2008-10-08 23:42:00 +00:00
b613eb2e21 Sketching snapping.
Hold Ctrl to snap to an exact point (black dots). Continuous strokes are extrapolated between the depth difference of both end points when snapping.
2008-10-08 20:54:19 +00:00
Chris Want
890b9f26f7 Patch #7065, from Stephane SOPPERA, part two: improvements when using
the commandline 'nmake' to build blender on windows -- please test!
2008-10-08 19:58:57 +00:00
Chris Want
495eab6709 Patch #7065, from Stephane SOPPERA, part one: define macro WITH_OPENEXR
when the sources are configured with OpenEXR support.
2008-10-08 19:56:41 +00:00
4a4f7c802a Bugfix #17784
Playanim now works for:

- tiff, cineon, dpx, hdr, exr

Only multilayer not, that's too much for a bugfix. Multilayer is a totally
different image format, handled separately.

ALso removed redundant printing for dpx/cineon.
And fixed crash in cineon when G.scene doesnt exist. Bad bad, should
not be there!
2008-10-08 18:35:41 +00:00
9cbb1745c2 Bugfix #17784
libtiff init was missing on "Play anim", causing it to not read tiffs.
2008-10-08 18:15:19 +00:00
b589489ef8 2.5 Branch: use themes for drawing the time space, and make
view2d grid code a bit nicer.
2008-10-08 18:07:56 +00:00
d8facbd45e Bugfix #17785
Fixed tooltip for "double sided" so it clearly denotes it's about light. :)
2008-10-08 17:34:26 +00:00
56295f9688 own error, bvh import would always miss the last frame.
thanks ppClarity for picking up on this.
2008-10-08 17:07:32 +00:00
63fb586496 Bugfix #17778
COmpositor: Multilayer images in Image input node could crash on 
making icon previews for the browse menu.
2008-10-08 16:50:06 +00:00
Ken Hughes
5fd6e7e1b7 Python API
----------
Add optional string argument to Object.newParticleSystem() method, so that
objects can link to existing particle systems (if the name of the particle
system is known).  Also cleans up some code in Object.c which accesses the
particle sys listbase.
2008-10-08 16:37:33 +00:00
bfe2759ceb Bugfix #17767
NULL check missing in particle bvhtree testing.
2008-10-08 16:29:09 +00:00
9ebcaad82f Bugfix #17769
Someone managed to write over the protected part of ID name (python???).
This crashes blender in unexpted place, added error print for this.
2008-10-08 15:42:49 +00:00
75f458022e my changes broke the "level" option for joystick keys being held between states 2008-10-08 11:40:39 +00:00
53e046157d fix for a bug where getting ID props would rename the datablock (including its type), then crash.
http://blenderartists.org/forum/showthread.php?p=1228670#post1228670
2008-10-08 09:27:26 +00:00
a75dbcae8d Fixed a tooltip typo
Kent
2008-10-08 09:15:16 +00:00
30208e1790 Error about "max open floating panels" used wrong math. 2008-10-08 08:08:58 +00:00
ce4162c9a1 * Joystick sensor is now only triggered from events of the selected type.
* Keyboard sensor - added (back?) support for qualifiers (Hold buttons in the UI)
2008-10-08 03:16:19 +00:00
b8c294d323 bugfix: missing attributes from shrinkwrap copy function.
Reported by Bassam on IRC
2008-10-08 01:04:07 +00:00
33065932f9 First sketching draft code.
Left Click and drag for continuous strokes, left click for exact points, Right click to end strokes.

The view can be manipulated while drawing a stroke (between exact point).

Sketching is turned on all the time, this is mainly useful for testing, do not use seriously, nothing is saved, it gives memory errors on exit, yada yada
2008-10-07 22:04:00 +00:00
8b2f089c6e DXF-Exporter update
v1.27 - 2008.10.07 by migius
- exclude Stani's DXF-Library to extern module
- add "hidden mode" substitut: back-faces removal
- add support for mesh ->POLYFACE
- optimized code for "Flat" procedure
- modif FACE class for r12
- add mesh-polygon -> Bezier-curve converter (Yorik's code)
- add support for curves ->POLYLINEs
- add "3d-View to Flat" - geometry projection to XY-plane
2008-10-07 20:34:24 +00:00
d8758e32a0 WebPlugin
fix:
* web plugin works on opera too

sandboxing:
* added AppArmor configuration
* enabled privilege separation for the web plugin: the blender player can run as a lower privileged user, xauth token is generated on the fly .

testing:
* web plugin tested on ubuntu 32/64bit, fedora and FreeBSD

Changed only cmake build script: AppArmor is enabled by default, if you want to enable privilege separation instead, you have to change the cmake variable WEBPLUGIN_SANDBOX_MODE to privsep (or none to 
disable it).

Warning: source/gameengine/GamePlayer/xembed/blenderplayer-wrapper.c must be setuid root in order to change user successfully
2008-10-07 17:13:35 +00:00
94a9fa4711 Fix for bug #13363: ray (qmc) shadows had some light leaking issues,
due to jittering of the start position for antialiasing in a pixel.

Now it distributes the start position over the fixed osa sample
positions, instead of of random positions in space. The ugly bit is
that a custom ordering was defined for osa 8/11/16 to ensure that the
first 4 are distributed relatively fair for adaptive sampling to decide
if more samples need to be taken.
2008-10-07 15:01:44 +00:00
0d7d520ffa Bugreport in irc, alxarch report:
Fgon flushing for EM_selectmode_flush() should not happen in face select
mode. That prevents 'select swap' or deselecting fgons.
2008-10-07 14:24:08 +00:00
dc14259c83 own error moving macro to function, double checked and its correct now. 2008-10-07 08:19:48 +00:00
77484d28d5 joystick update
* use SDL events to trigger the sensor, trigger was being forced every tick. removed workaround for this problem.
* added "All Events" option, similar to all keys in the keyboard sensor.
  This means every event from the joystick will trigger the sensor, however only events from the selected type (axis/button/hat) is used to set the positive state of the sensor.
* Added python function sens_joy.GetButtonValues(), returns a list of pressed button indicies.
* Removed pressed/released option for joystick buttons, it was the same as the invert option.
2008-10-07 05:09:24 +00:00
8c3e960dd4 * Fix for silly crash in point density UI, showed up in files with an existing empty texture. 2008-10-06 22:39:06 +00:00
8d73ea72a7 Comments for text editor functions. More to come tomorrow. 2008-10-06 22:08:14 +00:00
160609bce8 Grease Pencil Bugfix
When converting to armature, don't flag the first bone of each stroke as connected.
2008-10-06 21:41:20 +00:00
64527fa81d patch [#17772] Fluid solver not built with OpenMP in Makefile build system
Submitted By: gsr

Kent
2008-10-06 19:57:42 +00:00
d16a8649ff merge runk 16887:16950 2008-10-06 17:37:03 +00:00
Chris Want
de6a9d0194 Use xrange() rather than range() for loop iterations. 2008-10-06 17:11:10 +00:00
Chris Want
d5f647a221 A fix for bug #8814:
http://projects.blender.org/tracker/?func=detail&atid=125&aid=8814&group_id=9

Smarter handling of faces that have a material index that points
to a null material.
2008-10-06 17:06:13 +00:00
25ece3ba2f * New point density update: Turbulence
This addition allows you to perturb the point density with noise, to give 
the impression of more resolution. It's a quick way to add detail, without 
having to use large, complex, and slower to render particle systems.

Rather than just overlaying noise, like you might do by adding a secondary 
clouds texture, it uses noise to perturb the actual coordinate looked up 
in the density evaluation. This gives a much better looking result, as it 
actually alters the original density.

Comparison of the particle cloud render without, and with added turbulence 
(the render with turbulence only renders slightly more slowly):
http://mke3.net/blender/devel/rendering/volumetrics/pd_turbulence.jpg

Using the same constant noise function/spatial coordinates will give a 
static appearance. This is fine (and quicker) if the particles aren't 
moving, but on animated particle systems, it looks bad, as if the 
particles are moving through a static noise field. To overcome this, there 
are additional options for particle systems, to influence the turbulence 
with the particles' average velocity, or average angular velocity. This 
information is only available for particle systems at the present.

Here you can see the (dramatic) difference between no turbulence, static 
turbulence, and turbulence influenced by particle velocity:
http://mke3.net/blender/devel/rendering/volumetrics/turbu_compare.mov
2008-10-06 12:25:22 +00:00
16f199bda3 one-liner fix for id property duplication bug 2008-10-06 10:24:32 +00:00
ba720030be * dont change handle types when adjusting the radius or tilt of a curve handel.
* dont take the handles into account for the manipulator center when they are not drawn.
2008-10-06 09:17:49 +00:00
bd81616ac6 Bugfix:
Grease Pencil sketches in OGL-render should only show up if they were enabled for the original 3d-view.
2008-10-06 08:29:15 +00:00
c9634ce5b4 fix for [#17560] Error in BPY_run_python_script
any path starting with a '.' on win32 would be replaced with C:\ (or the default root)
this was added rev 6568 so the file selector would replace "." with C:\. should be moved to fileselector but for now compare with "." rather then checking the first char.

header_view3d.c - prop edit and render were aligning in curve edit mode.
2008-10-06 08:02:35 +00:00
6c2738ef48 fix for own bugs in curves.
- the number of segments was always 1 too many on cyclic curves.
- [#17739] - normals were not being calculated when rendering curves.

Replaced macro DL_SURFINDEX with a function. it that assumes variable names and could break from the loop that called it.
2008-10-06 06:10:14 +00:00
002725d72a use uint8_t and uint32_t rather then Uint8 and Uint32, (mingw didnt know about Uint's) 2008-10-06 01:59:11 +00:00
Nathan Letwory
e6ba0900b5 whitespace commit 2008-10-05 22:44:47 +00:00
Nathan Letwory
9d77cc9222 * use env.Clone() instead of deprecated env.Copy() 2008-10-05 21:36:36 +00:00
Nathan Letwory
7bdb629009 * merge main SConstruct and some of the utility scripts for our scons build from trunk.
Note: I'll be working on improving our scons build environment in this branch
  Note2: I'll be upgrading our scripts to work fully with scons 1.0 (and possibly later)
2008-10-05 21:33:23 +00:00
Nathan Letwory
5d92376ef4 === SCons ===
* small doc update
2008-10-05 19:07:09 +00:00
34399546b7 == FFMPEG ==
Added optional OGG / theora / vorbis support.
(OGG-format encoding is currently disabled, since the bundled ffmpeg version
is broken here)

Fixed a bug with PTS-encoding, to make theora work.

You have to explicitly enable it and currently only scons is supported.

Otherwise: enjoy! :)
2008-10-05 17:31:33 +00:00
Ken Hughes
e99ff615d7 Python API
----------
Change documentation for Object.getSize(), Object.getEuler(), Object.getLocation() to clear up confusion about 'localspace' parameter.
2008-10-05 14:31:40 +00:00
333b7c3668 * Grease Pencil - changed defaulted for sensitivity userprefs. Will overwrite old settings too (to keep users less confused about this).
* Removed some unneeded funcs (compiler warnings)
2008-10-05 12:06:55 +00:00
86560d6b3f Bugfix #8908
Using shapekeys, you get corruptions in other shapes when you undo into
a previous editmode session. The "key index" values become invalid.
Now, if you have shape keys, entering editmode will clear the previously 
stored undos.
2008-10-05 12:02:36 +00:00
5c74db4e4e Grease Pencil:
* Separated duplicate methods out into several functions

* Added copy/paste for gp-frames in Action Editor. Only strokes that are appropriate for the spacetype that the destination layer belongs to will be added to avoid wasted memory usage. Otherwise, was impossible to move sketches between views/layers (which was intended for PyAPI access that didn't get done).

Note: there will currently still be an extra gp-frame created, even if the current no strokes got pasted. There's commented out code which would delete it, but somehow that causes errors, so better to be safe for now.
2008-10-05 11:49:09 +00:00
af7033bae4 Bugfix:
Reordering Grease-Pencil frames in the Action Editor after transforms was not working at all. Seems I forgot to fix this part after changing what the 'Grease Pencil' editing mode in Action Editor showed.
2008-10-05 10:48:07 +00:00
1695b07bac Fix for [#17758] Particle Caching Problem
-A line initializing particles from pre-cache days was still in place causing the wrong behavior.
2008-10-05 09:44:46 +00:00
c1223f2459 Bugfix #17750
Wrap text and moving cursor with a selection still crashed.
Thanks Zanqdo! :)

(Also cleaned code layout to use same convention as it was)
2008-10-05 09:27:14 +00:00
2ad7aa100d Fix for bug #17762: id property double type did not get copied correct. 2008-10-05 01:15:58 +00:00
6800c5725f Fix for bug #17761: small GLSL update tweak, switching ray and
buffer shadow didn't update the viewport correct.
2008-10-05 00:21:43 +00:00
1e0f02c2ef Fix for bug #17684: GLSL bug with shadows and material nodes,
missed unbinding a texture giving extremely slow frontbuffer
drawing.
2008-10-04 22:21:46 +00:00
639a4ff436 Fix for part of bug #17759: point cache clearing did too much, also
clearing other physics systems on the same object.
2008-10-04 21:26:48 +00:00
04226f6f3f Bugfix for [#17748] "Copy and paste under window since rev 16769"
Now actually copies to the clipboard on copy/cut when editing UI fields.
2008-10-04 21:04:16 +00:00
7d77b58900 Fix wrong result for GLSL material node with only diffuse output
and shadeless material.
2008-10-04 20:22:43 +00:00
7fae6345ab Fix for bug #17752: the particle modifier convert button didn't
do anything for dupli objects and groups, which could already
be converted with ctrl+shift+A, but convert can do it as well.
2008-10-04 19:58:08 +00:00
32d7a06131 Bugfix: modified game material settings in blender didn't get
taken into account when loading a new .blend.
2008-10-04 17:04:23 +00:00
d7589d8bc8 Game player: preserve material, debug settings, between .blend files. 2008-10-04 16:42:36 +00:00
a7a4c4113e Bugfix #17753
Fix for rev 16702 commit to better support per-vertex radius in curves.
It caused the directional lines for 3d curves to not draw correct.
2008-10-04 15:02:40 +00:00
324e1d57ac Bugfix #17750
Texteditor misses NULL checks in 'wrap text' code, moving cursur while
text is selected.
2008-10-04 13:42:45 +00:00
f8d7da21b1 Bugfix #17746
Curve deform did not work yet on Text and Curve objects, this because it
was not providing the entire array of vertices, for a proper detection of
min/max bounds of the full input.
2008-10-04 12:31:54 +00:00
67a9d4154d * New volumetrics feature: scattering types
Otherwise known as a phase function, this determines in which directions 
the light is scattered in the volume. Until now it's been isotropic 
scattering, meaning that the light gets scattered equally in all 
directions. This adds some new types for anisotropic scattering, to 
scatter light more forwards or backwards towards the viewing direction, 
which can be more similar to how light is scattered by particles in nature.

Here's a diagram of how light is scattered isotropically and anisotropically:
http://mke3.net/blender/devel/rendering/volumetrics/phase_diagram.png

The new additions are:
- Rayleigh
describes scattering by very small particles in the atmosphere.
- Mie Hazy / Mie Murky
more generalised, describes scattering from large particle sizes.
- Henyey-Greenstein
a very flexible formula, that can be used to simulate a wide range of 
scattering. It uses an additional 'Asymmetry' slider, ranging from -1.0 
(backward scattering) to 1.0 (forward scattering) to control the 
direction of scattering.
- Schlick
an approximation of Henyey-Greenstein, working similarly but faster.

And a description of how they look visually (just an omnidirectional lamp 
inside a volume box)
http://mke3.net/blender/devel/rendering/volumetrics/phasefunctions.jpg


* Sun/sky integration

Volumes now correctly render in front of the new physical sky. Atmosphere 
still doesn't work correctly with volumes, due to something that i hope 
can be fixed in the atmosphere rendering, but the sky looks quite good.

http://mke3.net/blender/devel/rendering/volumetrics/sky_clouds.png

This also works very nicely with the anisotropic scattering, giving 
clouds their signature bright halos when the sun is behind them:

http://mke3.net/blender/devel/rendering/volumetrics/phase_cloud.mov

in comparison here's a render with isotropic scattering:

http://mke3.net/blender/devel/rendering/volumetrics/phase_cloud_isotropic.png


* Added back the max volume depth tracing limit, as a hard coded value - 
fixes crashes with weird geometry, like the overlapping faces around 
suzanne's eyes. As a general note, it's always best to use volume 
materials on airtight geometry, without intersecting or overlapping faces.
2008-10-04 12:23:57 +00:00
046810929e Bugfix #17720
Retopo crashed on undo-redo, caused by bad copying of data for undo stack.
I solved crash or corruptions, but it still is pretty weak code here.
2008-10-04 11:04:09 +00:00
1513e96857 fix conflict in merged file. weird, it compiled ok wednesday. 2008-10-03 23:36:02 +00:00
5298e26b76 More cosmetic changes to the bullet buttons: move most common soft body buttons to main panel, only leave advanced settings in advanced panel. Reduce size of advance panel. 2008-10-03 21:50:42 +00:00
17c391b429 bugfix: add Ghost support for soft bodies, so that they don't collide with ghosts, and can be ghost themselves. 2008-10-03 21:42:19 +00:00
56b560bb6c Move the Solaris workaround in btScalar behind the sun define, to only make sun and apple ppc slower:
#if defined (__sun) || defined (__sun__) || defined (__sparc) || (defined (__APPLE__) && ! defined (__i386__))
Also includes a fix to uninitialized variable (can cause failing collisions).

If possible, report all changes to extern/bullet2 to http://code.google.com/p/bullet/issues/list
2008-10-03 20:51:56 +00:00
f80d6efb3b BGE patch: some cosmetic change in the bullet buttons:
- Bring Actor button back in main panel: makes the users
  life easier to identify which object is visible to 
  near and radar sensors.
- Give more space to the Advanced Settings panel.
- Display radius control button even for static objects
  if sphere bound shape is selected. Same for displaying
  the radius in the 3D view.
2008-10-03 20:17:05 +00:00
5574655dad Fix for part of bug #17464, though not the original issue yet. A GLSL
shadow drawing fix also affected 3d view opengl render, hiding armatures,
now there's separate flags for it.
2008-10-03 19:34:49 +00:00
128ee40d60 Small fix for (harmless) use of uninitialized memory. 2008-10-03 19:30:45 +00:00
40fb11efaf 2.5 Branch: added WM_report and WM_reportf functions for reporting
information, warnings and errors.
2008-10-03 18:03:30 +00:00
0eaccf881b Solaris was having problems with sqrtf and friends again.
I changed sqrtf to sqrt in elbeem
in bullet2 I added defines found in floatpatch.h eventually
we should make a "floatpatch.h" that all of blender can use.

Kent
2008-10-03 13:16:10 +00:00
59dbf08253 Bugfix for fluidsim UI inconsistencies, please check your settings in old files 2008-10-03 13:02:34 +00:00
87b4037733 More Grease Pencil touchups:
* Eraser size is now UserPref. This way it is more easily tweaked than using layer stroke-thickness squared, but it is less accessible.
 
* Restored stroke 'smoothing' (post-conversion) option as UserPref option. Off by default.

* Fixed bug with convert tools. Was adding an extra datablock everytime, that wasn't being used (and was subsequently dicarded).

* Moved pressure vars from paint-loop to temp-struct (during painting). Also, moved the macro which tests for converting straight lines.
2008-10-03 11:56:11 +00:00
df00a4b878 interpreted request from Carsten - make message sensor work.
object message actuators needed the prefix OB when sending a message to a specific object.--This line, and those below, will be ignored--

M    source/gameengine/Converter/KX_ConvertActuators.cpp
M    source/blender/blenkernel/BKE_blender.h
M    source/blender/src/buttons_logic.c
M    source/blender/blenloader/intern/readfile.c
2008-10-03 09:51:43 +00:00
ae63fcc905 Grease Pencil bugfix:
Disabled fancy 'dot' drawing for Image Editor. This is still just a quick-fix (like for fancy strokes), and it would be nice to get the scaling right someday.
2008-10-03 09:40:48 +00:00
a618708f48 Blender works with python 2.6, our own import functions that replace pythons internal function needed updating for an extra in argument in 2.6.
if importing is not working blender should not crash (was crashing on exit)
2008-10-03 06:27:41 +00:00
365282e5c8 error with GameLogic.globalDict loading. It would replace the dictionary rather then updating it.
This meant the BGE would load in an old dictonary replacing the loaded dict, loosing settings.

was also missing a decref for marshal data
2008-10-03 04:41:02 +00:00
5f7bd14073 Added back a few lines that were accidentally chopped out when fixing pad0 view feature. This means that the grid is drawn correctly (i.e. not shown) when the view is rotated using the numpad up/down/left/right keys. 2008-10-03 03:29:34 +00:00
1ce81854f7 Fix for bug #17722: sun light in the texture viewmode was broken. 2008-10-02 23:04:28 +00:00
60e32f69b9 Fix for bug #17735: vertex color render layer got invalid value
when switching to weight paint mode.
2008-10-02 22:55:25 +00:00
c35a2d6ea9 merge trunk 16118 -> 116886 2008-10-02 20:39:57 +00:00
06c43148a1 transform snap bugfix: correctly ignore hidden elements when snapping to edit mode mesh 2008-10-02 17:20:58 +00:00
0fcd017031 missing ; in last commit
radius was not being calculated on curves that had a bevel object
2008-10-02 17:11:49 +00:00
1b3e2d7c02 blender would crash if the "sys" module didnt import, now just give a warning and continue. 2008-10-02 16:59:08 +00:00
0110133cf7 Maybe not needed, I was running into some problems though
and noticed dos line endings in a bunch of files so ran
dos2unix on everything in bullet2.

Erwin,  I noticed there are a few files that do not have
license info in them, couple of quick examples are: btDefaultMotionState.h
btHashMap.h btQuickprof.cpp
could you take a look at add where needed?   If you want I can give a list
of files I think should get it added  and or just add the standard one
say the one in src/btBulletCollisionCommon.h 

Kent
2008-10-02 16:52:39 +00:00
575b4743ed Bugfix #17723
Clipboard copy/paste error, missing NULL check caused crashes.
2008-10-02 12:29:45 +00:00
Nathan Letwory
7ba46c70ad * return the right error code
* print error message when something goes wrong with nsis installer creation
2008-10-02 08:46:04 +00:00
f66ae0daca Keyframe Checking (i.e. does given frame have a keyframe) is now implemented in the keyframing api.
Replaced the method used in to check if there's a keyframe on the current frame, when drawing the active object name / frame number info with this new code. 
- It should in theory be faster than the previous code, as it doesn't have to build an entire list everytime of all keyframes, and also uses more efficient search method.
- Added some settings to control what sources of animation data are used (per 3d-view). Can be found in the View Properties panel.

This should be stable... release builders should ignore this commit for now (to avoid having differences between release candidates).
2008-10-02 08:39:30 +00:00
Nathan Letwory
7e704c8c03 * use release flags as default, except for openmp support 2008-10-02 06:22:36 +00:00
Nathan Letwory
59eaf36f97 * make sure we link against proper openmp library when using msvc
* return error code from makensis process instead of 0
2008-10-02 06:11:47 +00:00
e114d194ae * Re-coded the point density range checking to be a bit cleaner, and
not necessary to modify the BVH functions.
2008-10-02 01:38:12 +00:00
3659b390bf only paint onto selected faces when painting mask is enabled. (request from Carsten) 2008-10-02 01:12:37 +00:00
3ec4f674d0 Python 2.4 should build with the game engine now, no thanks to python for switching from char to const char 2008-10-02 00:22:28 +00:00
c2b8702a83 BGE patch: add frameProp to Ipo actuator (Carsten's request). 2008-10-01 21:17:00 +00:00
8550c2b594 BGE patch: new force field constraint actuator
A new type of constraint actuator is available: Force field.
It provides a very similar service to the Fh material feature
but with some specificities:
- It is defined at the object level: each object can have 
  different settings and you don't need to use material.
- It can be applied in all 6 directions and not just -Z.
- It can be enabled/disabled easily (it's an actuator).
- You can have multiple force fields active at the same time
  on the same object in different direction (think of a 
  space ship in a tunnel with a repulsive force field
  on each wall).
- You can have a different damping for the rotation.

Besides that it provides the same dynamic behavior and the 
parameters are self explanatory.
It works by adapting the linear and angular velocity: the
dynamic is independent of the mass. It is compatible with
all other motion actuators.

Note: linear and anysotropic friction is not yet implemented,
the only friction will come from the object damping parameters. 
Support for friction will be added in a future revision.
2008-10-01 19:16:13 +00:00
39e66e4d6f Bug fixing
It helps if the fonction to wait on all threads actual does that.

Use user parameter for number of threads (this is really looking like it should be in the userprefs and not render params).
2008-10-01 18:00:13 +00:00
611b4b383a Disable building of fftw 2008-10-01 17:02:38 +00:00
76658ef1a8 svn merge -r 16741:16866 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-10-01 16:22:28 +00:00
0caa92a49c General tidying of Grease Pencil code... 2008-10-01 08:23:08 +00:00
949b6ca80f BGE bug #17688 fixed: Near Sensor Reset not working (for Gamekit)
Implementation of the PHY_IPhysicsController::SetMargin(),
GetMargin(), SetRadius() and GetRadius() for Bullet and Sumo
to allow resetting the Near sensor radius. For bullet use 
the new setUnscaledRadius() function to change sphere radius.

In pPreparation of a Fh constraint actuator:
- Add KX_IPhysicsController::GetRadius()
- Fix implementation of KX_BulletPhysicsController::GetVelocity()
  (velocity at a point in geometric coordinate)
- Don't try to set velocity on static object (Bullet will assert)
- Add KX_GameObject::GetVelocity() for C access to local velocity
2008-10-01 07:55:02 +00:00
2745517ecd Added 'Object Location' option to 'object vertices' mode in Point
Density. This brings it consistent with the 'particle system' 
mode, and allows silly things like this a bit easier (especially 
after the last fix and BVH improvements!):

http://mke3.net/blender/devel/rendering/volumetrics/pd_objectloc.mov
2008-10-01 07:30:56 +00:00
25236b56a6 * Fix for volumetric rendering. It previously wasn't multiplying
the emission component by the density at the current point, which 
made the volume too bright in less dense areas. This made it look 
too rough, as opposed to smooth as it should be. This makes the 
particle rendering look *much* better, thanks a bunch to ZanQdo for 
complaining and kicking my butt to make me realise the error.

Here's an example of how smooth it looks now:
http://mke3.net/blender/devel/rendering/volumetrics/smoke_test03.mov
http://mke3.net/blender/devel/rendering/volumetrics/smoke_test03.blend

Settings in existing files will have to be tweaked a bit, since 
what they were set up for before, was incorrect.

* Added two new interpolation types to Point Density: Constant and 
Root. These work similarly to in proportional edit for example, 
just gives a bit more choice over how hard-edged the particles 
should look.
2008-10-01 07:13:28 +00:00
f4c1fcefe8 Update MSVC project file for Bullet soft body. Strange, I though I already fixed them. 2008-10-01 07:04:10 +00:00
aa5c4f8801 + hook up a few more parameters, that can be useful for Bullet soft bodies
+ work-in-progress to hook up cluster constraints (they are better than node/vertex pinning, because they maintain a proper world coordinate system)
2008-10-01 06:36:17 +00:00
8622cbca35 * Point Density texture
Replaced the previous KD-tree (for caching points) with a 
BVH-tree (thanks to Andre 'jaguarandi' Pinto for help here!).

The bvh is quite a bit faster and doesn't suffer some of the
artifacts that were apparent with the kd-tree.

I've also added a choice of falloff types: Standard, Smooth, and 
Sharp. Standard gives a harder edge, easier to see individual 
particles, and when used with a larger radius, Smooth and Sharp 
falloffs make a much cloudier appearance possible. See the image 
below (note the settings and render times too)

http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_bvh.jpg
2008-10-01 03:35:53 +00:00
e427b82962 Bugfix #17721: Action Strips added from scripts don't work properly unless at least one strip has already been added by hand.
Synced the behaviour of the PyAPI when adding strips with the behaviour of UI.
2008-10-01 00:14:28 +00:00
c3602099c8 Bugfix #17717: IPOs / Sequencer / Markers: deleting an IPO delete also selected markers
Final attempt at solving this problem. This time I've decided to separate the 'delete markers' from the 'delete keys' hotkeys, as it proved to be too problematic for users. 

The new hotkey for deleting markers is "Shift-XKEY". (or Shift-Delkey) 
P.S. I know that 'Shift' is usually used for 'add' operations, but this will have to do for now...

----

Also, rearranged button order in Timeline header a bit to group keyframing buttons together more.
2008-10-01 00:02:06 +00:00
3c99a0f735 Fix for build error, mustn't have committed this properly last night 2008-09-30 23:58:48 +00:00
808d6197cf add support for Bullet soft body constraints against a Bullet rigid body, as well as 'fixing' it. Just use the existing rigid body joint to use it. For now, it searches the closest node/vertex to the pivot. So you can use multiple constraints/joint to attach a cloth, soft body etc. 2008-09-30 23:34:25 +00:00
09f79a8e9f add setUnscaledRadius for btSphereShape 2008-09-30 22:05:12 +00:00
66d51d461e Fix for bug #17691: edgesplit was crashing on windows on large meshes
due to stack overflow.
2008-09-30 17:06:41 +00:00
da62240ab2 Keyframing:
- More cleanups, to move the return of success from insertkey to take into account results of 'only needed' keying option
- Added a 'better' test for size of area than the previous one (for use with the keyframing buttons in the TimeLine)
- Moved the checks for Action/IPO editors to commonkey_context_get() so that the keyframing buttons in TimeLine could also consider using these editor's keyframing methods too
2008-09-30 12:30:56 +00:00
0f5dc86049 A few cleanups in keyframing.c
- Added missing update calls for buttons window keyframing. This should get rid of all those sporadic update problems (using a different keyingset would result in no curve being added)
2008-09-30 12:03:31 +00:00
80a4bbf473 Bugfix:
Keyframing from Buttons Window was broken for Materials/Lamps/Worlds due to a mixup regarding the correct adrcodes for texture-slots.
2008-09-30 11:52:59 +00:00
1eb06b9370 Action Editor:
* Grease Pencil Mode - now includes the area-ID into the name string. While the numbers currently don't mean much (though they do make it easier to distinguish between views to more than before), they could become handy if/when PyAPI access to Grease Pencil data comes into handy

* Copy + Paste bugfixes
- When there was a collapsed group, it was impossible to get the keyframes in the keyframe summary to be copied too. This fix shouldn't cause any problems with other things...
- Feature to allow pasting to any channel without doing name matching was not working
2008-09-30 10:54:12 +00:00
a667fc61d4 * Removed the volume 'layer depth' control' (was used to
limit ray intersections like as for ray transparency). It 
remains to be seen if it's even that useful, and was 
preventing refracting materials behind volumes from 
working easily.
2008-09-30 10:41:47 +00:00
361ff9e525 Fix for bug #13624: knife cut with vertex snapping was broken. 2008-09-30 07:01:37 +00:00
8c4744c4d6 Fix for bug #17302: subsurf + particle size vertex groups did not
work correct, also refactored some code here to make it more clear.
2008-09-30 06:12:47 +00:00
13c8e189f6 WITH_ELBEEM diabled wasnt working with cmake 2008-09-30 05:05:50 +00:00
5871b289cc modify BLI_convertstringcode so windows paths are converted from C:\foo.jpg to /c/foo.jpg
since there is C:\ prefix cant exist on a unix system this wont break any files.
2008-09-30 04:08:00 +00:00
16b425b9c0 * free bullet-softbody was using free softbody function.
* mistake from own changes to curves, new curves were being added with too low resolution.
* removed warnings I added recently
2008-09-29 23:46:01 +00:00
a32d4280c9 Fix for part of bug #17521: incorrect uv coordinates for particle
density controlled by a texture.
2008-09-29 23:33:27 +00:00
31acc8ba9c Fix for bug #17713: touch/no override for rendering was broken. 2008-09-29 22:31:47 +00:00
fed535f1fb Fix for bug #17712: fluid button activation crash. 2008-09-29 22:07:13 +00:00
ff096645ad fix bug with adjust retarget and control bones 2008-09-29 20:21:46 +00:00
4aff02006b Add 2 items to CTL-A menu: Scale to ObData and Rotation to ObData. These options allows to apply separately the scale and the rotation to the object data. Usefull to physics compound objects that do not support scaling. 2008-09-29 20:13:40 +00:00
70e6241c9b Do not include manifest file for x64 + Windows, was creating errors on other system 2008-09-29 18:10:42 +00:00
6deea1a5d7 Bugfix #17711
SunSky didn't include skycolor in raytrace.
Note: there seems to be  an error in sunsky when looking straight down, 
so this option requires raytracing stuff not in outer space. :)
2008-09-29 17:55:11 +00:00
a1513a8c0f BGE patch: fix force application on soft body. Force is applied on each node, it must be reduced by the same extend. 2008-09-29 17:46:25 +00:00
2a331067cc resolve some compiler warnings with intel c/c++ compiler
* subsurf code had a lot of unused variables, removed these where they are obviously not needed. commented if they could be useful later.
* some variables declorations hide existing variables (many of these left), but fixed some that could cause confusion.
* removed unused vars
* obscure python memory leak with colorband.
* make_sample_tables had a loop running wasnt used.
* if 0'd functions in arithb.c that are not used yet.
* made many functions static
2008-09-29 17:08:11 +00:00
7ebeceb399 Updated color calculus for sunsky
- removed ugly clamping function (it was dividing XYZ based on max of
  one of the values)
- added option to use Exposure, this only works for brightness (Y).
  results look very pleasant, foggy and hazy results are possible.
  with exposre==0, no exposure happens for HDR extreme range skies,
  this is how yafray rendered it.
- added menu for choosing color spaces (CIE = modern lcds)

Please review! (and yes i know it's still not in World :)
2008-09-29 17:03:24 +00:00
4fbacd6717 Move Korean file from kr to ko also updated it to newer file.
Kent
2008-09-29 15:02:20 +00:00
45035f10ec [#17703] Segfault on fluid activation. 2008-09-29 14:44:12 +00:00
3996b82b50 [#17707] Slow Cloth Baking 2008-09-29 14:20:27 +00:00
d0a8a767a7 DXF-Exporter script - initial commit
Built on "Stanis Python Library for generating dxf drawing":
History:
v1.25 - 2008.09.28 by migius
 - modif FACE class for r12
 - add mesh-polygon -> Bezier-curve converter (Yorik's code)
 - add support for curves ->POLYLINEs
 - add "3d-View to Flat" - geometry projection to XY-plane
v1.24 - 2008.09.27 by migius
 - add start UI with preferences
 - modif POLYLINE class for r12
 - changing output format from r9 to r12(AC1009)
v1.23 - 2008.09.26 by migius
 - add finish message-box
v1.22 - 2008.09.26 by migius
 - add support for curves ->LINEs
 - add support for mesh-edges ->LINEs
v1.21 - 2008.06.04 by migius
 - initial adaptation for Blender
v1.1 (20/6/2005) by www.stani.be/python/sdxf
 - Python library to generate dxf drawings
2008-09-29 14:03:15 +00:00
a8e97fe1ed Bugfix #17708: layer IPOs doesn't return the correct layer anymore
When doing IPO-cleanup, added two break statements to hopefully optimise the evaluation process a teeny-weeny bit. However, that caused more problems than it was worth!
2008-09-29 11:39:58 +00:00
2bee679a2d Bugfix #17696
- Area lamp with 1 sample still used an offset for the first sample
- Sample buttons were not visible for area without shadow.
2008-09-29 10:26:20 +00:00
404dad0e7f rewiten a if statment 2008-09-29 09:54:26 +00:00
445b83e3ce Bugfix #17687
Scaled cameras get orthogonalized on render, and did not get a signal
to refresh the matrix, resulting in wrong display of camera in 3d win.
2008-09-29 09:50:16 +00:00
e17c2c51bf Bugfix:
Recoded pidhash's recent Pad0 (Lastview) commits (r.16802 and r.16810). It was causing major issues with Ortho perspective + rotating the view with the MMB. Setting G.vd->view to -1 was not such a valid way to do so (and also, this didn't play nicely with smoothview).

This feature should now work correctly, though there are still one or two places where it doesn't always seem totally correct yet. 
The basic idea of this feature, is that after going into camera mode (Pad0), pressing Pad0 again lets you go back to the view as you had it before entering camera mode.
2008-09-29 08:11:26 +00:00
638c51ba7d don't crash when trying to make a soft body 'fh' object 2008-09-29 08:00:38 +00:00
31d6a6be68 * New Point Density texture option: 'Object Vertices'
This works very similarly to particles, it just uses the object's renderable vertices as the points instead.

http://mke3.net/blender/devel/rendering/volumetrics/pd_objectvertices.png
2008-09-29 07:56:41 +00:00
2c289a02b6 Clarify that in Bullet, the 'radius' is used for both sphere bounds, but also for Fh/Rot Fh.
So even if other bound types are used (such as box etc), the radius will be used for Fh/Rot Fh.
2008-09-29 07:17:12 +00:00
cef5c4b765 Add Fh/Rot Fh to Bullet. 2008-09-29 06:58:49 +00:00
cddd38f539 fixing a little problem with grid after last view commit 2008-09-29 04:36:18 +00:00
bab94c46e0 Point Density texture
The Point Density texture now has some additional options for how 
the point locations are cached. Previously it was all relative to 
worldspace, but there are now some other options that make things 
a lot more convenient for mapping the texture to Local (or Orco). 
Thanks to theeth for helping with the space conversions!

The new Object space options allow this sort of thing to be possible
 - a particle system, instanced on a transformed renderable object:
http://mke3.net/blender/devel/rendering/volumetrics/pd_objectspace.mov

It's also a lot easier to use multiple instances, just duplicate
the renderable objects and move them around.


The new particle cache options are:

* Emit Object space
This caches the particles relative to the emitter object's 
coordinate space (i.e. relative to the emitter's object center). 
This makes it possible to map the Texture to Local or Orco 
easily, so you can easily move, rotate or scale the rendering 
object that has the Point Density texture. It's relative to the 
emitter's location, rotation and scale, so if the object you're 
rendering the texture on is aligned differently to the emitter, 
the results will be rotated etc.

* Emit Object Location
This offsets the particles to the emitter object's location in 3D 
space. It's similar to Emit Object Space, however the emitter 
object's rotation and scale are ignored. This is probably the 
easiest to use, since you don't need to worry about the rotation 
and scale of the emitter object (just the rendered object), so 
it's the default.

* Global Space
This is the same as previously, the particles are cached in global space, so to use this effectively you'll need to map the texture to Global, and have the rendered object in the right global location.
2008-09-29 04:19:24 +00:00
425264d7cc Update the Bullet/game buttons_bullet, to better reflect usage.
1) Anisotropic friction works for static and dynamic objects
2) For soft bodies, assume triangle mesh if no bounds a chosen
3) Form factor == inertia scaling factor, it was actually hooked up in Bullet
4) Only show 'radius' if sphere is chosen, or no bounds+dynamics (== sphere bounds)
2008-09-29 04:14:47 +00:00
32b733dafb Patch #17500: fixes: multiple IK's on bone + targetless IK
Submitted by: Teppo Kansala (teppoka)

See patch report for details of fixes.
https://projects.blender.org/tracker/index.php?func=detail&aid=17500&group_id=9&atid=127

Note: the patch submitter's test files were quite nice, and would be good to have in our regression suite.
2008-09-29 04:00:42 +00:00
0b622fc07f added anisotropic friction support for Bullet. Both for static and dynamic objects 2008-09-29 03:09:03 +00:00
25fc47aaf2 tests for 2d triangle and quad intersection would only work if the points were ordered clockwise.
now return 1 for clockwise, -1 for counter-clockwise and 0 for no intersection.
2008-09-29 02:16:18 +00:00
f001e58768 Updates to hotkeys.py with some hotkeys I've added/changed over past few releases (note, this doesn't cover all of them yet) 2008-09-29 00:47:21 +00:00
12c688fd7e Adding last view feature for PAD0 2008-09-29 00:44:33 +00:00
345dc8eb94 Fix: point density texture now works with the 'auto name' button 2008-09-28 23:40:36 +00:00
cf683729f6 Second try at committing IPO code cleanups... 2008-09-28 23:17:44 +00:00
d1ce4fbaff A previous commit by me (16701) broke keyed- and none-physics particles or at least made them do funny things. 2008-09-28 19:53:37 +00:00
c3794cb983 Bugfix, irc report from slw_sl:
Instert "avail" on object without ipo crashed. Null check missing.
2008-09-28 17:05:58 +00:00
1e62b58bcc reverting revision 16784 that broke compilation. Aligorith, please fix and recommit 2008-09-28 15:37:37 +00:00
49f9049eb5 fix header text 2008-09-28 13:51:30 +00:00
21640badf7 IPO System - Code Cleanup and Commenting:
Went through and commented all the code in ipo.c, tidying up formating and coding style in places, and also rearranging to have a more logical order in some places. There shouldn't be any major issues arising from this commit.
2008-09-28 12:01:41 +00:00
8056705ae9 * Volumetrics
Removed all the old particle rendering code and options I had in there 
before, in order to make way for...

A new procedural texture: 'Point Density'

Point Density is a 3d texture that find the density of a group of 'points' 
in space and returns that in the texture as an intensity value. Right now, 
its at an early stage and it's only enabled for particles, but it would be 
cool to extend it later for things like object vertices, or point cache 
files from disk - i.e. to import point cloud data into Blender for 
rendering volumetrically.

Currently there are just options for an Object and its particle system 
number, this is the particle system that will get cached before rendering, 
and then used for the texture's density estimation.

It works totally consistent with as any other procedural texture, so 
previously where I've mapped a clouds texture to volume density to make 
some of those test renders, now I just map a point density texture to 
volume density.

Here's a version of the same particle smoke test file from before, updated 
to use the point density texture instead:
http://mke3.net/blender/devel/rendering/volumetrics/smoke_test02.blend

There are a few cool things about implementing this as a texture:

- The one texture (and cache) can be instanced across many different 
materials:
http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_instanced.png

This means you can calculate and bake one particle system, but render it 
multiple times across the scene, with different material settings, at no 
extra memory cost.

Right now, the particles are cached in world space, so you have to map it 
globally, and if you want it offset, you have to do it in the material (as 
in the file above). I plan to add an option to bake in local space, so you 
can just map the texture to local and it just works.

- It also works for solid surfaces too, it just gets the density at that 
particular point on the surface, eg:
http://mke3.net/blender/devel/rendering/volumetrics/pointdensity_solid.mov

- You can map it to whatever you want, not only density but the various 
emissions and colours as well. I'd like to investigate using the other 
outputs in the texture too (like the RGB or normal outputs), perhaps with 
options to colour by particle age, generating normals for making particle 
'dents' in a surface, whatever!
2008-09-28 08:00:22 +00:00
28684b1c09 make gui backwards compatible with this weeks softbody blend files 2008-09-28 03:17:45 +00:00
f8fb61f9fa enable -noaudio option, so it actually works (and doesn't get overwritten by a game flag). audio initialization delays startup of game engine 2 seconds
add -nojoystick commandline option: it takes 5 seconds everytime to start the game engine, while there IS no joystick.

In other words: blender -noaudio -nojoystick improves workflow turnaround times for P - ESC from 7 seconds to 1 second!

Improved Bullet soft body advanced options, still work-in-progress. Make sure to create game Bullet soft bodies from scratch, it is not compatible with last weeks builds.
2008-09-28 03:07:13 +00:00
a765f54b1a Commiting fftw lib into extern for ocean patch 2008-09-28 02:17:05 +00:00
c723b91446 BGE patch: create new BulletSoftBody data block to store bullet soft body specific parameters.
Previously we tried to share the parameters with the
blender render soft body but there were too many differences.

MSVC project files updated.
2008-09-27 21:52:20 +00:00
5f7359a4ad Cleaned up unused variables and functions. 2008-09-27 19:57:32 +00:00
d988ff33db Global Clipboard Patch (17370)
Text, ID names and RGB colours in the interface are now copied to and pasted from the system clipboard allowing them to be copied from and pasted into the text editor. Colours are encoded as floats in the form [r.rrrrrr, g.gggggg, b.bbbbbb] making them easy to use in Python scripts.
2008-09-27 19:47:38 +00:00
d7d15c2c66 Fixed recent changes to text editor which broke building with MSVC and also cleaned up some compiler warnings. (Actually, Benoit seems to have beaten me to it, but I found moving the #includes worked without undefining INT)
The header button is great but it didn't function for 2 seconds between clicks due to the old code waiting between modification checks. Fixed that now too :)
2008-09-27 19:20:32 +00:00
8253b3e2e6 Fix compilation problem in Windows and update MSVC project files 2008-09-27 19:05:00 +00:00
ff6d4e84cb text editor changes
* out of sync text dosnt automatically popup a menu anymore since it was too easy to click on it without intending to, moved this to an alert button on the header.
* "_" character was acting as a delimiter, but in python its not.
* renamed "File" to "Text" (so as not to confuse with blenders file menu)
* added redraw_alltext function to remove many duplicate loops where every text display is redrawn.
2008-09-27 15:32:28 +00:00
fe5dd01595 linear ipo curves were still using their handles to calculate an extrapolated value.
It would only work when the bezier point had its handles set to auto before changing to a linear IpoCurve since the handles were being recalculated during transform.
2008-09-27 10:08:19 +00:00
061c5c7633 Bugfix #17693: Visual Rot Keying Broken
The problem was due to a wrong number of IPO-channels getting keyed for the quaternion channels (3 instead of 4). Was a simple copy+paste error.

Also added in check for using "Limit Distance" constraint when using VisualKeying.
2008-09-27 09:11:44 +00:00
99d56a7764 [#17692] Text Editor Line Number Background theme option
from Dalai Felinto (dfelinto)
2008-09-27 08:15:10 +00:00
98b2c0626a Lots of mingw/gcc compiler warning fixes 2008-09-27 06:49:10 +00:00
50faaccf2e Auto-Keyframing (per scene):
Now auto-keyframing can be enabled/disabled per scene (with the insertion mode also stored per scene). The flags used when insertng keyframes are still stored in the user-prefs. 

New scenes have their auto-keyframing settings initialised from the user-preferences.
2008-09-27 06:29:52 +00:00
049b88f0d2 Keyframing:
* Tidied up code a bit to remove an extra var declaration that may have been causing problems with Visual Keying

* Added buttons to Insert/Delete keyframes from current frame into Timeline header. Note that it preferentially works will insert keyframes for a 3d-view (if it exists), otherwise it "should" take the largest area available.
2008-09-27 04:51:42 +00:00
b6405b970c force collision bound type to be convex hull or concave triangle mesh for soft bodies
set collision margin between soft and mesh back to .3, smaller is not useable (yet)
2008-09-27 00:36:18 +00:00
1e0cfcfd3a fixed some outstanding issues with Bullet soft bodies:
1) re-allocate a pool allocator, if one of the soft body collision algorithms is larger than max pool element size
2) manage child shapes properly, and call RemoveReferences on the m_sparsesdf
2008-09-26 23:20:31 +00:00
17d9f2eda9 fixed soft body collision against concave triangle meshes. 2008-09-26 21:49:26 +00:00
73119b840a avoid adding degenerate faces to a Bullet soft body 2008-09-26 21:27:33 +00:00
6cc87a1047 Merge of SimpleDeform modifier from soc-2008-jaguarandi branch
http://wiki.blender.org/index.php/User:Jaguarandi/SummerOfCode2008/SimpleDeform
2008-09-26 21:21:20 +00:00
eed854b296 Update MSVC project files 2008-09-26 19:38:07 +00:00
3ad55e1541 nurbs surface resolution is now per segment rather then being distributed over the whole surface.
This is what 2D do alredy and makes resolution settings more like subsurf level.

- This makes it impossible to have a lower resolution output then the nurbs cage, however this dosnt seem a very useful feature.
- Using the do-versions from recent curve interpolation fix.

Tested with these files.

http://digilander.libero.it/pafurijaz/Files/Blender/Libellula.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Martello.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Punta.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Phones.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Tubo.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Pipe.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Tire.zip
http://digilander.libero.it/pafurijaz/Files/Blender/Cotton.zip
2008-09-26 19:00:49 +00:00
8e1cf42dbd BGE patch: local/global flag to distance contraint actuator.
Previously the distance constraint actuator was always working
in local axis. The local flag allows to cast the ray along a
world axis (when the flag is not selected). 
The N flag works differently in this case: only the object 
orientation is changed to be parallel to the normal at the hit
point. 

The linear velocity is now changed so that the speed along the 
ray axis is null. This eliminates the need to compensate the 
gravity when casting along the Z axis.
2008-09-26 18:03:14 +00:00
8b46e655fa Update MSVC project files 2008-09-26 17:46:55 +00:00
dff3d418d4 Bullet build system fixes: add gimpact to the makefiles, and fix
blenderplayer linking for scons.
2008-09-26 16:43:50 +00:00
b542721f32 Made simple deform limits be relative to BV of object 2008-09-26 16:14:35 +00:00
f13bd6ef3c Bugfix: the game player did not initialize tiff and quicktime, so loading
those file formats did not work. Also made sure G.order is initialized as
otherwise some reading tiff goes wrong.
2008-09-26 14:54:21 +00:00
03f26fa6e4 Fixed a UI bug on shrinkwrap constraint
Fixed vertexs weights on simpledeform modifier (they weren't working if the modifier was the first on stack, since it wasnt receiving a DerivedMesh with vertex weights)
2008-09-26 13:47:41 +00:00
c301a059bd svn merge -r 16667:16741 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-09-26 08:58:15 +00:00
1206061ed4 Patch #17346: Align bones in edit mode
Submitted by: Lorenzo Pierfederici (lento) 

This patch adds the CTRL-ALT-A hotkey to align bones in armature edit mode.

It works the same way as parenting: selected bones will be aligned with active bone, if only one bone is selected it
will be aligned with its parent (if any)

Thanks!
2008-09-26 08:51:05 +00:00
06a5e9b58a scons/mingw linking fixes with bullet - adjusting priorities to find libs 2008-09-26 08:40:35 +00:00
Nathan Letwory
a349a3201e * split collision lib into its subparts
-This is to remedy long command-line troubles for scons/mingw users. Hopefully this goes ok on other platforms too :)
2008-09-26 08:05:18 +00:00
5adff90b08 * Some more tweaks to particle density rendering. I'm not 100%
sure if this is 'correct' but so far in testing it's been working 
pretty well.

This also exposes a new 'Nearest' value, to determine how many
nearby particles are taken into account when determining density. 
A greater number is more accurate, but slower.
2008-09-26 07:12:36 +00:00
9d3c77ec62 support concave soft bodies, preliminary. could be used for cloth too. need vertex pinning/constraint attach to other objects. 2008-09-26 06:25:35 +00:00
a1bef84ea8 Allow Bullet soft bodies to be created using a AddObject actuator. Added a fake world coordinate system to game soft bodies, although the vertices are already in world space.
Added Bullet/Gimpact concave collision detection to Blender. If your build system isn't updated yet, please add extern/bullet2/src/BulletCollision/Gimpact/*
This allows moving/dynamic concave triangle meshes (decomposing meshes into compound convex shapes, and using 'compound' shapes is still preferred)
2008-09-26 02:27:59 +00:00
09e17ac876 SimpleDeform now initializes limit values to the BB when its added to an object 2008-09-26 02:02:02 +00:00
78c50f7af1 Wheee!
Initial commit for supporting rendering particles directly as 
volume density. It works by looking up how many particles are 
within a specified radius of the currently shaded point and using 
that to calculate density (which is used just as any other 
measure of density would be).

http://mke3.net/blender/devel/rendering/volumetrics/smoke_test01.mov
http://mke3.net/blender/devel/rendering/volumetrics/smoke_test01.blend

Right now it's an early implementation, just to see that it can 
work - it may end up changing quite a bit. Currently, it's just a 
single switch on the volume material - it looks up all particles 
in the scene for density at the current shaded point in world 
space (so the volume region must enclose the particles in order 
to render them.

This will probably change - one idea I have is to make the 
particle density estimation a procedural texture with options for:
* the object and particle system to use
* the origin of the co-ordinate system, i.e. object center, world 
space, etc.

This would allow you in a sense, to instance particle systems for 
render - you only need to bake one particle system, but you can 
render it anywhere.

Anyway, plenty of work to do here, firstly on getting a nice
density evaluation with falloff etc...
2008-09-26 01:54:31 +00:00
6732718ef1 don't apply vertex transformation for deformable game soft bodies.
set a fake world transform for game soft bodies, based on center of the AABB, so visiblity and some game logic works. note: this world transform is not smooth.
2008-09-25 21:04:41 +00:00
ec9295db3a Keep persistent results for retargeting. Easier weight adjustement.
Will have to do a second pass tomorrow to fix some leftovers.
2008-09-25 20:29:15 +00:00
9a7c53782b Fix for [#17677] Blender Crash when Baking Boids
- A check for getting the "better" dm was missing from the boids code. I plan on converting the boids code into using the collision modifier one of these days but hopefully this quick fix will do for now.
2008-09-25 18:31:01 +00:00
9c08e86b06 avoid crash and apply force for soft bodies.
copy normals for soft body vertices, to get proper lighting
2008-09-25 17:53:15 +00:00
27098d3aa0 [#17679] BGE print statement when start and when finish
from Dalai Felinto (dfelinto) 

would useually not encourage prints in these cases, except its often useful to know if an error happened since you last pressed Pkey and without this you end up needing to manually clear the terminal.
2008-09-25 17:43:06 +00:00
bc28feb997 re-use some Blender soft body settings for Bullet game soft bodies 2008-09-25 16:48:25 +00:00
c9c9b2e833 BGE patch: add Debug button next to object state. The object state mask will be printed at runtime with the debug info as a comma separated list of state numbers (1..30) for each active state bit. The reserved property name __state__ is used for that purpose (users should not create a property with that name). 2008-09-25 16:19:07 +00:00
04fa0fd869 Update MSVC project files for blenderplayer 2008-09-25 16:13:17 +00:00
1722aeb6ea This is part of the cleanup Campbell wanted :)
Just getting rid of license_key stuff.

The project files still need to be updated:
projectfiles_vc7/blender/src/BL_src_cre.vcproj
projectfiles_vc7/blender/blendercompactNG.vcproj

Just search for these files in them.
	
Kent
2008-09-25 15:39:46 +00:00
2b6f6698d2 patch [#17683] Fix OBJ import line endings
from Tom Nixon (greysquare)  for fixing [#17681] .OBj import issues
2008-09-25 13:17:56 +00:00
c2a202451f Update of the very ancient 2.3 text of blender.html.
Thanks Nathan Letwory for the poke!
2008-09-25 11:30:39 +00:00
6d7fe87767 binreloc include was wrong for make, removed last YESIAMSTUPID 2008-09-25 08:41:11 +00:00
707f2e300c * Worked a bit on cleaning up the code involving layering volumes on
solids, in front of other volumes, etc. Now there's a 'layer depth' 
value that works similarly to refraction depth - a limit for how many 
times the view ray will penetrate different volumetric surfaces.

I have it close to being able to return alpha, but it's still not 100% 
correct and needs a bit more work. Going to sit on this for a while.
2008-09-25 06:08:41 +00:00
718e2bf74f improved game soft bodies, works for objects that are using 'set smooth'
use shape matching by default for game soft bodies
store soft body index for game vertices
2008-09-25 03:02:30 +00:00
38a80ff9a5 BGE patch: add advanced parameters for SoftBody. Add Rasterizer.drawLine() Python function. 2008-09-24 22:58:49 +00:00
48bc5b2ac6 Made Object-level copy constraints work the same as for bones now too 2008-09-24 11:52:31 +00:00
0417e79586 * Moved the sample location for shading to the middle of the volumetric step. This fixes a nagging bug that would cause noise/odd moire-ish patterns, due to raytrace numerical errors:
http://mke3.net/blender/devel/rendering/volumetrics/vol_clouds_moire.jpg
2008-09-24 07:49:24 +00:00
a0a5198a03 Volumetrics:
* Now it's possible to render with the camera inside a volume. I'm not sure how this goes with overlapping volumes yet, will look at it. But it allows nice things like this :)
http://mke3.net/blender/devel/rendering/volumetrics/clouds_sky.mov

* Sped up shading significantly by not doing any shading if the density
of the current sample is less than 0.01 (there's nothing to shade there anyway!) Speeds up around 200% on that clouds scene.

* Fixed a bug in global texture coordinates for volume textures
2008-09-24 07:38:12 +00:00
3b09c0b0d5 Created a KX_SoftBodyDeformer for real-time soft bodies.
Added SetDeformer/GetDeformer() to KX_GameObject.
Store mapping between graphics/soft body vertices (work-in-progress)
Real-time soft body integration is still very premature, but
for a quick preview, see this testfile:
http://bulletphysics.com/ftp/pub/test/index.php?dir=blender/&file=soft_test.blend
2008-09-24 03:12:10 +00:00
aed107cf4a * Volumetrics scene integration
Now other objects (and sky) correctly render if they're partially 
inside or behind a volume. Previously all other objects were ignored, 
and volumes just rendered on black. The colour of surfaces inside or 
behind the volume gets correctly attenuated by the density of the 
volume in between - i.e. thicker volumes will block the light coming 
from behind. However, other solid objects don't receive volume shadows 
yet, this is to be worked on later.

http://mke3.net/blender/devel/rendering/volumetrics/vol_inside_behind.png

Currently this uses raytracing to find intersections within the volume, 
and rays are also traced from the volume, heading behind into the 
scene, to see what's behind it (similar effect to ray transp with IOR 
1). Because of this, objects inside or behind the volume will not be 
antialiased. Perhaps I can come up with a solution for this, but until 
then, for antialiasing, you can turn on Full OSA (warning, this will 
incur a slowdown). Of course you can always avoid this by rendering 
volumes on a separate renderlayer, and compositing in post, too.

Another idea I've started thinking about is to calculate an alpha 
value, then use ztransp to overlay on top of other objects. This won't 
accurately attenuate and absorb light coming from objects behind the 
volume, but for some situations it may be fine, and faster too.
2008-09-24 02:52:47 +00:00
7eae8d0c7b Patch #17675: Tooltips for fluid control panel - provided by Kai Kostack 2008-09-24 01:39:55 +00:00
7c94eed4cb Fixing compile warnings 2008-09-24 00:23:01 +00:00
005c5e6371 BGE bug #17657 fixed: dRotY doesn't work properly after 90 degrees rotation.
This problem is caused by discontinuities in the conversion
orientation matrix -> euler angles: the angle sign can
switch and thus the direction of the rotation produced
by the dRot Ipo.

To avoid this bug, the matrix->euler conversion must be 
avoided during the game. I took the following approach that 
is compatible with Blender (identical effect in the game and
in the 3D view):

- no change in Add mode: Rot and dRot are treated as additional
rotation to the orientation at the start of the Ipo. There is 
no matrix->euler conversion and thus no discontinuities. 

- Rot Ipo are treated as absolute rotation. All 3 axis should
be specified but if they are not, the startup object orientation
will be used to set the unspecified axis. By doing a matrix->
euler conversion once at the start, the discontinuities are
avoided. If there are also dRot curves, they are treated as
delta of the corresponding Rot curve or startup angle.

- dRot Ipo are treated as Add mode in Local axis.

Note about Add mode: Rot and dRot curves are treated identically
during the game. However, only dRot curves make sense because
they don't interfere with the object orientation in the 3D view.
2008-09-23 20:07:15 +00:00
3cf87f4c20 calculate curve radius for drawing curve normals 2008-09-23 15:57:05 +00:00
bd85367776 disable magnification filtering when mipmap is off. useful for texture low poly models. 2008-09-23 15:21:14 +00:00
2ad14ba223 Changed SimpleDeform to be a single modifier with (Twist|Bend|Taper|Strech) options available on the modifier painel/options. 2008-09-23 14:32:14 +00:00
d72d4a5058 fix for [#11744] NurbCurve Radius incorrect
removed calc_curve_subdiv_radius(), curve radius is now calculated the same way as tilt.

Added radius interpolation menu matching tilt interpolation, needed to add "Ease" interpolation type to keep 2.47 curves looking the same.
2008-09-23 13:35:32 +00:00
47032c251d - Particle-particle effectors we're quite unstable and not accurate at all. Now this should be fixed (especially with other integrators than euler) as the needed inter-frame effector particle positions are interpolated properly from the current and previous positions (previously only the most recent position was used).
- In practice this removes the dependency of particle simulations from the update order of objects and different particle systems inside objects.
- As a nice side effect out of this we also get fully correct birth positions for "near reactor particles" (previously for example smoke trail reactor particles were not born smoothly along the target particles path).
2008-09-23 12:53:00 +00:00
a55d591898 "Fix" for [#17671] Particles spin out of control and pass through when hitting collision object
-The fix is that particle random size factor should never ever be bigger than 1.0, else negative sizes are possible! Don't know who to blame, but probably my self :)
-The second issue of passing through the deflection and rotating wildly around strange centers is not a bug, but for particles the group and object visualization objects have to be centered on the global origin. I'll probably make an option later to use the object center, but this is how things are for now.
2008-09-23 11:51:40 +00:00
45acf427a7 * bugfix, old files (including default cube) weren't loading up with
correctly initialised volume settings
2008-09-23 08:00:55 +00:00
340c3b945e * Refactored the volume texture code. Seems to go ok so far, stress
tests and all my old files render fine, but anyone feel free to let me 
know if you find a bug in this :)

Should be a bit faster too, this file renders in about 60% of the time 
it did before 
(http://mke3.net/blender/devel/rendering/volumetrics/vol_col_emit.mov)
2008-09-23 07:44:25 +00:00
6b4ac3e7de * Volume colour absorption
Rather than a single absorption value to control how much light is absorbed as it 
travels through a volume, there's now an additional absorption colour. This is 
used to absorb different R/G/B components of light at different amounts. For 
example, if a white light shines on a volume which absorbs green and blue 
components, the volume will appear red.

To make it easier to use, the colour set in the UI is actually the inverse of the 
absorption colour, so the colour you set is the colour that the volume will 
appear as.

Here's an example of how it works:
http://mke3.net/blender/devel/rendering/volumetrics/vol_col_absorption.jpg

And this can be textured too:
http://mke3.net/blender/devel/rendering/volumetrics/vol_absorb_textured.png

Keep in mind, this doesn't use accurate spectral light wavelength mixing (just 
R/G/B channels) so in cases where the absorption colour is fully red green or 
blue, you'll get non-physical results.

Todo: refactor the volume texturing internal interface...
2008-09-23 07:05:06 +00:00
bcba8003c0 changing the number of subdivisions for nurbs curves.
this way each edge/segment gets the same number of points matching the resolution value.
before, a nurbs curve would have the same number of points no matter if it was cyclic or not.

This will make slight changes to objects on an animated path, but only noticable if the path has a low resolution.

bug [#11744] NurbCurve Radius incorrect - now dosnt show bad results with order 4 on non-cyclic curve.
2008-09-23 06:26:48 +00:00
d2d56e3058 bugfix for [#7006] Sleeping Objects losing Ghost Constraint
Bullet logic bug in (de)activation/island management: deactivated 'fantom' objects do merge islands, in particular when connected by constraints. (fantom = object with collision detection but no collision response).
2008-09-23 05:00:00 +00:00
50d0e1a988 * Volumetrics update
- Fixed a shading bug, due to issues in the raytrace engine where it would ignore 
intersections from the starting face (as it should). Disabled this for single 
scattering intersections, thanks to Brecht for a hint there. It still shows a 
little bit of noise, I think due to raytrace inaccuracy, which will have to be 
fixed up later.

before: http://mke3.net/blender/devel/rendering/volumetrics/vol_shaded_old.png
after: http://mke3.net/blender/devel/rendering/volumetrics/vol_shaded_correct.png

Now single scatttering shading works very nicely and is capable of things like this:
http://mke3.net/blender/devel/rendering/volumetrics/vol_shaded_clouds.mov

- Added colour emission. Now as well as the overall 'Emit:' slider to control 
overall emission strength, there's also a colour swatch for the volume to emit 
that colour. This can also be textured, using 'Emit Col' in the map to panel.

This animation was made using a clouds texture, with colour band, mapped to both 
emit colour and emit (strength):
http://mke3.net/blender/devel/rendering/volumetrics/vol_col_emit.mov

- Added 'Local' mapping to 'map input' - it's similar to Orco

- Fixed texture 'map input', wasn't using the offsets or scale values.
2008-09-23 04:26:52 +00:00
f187d680d8 fix for [#13825] Lack of Flags in Face Mode Set
undo was also not working.
2008-09-23 01:28:42 +00:00
872704010e [#8540] Import scripts for MilkShape3D file formats
from Markus Ilmola (glome)

note, UV's will be incorrect in some faces because of eekadoodle problem.
2008-09-23 00:49:44 +00:00
7a28ca4398 Make GameLogic work for python autocomplete (after running the BGE once at least)
only clear newly added items from the gameLogic dictionary rather then the whole dictionary.
2008-09-23 00:37:19 +00:00
2911df487e Fixed shrinkwrap constraint handling of matrixs.
Also since contraint uses BVHCache its now usable and fast.
Being possible to shrinkwrap constraint several objects to another
and only have one BVHTree being build.
2008-09-22 22:48:44 +00:00
18c954e95b BGE patch #17569 approved: Make FrameProp: work in Shape Action. PyDoc updated. 2008-09-22 21:49:48 +00:00
2875cc9cc6 Fix for second part of bug #17506: issue with swapped uv coordinates
on creating multires in editmode, wasn't doing test_index_face for
the face data.
2008-09-22 21:22:16 +00:00
d438b466b7 Fix file browser for Windows: going to the parent directory introduces ../\. Correct parent is ..\ under Windows. 2008-09-22 21:15:48 +00:00
0cf7bf7357 Fix for part of bug #17506: uv editing with multires is only
allowed at level 1, missed a case.
2008-09-22 20:26:28 +00:00
9b4956ae22 BGE patch: KX_STATEx constant to allow simple state manipulation in setState()
The constants KX_STATE1 to KX_STATE30 can be used 
with setState() to change the object state in a 
python controller. The constants are defined in the 
GameLogic module so that the full name is 
GameLogic.KX_STATE1 to GameLogic.KX_STATE30 but you
can simplify this with the import statement:

from GameLogic import *
cont = getCurrentController()
ob = cont.getOwner()
ob.setState(KX_STATE2)		#go to state 2

KX_STATEx constants are defined as (1<<(x-1))
Binary operators |, &, ^ and ~ can be used to combine states:

You can activate more than one state at a time with the | operator:

ob.setState(KX_STATE1|KX_STATE2)  #activate state 1 and 2, stop all others

You can add a state to the current state mask with:

state = ob.getState()
ob.setState(state|KX_STATE3)      #activate state 3, keep others

You can substract a state to the current state mask with the & and operator:

state = ob.getState()
ob.setState(state&~KX_STATE2)     #stop state 2, keep others

You can invert a state with the ^ operator:

state = ob.getState()
ob.setState(state^KX_STATE2)     #invert state 2, keep others
2008-09-22 19:54:30 +00:00
eef475ac7e Fix for bug #11163: strand render without tangent shading didn't
give correct results.
2008-09-22 19:37:30 +00:00
4e731c5ab5 Revert full screen, maximized and minimized code (rev 16543).
Revert this because don't work "fine" with dual-monitor.

The problem is not the code, this work fine, but full screen
for a window manager is not both monitor (until set xinerama or
whatever..).
2008-09-22 19:09:46 +00:00
48c54c275b Further fix for #8132, mac/nvidia driver issue drawing node previews,
zoom level was not correct.
2008-09-22 18:33:04 +00:00
315ef8213c BGE patch #17483 approved: object actuator DRot reverted since Blender 246. 2008-09-22 17:12:57 +00:00
b40ed96a78 Patch #17665 by Vladimir Marek
Fixes for solaris compiling
2008-09-22 15:59:50 +00:00
558d7499a6 Patch #17666 by Vladimi<C2>r Marek
Fixes for solaris compiling
2008-09-22 15:59:04 +00:00
627c6178f9 Realy time for 2.5!
Takes half an hour to find a nice empty spot for a button! Another attempt
to locate new shadow color swatch. Now back in shadow panel, bottom.
2008-09-22 15:38:17 +00:00
e4def00d5b fix for [#15020] File browser: going back from the root of all directories introduces "../" ad libitum + harcoded path?
bug was introduced when fixing BLI_cleanup_dir not to write to negative character indicies.
added a BLI_parent_dir(char *path)
2008-09-22 15:37:32 +00:00
bc151f1334 Bugfix:
- Button for 'shadow color' was drawn over 'layer shadow' button...
  The shadow+spot panel was cramped... spot shadowbuffer uses all
  space. Moved it to the Lamp panel with label, more clear now.
  Panel reorg is for later :)
- Small fix: Area Lamp 'gamma' slider didn't update preview.
  Unfortunately had to move this slider to smaller button...
2008-09-22 14:52:50 +00:00
c79f99224d Bugfix #14428: Constraints lost when object made single user
When there was a setup where an object was linked to more than one scene at once, and in one of those scenes some of the objects in that scene were related to it, the objects related to it were not correctly relinked to the new copy. 

This was due to the 2nd check for selected objects 
if( (base->flag & flag)==flag)
meaning that only selected objects would get corrected.
2008-09-22 13:01:51 +00:00
a6edcfc4ac Fluid: Remove SDL threads, also fixed the 'finished too early' problem reported once in tracker 2008-09-22 12:31:27 +00:00
2009ef810e Bugfix #12835
Zbuffer error in render: when you render faces clipped by 'clip end' the
z values could wrap around, resulting in errors. Code not nicely clamps,
plus should be faster even!
2008-09-22 12:18:07 +00:00
6e3bdacc11 Fixing missing function in elbeem 2008-09-22 10:58:50 +00:00
80f4b5b94f Removing control define 2008-09-22 10:21:57 +00:00
c08acde589 svn merge -r 16592:16667 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-09-22 10:04:45 +00:00
eb37006e53 [#17388] snap view to main views while rotating from Roelf De Kock (kiemdoder)
hold down ctrl when rotating the viewport
2008-09-22 10:00:31 +00:00
d1dedb2cef Added three XYZ color space options in code, will be activated later.
Thanks matt for the typing work :)
2008-09-22 09:09:03 +00:00
b7e8df1eff Bugfix: for sunsky preview I added another camera, accidentally changed clip
and lens value for other cameras.
2008-09-22 07:52:08 +00:00
486a6a214d copy object properties was crashing because of my recent changes. need to NULL listbase first.
changed visibility actuator menu to 3 toggle buttons and added tooltip note about outliner render restriction being used for visibility.
2008-09-22 07:17:39 +00:00
c57f32733a Bugfix - Long Keyframes:
In a A___B|---|B situation created by duplicating the B keyframe, the long keyframe between the 'B' keyframes was not showing up until the A keyframe was already duplicated. Reverting the 'optimisation' applied there (i.e. searching from last block, as that's where most blocks would be added)


Also removed some unused lines from gpencil.c
2008-09-22 04:30:21 +00:00
8fcac6820a KX_PythonInit.cpp - workaround for current sandbox and possible fix. no real change for now but others may want to look into it.
blendef.h - removed some unused defines.
editipo_mods.c - deselect all was selecting instead.
2008-09-22 04:18:17 +00:00
7522f86d01 * Volume rendering
This is an initial commit to get it in SVN and make it easier to work on.

Don't expect it to work perfectly, it's still in development and there's
plenty of work still needing to be done. And so no I'm not very interested 
in hearing bug reports or feature requests at this stage :)

There's some info on this, and a todo list at:
http://mke3.net/weblog/volume-rendering/

Right now I'm trying to focus on getting shading working correctly (there's 
currently a problem in which 'surfaces' of the volume facing towards or away
from light sources are getting shaded differently to how they should be),
then I'll work on integration issues, like taking materials behind the volume
into account, blending with alpha, etc. You can do simple testing though,
mapping textures to density or emission on a cube with volume material.
2008-09-22 01:51:24 +00:00
338a5c7bbf Make msvc happy (reported by broken) 2008-09-22 00:32:07 +00:00
96a0e0ab22 Bugfix where copy-protection of several modifiers like collision, softbody and particleInstance could be bypassed by using ctrl-c + 'copy all' option. 2008-09-21 22:47:50 +00:00
6e29313ac3 Update MSVC project files 2008-09-21 21:41:27 +00:00
158cca9e2f Fixing little bug allowing neegative attraction forces again 2008-09-21 21:24:46 +00:00
0039076850 Patch for rearranging fluid GUI provided by artist nudelZ 2008-09-21 21:02:41 +00:00
feccb096d8 [#17662] Blender runs the older version a python script when reloading it from disk
Missing free compiled.
2008-09-21 20:39:19 +00:00
a1b8a918cb Respect compile flags if elbeem is disabled, fix compiling for that case 2008-09-21 18:36:25 +00:00
8471184dc5 Merging fluidcontrol to trunk from rev16649 fluidcontrol branch. Code provided by Nils Thuerey. 2008-09-21 18:20:02 +00:00
afe851b6d1 Sunsky / Atmoshphere:
- Added blending mode and factor option, so it's more clear and
  controllable what happens with it. Also nice for crazy effects
  of course!
- Preview render now shows preview for it too

On the todos:

- have this in World buttons (as well) for quicker sky setups
- review math of color clamping and scaling, this is definitely 
  not good... but a fix will make old files look very different.
2008-09-21 16:04:33 +00:00
1c29d02305 BGE real-time soft bodies, step 2 / 3: create a btSoftBody. Next step is hooking up / deform graphics mesh and choose collision shape.
Note: feature is still disabled.
2008-09-21 15:17:50 +00:00
656ee61718 Merge from trunk
(The last time there was some files missing due to failed connection to svn server while merging.. thats why this stuff of reverting last merge and redoing it)

svn merge -r 16231:16608 https://svn.blender.org/svnroot/bf-blender/trunk/blender
2008-09-19 14:15:36 +00:00
2f9f0710d1 Revert last merge from trunk
svn merge -r 16539:16538 https://svn.blender.org/svnroot/bf-blender/branches/soc-2008-jaguarandi/
2008-09-19 12:05:45 +00:00
6a8e7236cb Memoization: Remove need to keep full position lists on each node. 2008-09-18 21:45:57 +00:00
6701f07e66 svn merge -r 16490:16592 https://svn.blender.org/svnroot/bf-blender/trunk/blender + 16453:16485 2008-09-18 13:22:17 +00:00
4dab8ac3fe Group some functions as they should have been 2008-09-17 21:20:08 +00:00
63aebaf37d Benchmarking print time slice ratio 2008-09-16 23:23:33 +00:00
27de7cc2e1 Added SSLevels options to all shrinkwrap modes (before it was only available to projection mode)
Added BVHTree cache at derivedMesh level
2008-09-16 15:41:13 +00:00
871b24dd67 Benchmarkings timer cleanup
Don't number groups with only one arc (easy fix for fly model, need a two pass arc match for real fix)
2008-09-15 21:48:05 +00:00
a1d611e9bd svn merge -r 16231:16536 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-09-15 14:20:31 +00:00
980969ab63 Draw black border when drawing Reeb graphs 2008-09-12 21:07:25 +00:00
5bde46ae54 Fix bug with multires arc marking (used for flagging arcs as used) 2008-09-12 20:00:05 +00:00
ac142f329c superposed bone check when linking control bones. deal better with some constraint setups. 2008-09-08 22:36:32 +00:00
b60a24e585 Reeb:
- Prevent useless buckets reallocation
- Better multifiltering by not doing precopies

Retargetting
- if no full match found, match using loose rules
- better multiresolution flagging for used arcs (prevent ALL backtracking)
- comment out a lot of debug prints for better benchmarking
2008-09-07 21:44:23 +00:00
a87e2dac0e Use heap instead of array, shaving off approx 10% runtime. 2008-09-03 20:25:47 +00:00
17d777c486 Prebuild an indexed edge list for faster connectivity loops when applying dijkstra and harmonic function calculations.
Drops the runtime for that part of the algo by a lot (39k edges from 16s to 0.6s)
2008-09-03 19:24:26 +00:00
1924eeb182 Couple of variables renames and logic inversion simplification 2008-09-02 20:33:32 +00:00
f479aec492 Memoization based solver for inner joint placement. Pretty much reduces the problem from a monstruous exponential to a quadratic cake.
Thanks to jaguarandi for initial pointers.

Changes in arith is a simple added function to check for null vectors.
2008-09-02 02:10:14 +00:00
276c162e56 Recalculate roll to preserve orientation when retargetting for deform and control bones.
Previously, roll would be kept as it which would make the resulting orientation different than the original, messing up some controls (example: heel bone flipped 180 so feet would rotate toward ground instead of lifting).

Next possible step: preserving inter-bones orientation (if needed)
2008-08-27 19:38:51 +00:00
51d6988756 First draft for hybrid retarget/generate (turned off)
Some debugging code for filtering
Control bones link propagation (can deal with reverse foot rig now).
Bones marked as locked are ignored (useful to unlink character base)
2008-08-26 01:37:46 +00:00
039ed9cb7f svn merge -r 16215:16231 https://svn.blender.org/svnroot/bf-blender/trunk/blender 2008-08-22 15:40:41 +00:00
86cdf3db14 Vertice outside of faces would create zero degree nodes and mess up later.
Do a single pass to remove those after reeb graph creation (but before filtering).
2008-08-21 18:12:36 +00:00
963031c99f Finish yesterday's bugfixing.
Making shape function work on cyclic graphs requires tracking the current graph level, which wasn't done correctly when this was implemented. Done properly now so going up and down on graph works as it did before.
2008-08-21 17:28:58 +00:00
e04b899e81 transfering some ongoing work for home, nothing to see here. 2008-08-20 21:34:49 +00:00
a3337a15f0 Control bone commit from yesterday broke root bones. This is now fixed in a much more elegant way.
Remove yeh ol' primary symmetry axis flipping and replace by a smarter check on both armature and mesh arcs (works better for partial retargetting).
2008-08-19 22:16:01 +00:00
18bce23a60 Make subgraph tagging use own index, to not interfere with flagging used to prevent backtracking in different other functions
Better deal with chains starting with control bones
2008-08-18 22:22:56 +00:00
aef4586408 For now, don't join subgraphs if graphs are cyclic (this causes problem when reweighting because it uses a depth first method which doesn't work with cycles properly) 2008-08-18 00:08:22 +00:00
0418220444 Use ThreadedWorker for dispatch 2008-08-16 22:48:43 +00:00
e0722e0923 ThreadedWorker
New functions to easily dispatch work to a limited number of thread, transparently.

NOTE: Could be merged in trunk, if needed.
2008-08-16 22:47:33 +00:00
cc3b41b3cd Better logic to display symmetries
Add option to hide node and arc indexes (for cleaner screenshots)
2008-08-15 20:55:38 +00:00
520e52d7d2 Control bones support for root bones (didn't work previously)
Preliminary support for multi threading. Fixed at 4 threads now, will make it use the option eventually.

Need a better mecanism to wait for at least one finished threads.
2008-08-14 23:55:40 +00:00
fdb0b003f0 patch from skejoe for gcc 4.3 compatibility 2008-06-24 14:51:02 +00:00
a06f4f3817 == Rip Area into new Window Operator ==
- operator that rips current area into new window
- implemented on the window level.
- sets C->area in current context if necessary
== fix ==
- small bugfix: missing return in WM_event_add_keymap_handler
2008-06-19 19:09:21 +00:00
7097c8a51e 2.5 Branch: makefile update for last commit, patch provided by Diego, thanks! 2008-06-11 17:24:27 +00:00
Nathan Letwory
d1e3bbdcea * small fix for compiling with scons 0.98.x 2008-06-11 11:36:24 +00:00
a019f1d3d6 2.5 Branch
==========

* Changed wmOperatorType, removing init/exit callbacks and adding cancel
  callback, removed default storage in favor of properties. Defined return
  values for exec/invoke/modal/cancel.
* Don't allocate operator on the stack, and removed operator copy for
  handlers. Now it frees based on return values from callbacks, and just
  keeps a wmOperator on the heap. Also it now registers after the operator
  is fully finished, to get the correct final properties.
* Changed OP_get_* functions to return 1 if the property is found and 0
  otherwise, gives more readable code in my opinion. Added OP_verify_*
  functions to quickly check if the property is available and set if it's
  not, that's common for exec/invoke.
* Removed WM_operatortypelist_append in favor of WM_operatortype_append
  which takes a function pointer instead of a list, avoids macro's and
  duplicating code.
* Fix a crash where the handler would still be used while it was freed by
  the operator.

* Spacetypes now have operatortypes() and keymap() callbacks to abstract
  them a bit more.
* Renamed C->curarea to C->area for consistency. Removed View3D/View2D/
  SpaceIpo from bContext, seems bad to keep these.
* Set context variables like window/screen/area/region to NULL again when
  leaving that context, instead of leaving the pointers there.

* Added if(G.f & G_DEBUG) for many of the prints, makes output a bit
  cleaner and easier to debug.
* Fixed priority of the editors/interface module in scons, would otherwise
  give link errors.

* Added start of generic view2d api.
* Added space_time with some basic drawing and a single operator to change
  the frame.
2008-06-11 10:10:31 +00:00
161d60debf == join areas operator ==
- draw arrow in area that will removed and draw area that will be kept lighter (change from trunk: without arrow)
- not using notifications yet, but uses flag in ScrArea to determine draw type for area. (might be worth discussing)
- experimental: swapping of areas extended a bit, which allows user to choose area a bit more freely
2008-01-21 21:36:02 +00:00
Nathan Letwory
43f680bad8 *remove superfluous glEnd(); - made func internal too. 2008-01-20 21:37:39 +00:00
Nathan Letwory
107b0997e7 * grow AZone size
* remove ^M's
2008-01-20 21:10:55 +00:00
a2074a1522 Changes to the "join area" operator.
This is a patch by Michael Fox (mfoxdogg) that make more
easy join two are, just RMB+Alt in the "origin" area,
drag the mouse to the "target" area and release the mouse.

Note that this is not a "final mouse-bind" for the join
operator, just an easy and simple option for test in 
this early stage of 2.5.

Other note: maybe it's a good idea add azones here ?
2008-01-20 04:39:50 +00:00
0db1aed7e1 More change to the gesture manager.
After check this a little more I make some changes to the
API and now work on the following form:
	WM_gesture_init(C, type);

	while() {
		/* handler event, etc */
		/* if something change. */
		if(need_update) {
			/* update the gesture data and notify about it. */
			WM_gesture_update(C, data);
			WM_event_add_notifier (.. WM_NOTE_GESTURE_CHANGE ..);
		}
	}
	WM_gesture_end(C, type);

Another of the change is that now the gesture data is a link list
in the window struct, so we can have multiples "gestures" (but
of different type) at the same time.

Also take care that the "gesture data" is reusable, that mean that
only alloc it 1 time and use in all the place, that is
why don't support multiple gesture of the same type, but of course
that can be change.
2008-01-19 21:54:33 +00:00
b80049a139 New "Gesture Manager" system.
This is a first implementation of the "gesture manager" system,
the idea is put the WM in a automatic draw mode so we can
implement different "Gesture types" to draw different class
of data (lasso, bound box, etc).

The gesture data is passed through the data field of the notifiers,
i think that we can change this to something like:
	WM_gesture_init(C, data); /* put the data in the context. */

	while() {
		/* send WM_NOTE_GESTURE_CHANGED to update screen */
	}

	/* send event and free the data in the context. */
	WM_gesture_end(C);

Also i add a new operator and event to test the gesture manager.
The new operator is the "border select" function, just press BKEY
in the window and LMB or ESCKEY to exit.
In the case of LMB you can see a print in the console about the
BORDERSELECT event.

All this still need a lot of work, comment are welcome.
2008-01-19 17:54:05 +00:00
Nathan Letwory
d7223cb3aa * clean up ^M
* make default size of action zones smaller (still draw them, but that could be also made optional).
2008-01-17 23:03:37 +00:00
4966e63f4f game engine wasnt compiling 2008-01-17 17:15:44 +00:00
2dc143552f Fix uninitited list pointer when duplicate an area. 2008-01-17 16:22:37 +00:00
Nathan Letwory
d72af0a5a9 * First working version of a new split tool for areas.
- LMB+drag from lower left action zone. LMB release confirms
  - RMB or ESC cancel.

TODO:
  - subdiv (drag to center)
2008-01-17 13:50:54 +00:00
Nathan Letwory
e7539ef134 * don't copy azones- these are initiated runtime always. 2008-01-17 08:26:58 +00:00
Nathan Letwory
bd60122a2a * make sure we don't crash on window duplicate, or .B.blend read. There is still a bug with duplicate, but I'm working on it. 2008-01-17 08:21:21 +00:00
Nathan Letwory
0e476af66e * Start ActionZone support for areas. This is bScreen level stuff to be able to do funky stuff.
Right now 2 AZones are defined for each new ScrArea, and mouse over is now detected. Enter ugly triangle.
2008-01-17 05:33:54 +00:00
Nathan Letwory
7e14c5d119 * rearrange screen level drawing code a bit in preparation for tests. 2008-01-16 19:49:34 +00:00
Nathan Letwory
3eca7d1d06 * I gotta remember my mantra for real
"first compile, then commit".

Of course, if compile fails, don't commit.
2008-01-15 23:15:56 +00:00
Nathan Letwory
abc325092f * undutchification of printf's
* remove unnecessary printf's
* clean a bit, some doc strings
2008-01-15 23:08:10 +00:00
da11a3f38e Operators: Join Areas
add split area to screen manager
- RMB+ALT down on area edge activates
- mouse move interactively to area that is to be removed
- LMB to confirm, ESC to cancel
TODO: 
- notifications for interactive drawing to mark area to remove

Some fixes
- uninitialized var warning.
- exit function of operators need to run before modal handler is removed if operator is used there.
- replaced MEM_mallocN with MEM_callocN to get rid of uninitialized mem for wmOperator.
- respect return value of wm_handler_operator_call() and break out of operator handling.
2008-01-15 20:42:00 +00:00
Nathan Letwory
9e9ebfc12c * check for NULL. Could crash if passed parameters were NULL. 2008-01-15 19:28:57 +00:00
Nathan Letwory
6ce20f2968 * add exit app with CTRLKEY+QKEY. 2008-01-15 18:54:38 +00:00
Nathan Letwory
3469906125 * area split:
- prevent a few more cases of Potential Crash.
- tweak moving stuff.
2008-01-15 14:40:43 +00:00
5ed9571ea5 More "data types" for the Operator property system.
Now you can set/get: float, arrays (int and float) and string.

The only special function is OP_get_string, it is special
because return a pointer to the IDProperty data, so you can't
change/resize/free the string.

It's possible "fix" this with:
 1) Return a "const char"
 2) Return a duplicate string

All this new function are not in use yet, but i make a simple test
with the "move areas" operator (add a property of every type and then
print the result in the other size) and work fine, more test are welcome.

Other thing to check is the new OP_free_property function, because this
properties are only local to the operator, i choice free all this in the
"exit callback" of every operator (only move areas have property now), 
so comment about this are welcome too :)

Also add some notes to the WM_api.h file.
2008-01-15 04:49:09 +00:00
Nathan Letwory
8a7558a4fb * fix for crash when mouse cursor changed areas. Not enough was tested, so sometimes we got invalid edges. 2008-01-14 20:57:43 +00:00
Nathan Letwory
c89b96645e Operators: Split Area
This commit adds split area to the window/screen manager.
 - RMB down on area edge activates
 - mouse move interactively moves areas through new edge.
 - RMB up to confirm action
 - ESCKEY or LMB to cancel.

This still crashes in some situations, but I'm on it!
Also will start using new operator property system by bdiego
2008-01-14 20:46:42 +00:00
2a0055401e New API to access Operator properties.
This is a simple API around IDProperty to store properties
in the Operator, it is really simple and this first commit
just add support for IDP_INT data type.

Take care that this "properties" are not save yet and you get
some "Error totblock" more with this.

I add some notes to the WM_api.h file, please check this,
comment and ideas are welcome.
2008-01-14 19:44:20 +00:00
49eb7a3eed Applied a couple sculpt/multires fixes from trunk to blender2.5. 2008-01-12 22:06:42 +00:00
69f004f90d Reverting changes made yesterday to Makefile... (Its really messed up,
Going to do it over again from scratch)

Kent
2008-01-11 16:56:00 +00:00
Chris Want
6258c0979e The python lib name should be 'bf_python' instead of 'blender_python'
when linking.
2008-01-11 16:48:07 +00:00
c562fdf095 Fixed typo from merge yesterday.
Kent
2008-01-11 14:15:59 +00:00
6167882776 Cleaned up some things, more work to do here but its a little simpler now.
Kent
2008-01-10 19:53:57 +00:00
ec4c6154fe Change vector structs from 3 to 4 so things are aligned for 64bit machines.
Kent
2008-01-10 19:22:58 +00:00
11ab3d7598 Add more memory clearing on file read for WindowManager. 2008-01-10 18:56:24 +00:00
42e2b4edde Two fixes in 2.5 branch:
- crash on start because of unitialized pointer
- Makefile had the python lib on weird location... I prefer all 
  blender/source/blender/ libs together on 1 place? The Make needs
  cleaning... it assumes publisher stuff. :)
2008-01-10 18:13:34 +00:00
43cf3af8c0 Blender 2.5 project: added first more complex handler + operator
- on mouse-over edge, you can drag area borders around.
- note it's a handerized system now, so it updates UI while you
  move mouse.

Feedback needed:

- read bottom part of the screen_edit.c file. It's the proposed
  method for adding tools and handlers. I think it's close, but
  might need some tweaks.
2008-01-10 17:38:17 +00:00
Nathan Letwory
b81b6be184 * fix linking order for bf_python 2008-01-09 23:07:34 +00:00
ce975c1027 update to cmake files
- added python library
- small fix for ignored runtime library, needed for linking debug here
Note: still some problems linking with openexr in debug
2008-01-09 18:48:04 +00:00
Chris Want
592c4c53b0 Leave the game engine out by default (WITH_GAMEENGINE=OFF). 2008-01-09 18:26:17 +00:00
Nathan Letwory
8269b89c15 * fix linking order for l00nix 2008-01-08 17:32:38 +00:00
Nathan Letwory
8d9a7941da * apply patch #8020 by Thomas Knight (epat)
Just colours the last speech mark the same as the first when printing status messages about compiling files and so on. Old behaviour was to 
colour it the same as the file name itself.
2008-01-08 16:56:00 +00:00
d0a23e2eb4 Commented out a couple of verse functions that are in src
Kent
2008-01-08 16:17:26 +00:00
Nathan Letwory
15da2232f7 * tweak linking priorities - should help for GCC users
* some lib renaming
2008-01-08 09:47:44 +00:00
Nathan Letwory
c344021b83 * update scons-files to build with Ton's latest commits. 2008-01-08 05:57:27 +00:00
e58676f713 Add missing Makefile for libpython.a
The source/blender/Makefile don't have the "python" directory
set in the DIRS var, so it skip build the python library.
2008-01-07 19:34:38 +00:00
Chris Want
5e3cffc64a Patch to change license to GPL only, from GSR. 2008-01-07 19:13:47 +00:00
c4a2022fe1 Fix for makefile to enter interface dir 2008-01-07 19:06:15 +00:00
0729ba9646 New linking order for the 2.5 editor/wm libs 2008-01-07 18:35:06 +00:00
1363134dee Whole lot of changes.... here a shortlist:
- removed editors/area and put this all in screen
- added first python calls (note, a new c file for scriptlinks)
- added view3d editor callbacks (no drawing yet)
- added files in editors/interface

(Cmake and Scons has to be fixed, help welcome!)

- now areas/headers are being converted on file read
- note: previously saved 2.50 files will crash!!! (.B.blend)
- area regions are being drawn, first handler for cursor added (on edge)
- window duplicate and scale works correct for screen subdiv

Todos for me:

- need to fix things in syntax (function names) a bit still
- more operators for screen
- define how Context will work... still unresolved when it gets set
- docs!

Reviews of code structure is welcome!
There are also more todos now for others, but it can wait a couple of days
2008-01-07 18:03:41 +00:00
Nathan Letwory
1005d99ea5 * GHOST win32: make sure window gets repositioned to 0,0 when setting state to fullscreen (maximised, borderless) (Patch by Gladstone) 2008-01-05 13:56:40 +00:00
Nathan Letwory
30310a530a * make sure blender2.5 still compiles when WITH_BF_VERSE=1 2008-01-05 13:55:30 +00:00
c5488b943d Use XInternAtom by default.
I don't know the name of the "SGI Fast" atom, but this is only request
when blender start so i don't think that this make some "big" difference.

So just use plain X11 calls (thanks GSR for the info).
2008-01-04 23:17:08 +00:00
Chris Want
a2b8986d1d Support for CMake 2008-01-03 22:20:45 +00:00
350d754b16 Add support for GHOST_kWindowState* to Linux.
This add support for the different window state in Linux/X11.
Two think to take care:
	1) m_post_*
	2) motifFullScreen

1) This is only need if we want start a window in FullScreen or Maximized
state. The basic problem is that we can't set this property to a window
until it's really map, so i add a "post init" proccess for this two
special case (check the code for more info).

2) The Motif Hint isn't really a "FullScreen" mode, it's only a
"NO DECORATIONS" options, so if the window manager don't support WM-spec
this function only remove the border of the window, don't make it
FullScreen. A simple fix (hack) is check if the Window Manager support
WM-spec, in case that not, remove the decorations and move/resize the
window.

Test in different WM (gnome, kde, etc) and comment are welcome :)
2008-01-03 21:04:16 +00:00
Nathan Letwory
c87785671c * make sure we have still a compiling GE with scons/mingw
* assist ideasman also for scons/mingw with ffmpeg enabled
2008-01-02 12:35:30 +00:00
Nathan Letwory
3c4f424fc8 * making sure removal of headers still has successful compile on win32 2008-01-01 22:10:39 +00:00
a42e548e81 removed some more header files, made the game engine compile with removed header files, added includes to SConstruct files. 2008-01-01 19:20:49 +00:00
372ee054c0 Some notes for those who try to follow this :)
- first work on getting area/screen handling back
- added structure for where to put stuff, is still under
  review, wait a bit for docs?

Campbell is working on removing every bad level include from
sources, so we can safely rebuild the src/ directory.
2008-01-01 18:29:19 +00:00
58bf29e389 removed blenderdef.h, BIF_*, BDR_* and BSE_* header files (except for BIF_gl.h and BIF_glutil.h) 2008-01-01 18:16:10 +00:00
2df4ef711a More work on restoring Blender;
- brining back subwindow management
- removing more bad level stuff
2008-01-01 15:53:38 +00:00
Nathan Letwory
881fd0cb3a * make sure desktop is redrawn when coming out of GHOST_kWindowStateFullScreen 2008-01-01 14:04:09 +00:00
Nathan Letwory
a11c4cd041 * silence more warnings 2008-01-01 11:14:25 +00:00
Nathan Letwory
7052576344 * some cleanup of warnings 2008-01-01 10:45:48 +00:00
Nathan Letwory
af4678d421 * kill a warning 2008-01-01 09:28:29 +00:00
Nathan Letwory
bcb14c2a0f * add fullscreen toggle operator (for testing fullscreen states in win32). hotkey is FKEY. Do test on other platforms, too. 2008-01-01 09:07:02 +00:00
2d3bbe480c I got confused screenToClient with clientToScreen.
Sorry, i get the wrong value because a print the
wrong variable :/
2007-12-31 14:28:10 +00:00
Nathan Letwory
63d2208319 * fix include path (found by jensverwiebe) 2007-12-31 10:18:26 +00:00
59751edadd Fix bad argument order to XTranslateCoordinates.
Take me a long time catch this :/ and i really don't know how this
work before, because clientToScreen always return bad values.
2007-12-31 06:19:04 +00:00
Nathan Letwory
8814476714 * make sure decoration is there when toggling away from GHOST_kWindowStateFullScreen to GHOST_kWindowStateNormal (win32) 2007-12-30 23:58:59 +00:00
Nathan Letwory
0f1e7db0b7 * also distinguish between maximised and fullscreen on GHOST win32.
* clean up some warnings (unused vars).
2007-12-30 23:09:33 +00:00
Nathan Letwory
1fec64a402 * revert my change to windowmanager move/size handling.
* made win32 ghost getClientBounds so that it returns area compatible with osx getClientBounds
  - if a window is non-fullscreen, substract decoration, since that'll be added by GHOST_WindowWin32()
* use SetWindowLongPtr/GetWindowLongPtr (instead of SetWindowLong) as it is compatible with 64bit windows.
2007-12-30 22:52:00 +00:00
f25ce8d0ff Removed silly Global windowstate variable.
Result: windows open default with decoration (or as your default WM
defines). 

Todo: platform maintainers re-implement a cogent way for giving 
commandline options for defaults, and test how this can be stored even
2007-12-30 17:29:13 +00:00
Nathan Letwory
a80b8352c6 * request by kaito - we're debugging 2.5 now more than using it anyway... BF_DEBUG = 'true' set by default. 2007-12-30 17:17:02 +00:00
Nathan Letwory
93058ac3b3 * handle WM_MOVE on win32 in GHOST
* change window move/size handling so that getWindowBounds gets x,y for window and getClientBounds gets w,h
2007-12-30 17:13:36 +00:00
1039bc26fb Windowmanager, ghost side:
- Added GHOST_kEventWindowMove event, for sending event that the
  window has moved
- Fixed GHOST_GetClientBounds() for OSX (get window rect)

Todos:
- add same event for X11 and Windows
- solve why ghost doesn't call client event-proc while scaling window
  (at least, not in osx)
2007-12-30 13:30:31 +00:00
Nathan Letwory
81035f6e21 * remove unneeded include (msvc barfs on it), now current tree builds with scons/mingw, scons/msvc and scons/gcc (linux) (and afaik also cross-compiles on linux for windows, with thanks to Debolaz) 2007-12-30 00:22:39 +00:00
Nathan Letwory
47f9c1fa5f * some additions and a removal in stubs.c (by elubie)
* mingw config update to link properly with ffmpeg
2007-12-29 20:47:39 +00:00
dc98efaaa0 Accidentally removed a bit too many badlevel calls. 2007-12-29 19:16:04 +00:00
Nathan Letwory
de039a899a * fix include paths in SConscripts for GE. 2007-12-29 19:04:45 +00:00
5307c07832 Badlevel call amount reduced to 21!
(worst was radio module)
2007-12-29 18:44:31 +00:00
d870029748 Adding stubs for audiostream 2007-12-29 18:35:24 +00:00
Nathan Letwory
4c4abb0624 * add also SConscripts for editors.
I totally forgot those. Anyway, now all compiles and links (scons/mingw)
2007-12-29 18:05:24 +00:00
da7208eab5 Ported over the bad-level cleanup from Chris for Sculpt. 2007-12-29 17:07:55 +00:00
c27b65a255 Eh, comment should be on line above :) 2007-12-29 16:43:45 +00:00
b2b5bb55a3 Crash on startup fix 2007-12-29 16:42:39 +00:00
97f144b5ff And now blender will link again! However, with a bad stub.c
That's going to be tackled.
2007-12-29 16:12:35 +00:00
878e09396e Now Makefiles should be uptodate.
Also fixed old error in make for nodes, it didn't enter subdirs
correctly?

Left: 63 unresolved symbols on linking...
2007-12-29 14:56:16 +00:00
6407b5f703 Cleanup work for 2.5 branch. Target is to get it compile and link
still!
2007-12-29 14:31:26 +00:00
Nathan Letwory
1f78baa0f7 * remove obsolete include/ 2007-12-29 10:47:16 +00:00
Nathan Letwory
c2acbef851 * added SConscript for windowmanager
* tweak other SConscripts for editors/include
* commented BKE_bad_level_calls.h in writeframeserver.c - please check it doesn't break make builds

This compiles until final linking, which still fails.
2007-12-27 22:16:54 +00:00
6c7b60668b (this is for blender2.5 again)
Modified these three to include blender/editors/include instead of 
blender/include maybe not needed at this stage but I'm guessing its good
to do this.

Kent
2007-12-27 21:35:25 +00:00
Nathan Letwory
e735a6b4c9 * remove src and python SConscript references 2007-12-27 20:29:29 +00:00
1be207fe08 Small tweaks to blender2.5 Makefiles...
commented out srclib and pythonlib since its not there
added new include dir for window stuff so things could find headers..

Kent
2007-12-27 19:49:22 +00:00
25135a201b - removing conflicts in svn merge (didnt notice)
- adding more Makefiles
2007-12-24 19:13:04 +00:00
8c91939824 Last commit to get things on level I ended with during code holidays
(which was not even a working blender yet!)

Todo for dec 26th: finish the task:
- remove entire src/ and python/ dirs, and get blender to compile and
link again, using a new stubs.c temporary

(note; bad level calls stubs.c was also removed, this was a MESS!)

Then there's the task
- solve the bad level calls (can use help with that!)

So then I can do:
- move the screen code and subwindow code from old src/ to new editors
module and windowmanager

More will follow on mailing list, and wiki.
Merry xmas!
2007-12-24 18:58:12 +00:00
463cf8e332 Part 4 of the event refactor branch: all changes in existing files,
Makefiles especially, and of course the windowmanager DNA!
2007-12-24 18:53:37 +00:00
c79966be52 Blenkernel for 2.5 project, changes mainly are because of disabling
bad level calls. (which is not finished at all)
2007-12-24 18:38:03 +00:00
a1c8543f2a Step 3 for the initial commits for 2.5: removing src/ and python,
adding new windowmanager module, and the first bits of new editors
module.
2007-12-24 18:27:28 +00:00
3429 changed files with 624576 additions and 620825 deletions

View File

@@ -42,14 +42,40 @@ MACRO(SETUP_LIBDIRS)
if(COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
LINK_DIRECTORIES(${PYTHON_LIBPATH} ${SDL_LIBPATH} ${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${ICONV_LIBPATH} ${OPENEXR_LIBPATH} ${QUICKTIME_LIBPATH} ${FFMPEG_LIBPATH})
LINK_DIRECTORIES(${JPEG_LIBPATH} ${PNG_LIBPATH} ${ZLIB_LIBPATH} ${FREETYPE_LIBPATH} ${LIBSAMPLERATE_LIBPATH})
IF(WITH_PYTHON)
LINK_DIRECTORIES(${PYTHON_LIBPATH})
ENDIF(WITH_PYTHON)
IF(WITH_INTERNATIONAL)
LINK_DIRECTORIES(${ICONV_LIBPATH})
LINK_DIRECTORIES(${GETTEXT_LIBPATH})
LINK_DIRECTORIES(${FREETYPE_LIBPATH})
ENDIF(WITH_INTERNATIONAL)
IF(WITH_SDL)
LINK_DIRECTORIES(${SDL_LIBPATH})
ENDIF(WITH_SDL)
IF(WITH_FFMPEG)
LINK_DIRECTORIES(${FFMPEG_LIBPATH})
ENDIF(WITH_FFMPEG)
IF(WITH_OPENEXR)
LINK_DIRECTORIES(${OPENEXR_LIBPATH})
ENDIF(WITH_OPENEXR)
IF(WITH_QUICKTIME)
LINK_DIRECTORIES(${QUICKTIME_LIBPATH})
ENDIF(WITH_QUICKTIME)
IF(WITH_OPENAL)
LINK_DIRECTORIES(${OPENAL_LIBPATH})
ENDIF(WITH_OPENAL)
IF(WITH_JACK)
LINK_DIRECTORIES(${JACK_LIBPATH})
ENDIF(WITH_JACK)
IF(WITH_SNDFILE)
LINK_DIRECTORIES(${SNDFILE_LIBPATH})
ENDIF(WITH_SNDFILE)
IF(WITH_FFTW3)
LINK_DIRECTORIES(${FFTW3_LIBPATH})
ENDIF(WITH_FFTW3)
IF(WIN32)
LINK_DIRECTORIES(${PTHREADS_LIBPATH})
@@ -59,14 +85,48 @@ ENDMACRO(SETUP_LIBDIRS)
MACRO(SETUP_LIBLINKS
target)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PLATFORM_LINKFLAGS} ")
TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIB} ${LLIBS})
#TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LIB} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${SDL_LIBRARY} ${LLIBS})
TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIBRARY} ${PNG_LIBRARIES} ${ZLIB_LIBRARIES} ${LLIBS})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
IF(WIN32)
TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
ELSE(WIN32)
TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
ENDIF(WIN32)
TARGET_LINK_LIBRARIES(${target} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ${PYTHON_LINKFLAGS} ${JPEG_LIB} ${PNG_LIB} ${ZLIB_LIB} ${LLIBS})
TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIBRARY} ${LIBSAMPLERATE_LIB})
# since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
IF(WIN32)
TARGET_LINK_LIBRARIES(${target} debug ${PYTHON_LIB}_d)
TARGET_LINK_LIBRARIES(${target} optimized ${PYTHON_LIB})
ELSE(WIN32)
TARGET_LINK_LIBRARIES(${target} ${PYTHON_LIB})
ENDIF(WIN32)
IF(WITH_INTERNATIONAL)
TARGET_LINK_LIBRARIES(${target} ${FREETYPE_LIB})
TARGET_LINK_LIBRARIES(${target} ${GETTEXT_LIB})
ENDIF(WITH_INTERNATIONAL)
IF(WITH_OPENAL)
TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIB})
TARGET_LINK_LIBRARIES(${target} ${OPENAL_LIBRARY})
ENDIF(WITH_OPENAL)
IF(WITH_FFTW3)
TARGET_LINK_LIBRARIES(${target} ${FFTW3_LIB})
ENDIF(WITH_FFTW3)
IF(WITH_JACK)
TARGET_LINK_LIBRARIES(${target} ${JACK_LIB})
ENDIF(WITH_JACK)
IF(WITH_SNDFILE)
TARGET_LINK_LIBRARIES(${target} ${SNDFILE_LIB})
ENDIF(WITH_SNDFILE)
IF(WITH_SDL)
TARGET_LINK_LIBRARIES(${target} ${SDL_LIBRARY})
ENDIF(WITH_SDL)
IF(WIN32)
TARGET_LINK_LIBRARIES(${target} ${ICONV_LIB})
ENDIF(WIN32)
@@ -83,3 +143,4 @@ MACRO(SETUP_LIBLINKS
TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
ENDIF(WIN32)
ENDMACRO(SETUP_LIBLINKS)

View File

@@ -53,18 +53,27 @@ SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
#-----------------------------------------------------------------------------
# Set default config options
OPTION(WITH_PLAYER "Build Player" OFF)
OPTION(WITH_GAMEENGINE "Enable Game Engine" ON)
OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
OPTION(WITH_VERSE "Enable Verse (http://verse.blender.org)" OFF)
OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON)
OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Mozilla-Unix only)" OFF)
OPTION(WITH_PLAYER "Build Player" OFF)
OPTION(WITH_GAMEENGINE "Enable Game Engine" ON)
OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON)
OPTION(WITH_QUICKTIME "Enable Quicktime Support" OFF)
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_DDS "Enable DDS Support" ON)
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
OPTION(WITH_PYTHON "Enable Embedded Python API" ON)
OPTION(WITH_SDL "Enable SDL for sound and joystick support" ON)
OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
OPTION(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
OPTION(WITH_OPENMP "Enable OpenMP (has to be supported by the compiler)" OFF)
OPTION(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
OPTION(WITH_FFTW3 "Enable FFTW3 support" OFF)
OPTION(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
OPTION(WITH_SNDFILE "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation" OFF)
# OPTION(WITH_BUILDINFO "Include extra build details" ON)
OPTION(WITH_INSTALL "Install accompanying scripts and language files needed to run blender" ON)
IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
@@ -85,77 +94,69 @@ INCLUDE(CMake/macros.cmake)
#-----------------------------------------------------------------------------
#Platform specifics
IF(UNIX)
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
SET(OPENAL_LIB ${OPENAL_LIBRARY})
SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
ELSE(OPENAL_FOUND)
SET(WITH_OPENAL OFF)
ENDIF(OPENAL_FOUND)
IF(UNIX AND NOT APPLE)
IF(WITH_OPENAL)
FIND_PACKAGE(OpenAL)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
ELSE(OPENAL_FOUND)
SET(WITH_OPENAL OFF)
ENDIF(OPENAL_FOUND)
ENDIF(WITH_OPENAL)
FIND_LIBRARY(ALUT_LIBRARY
NAMES alut
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)
IF(ALUT_LIBRARY)
SET(OPENAL_LIB ${OPENAL_LIB} ${ALUT_LIBRARY})
ENDIF(ALUT_LIBRARY)
IF(WITH_JACK)
SET(JACK /usr)
SET(JACK_INC ${JACK}/include/jack)
SET(JACK_LIB jack)
SET(JACK_LIBPATH ${JACK}/lib)
ENDIF(WITH_JACK)
IF(WITH_SNDFILE)
SET(SNDFILE /usr)
SET(SNDFILE_INC ${SNDFILE}/include)
SET(SNDFILE_LIB sndfile)
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
ENDIF(WITH_SNDFILE)
FIND_LIBRARY(INTL_LIBRARY
NAMES intl
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)
FIND_LIBRARY(ICONV_LIBRARY
NAMES iconv
PATHS
/usr/local/lib
/usr/lib
/sw/lib
/opt/local/lib
/opt/csw/lib
/opt/lib
)
IF(INTL_LIBRARY AND ICONV_LIBRARY)
SET(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
ENDIF(INTL_LIBRARY AND ICONV_LIBRARY)
FIND_PATH(FREETYPE_INC
freetype
PATHS
/usr/local/include/freetype2
/usr/include/freetype2
/sw/include/freetype2
/opt/local/include/freetype2
/opt/csw/include/freetype2
/opt/include/freetype2
NO_DEFAULT_PATH
)
SET(FREETYPE_LIB freetype)
INCLUDE(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
SET(PYTHON_INC "${PYTHON_INCLUDE_PATH}" CACHE STRING "")
SET(PYTHON_LIB "${PYTHON_LIBRARIES}" CACHE STRING "")
INCLUDE(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
FIND_PACKAGE(Freetype)
# UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
# No way to set py31. remove for now.
# FIND_PACKAGE(PythonLibs)
SET(PYTHON /usr)
SET(PYTHON_VERSION 3.1)
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
# SET(PYTHON_BINARY python) # not used yet
SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
# FIND_PACKAGE(PythonInterp) # not used yet
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
INCLUDE(${CMAKE_ROOT}/Modules/FindSDL.cmake)
SET(SDL_INC ${SDL_INCLUDE_DIR})
SET(SDL_LIB ${SDL_LIBRARY})
IF(WITH_SDL)
FIND_PACKAGE(SDL)
# UNSET(SDLMAIN_LIBRARY CACHE)
IF(NOT SDL_FOUND)
SET(WITH_SDL OFF)
ENDIF(NOT SDL_FOUND)
ENDIF(WITH_SDL)
FIND_PATH(OPENEXR_INC
ImfXdr.h
@@ -171,16 +172,34 @@ IF(UNIX)
SET(FFMPEG /usr)
SET(FFMPEG_INC ${FFMPEG}/include)
SET(FFMPEG_LIB avformat avcodec avutil)
SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
IF(WITH_FFTW3)
SET(FFTW3 /usr)
SET(FFTW3_INC ${FFTW3}/include)
SET(FFTW3_LIB fftw3)
SET(FFTW3_LIBPATH ${FFTW3}/lib)
ENDIF(WITH_FFTW3)
SET(JPEG_LIB jpeg)
SET(LIBSAMPLERATE /usr)
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
SET(LIBSAMPLERATE_LIB samplerate)
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
SET(PNG_LIB png)
FIND_PACKAGE(JPEG REQUIRED)
SET(ZLIB_LIB z)
FIND_PACKAGE(PNG REQUIRED)
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++")
FIND_PACKAGE(ZLIB REQUIRED)
# Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# BSD's dont use libdl.so
SET(LLIBS "${LLIBS} -ldl")
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
IF(WITH_OPENMP)
SET(LLIBS "${LLIBS} -lgomp")
@@ -193,12 +212,17 @@ IF(UNIX)
SET(PLATFORM_LINKFLAGS "-pthread")
INCLUDE_DIRECTORIES(/usr/include /usr/local/include)
ENDIF(UNIX)
# Better warnings
SET(C_WARNINGS "-Wall -Wno-char-subscripts -Wpointer-arith -Wcast-align -Wdeclaration-after-statement")
SET(CXX_WARNINGS "-Wall -Wno-invalid-offsetof -Wno-sign-compare")
INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
ENDIF(UNIX AND NOT APPLE)
IF(WIN32)
INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
# this file is included anyway when building under Windows with cl.exe
# INCLUDE(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
@@ -209,31 +233,49 @@ IF(WIN32)
ENDIF(CMAKE_CL_64)
SET(PYTHON ${LIBDIR}/python)
SET(PYTHON_VERSION 2.5)
SET(PYTHON_VERSION 3.1)
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
SET(PYTHON_BINARY python)
SET(PYTHON_LIB python25)
# SET(PYTHON_BINARY python) # not used yet
SET(PYTHON_LIB python31)
SET(PYTHON_LIBPATH ${PYTHON}/lib)
#SET(WITH_OPENAL ON)
SET(OPENAL ${LIBDIR}/openal)
SET(OPENAL_INC ${OPENAL}/include ${OPENAL}/include/AL)
SET(OPENAL_LIB openal_static)
SET(OPENAL_LIBPATH ${OPENAL}/lib)
IF(CMAKE_CL_64)
SET(WITH_OPENAL OFF)
ELSE(CMAKE_CL_64)
#SET(WITH_OPENAL ON)
SET(OPENAL ${LIBDIR}/openal)
SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
SET(OPENAL_LIBRARY wrap_oal)
SET(OPENAL_LIBPATH ${OPENAL}/lib)
ENDIF(CMAKE_CL_64)
IF(WITH_JACK)
SET(JACK ${LIBDIR}/jack)
SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
SET(JACK_LIB libjack)
SET(JACK_LIBPATH ${JACK}/lib)
ENDIF(WITH_JACK)
IF(WITH_SNDFILE)
SET(SNDFILE ${LIBDIR}/sndfile)
SET(SNDFILE_INC ${SNDFILE}/include)
SET(SNDFILE_LIB sndfile)
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
ENDIF(WITH_SNDFILE)
IF(CMAKE_CL_64)
SET(PNG_LIB libpng)
SET(PNG_LIBRARIES libpng)
ELSE(CMAKE_CL_64)
SET(PNG_LIB libpng_st)
SET(PNG_LIBRARIES libpng_st)
ENDIF(CMAKE_CL_64)
SET(JPEG_LIB libjpeg)
SET(JPEG_LIBRARY libjpeg)
SET(ZLIB ${LIBDIR}/zlib)
SET(ZLIB_INC ${ZLIB}/include)
IF(CMAKE_CL_64)
SET(ZLIB_LIB zlib)
SET(ZLIB_LIBRARIES libz)
ELSE(CMAKE_CL_64)
SET(ZLIB_LIB libz)
SET(ZLIB_LIBRARIES zlib)
ENDIF(CMAKE_CL_64)
SET(ZLIB_LIBPATH ${ZLIB}/lib)
@@ -247,30 +289,37 @@ IF(WIN32)
SET(ICONV_LIB iconv)
SET(ICONV_LIBPATH ${ICONV}/lib)
IF(WITH_FFTW3)
SET(FFTW3 ${LIBDIR}/fftw3)
SET(FFTW3_INC ${FFTW3}/include)
SET(FFTW3_LIB libfftw)
SET(FFTW3_LIBPATH ${FFTW3}/lib)
ENDIF(WITH_FFTW3)
SET(GETTEXT ${LIBDIR}/gettext)
SET(GETTEXT_INC ${GETTEXT}/include)
IF(CMAKE_CL_64)
SET(GETTEXT_LIB gettextlib)
SET(GETTEXT_LIB gettext)
ELSE(CMAKE_CL_64)
SET(GETTEXT_LIB gnu_gettext)
SET(GETTEXT_LIB gnu_gettext)
ENDIF(CMAKE_CL_64)
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
SET(FREETYPE ${LIBDIR}/freetype)
SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
SET(FREETYPE_LIB freetype2ST)
SET(FREETYPE_LIBRARY freetype2ST)
SET(OPENEXR ${LIBDIR}/openexr)
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
IF (MSVC80)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2005)
ELSE (MSVC80)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_msvc)
ENDIF(MSVC80)
IF (MSVC90)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
ENDIF(MSVC90)
@@ -281,18 +330,19 @@ IF(WIN32)
SET(FFMPEG ${LIBDIR}/ffmpeg)
SET(FFMPEG_INC ${FFMPEG}/include)
SET(FFMPEG_LIB avcodec-51 avformat-52 avdevice-52 avutil-49 swscale-0)
SET(FFMPEG_LIB avcodec-52 avformat-52 avdevice-52 avutil-50 swscale-0)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
SET(LIBSAMPLERATE_LIB libsamplerate)
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
IF(CMAKE_CL_64)
SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
ELSE(CMAKE_CL_64)
SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
SET(LLIBS kernel32 user32 gdi32 comdlg32 advapi32 shell32 ole32 oleaut32 uuid ws2_32 vfw32 winmm)
ENDIF(CMAKE_CL_64)
IF(WITH_OPENAL)
SET(LLIBS ${LLIBS} dxguid)
ENDIF(WITH_OPENAL)
SET(CMAKE_CXX_FLAGS_DEBUG "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /D_DEBUG /Od /Gm /EHsc /RTC1 /MTd /W3 /nologo /ZI /J" CACHE STRING "MSVC MT flags " FORCE)
SET(CMAKE_CXX_FLAGS_RELEASE "/D_CRT_NONSTDC_NO_DEPRECATE /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /wd4800 /wd4244 /wd4305 /O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
@@ -309,8 +359,8 @@ IF(WIN32)
ENDIF(WITH_OPENMP)
SET(SDL ${LIBDIR}/sdl)
SET(SDL_INC ${SDL}/include)
SET(SDL_LIB SDL)
SET(SDL_INCLUDE_DIR ${SDL}/include)
SET(SDL_LIBRARY SDL)
SET(SDL_LIBPATH ${SDL}/lib)
SET(PNG "${LIBDIR}/png")
@@ -327,10 +377,11 @@ IF(WIN32)
SET(WINTAB_INC ${LIBDIR}/wintab/include)
IF(CMAKE_CL_64)
SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
SET(PLATFORM_LINKFLAGS "/MANIFEST:NO /MANIFESTUAC:NO /MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
ELSE(CMAKE_CL_64)
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
SET(PLATFORM_LINKFLAGS "/NODEFAULTLIB:libc.lib ")
ENDIF(CMAKE_CL_64)
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} /NODEFAULTLIB:libcmt.lib;libc.lib ")
ENDIF(WIN32)
@@ -341,49 +392,91 @@ IF(APPLE)
SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-6.1-powerpc)
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenAL.cmake)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
SET(OPENAL_LIB ${OPENAL_LIBRARY})
SET(OPENAL_INC ${OPENAL_INCLUDE_DIR})
ELSE(OPENAL_FOUND)
SET(WITH_OPENAL OFF)
ENDIF(OPENAL_FOUND)
IF(WITH_OPENAL)
FIND_PACKAGE(OpenAL)
IF(OPENAL_FOUND)
SET(WITH_OPENAL ON)
ELSE(OPENAL_FOUND)
SET(WITH_OPENAL OFF)
ENDIF(OPENAL_FOUND)
ENDIF(WITH_OPENAL)
SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
SET(PYTHON_VERSION 2.3)
SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "")
SET(PYTHON_LIB "")
SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
SET(PYTHON_LINKFLAGS "-u __dummy -u _PyMac_Error -framework System -framework Python")
IF(WITH_JACK)
SET(JACK /usr)
SET(JACK_INC ${JACK}/include/jack)
SET(JACK_LIB jack)
SET(JACK_LIBPATH ${JACK}/lib)
ENDIF(WITH_JACK)
IF(WITH_SNDFILE)
SET(SNDFILE /usr)
SET(SNDFILE_INC ${SNDFILE}/include)
SET(SNDFILE_LIB sndfile)
SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
ENDIF(WITH_SNDFILE)
SET(PYTHON_VERSION 3.1)
IF(PYTHON_VERSION MATCHES 3.1)
# we use precompiled libraries for py 3.1 and up by default
SET(PYTHON ${LIBDIR}/python)
SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
# SET(PYTHON_BINARY "${PYTHON}/bin/python${PYTHON_VERSION}" CACHE STRING "") # not used yet
SET(PYTHON_LIB python${PYTHON_VERSION})
SET(PYTHON_LIBPATH "${PYTHON}/lib/python${PYTHON_VERSION}" CACHE STRING "")
# SET(PYTHON_LINKFLAGS "-u _PyMac_Error") # won't build with this enabled
ELSE(PYTHON_VERSION MATCHES 3.1)
# otherwise, use custom system framework
SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
SET(PYTHON_VERSION 2.5)
SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}" CACHE STRING "")
# SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION} CACHE STRING "") # not used yet
SET(PYTHON_LIB "")
SET(PYTHON_LIBPATH ${PYTHON}${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config CACHE STRING "")
SET(PYTHON_LINKFLAGS "-u _PyMac_Error -framework System -framework Python")
ENDIF(PYTHON_VERSION MATCHES 3.1)
SET(GETTEXT ${LIBDIR}/gettext)
SET(GETTEXT_INC "${GETTEXT}/include")
SET(GETTEXT_LIB intl iconv)
SET(GETTEXT_LIBPATH ${GETTEXT}/lib)
IF(WITH_FFTW3)
SET(FFTW3 ${LIBDIR}/fftw3)
SET(FFTW3_INC ${FFTW3}/include)
SET(FFTW3_LIB libfftw)
SET(FFTW3_LIBPATH ${FFTW3}/lib)
ENDIF(WITH_FFTW3)
SET(PNG_LIB png)
SET(JPEG_LIB jpeg)
SET(PNG_LIBRARIES png)
SET(JPEG_LIBRARY jpeg)
SET(ZLIB /usr)
SET(ZLIB_INC "${ZLIB}/include")
SET(ZLIB_LIB z)
SET(ZLIB_LIBRARIES z)
SET(FREETYPE ${LIBDIR}/freetype)
SET(FREETYPE_INC ${FREETYPE}/include ${FREETYPE}/include/freetype2)
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
SET(FREETYPE_LIB freetype)
SET(FREETYPE_LIBRARY freetype)
SET(OPENEXR ${LIBDIR}/openexr)
SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
IF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
ELSE(CMAKE_OSX_ARCHITECTURES MATCHES i386)
SET(OPENEXR_LIB Iex Half IlmImf Imath)
ENDIF(CMAKE_OSX_ARCHITECTURES MATCHES i386)
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
SET(FFMPEG ${LIBDIR}/ffmpeg)
SET(FFMPEG_INC ${CMAKE_SOURCE_DIR}/extern/ffmpeg)
SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
SET(LIBSAMPLERATE_LIB samplerate)
SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
SET(LLIBS stdc++ SystemStubs)
SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing")
@@ -396,8 +489,8 @@ IF(APPLE)
ENDIF(WITH_OPENMP)
SET(SDL ${LIBDIR}/sdl)
SET(SDL_INC ${SDL}/include)
SET(SDL_LIB SDL)
SET(SDL_INCLUDE_DIR ${SDL}/include)
SET(SDL_LIBRARY SDL)
SET(SDL_LIBPATH ${SDL}/lib)
SET(PNG "${LIBDIR}/png")
@@ -419,53 +512,68 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(BINRELOC_INC ${BINRELOC}/include)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# TODO - buildinfo
# IF(UNIX)
# IF(WITH_BUILDINFO)
# EXEC_PROGRAM("date \"+%Y-%m-%d\"" OUTPUT_VARIABLE BUILD_DATE)
# EXEC_PROGRAM("date \"+%H:%M:%S\"" OUTPUT_VARIABLE BUILD_TIME)
# EXEC_PROGRAM("svnversion ${CMAKE_SOURCE_DIR}" OUTPUT_VARIABLE BUILD_REV)
# SET(BUILD_TYPE ${CMAKE_BUILD_TYPE})
# ENDIF(WITH_BUILDINFO)
# ENDIF(UNIX)
#-----------------------------------------------------------------------------
# Common.
SET(VERSE_INC ${CMAKE_SOURCE_DIR}/extern/verse/dist)
SET(FTGL ${CMAKE_SOURCE_DIR}/extern/bFTGL)
SET(FTGL_INC ${FTGL}/include)
SET(FTGL_LIB extern_ftgl)
set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
set(OPENJPEG_INC ${OPENJPEG})
set(OPENJPEG_LIb extern_libopenjpeg)
#-----------------------------------------------------------------------------
# Blender WebPlugin
IF(WITH_WEBPLUGIN)
SET(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
SET(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
SET(WITH_PLAYER ON)
ENDIF(WITH_WEBPLUGIN)
#-----------------------------------------------------------------------------
# Configure OpenGL.
INCLUDE(${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
FIND_PACKAGE(OpenGL)
INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
# UNSET(OPENGL_LIBRARIES CACHE) # not compat with older cmake
# UNSET(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake
#-----------------------------------------------------------------------------
# Extra compile flags
IF(WITH_GAMEENGINE)
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DGAMEBLENDER ")
ENDIF(WITH_GAMEENGINE)
IF(WITH_BULLET)
SET(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -DWITH_BULLET ")
ENDIF(WITH_BULLET)
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS} ${C_WARNINGS}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS} ${CXX_WARNINGS}")
# better not define flags here but this is a debugging option thats off by default.
IF(WITH_CXX_GUARDEDALLOC)
SET(CMAKE_CXX_FLAGS " -DWITH_CXX_GUARDEDALLOC -I${CMAKE_SOURCE_DIR}/intern/guardedalloc ${CMAKE_CXX_FLAGS}")
ENDIF(WITH_CXX_GUARDEDALLOC)
#-----------------------------------------------------------------------------
# Libraries
FILE(WRITE ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt "")
SUBDIRS(
intern
extern
source
)
ADD_SUBDIRECTORY(intern)
ADD_SUBDIRECTORY(extern)
ADD_SUBDIRECTORY(source)
#-----------------------------------------------------------------------------
# Blender Application
SUBDIRS(source/creator)
ADD_SUBDIRECTORY(source/creator)
#-----------------------------------------------------------------------------
# Blender WebPlugin
IF(WITH_WEBPLUGIN)
SET(MOZILLA_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
SET(WITH_PLAYER ON)
ENDIF(WITH_WEBPLUGIN)
#-----------------------------------------------------------------------------
# Blender Player
IF(WITH_PLAYER)
SUBDIRS(blenderplayer)
ADD_SUBDIRECTORY(blenderplayer)
ENDIF(WITH_PLAYER)

View File

@@ -1,3 +1,5 @@
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=8
# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
@@ -21,7 +23,7 @@
#
# The Original Code is: revision 1.1
#
# Contributor(s): Hans Lambermont
# Contributor(s): Hans Lambermont, GSR
#
# ***** END GPL LICENSE BLOCK *****
#
@@ -31,12 +33,11 @@
# If the user wants to override some of the build
# vars they can put it in the file user-def.mk which
# will get included if it exists (please do not commit
# user-def.mk to cvs).
# user-def.mk to the revision control server).
sinclude user-def.mk
# To build without openAL, uncomment the following line, or set it as
# an environment variable, or put it uncommented in user-def.mk:
# To build without openAL, set it as an environment variable,
# or put it uncommented in user-def.mk:
# export NAN_NO_OPENAL=true
export NANBLENDERHOME=$(shell pwd)
@@ -44,13 +45,9 @@ MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
SOURCEDIR =
ifeq ($(FREE_WINDOWS),true)
DIRS ?= dlltool extern intern source
endif
DIRS ?= extern intern source
ifneq ($(INTERNATIONAL),false)
DIRS += po
DIRS ?= dlltool extern intern source po
else
DIRS ?= extern intern source po
endif
include source/nan_subdirs.mk

View File

@@ -29,6 +29,14 @@
# Set up some custom actions and target/argument handling
# Then read all SConscripts and build
import platform as pltfrm
# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
if pltfrm.architecture()[0] == '64bit':
bitness = 64
else:
bitness = 32
import sys
import os
import os.path
@@ -42,6 +50,8 @@ import tools.Blender
import tools.btools
import tools.bcolors
EnsureSConsVersion(1,0,0)
BlenderEnvironment = tools.Blender.BlenderEnvironment
btools = tools.btools
B = tools.Blender
@@ -50,13 +60,10 @@ B = tools.Blender
platform = sys.platform
quickie = None
quickdebug = None
nsis_build = None
##### BEGIN SETUP #####
B.possible_types = ['core', 'common', 'blender', 'intern',
'international', 'game', 'game2',
'player', 'player2', 'system']
B.possible_types = ['core', 'player', 'intern', 'extern']
B.binarykind = ['blender' , 'blenderplayer']
##################################
@@ -65,15 +72,15 @@ B.binarykind = ['blender' , 'blenderplayer']
# XX cheating for BF_FANCY, we check for BF_FANCY before args are validated
use_color = ARGUMENTS.get('BF_FANCY', '1')
if platform=='win32':
use_color = None
use_color = None
if not use_color=='1':
B.bc.disable()
B.bc.disable()
#on defaut white Os X terminal, some colors are totally unlegible
if platform=='darwin':
B.bc.OKGREEN = '\033[34m'
B.bc.WARNING = '\033[36m'
B.bc.OKGREEN = '\033[34m'
B.bc.WARNING = '\033[36m'
# arguments
print B.bc.HEADER+'Command-line arguments'+B.bc.ENDC
@@ -96,231 +103,263 @@ quickie = B.arguments.get('BF_QUICK', None)
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
if quickdebug:
B.quickdebug=string.split(quickdebug, ',')
B.quickdebug=string.split(quickdebug, ',')
else:
B.quickdebug=[]
B.quickdebug=[]
if quickie:
B.quickie=string.split(quickie,',')
B.quickie=string.split(quickie,',')
else:
B.quickie=[]
B.quickie=[]
toolset = B.arguments.get('BF_TOOLSET', None)
if toolset:
print "Using " + toolset
if toolset=='mstoolkit':
env = BlenderEnvironment(ENV = os.environ)
env.Tool('mstoolkit', ['tools'])
else:
env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
if env:
btools.SetupSpawn(env)
print "Using " + toolset
if toolset=='mstoolkit':
env = BlenderEnvironment(ENV = os.environ)
env.Tool('mstoolkit', ['tools'])
else:
env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
# xxx commented out, as was supressing warnings under mingw..
#if env:
# btools.SetupSpawn(env)
else:
env = BlenderEnvironment(ENV = os.environ)
env = BlenderEnvironment(ENV = os.environ)
if not env:
print "Could not create a build environment"
Exit()
print "Could not create a build environment"
Exit()
cc = B.arguments.get('CC', None)
cxx = B.arguments.get('CXX', None)
if cc:
env['CC'] = cc
env['CC'] = cc
if cxx:
env['CXX'] = cxx
env['CXX'] = cxx
if env['CC'] in ['cl', 'cl.exe'] and sys.platform=='win32':
platform = 'win32-vc'
if bitness == 64:
platform = 'win64-vc'
else:
platform = 'win32-vc'
elif env['CC'] in ['gcc'] and sys.platform=='win32':
platform = 'win32-mingw'
platform = 'win32-mingw'
env.SConscriptChdir(0)
crossbuild = B.arguments.get('BF_CROSS', None)
if crossbuild and platform!='win32':
platform = 'linuxcross'
if crossbuild and platform not in ('win32-vc', 'win64-vc'):
platform = 'linuxcross'
env['OURPLATFORM'] = platform
configfile = 'config'+os.sep+platform+'-config.py'
if os.path.exists(configfile):
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile
else:
print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
print B.bc.FAIL + configfile + " doesn't exist" + B.bc.ENDC
if crossbuild and env['PLATFORM'] != 'win32':
print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
env.Tool('crossmingw', ['tools'])
# todo: determine proper libs/includes etc.
# Needed for gui programs, console programs should do without it
env.Append(LINKFLAGS=['-mwindows'])
print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
env.Tool('crossmingw', ['tools'])
# todo: determine proper libs/includes etc.
# Needed for gui programs, console programs should do without it
env.Append(LINKFLAGS=['-mwindows'])
userconfig = B.arguments.get('BF_CONFIG', 'user-config.py')
# first read platform config. B.arguments will override
optfiles = [configfile]
if os.path.exists(userconfig):
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
optfiles += [userconfig]
print B.bc.OKGREEN + "Using user-config file: " + B.bc.ENDC + userconfig
optfiles += [userconfig]
else:
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
print B.bc.WARNING + userconfig + " not found, no user overrides" + B.bc.ENDC
opts = btools.read_opts(optfiles, B.arguments)
opts.Update(env)
if not env['BF_FANCY']:
B.bc.disable()
B.bc.disable()
SetOption('num_jobs', int(env['BF_NUMJOBS']))
print "Build with %d parallel jobs" % (GetOption('num_jobs'))
# disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM']=='win32-vc':
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
env.Append(CXXFLAGS=['-fopenmp'])
# env.Append(LINKFLAGS=['-fprofile-generate'])
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
env['CXXFLAGS'].append('/openmp')
else:
if env['CC'][-3:] == 'icc': # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
env['CXXFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
env.Append(CXXFLAGS=['-fopenmp'])
# env.Append(LINKFLAGS=['-fprofile-generate'])
#check for additional debug libnames
if env.has_key('BF_DEBUG_LIBS'):
B.quickdebug += env['BF_DEBUG_LIBS']
B.quickdebug += env['BF_DEBUG_LIBS']
printdebug = B.arguments.get('BF_LISTDEBUG', 0)
# see if this linux distro has libalut
if env['OURPLATFORM'] == 'linux2' :
if env['WITH_BF_OPENAL']:
mylib_test_source_file = """
#include "AL/alut.h"
int main(int argc, char **argv)
{
alutGetMajorVersion();
return 0;
}
"""
if env['WITH_BF_OPENAL']:
mylib_test_source_file = """
#include "AL/alut.h"
int main(int argc, char **argv)
{
alutGetMajorVersion();
return 0;
}
"""
def CheckFreeAlut(context,env):
context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
env['LIBS'] = 'alut'
result = context.TryLink(mylib_test_source_file, '.c')
context.Result(result)
return result
def CheckFreeAlut(context,env):
context.Message( B.bc.OKGREEN + "Linux platform detected:\n checking for FreeAlut... " + B.bc.ENDC )
env['LIBS'] = 'alut'
result = context.TryLink(mylib_test_source_file, '.c')
context.Result(result)
return result
env2 = env.Copy( LIBPATH = env['BF_OPENAL'] )
sconf_temp = mkdtemp()
conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
if conf.CheckFreeAlut( env2 ):
env['BF_OPENAL_LIB'] += ' alut'
del env2
root = ''
for root, dirs, files in os.walk(sconf_temp, topdown=False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
os.rmdir(os.path.join(root, name))
if root: os.rmdir(root)
env2 = env.Clone( LIBPATH = env['BF_OPENAL'] )
sconf_temp = mkdtemp()
conf = Configure( env2, {'CheckFreeAlut' : CheckFreeAlut}, sconf_temp, '/dev/null' )
if conf.CheckFreeAlut( env2 ):
env['BF_OPENAL_LIB'] += ' alut'
del env2
root = ''
for root, dirs, files in os.walk(sconf_temp, topdown=False):
for name in files:
os.remove(os.path.join(root, name))
for name in dirs:
os.rmdir(os.path.join(root, name))
if root: os.rmdir(root)
if len(B.quickdebug) > 0 and printdebug != 0:
print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
for l in B.quickdebug:
print "\t" + l
print B.bc.OKGREEN + "Buildings these libs with debug symbols:" + B.bc.ENDC
for l in B.quickdebug:
print "\t" + l
# remove stdc++ from LLIBS if we are building a statc linked CXXFLAGS
if env['WITH_BF_STATICCXX']:
if 'stdc++' in env['LLIBS']:
env['LLIBS'] = env['LLIBS'].replace('stdc++', ' ')
else:
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
if 'stdc++' in env['LLIBS']:
env['LLIBS'].remove('stdc++')
else:
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
if 'blenderplayer' in B.targets:
env['WITH_BF_PLAYER'] = True
env['WITH_BF_PLAYER'] = True
if 'blendernogame' in B.targets:
env['WITH_BF_GAMEENGINE'] = False
env['WITH_BF_GAMEENGINE'] = False
if 'blenderlite' in B.targets:
env['WITH_BF_GAMEENGINE'] = False
env['WITH_BF_OPENAL'] = False
env['WITH_BF_OPENEXR'] = False
env['WITH_BF_ICONV'] = False
env['WITH_BF_INTERNATIONAL'] = False
env['WITH_BF_OPENJPEG'] = False
env['WITH_BF_FFMPEG'] = False
env['WITH_BF_QUICKTIME'] = False
env['WITH_BF_YAFRAY'] = False
env['WITH_BF_REDCODE'] = False
env['WITH_BF_FTGL'] = False
env['WITH_BF_DDS'] = False
env['WITH_BF_ZLIB'] = False
env['WITH_BF_SDL'] = False
env['WITH_BF_JPEG'] = False
env['WITH_BF_PNG'] = False
env['WITH_BF_ODE'] = False
env['WITH_BF_BULLET'] = False
env['WITH_BF_BINRELOC'] = False
env['BF_BUILDINFO'] = False
env['BF_NO_ELBEEM'] = True
target_env_defs = {}
target_env_defs['WITH_BF_GAMEENGINE'] = False
target_env_defs['WITH_BF_OPENAL'] = False
target_env_defs['WITH_BF_OPENEXR'] = False
target_env_defs['WITH_BF_ICONV'] = False
target_env_defs['WITH_BF_INTERNATIONAL'] = False
target_env_defs['WITH_BF_OPENJPEG'] = False
target_env_defs['WITH_BF_FFMPEG'] = False
target_env_defs['WITH_BF_QUICKTIME'] = False
target_env_defs['WITH_BF_REDCODE'] = False
target_env_defs['WITH_BF_DDS'] = False
target_env_defs['WITH_BF_ZLIB'] = False
target_env_defs['WITH_BF_SDL'] = False
target_env_defs['WITH_BF_JPEG'] = False
target_env_defs['WITH_BF_PNG'] = False
target_env_defs['WITH_BF_BULLET'] = False
target_env_defs['WITH_BF_BINRELOC'] = False
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['BF_NO_ELBEEM'] = True
target_env_defs['WITH_BF_PYTHON'] = False
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
if k not in B.arguments:
env[k] = v
if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming', 'win64-vc'):
env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
#B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
B.root_build_dir = env['BF_BUILDDIR']
env['BUILDDIR'] = B.root_build_dir
B.doc_build_dir = env['BF_DOCDIR']
if not B.root_build_dir[-1]==os.sep:
B.root_build_dir += os.sep
B.root_build_dir += os.sep
if not B.doc_build_dir[-1]==os.sep:
B.doc_build_dir += os.sep
# We do a shortcut for clean when no quicklist is given: just delete
# builddir without reading in SConscripts
do_clean = None
if 'clean' in B.targets:
do_clean = True
do_clean = True
if not quickie and do_clean:
if os.path.exists(B.root_build_dir):
print B.bc.HEADER+'Cleaning...'+B.bc.ENDC
dirs = os.listdir(B.root_build_dir)
for entry in dirs:
if os.path.isdir(B.root_build_dir + entry) == 1:
print "clean dir %s"%(B.root_build_dir+entry)
shutil.rmtree(B.root_build_dir+entry)
else: # remove file
print "remove file %s"%(B.root_build_dir+entry)
os.remove(B.root_build_dir+entry)
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
'extern/xvidcore/build/generic/platform.inc']:
if os.path.exists(confile):
print "clean file %s"%confile
os.remove(confile)
print B.bc.OKGREEN+'...done'+B.bc.ENDC
else:
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
Exit()
if os.path.exists(B.doc_build_dir):
print B.bc.HEADER+'Cleaning doc dir...'+B.bc.ENDC
dirs = os.listdir(B.doc_build_dir)
for entry in dirs:
if os.path.isdir(B.doc_build_dir + entry) == 1:
print "clean dir %s"%(B.doc_build_dir+entry)
shutil.rmtree(B.doc_build_dir+entry)
else: # remove file
print "remove file %s"%(B.doc_build_dir+entry)
os.remove(B.root_build_dir+entry)
if os.path.exists(B.root_build_dir):
print B.bc.HEADER+'Cleaning build dir...'+B.bc.ENDC
dirs = os.listdir(B.root_build_dir)
for entry in dirs:
if os.path.isdir(B.root_build_dir + entry) == 1:
print "clean dir %s"%(B.root_build_dir+entry)
shutil.rmtree(B.root_build_dir+entry)
else: # remove file
print "remove file %s"%(B.root_build_dir+entry)
os.remove(B.root_build_dir+entry)
for confile in ['extern/ffmpeg/config.mak', 'extern/x264/config.mak',
'extern/xvidcore/build/generic/platform.inc', 'extern/ffmpeg/include']:
if os.path.exists(confile):
print "clean file %s"%confile
if os.path.isdir(confile):
for root, dirs, files in os.walk(confile):
for name in files:
os.remove(os.path.join(root, name))
else:
os.remove(confile)
print B.bc.OKGREEN+'...done'+B.bc.ENDC
else:
print B.bc.HEADER+'Already Clean, nothing to do.'+B.bc.ENDC
Exit()
if not os.path.isdir ( B.root_build_dir):
os.makedirs ( B.root_build_dir )
os.makedirs ( B.root_build_dir + 'source' )
os.makedirs ( B.root_build_dir + 'intern' )
os.makedirs ( B.root_build_dir + 'extern' )
os.makedirs ( B.root_build_dir + 'lib' )
os.makedirs ( B.root_build_dir + 'bin' )
os.makedirs ( B.root_build_dir )
os.makedirs ( B.root_build_dir + 'source' )
os.makedirs ( B.root_build_dir + 'intern' )
os.makedirs ( B.root_build_dir + 'extern' )
os.makedirs ( B.root_build_dir + 'lib' )
os.makedirs ( B.root_build_dir + 'bin' )
if not os.path.isdir(B.doc_build_dir):
os.makedirs ( B.doc_build_dir )
Help(opts.GenerateHelpText(env))
@@ -328,10 +367,10 @@ Help(opts.GenerateHelpText(env))
# commands, do 'scons BF_QUIET=0'
bf_quietoutput = B.arguments.get('BF_QUIET', '1')
if env['BF_QUIET']:
B.set_quiet_output(env)
B.set_quiet_output(env)
else:
if toolset=='msvc':
B.msvc_hack(env)
if toolset=='msvc':
B.msvc_hack(env)
print B.bc.HEADER+'Building in '+B.bc.ENDC+B.root_build_dir
env.SConsignFile(B.root_build_dir+'scons-signatures')
@@ -353,20 +392,25 @@ SConscript(B.root_build_dir+'/source/SConscript')
# libraries to give as objects to linking phase
mainlist = []
for tp in B.possible_types:
if not tp == 'player' and not tp == 'player2':
mainlist += B.create_blender_liblist(env, tp)
if not tp == 'player' and not tp == 'player2':
mainlist += B.create_blender_liblist(env, tp)
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
B.propose_priorities()
B.propose_priorities()
dobj = B.buildinfo(env, "dynamic") + B.resources
thestatlibs, thelibincs = B.setup_staticlibs(env)
thesyslibs = B.setup_syslibs(env)
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist + thestatlibs, [], thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
print("Warning: Game player may not build on 2.5")
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
#env.BlenderProg(B.root_build_dir, "blender", dobj , [], mainlist + thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
env.BlenderProg(B.root_build_dir, "blender", dobj + mainlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
if env['WITH_BF_PLAYER']:
playerlist = B.create_blender_liblist(env, 'player')
env.BlenderProg(B.root_build_dir, "blenderplayer", dobj + playerlist, [], thestatlibs + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blenderplayer')
##### Now define some targets
@@ -376,19 +420,17 @@ if env['WITH_BF_PLAYER']:
#-- binaries
blenderinstall = []
if env['OURPLATFORM']=='darwin':
for prg in B.program_list:
bundle = '%s.app' % prg[0]
bundledir = os.path.dirname(bundle)
for dp, dn, df in os.walk(bundle):
if 'CVS' in dn:
dn.remove('CVS')
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
source=[dp+os.sep+f for f in df]
blenderinstall.append(env.Install(dir=dir,source=source))
for prg in B.program_list:
bundle = '%s.app' % prg[0]
bundledir = os.path.dirname(bundle)
for dp, dn, df in os.walk(bundle):
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
source=[dp+os.sep+f for f in df]
blenderinstall.append(env.Install(dir=dir,source=source))
else:
blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
#-- .blender
#- dont do .blender and scripts for darwin, it is already in the bundle
@@ -397,30 +439,38 @@ dottargetlist = []
scriptinstall = []
if env['OURPLATFORM']!='darwin':
for dp, dn, df in os.walk('bin/.blender'):
if 'CVS' in dn:
dn.remove('CVS')
if '.svn' in dn:
dn.remove('.svn')
for f in df:
dotblendlist.append(dp+os.sep+f)
dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
for dp, dn, df in os.walk('bin/.blender'):
if '.svn' in dn:
dn.remove('.svn')
for f in df:
if not env['WITH_BF_INTERNATIONAL']:
if 'locale' in dp:
continue
if f == '.Blanguages':
continue
if not env['WITH_BF_FREETYPE']:
if f.endswith('.ttf'):
continue
dotblendlist.append(os.path.join(dp, f))
dottargetlist.append(env['BF_INSTALLDIR']+dp[3:]+os.sep+f)
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
#-- .blender/scripts
scriptpath='release/scripts'
for dp, dn, df in os.walk(scriptpath):
if 'CVS' in dn:
dn.remove('CVS')
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+'/.blender/scripts'+dp[len(scriptpath):]
source=[dp+os.sep+f for f in df]
scriptinstall.append(env.Install(dir=dir,source=source))
dotblenderinstall = []
for targetdir,srcfile in zip(dottargetlist, dotblendlist):
td, tf = os.path.split(targetdir)
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
if env['WITH_BF_PYTHON']:
#-- .blender/scripts, .blender/ui, .blender/io
scriptpaths=['release/scripts', 'release/ui', 'release/io']
for scriptpath in scriptpaths:
for dp, dn, df in os.walk(scriptpath):
if '.svn' in dn:
dn.remove('.svn')
dir=env['BF_INSTALLDIR']+'/.blender/'+os.path.basename(scriptpath)+dp[len(scriptpath):]
source=[dp+os.sep+f for f in df]
scriptinstall.append(env.Install(dir=dir,source=source))
#-- icons
if env['OURPLATFORM']=='linux2':
@@ -428,12 +478,9 @@ if env['OURPLATFORM']=='linux2':
icontargetlist = []
for tp, tn, tf in os.walk('release/freedesktop/icons'):
if 'CVS' in tn:
tn.remove('CVS')
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
print ">>>", env['BF_INSTALLDIR'], tp, f
iconlist.append(tp+os.sep+f)
icontargetlist.append(env['BF_INSTALLDIR']+tp[19:]+os.sep+f)
@@ -442,18 +489,22 @@ if env['OURPLATFORM']=='linux2':
td, tf = os.path.split(targetdir)
iconinstall.append(env.Install(dir=td, source=srcfile))
# dlls for linuxcross
# TODO - add more libs, for now this lets blenderlite run
if env['OURPLATFORM']=='linuxcross':
dir=env['BF_INSTALLDIR']
source = ['../lib/windows/pthreads/lib/pthreadGC2.dll']
scriptinstall.append(env.Install(dir=dir, source=source))
#-- plugins
pluglist = []
plugtargetlist = []
for tp, tn, tf in os.walk('release/plugins'):
if 'CVS' in tn:
tn.remove('CVS')
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
print ">>>", env['BF_INSTALLDIR'], tp, f
pluglist.append(tp+os.sep+f)
plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
pluglist.append(tp+os.sep+f)
plugtargetlist.append(env['BF_INSTALLDIR']+tp[7:]+os.sep+f)
# header files for plugins
pluglist.append('source/blender/blenpluginapi/documentation.h')
@@ -473,59 +524,72 @@ plugtargetlist.append(env['BF_INSTALLDIR'] + os.sep + 'plugins' + os.sep + 'incl
plugininstall = []
for targetdir,srcfile in zip(plugtargetlist, pluglist):
td, tf = os.path.split(targetdir)
plugininstall.append(env.Install(dir=td, source=srcfile))
td, tf = os.path.split(targetdir)
plugininstall.append(env.Install(dir=td, source=srcfile))
textlist = []
texttargetlist = []
for tp, tn, tf in os.walk('release/text'):
if 'CVS' in tn:
tn.remove('CVS')
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
textlist.append(tp+os.sep+f)
if '.svn' in tn:
tn.remove('.svn')
for f in tf:
textlist.append(tp+os.sep+f)
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
if env['OURPLATFORM']=='darwin':
allinstall = [blenderinstall, plugininstall, textinstall]
allinstall = [blenderinstall, plugininstall, textinstall]
elif env['OURPLATFORM']=='linux2':
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall, iconinstall]
else:
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
allinstall = [blenderinstall, dotblenderinstall, scriptinstall, plugininstall, textinstall]
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw'):
dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
'${LCGDIR}/png/lib/libpng.dll',
'#release/windows/extra/python25.zip',
'#release/windows/extra/zlib.pyd',
'${LCGDIR}/sdl/lib/SDL.dll',
'${LCGDIR}/zlib/lib/zlib.dll',
'${LCGDIR}/tiff/lib/libtiff.dll']
if env['BF_DEBUG']:
dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}_d.dll')
else:
dllsources.append('${LCGDIR}/python/lib/${BF_PYTHON_LIB}.dll')
if env['OURPLATFORM'] == 'win32-mingw':
dllsources += ['${LCGDIR}/pthreads/lib/pthreadGC2.dll']
else:
dllsources += ['${LCGDIR}/pthreads/lib/pthreadVC2.dll']
if env['WITH_BF_ICONV']:
dllsources += ['${LCGDIR}/iconv/lib/iconv.dll']
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-51.dll',
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
'${LCGDIR}/ffmpeg/lib/avutil-49.dll',
'${LCGDIR}/ffmpeg/lib/libfaad-0.dll',
'${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
'${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
'${LCGDIR}/ffmpeg/lib/libx264-59.dll',
'${LCGDIR}/ffmpeg/lib/xvidcore.dll',
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
if env['OURPLATFORM'] == 'win64-vc':
dllsources = []
else:
dllsources = ['${LCGDIR}/gettext/lib/gnu_gettext.dll',
'${BF_PNG_LIBPATH}/libpng.dll',
'${BF_ZLIB_LIBPATH}/zlib.dll',
'${BF_TIFF_LIBPATH}/${BF_TIFF_LIB}.dll']
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
if env['WITH_BF_SDL']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically already to SDL on win64
else:
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
if env['WITH_BF_PYTHON']:
ver = env["BF_PYTHON_VERSION"].replace(".", "")
dllsources.append('${LCGDIR}/release/python' + ver + '.zip')
dllsources.append('${LCGDIR}/release/zlib.pyd')
if env['BF_DEBUG']:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}_d.dll')
else:
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_LIB}.dll')
if env['WITH_BF_ICONV']:
if env['OURPLATFORM'] == 'win64-vc':
pass # we link statically to iconv on win64
else:
dllsources += ['${BF_ICONV_LIBPATH}/iconv.dll']
if env['WITH_BF_OPENAL']:
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
if env['WITH_BF_FFMPEG']:
dllsources += ['${LCGDIR}/ffmpeg/lib/avcodec-52.dll',
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
'${LCGDIR}/ffmpeg/lib/avutil-50.dll',
# '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
# '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
# '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
# '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
# '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
'${LCGDIR}/ffmpeg/lib/swscale-0.dll']
if env['WITH_BF_JACK']:
dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
allinstall += windlls
installtarget = env.Alias('install', allinstall)
bininstalltarget = env.Alias('install-bin', blenderinstall)
@@ -534,13 +598,17 @@ nsisaction = env.Action(btools.NSIS_Installer, btools.NSIS_print)
nsiscmd = env.Command('nsisinstaller', None, nsisaction)
nsisalias = env.Alias('nsis', nsiscmd)
if 'blender' in B.targets:
blenderexe= env.Alias('blender', B.program_list)
Depends(blenderexe,installtarget)
if env['WITH_BF_PLAYER']:
blenderplayer = env.Alias('blenderplayer', B.program_list)
Depends(blenderplayer,installtarget)
blenderplayer = env.Alias('blenderplayer', B.program_list)
Depends(blenderplayer,installtarget)
if not env['WITH_BF_GAMEENGINE']:
blendernogame = env.Alias('blendernogame', B.program_list)
Depends(blendernogame,installtarget)
blendernogame = env.Alias('blendernogame', B.program_list)
Depends(blendernogame,installtarget)
if 'blenderlite' in B.targets:
blenderlite = env.Alias('blenderlite', B.program_list)
@@ -551,14 +619,17 @@ Depends(nsiscmd, allinstall)
Default(B.program_list)
if not env['WITHOUT_BF_INSTALL']:
Default(installtarget)
#------------ RELEASE
# TODO: zipup the installation
#------------ BLENDERPLAYER
# TODO: build stubs and link into blenderplayer
Default(installtarget)
#------------ EPYDOC
# TODO: run epydoc
if env['WITH_BF_DOCS']:
try: import epydoc
except: epydoc = None
if epydoc:
SConscript('source/blender/python/api2_2x/doc/SConscript')
SConscript('source/gameengine/PyDoc/SConscript')
else:
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "

View File

@@ -20,4 +20,4 @@ Romanian:ro
Arabic:ar
Bulgarian:bg
Greek:el
Korean:kr
Korean:ko

View File

@@ -32,10 +32,10 @@ IF(WITH_QUICKTIME)
ADD_DEFINITIONS(-DWITH_QUICKTIME)
ENDIF(WITH_QUICKTIME)
IF(LINUX)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_DEFINITIONS(-DWITH_BINRELOC)
INCLUDE_DIRECTORIES(${BINRELOC_INC})
endif(LINUX)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
@@ -66,18 +66,12 @@ IF(UNIX)
gp_common
bf_string
bf_ghost
bf_blenkernel
verse
bf_blenkernel
bf_decimation
bf_blenkernel
bf_blenloader
bf_blenpluginapi
bf_blroutines
bf_converter
bf_sumo
bf_ketsji
extern_solid
extern_qhull
bf_bullet
bf_common
bf_dummy
@@ -88,7 +82,6 @@ IF(UNIX)
bf_scenegraph
bf_IK
bf_moto
bf_soundsystem
bf_kernel
bf_nodes
bf_gpu
@@ -100,18 +93,24 @@ IF(UNIX)
extern_bullet
bf_guardedalloc
bf_memutil
bf_bmfont
bf_blenlib
bf_cineon
bf_openexr
bf_ftfont
extern_ftgl
extern_libopenjpeg
bf_dds
bf_readblenfile
blenkernel_blc
bf_quicktime
extern_binreloc
extern_glew
)
)
IF(WITH_QUICKTIME)
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} quicktime)
ENDIF(WITH_QUICKTIME)
IF(WITH_CXX_GUARDEDALLOC)
SET(BLENDER_SORTED_LIBS ${BLENDER_SORTED_LIBS} bf_guardedalloc_cpp)
ENDIF(WITH_CXX_GUARDEDALLOC)
FOREACH(SORTLIB ${BLENDER_SORTED_LIBS})
SET(REMLIB ${SORTLIB})

View File

@@ -8,9 +8,7 @@
import commands
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
USE_SDK='true'
BF_PYTHON_VERSION = '2.3'
USE_SDK=True
cmd = 'uname -p'
MAC_PROC=commands.getoutput(cmd)
@@ -29,6 +27,8 @@ else :
LCGDIR = '#../lib/darwin-8.x.i386'
LIBDIR = '${LCGDIR}'
BF_PYTHON_VERSION = '3.1'
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
MAC_MIN_VERS = '10.3'
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
@@ -38,47 +38,54 @@ else:
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
BF_FFMPEG = "#extern/ffmpeg"
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
if USE_SDK=='true':
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
WITH_BF_VERSE = 'false'
BF_VERSE = "#extern/verse/dist"
BF_VERSE_LIBPATH = "${BF_BUILDDIR}/extern/verse/dist"
BF_VERSE_INCLUDE = BF_VERSE
BF_VERSE_LIBS = "libverse"
# python.org libs install in /library we want to use that for 2.5
#
# if you want py2.5 on leopard without installing
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
# BEWARE: in that case it will work only on leopard
if BF_PYTHON_VERSION=='2.3':
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
FFMPEG_PRECOMPILED = False
if FFMPEG_PRECOMPILED:
# use precompiled ffmpeg in /lib
BF_FFMPEG = LIBDIR + '/ffmpeg'
BF_FFMPEG_INC = "#extern/ffmpeg"
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore'
else:
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
# use ffmpeg in extern
BF_FFMPEG = "#extern/ffmpeg"
BF_FFMPEG_INC = '${BF_FFMPEG}'
if USE_SDK==True:
BF_FFMPEG_EXTRA = '-isysroot '+MACOSX_SDK+' -mmacosx-version-min='+MAC_MIN_VERS
BF_XVIDCORE_CONFIG = '--disable-assembly' # currently causes errors, even with yasm installed
BF_X264_CONFIG = '--disable-pthread'
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = ''
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
if BF_PYTHON_VERSION=='3.1':
# python 3.1 uses precompiled libraries in bf svn /lib by default
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
else:
# python 2.5 etc. uses built-in framework
# python.org libs install in /library we want to use that for 2.5
#
# if you want py2.5 on leopard without installing
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
# BEWARE: in that case it will work only on leopard
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = ''
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config'
BF_PYTHON_LINKFLAGS = ['-u','_PyMac_Error','-framework','System','-framework','Python']
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
BF_PYTHON_LINKFLAGS = ['-u', '__dummy']+BF_PYTHON_LINKFLAGS
BF_QUIET = '1'
WITH_BF_OPENMP = '0'
# Note : should be true, but openal simply dont work on intel
if MAC_PROC == 'i386':
WITH_BF_OPENAL = 'false'
else:
WITH_BF_OPENAL = 'true'
#different lib must be used following version of gcc
# for gcc 3.3
#BF_OPENAL = LIBDIR + '/openal'
@@ -88,7 +95,7 @@ if MAC_PROC == 'powerpc':
else :
BF_OPENAL = LIBDIR + '/openal'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_STATICOPENAL = False
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@@ -97,20 +104,29 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
# TODO - set proper paths here (add precompiled to lib/ ? )
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '${LCGDIR}/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
@@ -118,15 +134,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@@ -135,43 +151,33 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE=True
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE='true'
WITH_BF_PLAYER='true'
WITH_BF_ODE = 'false'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = '${BF_ODE}/include'
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_FFTW3 = False
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_YAFRAY = 'true'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -186,7 +192,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/freetype'
@@ -194,40 +200,40 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
WITH_BF_STATICOPENGL = True
BF_OPENGL_LIB = 'GL GLU'
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
BF_OPENGL_LINKFLAGS = '-framework OpenGL'
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
CFLAGS = ['-pipe','-fPIC','-funsigned-char']
CPPFLAGS = ['-fpascal-strings']
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fpascal-strings']
CXXFLAGS = [ '-pipe','-fPIC','-funsigned-char', '-fpascal-strings']
PLATFORM_LINKFLAGS = '-fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime'
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','QuickTime']
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
LLIBS = 'stdc++ SystemStubs'
LLIBS = ['stdc++', 'SystemStubs']
# some flags shuffling for different Os versions
if MAC_MIN_VERS == '10.3':
CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
PLATFORM_LINKFLAGS = '-fuse-cxa-atexit '+PLATFORM_LINKFLAGS
LLIBS = LLIBS + ' crt3.o'
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit']+PLATFORM_LINKFLAGS
LLIBS.append('crt3.o')
if USE_SDK=='true':
if USE_SDK==True:
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS]
PLATFORM_LINKFLAGS = '-mmacosx-version-min='+MAC_MIN_VERS+ ' -Wl,-syslibroot,' + MACOSX_SDK+" "+PLATFORM_LINKFLAGS
PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS, '-Wl,-syslibroot,' + MACOSX_SDK]+PLATFORM_LINKFLAGS
CCFLAGS=SDK_FLAGS+CCFLAGS
CXXFLAGS=SDK_FLAGS+CXXFLAGS
@@ -243,7 +249,7 @@ else:
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@@ -251,20 +257,22 @@ else:
##
CC = 'gcc'
CXX = 'g++'
C_WARN = ' -Wall -Wno-long-double -Wdeclaration-after-statement '
C_WARN = ['-Wdeclaration-after-statement']
CC_WARN = ' -Wall -Wno-long-double'
CC_WARN = ['-Wall', '-Wno-long-double']
##FIX_STUBS_WARNINGS = -Wno-unused
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ' -pg -g '
BF_PROFILE = 'false'
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG_FLAGS = '-g'
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR='../build/darwin'
BF_INSTALLDIR='../install/darwin'
BF_DOCDIR='../install/doc'

209
config/irix6-config.py Normal file
View File

@@ -0,0 +1,209 @@
import os
LCGDIR = os.getcwd()+"/../lib/irix-6.5-mips"
LIBDIR = LCGDIR
BF_PYTHON = LCGDIR+'/python'
BF_PYTHON_VERSION = '2.5'
WITH_BF_STATICPYTHON = 'true'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'true'
BF_OPENAL = LCGDIR+'/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
BF_OPENAL_LIBPATH = LIBDIR + '/lib'
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
BF_LIBSAMPLERATE = LCGDIR+'/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_SDL = 'true'
BF_SDL = LCGDIR+'/sdl' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL audio iconv charset' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_OPENEXR = 'false'
WITH_BF_STATICOPENEXR = 'false'
BF_OPENEXR = '/usr'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = 'false'
WITH_BF_JPEG = 'false'
BF_JPEG = LCGDIR+'/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'false'
BF_PNG = LCGDIR+"/png"
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = '/usr/nekoware'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
BF_ZLIB = LCGDIR+"/zlib"
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
BF_GETTEXT = LCGDIR+'/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextpo intl'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE='false'
WITH_BF_PLAYER = 'false'
WITH_BF_BULLET = 'true'
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
#WITH_BF_NSPR = 'true'
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
# enable freetype2 support for text objects
BF_FREETYPE = LCGDIR+'/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'true'
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv charset'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = 'false'
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
# Uncomment the following two lines to use system's ffmpeg
BF_FFMPEG = LCGDIR+'/ffmpeg'
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice faad faac vorbis x264 ogg mp3lame z'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = 'false' # -DWITH_OGG
BF_OGG = '/usr'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis theoraenc theoradec'
WITH_BF_OPENJPEG = 'false'
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_REDCODE = 'false'
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi Xext'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
CC = 'c99'
CXX = 'CC'
CCFLAGS = ['-pipe','-fPIC', '-n32']
CPPFLAGS = ['-DXP_UNIX']
CXXFLAGS = ['-pipe','-fPIC', '-n32']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = '-no_prelink -ptused'
CC_WARN = '-no_prelink -ptused'
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'c m dl pthread dmedia movie'
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_DEBUG = 'false'
BF_DEBUG_FLAGS = '-g'
BF_BUILDDIR = '../build/irix6'
BF_INSTALLDIR='../install/irix6'
BF_DOCDIR='../install/doc'
#Link against pthread
LDIRS = []
LDIRS.append(BF_FREETYPE_LIBPATH)
LDIRS.append(BF_PNG_LIBPATH)
LDIRS.append(BF_ZLIB_LIBPATH)
LDIRS.append(BF_SDL_LIBPATH)
LDIRS.append(BF_OPENAL_LIBPATH)
LDIRS.append(BF_ICONV_LIBPATH)
PLATFORM_LINKFLAGS = []
for x in LDIRS:
PLATFORM_LINKFLAGS.append("-L"+x)
PLATFORM_LINKFLAGS += ['-L${LCGDIR}/jpeg/lib' , '-L/usr/lib32', '-n32', '-v', '-no_prelink']
print PLATFORM_LINKFLAGS
LINKFLAGS= PLATFORM_LINKFLAGS

View File

@@ -1,44 +1,45 @@
LCGDIR = '../lib/linux2'
LIBDIR = "${LCGDIR}"
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
BF_PYTHON = '/usr'
BF_PYTHON_VERSION = '2.5'
WITH_BF_STATICPYTHON = 'false'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_VERSION = '3.1'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}.a'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal'
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# some distros have a separate libalut
# if you get linker complaints, you need to uncomment the line below
# BF_OPENAL_LIB = 'openal alut'
# BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a ${BF_OPENAL}/lib/libalut.a'
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = '/usr'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
BF_JACK_LIB = 'jack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SDL = True
BF_SDL = '/usr' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr'
# when compiling with your own openexr lib you might need to set...
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
@@ -49,14 +50,14 @@ BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@@ -64,42 +65,27 @@ BF_PNG_LIB = 'png'
BF_TIFF = '/usr'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE='false'
WITH_BF_ODE = 'false'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -114,60 +100,67 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_BINRELOC = 'true'
WITH_BF_BINRELOC = True
# enable ffmpeg support
WITH_BF_FFMPEG = 'true' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '#extern/ffmpeg'
BF_FFMPEG_LIB = ''
# Uncomment the following two lines to use system's ffmpeg
# BF_FFMPEG = '/usr'
# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
BF_FFMPEG_INC = '${BF_FFMPEG}'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
WITH_BF_OPENJPEG = 'true'
# enable ogg, vorbis and theora in ffmpeg
WITH_BF_OGG = False # -DWITH_OGG
BF_OGG = '/usr'
BF_OGG_INC = '${BF_OGG}/include'
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
# Uncomment the following two lines to use system's ffmpeg
# BF_FFMPEG = '/usr'
# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil'
BF_OPENJPEG_INC = '${BF_OPENJPEG}/include'
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_REDCODE = 'false'
WITH_BF_FFTW3 = False
BF_FFTW3 = LIBDIR + '/usr'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'fftw3'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE = '#extern/libredcode'
BF_REDCODE_LIB = ''
# Uncomment the following two lines to use system's ffmpeg
# BF_FFMPEG = '/usr'
# BF_FFMPEG_LIB = 'avformat avcodec swscale avutil'
BF_REDCODE_INC = '${BF_REDCODE}/include'
# BF_REDCODE_INC = '${BF_REDCODE}/include'
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL}/libGL.a ${BF_OPENGL}/libGLU.a ${BF_OPENGL}/libXxf86vm.a ${BF_OPENGL}/libX11.a ${BF_OPENGL}/libXi.a ${BF_OPENGL}/libXext.a ${BF_OPENGL}/libXxf86vm.a'
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
##
CC = 'gcc'
@@ -179,32 +172,35 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CPPFLAGS = ['-DXP_UNIX']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O3']
REL_CCFLAGS = ['-O3']
##BF_DEPEND = 'true'
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = '-Wall -Wno-char-subscripts -Wdeclaration-after-statement'
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
CC_WARN = ['-Wall']
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
CC_WARN = '-Wall'
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'util c m dl pthread stdc++'
LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = 'false'
BF_DEBUG_FLAGS = '-g'
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR = '../build/linux2'
BF_INSTALLDIR='../install/linux2'
BF_DOCDIR='../install/doc'
#Link against pthread

View File

@@ -1,11 +1,6 @@
LCGDIR = '../lib/windows'
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
WITH_BF_YAFRAY = 'true'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.5'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
@@ -13,8 +8,8 @@ BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'openal_static'
@@ -24,10 +19,15 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
@@ -38,11 +38,8 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex '
@@ -50,15 +47,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@@ -67,39 +64,29 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
#BF_ZLIB_LIB = 'z'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = False
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE = 'false'
WITH_BF_ODE = 'true'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
# enable freetype2 support for text objects
BF_FREETYPE = LIBDIR + '/gcc/freetype'
@@ -107,18 +94,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@@ -143,8 +130,13 @@ CC_WARN = [ '-Wall' ]
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
BF_DEBUG = 'false'
BF_DEBUG_FLAGS= ''
BF_DEBUG = False
BF_DEBUG_CCFLAGS= []
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_BUILDDIR = '../build/linuxcross'
BF_INSTALLDIR='../install/linuxcross'
BF_DOCDIR='../install/doc'

View File

@@ -8,40 +8,42 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config'
WITH_BF_OPENAL = 'false'
# WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = False
# WITH_BF_STATICOPENAL = False
#BF_OPENAL = LIBDIR + '/openal'
#BF_OPENAL_INC = '${BF_OPENAL}/include'
#BF_OPENAL_LIB = 'openal'
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = '/usr/local'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
BF_SDL_LIBPATH = '${BF_SDL}/lib'
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'false'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = False
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include/libpng'
BF_PNG_LIB = 'png'
@@ -50,42 +52,27 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr/local'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'intl iconv'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE=False
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE='false'
WITH_BF_ODE = 'false'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = '${BF_ODE}/include'
BF_ODE_LIB = '${BF_ODE}/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -100,7 +87,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/X11R6'
@@ -108,16 +95,16 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'true'
WITH_BF_STATICOPENGL = True
BF_OPENGL = '/usr/X11R6'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
@@ -137,7 +124,7 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
@@ -145,21 +132,23 @@ REL_CCFLAGS = ['-O2']
##
CC = 'gcc'
CXX = 'g++'
C_WARN = '-Wall -Wdeclaration-after-statement'
C_WARN = ['-Wdeclaration-after-statement']
CC_WARN = '-Wall'
CC_WARN = ['-Wall']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'm stdc++ pthread util'
LLIBS = ['m', 'stdc++', 'pthread', 'util']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ' -pg -g '
BF_PROFILE = 'false'
BF_PROFILE = False
BF_PROFILE_CCFLAGS = ['-pg','-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_DEBUG = 'false'
BF_DEBUG_FLAGS = '-g'
BF_DEBUG = False
BF_DEBUG_CCFLAGS = ['-g']
BF_BUILDDIR='../build/openbsd3'
BF_INSTALLDIR='../install/openbsd3'
BF_DOCDIR='../install/doc'

View File

@@ -8,8 +8,8 @@ BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
WITH_BF_STATICOPENAL = False
BF_OPENAL = '/usr/local'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
@@ -19,20 +19,22 @@ BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_CXX = '/usr'
WITH_BF_STATICCXX = 'false'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = '/usr/local'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'samplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = '/usr/local'
BF_OPENEXR_INC = ['${BF_OPENEXR}/include', '${BF_OPENEXR}/include/OpenEXR' ]
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
@@ -40,15 +42,15 @@ BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = '/usr/local'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
BF_JPEG_LIB = 'jpeg'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = '/usr/local'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
@@ -57,43 +59,28 @@ BF_PNG_LIB = 'png'
BF_TIFF = '/usr/local'
BF_TIFF_INC = '${BF_TIFF}/include'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = '/usr'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
BF_ZLIB_LIB = 'z'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = '/usr/local'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettextlib'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = '#extern/bFTGL'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE=False
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE='false'
WITH_BF_ODE = 'false'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
WITH_BF_YAFRAY = 'true'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -108,7 +95,7 @@ WITH_BF_YAFRAY = 'true'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_FREETYPE = '/usr/local'
@@ -116,25 +103,25 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
BF_FREETYPE_LIB = 'freetype'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = "/usr"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = '/usr/local'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat avcodec avutil'
BF_FFMPEG_LIB = 'avformat avcodec avutil avdevice'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = '/usr/openwin'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIB = 'GL GLU X11 Xi'
@@ -153,30 +140,32 @@ CPPFLAGS = ['-DXP_UNIX', '-DSUN_OGL_NO_VERTEX_MACROS']
CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
REL_CFLAGS = ['-O2']
REL_CCFLAGS = ['-O2']
##BF_DEPEND = 'true'
##BF_DEPEND = True
##
##AR = ar
##ARFLAGS = ruv
##ARFLAGSQUIET = ru
##
C_WARN = '-Wall -Wno-char-subscripts -Wdeclaration-after-statement'
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement']
CC_WARN = '-Wall'
CC_WARN = ['-Wall']
##FIX_STUBS_WARNINGS = -Wno-unused
LLIBS = 'c m dl pthread stdc++'
LLIBS = ['c', 'm', 'dl', 'pthread', 'stdc++']
##LOPTS = --dynamic
##DYNLDFLAGS = -shared $(LDFLAGS)
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE = False
BF_DEBUG = 'false'
BF_DEBUG_FLAGS = ''
BF_DEBUG = False
BF_DEBUG_CCFLAGS = []
BF_BUILDDIR = '../build/sunos5'
BF_INSTALLDIR='../install/sunos5'
BF_DOCDIR='../install/doc'
PLATFORM_LINKFLAGS = ['']
PLATFORM_LINKFLAGS = []

View File

@@ -1,31 +1,43 @@
LCGDIR = '#../lib/windows'
LIBDIR = "${LCGDIR}"
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.5'
BF_PYTHON_VERSION = '3.1'
#BF_PYTHON_VERSION = '2.6'
#BF_PYTHON_VERSION = '2.6'
WITH_BF_STATICPYTHON = False
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
#BF_PYTHON_LIB = 'python25'
#BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/lib25_vs2005'
#BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/lib25_vs2005/libpython25.a'
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include'
BF_OPENAL_LIB = 'dxguid openal_static'
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
WITH_BF_FFMPEG = 'false'
BF_FFMPEG_LIB = 'avformat swscale avcodec avutil xvidcore x264'
BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/gcc/ffmpeg/include'
WITH_BF_FFMPEG = False
BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'libsamplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL'
@@ -36,11 +48,8 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadGC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/gcc/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
BF_OPENEXR_LIB = ' Half IlmImf Iex '
@@ -48,15 +57,15 @@ BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'jpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'png'
@@ -64,46 +73,33 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'libtiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = False
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE = 'false'
WITH_BF_ODE = 'true'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_YAFRAY = 'true'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -123,18 +119,18 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'false' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = '/usr/local'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
WITH_BF_ICONV = 'false'
WITH_BF_ICONV = False
BF_ICONV = LIBDIR + "/iconv"
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
# Mesa Libs should go here if your using them as well....
WITH_BF_STATICOPENGL = 'false'
WITH_BF_STATICOPENGL = False
BF_OPENGL = 'C:\\MingW'
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
@@ -153,17 +149,20 @@ CXXFLAGS = ['-pipe', '-mwindows', '-funsigned-char', '-fno-strict-aliasing' ]
REL_CFLAGS = [ '-O2' ]
REL_CCFLAGS = [ '-O2' ]
C_WARN = [ '-Wall' , '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
C_WARN = [ '-Wno-char-subscripts', '-Wdeclaration-after-statement' ]
CC_WARN = [ '-Wall' ]
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++']
BF_DEBUG = 'false'
BF_DEBUG_FLAGS= '-g'
BF_DEBUG = False
BF_DEBUG_CCFLAGS= ['-g']
BF_PROFILE_FLAGS = ['-pg','-g']
BF_PROFILE = 'false'
BF_PROFILE_CCFLAGS = ['-pg', '-g']
BF_PROFILE_LINKFLAGS = ['-pg']
BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
BF_PROFILE = False
BF_BUILDDIR = '..\\build\\win32-mingw'
BF_INSTALLDIR='..\\install\\win32-mingw'
BF_DOCDIR = '..\\install\\doc'

View File

@@ -1,44 +1,49 @@
LCGDIR = '#../lib/windows'
LIBDIR = '${LCGDIR}'
WITH_BF_VERSE = 'false'
BF_VERSE_INCLUDE = "#extern/verse/dist"
# enable ffmpeg support
WITH_BF_FFMPEG = 'false' # -DWITH_FFMPEG
WITH_BF_FFMPEG = True # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-51.lib avdevice-52.lib avutil-49.lib swscale-0.lib'
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '2.5'
BF_PYTHON_VERSION = '3.1'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python25'
BF_PYTHON_LIB = 'python31'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = 'true'
WITH_BF_STATICOPENAL = 'false'
WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include ${BF_OPENAL}/include/AL '
BF_OPENAL_LIB = 'dxguid openal_static'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
# TODO - are these useful on win32?
# BF_CXX = '/usr'
# WITH_BF_STATICCXX = 'false'
# WITH_BF_STATICCXX = False
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_ICONV = 'true'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
WITH_BF_SDL = 'true'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'libsamplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
BF_JACK_LIB = 'libjack'
BF_JACK_LIBPATH = '${BF_JACK}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL.lib'
@@ -49,27 +54,24 @@ BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = 'false'
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = 'true'
WITH_BF_STATICOPENEXR = 'false'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_msvc'
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = 'true'
WITH_BF_DDS = True
WITH_BF_JPEG = 'true'
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = 'true'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'libpng_st'
@@ -77,49 +79,36 @@ BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'libtiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = 'true'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_INTERNATIONAL = True
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gnu_gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_FTGL = 'true'
BF_FTGL = LIBDIR + '/ftgl'
BF_FTGL_INC = '${BF_FTGL}/include'
BF_FTGL_LIB = 'extern_ftgl'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
WITH_BF_GAMEENGINE = 'false'
WITH_BF_ODE = 'true'
BF_ODE = LIBDIR + '/ode'
BF_ODE_INC = BF_ODE + '/include'
BF_ODE_LIB = BF_ODE + '/lib/libode.a'
WITH_BF_BULLET = 'true'
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_SOLID = '#extern/solid'
BF_SOLID_INC = '${BF_SOLID}'
BF_SOLID_LIB = 'extern_solid'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_YAFRAY = 'true'
WITH_BF_BINRELOC = False
WITH_BF_BINRELOC = 'false'
#WITH_BF_NSPR = 'true'
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
@@ -134,21 +123,37 @@ WITH_BF_BINRELOC = 'false'
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = 'true'
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = 'true' # -DWITH_QUICKTIME
WITH_BF_QUICKTIME = True # -DWITH_QUICKTIME
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_STATICOPENGL = 'false'
WITH_BF_OPENJPEG = True
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = False
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
@@ -158,30 +163,29 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
CC = 'cl.exe'
CXX = 'cl.exe'
CCFLAGS = ['/nologo', '/Og', '/Ot', '/Ob1', '/Op', '/G6','/EHsc', '/J', '/W3', '/Gd', '/MT']
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CXXFLAGS = ['/EHsc']
BF_DEBUG_FLAGS = ['/Zi', '/FR${TARGET}.sbr']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
REL_CFLAGS = ['-O2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '-DNDEBUG']
REL_CXXFLAGS = ['-O2', '-DNDEBUG']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid'
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/LARGEADDRESSAWARE']
# # Todo
# BF_PROFILE_CCFLAGS = ['-pg', '-g ']
# BF_PROFILE_LINKFLAGS = ['-pg']
# BF_PROFILE = False
PLATFORM_LINKFLAGS = '''
/SUBSYSTEM:CONSOLE
/MACHINE:IX86
/ENTRY:mainCRTStartup
/INCREMENTAL:NO
/NODEFAULTLIB:"msvcprt.lib"
/NODEFAULTLIB:"glut32.lib"
/NODEFAULTLIB:"libc.lib"
/NODEFAULTLIB:"libcd.lib"
/NODEFAULTLIB:"libcpd.lib"
/NODEFAULTLIB:"libcp.lib"
'''
BF_BUILDDIR = '..\\build\\win32-vc'
BF_INSTALLDIR='..\\install\\win32-vc'
BF_DOCDIR='..\\install\\doc'

202
config/win64-vc-config.py Normal file
View File

@@ -0,0 +1,202 @@
LCGDIR = '#../lib/win64'
LIBDIR = '${LCGDIR}'
# enable ffmpeg support
WITH_BF_FFMPEG = False # -DWITH_FFMPEG
BF_FFMPEG = LIBDIR +'/ffmpeg'
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
BF_FFMPEG_LIB = 'avformat-52.lib avcodec-51.lib avdevice-52.lib avutil-49.lib swscale-0.lib'
BF_PYTHON = LIBDIR + '/python'
BF_PYTHON_VERSION = '3.1'
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
BF_PYTHON_BINARY = 'python'
BF_PYTHON_LIB = 'python31'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
WITH_BF_OPENAL = False
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
# TODO - are these useful on win32?
# BF_CXX = '/usr'
# WITH_BF_STATICCXX = False
# BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
WITH_BF_ICONV = True
BF_ICONV = LIBDIR + '/iconv'
BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
BF_LIBSAMPLERATE_LIB = 'libsamplerate'
BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
BF_SDL_LIB = 'SDL.lib'
BF_SDL_LIBPATH = '${BF_SDL}/lib'
BF_PTHREADS = LIBDIR + '/pthreads'
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
BF_PTHREADS_LIB = 'pthreadVC2'
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
WITH_BF_FMOD = False
BF_FMOD = LIBDIR + '/fmod'
WITH_BF_OPENEXR = True
WITH_BF_STATICOPENEXR = False
BF_OPENEXR = LIBDIR + '/openexr'
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/IlmImf ${BF_OPENEXR}/include/Iex ${BF_OPENEXR}/include/Imath '
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib_vs2008'
# Warning, this static lib configuration is untested! users of this OS please confirm.
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
WITH_BF_DDS = True
WITH_BF_JPEG = True
BF_JPEG = LIBDIR + '/jpeg'
BF_JPEG_INC = '${BF_JPEG}/include'
BF_JPEG_LIB = 'libjpeg'
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
WITH_BF_PNG = True
BF_PNG = LIBDIR + '/png'
BF_PNG_INC = '${BF_PNG}/include'
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '${BF_PNG}/lib'
BF_TIFF = LIBDIR + '/tiff'
BF_TIFF_INC = '${BF_TIFF}/include'
BF_TIFF_LIB = 'libtiff'
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
WITH_BF_ZLIB = True
BF_ZLIB = LIBDIR + '/zlib'
BF_ZLIB_INC = '${BF_ZLIB}/include'
BF_ZLIB_LIB = 'libz'
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
WITH_BF_INTERNATIONAL = False
BF_GETTEXT = LIBDIR + '/gettext'
BF_GETTEXT_INC = '${BF_GETTEXT}/include'
BF_GETTEXT_LIB = 'gettext'
BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
WITH_BF_GAMEENGINE = True
WITH_BF_PLAYER = False
WITH_BF_BULLET = True
BF_BULLET = '#extern/bullet2/src'
BF_BULLET_INC = '${BF_BULLET}'
BF_BULLET_LIB = 'extern_bullet'
BF_WINTAB = LIBDIR + '/wintab'
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
WITH_BF_BINRELOC = False
#WITH_BF_NSPR = True
#BF_NSPR = $(LIBDIR)/nspr
#BF_NSPR_INC = -I$(BF_NSPR)/include -I$(BF_NSPR)/include/nspr
#BF_NSPR_LIB =
# Uncomment the following line to use Mozilla inplace of netscape
#CPPFLAGS += -DMOZ_NOT_NET
# Location of MOZILLA/Netscape header files...
#BF_MOZILLA = $(LIBDIR)/mozilla
#BF_MOZILLA_INC = -I$(BF_MOZILLA)/include/mozilla/nspr -I$(BF_MOZILLA)/include/mozilla -I$(BF_MOZILLA)/include/mozilla/xpcom -I$(BF_MOZILLA)/include/mozilla/idl
#BF_MOZILLA_LIB =
# Will fall back to look in BF_MOZILLA_INC/nspr and BF_MOZILLA_LIB
# if this is not set.
#
# Be paranoid regarding library creation (do not update archives)
#BF_PARANOID = True
# enable freetype2 support for text objects
BF_WITH_FREETYPE = True
BF_FREETYPE = LIBDIR + '/freetype'
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
BF_FREETYPE_LIB = 'freetype2ST'
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
WITH_BF_QUICKTIME = False # -DWITH_QUICKTIME
BF_QUICKTIME = LIBDIR + '/QTDevWin'
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
BF_QUICKTIME_LIB = 'qtmlClient'
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
WITH_BF_OPENJPEG = False
BF_OPENJPEG = '#extern/libopenjpeg'
BF_OPENJPEG_LIB = ''
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
WITH_BF_FFTW3 = True
BF_FFTW3 = LIBDIR + '/fftw3'
BF_FFTW3_INC = '${BF_FFTW3}/include'
BF_FFTW3_LIB = 'libfftw'
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
WITH_BF_REDCODE = False
BF_REDCODE_INC = '#extern'
WITH_BF_STATICOPENGL = False
BF_OPENGL_INC = '${BF_OPENGL}/include'
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
BF_OPENGL_LIB = 'opengl32 glu32'
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
'${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
'${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
CC = 'cl.exe'
CXX = 'cl.exe'
CFLAGS = []
CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
CXXFLAGS = ['/EHsc']
BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-DFTGL_LIBRARY_STATIC', '-D_CRT_SECURE_NO_DEPRECATE']
REL_CFLAGS = ['-O2', '-DNDEBUG']
REL_CCFLAGS = ['-O2', '-DNDEBUG']
REL_CXXFLAGS = ['-O2', '-DNDEBUG']
C_WARN = []
CC_WARN = []
CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
WITH_BF_DOCS=False
BF_DEBUG=False
BF_BSC=False
if BF_DEBUG:
BF_NUMJOBS=1
else:
BF_NUMJOBS=6
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"']
BF_BUILDDIR = '..\\build\\blender25-win64-vc'
BF_INSTALLDIR='..\\install\\blender25-win64-vc'
BF_DOCDIR='..\\install\\blender25-win64-vc\\doc'
######################### MERGE WITH ABOVE ################################

View File

@@ -1,9 +1,5 @@
$Id$
Note: The current official release of SCons is 0.98, but
our system still works for 0.97. However, this will be fixed
soon.
Blenders SCons build scripts
============================
@@ -30,8 +26,9 @@ $Id$
----------------
To build Blender with the SCons scripts you need a full Python
install, version 2.4 or later (http://www.python.org) and a SCons
installation, version v0.97 (http://www.scons.org).
install, version 2.4 or later (http://www.python.org). We already provide
a scons-local installation, which can be found in the scons/ subdirectory.
This document uses the scons-local installation for its examples.
Check from the page
http://www.blender.org/development/building-blender/getting-dependencies/
@@ -42,9 +39,14 @@ $Id$
In the base directory of the sources (from now on called $BLENDERHOME)
you'll see a file named SConstruct. This is the entry point for the
SCons build system. In a terminal, change to this directory. To just
build, issue the command 'scons':
build, start the SCons entry script on Windows (will be used for the remainder
of this document):
% scons
% python scons\scons.py
On a Unix-compatible system it would be
% python ./scons/scons.py
This will start the build process with default values. Depending
on your platform you may see colour in your output (non-Windows
@@ -53,11 +55,19 @@ $Id$
build are configured.
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to
finally copy all needed files to get a proper setup. These
variabbles have default values for every platform in
finally copy all needed files to get a proper setup. The BF_DOCDIR is
used to generate Blender Python documentation files to. These
variables have default values for every platform in
$BLENDERHOME/config/(platform)-config.py. After the build successfully
completes, you can find everything you need in BF_INSTALLDIR.
If you want to create the installer package of Blender on Windows you'll
need to install nullsoft scriptable install system from http://nsis.sf.net.
As an extra dependency, you need the MoreInfo plugin too. The creation of
the installer is tied into the build process and can be triggered with:
% python scons\scons.py nsis
Configuring the build
---------------------
@@ -73,20 +83,21 @@ $Id$
(TBD: add cygwin, solaris and freebsd support)
These files you will normally not change. If you need to override
a default value, make a copy of the proper configuration to
$BLENDERHOME/user-config.py. This file you can modify to your
likings. Any value set here will override the ones from the
(platform)-config.py.
a default value, make a file called $BLENDERHOME/user-config.py, and copy
settings from the config/(platform)-config.py that you want to change. Don't
copy the entire file (unless explicitely stated in the configuration file),
because you may not get updated options you don't change yourself, which may
result in build errors.
You can use BF_CONFIG argument to override the default user-config.py
check. This is just like the user-config.py, but just with another name:
% scons BF_CONFIG=myownsettings
% python scons\scons.py BF_CONFIG=myownsettings
If you want to quickly test a new setting, you can give the option
also on the command-line:
% scons BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0
% python scons\scons.py BF_BUILDDIR=../mybuilddir WITH_BF_OPENEXR=0
This command sets the build directory to BF_BUILDDIR and disables
OpenEXR support.
@@ -94,7 +105,7 @@ $Id$
If you need to know what can be set through the command-line, run
scons with -h:
% scons -h
% python scons\scons.py -h
This command will print a long list with settable options and what
every option means. Many of the default values will be empty, and
@@ -115,11 +126,11 @@ $Id$
you need to see the full command-line for compiles, then you can
change that behaviour. Also the use of colours can be changed:
% scons BF_FANCY=0
% python scons\scons.py BF_FANCY=0
This will disable the use of colours.
% scons BF_QUIET=0
% python scons\scons.py BF_QUIET=0
This will give the old, noisy output. Every command-line per
compile is printed out in its full glory. This is very useful when
@@ -130,11 +141,11 @@ $Id$
Compiling Only Some Libraries
-----------------------------
Scons now has support for specifying a list of libraries that are
Our implementation now has support for specifying a list of libraries that are
exclusively compiled, ignoring all other libraries. This is invoked
with the BF_QUICK arguments; for example:
% scons BF_QUICK=src,bf_blenkernel
% python scons\scons.py BF_QUICK=src,bf_blenkernel
Note that this not the same as passing a list of folders as in the
makefile's "quicky" command. In Scons, all of Blender's code modules
@@ -154,7 +165,7 @@ $Id$
BF_QUICKDEBUG is similar to BF_QUICK:
% scons BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib
% python scons\scons.py BF_QUICKDEBUG=src,bf_blenkernel,some-other-lib
To use BF_DEBUG_LIBS, put something like the following in you user-config.py:
@@ -166,18 +177,6 @@ $Id$
debug symbols. Also note that BF_QUICKDEBUG and BF_DEBUG_LIBS are combined;
for example, setting BF_QUICKDEBUG won't overwrite the contents of BF_DEBUG_LIBS.
Not installing
--------------
If you dont want to install the build result, you can use the following option either
on the commandline or in your user-config.py :
WITHOUT_BF_INSTALL='true'
by default, this is set to 'false', and so the build is installed
Supported toolset
-----------------
@@ -193,15 +192,8 @@ $Id$
On Windows with all of the three toolset installed you need to
specify what toolset to use
% scons BF_TOOLSET=msvc
% scons BF_TOOLSET=mstoolkit
% scons BF_TOOLSET=mingw
If you have only the toolkit installed, you will also need to give
BF_TOOLSET=mstoolkit on the command-line, to make sure everything is
setup properly. Currently there is no good mechanism to automatically
determine wether the found 'cl.exe' is from the toolkit or from a
complete install.
% python scons\scons.py BF_TOOLSET=msvc
% python scons\scons.py BF_TOOLSET=mingw
LINUX and OS X
@@ -214,30 +206,26 @@ $Id$
Build Blender with the defaults:
% scons
% python scons\scons.py
Build Blender, but disable OpenEXR support:
% scons WITH_BF_OPENEXR=0
% python scons\scons.py WITH_BF_OPENEXR=0
Build Blender, enable debug symbols:
% scons BF_DEBUG=1
% python scons\scons.py BF_DEBUG=1
Build Blender, install to different directory:
% scons BF_INSTALLDIR=/tmp/testbuild
% python scons\scons.py BF_INSTALLDIR=../myown/installdir
Build Blender in /tmp/obj and install to /usr/local:
Build Blender in ../myown/builddir and install to ../myown/installdir:
% scons BF_BUILDDIR=/tmp/obj BF_INSTALLDIR=/usr/local
% python scons\scons.py BF_BUILDDIR=../myown/builddir BF_INSTALLDIR=../myown/installdir
Clean BF_BUILDDIR:
% scons clean
Clean out the installed files:
% scons -c
% python scons\scons.py clean
/Nathan Letwory (jesterKing)

24
extern/CMakeLists.txt vendored
View File

@@ -24,25 +24,19 @@
#
# ***** END GPL LICENSE BLOCK *****
IF(WITH_GAMEENGINE)
SUBDIRS(qhull solid)
ENDIF(WITH_GAMEENGINE)
IF(WITH_BULLET)
SUBDIRS(bullet2)
ADD_SUBDIRECTORY(bullet2)
ENDIF(WITH_BULLET)
IF(WITH_INTERNATIONAL)
SUBDIRS(bFTGL)
ENDIF(WITH_INTERNATIONAL)
IF(WITH_VERSE)
SUBDIRS(verse)
ENDIF(WITH_VERSE)
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SUBDIRS(binreloc)
ADD_SUBDIRECTORY(binreloc)
ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SUBDIRS(glew)
ADD_SUBDIRECTORY(glew)
IF(WITH_OPENJPEG)
ADD_SUBDIRECTORY(libopenjpeg)
ENDIF(WITH_OPENJPEG)
ADD_SUBDIRECTORY(lzo)
ADD_SUBDIRECTORY(lzma)

32
extern/Makefile vendored
View File

@@ -30,11 +30,7 @@ include nan_definitions.mk
SOURCEDIR = extern
DIR = $(OCGDIR)/extern
DIRS = qhull/src solid glew/src
ifeq ($(WITH_FREETYPE2), true)
DIRS += bFTGL/src
endif
DIRS = glew/src
ifeq ($(WITH_FFMPEG), true)
ifeq ($(NAN_FFMPEG), $(LCGDIR)/ffmpeg)
@@ -45,23 +41,29 @@ ifeq ($(NAN_FFMPEG), $(LCGDIR)/gcc/ffmpeg)
endif
endif
ifeq ($(WITH_VERSE), true)
DIRS += verse
endif
ifneq ($(NAN_NO_KETSJI), true)
DIRS += bullet2
endif
# Cloth requires it
#ifneq ($(NAN_NO_KETSJI), true)
DIRS += bullet2
#endif
ifeq ($(WITH_BINRELOC), true)
DIRS += binreloc
endif
TARGET =
ifneq ($(OS),irix)
TARGET=solid
ifeq ($(WITH_OPENJPEG), true)
DIRS += libopenjpeg
endif
ifeq ($(WITH_LZO), true)
DIRS += lzo/minilzo
endif
ifeq ($(WITH_LZMA), true)
DIRS += lzma
endif
TARGET = solid
all::
@[ -d $(OCGDIR)/extern ] || mkdir -p $(OCGDIR)/extern
@for i in $(DIRS); do \

13
extern/SConscript vendored
View File

@@ -4,19 +4,9 @@ Import('env')
SConscript(['glew/SConscript'])
if env['WITH_BF_GAMEENGINE']:
SConscript(['qhull/SConscript',
'solid/SConscript'])
if env['WITH_BF_BULLET']:
SConscript(['bullet2/src/SConscript'])
if env['WITH_BF_INTERNATIONAL']:
SConscript(['bFTGL/SConscript'])
if env['WITH_BF_VERSE']:
SConscript(['verse/dist/SConstruct'])
if env['WITH_BF_FFMPEG'] and env['BF_FFMPEG_LIB'] == '':
SConscript(['x264/SConscript'])
SConscript(['libmp3lame/SConscript'])
@@ -31,3 +21,6 @@ if env['WITH_BF_REDCODE'] and env['BF_REDCODE_LIB'] == '':
if env['OURPLATFORM'] == 'linux2':
SConscript(['binreloc/SConscript']);
SConscript(['lzo/SConscript'])
SConscript(['lzma/SConscript'])

View File

@@ -1,32 +0,0 @@
# $Id$
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2006, Blender Foundation
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): Jacques Beaurain.
#
# ***** END GPL LICENSE BLOCK *****
SET(INC include src ${FREETYPE_INC})
FILE(GLOB SRC src/*.cpp)
ADD_DEFINITIONS(-DFTGL_LIBRARY_STATIC)
BLENDERLIB(extern_ftgl "${SRC}" "${INC}")
#, libtype=['international','player'], priority=[5, 210])

View File

@@ -1,481 +0,0 @@
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Library General Public License, applies to some
specially designated Free Software Foundation software, and to any
other libraries whose authors decide to use it. You can use it for
your libraries, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if
you distribute copies of the library, or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link a program with the library, you must provide
complete object files to the recipients so that they can relink them
with the library, after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
Our method of protecting your rights has two steps: (1) copyright
the library, and (2) offer you this license which gives you legal
permission to copy, distribute and/or modify the library.
Also, for each distributor's protection, we want to make certain
that everyone understands that there is no warranty for this free
library. If the library is modified by someone else and passed on, we
want its recipients to know that what they have is not the original
version, so that any problems introduced by others will not reflect on
the original authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that companies distributing free
software will individually obtain patent licenses, thus in effect
transforming the program into proprietary software. To prevent this,
we have made it clear that any patent must be licensed for everyone's
free use or not licensed at all.
Most GNU software, including some libraries, is covered by the ordinary
GNU General Public License, which was designed for utility programs. This
license, the GNU Library General Public License, applies to certain
designated libraries. This license is quite different from the ordinary
one; be sure to read it in full, and don't assume that anything in it is
the same as in the ordinary license.
The reason we have a separate public license for some libraries is that
they blur the distinction we usually make between modifying or adding to a
program and simply using it. Linking a program with a library, without
changing the library, is in some sense simply using the library, and is
analogous to running a utility program or application program. However, in
a textual and legal sense, the linked executable is a combined work, a
derivative of the original library, and the ordinary General Public License
treats it as such.
Because of this blurred distinction, using the ordinary General
Public License for libraries did not effectively promote software
sharing, because most developers did not use the libraries. We
concluded that weaker conditions might promote sharing better.
However, unrestricted linking of non-free programs would deprive the
users of those programs of all benefit from the free status of the
libraries themselves. This Library General Public License is intended to
permit developers of non-free programs to use free libraries, while
preserving your freedom as a user of such programs to change the free
libraries that are incorporated in them. (We have not seen how to achieve
this as regards changes in header files, but we have achieved it as regards
changes in the actual functions of the Library.) The hope is that this
will lead to faster development of free libraries.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, while the latter only
works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
contains a notice placed by the copyright holder or other authorized
party saying it may be distributed under the terms of this Library
General Public License (also called "this License"). Each licensee is
addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also compile or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
c) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
d) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the source code distributed need not include anything that is normally
distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Library General Public License from time to time.
Such new versions will be similar in spirit to the present version,
but may differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@@ -1,51 +0,0 @@
FTGL 2.0.11
16 August 2004
DESCRIPTION:
FTGL is a free open source library to enable developers to use arbitrary
fonts in their OpenGL (www.opengl.org) applications.
Unlike other OpenGL font libraries FTGL uses standard font file formats
so doesn't need a preprocessing step to convert the high quality font data
into a lesser quality, proprietary format.
FTGL uses the Freetype (www.freetype.org) font library to open and 'decode'
the fonts. It then takes that output and stores it in a format most efficient
for OpenGL rendering.
Rendering modes supported are
- Bit maps
- Antialiased Pix maps
- Texture maps
- Outlines
- Polygon meshes
- Extruded polygon meshes
FTGL is designed to be used in commercial quality software. It has been
written with performance, robustness and simplicity in mind.
USAGE:
FTGLPixmapFont font( "Fonts:Arial");
font.FaceSize( 72);
font.render( "Hello World!");
This library was inspired by gltt, Copyright (C) 1998-1999 Stephane Rehel
(http://gltt.sourceforge.net)
Bezier curve code contributed by Jed Soane.
Demo, Linux port, extrusion code and gltt maintainance by Gerard Lanois
Linux port by Matthias Kretz
Windows port by Andrew Ellerton & Max Rheiner
Bug fixes by Robert Osfield, Marcelo E. Magallon, Markku Rontu, Mark A. Fox,
Patrick Rogers
Containers and optimisations by Sebastien Barre
Autoconf Marcelo E. Magallon.
Please contact me if you have any suggestions, feature requests, or problems.
Henry Maddocks
ftgl@opengl.geek.nz
http://homepages.paradise.net.nz/henryj/

View File

@@ -1,30 +0,0 @@
#!/usr/bin/python
import sys
import os
Import('env')
# Import the C flags set in the SConstruct file
#Import ('cflags')
#Import ('defines')
#Import ('user_options_dict')
#if sys.platform=='linux2' or sys.platform=='linux-i386':
# ftgl_env.Append (CCFLAGS = ['-O2', '-ansi'])
#elif sys.platform=='win32':
#ftgl_env.Append (CCFLAGS = ['/O2'])
#elif sys.platform=='sunos':
# ftgl_env.Append (CCFLAGS = ['Xc', '-v', '-fast'])
#elif sys.platform=='darwin':
# ftgl_env.Append (CCFLAGS = ['-O2', '-pipe', '-fPIC', '-funsigned-char', '-ffast-math'])
#else:
# ftgl_env.Append (CCFLAGS = cflags)
#ftgl_env.Append (CPPDEFINES = defines)
incs = 'include src ' + env['BF_FREETYPE_INC'] + ' ' + env['BF_OPENGL_INC']
defs = ''
sources = env.Glob('src/*.cpp')
env.BlenderLib ( 'extern_ftgl', sources, Split(incs), Split(defs), libtype=['international','player'], priority=[5, 210])

View File

@@ -1,4 +0,0 @@
#!/bin/sh -fx
# script to get rid of the grabage that MAC OSX drops in all the directories
find . -name .DS_Store -print -exec rm {} \;

View File

@@ -1,124 +0,0 @@
#ifndef __FTBBox__
#define __FTBBox__
#include <ft2build.h>
#include FT_FREETYPE_H
//#include FT_GLYPH_H
#include FT_OUTLINE_H
#include "FTGL.h"
#include "FTPoint.h"
/**
* FTBBox is a convenience class for handling bounding boxes.
*/
class FTGL_EXPORT FTBBox
{
public:
/**
* Default constructor. Bounding box is set to zero.
*/
FTBBox()
: lowerX(0.0f),
lowerY(0.0f),
lowerZ(0.0f),
upperX(0.0f),
upperY(0.0f),
upperZ(0.0f)
{}
/**
* Constructor.
*/
FTBBox( float lx, float ly, float lz, float ux, float uy, float uz)
: lowerX(lx),
lowerY(ly),
lowerZ(lz),
upperX(ux),
upperY(uy),
upperZ(uz)
{}
/**
* Constructor. Extracts a bounding box from a freetype glyph. Uses
* the control box for the glyph. <code>FT_Glyph_Get_CBox()</code>
*
* @param glyph A freetype glyph
*/
FTBBox( FT_GlyphSlot glyph)
: lowerX(0.0f),
lowerY(0.0f),
lowerZ(0.0f),
upperX(0.0f),
upperY(0.0f),
upperZ(0.0f)
{
FT_BBox bbox;
FT_Outline_Get_CBox( &(glyph->outline), &bbox);
lowerX = static_cast<float>( bbox.xMin) / 64.0f;
lowerY = static_cast<float>( bbox.yMin) / 64.0f;
lowerZ = 0.0f;
upperX = static_cast<float>( bbox.xMax) / 64.0f;
upperY = static_cast<float>( bbox.yMax) / 64.0f;
upperZ = 0.0f;
}
/**
* Destructor
*/
~FTBBox()
{}
/**
* Move the Bounding Box by a vector.
*
* @param distance The distance to move the bbox in 3D space.
*/
FTBBox& Move( FTPoint distance)
{
lowerX += distance.x;
lowerY += distance.y;
lowerZ += distance.z;
upperX += distance.x;
upperY += distance.y;
upperZ += distance.z;
return *this;
}
FTBBox& operator += ( const FTBBox& bbox)
{
lowerX = bbox.lowerX < lowerX? bbox.lowerX: lowerX;
lowerY = bbox.lowerY < lowerY? bbox.lowerY: lowerY;
lowerZ = bbox.lowerZ < lowerZ? bbox.lowerZ: lowerZ;
upperX = bbox.upperX > upperX? bbox.upperX: upperX;
upperY = bbox.upperY > upperY? bbox.upperY: upperY;
upperZ = bbox.upperZ > upperZ? bbox.upperZ: upperZ;
return *this;
}
void SetDepth( float depth)
{
upperZ = lowerZ + depth;
}
/**
* The bounds of the box
*/
// Make these ftPoints & private
float lowerX, lowerY, lowerZ, upperX, upperY, upperZ;
protected:
private:
};
#endif // __FTBBox__

View File

@@ -1,76 +0,0 @@
#ifndef __FTBitmapGlyph__
#define __FTBitmapGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
/**
* FTBitmapGlyph is a specialisation of FTGlyph for creating bitmaps.
*
* It provides the interface between Freetype glyphs and their openGL
* Renderable counterparts. This is an abstract class and derived classes
* must implement the <code>Render</code> function.
*
* @see FTGlyphContainer
*
*/
class FTGL_EXPORT FTBitmapGlyph : public FTGlyph
{
public:
/**
* Constructor
*
* @param glyph The Freetype glyph to be processed
*/
FTBitmapGlyph( FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTBitmapGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
private:
/**
* The width of the glyph 'image'
*/
unsigned int destWidth;
/**
* The height of the glyph 'image'
*/
unsigned int destHeight;
/**
* The pitch of the glyph 'image'
*/
unsigned int destPitch;
/**
* Vector from the pen position to the topleft corner of the bitmap
*/
FTPoint pos;
/**
* Pointer to the 'image' data
*/
unsigned char* data;
};
#endif // __FTBitmapGlyph__

View File

@@ -1,76 +0,0 @@
#ifndef __FTBufferGlyph__
#define __FTBufferGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
/**
* FTBufferGlyph is a specialisation of FTGlyph for creating pixmaps.
*
* @see FTGlyphContainer
*
*/
class FTGL_EXPORT FTBufferGlyph : public FTGlyph
{
public:
/**
* Constructor
*
* @param glyph The Freetype glyph to be processed
*/
FTBufferGlyph( FT_GlyphSlot glyph, unsigned char* clientBuffer);
/**
* Destructor
*/
virtual ~FTBufferGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
// attributes
private:
/**
* The width of the glyph 'image'
*/
int destWidth;
/**
* The height of the glyph 'image'
*/
int destHeight;
/**
* The pitch of the glyph 'image'
*/
unsigned int destPitch;
/**
* Vector from the pen position to the topleft corner of the pixmap
*/
FTPoint pos;
/**
* Pointer to the 'image' data
*/
unsigned char* data;
unsigned char* buffer;
};
#endif // __FTBufferGlyph__

View File

@@ -1,130 +0,0 @@
#ifndef __FTCharToGlyphIndexMap__
#define __FTCharToGlyphIndexMap__
#include <stdlib.h>
#include "FTGL.h"
/**
* Provides a non-STL alternative to the STL map<unsigned long, unsigned long>
* which maps character codes to glyph indices inside FTCharmap.
*
* Implementation:
* - NumberOfBuckets buckets are considered.
* - Each bucket has BucketSize entries.
* - When the glyph index for the character code C has to be stored, the
* bucket this character belongs to is found using 'C div BucketSize'.
* If this bucket has not been allocated yet, do it now.
* The entry in the bucked is found using 'C mod BucketSize'.
* If it is set to IndexNotFound, then the glyph entry has not been set.
* - Try to mimic the calls made to the STL map API.
*
* Caveats:
* - The glyph index is now a signed long instead of unsigned long, so
* the special value IndexNotFound (= -1) can be used to specify that the
* glyph index has not been stored yet.
*/
class FTGL_EXPORT FTCharToGlyphIndexMap
{
public:
typedef unsigned long CharacterCode;
typedef signed long GlyphIndex;
enum
{
NumberOfBuckets = 256,
BucketSize = 256,
IndexNotFound = -1
};
FTCharToGlyphIndexMap()
{
this->Indices = 0;
}
virtual ~FTCharToGlyphIndexMap()
{
if( this->Indices)
{
// Free all buckets
this->clear();
// Free main structure
delete [] this->Indices;
this->Indices = 0;
}
}
void clear()
{
if(this->Indices)
{
for( int i = 0; i < FTCharToGlyphIndexMap::NumberOfBuckets; i++)
{
if( this->Indices[i])
{
delete [] this->Indices[i];
this->Indices[i] = 0;
}
}
}
}
const GlyphIndex find( CharacterCode c)
{
if( !this->Indices)
{
return 0;
}
// Find position of char code in buckets
div_t pos = div( c, FTCharToGlyphIndexMap::BucketSize);
if( !this->Indices[pos.quot])
{
return 0;
}
const FTCharToGlyphIndexMap::GlyphIndex *ptr = &this->Indices[pos.quot][pos.rem];
if( *ptr == FTCharToGlyphIndexMap::IndexNotFound)
{
return 0;
}
return *ptr;
}
void insert( CharacterCode c, GlyphIndex g)
{
if( !this->Indices)
{
this->Indices = new GlyphIndex* [FTCharToGlyphIndexMap::NumberOfBuckets];
for( int i = 0; i < FTCharToGlyphIndexMap::NumberOfBuckets; i++)
{
this->Indices[i] = 0;
}
}
// Find position of char code in buckets
div_t pos = div(c, FTCharToGlyphIndexMap::BucketSize);
// Allocate bucket if does not exist yet
if( !this->Indices[pos.quot])
{
this->Indices[pos.quot] = new GlyphIndex [FTCharToGlyphIndexMap::BucketSize];
for( int i = 0; i < FTCharToGlyphIndexMap::BucketSize; i++)
{
this->Indices[pos.quot][i] = FTCharToGlyphIndexMap::IndexNotFound;
}
}
this->Indices[pos.quot][pos.rem] = g;
}
private:
GlyphIndex** Indices;
};
#endif // __FTCharToGlyphIndexMap__

View File

@@ -1,136 +0,0 @@
#ifndef __FTCharmap__
#define __FTCharmap__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTCharToGlyphIndexMap.h"
#include "FTGL.h"
/**
* FTCharmap takes care of specifying the encoding for a font and mapping
* character codes to glyph indices.
*
* It doesn't preprocess all indices, only on an as needed basis. This may
* seem like a performance penalty but it is quicker than using the 'raw'
* freetype calls and will save significant amounts of memory when dealing
* with unicode encoding
*
* @see "Freetype 2 Documentation"
*
*/
class FTFace;
class FTGL_EXPORT FTCharmap
{
public:
/**
* Constructor
*/
FTCharmap( FTFace* face);
/**
* Destructor
*/
virtual ~FTCharmap();
/**
* Queries for the current character map code.
*
* @return The current character map code.
*/
FT_Encoding Encoding() const { return ftEncoding;}
/**
* Sets the character map for the face.
* Valid encodings as at Freetype 2.0.4
* ft_encoding_none
* ft_encoding_symbol
* ft_encoding_unicode
* ft_encoding_latin_2
* ft_encoding_sjis
* ft_encoding_gb2312
* ft_encoding_big5
* ft_encoding_wansung
* ft_encoding_johab
* ft_encoding_adobe_standard
* ft_encoding_adobe_expert
* ft_encoding_adobe_custom
* ft_encoding_apple_roman
*
* @param encoding the Freetype encoding symbol. See above.
* @return <code>true</code> if charmap was valid and set
* correctly. If the requested encoding is
* unavailable it will be set to ft_encoding_none.
*/
bool CharMap( FT_Encoding encoding);
/**
* Get the FTGlyphContainer index of the input character.
*
* @param characterCode The character code of the requested glyph in
* the current encoding eg apple roman.
* @return The FTGlyphContainer index for the character or zero
* if it wasn't found
*/
unsigned int GlyphListIndex( const unsigned int characterCode);
/**
* Get the font glyph index of the input character.
*
* @param characterCode The character code of the requested glyph in
* the current encoding eg apple roman.
* @return The glyph index for the character.
*/
unsigned int FontIndex( const unsigned int characterCode);
/**
* Set the FTGlyphContainer index of the character code.
*
* @param characterCode The character code of the requested glyph in
* the current encoding eg apple roman.
* @param containerIndex The index into the FTGlyphContainer of the
* character code.
*/
void InsertIndex( const unsigned int characterCode, const unsigned int containerIndex);
/**
* Queries for errors.
*
* @return The current error code. Zero means no error.
*/
FT_Error Error() const { return err;}
private:
/**
* Current character map code.
*/
FT_Encoding ftEncoding;
/**
* The current Freetype face.
*/
const FT_Face ftFace;
/**
* A structure that maps glyph indices to character codes
*
* < character code, face glyph index>
*/
typedef FTCharToGlyphIndexMap CharacterMap;
CharacterMap charMap;
/**
* Current error code.
*/
FT_Error err;
};
#endif // __FTCharmap__

View File

@@ -1,88 +0,0 @@
#ifndef __FTContour__
#define __FTContour__
#include "FTPoint.h"
#include "FTVector.h"
#include "FTGL.h"
/**
* FTContour class is a container of points that describe a vector font
* outline. It is used as a container for the output of the bezier curve
* evaluator in FTVectoriser.
*
* @see FTOutlineGlyph
* @see FTPolyGlyph
* @see FTPoint
*/
class FTGL_EXPORT FTContour
{
public:
/**
* Constructor
*
* @param contour
* @param pointTags
* @param numberOfPoints
*/
FTContour( FT_Vector* contour, char* pointTags, unsigned int numberOfPoints);
/**
* Destructor
*/
~FTContour()
{
pointList.clear();
}
/**
* Return a point at index.
*
* @param index of the point in the curve.
* @return const point reference
*/
const FTPoint& Point( unsigned int index) const { return pointList[index];}
/**
* How many points define this contour
*
* @return the number of points in this contour
*/
size_t PointCount() const { return pointList.size();}
private:
/**
* Add a point to this contour. This function tests for duplicate
* points.
*
* @param point The point to be added to the contour.
*/
inline void AddPoint( FTPoint point);
inline void AddPoint( float x, float y);
/**
* De Casteljau (bezier) algorithm contributed by Jed Soane
* Evaluates a quadratic or conic (second degree) curve
*/
inline void evaluateQuadraticCurve();
/**
* De Casteljau (bezier) algorithm contributed by Jed Soane
* Evaluates a cubic (third degree) curve
*/
inline void evaluateCubicCurve();
/**
* The list of points in this contour
*/
typedef FTVector<FTPoint> PointVector;
PointVector pointList;
/**
* 2D array storing values of de Casteljau algorithm.
*/
float controlPoints[4][2];
};
#endif // __FTContour__

View File

@@ -1,71 +0,0 @@
#ifndef __FTExtrdGlyph__
#define __FTExtrdGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
class FTVectoriser;
/**
* FTExtrdGlyph is a specialisation of FTGlyph for creating tessellated
* extruded polygon glyphs.
*
* @see FTGlyphContainer
* @see FTVectoriser
*
*/
class FTGL_EXPORT FTExtrdGlyph : public FTGlyph
{
public:
/**
* Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline.
*
* @param glyph The Freetype glyph to be processed
* @param depth The distance along the z axis to extrude the glyph
*/
FTExtrdGlyph( FT_GlyphSlot glyph, float depth);
/**
* Destructor
*/
virtual ~FTExtrdGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
private:
/**
* Calculate the normal vector to 2 points. This is 2D and ignores
* the z component. The normal will be normalised
*
* @param a
* @param b
* @return
*/
FTPoint GetNormal( const FTPoint &a, const FTPoint &b);
/**
* OpenGL display list
*/
GLuint glList;
/**
* Distance to extrude the glyph
*/
float depth;
};
#endif // __FTExtrdGlyph__

View File

@@ -1,149 +0,0 @@
#ifndef __FTFace__
#define __FTFace__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTPoint.h"
#include "FTSize.h"
/**
* FTFace class provides an abstraction layer for the Freetype Face.
*
* @see "Freetype 2 Documentation"
*
*/
class FTGL_EXPORT FTFace
{
public:
/**
* Opens and reads a face file. Error is set.
*
* @param filename font file name.
*/
FTFace( const char* filename);
/**
* Read face data from an in-memory buffer. Error is set.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes );
/**
* Destructor
*
* Disposes of the current Freetype Face.
*/
virtual ~FTFace();
/**
* Attach auxilliary file to font (e.g., font metrics).
*
* @param filename auxilliary font file name.
* @return <code>true</code> if file has opened
* successfully.
*/
bool Attach( const char* filename);
/**
* Attach auxilliary data to font (e.g., font metrics) from memory
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
* @return <code>true</code> if file has opened
* successfully.
*/
bool Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Disposes of the face
*/
void Close();
/**
* Get the freetype face object..
*
* @return pointer to an FT_Face.
*/
FT_Face* Face() const { return ftFace;}
/**
* Sets the char size for the current face.
*
* This doesn't guarantee that the size was set correctly. Clients
* should check errors.
*
* @param size the face size in points (1/72 inch)
* @param res the resolution of the target device.
* @return <code>FTSize</code> object
*/
const FTSize& Size( const unsigned int size, const unsigned int res);
unsigned int UnitsPerEM() const;
/**
* Get the number of character maps in this face.
*
* @return character map count.
*/
unsigned int CharMapCount();
/**
* Get a list of character maps in this face.
*
* @return pointer to the first encoding.
*/
FT_Encoding* CharMapList();
/**
* Gets the kerning vector between two glyphs
*/
FTPoint KernAdvance( unsigned int index1, unsigned int index2);
/**
* Loads and creates a Freetype glyph.
*/
FT_GlyphSlot Glyph( unsigned int index, FT_Int load_flags);
/**
* Gets the number of glyphs in the current face.
*/
unsigned int GlyphCount() const { return numGlyphs;}
/**
* Queries for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err; }
private:
/**
* The Freetype face
*/
FT_Face* ftFace;
/**
* The size object associated with this face
*/
FTSize charSize;
/**
* The number of glyphs in this face
*/
int numGlyphs;
FT_Encoding* fontEncodingList;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
};
#endif // __FTFace__

View File

@@ -1,260 +0,0 @@
#ifndef __FTFont__
#define __FTFont__
#include <ft2build.h>
#include FT_FREETYPE_H
#include "FTFace.h"
#include "FTGL.h"
class FTGlyphContainer;
class FTGlyph;
/**
* FTFont is the public interface for the FTGL library.
*
* Specific font classes are derived from this class. It uses the helper
* classes FTFace and FTSize to access the Freetype library. This class
* is abstract and deriving classes must implement the protected
* <code>MakeGlyph</code> function to create glyphs of the
* appropriate type.
*
* It is good practice after using these functions to test the error
* code returned. <code>FT_Error Error()</code>
*
* @see FTFace
* @see FTSize
* @see FTGlyphContainer
* @see FTGlyph
*/
class FTGL_EXPORT FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
* The buffer is owned by the client and is NOT copied by FTGL. The
* pointer must be valid while using FTGL.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
virtual ~FTFont();
/**
* Attach auxilliary file to font e.g font metrics.
*
* Note: not all font formats implement this function.
*
* @param filename auxilliary font file name.
* @return <code>true</code> if file has been attached
* successfully.
*/
bool Attach( const char* filename);
/**
* Attach auxilliary data to font e.g font metrics, from memory
*
* Note: not all font formats implement this function.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
* @return <code>true</code> if file has been attached
* successfully.
*/
bool Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Set the character map for the face.
*
* @param encoding Freetype enumerate for char map code.
* @return <code>true</code> if charmap was valid and
* set correctly
*/
bool CharMap( FT_Encoding encoding );
/**
* Get the number of character maps in this face.
*
* @return character map count.
*/
unsigned int CharMapCount();
/**
* Get a list of character maps in this face.
*
* @return pointer to the first encoding.
*/
FT_Encoding* CharMapList();
/**
* Set the char size for the current face.
*
* @param size the face size in points (1/72 inch)
* @param res the resolution of the target device.
* @return <code>true</code> if size was set correctly
*/
virtual bool FaceSize( const unsigned int size, const unsigned int res = 72);
/**
* Get the current face size in points.
*
* @return face size
*/
unsigned int FaceSize() const;
/**
* Set the extrusion distance for the font. Only implemented by
* FTGLExtrdFont
*
* @param d The extrusion distance.
*/
virtual void Depth( float d){}
/**
* Get the global ascender height for the face.
*
* @return Ascender height
*/
float Ascender() const;
/**
* Gets the global descender height for the face.
*
* @return Descender height
*/
float Descender() const;
/**
* Get the bounding box for a string.
*
* @param string a char string
* @param llx lower left near x coord
* @param lly lower left near y coord
* @param llz lower left near z coord
* @param urx upper right far x coord
* @param ury upper right far y coord
* @param urz upper right far z coord
*/
void BBox( const char* string, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz);
/**
* Get the bounding box for a string.
*
* @param string a wchar_t string
* @param llx lower left near x coord
* @param lly lower left near y coord
* @param llz lower left near z coord
* @param urx upper right far x coord
* @param ury upper right far y coord
* @param urz upper right far z coord
*/
void BBox( const wchar_t* string, float& llx, float& lly, float& llz, float& urx, float& ury, float& urz);
/**
* Get the advance width for a string.
*
* @param string a wchar_t string
* @return advance width
*/
float Advance( const wchar_t* string);
/**
* Get the advance width for a string.
*
* @param string a char string
* @return advance width
*/
float Advance( const char* string);
/**
* Render a string of characters
*
* @param string 'C' style string to be output.
*/
virtual void Render( const char* string );
/**
* Render a string of characters
*
* @param string wchar_t string to be output.
*/
virtual void Render( const wchar_t* string );
/**
* Queries the Font for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err;}
protected:
/**
* Construct a glyph of the correct type.
*
* Clients must overide the function and return their specialised
* FTGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FT****Glyph or <code>null</code> on failure.
*/
virtual FTGlyph* MakeGlyph( unsigned int g) = 0;
/**
* Current face object
*/
FTFace face;
/**
* Current size object
*/
FTSize charSize;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
private:
/**
* Render a character
* This function does an implicit conversion on it's arguments.
*
* @param chr current character
* @param nextChr next character
*/
inline void DoRender( const unsigned int chr, const unsigned int nextChr);
/**
* Check that the glyph at <code>chr</code> exist. If not load it.
*
* @param chr character index
*/
inline void CheckGlyph( const unsigned int chr);
/**
* An object that holds a list of glyphs
*/
FTGlyphContainer* glyphList;
/**
* Current pen or cursor position;
*/
FTPoint pen;
};
#endif // __FTFont__

View File

@@ -1,100 +0,0 @@
#ifndef __FTGL__
#define __FTGL__
typedef double FTGL_DOUBLE;
typedef float FTGL_FLOAT;
// Fixes for deprecated identifiers in 2.1.5
#ifndef FT_OPEN_MEMORY
#define FT_OPEN_MEMORY (FT_Open_Flags)1
#endif
#ifndef FT_RENDER_MODE_MONO
#define FT_RENDER_MODE_MONO ft_render_mode_mono
#endif
#ifndef FT_RENDER_MODE_NORMAL
#define FT_RENDER_MODE_NORMAL ft_render_mode_normal
#endif
#ifdef WIN32
// Under windows avoid including <windows.h> is overrated.
// Sure, it can be avoided and "name space pollution" can be
// avoided, but why? It really doesn't make that much difference
// these days.
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#ifndef __gl_h_
#include <GL/gl.h>
#include <GL/glu.h>
#endif
#else
// Non windows platforms - don't require nonsense as seen above :-)
#ifndef __gl_h_
#ifdef __APPLE_CC__
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#include <GL/gl.h>
#if defined (__sun__) && !defined (__sparc__)
#include <mesa/glu.h>
#else
#include <GL/glu.h>
#endif
#endif
#endif
// Required for compatibility with glext.h style function definitions of
// OpenGL extensions, such as in src/osg/Point.cpp.
#ifndef APIENTRY
#define APIENTRY
#endif
#endif
// Compiler-specific conditional compilation
#ifdef _MSC_VER // MS Visual C++
// Disable various warning.
// 4786: template name too long
#pragma warning( disable : 4251 )
#pragma warning( disable : 4275 )
#pragma warning( disable : 4786 )
// The following definitions control how symbols are exported.
// If the target is a static library ensure that FTGL_LIBRARY_STATIC
// is defined. If building a dynamic library (ie DLL) ensure the
// FTGL_LIBRARY macro is defined, as it will mark symbols for
// export. If compiling a project to _use_ the _dynamic_ library
// version of the library, no definition is required.
#ifdef FTGL_LIBRARY_STATIC // static lib - no special export required
# define FTGL_EXPORT
#elif FTGL_LIBRARY // dynamic lib - must export/import symbols appropriately.
# define FTGL_EXPORT __declspec(dllexport)
#else
# define FTGL_EXPORT __declspec(dllimport)
#endif
#else
// Compiler that is not MS Visual C++.
// Ensure that the export symbol is defined (and blank)
#define FTGL_EXPORT
#endif
// lifted from glext.h, to remove dependancy on glext.h
#ifndef GL_EXT_texture_object
#define GL_TEXTURE_PRIORITY_EXT 0x8066
#define GL_TEXTURE_RESIDENT_EXT 0x8067
#define GL_TEXTURE_1D_BINDING_EXT 0x8068
#define GL_TEXTURE_2D_BINDING_EXT 0x8069
#define GL_TEXTURE_3D_BINDING_EXT 0x806A
#endif
#endif // __FTGL__

View File

@@ -1,65 +0,0 @@
#ifndef __FTGLBitmapFont__
#define __FTGLBitmapFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLBitmapFont is a specialisation of the FTFont class for handling
* Bitmap fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLBitmapFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLBitmapFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLBitmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
~FTGLBitmapFont();
/**
* Renders a string of characters
*
* @param string 'C' style string to be output.
*/
void Render( const char* string);
/**
* Renders a string of characters
*
* @param string 'C' style wide string to be output.
*/
void Render( const wchar_t* string);
// attributes
private:
/**
* Construct a FTBitmapGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FTBitmapGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int g);
};
#endif // __FTGLBitmapFont__

View File

@@ -1,76 +0,0 @@
#ifndef __FTGLBufferFont__
#define __FTGLBufferFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLBufferFont is a specialisation of the FTFont class for handling
* Pixmap (Grey Scale) fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLBufferFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLBufferFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
void SetClientBuffer( unsigned char* b)
{
buffer = b;
}
/**
* Destructor
*/
~FTGLBufferFont();
/**
* Renders a string of characters
*
* @param string 'C' style string to be output.
*/
void Render( const char* string);
/**
* Renders a string of characters
*
* @param string wchar_t string to be output.
*/
void Render( const wchar_t* string);
private:
/**
* Construct a FTBufferGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FTBufferGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int g);
unsigned char* buffer;
};
#endif // __FTGLBufferFont__

View File

@@ -1,55 +0,0 @@
#ifndef __FTGLExtrdFont__
#define __FTGLExtrdFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLExtrdFont is a specialisation of the FTFont class for handling
* extruded Polygon fonts
*
* @see FTFont
* @see FTGLPolygonFont
*/
class FTGL_EXPORT FTGLExtrdFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLExtrdFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
~FTGLExtrdFont();
void Depth( float d) { depth = d;}
private:
/**
* Construct a FTPolyGlyph.
*
* @param glyphIndex The glyph index NOT the char code.
* @return An FTExtrdGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex);
float depth;
};
#endif // __FTGLExtrdFont__

View File

@@ -1,64 +0,0 @@
#ifndef __FTGLOutlineFont__
#define __FTGLOutlineFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLOutlineFont is a specialisation of the FTFont class for handling
* Vector Outline fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLOutlineFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLOutlineFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLOutlineFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
~FTGLOutlineFont();
/**
* Renders a string of characters
*
* @param string 'C' style string to be output.
*/
void Render( const char* string);
/**
* Renders a string of characters
*
* @param string wchar_t string to be output.
*/
void Render( const wchar_t* string);
private:
/**
* Construct a FTOutlineGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FTOutlineGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int g);
};
#endif // __FTGLOutlineFont__

View File

@@ -1,68 +0,0 @@
#ifndef __FTGLPixmapFont__
#define __FTGLPixmapFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLPixmapFont is a specialisation of the FTFont class for handling
* Pixmap (Grey Scale) fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLPixmapFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLPixmapFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLPixmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
~FTGLPixmapFont();
/**
* Renders a string of characters
*
* @param string 'C' style string to be output.
*/
void Render( const char* string);
/**
* Renders a string of characters
*
* @param string wchar_t string to be output.
*/
void Render( const wchar_t* string);
private:
/**
* Construct a FTPixmapGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FTPixmapGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int g);
};
#endif // __FTGLPixmapFont__

View File

@@ -1,53 +0,0 @@
#ifndef __FTGLPolygonFont__
#define __FTGLPolygonFont__
#include "FTFont.h"
#include "FTGL.h"
class FTGlyph;
/**
* FTGLPolygonFont is a specialisation of the FTFont class for handling
* tesselated Polygon Mesh fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLPolygonFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLPolygonFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLPolygonFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
~FTGLPolygonFont();
private:
/**
* Construct a FTPolyGlyph.
*
* @param g The glyph index NOT the char code.
* @return An FTPolyGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int g);
};
#endif // __FTGLPolygonFont__

View File

@@ -1,151 +0,0 @@
#ifndef __FTGLTextureFont__
#define __FTGLTextureFont__
#include "FTFont.h"
#include "FTVector.h"
#include "FTGL.h"
class FTTextureGlyph;
/**
* FTGLTextureFont is a specialisation of the FTFont class for handling
* Texture mapped fonts
*
* @see FTFont
*/
class FTGL_EXPORT FTGLTextureFont : public FTFont
{
public:
/**
* Open and read a font file. Sets Error flag.
*
* @param fontname font file name.
*/
FTGLTextureFont( const char* fontname);
/**
* Open and read a font from a buffer in memory. Sets Error flag.
*
* @param pBufferBytes the in-memory buffer
* @param bufferSizeInBytes the length of the buffer in bytes
*/
FTGLTextureFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes);
/**
* Destructor
*/
virtual ~FTGLTextureFont();
/**
* Set the char size for the current face.
*
* @param size the face size in points (1/72 inch)
* @param res the resolution of the target device.
* @return <code>true</code> if size was set correctly
*/
virtual bool FaceSize( const unsigned int size, const unsigned int res = 72);
/**
* Renders a string of characters
*
* @param string 'C' style string to be output.
*/
virtual void Render( const char* string);
/**
* Renders a string of characters
*
* @param string wchar_t string to be output.
*/
virtual void Render( const wchar_t* string);
private:
/**
* Construct a FTTextureGlyph.
*
* @param glyphIndex The glyph index NOT the char code.
* @return An FTTextureGlyph or <code>null</code> on failure.
*/
inline virtual FTGlyph* MakeGlyph( unsigned int glyphIndex);
/**
* Get the size of a block of memory required to layout the glyphs
*
* Calculates a width and height based on the glyph sizes and the
* number of glyphs. It over estimates.
*/
inline void CalculateTextureSize();
/**
* Creates a 'blank' OpenGL texture object.
*
* The format is GL_ALPHA and the params are
* GL_TEXTURE_WRAP_S = GL_CLAMP
* GL_TEXTURE_WRAP_T = GL_CLAMP
* GL_TEXTURE_MAG_FILTER = GL_LINEAR
* GL_TEXTURE_MIN_FILTER = GL_LINEAR
* Note that mipmapping is NOT used
*/
inline GLuint CreateTexture();
/**
* The maximum texture dimension on this OpenGL implemetation
*/
GLsizei maxTextSize;
/**
* The minimum texture width required to hold the glyphs
*/
GLsizei textureWidth;
/**
* The minimum texture height required to hold the glyphs
*/
GLsizei textureHeight;
/**
*An array of texture ids
*/
FTVector<GLuint> textureIDList;
/**
* The max height for glyphs in the current font
*/
int glyphHeight;
/**
* The max width for glyphs in the current font
*/
int glyphWidth;
/**
* A value to be added to the height and width to ensure that
* glyphs don't overlap in the texture
*/
unsigned int padding;
/**
*
*/
unsigned int numGlyphs;
/**
*/
unsigned int remGlyphs;
/**
*/
int xOffset;
/**
*/
int yOffset;
};
#endif // __FTGLTextureFont__

View File

@@ -1,89 +0,0 @@
#ifndef __FTGlyph__
#define __FTGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTBBox.h"
#include "FTPoint.h"
#include "FTGL.h"
/**
* FTGlyph is the base class for FTGL glyphs.
*
* It provides the interface between Freetype glyphs and their openGL
* renderable counterparts. This is an abstract class and derived classes
* must implement the <code>render</code> function.
*
* @see FTGlyphContainer
* @see FTBBox
* @see FTPoint
*
*/
class FTGL_EXPORT FTGlyph
{
public:
/**
* Constructor
*/
FTGlyph( FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen) = 0;
/**
* Return the advance width for this glyph.
*
* @return advance width.
*/
float Advance() const { return advance;}
/**
* Return the bounding box for this glyph.
*
* @return bounding box.
*/
const FTBBox& BBox() const { return bBox;}
/**
* Queries for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err;}
protected:
/**
* The advance distance for this glyph
*/
float advance;
/**
* The bounding box of this glyph.
*/
FTBBox bBox;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
private:
};
#endif // __FTGlyph__

View File

@@ -1,127 +0,0 @@
#ifndef __FTGlyphContainer__
#define __FTGlyphContainer__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTBBox.h"
#include "FTPoint.h"
#include "FTVector.h"
class FTFace;
class FTGlyph;
class FTCharmap;
/**
* FTGlyphContainer holds the post processed FTGlyph objects.
*
* @see FTGlyph
*/
class FTGL_EXPORT FTGlyphContainer
{
typedef FTVector<FTGlyph*> GlyphVector;
public:
/**
* Constructor
*
* @param face The Freetype face
*/
FTGlyphContainer( FTFace* face);
/**
* Destructor
*/
~FTGlyphContainer();
/**
* Sets the character map for the face.
*
* @param encoding the Freetype encoding symbol. See above.
* @return <code>true</code> if charmap was valid
* and set correctly
*/
bool CharMap( FT_Encoding encoding);
/**
* Get the font index of the input character.
*
* @param characterCode The character code of the requested glyph in the
* current encoding eg apple roman.
* @return The font index for the character.
*/
unsigned int FontIndex( const unsigned int characterCode ) const;
/**
* Adds a glyph to this glyph list.
*
* @param glyph The FTGlyph to be inserted into the container
* @param characterCode The char code of the glyph NOT the glyph index.
*/
void Add( FTGlyph* glyph, const unsigned int characterCode);
/**
* Get a glyph from the glyph list
*
* @param characterCode The char code of the glyph NOT the glyph index
* @return An FTGlyph or <code>null</code> is it hasn't been
* loaded.
*/
const FTGlyph* const Glyph( const unsigned int characterCode) const;
/**
* Get the bounding box for a character.
* @param characterCode The char code of the glyph NOT the glyph index
*/
FTBBox BBox( const unsigned int characterCode) const;
/**
* Returns the kerned advance width for a glyph.
*
* @param characterCode glyph index of the character
* @param nextCharacterCode the next glyph in a string
* @return advance width
*/
float Advance( const unsigned int characterCode, const unsigned int nextCharacterCode);
/**
* Renders a character
* @param characterCode the glyph to be Rendered
* @param nextCharacterCode the next glyph in the string. Used for kerning.
* @param penPosition the position to Render the glyph
* @return The distance to advance the pen position after Rendering
*/
FTPoint Render( const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition);
/**
* Queries the Font for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err;}
private:
/**
* The FTGL face
*/
FTFace* face;
/**
* The Character Map object associated with the current face
*/
FTCharmap* charMap;
/**
* A structure to hold the glyphs
*/
GlyphVector glyphs;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
};
#endif // __FTGlyphContainer__

View File

@@ -1,97 +0,0 @@
#ifndef __FTLibrary__
#define __FTLibrary__
#include <ft2build.h>
#include FT_FREETYPE_H
//#include FT_CACHE_H
#include "FTGL.h"
/**
* FTLibrary class is the global accessor for the Freetype library.
*
* This class encapsulates the Freetype Library. This is a singleton class
* and ensures that only one FT_Library is in existence at any one time.
* All constructors are private therefore clients cannot create or
* instantiate this class themselves and must access it's methods via the
* static <code>FTLibrary::Instance()</code> function.
*
* Just because this class returns a valid <code>FTLibrary</code> object
* doesn't mean that the Freetype Library has been successfully initialised.
* Clients should check for errors. You can initialse the library AND check
* for errors using the following code...
* <code>err = FTLibrary::Instance().Error();</code>
*
* @see "Freetype 2 Documentation"
*
*/
class FTGL_EXPORT FTLibrary
{
public:
/**
* Global acces point to the single FTLibrary object.
*
* @return The global <code>FTLibrary</code> object.
*/
static FTLibrary& Instance();
/**
* Gets a pointer to the native Freetype library.
*
* @return A handle to a FreeType library instance.
*/
const FT_Library* const GetLibrary() const { return library;}
/**
* Queries the library for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err;}
/**
* Destructor
*
* Disposes of the Freetype library
*/
~FTLibrary();
private:
/**
* Default constructors.
*
* Made private to stop clients creating there own FTLibrary
* objects.
*/
FTLibrary();
FTLibrary( const FT_Library&){}
FTLibrary& operator=( const FT_Library&) { return *this; }
/**
* Initialises the Freetype library
*
* Even though this function indicates success via the return value,
* clients can't see this so must check the error codes. This function
* is only ever called by the default c_stor
*
* @return <code>true</code> if the Freetype library was
* successfully initialised, <code>false</code>
* otherwise.
*/
bool Initialise();
/**
* Freetype library handle.
*/
FT_Library* library;
// FTC_Manager* manager;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
};
#endif // __FTLibrary__

View File

@@ -1,112 +0,0 @@
#ifndef __FTList__
#define __FTList__
#include "FTGL.h"
/**
* Provides a non-STL alternative to the STL list
*/
template <typename FT_LIST_ITEM_TYPE>
class FTGL_EXPORT FTList
{
public:
typedef FT_LIST_ITEM_TYPE value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef size_t size_type;
/**
* Constructor
*/
FTList()
: listSize(0),
tail(0)
{
tail = NULL;
head = new Node;
}
/**
* Destructor
*/
~FTList()
{
Node* next;
for( Node *walk = head; walk; walk = next)
{
next = walk->next;
delete walk;
}
}
/**
* Get the number of items in the list
*/
size_type size() const
{
return listSize;
}
/**
* Add an item to the end of the list
*/
void push_back( const value_type& item)
{
Node* node = new Node( item);
if( head->next == NULL)
{
head->next = node;
}
if( tail)
{
tail->next = node;
}
tail = node;
++listSize;
}
/**
* Get the item at the front of the list
*/
reference front() const
{
return head->next->payload;
}
/**
* Get the item at the end of the list
*/
reference back() const
{
return tail->payload;
}
private:
struct Node
{
Node()
: next(NULL)
{}
Node( const value_type& item)
: next(NULL)
{
payload = item;
}
Node* next;
value_type payload;
};
size_type listSize;
Node* head;
Node* tail;
};
#endif // __FTList__

View File

@@ -1,54 +0,0 @@
#ifndef __FTOutlineGlyph__
#define __FTOutlineGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
class FTVectoriser;
/**
* FTOutlineGlyph is a specialisation of FTGlyph for creating outlines.
*
* @see FTGlyphContainer
* @see FTVectoriser
*
*/
class FTGL_EXPORT FTOutlineGlyph : public FTGlyph
{
public:
/**
* Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline.
*
* @param glyph The Freetype glyph to be processed
*/
FTOutlineGlyph( FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTOutlineGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
private:
/**
* OpenGL display list
*/
GLuint glList;
};
#endif // __FTOutlineGlyph__

View File

@@ -1,68 +0,0 @@
#ifndef __FTPixmapGlyph__
#define __FTPixmapGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
/**
* FTPixmapGlyph is a specialisation of FTGlyph for creating pixmaps.
*
* @see FTGlyphContainer
*
*/
class FTGL_EXPORT FTPixmapGlyph : public FTGlyph
{
public:
/**
* Constructor
*
* @param glyph The Freetype glyph to be processed
*/
FTPixmapGlyph( FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTPixmapGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
// attributes
private:
/**
* The width of the glyph 'image'
*/
int destWidth;
/**
* The height of the glyph 'image'
*/
int destHeight;
/**
* Vector from the pen position to the topleft corner of the pixmap
*/
FTPoint pos;
/**
* Pointer to the 'image' data
*/
unsigned char* data;
};
#endif // __FTPixmapGlyph__

View File

@@ -1,85 +0,0 @@
#ifndef __FTPoint__
#define __FTPoint__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
/**
* FTPoint class is a basic 3 dimensional point or vector.
*/
class FTGL_EXPORT FTPoint
{
public:
/**
* Default constructor. Point is set to zero.
*/
FTPoint()
: x(0), y(0), z(0)
{}
/**
* Constructor.
*
* @param X
* @param Y
* @param Z
*/
FTPoint( const FTGL_DOUBLE X, const FTGL_DOUBLE Y, const FTGL_DOUBLE Z)
: x(X), y(Y), z(Z)
{}
/**
* Constructor. This converts an FT_Vector to an FT_Point
*
* @param ft_vector A freetype vector
*/
FTPoint( const FT_Vector& ft_vector)
: x(ft_vector.x), y(ft_vector.y), z(0)
{}
/**
* Operator +=
*
* @param point
* @return this plus point.
*/
FTPoint& operator += ( const FTPoint& point)
{
x += point.x;
y += point.y;
z += point.z;
return *this;
}
/**
* Operator == Tests for eqaulity
*
* @param a
* @param b
* @return
*/
friend bool operator == ( const FTPoint &a, const FTPoint &b);
/**
* Operator != Tests for non equality
*
* @param a
* @param b
* @return
*/
friend bool operator != ( const FTPoint &a, const FTPoint &b);
/**
* The point data
*/
FTGL_DOUBLE x, y, z; // FIXME make private
private:
};
#endif // __FTPoint__

View File

@@ -1,55 +0,0 @@
#ifndef __FTPolyGlyph__
#define __FTPolyGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
class FTVectoriser;
/**
* FTPolyGlyph is a specialisation of FTGlyph for creating tessellated
* polygon glyphs.
*
* @see FTGlyphContainer
* @see FTVectoriser
*
*/
class FTGL_EXPORT FTPolyGlyph : public FTGlyph
{
public:
/**
* Constructor. Sets the Error to Invalid_Outline if the glyphs isn't an outline.
*
* @param glyph The Freetype glyph to be processed
*/
FTPolyGlyph( FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTPolyGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
private:
/**
* OpenGL display list
*/
GLuint glList;
};
#endif // __FTPolyGlyph__

View File

@@ -1,132 +0,0 @@
#ifndef __FTSize__
#define __FTSize__
#include <ft2build.h>
#include FT_FREETYPE_H
#include "FTGL.h"
/**
* FTSize class provides an abstraction layer for the Freetype Size.
*
* @see "Freetype 2 Documentation"
*
*/
class FTGL_EXPORT FTSize
{
public:
/**
* Default Constructor
*/
FTSize();
/**
* Destructor
*/
virtual ~FTSize();
/**
* Sets the char size for the current face.
*
* This doesn't guarantee that the size was set correctly. Clients
* should check errors.
*
* @param face Parent face for this size object
* @param point_size the face size in points (1/72 inch)
* @param x_resolution the horizontal resolution of the target device.
* @param y_resolution the vertical resolution of the target device.
* @return <code>true</code> if the size has been set. Clients should check Error() for more information if this function returns false()
*/
bool CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution);
/**
* get the char size for the current face.
*
* @return The char size in points
*/
unsigned int CharSize() const;
/**
* Gets the global ascender height for the face in pixels.
*
* @return Ascender height
*/
float Ascender() const;
/**
* Gets the global descender height for the face in pixels.
*
* @return Ascender height
*/
float Descender() const;
/**
* Gets the global face height for the face.
*
* If the face is scalable this returns the height of the global
* bounding box which ensures that any glyph will be less than or
* equal to this height. If the font isn't scalable there is no
* guarantee that glyphs will not be taller than this value.
*
* @return height in pixels.
*/
float Height() const;
/**
* Gets the global face width for the face.
*
* If the face is scalable this returns the width of the global
* bounding box which ensures that any glyph will be less than or
* equal to this width. If the font isn't scalable this value is
* the max_advance for the face.
*
* @return width in pixels.
*/
float Width() const;
/**
* Gets the underline position for the face.
*
* @return underline position in pixels
*/
float Underline() const;
unsigned int XPixelsPerEm() const;
unsigned int YPixelsPerEm() const;
/**
* Queries for errors.
*
* @return The current error code.
*/
FT_Error Error() const { return err; }
private:
/**
* The current Freetype face that this FTSize object relates to.
*/
FT_Face* ftFace;
/**
* The Freetype size.
*/
FT_Size ftSize;
/**
* The size in points.
*/
unsigned int size;
/**
* Current error code. Zero means no error.
*/
FT_Error err;
};
#endif // __FTSize__

View File

@@ -1,89 +0,0 @@
#ifndef __FTTextureGlyph__
#define __FTTextureGlyph__
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
#include "FTGL.h"
#include "FTGlyph.h"
/**
* FTTextureGlyph is a specialisation of FTGlyph for creating texture
* glyphs.
*
* @see FTGlyphContainer
*
*/
class FTGL_EXPORT FTTextureGlyph : public FTGlyph
{
public:
/**
* Constructor
*
* @param glyph The Freetype glyph to be processed
* @param id The id of the texture that this glyph will be
* drawn in
* @param xOffset The x offset into the parent texture to draw
* this glyph
* @param yOffset The y offset into the parent texture to draw
* this glyph
* @param width The width of the parent texture
* @param height The height (number of rows) of the parent texture
*/
FTTextureGlyph( FT_GlyphSlot glyph, int id, int xOffset, int yOffset, GLsizei width, GLsizei height);
/**
* Destructor
*/
virtual ~FTTextureGlyph();
/**
* Renders this glyph at the current pen position.
*
* @param pen The current pen position.
* @return The advance distance for this glyph.
*/
virtual float Render( const FTPoint& pen);
private:
/**
* The width of the glyph 'image'
*/
int destWidth;
/**
* The height of the glyph 'image'
*/
int destHeight;
/**
* Vector from the pen position to the topleft corner of the pixmap
*/
FTPoint pos;
/**
* The texture co-ords of this glyph within the texture.
*/
FTPoint uv[2];
/**
* The texture index that this glyph is contained in.
*/
int glTextureID;
/**
* The texture index of the currently active texture
*
* We call glGetIntegerv( GL_TEXTURE_2D_BINDING, activeTextureID);
* to get the currently active texture to try to reduce the number
* of texture bind operations
*/
GLint activeTextureID;
};
#endif // __FTTextureGlyph__

View File

@@ -1,190 +0,0 @@
#ifndef __FTVector__
#define __FTVector__
#include "FTGL.h"
/**
* Provides a non-STL alternative to the STL vector
*/
template <typename FT_VECTOR_ITEM_TYPE>
class FTGL_EXPORT FTVector
{
public:
typedef FT_VECTOR_ITEM_TYPE value_type;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef value_type* iterator;
typedef const value_type* const_iterator;
typedef size_t size_type;
FTVector()
{
Capacity = Size = 0;
Items = 0;
}
virtual ~FTVector()
{
clear();
}
FTVector& operator =(const FTVector& v)
{
reserve(v.capacity());
iterator ptr = begin();
const_iterator vbegin = v.begin();
const_iterator vend = v.end();
while( vbegin != vend)
{
*ptr++ = *vbegin++;
}
Size = v.size();
return *this;
}
size_type size() const
{
return Size;
}
size_type capacity() const
{
return Capacity;
}
iterator begin()
{
return Items;
}
const_iterator begin() const
{
return Items;
}
iterator end()
{
return begin() + size();
}
const_iterator end() const
{
return begin() + size();
}
bool empty() const
{
return size() == 0;
}
reference operator [](size_type pos)
{
return( *(begin() + pos));
}
const_reference operator []( size_type pos) const
{
return( *(begin() + pos));
}
void clear()
{
if( Capacity)
{
delete [] Items;
Capacity = Size = 0;
Items = 0;
}
}
void reserve( size_type n)
{
if( capacity() < n)
{
expand(n);
}
}
void push_back(const value_type& x)
{
if( size() == capacity())
{
expand();
}
( *this)[size()] = x;
++Size;
}
void resize(size_type n, value_type x)
{
if( n == size())
{
return;
}
reserve(n);
iterator begin, end;
if( n >= Size)
{
begin = this->end();
end = this->begin() + n;
}
else
{
begin = this->begin() + n;
end = this->end();
}
while( begin != end)
{
*begin++ = x;
}
Size = n;
}
private:
void expand(size_type capacity_hint = 0)
{
size_type new_capacity =( capacity() == 0) ? 256 : capacity()* 2;
if( capacity_hint)
{
while( new_capacity < capacity_hint)
{
new_capacity *= 2;
}
}
value_type *new_items = new value_type[new_capacity];
iterator begin = this->begin();
iterator end = this->end();
value_type *ptr = new_items;
while( begin != end)
{
*ptr++ = *begin++;
}
if( Capacity)
{
delete [] Items;
}
Items = new_items;
Capacity = new_capacity;
}
size_type Capacity;
size_type Size;
value_type* Items;
};
#endif // __FTVector__

View File

@@ -1,275 +0,0 @@
#ifndef __FTVectoriser__
#define __FTVectoriser__
#include "FTContour.h"
#include "FTList.h"
#include "FTPoint.h"
#include "FTVector.h"
#include "FTGL.h"
#ifndef CALLBACK
#define CALLBACK
#endif
/**
* FTTesselation captures points that are output by OpenGL's gluTesselator.
*/
class FTGL_EXPORT FTTesselation
{
public:
/**
* Default constructor
*/
FTTesselation( GLenum m)
: meshType(m)
{
pointList.reserve( 128);
}
/**
* Destructor
*/
~FTTesselation()
{
pointList.clear();
}
/**
* Add a point to the mesh.
*/
void AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z)
{
pointList.push_back( FTPoint( x, y, z));
}
/**
* The number of points in this mesh
*/
size_t PointCount() const { return pointList.size();}
/**
*
*/
const FTPoint& Point( unsigned int index) const { return pointList[index];}
/**
* Return the OpenGL polygon type.
*/
GLenum PolygonType() const { return meshType;}
private:
/**
* Points generated by gluTesselator.
*/
typedef FTVector<FTPoint> PointVector;
PointVector pointList;
/**
* OpenGL primitive type from gluTesselator.
*/
GLenum meshType;
};
/**
* FTMesh is a container of FTTesselation's that make up a polygon glyph
*/
class FTGL_EXPORT FTMesh
{
typedef FTVector<FTTesselation*> TesselationVector;
typedef FTList<FTPoint> PointList;
public:
/**
* Default constructor
*/
FTMesh();
/**
* Destructor
*/
~FTMesh();
/**
*
*/
void AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z);
/**
*
*/
FTGL_DOUBLE* Combine( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z);
/**
*
*/
void Begin( GLenum meshType);
/**
*
*/
void End();
/**
*
*/
void Error( GLenum e) { err = e;}
/**
*
*/
unsigned int TesselationCount() const { return tesselationList.size();}
/**
*
*/
const FTTesselation* const Tesselation( unsigned int index) const;
/**
*
*/
const PointList& TempPointList() const { return tempPointList;}
/**
* Get the GL ERROR returned by the glu tesselator
*/
GLenum Error() const { return err;}
private:
/**
* The current sub mesh that we are constructing.
*/
FTTesselation* currentTesselation;
/**
* Holds each sub mesh that comprises this glyph.
*/
TesselationVector tesselationList;
/**
* Holds extra points created by gluTesselator. See ftglCombine.
*/
PointList tempPointList;
/**
* GL ERROR returned by the glu tesselator
*/
GLenum err;
};
const FTGL_DOUBLE FTGL_FRONT_FACING = 1.0;
const FTGL_DOUBLE FTGL_BACK_FACING = -1.0;
/**
* FTVectoriser class is a helper class that converts font outlines into
* point data.
*
* @see FTExtrdGlyph
* @see FTOutlineGlyph
* @see FTPolyGlyph
* @see FTContour
* @see FTPoint
*
*/
class FTGL_EXPORT FTVectoriser
{
public:
/**
* Constructor
*
* @param glyph The freetype glyph to be processed
*/
FTVectoriser( const FT_GlyphSlot glyph);
/**
* Destructor
*/
virtual ~FTVectoriser();
/**
* Build an FTMesh from the vector outline data.
*
* @param zNormal The direction of the z axis of the normal
* for this mesh
*/
void MakeMesh( FTGL_DOUBLE zNormal = FTGL_FRONT_FACING);
/**
* Get the current mesh.
*/
const FTMesh* const GetMesh() const { return mesh;}
/**
* Get the total count of points in this outline
*
* @return the number of points
*/
size_t PointCount();
/**
* Get the count of contours in this outline
*
* @return the number of contours
*/
size_t ContourCount() const { return ftContourCount;}
/**
* Return a contour at index
*
* @return the number of contours
*/
const FTContour* const Contour( unsigned int index) const;
/**
* Get the number of points in a specific contour in this outline
*
* @param c The contour index
* @return the number of points in contour[c]
*/
size_t ContourSize( int c) const { return contourList[c]->PointCount();}
/**
* Get the flag for the tesselation rule for this outline
*
* @return The contour flag
*/
int ContourFlag() const { return contourFlag;}
private:
/**
* Process the freetype outline data into contours of points
*/
void ProcessContours();
/**
* The list of contours in the glyph
*/
FTContour** contourList;
/**
* A Mesh for tesselations
*/
FTMesh* mesh;
/**
* The number of contours reported by Freetype
*/
short ftContourCount;
/**
* A flag indicating the tesselation rule for the glyph
*/
int contourFlag;
/**
* A Freetype outline
*/
FT_Outline outline;
};
#endif // __FTVectoriser__

View File

@@ -1,27 +0,0 @@
FTGL
Herewith is a license. I've also chucked in a gnu (see COPYING.txt) license
for those that are that way inclined. Basically I want you to use this
software and if you think this license is preventing you from doing so
let me know.
Copyright (C) 2001-3 Henry Maddocks
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,406 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="ftgl_static_lib"
ProjectGUID="{F9850C15-FF0A-429E-9D47-89FB433C9BD8}"
SccProjectName=""
SccLocalPath="">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Blender Debug|Win32"
OutputDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\debug"
IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include;..\..\..\..\..\lib\windows\freetype\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\ftgl\debug\ftgl_static_lib.pch"
AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\ftgl\debug\"
ObjectFile="..\..\..\..\..\build\msvc_7\extern\ftgl\debug\"
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\ftgl\debug\"
WarningLevel="2"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\debug\ftgl_static.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying FTGL files library (debug target) to lib tree."
CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\ftgl\include\ MKDIR ..\..\..\..\..\build\msvc_7\extern\ftgl\include
XCOPY /Y ..\..\include\*.h ..\..\..\..\..\build\msvc_7\extern\ftgl\include
ECHO Done
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Blender Release|Win32"
OutputDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl"
IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\include;..\..\..\..\..\lib\windows\freetype\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
StringPooling="TRUE"
RuntimeLibrary="0"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\ftgl\ftgl_static_lib.pch"
AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\ftgl\"
ObjectFile="..\..\..\..\..\build\msvc_7\extern\ftgl\"
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\ftgl\"
WarningLevel="2"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\ftgl_static.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying FTGL files library to lib tree."
CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\ftgl\include\ MKDIR ..\..\..\..\..\build\msvc_7\extern\ftgl\include
XCOPY /Y ..\..\include\*.h ..\..\..\..\..\build\msvc_7\extern\ftgl\include
ECHO Done
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="3D Plugin Release|Win32"
OutputDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll"
IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\include;..\..\..\..\..\lib\windows\freetype\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\ftgl_static_lib.pch"
AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\"
ObjectFile="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\"
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\"
WarningLevel="2"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\ftgl_static.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying FTGL files library to lib tree."
CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\ftgl\include\ MKDIR ..\..\..\..\..\build\msvc_7\extern\ftgl\include
XCOPY /Y ..\..\include\*.h ..\..\..\..\..\build\msvc_7\extern\ftgl\include
ECHO Done
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="3D Plugin Debug|Win32"
OutputDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug"
IntermediateDirectory="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug"
ConfigurationType="4"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="FALSE"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\include;..\..\..\..\..\lib\windows\freetype\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="2"
PrecompiledHeaderFile="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug\ftgl_static_lib.pch"
AssemblerListingLocation="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug\"
ObjectFile="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug\"
ProgramDataBaseFileName="..\..\..\..\..\build\msvc_7\extern\ftgl\mtdll\debug\"
WarningLevel="2"
SuppressStartupBanner="TRUE"
DebugInformationFormat="3"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\..\build\msvc_7\libs\extern\mtdll\debug\ftgl_static.lib"
SuppressStartupBanner="TRUE"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"
Description="Copying FTGL files library (debug target) to lib tree."
CommandLine="ECHO Copying header files
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\ftgl\include\ MKDIR ..\..\..\..\..\build\msvc_7\extern\ftgl\include
XCOPY /Y ..\..\include\*.h ..\..\..\..\..\build\msvc_7\extern\ftgl\include
ECHO Done
"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\..\src\FTBitmapGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTCharmap.cpp">
</File>
<File
RelativePath="..\..\src\FTContour.cpp">
</File>
<File
RelativePath="..\..\src\FTExtrdGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTFace.cpp">
</File>
<File
RelativePath="..\..\src\FTFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLBitmapFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLExtrdFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLOutlineFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLPixmapFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLPolygonFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGLTextureFont.cpp">
</File>
<File
RelativePath="..\..\src\FTGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTGlyphContainer.cpp">
</File>
<File
RelativePath="..\..\src\FTLibrary.cpp">
</File>
<File
RelativePath="..\..\src\FTOutlineGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTPixmapGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTPoint.cpp">
</File>
<File
RelativePath="..\..\src\FTPolyGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTSize.cpp">
</File>
<File
RelativePath="..\..\src\FTTextureGlyph.cpp">
</File>
<File
RelativePath="..\..\src\FTVectoriser.cpp">
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\..\include\FTBBox.h">
</File>
<File
RelativePath="..\..\include\FTBitmapGlyph.h">
</File>
<File
RelativePath="..\..\include\FTCharmap.h">
</File>
<File
RelativePath="..\..\include\FTCharToGlyphIndexMap.h">
</File>
<File
RelativePath="..\..\include\FTContour.h">
</File>
<File
RelativePath="..\..\include\FTExtrdGlyph.h">
</File>
<File
RelativePath="..\..\include\FTFace.h">
</File>
<File
RelativePath="..\..\include\FTFont.h">
</File>
<File
RelativePath="..\..\include\FTGL.h">
</File>
<File
RelativePath="..\..\include\FTGLBitmapFont.h">
</File>
<File
RelativePath="..\..\include\FTGLExtrdFont.h">
</File>
<File
RelativePath="..\..\include\FTGLOutlineFont.h">
</File>
<File
RelativePath="..\..\include\FTGLPixmapFont.h">
</File>
<File
RelativePath="..\..\include\FTGLPolygonFont.h">
</File>
<File
RelativePath="..\..\include\FTGLTextureFont.h">
</File>
<File
RelativePath="..\..\include\FTGlyph.h">
</File>
<File
RelativePath="..\..\include\FTGlyphContainer.h">
</File>
<File
RelativePath="..\..\include\FTLibrary.h">
</File>
<File
RelativePath="..\..\include\FTList.h">
</File>
<File
RelativePath="..\..\include\FTOutlineGlyph.h">
</File>
<File
RelativePath="..\..\include\FTPixmapGlyph.h">
</File>
<File
RelativePath="..\..\include\FTPoint.h">
</File>
<File
RelativePath="..\..\include\FTPolyGlyph.h">
</File>
<File
RelativePath="..\..\include\FTSize.h">
</File>
<File
RelativePath="..\..\include\FTTextureGlyph.h">
</File>
<File
RelativePath="..\..\include\FTVector.h">
</File>
<File
RelativePath="..\..\include\FTVectoriser.h">
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,66 +0,0 @@
#include <string>
#include "FTBitmapGlyph.h"
FTBitmapGlyph::FTBitmapGlyph( FT_GlyphSlot glyph)
: FTGlyph( glyph),
destWidth(0),
destHeight(0),
data(0)
{
err = FT_Render_Glyph( glyph, FT_RENDER_MODE_MONO);
if( err || ft_glyph_format_bitmap != glyph->format)
{
return;
}
FT_Bitmap bitmap = glyph->bitmap;
unsigned int srcWidth = bitmap.width;
unsigned int srcHeight = bitmap.rows;
unsigned int srcPitch = bitmap.pitch;
destWidth = srcWidth;
destHeight = srcHeight;
destPitch = srcPitch;
if( destWidth && destHeight)
{
data = new unsigned char[destPitch * destHeight];
unsigned char* dest = data + (( destHeight - 1) * destPitch);
unsigned char* src = bitmap.buffer;
for( unsigned int y = 0; y < srcHeight; ++y)
{
memcpy( dest, src, srcPitch);
dest -= destPitch;
src += srcPitch;
}
}
pos.x = glyph->bitmap_left;
pos.y = static_cast<int>(srcHeight) - glyph->bitmap_top;
}
FTBitmapGlyph::~FTBitmapGlyph()
{
delete [] data;
}
float FTBitmapGlyph::Render( const FTPoint& pen)
{
if( data)
{
glBitmap( 0, 0, 0.0, 0.0, pen.x + pos.x, pen.y - pos.y, (const GLubyte*)0 );
glPixelStorei( GL_UNPACK_ROW_LENGTH, destPitch * 8);
glBitmap( destWidth, destHeight, 0.0f, 0.0, 0.0, 0.0, (const GLubyte*)data);
glBitmap( 0, 0, 0.0, 0.0, -pen.x - pos.x, -pen.y + pos.y, (const GLubyte*)0 );
}
return advance;
}

View File

@@ -1,59 +0,0 @@
#include "FTBufferGlyph.h"
FTBufferGlyph::FTBufferGlyph( FT_GlyphSlot glyph, unsigned char* b)
: FTGlyph( glyph),
destWidth(0),
destHeight(0),
data(0),
buffer(b)
{
err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL);
if( err || ft_glyph_format_bitmap != glyph->format)
{
return;
}
FT_Bitmap bitmap = glyph->bitmap;
unsigned int srcWidth = bitmap.width;
unsigned int srcHeight = bitmap.rows;
unsigned int srcPitch = bitmap.pitch;
destWidth = srcWidth;
destHeight = srcHeight;
destPitch = srcPitch;
if( destWidth && destHeight)
{
data = new unsigned char[destPitch * destHeight];
unsigned char* dest = data + (( destHeight - 1) * destPitch);
unsigned char* src = bitmap.buffer;
for( unsigned int y = 0; y < srcHeight; ++y)
{
memcpy( dest, src, srcPitch);
dest -= destPitch;
src += srcPitch;
}
}
pos.x = glyph->bitmap_left;
pos.y = srcHeight - glyph->bitmap_top;
}
FTBufferGlyph::~FTBufferGlyph()
{
delete [] data;
}
float FTBufferGlyph::Render( const FTPoint& pen)
{
if( data && buffer)
{
}
return advance;
}

View File

@@ -1,62 +0,0 @@
#include "FTFace.h"
#include "FTCharmap.h"
FTCharmap::FTCharmap( FTFace* face)
: ftFace( *(face->Face())),
err(0)
{
if( !ftFace->charmap)
{
err = FT_Set_Charmap( ftFace, ftFace->charmaps[0]);
}
ftEncoding = ftFace->charmap->encoding;
}
FTCharmap::~FTCharmap()
{
charMap.clear();
}
bool FTCharmap::CharMap( FT_Encoding encoding)
{
if( ftEncoding == encoding)
{
return true;
}
err = FT_Select_Charmap( ftFace, encoding );
if( !err)
{
ftEncoding = encoding;
}
else
{
ftEncoding = ft_encoding_none;
}
charMap.clear();
return !err;
}
unsigned int FTCharmap::GlyphListIndex( const unsigned int characterCode )
{
return charMap.find( characterCode);
}
unsigned int FTCharmap::FontIndex( const unsigned int characterCode )
{
return FT_Get_Char_Index( ftFace, characterCode);
}
void FTCharmap::InsertIndex( const unsigned int characterCode, const unsigned int containerIndex)
{
charMap.insert( characterCode, containerIndex);
}

View File

@@ -1,149 +0,0 @@
#include "FTContour.h"
static const float BEZIER_STEP_SIZE = 0.2f;
void FTContour::AddPoint( FTPoint point)
{
if( pointList.empty() || point != pointList[pointList.size() - 1])
{
pointList.push_back( point);
}
}
void FTContour::AddPoint( float x, float y)
{
AddPoint( FTPoint( x, y, 0.0f));
}
void FTContour::evaluateQuadraticCurve()
{
for( unsigned int i = 0; i <= ( 1.0f / BEZIER_STEP_SIZE); i++)
{
float bezierValues[2][2];
float t = static_cast<float>(i) * BEZIER_STEP_SIZE;
bezierValues[0][0] = (1.0f - t) * controlPoints[0][0] + t * controlPoints[1][0];
bezierValues[0][1] = (1.0f - t) * controlPoints[0][1] + t * controlPoints[1][1];
bezierValues[1][0] = (1.0f - t) * controlPoints[1][0] + t * controlPoints[2][0];
bezierValues[1][1] = (1.0f - t) * controlPoints[1][1] + t * controlPoints[2][1];
bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0];
bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1];
AddPoint( bezierValues[0][0], bezierValues[0][1]);
}
}
void FTContour::evaluateCubicCurve()
{
for( unsigned int i = 0; i <= ( 1.0f / BEZIER_STEP_SIZE); i++)
{
float bezierValues[3][2];
float t = static_cast<float>(i) * BEZIER_STEP_SIZE;
bezierValues[0][0] = (1.0f - t) * controlPoints[0][0] + t * controlPoints[1][0];
bezierValues[0][1] = (1.0f - t) * controlPoints[0][1] + t * controlPoints[1][1];
bezierValues[1][0] = (1.0f - t) * controlPoints[1][0] + t * controlPoints[2][0];
bezierValues[1][1] = (1.0f - t) * controlPoints[1][1] + t * controlPoints[2][1];
bezierValues[2][0] = (1.0f - t) * controlPoints[2][0] + t * controlPoints[3][0];
bezierValues[2][1] = (1.0f - t) * controlPoints[2][1] + t * controlPoints[3][1];
bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0];
bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1];
bezierValues[1][0] = (1.0f - t) * bezierValues[1][0] + t * bezierValues[2][0];
bezierValues[1][1] = (1.0f - t) * bezierValues[1][1] + t * bezierValues[2][1];
bezierValues[0][0] = (1.0f - t) * bezierValues[0][0] + t * bezierValues[1][0];
bezierValues[0][1] = (1.0f - t) * bezierValues[0][1] + t * bezierValues[1][1];
AddPoint( bezierValues[0][0], bezierValues[0][1]);
}
}
FTContour::FTContour( FT_Vector* contour, char* pointTags, unsigned int numberOfPoints)
{
for( unsigned int pointIndex = 0; pointIndex < numberOfPoints; ++ pointIndex)
{
char pointTag = pointTags[pointIndex];
if( pointTag == FT_Curve_Tag_On || numberOfPoints < 2)
{
AddPoint( contour[pointIndex].x, contour[pointIndex].y);
continue;
}
FTPoint controlPoint( contour[pointIndex]);
FTPoint previousPoint = ( 0 == pointIndex)
? FTPoint( contour[numberOfPoints - 1])
: pointList[pointList.size() - 1];
FTPoint nextPoint = ( pointIndex == numberOfPoints - 1)
? pointList[0]
: FTPoint( contour[pointIndex + 1]);
if( pointTag == FT_Curve_Tag_Conic)
{
char nextPointTag = ( pointIndex == numberOfPoints - 1)
? pointTags[0]
: pointTags[pointIndex + 1];
while( nextPointTag == FT_Curve_Tag_Conic)
{
nextPoint = FTPoint( static_cast<float>( controlPoint.x + nextPoint.x) * 0.5f,
static_cast<float>( controlPoint.y + nextPoint.y) * 0.5f,
0);
controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y;
controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y;
controlPoints[2][0] = nextPoint.x; controlPoints[2][1] = nextPoint.y;
evaluateQuadraticCurve();
++pointIndex;
previousPoint = nextPoint;
controlPoint = FTPoint( contour[pointIndex]);
nextPoint = ( pointIndex == numberOfPoints - 1)
? pointList[0]
: FTPoint( contour[pointIndex + 1]);
nextPointTag = ( pointIndex == numberOfPoints - 1)
? pointTags[0]
: pointTags[pointIndex + 1];
}
controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y;
controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y;
controlPoints[2][0] = nextPoint.x; controlPoints[2][1] = nextPoint.y;
evaluateQuadraticCurve();
continue;
}
if( pointTag == FT_Curve_Tag_Cubic)
{
FTPoint controlPoint2 = nextPoint;
FTPoint nextPoint = ( pointIndex == numberOfPoints - 2)
? pointList[0]
: FTPoint( contour[pointIndex + 2]);
controlPoints[0][0] = previousPoint.x; controlPoints[0][1] = previousPoint.y;
controlPoints[1][0] = controlPoint.x; controlPoints[1][1] = controlPoint.y;
controlPoints[2][0] = controlPoint2.x; controlPoints[2][1] = controlPoint2.y;
controlPoints[3][0] = nextPoint.x; controlPoints[3][1] = nextPoint.y;
evaluateCubicCurve();
++pointIndex;
continue;
}
}
}

View File

@@ -1,141 +0,0 @@
#include <math.h>
#include "FTExtrdGlyph.h"
#include "FTVectoriser.h"
FTExtrdGlyph::FTExtrdGlyph( FT_GlyphSlot glyph, float d)
: FTGlyph( glyph),
glList(0),
depth(d)
{
bBox.SetDepth( -depth);
if( ft_glyph_format_outline != glyph->format)
{
err = 0x14; // Invalid_Outline
return;
}
FTVectoriser vectoriser( glyph);
if ( ( vectoriser.ContourCount() < 1) || ( vectoriser.PointCount() < 3))
{
return;
}
unsigned int tesselationIndex;
glList = glGenLists(1);
glNewList( glList, GL_COMPILE);
vectoriser.MakeMesh( 1.0);
glNormal3d(0.0, 0.0, 1.0);
const FTMesh* mesh = vectoriser.GetMesh();
for( tesselationIndex = 0; tesselationIndex < mesh->TesselationCount(); ++tesselationIndex)
{
const FTTesselation* subMesh = mesh->Tesselation( tesselationIndex);
unsigned int polyonType = subMesh->PolygonType();
glBegin( polyonType);
for( unsigned int pointIndex = 0; pointIndex < subMesh->PointCount(); ++pointIndex)
{
glVertex3f( subMesh->Point( pointIndex).x / 64.0f,
subMesh->Point( pointIndex).y / 64.0f,
0.0f);
}
glEnd();
}
vectoriser.MakeMesh( -1.0);
glNormal3d(0.0, 0.0, -1.0);
mesh = vectoriser.GetMesh();
for( tesselationIndex = 0; tesselationIndex < mesh->TesselationCount(); ++tesselationIndex)
{
const FTTesselation* subMesh = mesh->Tesselation( tesselationIndex);
unsigned int polyonType = subMesh->PolygonType();
glBegin( polyonType);
for( unsigned int pointIndex = 0; pointIndex < subMesh->PointCount(); ++pointIndex)
{
glVertex3f( subMesh->Point( pointIndex).x / 64.0f,
subMesh->Point( pointIndex).y / 64.0f,
-depth);
}
glEnd();
}
int contourFlag = vectoriser.ContourFlag();
for( size_t c = 0; c < vectoriser.ContourCount(); ++c)
{
const FTContour* contour = vectoriser.Contour(c);
unsigned int numberOfPoints = contour->PointCount();
glBegin( GL_QUAD_STRIP);
for( unsigned int j = 0; j <= numberOfPoints; ++j)
{
unsigned int index = ( j == numberOfPoints) ? 0 : j;
unsigned int nextIndex = ( index == numberOfPoints - 1) ? 0 : index + 1;
FTPoint normal = GetNormal( contour->Point(index), contour->Point(nextIndex));
glNormal3f( normal.x, normal.y, 0.0f);
if( contourFlag & ft_outline_reverse_fill)
{
glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, 0.0f);
glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, -depth);
}
else
{
glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, -depth);
glVertex3f( contour->Point(index).x / 64.0f, contour->Point(index).y / 64.0f, 0.0f);
}
}
glEnd();
}
glEndList();
}
FTExtrdGlyph::~FTExtrdGlyph()
{
glDeleteLists( glList, 1);
}
float FTExtrdGlyph::Render( const FTPoint& pen)
{
if( glList)
{
glTranslatef( pen.x, pen.y, 0);
glCallList( glList);
glTranslatef( -pen.x, -pen.y, 0);
}
return advance;
}
FTPoint FTExtrdGlyph::GetNormal( const FTPoint &a, const FTPoint &b)
{
float vectorX = a.x - b.x;
float vectorY = a.y - b.y;
float length = sqrt( vectorX * vectorX + vectorY * vectorY );
if( length > 0.0f)
{
length = 1 / length;
}
else
{
length = 0.0f;
}
return FTPoint( -vectorY * length,
vectorX * length,
0.0f);
}

View File

@@ -1,154 +0,0 @@
#include "FTFace.h"
#include "FTLibrary.h"
#include FT_TRUETYPE_TABLES_H
FTFace::FTFace( const char* filename)
: numGlyphs(0),
fontEncodingList(0),
err(0)
{
const FT_Long DEFAULT_FACE_INDEX = 0;
ftFace = new FT_Face;
err = FT_New_Face( *FTLibrary::Instance().GetLibrary(), filename, DEFAULT_FACE_INDEX, ftFace);
if( err)
{
delete ftFace;
ftFace = 0;
}
else
{
numGlyphs = (*ftFace)->num_glyphs;
}
}
FTFace::FTFace( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: numGlyphs(0),
err(0)
{
const FT_Long DEFAULT_FACE_INDEX = 0;
ftFace = new FT_Face;
err = FT_New_Memory_Face( *FTLibrary::Instance().GetLibrary(), (FT_Byte *)pBufferBytes, bufferSizeInBytes, DEFAULT_FACE_INDEX, ftFace);
if( err)
{
delete ftFace;
ftFace = 0;
}
else
{
numGlyphs = (*ftFace)->num_glyphs;
}
}
FTFace::~FTFace()
{
Close();
}
bool FTFace::Attach( const char* filename)
{
err = FT_Attach_File( *ftFace, filename);
return !err;
}
bool FTFace::Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
{
FT_Open_Args open;
open.flags = FT_OPEN_MEMORY;
open.memory_base = (FT_Byte *)pBufferBytes;
open.memory_size = bufferSizeInBytes;
err = FT_Attach_Stream( *ftFace, &open);
return !err;
}
void FTFace::Close()
{
if( ftFace)
{
FT_Done_Face( *ftFace);
delete ftFace;
ftFace = 0;
}
}
const FTSize& FTFace::Size( const unsigned int size, const unsigned int res)
{
charSize.CharSize( ftFace, size, res, res);
err = charSize.Error();
return charSize;
}
unsigned int FTFace::CharMapCount()
{
return (*ftFace)->num_charmaps;
}
FT_Encoding* FTFace::CharMapList()
{
if( 0 == fontEncodingList)
{
fontEncodingList = new FT_Encoding[CharMapCount()];
for( size_t encodingIndex = 0; encodingIndex < CharMapCount(); ++encodingIndex)
{
fontEncodingList[encodingIndex] = (*ftFace)->charmaps[encodingIndex]->encoding;
}
}
return fontEncodingList;
}
unsigned int FTFace::UnitsPerEM() const
{
return (*ftFace)->units_per_EM;
}
FTPoint FTFace::KernAdvance( unsigned int index1, unsigned int index2)
{
float x, y;
x = y = 0.0f;
if( FT_HAS_KERNING((*ftFace)) && index1 && index2)
{
FT_Vector kernAdvance;
kernAdvance.x = kernAdvance.y = 0;
err = FT_Get_Kerning( *ftFace, index1, index2, ft_kerning_unfitted, &kernAdvance);
if( !err)
{
x = static_cast<float>( kernAdvance.x) / 64.0f;
y = static_cast<float>( kernAdvance.y) / 64.0f;
}
}
return FTPoint( x, y, 0.0);
}
FT_GlyphSlot FTFace::Glyph( unsigned int index, FT_Int load_flags)
{
err = FT_Load_Glyph( *ftFace, index, load_flags);
if( err)
{
return NULL;
}
return (*ftFace)->glyph;
}

View File

@@ -1,271 +0,0 @@
#include "FTFace.h"
#include "FTFont.h"
#include "FTGlyphContainer.h"
#include "FTBBox.h"
FTFont::FTFont( const char* fontname)
: face( fontname),
glyphList(0)
{
err = face.Error();
if( err == 0)
{
glyphList = new FTGlyphContainer( &face);
}
}
FTFont::FTFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: face( pBufferBytes, bufferSizeInBytes),
glyphList(0)
{
err = face.Error();
if( err == 0)
{
glyphList = new FTGlyphContainer( &face);
}
}
FTFont::~FTFont()
{
delete glyphList;
}
bool FTFont::Attach( const char* filename)
{
if( face.Attach( filename))
{
err = 0;
return true;
}
else
{
err = face.Error();
return false;
}
}
bool FTFont::Attach( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
{
if( face.Attach( pBufferBytes, bufferSizeInBytes))
{
err = 0;
return true;
}
else
{
err = face.Error();
return false;
}
}
bool FTFont::FaceSize( const unsigned int size, const unsigned int res )
{
charSize = face.Size( size, res);
if( face.Error())
{
return false;
}
if( glyphList != NULL)
{
delete glyphList;
}
glyphList = new FTGlyphContainer( &face);
return true;
}
unsigned int FTFont::FaceSize() const
{
return charSize.CharSize();
}
bool FTFont::CharMap( FT_Encoding encoding)
{
bool result = glyphList->CharMap( encoding);
err = glyphList->Error();
return result;
}
unsigned int FTFont::CharMapCount()
{
return face.CharMapCount();
}
FT_Encoding* FTFont::CharMapList()
{
return face.CharMapList();
}
float FTFont::Ascender() const
{
return charSize.Ascender();
}
float FTFont::Descender() const
{
return charSize.Descender();
}
void FTFont::BBox( const char* string,
float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
{
FTBBox totalBBox;
if((NULL != string) && ('\0' != *string))
{
const unsigned char* c = (unsigned char*)string;
CheckGlyph( *c);
totalBBox = glyphList->BBox( *c);
float advance = glyphList->Advance( *c, *(c + 1));
++c;
while( *c)
{
CheckGlyph( *c);
FTBBox tempBBox = glyphList->BBox( *c);
tempBBox.Move( FTPoint( advance, 0.0f, 0.0f));
totalBBox += tempBBox;
advance += glyphList->Advance( *c, *(c + 1));
++c;
}
}
llx = totalBBox.lowerX;
lly = totalBBox.lowerY;
llz = totalBBox.lowerZ;
urx = totalBBox.upperX;
ury = totalBBox.upperY;
urz = totalBBox.upperZ;
}
void FTFont::BBox( const wchar_t* string,
float& llx, float& lly, float& llz, float& urx, float& ury, float& urz)
{
FTBBox totalBBox;
if((NULL != string) && ('\0' != *string))
{
const wchar_t* c = string;
CheckGlyph( *c);
totalBBox = glyphList->BBox( *c);
float advance = glyphList->Advance( *c, *(c + 1));
++c;
while( *c)
{
CheckGlyph( *c);
FTBBox tempBBox = glyphList->BBox( *c);
tempBBox.Move( FTPoint( advance, 0.0f, 0.0f));
totalBBox += tempBBox;
advance += glyphList->Advance( *c, *(c + 1));
++c;
}
}
llx = totalBBox.lowerX;
lly = totalBBox.lowerY;
llz = totalBBox.lowerZ;
urx = totalBBox.upperX;
ury = totalBBox.upperY;
urz = totalBBox.upperZ;
}
float FTFont::Advance( const wchar_t* string)
{
const wchar_t* c = string;
float width = 0.0f;
while( *c)
{
CheckGlyph( *c);
width += glyphList->Advance( *c, *(c + 1));
++c;
}
return width;
}
float FTFont::Advance( const char* string)
{
const unsigned char* c = (unsigned char*)string;
float width = 0.0f;
while( *c)
{
CheckGlyph( *c);
width += glyphList->Advance( *c, *(c + 1));
++c;
}
return width;
}
void FTFont::Render( const char* string )
{
const unsigned char* c = (unsigned char*)string;
pen.x = 0; pen.y = 0;
while( *c)
{
DoRender( *c, *(c + 1));
++c;
}
}
void FTFont::Render( const wchar_t* string )
{
const wchar_t* c = string;
pen.x = 0; pen.y = 0;
while( *c)
{
DoRender( *c, *(c + 1));
++c;
}
}
void FTFont::DoRender( const unsigned int chr, const unsigned int nextChr)
{
CheckGlyph( chr);
FTPoint kernAdvance = glyphList->Render( chr, nextChr, pen);
pen.x += kernAdvance.x;
pen.y += kernAdvance.y;
}
void FTFont::CheckGlyph( const unsigned int characterCode)
{
if( NULL == glyphList->Glyph( characterCode))
{
unsigned int glyphIndex = glyphList->FontIndex( characterCode);
glyphList->Add( MakeGlyph( glyphIndex), characterCode);
}
}

View File

@@ -1,66 +0,0 @@
#include "FTGLBitmapFont.h"
#include "FTBitmapGlyph.h"
FTGLBitmapFont::FTGLBitmapFont( const char* fontname)
: FTFont( fontname)
{}
FTGLBitmapFont::FTGLBitmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes)
{}
FTGLBitmapFont::~FTGLBitmapFont()
{}
FTGlyph* FTGLBitmapFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_DEFAULT);
if( ftGlyph)
{
FTBitmapGlyph* tempGlyph = new FTBitmapGlyph( ftGlyph);
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLBitmapFont::Render( const char* string)
{
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glPushAttrib( GL_ENABLE_BIT);
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
glDisable( GL_BLEND);
FTFont::Render( string);
glPopAttrib();
glPopClientAttrib();
}
void FTGLBitmapFont::Render( const wchar_t* string)
{
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glPushAttrib( GL_ENABLE_BIT);
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
glDisable( GL_BLEND);
FTFont::Render( string);
glPopAttrib();
glPopClientAttrib();
}

View File

@@ -1,53 +0,0 @@
#include "FTGLBufferFont.h"
#include "FTBufferGlyph.h"
FTGLBufferFont::FTGLBufferFont( const char* fontname)
: FTFont( fontname),
buffer(0)
{}
FTGLBufferFont::FTGLBufferFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes),
buffer(0)
{}
FTGLBufferFont::~FTGLBufferFont()
{}
FTGlyph* FTGLBufferFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
FTBufferGlyph* tempGlyph = new FTBufferGlyph( ftGlyph, buffer);
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLBufferFont::Render( const char* string)
{
if( NULL != buffer)
{
FTFont::Render( string);
}
}
void FTGLBufferFont::Render( const wchar_t* string)
{
if( NULL != buffer)
{
FTFont::Render( string);
}
}

View File

@@ -1,35 +0,0 @@
#include "FTGLExtrdFont.h"
#include "FTExtrdGlyph.h"
FTGLExtrdFont::FTGLExtrdFont( const char* fontname)
: FTFont( fontname),
depth( 0.0f)
{}
FTGLExtrdFont::FTGLExtrdFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes),
depth( 0.0f)
{}
FTGLExtrdFont::~FTGLExtrdFont()
{}
FTGlyph* FTGLExtrdFont::MakeGlyph( unsigned int glyphIndex)
{
FT_GlyphSlot ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
FTExtrdGlyph* tempGlyph = new FTExtrdGlyph( ftGlyph, depth);
return tempGlyph;
}
err = face.Error();
return NULL;
}

View File

@@ -1,66 +0,0 @@
#include "FTGLOutlineFont.h"
#include "FTOutlineGlyph.h"
FTGLOutlineFont::FTGLOutlineFont( const char* fontname)
: FTFont( fontname)
{}
FTGLOutlineFont::FTGLOutlineFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes)
{}
FTGLOutlineFont::~FTGLOutlineFont()
{}
FTGlyph* FTGLOutlineFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
FTOutlineGlyph* tempGlyph = new FTOutlineGlyph( ftGlyph);
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLOutlineFont::Render( const char* string)
{
glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
glDisable( GL_TEXTURE_2D);
glEnable( GL_LINE_SMOOTH);
glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
FTFont::Render( string);
glPopAttrib();
}
void FTGLOutlineFont::Render( const wchar_t* string)
{
glPushAttrib( GL_ENABLE_BIT | GL_HINT_BIT | GL_LINE_BIT | GL_COLOR_BUFFER_BIT);
glDisable( GL_TEXTURE_2D);
glEnable( GL_LINE_SMOOTH);
glHint( GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
FTFont::Render( string);
glPopAttrib();
}

View File

@@ -1,68 +0,0 @@
#include "FTGLPixmapFont.h"
#include "FTPixmapGlyph.h"
FTGLPixmapFont::FTGLPixmapFont( const char* fontname)
: FTFont( fontname)
{}
FTGLPixmapFont::FTGLPixmapFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes)
{}
FTGLPixmapFont::~FTGLPixmapFont()
{}
FTGlyph* FTGLPixmapFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP);
if( ftGlyph)
{
FTPixmapGlyph* tempGlyph = new FTPixmapGlyph( ftGlyph);
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLPixmapFont::Render( const char* string)
{
glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT);
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable( GL_TEXTURE_2D);
FTFont::Render( string);
glPopClientAttrib();
glPopAttrib();
}
void FTGLPixmapFont::Render( const wchar_t* string)
{
//glPushAttrib( GL_ENABLE_BIT | GL_PIXEL_MODE_BIT | GL_COLOR_BUFFER_BIT);
// glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glDisable( GL_TEXTURE_2D);
FTFont::Render( string);
glDisable(GL_BLEND);
// glPopClientAttrib();
// glPopAttrib();
}

View File

@@ -1,33 +0,0 @@
#include "FTGLPolygonFont.h"
#include "FTPolyGlyph.h"
FTGLPolygonFont::FTGLPolygonFont( const char* fontname)
: FTFont( fontname)
{}
FTGLPolygonFont::FTGLPolygonFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes)
{}
FTGLPolygonFont::~FTGLPolygonFont()
{}
FTGlyph* FTGLPolygonFont::MakeGlyph( unsigned int g)
{
FT_GlyphSlot ftGlyph = face.Glyph( g, FT_LOAD_NO_HINTING);
if( ftGlyph)
{
FTPolyGlyph* tempGlyph = new FTPolyGlyph( ftGlyph);
return tempGlyph;
}
err = face.Error();
return NULL;
}

View File

@@ -1,178 +0,0 @@
#include <string> // For memset
#include "FTGLTextureFont.h"
#include "FTTextureGlyph.h"
inline GLuint NextPowerOf2( GLuint in)
{
in -= 1;
in |= in >> 16;
in |= in >> 8;
in |= in >> 4;
in |= in >> 2;
in |= in >> 1;
return in + 1;
}
FTGLTextureFont::FTGLTextureFont( const char* fontname)
: FTFont( fontname),
maxTextSize(0),
textureWidth(0),
textureHeight(0),
glyphHeight(0),
glyphWidth(0),
padding(3),
xOffset(0),
yOffset(0)
{
remGlyphs = numGlyphs = face.GlyphCount();
}
FTGLTextureFont::FTGLTextureFont( const unsigned char *pBufferBytes, size_t bufferSizeInBytes)
: FTFont( pBufferBytes, bufferSizeInBytes),
maxTextSize(0),
textureWidth(0),
textureHeight(0),
glyphHeight(0),
glyphWidth(0),
padding(3),
xOffset(0),
yOffset(0)
{
remGlyphs = numGlyphs = face.GlyphCount();
}
FTGLTextureFont::~FTGLTextureFont()
{
glDeleteTextures( textureIDList.size(), (const GLuint*)&textureIDList[0]);
}
FTGlyph* FTGLTextureFont::MakeGlyph( unsigned int glyphIndex)
{
FT_GlyphSlot ftGlyph = face.Glyph( glyphIndex, FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP);
if( ftGlyph)
{
glyphHeight = static_cast<int>( charSize.Height());
glyphWidth = static_cast<int>( charSize.Width());
if( textureIDList.empty())
{
textureIDList.push_back( CreateTexture());
xOffset = yOffset = padding;
}
if( xOffset > ( textureWidth - glyphWidth))
{
xOffset = padding;
yOffset += glyphHeight;
if( yOffset > ( textureHeight - glyphHeight))
{
textureIDList.push_back( CreateTexture());
yOffset = padding;
}
}
FTTextureGlyph* tempGlyph = new FTTextureGlyph( ftGlyph, textureIDList[textureIDList.size() - 1],
xOffset, yOffset, textureWidth, textureHeight);
xOffset += static_cast<int>( tempGlyph->BBox().upperX - tempGlyph->BBox().lowerX + padding);
--remGlyphs;
return tempGlyph;
}
err = face.Error();
return NULL;
}
void FTGLTextureFont::CalculateTextureSize()
{
if( !maxTextSize)
{
glGetIntegerv( GL_MAX_TEXTURE_SIZE, (GLint*)&maxTextSize);
}
textureWidth = NextPowerOf2( (remGlyphs * glyphWidth) + ( padding * 2));
if( textureWidth > maxTextSize)
{
textureWidth = maxTextSize;
}
int h = static_cast<int>( (textureWidth - ( padding * 2)) / glyphWidth);
textureHeight = NextPowerOf2( (( numGlyphs / h) + 1) * glyphHeight);
textureHeight = textureHeight > maxTextSize ? maxTextSize : textureHeight;
}
GLuint FTGLTextureFont::CreateTexture()
{
CalculateTextureSize();
int totalMemory = textureWidth * textureHeight;
unsigned char* textureMemory = new unsigned char[totalMemory];
memset( textureMemory, 0, totalMemory);
GLuint textID;
glGenTextures( 1, (GLuint*)&textID);
glBindTexture( GL_TEXTURE_2D, textID);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D( GL_TEXTURE_2D, 0, GL_ALPHA, textureWidth, textureHeight, 0, GL_ALPHA, GL_UNSIGNED_BYTE, textureMemory);
delete [] textureMemory;
return textID;
}
bool FTGLTextureFont::FaceSize( const unsigned int size, const unsigned int res)
{
if( !textureIDList.empty())
{
glDeleteTextures( textureIDList.size(), (const GLuint*)&textureIDList[0]);
remGlyphs = numGlyphs = face.GlyphCount();
}
return FTFont::FaceSize( size, res);
}
void FTGLTextureFont::Render( const char* string)
{
// glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
FTFont::Render( string);
// glPopAttrib();
}
void FTGLTextureFont::Render( const wchar_t* string)
{
// glPushAttrib( GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT);
glEnable(GL_BLEND);
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // GL_ONE
FTFont::Render( string);
// glPopAttrib();
}

View File

@@ -1,17 +0,0 @@
#include "FTGlyph.h"
FTGlyph::FTGlyph( FT_GlyphSlot glyph)
: advance(0.0f),
err(0)
{
if( glyph)
{
bBox = FTBBox( glyph);
advance = static_cast<float>( glyph->advance.x) / 64.0f;
}
}
FTGlyph::~FTGlyph()
{}

View File

@@ -1,93 +0,0 @@
#include "FTGlyphContainer.h"
#include "FTGlyph.h"
#include "FTFace.h"
#include "FTCharmap.h"
FTGlyphContainer::FTGlyphContainer( FTFace* f)
: face(f),
err(0)
{
glyphs.push_back( NULL);
charMap = new FTCharmap( face);
}
FTGlyphContainer::~FTGlyphContainer()
{
GlyphVector::iterator glyphIterator;
for( glyphIterator = glyphs.begin(); glyphIterator != glyphs.end(); ++glyphIterator)
{
delete *glyphIterator;
}
glyphs.clear();
delete charMap;
}
bool FTGlyphContainer::CharMap( FT_Encoding encoding)
{
bool result = charMap->CharMap( encoding);
err = charMap->Error();
return result;
}
unsigned int FTGlyphContainer::FontIndex( const unsigned int characterCode) const
{
return charMap->FontIndex( characterCode);
}
void FTGlyphContainer::Add( FTGlyph* tempGlyph, const unsigned int characterCode)
{
charMap->InsertIndex( characterCode, glyphs.size());
glyphs.push_back( tempGlyph);
}
const FTGlyph* const FTGlyphContainer::Glyph( const unsigned int characterCode) const
{
signed int index = charMap->GlyphListIndex( characterCode);
return glyphs[index];
}
FTBBox FTGlyphContainer::BBox( const unsigned int characterCode) const
{
return glyphs[charMap->GlyphListIndex( characterCode)]->BBox();
}
float FTGlyphContainer::Advance( const unsigned int characterCode, const unsigned int nextCharacterCode)
{
unsigned int left = charMap->FontIndex( characterCode);
unsigned int right = charMap->FontIndex( nextCharacterCode);
float width = face->KernAdvance( left, right).x;
width += glyphs[charMap->GlyphListIndex( characterCode)]->Advance();
return width;
}
FTPoint FTGlyphContainer::Render( const unsigned int characterCode, const unsigned int nextCharacterCode, FTPoint penPosition)
{
FTPoint kernAdvance;
float advance = 0;
unsigned int left = charMap->FontIndex( characterCode);
unsigned int right = charMap->FontIndex( nextCharacterCode);
kernAdvance = face->KernAdvance( left, right);
if( !face->Error())
{
advance = glyphs[charMap->GlyphListIndex( characterCode)]->Render( penPosition);
}
kernAdvance.x = advance + kernAdvance.x;
// kernAdvance.y = advance.y + kernAdvance.y;
return kernAdvance;
}

View File

@@ -1,64 +0,0 @@
#include "FTLibrary.h"
FTLibrary& FTLibrary::Instance()
{
static FTLibrary ftlib;
return ftlib;
}
FTLibrary::~FTLibrary()
{
if( library != 0)
{
FT_Done_FreeType( *library);
delete library;
library= 0;
}
// if( manager != 0)
// {
// FTC_Manager_Done( manager );
//
// delete manager;
// manager= 0;
// }
}
FTLibrary::FTLibrary()
: library(0),
err(0)
{
Initialise();
}
bool FTLibrary::Initialise()
{
if( library != 0)
return true;
library = new FT_Library;
err = FT_Init_FreeType( library);
if( err)
{
delete library;
library = 0;
return false;
}
// FTC_Manager* manager;
//
// if( FTC_Manager_New( lib, 0, 0, 0, my_face_requester, 0, manager )
// {
// delete manager;
// manager= 0;
// return false;
// }
return true;
}

View File

@@ -1,57 +0,0 @@
#include "FTOutlineGlyph.h"
#include "FTVectoriser.h"
FTOutlineGlyph::FTOutlineGlyph( FT_GlyphSlot glyph)
: FTGlyph( glyph),
glList(0)
{
if( ft_glyph_format_outline != glyph->format)
{
err = 0x14; // Invalid_Outline
return;
}
FTVectoriser vectoriser( glyph);
size_t numContours = vectoriser.ContourCount();
if ( ( numContours < 1) || ( vectoriser.PointCount() < 3))
{
return;
}
glList = glGenLists(1);
glNewList( glList, GL_COMPILE);
for( unsigned int c = 0; c < numContours; ++c)
{
const FTContour* contour = vectoriser.Contour(c);
glBegin( GL_LINE_LOOP);
for( unsigned int p = 0; p < contour->PointCount(); ++p)
{
glVertex2f( contour->Point(p).x / 64.0f, contour->Point(p).y / 64.0f);
}
glEnd();
}
glEndList();
}
FTOutlineGlyph::~FTOutlineGlyph()
{
glDeleteLists( glList, 1);
}
float FTOutlineGlyph::Render( const FTPoint& pen)
{
if( glList)
{
glTranslatef( pen.x, pen.y, 0);
glCallList( glList);
glTranslatef( -pen.x, -pen.y, 0);
}
return advance;
}

View File

@@ -1,109 +0,0 @@
#include "FTPixmapGlyph.h"
FTPixmapGlyph::FTPixmapGlyph( FT_GlyphSlot glyph)
: FTGlyph( glyph),
destWidth(0),
destHeight(0),
data(0)
{
err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL);
if( err || ft_glyph_format_bitmap != glyph->format)
{
return;
}
FT_Bitmap bitmap = glyph->bitmap;
//check the pixel mode
//ft_pixel_mode_grays
int srcWidth = bitmap.width;
int srcHeight = bitmap.rows;
// FIXME What about dest alignment?
destWidth = srcWidth;
destHeight = srcHeight;
if( destWidth && destHeight)
{
data = new unsigned char[destWidth * destHeight * 4];
// Get the current glColor.
float ftglColour[4];
// glGetFloatv( GL_CURRENT_COLOR, ftglColour);
ftglColour[0] = ftglColour[1] = ftglColour[2] = ftglColour[3] = 1.0;
unsigned char redComponent = static_cast<unsigned char>( ftglColour[0] * 255.0f);
unsigned char greenComponent = static_cast<unsigned char>( ftglColour[1] * 255.0f);
unsigned char blueComponent = static_cast<unsigned char>( ftglColour[2] * 255.0f);
unsigned char* src = bitmap.buffer;
unsigned char* dest = data + ((destHeight - 1) * destWidth) * 4;
size_t destStep = destWidth * 4 * 2;
if( ftglColour[3] == 1.0f)
{
for( int y = 0; y < srcHeight; ++y)
{
for( int x = 0; x < srcWidth; ++x)
{
*dest++ = redComponent;
*dest++ = greenComponent;
*dest++ = blueComponent;
*dest++ = *src++;
}
dest -= destStep;
}
}
else
{
for( int y = 0; y < srcHeight; ++y)
{
for( int x = 0; x < srcWidth; ++x)
{
*dest++ = redComponent;
*dest++ = greenComponent;
*dest++ = blueComponent;
*dest++ = static_cast<unsigned char>(ftglColour[3] * *src++);
}
dest -= destStep;
}
}
destHeight = srcHeight;
}
pos.x = glyph->bitmap_left;
pos.y = srcHeight - glyph->bitmap_top;
}
FTPixmapGlyph::~FTPixmapGlyph()
{
delete [] data;
}
#include <math.h>
float FTPixmapGlyph::Render( const FTPoint& pen)
{
if( data)
{
float dx, dy;
dx= floor( (pen.x + pos.x ) );
dy= ( (pen.y - pos.y ) );
// Move the glyph origin
glBitmap( 0, 0, 0.0f, 0.0f, dx, dy, (const GLubyte*)0);
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0);
glDrawPixels( destWidth, destHeight, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid*)data);
// Restore the glyph origin
glBitmap( 0, 0, 0.0f, 0.0f, -dx, -dy, (const GLubyte*)0);
}
return advance;
}

View File

@@ -1,14 +0,0 @@
#include "FTPoint.h"
bool operator == ( const FTPoint &a, const FTPoint &b)
{
return((a.x == b.x) && (a.y == b.y) && (a.z == b.z));
}
bool operator != ( const FTPoint &a, const FTPoint &b)
{
return((a.x != b.x) || (a.y != b.y) || (a.z != b.z));
}

View File

@@ -1,62 +0,0 @@
#include "FTPolyGlyph.h"
#include "FTVectoriser.h"
FTPolyGlyph::FTPolyGlyph( FT_GlyphSlot glyph)
: FTGlyph( glyph),
glList(0)
{
if( ft_glyph_format_outline != glyph->format)
{
err = 0x14; // Invalid_Outline
return;
}
FTVectoriser vectoriser( glyph);
if(( vectoriser.ContourCount() < 1) || ( vectoriser.PointCount() < 3))
{
return;
}
vectoriser.MakeMesh( 1.0);
glList = glGenLists( 1);
glNewList( glList, GL_COMPILE);
const FTMesh* mesh = vectoriser.GetMesh();
for( unsigned int index = 0; index < mesh->TesselationCount(); ++index)
{
const FTTesselation* subMesh = mesh->Tesselation( index);
unsigned int polyonType = subMesh->PolygonType();
glBegin( polyonType);
for( unsigned int x = 0; x < subMesh->PointCount(); ++x)
{
glVertex3f( subMesh->Point(x).x / 64.0f,
subMesh->Point(x).y / 64.0f,
0.0f);
}
glEnd();
}
glEndList();
}
FTPolyGlyph::~FTPolyGlyph()
{
glDeleteLists( glList, 1);
}
float FTPolyGlyph::Render( const FTPoint& pen)
{
if( glList)
{
glTranslatef( pen.x, pen.y, 0);
glCallList( glList);
glTranslatef( -pen.x, -pen.y, 0);
}
return advance;
}

View File

@@ -1,105 +0,0 @@
#include "FTSize.h"
FTSize::FTSize()
: ftFace(0),
ftSize(0),
size(0),
err(0)
{}
FTSize::~FTSize()
{}
bool FTSize::CharSize( FT_Face* face, unsigned int point_size, unsigned int x_resolution, unsigned int y_resolution )
{
err = FT_Set_Char_Size( *face, 0L, point_size * 64, x_resolution, y_resolution);
if( !err)
{
ftFace = face;
size = point_size;
ftSize = (*ftFace)->size;
}
else
{
ftFace = 0;
size = 0;
ftSize = 0;
}
return !err;
}
unsigned int FTSize::CharSize() const
{
return size;
}
float FTSize::Ascender() const
{
return ftSize == 0 ? 0.0f : static_cast<float>( ftSize->metrics.ascender) / 64.0f;
}
float FTSize::Descender() const
{
return ftSize == 0 ? 0.0f : static_cast<float>( ftSize->metrics.descender) / 64.0f;
}
float FTSize::Height() const
{
if( 0 == ftSize)
{
return 0.0f;
}
if( FT_IS_SCALABLE((*ftFace)))
{
return ( (*ftFace)->bbox.yMax - (*ftFace)->bbox.yMin) * ( (float)ftSize->metrics.y_ppem / (float)(*ftFace)->units_per_EM);
}
else
{
return static_cast<float>( ftSize->metrics.height) / 64.0f;
}
}
float FTSize::Width() const
{
if( 0 == ftSize)
{
return 0.0f;
}
if( FT_IS_SCALABLE((*ftFace)))
{
return ( (*ftFace)->bbox.xMax - (*ftFace)->bbox.xMin) * ( static_cast<float>(ftSize->metrics.x_ppem) / static_cast<float>((*ftFace)->units_per_EM));
}
else
{
return static_cast<float>( ftSize->metrics.max_advance) / 64.0f;
}
}
float FTSize::Underline() const
{
return 0.0f;
}
unsigned int FTSize::XPixelsPerEm() const
{
return ftSize == 0 ? 0 : ftSize->metrics.x_ppem;
}
unsigned int FTSize::YPixelsPerEm() const
{
return ftSize == 0 ? 0 : ftSize->metrics.y_ppem;
}

View File

@@ -1,87 +0,0 @@
#include "FTTextureGlyph.h"
FTTextureGlyph::FTTextureGlyph( FT_GlyphSlot glyph, int id, int xOffset, int yOffset, GLsizei width, GLsizei height)
: FTGlyph( glyph),
destWidth(0),
destHeight(0),
glTextureID(id),
activeTextureID(0)
{
err = FT_Render_Glyph( glyph, FT_RENDER_MODE_NORMAL);
if( err || glyph->format != ft_glyph_format_bitmap)
{
return;
}
FT_Bitmap bitmap = glyph->bitmap;
destWidth = bitmap.width;
destHeight = bitmap.rows;
if( destWidth && destHeight)
{
glPushClientAttrib( GL_CLIENT_PIXEL_STORE_BIT);
glPixelStorei( GL_UNPACK_LSB_FIRST, GL_FALSE);
glPixelStorei( GL_UNPACK_ROW_LENGTH, 0);
glPixelStorei( GL_UNPACK_ALIGNMENT, 1);
glBindTexture( GL_TEXTURE_2D, glTextureID);
glTexSubImage2D( GL_TEXTURE_2D, 0, xOffset, yOffset, destWidth, destHeight, GL_ALPHA, GL_UNSIGNED_BYTE, bitmap.buffer);
glPopClientAttrib();
}
// 0
// +----+
// | |
// | |
// | |
// +----+
// 1
uv[0].x = static_cast<float>(xOffset) / static_cast<float>(width);
uv[0].y = static_cast<float>(yOffset) / static_cast<float>(height);
uv[1].x = static_cast<float>( xOffset + destWidth) / static_cast<float>(width);
uv[1].y = static_cast<float>( yOffset + destHeight) / static_cast<float>(height);
pos.x = glyph->bitmap_left;
pos.y = glyph->bitmap_top;
}
FTTextureGlyph::~FTTextureGlyph()
{}
#include <math.h>
float FTTextureGlyph::Render( const FTPoint& pen)
{
float dx;
glGetIntegerv( GL_TEXTURE_2D_BINDING_EXT, &activeTextureID);
if( activeTextureID != glTextureID)
{
glBindTexture( GL_TEXTURE_2D, (GLuint)glTextureID);
}
dx= floor( (pen.x + pos.x ) );
glBegin( GL_QUADS);
glTexCoord2f( uv[0].x, uv[0].y);
glVertex2f( dx, pen.y + pos.y);
glTexCoord2f( uv[0].x, uv[1].y);
glVertex2f( dx, pen.y + pos.y - destHeight);
glTexCoord2f( uv[1].x, uv[1].y);
glVertex2f( dx + destWidth, pen.y + pos.y - destHeight);
glTexCoord2f( uv[1].x, uv[0].y);
glVertex2f( dx + destWidth, pen.y + pos.y);
glEnd();
return advance;
}

View File

@@ -1,229 +0,0 @@
#include "FTVectoriser.h"
#include "FTGL.h"
#ifndef CALLBACK
#define CALLBACK
#endif
#if defined(__APPLE_CC__)
#if __APPLE_CC__ >= 5465
typedef GLvoid (*GLUTesselatorFunction)();
#else
typedef GLvoid (*GLUTesselatorFunction)(...);
#endif
#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__)
typedef GLvoid (*GLUTesselatorFunction)();
#elif defined ( WIN32)
typedef GLvoid (CALLBACK *GLUTesselatorFunction)( );
#else
#error "Error - need to define type GLUTesselatorFunction for this platform/compiler"
#endif
void CALLBACK ftglError( GLenum errCode, FTMesh* mesh)
{
mesh->Error( errCode);
}
void CALLBACK ftglVertex( void* data, FTMesh* mesh)
{
FTGL_DOUBLE* vertex = static_cast<FTGL_DOUBLE*>(data);
mesh->AddPoint( vertex[0], vertex[1], vertex[2]);
}
void CALLBACK ftglCombine( FTGL_DOUBLE coords[3], void* vertex_data[4], GLfloat weight[4], void** outData, FTMesh* mesh)
{
FTGL_DOUBLE* vertex = static_cast<FTGL_DOUBLE*>(coords);
*outData = mesh->Combine( vertex[0], vertex[1], vertex[2]);
}
void CALLBACK ftglBegin( GLenum type, FTMesh* mesh)
{
mesh->Begin( type);
}
void CALLBACK ftglEnd( FTMesh* mesh)
{
mesh->End();
}
FTMesh::FTMesh()
: currentTesselation(0),
err(0)
{
tesselationList.reserve( 16);
}
FTMesh::~FTMesh()
{
for( size_t t = 0; t < tesselationList.size(); ++t)
{
delete tesselationList[t];
}
tesselationList.clear();
}
void FTMesh::AddPoint( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z)
{
currentTesselation->AddPoint( x, y, z);
}
FTGL_DOUBLE* FTMesh::Combine( const FTGL_DOUBLE x, const FTGL_DOUBLE y, const FTGL_DOUBLE z)
{
tempPointList.push_back( FTPoint( x, y,z));
return &tempPointList.back().x;
}
void FTMesh::Begin( GLenum meshType)
{
currentTesselation = new FTTesselation( meshType);
}
void FTMesh::End()
{
tesselationList.push_back( currentTesselation);
}
const FTTesselation* const FTMesh::Tesselation( unsigned int index) const
{
return ( index < tesselationList.size()) ? tesselationList[index] : NULL;
}
FTVectoriser::FTVectoriser( const FT_GlyphSlot glyph)
: contourList(0),
mesh(0),
ftContourCount(0),
contourFlag(0)
{
if( glyph)
{
outline = glyph->outline;
ftContourCount = outline.n_contours;;
contourList = 0;
contourFlag = outline.flags;
ProcessContours();
}
}
FTVectoriser::~FTVectoriser()
{
for( size_t c = 0; c < ContourCount(); ++c)
{
delete contourList[c];
}
delete [] contourList;
delete mesh;
}
void FTVectoriser::ProcessContours()
{
short contourLength = 0;
short startIndex = 0;
short endIndex = 0;
contourList = new FTContour*[ftContourCount];
for( short contourIndex = 0; contourIndex < ftContourCount; ++contourIndex)
{
FT_Vector* pointList = &outline.points[startIndex];
char* tagList = &outline.tags[startIndex];
endIndex = outline.contours[contourIndex];
contourLength = ( endIndex - startIndex) + 1;
FTContour* contour = new FTContour( pointList, tagList, contourLength);
contourList[contourIndex] = contour;
startIndex = endIndex + 1;
}
}
size_t FTVectoriser::PointCount()
{
size_t s = 0;
for( size_t c = 0; c < ContourCount(); ++c)
{
s += contourList[c]->PointCount();
}
return s;
}
const FTContour* const FTVectoriser::Contour( unsigned int index) const
{
return ( index < ContourCount()) ? contourList[index] : NULL;
}
void FTVectoriser::MakeMesh( FTGL_DOUBLE zNormal)
{
if( mesh)
{
delete mesh;
}
mesh = new FTMesh;
GLUtesselator* tobj = gluNewTess();
gluTessCallback( tobj, GLU_TESS_BEGIN_DATA, (GLUTesselatorFunction)ftglBegin);
gluTessCallback( tobj, GLU_TESS_VERTEX_DATA, (GLUTesselatorFunction)ftglVertex);
gluTessCallback( tobj, GLU_TESS_COMBINE_DATA, (GLUTesselatorFunction)ftglCombine);
gluTessCallback( tobj, GLU_TESS_END_DATA, (GLUTesselatorFunction)ftglEnd);
gluTessCallback( tobj, GLU_TESS_ERROR_DATA, (GLUTesselatorFunction)ftglError);
if( contourFlag & ft_outline_even_odd_fill) // ft_outline_reverse_fill
{
gluTessProperty( tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD);
}
else
{
gluTessProperty( tobj, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO);
}
gluTessProperty( tobj, GLU_TESS_TOLERANCE, 0);
gluTessNormal( tobj, 0.0f, 0.0f, zNormal);
gluTessBeginPolygon( tobj, mesh);
for( size_t c = 0; c < ContourCount(); ++c)
{
const FTContour* contour = contourList[c];
gluTessBeginContour( tobj);
for( size_t p = 0; p < contour->PointCount(); ++p)
{
FTGL_DOUBLE* d = const_cast<FTGL_DOUBLE*>(&contour->Point(p).x);
gluTessVertex( tobj, d, d);
}
gluTessEndContour( tobj);
}
gluTessEndPolygon( tobj);
gluDeleteTess( tobj);
}

View File

@@ -1,60 +0,0 @@
#
# $Id$
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
# All rights reserved.
#
# The Original Code is: all of this file.
#
# Contributor(s): none yet.
#
# ***** END GPL LICENSE BLOCK *****
#
#
LIBNAME = ftgl
DIR = $(OCGDIR)/extern/$(LIBNAME)
CCFLAGS += $(LEVEL_1_CPP_WARNINGS)
CSRCS =
CCSRCS = FTBitmapGlyph.cpp FTCharmap.cpp FTContour.cpp FTExtrdGlyph.cpp \
FTFace.cpp FTFont.cpp FTGLBitmapFont.cpp FTGLExtrdFont.cpp \
FTGLOutlineFont.cpp FTGLPixmapFont.cpp FTGLPolygonFont.cpp \
FTGLTextureFont.cpp FTGlyph.cpp FTGlyphContainer.cpp FTLibrary.cpp \
FTOutlineGlyph.cpp FTPixmapGlyph.cpp FTPoint.cpp FTPolyGlyph.cpp \
FTSize.cpp FTTextureGlyph.cpp FTVectoriser.cpp
include nan_compile.mk
CPPFLAGS += -I../include
CPPFLAGS += -I$(NAN_FREETYPE)/include -I$(NAN_FREETYPE)/include/freetype2
CPPFLAGS += -I$(OPENGL_HEADERS)
install: all debug
@[ -d $(NAN_FTGL) ] || mkdir -p $(NAN_FTGL)
@[ -d $(NAN_FTGL)/include ] || mkdir -p $(NAN_FTGL)/include
@[ -d $(NAN_FTGL)/lib ] || mkdir -p $(NAN_FTGL)/lib
@[ -d $(NAN_FTGL)/lib/debug ] || mkdir -p $(NAN_FTGL)/lib/debug
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/lib$(LIBNAME).a $(NAN_FTGL)/lib/
# @$(NANBLENDERHOME)/intern/tools/cpifdiff.sh $(DIR)/debug/lib$(LIBNAME).a $(NAN_FTGL)/lib/debug/
ifeq ($(OS),darwin)
ranlib $(NAN_FTGL)/lib/lib$(LIBNAME).a
endif
@$(NANBLENDERHOME)/intern/tools/cpifdiff.sh ../include/*.h $(NAN_FTGL)/include/

View File

@@ -1,206 +0,0 @@
FTGL 1.31
NOTES FOR COMPILING ON WINDOWS
14 Feb 2002
Ellers, ellers@iinet.net.au
SUPPORTED COMPILERS
I have rebuilt the FTGL project files for Visual C++ (version 6). There are
presently no other compilers or environments supported but feel free to
contribute them.
QUICK GUIDE: COMPILING FTGL
- Start up MSVC++ with ftgl.dsw.
- Tell MSVC++ where FreeType is. You'll need to do something like this:
* select Project>Settings
* select ftgl_static (for a start)
* select "All Configurations"
* go to the tab C++ > PreProcessor
* Set additional include directories appropriately. For me it is:
D:\cots\freetype-2.0.5\include
* repeat for all configurations of ftgl_dll
QUICK GUIDE: COMPILING/RUNNING SUPPLIED DEMO PROGRAM
- The program expects the first argument to be the name of a truetype file.
I copied timesbi.ttf from the windows directory to C:\TEMP and then edit
the settings of the project:
* select Project>Settings
* select Demo project
* select panel Debug>General
* set Program Arguments to be "C:\TEMP\timesbi.ttf"
QUICK GUIDE: COMPILING YOUR PROGRAM TO USE FTGL
- Choose dynamic or static library linkage
* if you want to link to a static FTGL library ensure that
FTGL_LIBRARY_STATIC is defined in the preprocessor section
CONFIGURATION / CODE GENERATION / C LIBRARIES
FTGL can be built in various configurations (inspired by Freetype and libpng):
- static library (.lib)
- dynamic library (.dll)
MSVC++ requires selection of "code generation" option, which seems to be
mostly to do with which version of the Standard C library is linked with the
library.
The following modes are supported:
- static/dynamic
- single threaded (ST) or multithreaded (MT)
NOTE: the multithreaded DLL (MD) mode was NOT included, as freetype itself
doesn't support that mode so I figure there's no point yet.
- debug/release (debug has _d suffix)
So the static multithreaded release library is:
ftgl_static_MT.lib
The same library built in DEBUG mode:
ftgl_static_MT_d.lib
If you're not sure which one is appropriate (and if you're a novice don't
been too put off...) start with making the decision about debug or release.
This should be easy because if you're building the debug version of your
app its probably a good idea to link with the debug version of FTGL (but
not compulsory). Once thats done, you may get errors like:
LIBCMTD.lib(crt0init.obj) : warning LNK4098: defaultlib "libcmt.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
This will happen, for example, when you link a glut app with an FTGL library
compiled with different codegen options than the GLUT library.
MSVC++ "sort of"
requires that all libs be linked with the same codegen option. GLUT is built
in XXX mode, so if you're linking with GLUT, you can get rid of the warning
by linking with the XXX version of FTGL. The various versions are particularly
useful if you're doing std C stuff, like printf etc.
FAQ
Q: "But... do I HAVE to use all these DIFFERENT build modes, like multi-
threaded, debug single threaded, etc?"
A: No. Sometimes library makers only generate one style anyway. It depends
on your needs. Unless you're linking with standard C stuff (e.g. printf)
then it probably won't make a great deal of difference. If you get
warnings about "default lib libcmt.lib conflicts" etc, then you can make
use of the different libraries.

View File

@@ -1,92 +0,0 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "ftgl_demo"=".\ftgl_demo\ftgl_demo.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name ftgl_dll
End Project Dependency
Begin Project Dependency
Project_Dep_Name ftgl_static_lib
End Project Dependency
}}}
###############################################################################
Project: "ftgl_demo_2"=".\ftgl_demo\ftgl_demo_2.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name ftgl_dll
End Project Dependency
Begin Project Dependency
Project_Dep_Name ftgl_static_lib
End Project Dependency
}}}
###############################################################################
Project: "ftgl_dll"=".\ftgl_dll\ftgl_dll.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "ftgl_static_lib"=".\ftgl_static_lib\ftgl_static_lib.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "unit_tests"=".\unit_tests\unit_tests.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project_Dep_Name ftgl_static_lib
End Project Dependency
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -1,357 +0,0 @@
# Microsoft Developer Studio Project File - Name="ftgl_dll" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=ftgl_dll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ftgl_dll.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ftgl_dll.mak" CFG="ftgl_dll - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ftgl_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ftgl_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ftgl_dll - Win32 Release MT" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ftgl_dll - Win32 Debug MT" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "ftgl_dll - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_ST"
# PROP BASE Intermediate_Dir "Release_ST"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../Build"
# PROP Intermediate_Dir "Release_ST"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "../Build"
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204.lib /nologo /dll /machine:I386 /out:"../Build/ftgl_dynamic_MT.dll" /libpath:"D:\cots\freetype-2.0.5\objs"
!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_ST"
# PROP BASE Intermediate_Dir "Debug_ST"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../Build"
# PROP Intermediate_Dir "Debug_ST"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "../Build"
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204_D.lib /nologo /dll /pdb:"Debug_ST/ftgl_dynamic_ST_d.pdb" /debug /machine:I386 /out:"../Build/ftgl_dynamic_MT_d.dll" /pdbtype:sept /libpath:"D:\cots\freetype-2.0.5\objs"
# SUBTRACT LINK32 /pdb:none
!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Release MT"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_MT"
# PROP BASE Intermediate_Dir "Release_MT"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "../Build"
# PROP Intermediate_Dir "Release_MT"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "../Build"
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204MT.lib /nologo /dll /machine:I386 /out:"../Build/ftgl_dynamic_MTD.dll" /libpath:"D:\cots\freetype-2.0.5\objs"
!ELSEIF "$(CFG)" == "ftgl_dll - Win32 Debug MT"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_MT"
# PROP BASE Intermediate_Dir "Debug_MT"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../Build"
# PROP Intermediate_Dir "Debug_MT"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir "../Build"
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_DLL_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "FTGL_LIBRARY" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib freetype204MT_D.lib /nologo /dll /pdb:"Debug_ST/ftgl_dynamic_MT_d.pdb" /debug /machine:I386 /out:"../Build/ftgl_dynamic_MTD_d.dll" /pdbtype:sept /libpath:"D:\cots\freetype-2.0.5\objs"
# SUBTRACT LINK32 /pdb:none
!ENDIF
# Begin Target
# Name "ftgl_dll - Win32 Release"
# Name "ftgl_dll - Win32 Debug"
# Name "ftgl_dll - Win32 Release MT"
# Name "ftgl_dll - Win32 Debug MT"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\FTBitmapGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTCharmap.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTContour.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTExtrdGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTFace.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLBitmapFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLExtrdFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLOutlineFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLPixmapFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLPolygonFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLTextureFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGlyphContainer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTLibrary.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTOutlineGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPixmapGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPoint.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPolyGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTSize.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTTextureGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTVectoriser.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\include\FTBBox.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTBitmapGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTCharmap.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTCharToGlyphIndexMap.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTContour.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTExtrdGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTFace.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGL.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLBitmapFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLExtrdFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLOutlineFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLPixmapFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLPolygonFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLTextureFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGlyphContainer.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTLibrary.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTList.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTOutlineGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPixmapGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPoint.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPolyGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTSize.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTTextureGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTVector.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTVectoriser.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# End Group
# End Target
# End Project

View File

@@ -1,342 +0,0 @@
# Microsoft Developer Studio Project File - Name="ftgl_static_lib" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Static Library" 0x0104
CFG=ftgl_static_lib - Win32 Debug MT
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ftgl_static_lib.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ftgl_static_lib.mak" CFG="ftgl_static_lib - Win32 Debug MT"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ftgl_static_lib - Win32 Release" (based on "Win32 (x86) Static Library")
!MESSAGE "ftgl_static_lib - Win32 Debug" (based on "Win32 (x86) Static Library")
!MESSAGE "ftgl_static_lib - Win32 Debug MT" (based on "Win32 (x86) Static Library")
!MESSAGE "ftgl_static_lib - Win32 Release MT" (based on "Win32 (x86) Static Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "ftgl_static_lib - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_ST"
# PROP BASE Intermediate_Dir "Release_ST"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_ST"
# PROP Intermediate_Dir "Release_ST"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\..\..\lib\windows\freetype\include" /I "..\..\include" /I "..\..\..\..\..\lib\windows\freetype\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\Build\ftgl_static_ST.lib"
# Begin Special Build Tool
SOURCE="$(InputPath)"
PostBuild_Cmds=ECHO Copying lib to lib\windows\ftgl\lib XCOPY /Y ..\Build\*lib ..\..\..\..\..\lib\windows\ftgl\lib
# End Special Build Tool
!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_ST"
# PROP BASE Intermediate_Dir "Debug_ST"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_ST"
# PROP Intermediate_Dir "Debug_ST"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MT_d.lib"
!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Debug MT"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_MT"
# PROP BASE Intermediate_Dir "Debug_MT"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_MT"
# PROP Intermediate_Dir "Debug_MT"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /GZ /c
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MTD_d.lib"
!ELSEIF "$(CFG)" == "ftgl_static_lib - Win32 Release MT"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_MT"
# PROP BASE Intermediate_Dir "Release_MT"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_MT"
# PROP Intermediate_Dir "Release_MT"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "D:\cots\freetype-2.0.5\include" /I "..\..\include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "FTGL_LIBRARY_STATIC" /YX /FD /c
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
# ADD LIB32 /nologo /out:"..\Build\ftgl_static_MTD.lib"
!ENDIF
# Begin Target
# Name "ftgl_static_lib - Win32 Release"
# Name "ftgl_static_lib - Win32 Debug"
# Name "ftgl_static_lib - Win32 Debug MT"
# Name "ftgl_static_lib - Win32 Release MT"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\..\src\FTBitmapGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTCharmap.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTContour.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTExtrdGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTFace.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLBitmapFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLExtrdFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLOutlineFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLPixmapFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLPolygonFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGLTextureFont.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTGlyphContainer.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTLibrary.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTOutlineGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPixmapGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPoint.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTPolyGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTSize.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTTextureGlyph.cpp
# End Source File
# Begin Source File
SOURCE=..\..\src\FTVectoriser.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\include\FTBBox.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTBitmapGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTCharmap.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTCharToGlyphIndexMap.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTContour.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTExtrdGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTFace.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGL.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLBitmapFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLExtrdFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLOutlineFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLPixmapFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLPolygonFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGLTextureFont.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTGlyphContainer.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTLibrary.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTList.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTOutlineGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPixmapGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPoint.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTPolyGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTSize.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTTextureGlyph.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTVector.h
# End Source File
# Begin Source File
SOURCE=..\..\include\FTVectoriser.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -1,168 +0,0 @@
# Microsoft Developer Studio Project File - Name="unit_tests" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Console Application" 0x0103
CFG=unit_tests - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "unit_tests.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "unit_tests.mak" CFG="unit_tests - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "unit_tests - Win32 Release" (based on "Win32 (x86) Console Application")
!MESSAGE "unit_tests - Win32 Debug" (based on "Win32 (x86) Console Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
RSC=rc.exe
!IF "$(CFG)" == "unit_tests - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "$(MIC_COTS_CPPUNIT_DIR)/include" /I "../../include" /I "../../extras" /I "D:\cots\freetype-2.0.5\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "FTGL_LIBRARY_STATIC" /FD /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
# ADD LINK32 freetype204MT.lib ftgl_static_MT.lib cppunit.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\Build" /libpath:"D:\cots\freetype-2.0.5\objs" /libpath:"D:\cots\cppunit-1.9.8\lib"
!ELSEIF "$(CFG)" == "unit_tests - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Yu"stdafx.h" /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(MIC_COTS_CPPUNIT_DIR)/include" /I "../../include" /I "../../extras" /I "D:\cots\freetype-2.0.5\include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "FTGL_LIBRARY_STATIC" /FD /GZ /c
# SUBTRACT CPP /YX /Yc /Yu
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
# ADD LINK32 freetype204MT_D.lib ftgl_static_MT_d.lib cppunitd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\Build" /libpath:"D:\cots\freetype-2.0.5\objs" /libpath:"D:\cots\cppunit-1.9.8\lib"
!ENDIF
# Begin Target
# Name "unit_tests - Win32 Release"
# Name "unit_tests - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE="..\..\test\FTBBox-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTCharmap-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTContour-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTFace-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTFont-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTGlyphContainer-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTLibrary-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTList-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTMesh-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTPoint-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTSize-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTTesselation-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTVector-Test.cpp"
# End Source File
# Begin Source File
SOURCE="..\..\test\FTVectoriser-Test.cpp"
# End Source File
# Begin Source File
SOURCE=..\..\test\HPGCalc_afm.cpp
# End Source File
# Begin Source File
SOURCE=..\..\test\HPGCalc_pfb.cpp
# End Source File
# Begin Source File
SOURCE=..\..\test\TestMain.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\..\test\Fontdefs.h
# End Source File
# End Group
# End Target
# End Project

View File

@@ -18,8 +18,8 @@
# All rights reserved.
#
SET(INC ./include ${WINTAB_INC})
ADD_DEFINITIONS(-DWITH_BINRELOC)
SET(INC ./include )
ADD_DEFINITIONS(-DENABLE_BINRELOC)
FILE(GLOB SRC *.c)
BLENDERLIB(extern_binreloc "${SRC}" "${INC}")

View File

@@ -1,3 +1,5 @@
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=8
#
# ***** BEGIN GPL LICENSE BLOCK *****
#
@@ -25,13 +27,12 @@ DIR = $(OCGDIR)/extern/$(LIBNAME)
include nan_definitions.mk
CPPFLAGS += -I./include
CPPFLAGS += -DENABLE_BINRELOC -I./include
include nan_compile.mk
install: all debug
install: $(ALL_OR_DEBUG)
@[ -d $(DIR) ] || mkdir $(DIR)
@[ -d $(DIR)/include ] || mkdir $(DIR)/include
@../../intern/tools/cpifdiff.sh include/*.h $(DIR)/include/

View File

@@ -9,5 +9,5 @@ cflags = []
sources = ['binreloc.c']
incs = 'include'
env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[36, 226], compileflags = cflags)
env.BlenderLib ( 'extern_binreloc', sources, Split(incs), Split(defs), libtype=['extern'], priority=[36], compileflags = cflags)

View File

@@ -31,6 +31,7 @@ FILE(GLOB SRC
src/BulletCollision/BroadphaseCollision/*.cpp
src/BulletCollision/CollisionShapes/*.cpp
src/BulletCollision/NarrowPhaseCollision/*.cpp
src/BulletCollision/Gimpact/*.cpp
src/BulletCollision//CollisionDispatch/*.cpp
src/BulletDynamics/ConstraintSolver/*.cpp
src/BulletDynamics/Vehicle/*.cpp

View File

@@ -1,3 +1,5 @@
# -*- mode: gnumakefile; tab-width: 8; indent-tabs-mode: t; -*-
# vim: tabstop=8
#
# $Id$
#
@@ -37,6 +39,7 @@ LinearMath \
BulletCollision/BroadphaseCollision \
BulletCollision/CollisionShapes \
BulletCollision/NarrowPhaseCollision \
BulletCollision/Gimpact \
BulletCollision//CollisionDispatch \
BulletDynamics/ConstraintSolver \
BulletDynamics/Vehicle \
@@ -47,7 +50,7 @@ include nan_subdirs.mk
CP = $(NANBLENDERHOME)/intern/tools/cpifdiff.sh
install: all debug
install: $(ALL_OR_DEBUG)
@[ -d $(NAN_BULLET2) ] || mkdir -p $(NAN_BULLET2)
@[ -d $(NAN_BULLET2)/include ] || mkdir -p $(NAN_BULLET2)/include
@for i in $(BULLETDIRS); do \

View File

@@ -53,6 +53,7 @@ IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\NarrowPhaseCollision MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionDispatch MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionShapes MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\Gimpact MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\ConstraintSolver MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Dynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
@@ -61,13 +62,14 @@ IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\LinearMath MKDIR
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletSoftBody MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include
XCOPY /Y ..\..\src\LinearMath\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
XCOPY /Y ..\..\src\BulletSoftBody\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\LinearMath\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
XCOPY /Y ..\..\src\BulletCollision\BroadphaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\BroadphaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\CollisionDispatch\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
XCOPY /Y ..\..\src\BulletCollision\CollisionShapes\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
XCOPY /Y ..\..\src\BulletCollision\Gimpact\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
XCOPY /Y ..\..\src\BulletDynamics\ConstraintSolver\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
XCOPY /Y ..\..\src\BulletDynamics\Dynamics\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
XCOPY /Y ..\..\src\BulletDynamics\Vehicle\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
@@ -135,19 +137,23 @@ IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\NarrowPhaseCollision MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionDispatch MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionShapes MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\Gimpact MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\ConstraintSolver MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Dynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Vehicle MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\LinearMath MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletSoftBody MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include
XCOPY /Y ..\..\src\BulletSoftBody\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\LinearMath\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
XCOPY /Y ..\..\src\BulletCollision\BroadphaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\BroadphaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\CollisionDispatch\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
XCOPY /Y ..\..\src\BulletCollision\CollisionShapes\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
XCOPY /Y ..\..\src\BulletCollision\Gimpact\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
XCOPY /Y ..\..\src\BulletDynamics\ConstraintSolver\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
XCOPY /Y ..\..\src\BulletDynamics\Dynamics\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
XCOPY /Y ..\..\src\BulletDynamics\Vehicle\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
@@ -213,19 +219,23 @@ IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\NarrowPhaseCollision MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionDispatch MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionShapes MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\Gimpact MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\ConstraintSolver MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Dynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Vehicle MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\LinearMath MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletSoftBody MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include
XCOPY /Y ..\..\src\BulletSoftBody\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\LinearMath\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
XCOPY /Y ..\..\src\BulletCollision\BroadphaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\BroadphaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\CollisionDispatch\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
XCOPY /Y ..\..\src\BulletCollision\CollisionShapes\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
XCOPY /Y ..\..\src\BulletCollision\Gimpact\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
XCOPY /Y ..\..\src\BulletDynamics\ConstraintSolver\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
XCOPY /Y ..\..\src\BulletDynamics\Dynamics\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
XCOPY /Y ..\..\src\BulletDynamics\Vehicle\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
@@ -293,19 +303,23 @@ IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\NarrowPhaseCollision MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionDispatch MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\CollisionShapes MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletCollision\Gimpact MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\ConstraintSolver MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Dynamics MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletDynamics\Vehicle MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\LinearMath MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
IF NOT EXIST ..\..\..\..\..\build\msvc_7\extern\bullet2\include\BulletSoftBody MKDIR ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include
XCOPY /Y ..\..\src\BulletSoftBody\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletSoftBody
XCOPY /Y ..\..\src\LinearMath\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\LinearMath
XCOPY /Y ..\..\src\BulletCollision\BroadphaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\BroadphaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\NarrowPhaseCollision\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\NarrowPhaseCollision
XCOPY /Y ..\..\src\BulletCollision\CollisionDispatch\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionDispatch
XCOPY /Y ..\..\src\BulletCollision\CollisionShapes\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\CollisionShapes
XCOPY /Y ..\..\src\BulletCollision\Gimpact\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletCollision\Gimpact
XCOPY /Y ..\..\src\BulletDynamics\ConstraintSolver\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\ConstraintSolver
XCOPY /Y ..\..\src\BulletDynamics\Dynamics\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Dynamics
XCOPY /Y ..\..\src\BulletDynamics\Vehicle\*.h ..\..\..\..\..\build\msvc_7\extern\bullet\include\BulletDynamics\Vehicle
@@ -962,6 +976,124 @@ ECHO Done
RelativePath="..\..\src\BulletCollision\CollisionShapes\btUniformScalingShape.h">
</File>
</Filter>
<Filter
Name="Gimpact"
Filter="">
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btBoxCollision.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btClipPolygon.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btContactProcessing.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btContactProcessing.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGenericPoolAllocator.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGenericPoolAllocator.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGeometryOperations.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactBvh.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactBvh.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactCollisionAlgorithm.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactCollisionAlgorithm.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactMassUtil.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactQuantizedBvh.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactQuantizedBvh.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactShape.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btGImpactShape.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btQuantization.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btTriangleShapeEx.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\btTriangleShapeEx.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_array.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_basic_geometry_operations.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_bitset.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_box_collision.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_box_set.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_box_set.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_clip_polygon.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_contact.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_contact.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_geom_types.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_geometry.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_hash_table.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_linear_math.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_math.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_memory.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_memory.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_radixsort.h">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_tri_collision.cpp">
</File>
<File
RelativePath="..\..\src\BulletCollision\Gimpact\gim_tri_collision.h">
</File>
</Filter>
</Filter>
<Filter
Name="LinearMath"

1525
extern/bullet2/make/msvc_9_0/Bullet.vcproj vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -38,37 +38,37 @@ typedef plReal plQuaternion[4];
extern "C" {
#endif
/* Particular physics SDK */
/** Particular physics SDK (C-API) */
PL_DECLARE_HANDLE(plPhysicsSdkHandle);
/* Dynamics world, belonging to some physics SDK */
/** Dynamics world, belonging to some physics SDK (C-API)*/
PL_DECLARE_HANDLE(plDynamicsWorldHandle);
/* Rigid Body that can be part of a Dynamics World */
/** Rigid Body that can be part of a Dynamics World (C-API)*/
PL_DECLARE_HANDLE(plRigidBodyHandle);
/* Collision Shape/Geometry, property of a Rigid Body */
/** Collision Shape/Geometry, property of a Rigid Body (C-API)*/
PL_DECLARE_HANDLE(plCollisionShapeHandle);
/* Constraint for Rigid Bodies */
/** Constraint for Rigid Bodies (C-API)*/
PL_DECLARE_HANDLE(plConstraintHandle);
/* Triangle Mesh interface */
/** Triangle Mesh interface (C-API)*/
PL_DECLARE_HANDLE(plMeshInterfaceHandle);
/* Broadphase Scene/Proxy Handles */
/** Broadphase Scene/Proxy Handles (C-API)*/
PL_DECLARE_HANDLE(plCollisionBroadphaseHandle);
PL_DECLARE_HANDLE(plBroadphaseProxyHandle);
PL_DECLARE_HANDLE(plCollisionWorldHandle);
/*
/**
Create and Delete a Physics SDK
*/
extern plPhysicsSdkHandle plNewBulletSdk(); //this could be also another sdk, like ODE, PhysX etc.
extern void plDeletePhysicsSdk(plPhysicsSdkHandle physicsSdk);
/* Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
/** Collision World, not strictly necessary, you can also just create a Dynamics World with Rigid Bodies which internally manages the Collision World with Collision Objects */
typedef void(*btBroadphaseCallback)(void* clientData, void* object1,void* object2);

View File

@@ -19,10 +19,9 @@
// 3. This notice may not be removed or altered from any source distribution.
#include "btAxisSweep3.h"
#include <assert.h>
btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache)
:btAxisSweep3Internal<unsigned short int>(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache)
btAxisSweep3::btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles, btOverlappingPairCache* pairCache, bool disableRaycastAccelerator)
:btAxisSweep3Internal<unsigned short int>(worldAabbMin,worldAabbMax,0xfffe,0xffff,maxHandles,pairCache,disableRaycastAccelerator)
{
// 1 handle is reserved as sentinel
btAssert(maxHandles > 1 && maxHandles < 32767);
@@ -30,8 +29,8 @@ btAxisSweep3::btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAab
}
bt32BitAxisSweep3::bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache )
:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache)
bt32BitAxisSweep3::bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles , btOverlappingPairCache* pairCache , bool disableRaycastAccelerator)
:btAxisSweep3Internal<unsigned int>(worldAabbMin,worldAabbMax,0xfffffffe,0x7fffffff,maxHandles,pairCache,disableRaycastAccelerator)
{
// 1 handle is reserved as sentinel
btAssert(maxHandles > 1 && maxHandles < 2147483647);

View File

@@ -19,12 +19,12 @@
#ifndef AXIS_SWEEP_3_H
#define AXIS_SWEEP_3_H
#include "LinearMath/btPoint3.h"
#include "LinearMath/btVector3.h"
#include "btOverlappingPairCache.h"
#include "btBroadphaseInterface.h"
#include "btBroadphaseProxy.h"
#include "btOverlappingPairCallback.h"
#include "btDbvtBroadphase.h"
//#define DEBUG_BROADPHASE 1
#define USE_OVERLAP_TEST_ON_REMOVES 1
@@ -42,6 +42,7 @@ protected:
public:
BT_DECLARE_ALIGNED_ALLOCATOR();
class Edge
{
@@ -61,8 +62,7 @@ public:
// indexes into the edge arrays
BP_FP_INT_TYPE m_minEdges[3], m_maxEdges[3]; // 6 * 2 = 12
// BP_FP_INT_TYPE m_uniqueId;
BP_FP_INT_TYPE m_pad;
btBroadphaseProxy* m_dbvtProxy;//for faster raycast
//void* m_pOwner; this is now in btBroadphaseProxy.m_clientObject
SIMD_FORCE_INLINE void SetNextFree(BP_FP_INT_TYPE next) {m_minEdges[0] = next;}
@@ -71,8 +71,8 @@ public:
protected:
btPoint3 m_worldAabbMin; // overall system bounds
btPoint3 m_worldAabbMax; // overall system bounds
btVector3 m_worldAabbMin; // overall system bounds
btVector3 m_worldAabbMax; // overall system bounds
btVector3 m_quantize; // scaling factor for quantization
@@ -94,6 +94,12 @@ protected:
int m_invalidPair;
///additional dynamic aabb structure, used to accelerate ray cast queries.
///can be disabled using a optional argument in the constructor
btDbvtBroadphase* m_raycastAccelerator;
btOverlappingPairCache* m_nullPairCache;
// allocation/deallocation
BP_FP_INT_TYPE allocHandle();
void freeHandle(BP_FP_INT_TYPE handle);
@@ -108,7 +114,7 @@ protected:
//Overlap* AddOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB);
//void RemoveOverlap(BP_FP_INT_TYPE handleA, BP_FP_INT_TYPE handleB);
void quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const;
void sortMinDown(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
void sortMinUp(int axis, BP_FP_INT_TYPE edge, btDispatcher* dispatcher, bool updateOverlaps );
@@ -117,7 +123,7 @@ protected:
public:
btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0);
btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel, BP_FP_INT_TYPE maxHandles = 16384, btOverlappingPairCache* pairCache=0,bool disableRaycastAccelerator = false);
virtual ~btAxisSweep3Internal();
@@ -128,17 +134,26 @@ public:
virtual void calculateOverlappingPairs(btDispatcher* dispatcher);
BP_FP_INT_TYPE addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
BP_FP_INT_TYPE addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
void removeHandle(BP_FP_INT_TYPE handle,btDispatcher* dispatcher);
void updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher);
void updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
SIMD_FORCE_INLINE Handle* getHandle(BP_FP_INT_TYPE index) const {return m_pHandles + index;}
virtual void resetPool(btDispatcher* dispatcher);
void processAllOverlappingPairs(btOverlapCallback* callback);
//Broadphase Interface
virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr ,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy);
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher);
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher);
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0));
void quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const;
///unQuantize should be conservative: aabbMin/aabbMax should be larger then 'getAabb' result
void unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const;
bool testAabbOverlap(btBroadphaseProxy* proxy0,btBroadphaseProxy* proxy1);
@@ -206,7 +221,7 @@ void btAxisSweep3<BP_FP_INT_TYPE>::debugPrintAxis(int axis, bool checkCardinalit
}
if (checkCardinality)
assert(numEdges == m_numHandles*2+1);
btAssert(numEdges == m_numHandles*2+1);
}
#endif //DEBUG_BROADPHASE
@@ -217,7 +232,12 @@ btBroadphaseProxy* btAxisSweep3Internal<BP_FP_INT_TYPE>::createProxy( const btV
BP_FP_INT_TYPE handleId = addHandle(aabbMin,aabbMax, userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,multiSapProxy);
Handle* handle = getHandle(handleId);
if (m_raycastAccelerator)
{
btBroadphaseProxy* rayProxy = m_raycastAccelerator->createProxy(aabbMin,aabbMax,shapeType,userPtr,collisionFilterGroup,collisionFilterMask,dispatcher,0);
handle->m_dbvtProxy = rayProxy;
}
return handle;
}
@@ -227,6 +247,8 @@ template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)
{
Handle* handle = static_cast<Handle*>(proxy);
if (m_raycastAccelerator)
m_raycastAccelerator->destroyProxy(handle->m_dbvtProxy,dispatcher);
removeHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), dispatcher);
}
@@ -234,22 +256,80 @@ template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher)
{
Handle* handle = static_cast<Handle*>(proxy);
handle->m_aabbMin = aabbMin;
handle->m_aabbMax = aabbMax;
updateHandle(static_cast<BP_FP_INT_TYPE>(handle->m_uniqueId), aabbMin, aabbMax,dispatcher);
if (m_raycastAccelerator)
m_raycastAccelerator->setAabb(handle->m_dbvtProxy,aabbMin,aabbMax,dispatcher);
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
{
if (m_raycastAccelerator)
{
m_raycastAccelerator->rayTest(rayFrom,rayTo,rayCallback,aabbMin,aabbMax);
} else
{
//choose axis?
BP_FP_INT_TYPE axis = 0;
//for each proxy
for (BP_FP_INT_TYPE i=1;i<m_numHandles*2+1;i++)
{
if (m_pEdges[axis][i].IsMax())
{
rayCallback.process(getHandle(m_pEdges[axis][i].m_handle));
}
}
}
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
{
Handle* pHandle = static_cast<Handle*>(proxy);
aabbMin = pHandle->m_aabbMin;
aabbMax = pHandle->m_aabbMax;
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::unQuantize(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const
{
Handle* pHandle = static_cast<Handle*>(proxy);
unsigned short vecInMin[3];
unsigned short vecInMax[3];
vecInMin[0] = m_pEdges[0][pHandle->m_minEdges[0]].m_pos ;
vecInMax[0] = m_pEdges[0][pHandle->m_maxEdges[0]].m_pos +1 ;
vecInMin[1] = m_pEdges[1][pHandle->m_minEdges[1]].m_pos ;
vecInMax[1] = m_pEdges[1][pHandle->m_maxEdges[1]].m_pos +1 ;
vecInMin[2] = m_pEdges[2][pHandle->m_minEdges[2]].m_pos ;
vecInMax[2] = m_pEdges[2][pHandle->m_maxEdges[2]].m_pos +1 ;
aabbMin.setValue((btScalar)(vecInMin[0]) / (m_quantize.getX()),(btScalar)(vecInMin[1]) / (m_quantize.getY()),(btScalar)(vecInMin[2]) / (m_quantize.getZ()));
aabbMin += m_worldAabbMin;
aabbMax.setValue((btScalar)(vecInMax[0]) / (m_quantize.getX()),(btScalar)(vecInMax[1]) / (m_quantize.getY()),(btScalar)(vecInMax[2]) / (m_quantize.getZ()));
aabbMax += m_worldAabbMin;
}
template <typename BP_FP_INT_TYPE>
btAxisSweep3Internal<BP_FP_INT_TYPE>::btAxisSweep3Internal(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache )
btAxisSweep3Internal<BP_FP_INT_TYPE>::btAxisSweep3Internal(const btVector3& worldAabbMin,const btVector3& worldAabbMax, BP_FP_INT_TYPE handleMask, BP_FP_INT_TYPE handleSentinel,BP_FP_INT_TYPE userMaxHandles, btOverlappingPairCache* pairCache , bool disableRaycastAccelerator)
:m_bpHandleMask(handleMask),
m_handleSentinel(handleSentinel),
m_pairCache(pairCache),
m_userPairCallback(0),
m_ownsPairCache(false),
m_invalidPair(0)
m_invalidPair(0),
m_raycastAccelerator(0)
{
BP_FP_INT_TYPE maxHandles = static_cast<BP_FP_INT_TYPE>(userMaxHandles+1);//need to add one sentinel handle
@@ -260,7 +340,14 @@ m_invalidPair(0)
m_ownsPairCache = true;
}
//assert(bounds.HasVolume());
if (!disableRaycastAccelerator)
{
m_nullPairCache = new (btAlignedAlloc(sizeof(btNullPairCache),16)) btNullPairCache();
m_raycastAccelerator = new (btAlignedAlloc(sizeof(btDbvtBroadphase),16)) btDbvtBroadphase(m_nullPairCache);//m_pairCache);
m_raycastAccelerator->m_deferedcollide = true;//don't add/remove pairs
}
//btAssert(bounds.HasVolume());
// init bounds
m_worldAabbMin = worldAabbMin;
@@ -320,7 +407,14 @@ m_invalidPair(0)
template <typename BP_FP_INT_TYPE>
btAxisSweep3Internal<BP_FP_INT_TYPE>::~btAxisSweep3Internal()
{
if (m_raycastAccelerator)
{
m_nullPairCache->~btOverlappingPairCache();
btAlignedFree(m_nullPairCache);
m_raycastAccelerator->~btDbvtBroadphase();
btAlignedFree (m_raycastAccelerator);
}
for (int i = 2; i >= 0; i--)
{
btAlignedFree(m_pEdgesRawPtr[i]);
@@ -335,27 +429,31 @@ btAxisSweep3Internal<BP_FP_INT_TYPE>::~btAxisSweep3Internal()
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::quantize(BP_FP_INT_TYPE* out, const btPoint3& point, int isMax) const
void btAxisSweep3Internal<BP_FP_INT_TYPE>::quantize(BP_FP_INT_TYPE* out, const btVector3& point, int isMax) const
{
btPoint3 clampedPoint(point);
#ifdef OLD_CLAMPING_METHOD
///problem with this clamping method is that the floating point during quantization might still go outside the range [(0|isMax) .. (m_handleSentinel&m_bpHandleMask]|isMax]
///see http://code.google.com/p/bullet/issues/detail?id=87
btVector3 clampedPoint(point);
clampedPoint.setMax(m_worldAabbMin);
clampedPoint.setMin(m_worldAabbMax);
btVector3 v = (clampedPoint - m_worldAabbMin) * m_quantize;
out[0] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getX() & m_bpHandleMask) | isMax);
out[1] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getY() & m_bpHandleMask) | isMax);
out[2] = (BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v.getZ() & m_bpHandleMask) | isMax);
#else
btVector3 v = (point - m_worldAabbMin) * m_quantize;
out[0]=(v[0]<=0)?(BP_FP_INT_TYPE)isMax:(v[0]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[0]&m_bpHandleMask)|isMax);
out[1]=(v[1]<=0)?(BP_FP_INT_TYPE)isMax:(v[1]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[1]&m_bpHandleMask)|isMax);
out[2]=(v[2]<=0)?(BP_FP_INT_TYPE)isMax:(v[2]>=m_handleSentinel)?(BP_FP_INT_TYPE)((m_handleSentinel&m_bpHandleMask)|isMax):(BP_FP_INT_TYPE)(((BP_FP_INT_TYPE)v[2]&m_bpHandleMask)|isMax);
#endif //OLD_CLAMPING_METHOD
}
template <typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::allocHandle()
{
assert(m_firstFreeHandle);
btAssert(m_firstFreeHandle);
BP_FP_INT_TYPE handle = m_firstFreeHandle;
m_firstFreeHandle = getHandle(handle)->GetNextFree();
@@ -367,7 +465,7 @@ BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::allocHandle()
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::freeHandle(BP_FP_INT_TYPE handle)
{
assert(handle > 0 && handle < m_maxHandles);
btAssert(handle > 0 && handle < m_maxHandles);
getHandle(handle)->SetNextFree(m_firstFreeHandle);
m_firstFreeHandle = handle;
@@ -377,7 +475,7 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::freeHandle(BP_FP_INT_TYPE handle)
template <typename BP_FP_INT_TYPE>
BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::addHandle(const btPoint3& aabbMin,const btPoint3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
BP_FP_INT_TYPE btAxisSweep3Internal<BP_FP_INT_TYPE>::addHandle(const btVector3& aabbMin,const btVector3& aabbMax, void* pOwner,short int collisionFilterGroup,short int collisionFilterMask,btDispatcher* dispatcher,void* multiSapProxy)
{
// quantize the bounds
BP_FP_INT_TYPE min[3], max[3];
@@ -440,7 +538,7 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::removeHandle(BP_FP_INT_TYPE handle,bt
//explicitly remove the pairs containing the proxy
//we could do it also in the sortMinUp (passing true)
//todo: compare performance
///@todo: compare performance
if (!m_pairCache->hasDeferredRemoval())
{
m_pairCache->removeOverlappingPairsContainingProxy(pHandle,dispatcher);
@@ -489,6 +587,21 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::removeHandle(BP_FP_INT_TYPE handle,bt
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::resetPool(btDispatcher* dispatcher)
{
if (m_numHandles == 0)
{
m_firstFreeHandle = 1;
{
for (BP_FP_INT_TYPE i = m_firstFreeHandle; i < m_maxHandles; i++)
m_pHandles[i].SetNextFree(static_cast<BP_FP_INT_TYPE>(i + 1));
m_pHandles[m_maxHandles - 1].SetNextFree(0);
}
}
}
extern int gOverlappingPairs;
//#include <stdio.h>
@@ -529,6 +642,7 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::calculateOverlappingPairs(btDispatche
if (!isDuplicate)
{
///important to use an AABB test that is consistent with the broadphase
bool hasOverlap = testAabbOverlap(pair.m_pProxy0,pair.m_pProxy1);
if (hasOverlap)
@@ -574,10 +688,6 @@ void btAxisSweep3Internal<BP_FP_INT_TYPE>::calculateOverlappingPairs(btDispatche
//printf("overlappingPairArray.size()=%d\n",overlappingPairArray.size());
}
}
@@ -616,10 +726,10 @@ bool btAxisSweep3Internal<BP_FP_INT_TYPE>::testOverlap2D(const Handle* pHandleA,
}
template <typename BP_FP_INT_TYPE>
void btAxisSweep3Internal<BP_FP_INT_TYPE>::updateHandle(BP_FP_INT_TYPE handle, const btPoint3& aabbMin,const btPoint3& aabbMax,btDispatcher* dispatcher)
void btAxisSweep3Internal<BP_FP_INT_TYPE>::updateHandle(BP_FP_INT_TYPE handle, const btVector3& aabbMin,const btVector3& aabbMax,btDispatcher* dispatcher)
{
// assert(bounds.IsFinite());
//assert(bounds.HasVolume());
// btAssert(bounds.IsFinite());
//btAssert(bounds.HasVolume());
Handle* pHandle = getHandle(handle);
@@ -895,7 +1005,7 @@ class btAxisSweep3 : public btAxisSweep3Internal<unsigned short int>
{
public:
btAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0);
btAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned short int maxHandles = 16384, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false);
};
@@ -906,7 +1016,7 @@ class bt32BitAxisSweep3 : public btAxisSweep3Internal<unsigned int>
{
public:
bt32BitAxisSweep3(const btPoint3& worldAabbMin,const btPoint3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0);
bt32BitAxisSweep3(const btVector3& worldAabbMin,const btVector3& worldAabbMax, unsigned int maxHandles = 1500000, btOverlappingPairCache* pairCache = 0, bool disableRaycastAccelerator = false);
};

View File

@@ -21,8 +21,22 @@ subject to the following restrictions:
struct btDispatcherInfo;
class btDispatcher;
#include "btBroadphaseProxy.h"
class btOverlappingPairCache;
struct btBroadphaseRayCallback
{
///added some cached data to accelerate ray-AABB tests
btVector3 m_rayDirectionInverse;
unsigned int m_signs[3];
btScalar m_lambda_max;
virtual ~btBroadphaseRayCallback() {}
virtual bool process(const btBroadphaseProxy* proxy) = 0;
};
#include "LinearMath/btVector3.h"
///The btBroadphaseInterface class provides an interface to detect aabb-overlapping object pairs.
@@ -36,7 +50,10 @@ public:
virtual btBroadphaseProxy* createProxy( const btVector3& aabbMin, const btVector3& aabbMax,int shapeType,void* userPtr, short int collisionFilterGroup,short int collisionFilterMask, btDispatcher* dispatcher,void* multiSapProxy) =0;
virtual void destroyProxy(btBroadphaseProxy* proxy,btDispatcher* dispatcher)=0;
virtual void setAabb(btBroadphaseProxy* proxy,const btVector3& aabbMin,const btVector3& aabbMax, btDispatcher* dispatcher)=0;
virtual void getAabb(btBroadphaseProxy* proxy,btVector3& aabbMin, btVector3& aabbMax ) const =0;
virtual void rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback, const btVector3& aabbMin=btVector3(0,0,0), const btVector3& aabbMax = btVector3(0,0,0)) = 0;
///calculateOverlappingPairs is optional: incremental algorithms (sweep and prune) might do it during the set aabb
virtual void calculateOverlappingPairs(btDispatcher* dispatcher)=0;
@@ -47,6 +64,9 @@ public:
///will add some transform later
virtual void getBroadphaseAabb(btVector3& aabbMin,btVector3& aabbMax) const =0;
///reset broadphase internal structures, to ensure determinism/reproducability
virtual void resetPool(btDispatcher* dispatcher) {};
virtual void printStats() = 0;
};

View File

@@ -17,20 +17,24 @@ subject to the following restrictions:
#define BROADPHASE_PROXY_H
#include "LinearMath/btScalar.h" //for SIMD_FORCE_INLINE
#include "LinearMath/btVector3.h"
#include "LinearMath/btAlignedAllocator.h"
/// btDispatcher uses these types
/// IMPORTANT NOTE:The types are ordered polyhedral, implicit convex and concave
/// to facilitate type checking
/// CUSTOM_POLYHEDRAL_SHAPE_TYPE,CUSTOM_CONVEX_SHAPE_TYPE and CUSTOM_CONCAVE_SHAPE_TYPE can be used to extend Bullet without modifying source code
enum BroadphaseNativeTypes
{
// polyhedral convex shapes
// polyhedral convex shapes
BOX_SHAPE_PROXYTYPE,
TRIANGLE_SHAPE_PROXYTYPE,
TETRAHEDRAL_SHAPE_PROXYTYPE,
CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE,
CONVEX_HULL_SHAPE_PROXYTYPE,
CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE,
CUSTOM_POLYHEDRAL_SHAPE_TYPE,
//implicit convex shapes
IMPLICIT_CONVEX_SHAPES_START_HERE,
SPHERE_SHAPE_PROXYTYPE,
@@ -42,10 +46,12 @@ IMPLICIT_CONVEX_SHAPES_START_HERE,
UNIFORM_SCALING_SHAPE_PROXYTYPE,
MINKOWSKI_SUM_SHAPE_PROXYTYPE,
MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE,
CUSTOM_CONVEX_SHAPE_TYPE,
//concave shapes
CONCAVE_SHAPES_START_HERE,
//keep all the convex shapetype below here, for the check IsConvexShape in broadphase proxy!
TRIANGLE_MESH_SHAPE_PROXYTYPE,
SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE,
///used for demo integration FAST/Swift collision library and Bullet
FAST_CONCAVE_MESH_PROXYTYPE,
//terrain
@@ -57,13 +63,18 @@ CONCAVE_SHAPES_START_HERE,
EMPTY_SHAPE_PROXYTYPE,
STATIC_PLANE_PROXYTYPE,
CUSTOM_CONCAVE_SHAPE_TYPE,
CONCAVE_SHAPES_END_HERE,
COMPOUND_SHAPE_PROXYTYPE,
SOFTBODY_SHAPE_PROXYTYPE,
HFFLUID_SHAPE_PROXYTYPE,
HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE,
INVALID_SHAPE_PROXYTYPE,
MAX_BROADPHASE_COLLISION_TYPES
};
@@ -82,20 +93,20 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
KinematicFilter = 4,
DebrisFilter = 8,
SensorTrigger = 16,
CharacterFilter = 32,
AllFilter = -1 //all bits sets: DefaultFilter | StaticFilter | KinematicFilter | DebrisFilter | SensorTrigger
};
//Usually the client btCollisionObject or Rigidbody class
void* m_clientObject;
short int m_collisionFilterGroup;
short int m_collisionFilterMask;
void* m_multiSapParentProxy;
int m_uniqueId;//m_uniqueId is introduced for paircache. could get rid of this, by calculating the address offset etc.
btVector3 m_aabbMin;
btVector3 m_aabbMax;
SIMD_FORCE_INLINE int getUid() const
{
return m_uniqueId;
@@ -106,10 +117,12 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
{
}
btBroadphaseProxy(void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
btBroadphaseProxy(const btVector3& aabbMin,const btVector3& aabbMax,void* userPtr,short int collisionFilterGroup, short int collisionFilterMask,void* multiSapParentProxy=0)
:m_clientObject(userPtr),
m_collisionFilterGroup(collisionFilterGroup),
m_collisionFilterMask(collisionFilterMask)
m_collisionFilterMask(collisionFilterMask),
m_aabbMin(aabbMin),
m_aabbMax(aabbMax)
{
m_multiSapParentProxy = multiSapParentProxy;
}
@@ -158,7 +171,7 @@ ATTRIBUTE_ALIGNED16(struct) btBroadphasePair
m_pProxy0(0),
m_pProxy1(0),
m_algorithm(0),
m_userInfo(0)
m_internalInfo1(0)
{
}
@@ -168,14 +181,14 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
: m_pProxy0(other.m_pProxy0),
m_pProxy1(other.m_pProxy1),
m_algorithm(other.m_algorithm),
m_userInfo(other.m_userInfo)
m_internalInfo1(other.m_internalInfo1)
{
}
btBroadphasePair(btBroadphaseProxy& proxy0,btBroadphaseProxy& proxy1)
{
//keep them sorted, so the std::set operations work
if (&proxy0 < &proxy1)
if (proxy0.m_uniqueId < proxy1.m_uniqueId)
{
m_pProxy0 = &proxy0;
m_pProxy1 = &proxy1;
@@ -187,7 +200,7 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
}
m_algorithm = 0;
m_userInfo = 0;
m_internalInfo1 = 0;
}
@@ -195,7 +208,7 @@ BT_DECLARE_ALIGNED_ALLOCATOR();
btBroadphaseProxy* m_pProxy1;
mutable btCollisionAlgorithm* m_algorithm;
mutable void* m_userInfo;
union { void* m_internalInfo1; int m_internalTmpValue;};//don't use this data, it will be removed in future version.
};
@@ -216,8 +229,13 @@ class btBroadphasePairSortPredicate
bool operator() ( const btBroadphasePair& a, const btBroadphasePair& b )
{
return a.m_pProxy0 > b.m_pProxy0 ||
(a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 > b.m_pProxy1) ||
const int uidA0 = a.m_pProxy0 ? a.m_pProxy0->m_uniqueId : -1;
const int uidB0 = b.m_pProxy0 ? b.m_pProxy0->m_uniqueId : -1;
const int uidA1 = a.m_pProxy1 ? a.m_pProxy1->m_uniqueId : -1;
const int uidB1 = b.m_pProxy1 ? b.m_pProxy1->m_uniqueId : -1;
return uidA0 > uidB0 ||
(a.m_pProxy0 == b.m_pProxy0 && uidA1 > uidB1) ||
(a.m_pProxy0 == b.m_pProxy0 && a.m_pProxy1 == b.m_pProxy1 && a.m_algorithm > b.m_algorithm);
}
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -26,19 +26,19 @@ subject to the following restrictions:
#if DBVT_BP_PROFILE
struct ProfileScope
{
{
__forceinline ProfileScope(btClock& clock,unsigned long& value) :
m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds())
{
}
m_clock(&clock),m_value(&value),m_base(clock.getTimeMicroseconds())
{
}
__forceinline ~ProfileScope()
{
{
(*m_value)+=m_clock->getTimeMicroseconds()-m_base;
}
}
btClock* m_clock;
unsigned long* m_value;
unsigned long m_base;
};
};
#define SPC(_value_) ProfileScope spc_scope(m_clock,_value_)
#else
#define SPC(_value_)
@@ -52,35 +52,35 @@ struct ProfileScope
template <typename T>
static inline void listappend(T* item,T*& list)
{
item->links[0]=0;
item->links[1]=list;
if(list) list->links[0]=item;
list=item;
item->links[0]=0;
item->links[1]=list;
if(list) list->links[0]=item;
list=item;
}
//
template <typename T>
static inline void listremove(T* item,T*& list)
{
if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1];
if(item->links[1]) item->links[1]->links[0]=item->links[0];
if(item->links[0]) item->links[0]->links[1]=item->links[1]; else list=item->links[1];
if(item->links[1]) item->links[1]->links[0]=item->links[0];
}
//
template <typename T>
static inline int listcount(T* root)
{
int n=0;
while(root) { ++n;root=root->links[1]; }
return(n);
int n=0;
while(root) { ++n;root=root->links[1]; }
return(n);
}
//
template <typename T>
static inline void clear(T& value)
{
static const struct ZeroDummy : T {} zerodummy;
value=zerodummy;
static const struct ZeroDummy : T {} zerodummy;
value=zerodummy;
}
//
@@ -90,25 +90,26 @@ value=zerodummy;
/* Tree collider */
struct btDbvtTreeCollider : btDbvt::ICollide
{
btDbvtBroadphase* pbp;
btDbvtProxy* proxy;
btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {}
void Process(const btDbvtNode* na,const btDbvtNode* nb)
btDbvtBroadphase* pbp;
btDbvtProxy* proxy;
btDbvtTreeCollider(btDbvtBroadphase* p) : pbp(p) {}
void Process(const btDbvtNode* na,const btDbvtNode* nb)
{
if(na!=nb)
if(na!=nb)
{
btDbvtProxy* pa=(btDbvtProxy*)na->data;
btDbvtProxy* pb=(btDbvtProxy*)nb->data;
#if DBVT_BP_SORTPAIRS
if(pa>pb) btSwap(pa,pb);
#endif
pbp->m_paircache->addOverlappingPair(pa,pb);
++pbp->m_newpairs;
btDbvtProxy* pa=(btDbvtProxy*)na->data;
btDbvtProxy* pb=(btDbvtProxy*)nb->data;
#if DBVT_BP_SORTPAIRS
if(pa->m_uniqueId>pb->m_uniqueId)
btSwap(pa,pb);
#endif
pbp->m_paircache->addOverlappingPair(pa,pb);
++pbp->m_newpairs;
}
}
void Process(const btDbvtNode* n)
void Process(const btDbvtNode* n)
{
Process(n,proxy->leaf);
Process(n,proxy->leaf);
}
};
@@ -119,146 +120,197 @@ void Process(const btDbvtNode* n)
//
btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache* paircache)
{
m_deferedcollide = true;//false;
m_needcleanup = true;
m_releasepaircache = (paircache!=0)?false:true;
m_prediction = 1/(btScalar)2;
m_stageCurrent = 0;
m_fixedleft = 0;
m_fupdates = 1;
m_dupdates = 0;
m_cupdates = 10;
m_newpairs = 1;
m_updates_call = 0;
m_updates_done = 0;
m_updates_ratio = 0;
m_paircache = paircache?
paircache :
new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache();
m_gid = 0;
m_pid = 0;
m_cid = 0;
for(int i=0;i<=STAGECOUNT;++i)
m_deferedcollide = false;
m_needcleanup = true;
m_releasepaircache = (paircache!=0)?false:true;
m_prediction = 1/(btScalar)2;
m_stageCurrent = 0;
m_fixedleft = 0;
m_fupdates = 1;
m_dupdates = 0;
m_cupdates = 10;
m_newpairs = 1;
m_updates_call = 0;
m_updates_done = 0;
m_updates_ratio = 0;
m_paircache = paircache? paircache : new(btAlignedAlloc(sizeof(btHashedOverlappingPairCache),16)) btHashedOverlappingPairCache();
m_gid = 0;
m_pid = 0;
m_cid = 0;
for(int i=0;i<=STAGECOUNT;++i)
{
m_stageRoots[i]=0;
m_stageRoots[i]=0;
}
#if DBVT_BP_PROFILE
clear(m_profiling);
clear(m_profiling);
#endif
}
//
btDbvtBroadphase::~btDbvtBroadphase()
{
if(m_releasepaircache)
{
m_paircache->~btOverlappingPairCache();
btAlignedFree(m_paircache);
}
if(m_releasepaircache)
{
m_paircache->~btOverlappingPairCache();
btAlignedFree(m_paircache);
}
}
//
btBroadphaseProxy* btDbvtBroadphase::createProxy( const btVector3& aabbMin,
const btVector3& aabbMax,
int /*shapeType*/,
void* userPtr,
short int collisionFilterGroup,
short int collisionFilterMask,
btDispatcher* dispatcher,
void* /*multiSapProxy*/)
const btVector3& aabbMax,
int /*shapeType*/,
void* userPtr,
short int collisionFilterGroup,
short int collisionFilterMask,
btDispatcher* /*dispatcher*/,
void* /*multiSapProxy*/)
{
btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( userPtr,
collisionFilterGroup,
collisionFilterMask);
proxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
proxy->stage = m_stageCurrent;
proxy->m_uniqueId = ++m_gid;
proxy->leaf = m_sets[0].insert(proxy->aabb,proxy);
listappend(proxy,m_stageRoots[m_stageCurrent]);
if(!m_deferedcollide)
btDbvtProxy* proxy=new(btAlignedAlloc(sizeof(btDbvtProxy),16)) btDbvtProxy( aabbMin,aabbMax,userPtr,
collisionFilterGroup,
collisionFilterMask);
btDbvtAabbMm aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
//bproxy->aabb = btDbvtVolume::FromMM(aabbMin,aabbMax);
proxy->stage = m_stageCurrent;
proxy->m_uniqueId = ++m_gid;
proxy->leaf = m_sets[0].insert(aabb,proxy);
listappend(proxy,m_stageRoots[m_stageCurrent]);
if(!m_deferedcollide)
{
btDbvtTreeCollider collider(this);
collider.proxy=proxy;
btDbvt::collideTV(m_sets[0].m_root,proxy->aabb,collider);
btDbvtTreeCollider collider(this);
collider.proxy=proxy;
m_sets[0].collideTV(m_sets[0].m_root,aabb,collider);
m_sets[1].collideTV(m_sets[1].m_root,aabb,collider);
}
return(proxy);
return(proxy);
}
//
void btDbvtBroadphase::destroyProxy( btBroadphaseProxy* absproxy,
btDispatcher* dispatcher)
btDispatcher* dispatcher)
{
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
if(proxy->stage==STAGECOUNT)
m_sets[1].remove(proxy->leaf);
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
if(proxy->stage==STAGECOUNT)
m_sets[1].remove(proxy->leaf);
else
m_sets[0].remove(proxy->leaf);
listremove(proxy,m_stageRoots[proxy->stage]);
m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher);
btAlignedFree(proxy);
m_needcleanup=true;
m_sets[0].remove(proxy->leaf);
listremove(proxy,m_stageRoots[proxy->stage]);
m_paircache->removeOverlappingPairsContainingProxy(proxy,dispatcher);
btAlignedFree(proxy);
m_needcleanup=true;
}
void btDbvtBroadphase::getAabb(btBroadphaseProxy* absproxy,btVector3& aabbMin, btVector3& aabbMax ) const
{
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
aabbMin = proxy->m_aabbMin;
aabbMax = proxy->m_aabbMax;
}
struct BroadphaseRayTester : btDbvt::ICollide
{
btBroadphaseRayCallback& m_rayCallback;
BroadphaseRayTester(btBroadphaseRayCallback& orgCallback)
:m_rayCallback(orgCallback)
{
}
void Process(const btDbvtNode* leaf)
{
btDbvtProxy* proxy=(btDbvtProxy*)leaf->data;
m_rayCallback.process(proxy);
}
};
void btDbvtBroadphase::rayTest(const btVector3& rayFrom,const btVector3& rayTo, btBroadphaseRayCallback& rayCallback,const btVector3& aabbMin,const btVector3& aabbMax)
{
BroadphaseRayTester callback(rayCallback);
m_sets[0].rayTestInternal( m_sets[0].m_root,
rayFrom,
rayTo,
rayCallback.m_rayDirectionInverse,
rayCallback.m_signs,
rayCallback.m_lambda_max,
aabbMin,
aabbMax,
callback);
m_sets[1].rayTestInternal( m_sets[1].m_root,
rayFrom,
rayTo,
rayCallback.m_rayDirectionInverse,
rayCallback.m_signs,
rayCallback.m_lambda_max,
aabbMin,
aabbMax,
callback);
}
//
void btDbvtBroadphase::setAabb( btBroadphaseProxy* absproxy,
const btVector3& aabbMin,
const btVector3& aabbMax,
btDispatcher* /*dispatcher*/)
const btVector3& aabbMin,
const btVector3& aabbMax,
btDispatcher* /*dispatcher*/)
{
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
btDbvtProxy* proxy=(btDbvtProxy*)absproxy;
ATTRIBUTE_ALIGNED16(btDbvtVolume) aabb=btDbvtVolume::FromMM(aabbMin,aabbMax);
#if DBVT_BP_PREVENTFALSEUPDATE
if(NotEqual(aabb,proxy->leaf->volume))
if(NotEqual(aabb,proxy->leaf->volume))
#endif
{
bool docollide=false;
if(proxy->stage==STAGECOUNT)
bool docollide=false;
if(proxy->stage==STAGECOUNT)
{/* fixed -> dynamic set */
m_sets[1].remove(proxy->leaf);
proxy->leaf=m_sets[0].insert(aabb,proxy);
docollide=true;
m_sets[1].remove(proxy->leaf);
proxy->leaf=m_sets[0].insert(aabb,proxy);
docollide=true;
}
else
{/* dynamic set */
++m_updates_call;
if(Intersect(proxy->leaf->volume,aabb))
++m_updates_call;
if(Intersect(proxy->leaf->volume,aabb))
{/* Moving */
const btVector3 delta=aabbMin-proxy->aabb.Mins();
btVector3 velocity(aabb.Extents()*m_prediction);
if(delta[0]<0) velocity[0]=-velocity[0];
if(delta[1]<0) velocity[1]=-velocity[1];
if(delta[2]<0) velocity[2]=-velocity[2];
if (
#ifdef DBVT_BP_MARGIN
m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN)
#else
m_sets[0].update(proxy->leaf,aabb,velocity)
#endif
)
const btVector3 delta=aabbMin-proxy->m_aabbMin;
btVector3 velocity(((proxy->m_aabbMax-proxy->m_aabbMin)/2)*m_prediction);
if(delta[0]<0) velocity[0]=-velocity[0];
if(delta[1]<0) velocity[1]=-velocity[1];
if(delta[2]<0) velocity[2]=-velocity[2];
if (
#ifdef DBVT_BP_MARGIN
m_sets[0].update(proxy->leaf,aabb,velocity,DBVT_BP_MARGIN)
#else
m_sets[0].update(proxy->leaf,aabb,velocity)
#endif
)
{
++m_updates_done;
docollide=true;
++m_updates_done;
docollide=true;
}
}
else
{/* Teleporting */
m_sets[0].update(proxy->leaf,aabb);
++m_updates_done;
docollide=true;
m_sets[0].update(proxy->leaf,aabb);
++m_updates_done;
docollide=true;
}
}
listremove(proxy,m_stageRoots[proxy->stage]);
proxy->aabb = aabb;
proxy->stage = m_stageCurrent;
listappend(proxy,m_stageRoots[m_stageCurrent]);
if(docollide)
listremove(proxy,m_stageRoots[proxy->stage]);
proxy->m_aabbMin = aabbMin;
proxy->m_aabbMax = aabbMax;
proxy->stage = m_stageCurrent;
listappend(proxy,m_stageRoots[m_stageCurrent]);
if(docollide)
{
m_needcleanup=true;
if(!m_deferedcollide)
m_needcleanup=true;
if(!m_deferedcollide)
{
btDbvtTreeCollider collider(this);
btDbvt::collideTT(m_sets[1].m_root,proxy->leaf,collider);
btDbvt::collideTT(m_sets[0].m_root,proxy->leaf,collider);
btDbvtTreeCollider collider(this);
m_sets[1].collideTTpersistentStack(m_sets[1].m_root,proxy->leaf,collider);
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,proxy->leaf,collider);
}
}
}
@@ -267,132 +319,226 @@ if(NotEqual(aabb,proxy->leaf->volume))
//
void btDbvtBroadphase::calculateOverlappingPairs(btDispatcher* dispatcher)
{
collide(dispatcher);
collide(dispatcher);
#if DBVT_BP_PROFILE
if(0==(m_pid%DBVT_BP_PROFILING_RATE))
if(0==(m_pid%DBVT_BP_PROFILING_RATE))
{
printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs());
unsigned int total=m_profiling.m_total;
if(total<=0) total=1;
printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE);
printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE);
printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE);
printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE);
const unsigned long sum=m_profiling.m_ddcollide+
m_profiling.m_fdcollide+
m_profiling.m_cleanup;
printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE);
printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE));
clear(m_profiling);
m_clock.reset();
printf("fixed(%u) dynamics(%u) pairs(%u)\r\n",m_sets[1].m_leaves,m_sets[0].m_leaves,m_paircache->getNumOverlappingPairs());
unsigned int total=m_profiling.m_total;
if(total<=0) total=1;
printf("ddcollide: %u%% (%uus)\r\n",(50+m_profiling.m_ddcollide*100)/total,m_profiling.m_ddcollide/DBVT_BP_PROFILING_RATE);
printf("fdcollide: %u%% (%uus)\r\n",(50+m_profiling.m_fdcollide*100)/total,m_profiling.m_fdcollide/DBVT_BP_PROFILING_RATE);
printf("cleanup: %u%% (%uus)\r\n",(50+m_profiling.m_cleanup*100)/total,m_profiling.m_cleanup/DBVT_BP_PROFILING_RATE);
printf("total: %uus\r\n",total/DBVT_BP_PROFILING_RATE);
const unsigned long sum=m_profiling.m_ddcollide+
m_profiling.m_fdcollide+
m_profiling.m_cleanup;
printf("leaked: %u%% (%uus)\r\n",100-((50+sum*100)/total),(total-sum)/DBVT_BP_PROFILING_RATE);
printf("job counts: %u%%\r\n",(m_profiling.m_jobcount*100)/((m_sets[0].m_leaves+m_sets[1].m_leaves)*DBVT_BP_PROFILING_RATE));
clear(m_profiling);
m_clock.reset();
}
#endif
performDeferredRemoval(dispatcher);
}
void btDbvtBroadphase::performDeferredRemoval(btDispatcher* dispatcher)
{
if (m_paircache->hasDeferredRemoval())
{
btBroadphasePairArray& overlappingPairArray = m_paircache->getOverlappingPairArray();
//perform a sort, to find duplicates and to sort 'invalid' pairs to the end
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
int invalidPair = 0;
int i;
btBroadphasePair previousPair;
previousPair.m_pProxy0 = 0;
previousPair.m_pProxy1 = 0;
previousPair.m_algorithm = 0;
for (i=0;i<overlappingPairArray.size();i++)
{
btBroadphasePair& pair = overlappingPairArray[i];
bool isDuplicate = (pair == previousPair);
previousPair = pair;
bool needsRemoval = false;
if (!isDuplicate)
{
//important to perform AABB check that is consistent with the broadphase
btDbvtProxy* pa=(btDbvtProxy*)pair.m_pProxy0;
btDbvtProxy* pb=(btDbvtProxy*)pair.m_pProxy1;
bool hasOverlap = Intersect(pa->leaf->volume,pb->leaf->volume);
if (hasOverlap)
{
needsRemoval = false;
} else
{
needsRemoval = true;
}
} else
{
//remove duplicate
needsRemoval = true;
//should have no algorithm
btAssert(!pair.m_algorithm);
}
if (needsRemoval)
{
m_paircache->cleanOverlappingPair(pair,dispatcher);
pair.m_pProxy0 = 0;
pair.m_pProxy1 = 0;
invalidPair++;
}
}
//perform a sort, to sort 'invalid' pairs to the end
overlappingPairArray.quickSort(btBroadphasePairSortPredicate());
overlappingPairArray.resize(overlappingPairArray.size() - invalidPair);
}
}
//
void btDbvtBroadphase::collide(btDispatcher* dispatcher)
{
SPC(m_profiling.m_total);
/* optimize */
m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100);
if(m_fixedleft)
/*printf("---------------------------------------------------------\n");
printf("m_sets[0].m_leaves=%d\n",m_sets[0].m_leaves);
printf("m_sets[1].m_leaves=%d\n",m_sets[1].m_leaves);
printf("numPairs = %d\n",getOverlappingPairCache()->getNumOverlappingPairs());
{
const int count=1+(m_sets[1].m_leaves*m_fupdates)/100;
m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100);
m_fixedleft=btMax<int>(0,m_fixedleft-count);
int i;
for (i=0;i<getOverlappingPairCache()->getNumOverlappingPairs();i++)
{
printf("pair[%d]=(%d,%d),",i,getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy0->getUid(),
getOverlappingPairCache()->getOverlappingPairArray()[i].m_pProxy1->getUid());
}
printf("\n");
}
/* dynamic -> fixed set */
m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT;
btDbvtProxy* current=m_stageRoots[m_stageCurrent];
if(current)
*/
SPC(m_profiling.m_total);
/* optimize */
m_sets[0].optimizeIncremental(1+(m_sets[0].m_leaves*m_dupdates)/100);
if(m_fixedleft)
{
btDbvtTreeCollider collider(this);
do {
btDbvtProxy* next=current->links[1];
listremove(current,m_stageRoots[current->stage]);
listappend(current,m_stageRoots[STAGECOUNT]);
#if DBVT_BP_ACCURATESLEEPING
m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher);
collider.proxy=current;
btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider);
btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider);
#endif
m_sets[0].remove(current->leaf);
current->leaf = m_sets[1].insert(current->aabb,current);
current->stage = STAGECOUNT;
current = next;
const int count=1+(m_sets[1].m_leaves*m_fupdates)/100;
m_sets[1].optimizeIncremental(1+(m_sets[1].m_leaves*m_fupdates)/100);
m_fixedleft=btMax<int>(0,m_fixedleft-count);
}
/* dynamic -> fixed set */
m_stageCurrent=(m_stageCurrent+1)%STAGECOUNT;
btDbvtProxy* current=m_stageRoots[m_stageCurrent];
if(current)
{
btDbvtTreeCollider collider(this);
do {
btDbvtProxy* next=current->links[1];
listremove(current,m_stageRoots[current->stage]);
listappend(current,m_stageRoots[STAGECOUNT]);
#if DBVT_BP_ACCURATESLEEPING
m_paircache->removeOverlappingPairsContainingProxy(current,dispatcher);
collider.proxy=current;
btDbvt::collideTV(m_sets[0].m_root,current->aabb,collider);
btDbvt::collideTV(m_sets[1].m_root,current->aabb,collider);
#endif
m_sets[0].remove(current->leaf);
ATTRIBUTE_ALIGNED16(btDbvtVolume) curAabb=btDbvtVolume::FromMM(current->m_aabbMin,current->m_aabbMax);
current->leaf = m_sets[1].insert(curAabb,current);
current->stage = STAGECOUNT;
current = next;
} while(current);
m_fixedleft=m_sets[1].m_leaves;
m_needcleanup=true;
m_fixedleft=m_sets[1].m_leaves;
m_needcleanup=true;
}
/* collide dynamics */
/* collide dynamics */
{
btDbvtTreeCollider collider(this);
if(m_deferedcollide)
btDbvtTreeCollider collider(this);
if(m_deferedcollide)
{
SPC(m_profiling.m_fdcollide);
btDbvt::collideTT(m_sets[0].m_root,m_sets[1].m_root,collider);
SPC(m_profiling.m_fdcollide);
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[1].m_root,collider);
}
if(m_deferedcollide)
if(m_deferedcollide)
{
SPC(m_profiling.m_ddcollide);
btDbvt::collideTT(m_sets[0].m_root,m_sets[0].m_root,collider);
SPC(m_profiling.m_ddcollide);
m_sets[0].collideTTpersistentStack(m_sets[0].m_root,m_sets[0].m_root,collider);
}
}
/* clean up */
if(m_needcleanup)
/* clean up */
if(m_needcleanup)
{
SPC(m_profiling.m_cleanup);
btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray();
if(pairs.size()>0)
SPC(m_profiling.m_cleanup);
btBroadphasePairArray& pairs=m_paircache->getOverlappingPairArray();
if(pairs.size()>0)
{
const int ci=pairs.size();
int ni=btMin(ci,btMax<int>(m_newpairs,(ci*m_cupdates)/100));
for(int i=0;i<ni;++i)
int ni=btMin(pairs.size(),btMax<int>(m_newpairs,(pairs.size()*m_cupdates)/100));
for(int i=0;i<ni;++i)
{
btBroadphasePair& p=pairs[(m_cid+i)%ci];
btDbvtProxy* pa=(btDbvtProxy*)p.m_pProxy0;
btDbvtProxy* pb=(btDbvtProxy*)p.m_pProxy1;
if(!Intersect(pa->leaf->volume,pb->leaf->volume))
btBroadphasePair& p=pairs[(m_cid+i)%pairs.size()];
btDbvtProxy* pa=(btDbvtProxy*)p.m_pProxy0;
btDbvtProxy* pb=(btDbvtProxy*)p.m_pProxy1;
if(!Intersect(pa->leaf->volume,pb->leaf->volume))
{
#if DBVT_BP_SORTPAIRS
if(pa>pb) btSwap(pa,pb);
#endif
m_paircache->removeOverlappingPair(pa,pb,dispatcher);
--ni;--i;
#if DBVT_BP_SORTPAIRS
if(pa->m_uniqueId>pb->m_uniqueId)
btSwap(pa,pb);
#endif
m_paircache->removeOverlappingPair(pa,pb,dispatcher);
--ni;--i;
}
}
if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0;
if(pairs.size()>0) m_cid=(m_cid+ni)%pairs.size(); else m_cid=0;
}
}
++m_pid;
m_newpairs=1;
m_needcleanup=false;
if(m_updates_call>0)
++m_pid;
m_newpairs=1;
m_needcleanup=false;
if(m_updates_call>0)
{ m_updates_ratio=m_updates_done/(btScalar)m_updates_call; }
else
{ m_updates_ratio=0; }
m_updates_done/=2;
m_updates_call/=2;
m_updates_done/=2;
m_updates_call/=2;
}
//
void btDbvtBroadphase::optimize()
{
m_sets[0].optimizeTopDown();
m_sets[1].optimizeTopDown();
m_sets[0].optimizeTopDown();
m_sets[1].optimizeTopDown();
}
//
btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache()
{
return(m_paircache);
return(m_paircache);
}
//
const btOverlappingPairCache* btDbvtBroadphase::getOverlappingPairCache() const
{
return(m_paircache);
return(m_paircache);
}
//
@@ -401,16 +547,49 @@ void btDbvtBroadphase::getBroadphaseAabb(btVector3& aabbMin,btVector3& aab
ATTRIBUTE_ALIGNED16(btDbvtVolume) bounds;
if(!m_sets[0].empty())
if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume,
m_sets[1].m_root->volume,bounds);
else
bounds=m_sets[0].m_root->volume;
else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume;
else
bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0);
aabbMin=bounds.Mins();
aabbMax=bounds.Maxs();
if(!m_sets[0].empty())
if(!m_sets[1].empty()) Merge( m_sets[0].m_root->volume,
m_sets[1].m_root->volume,bounds);
else
bounds=m_sets[0].m_root->volume;
else if(!m_sets[1].empty()) bounds=m_sets[1].m_root->volume;
else
bounds=btDbvtVolume::FromCR(btVector3(0,0,0),0);
aabbMin=bounds.Mins();
aabbMax=bounds.Maxs();
}
void btDbvtBroadphase::resetPool(btDispatcher* dispatcher)
{
int totalObjects = m_sets[0].m_leaves + m_sets[1].m_leaves;
if (!totalObjects)
{
//reset internal dynamic tree data structures
m_sets[0].clear();
m_sets[1].clear();
m_deferedcollide = false;
m_needcleanup = true;
m_prediction = 1/(btScalar)2;
m_stageCurrent = 0;
m_fixedleft = 0;
m_fupdates = 1;
m_dupdates = 0;
m_cupdates = 10;
m_newpairs = 1;
m_updates_call = 0;
m_updates_done = 0;
m_updates_ratio = 0;
m_gid = 0;
m_pid = 0;
m_cid = 0;
for(int i=0;i<=STAGECOUNT;++i)
{
m_stageRoots[i]=0;
}
}
}
//
@@ -421,9 +600,9 @@ void btDbvtBroadphase::printStats()
#if DBVT_BP_ENABLE_BENCHMARK
struct btBroadphaseBenchmark
{
{
struct Experiment
{
{
const char* name;
int object_count;
int update_count;
@@ -431,109 +610,109 @@ struct btBroadphaseBenchmark
int iterations;
btScalar speed;
btScalar amplitude;
};
};
struct Object
{
{
btVector3 center;
btVector3 extents;
btBroadphaseProxy* proxy;
btScalar time;
void update(btScalar speed,btScalar amplitude,btBroadphaseInterface* pbi)
{
{
time += speed;
center[0] = btCos(time*(btScalar)2.17)*amplitude+
btSin(time)*amplitude/2;
btSin(time)*amplitude/2;
center[1] = btCos(time*(btScalar)1.38)*amplitude+
btSin(time)*amplitude;
btSin(time)*amplitude;
center[2] = btSin(time*(btScalar)0.777)*amplitude;
pbi->setAabb(proxy,center-extents,center+extents,0);
}
};
}
};
static int UnsignedRand(int range=RAND_MAX-1) { return(rand()%(range+1)); }
static btScalar UnitRand() { return(UnsignedRand(16384)/(btScalar)16384); }
static void OutputTime(const char* name,btClock& c,unsigned count=0)
{
{
const unsigned long us=c.getTimeMicroseconds();
const unsigned long ms=(us+500)/1000;
const btScalar sec=us/(btScalar)(1000*1000);
if(count>0)
printf("%s : %u us (%u ms), %.2f/s\r\n",name,us,ms,count/sec);
else
else
printf("%s : %u us (%u ms)\r\n",name,us,ms);
}
};
}
};
void btDbvtBroadphase::benchmark(btBroadphaseInterface* pbi)
{
static const btBroadphaseBenchmark::Experiment experiments[]=
static const btBroadphaseBenchmark::Experiment experiments[]=
{
{"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100},
/*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100},
{"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/
{"1024o.10%",1024,10,0,8192,(btScalar)0.005,(btScalar)100},
/*{"4096o.10%",4096,10,0,8192,(btScalar)0.005,(btScalar)100},
{"8192o.10%",8192,10,0,8192,(btScalar)0.005,(btScalar)100},*/
};
static const int nexperiments=sizeof(experiments)/sizeof(experiments[0]);
btAlignedObjectArray<btBroadphaseBenchmark::Object*> objects;
btClock wallclock;
/* Begin */
for(int iexp=0;iexp<nexperiments;++iexp)
static const int nexperiments=sizeof(experiments)/sizeof(experiments[0]);
btAlignedObjectArray<btBroadphaseBenchmark::Object*> objects;
btClock wallclock;
/* Begin */
for(int iexp=0;iexp<nexperiments;++iexp)
{
const btBroadphaseBenchmark::Experiment& experiment=experiments[iexp];
const int object_count=experiment.object_count;
const int update_count=(object_count*experiment.update_count)/100;
const int spawn_count=(object_count*experiment.spawn_count)/100;
const btScalar speed=experiment.speed;
const btScalar amplitude=experiment.amplitude;
printf("Experiment #%u '%s':\r\n",iexp,experiment.name);
printf("\tObjects: %u\r\n",object_count);
printf("\tUpdate: %u\r\n",update_count);
printf("\tSpawn: %u\r\n",spawn_count);
printf("\tSpeed: %f\r\n",speed);
printf("\tAmplitude: %f\r\n",amplitude);
srand(180673);
/* Create objects */
wallclock.reset();
objects.reserve(object_count);
for(int i=0;i<object_count;++i)
const btBroadphaseBenchmark::Experiment& experiment=experiments[iexp];
const int object_count=experiment.object_count;
const int update_count=(object_count*experiment.update_count)/100;
const int spawn_count=(object_count*experiment.spawn_count)/100;
const btScalar speed=experiment.speed;
const btScalar amplitude=experiment.amplitude;
printf("Experiment #%u '%s':\r\n",iexp,experiment.name);
printf("\tObjects: %u\r\n",object_count);
printf("\tUpdate: %u\r\n",update_count);
printf("\tSpawn: %u\r\n",spawn_count);
printf("\tSpeed: %f\r\n",speed);
printf("\tAmplitude: %f\r\n",amplitude);
srand(180673);
/* Create objects */
wallclock.reset();
objects.reserve(object_count);
for(int i=0;i<object_count;++i)
{
btBroadphaseBenchmark::Object* po=new btBroadphaseBenchmark::Object();
po->center[0]=btBroadphaseBenchmark::UnitRand()*50;
po->center[1]=btBroadphaseBenchmark::UnitRand()*50;
po->center[2]=btBroadphaseBenchmark::UnitRand()*50;
po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2;
po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2;
po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2;
po->time=btBroadphaseBenchmark::UnitRand()*2000;
po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0);
objects.push_back(po);
btBroadphaseBenchmark::Object* po=new btBroadphaseBenchmark::Object();
po->center[0]=btBroadphaseBenchmark::UnitRand()*50;
po->center[1]=btBroadphaseBenchmark::UnitRand()*50;
po->center[2]=btBroadphaseBenchmark::UnitRand()*50;
po->extents[0]=btBroadphaseBenchmark::UnitRand()*2+2;
po->extents[1]=btBroadphaseBenchmark::UnitRand()*2+2;
po->extents[2]=btBroadphaseBenchmark::UnitRand()*2+2;
po->time=btBroadphaseBenchmark::UnitRand()*2000;
po->proxy=pbi->createProxy(po->center-po->extents,po->center+po->extents,0,po,1,1,0,0);
objects.push_back(po);
}
btBroadphaseBenchmark::OutputTime("\tInitialization",wallclock);
/* First update */
wallclock.reset();
for(int i=0;i<objects.size();++i)
btBroadphaseBenchmark::OutputTime("\tInitialization",wallclock);
/* First update */
wallclock.reset();
for(int i=0;i<objects.size();++i)
{
objects[i]->update(speed,amplitude,pbi);
objects[i]->update(speed,amplitude,pbi);
}
btBroadphaseBenchmark::OutputTime("\tFirst update",wallclock);
/* Updates */
wallclock.reset();
for(int i=0;i<experiment.iterations;++i)
btBroadphaseBenchmark::OutputTime("\tFirst update",wallclock);
/* Updates */
wallclock.reset();
for(int i=0;i<experiment.iterations;++i)
{
for(int j=0;j<update_count;++j)
for(int j=0;j<update_count;++j)
{
objects[j]->update(speed,amplitude,pbi);
objects[j]->update(speed,amplitude,pbi);
}
pbi->calculateOverlappingPairs(0);
pbi->calculateOverlappingPairs(0);
}
btBroadphaseBenchmark::OutputTime("\tUpdate",wallclock,experiment.iterations);
/* Clean up */
wallclock.reset();
for(int i=0;i<objects.size();++i)
btBroadphaseBenchmark::OutputTime("\tUpdate",wallclock,experiment.iterations);
/* Clean up */
wallclock.reset();
for(int i=0;i<objects.size();++i)
{
pbi->destroyProxy(objects[i]->proxy,0);
delete objects[i];
pbi->destroyProxy(objects[i]->proxy,0);
delete objects[i];
}
objects.resize(0);
btBroadphaseBenchmark::OutputTime("\tRelease",wallclock);
objects.resize(0);
btBroadphaseBenchmark::OutputTime("\tRelease",wallclock);
}
}
@@ -545,3 +724,4 @@ void btDbvtBroadphase::benchmark(btBroadphaseInterface*)
#if DBVT_BP_PROFILE
#undef SPC
#endif

Some files were not shown because too many files have changed in this diff Show More