Commit Graph

13994 Commits

Author SHA1 Message Date
Ton Roosendaal 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
Ton Roosendaal 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
Campbell Barton 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
Joshua Leung 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
Joshua Leung 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
Joshua Leung 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
Campbell Barton b9ef34b6e5 patch from Xavier Thomas, add back the sequencer snap operator 2009-06-09 21:29:59 +00:00
Guillermo S. Romero 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
Brecht Van Lommel 9a54ca9af7 Fix for bug #18710: a crash with hair emitted from vertices. 2009-06-09 18:50:02 +00:00
Brecht Van Lommel e917b1043e Fix for bug #18860: particle hair strands missed first segment
when rendering as regular geometry (not strand render).
2009-06-09 18:25:57 +00:00
Campbell Barton 8adb155e98 Built in limitations for script scanning was making python fail on meta-androcto script pack.
If a total of 30 subdirs was hit, or 4 dirs deep was hit - script scanning would quit, skipping files in the root scripts path too.

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

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

* flt_properties.py had #!BPY without a menu header.
2009-06-09 18:21:48 +00:00
Brecht Van Lommel 19c9708a16 Fix for bug #18855: in texture node editor, "Add New" for world
did not set texture in correct place and crashed without an active
object.
2009-06-09 17:56:07 +00:00
Ken Hughes 61889df87b Tools
-----
Bugfix #18835: negatively scaled objects resulted in incorrect boolean
output.  Commit to trunk instead of tagged release this time :-p
2009-06-09 17:04:50 +00:00
Thomas Dinges 83f9f1d4d6 2.5 Texture RNA:
* Wrapped some Mapping properties and added them into the layout.
2009-06-09 16:04:07 +00:00
Brecht Van Lommel 20eaa1466d Fix for bug #18881 and #18866: Surface option for Fields crashed
on non-mesh objects, so hide it if not applicable. Also made it
support surf, curve, font objects.
2009-06-09 13:03:00 +00:00
Joshua Leung abdb8fd94d NLA SoC: Added simple delete-strips operator (XKEY/DELKEY) 2009-06-09 12:28:49 +00:00
Joshua Leung 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
Campbell Barton e4b427bb59 [#18847] Material.c Python API calls
Adds access to...
- Anisotropy
- Mirr Threshold
- Trans Threshold

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

[#18891] BGE Convert script Python 2.5 compatible
2009-06-09 12:18:20 +00:00
Joshua Leung 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
Brecht Van Lommel 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Joshua Leung 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
Brecht Van Lommel 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
Guillermo S. Romero 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
Brecht Van Lommel 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
Campbell Barton 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
Ton Roosendaal 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
Ton Roosendaal 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
Ton Roosendaal 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
Ton Roosendaal dad86a9bde 2.5
Test commit: different treatment of drawing alpha mask...
2009-06-08 11:27:40 +00:00
Joshua Leung 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
Campbell Barton d8ae009653 needed to use sizeof(string)-1 for text button lengths 2009-06-08 11:04:05 +00:00
Ton Roosendaal 80360a0b66 2.5
Forget 'svn add'...
2009-06-08 10:41:52 +00:00
Ton Roosendaal 559ab6a835 2.5
Sequencer: added Nkey + UI region, with two empty panels to fill!
2009-06-08 10:38:28 +00:00
Ton Roosendaal 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
Joshua Leung 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
Joshua Leung 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
Nicholas Bishop 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
Thomas Dinges 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
Nicholas Bishop 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
Nicholas Bishop 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
Thomas Dinges 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
Campbell Barton 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
Brecht Van Lommel 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
Thomas Dinges 0a9dea9d7d 2.5 RNA:
* Some more Notifiers for the world properties.
2009-06-07 13:35:39 +00:00
Brecht Van Lommel 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
Ton Roosendaal 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
Brecht Van Lommel 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
Thomas Dinges 38e998e022 2.5 Preview render:
* Added missing redraw tags for lamp and texture.
* Added Texture Notifiers.
2009-06-07 12:34:38 +00:00
Ton Roosendaal 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
Thomas Dinges 349f5df595 2.5 Preview render
* Added Preview panel to the lamp buttons.
2009-06-07 11:42:13 +00:00
Joshua Leung 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
Thomas Dinges 0d75ad3001 2.5 RNA:
* Wrapped some image output settings (Tiff, Cineon, OpenEXR, Jpeg 2000 and DPX)
2009-06-07 11:18:32 +00:00
Ton Roosendaal 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
Joshua Leung 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
Joshua Leung 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
Daniel Genrich 580e69b365 Patch/Bugfix so wind noise got controlable seed and therefore redoable cloth sims - bug reported by istvan 2009-06-06 21:49:00 +00:00
Daniel Genrich 927c8b5be6 Bugfix for crash on constraints 2009-06-06 19:32:18 +00:00
Arystanbek Dyussenov 0034fbd13e Merged code passing context to python operator from soc-2009-kazanbas
branch.
2009-06-06 17:32:06 +00:00
Thomas Dinges 1e03f502ae 2.5 RNA:
* Deleted some wrong properties from the blend mode enum.
2009-06-06 16:39:41 +00:00
Thomas Dinges 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
Ton Roosendaal 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
Thomas Dinges b770be4f1f 2.5 Buttons Window
Bugfix: World Tab wasn't accessible after deleting an object.
2009-06-06 11:56:59 +00:00
Campbell Barton 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
Campbell Barton e4b20c3d2a Setting the directories and files is buggy still, but this should prevent some simple crashes, file was 80 chars long but it let the text input type in 160 chars. 2009-06-06 11:26:43 +00:00
Joshua Leung 9621d626a0 NLA SoC: Various user-counts and file IO bugfixes for tweaking actions... 2009-06-06 05:06:46 +00:00
Joshua Leung 964d44e6bc NLA SoC: Merge from 2.5
20571 to 20667
2009-06-06 05:00:40 +00:00
Campbell Barton 99c0f8dcc0 Blender.Particle.New() wasnt documented.
Changed to accept Object as well as Object name to avoid name collisions with libraries.
2009-06-06 04:56:22 +00:00
Joshua Leung 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
Janne Karhu 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
Campbell Barton 8cea65a323 fix for printing operator collection values, also set some freed pointers to NULL 2009-06-05 19:43:33 +00:00
Campbell Barton 04ccb0caf8 bpy.config.sequenceMemCacheLimit is the only way to set the memcache in background mode and it didnt work.
removed some unused vars from KX_Scene
2009-06-05 19:22:23 +00:00
Kent Mein 868f31754c A bunch of the same logic issues. (missed these before)
Kent
2009-06-05 17:45:17 +00:00
Diego Borghetti e9ffd8f63e Fix "duplicate strip" always increase the user count for ipo.
As venomgfx point, the shift+d function never duplicate the ipo block
if we have enable the option in UserDef -> Edit Methods -> Ipo.

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

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

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

Kent
2009-06-05 16:53:21 +00:00
Campbell Barton 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
Ton Roosendaal 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
Shaul Kedem f7e5fd9438 MSVC cries of uninitialized param 2009-06-05 13:20:42 +00:00
Campbell Barton 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
Joshua Leung 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
Joshua Leung 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
Kent Mein c5b05fd450 coverity issues:
CID: 478
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/softbody.c
Function: apply_spring_memory
Description: Pointer "sb" dereferenced before NULL check

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

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

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

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


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

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

again moving init code after check to valid pointer.

Kent
2009-06-05 03:40:58 +00:00
Brecht Van Lommel 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
Andrea Weikert 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
Ton Roosendaal 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
Kent Mein aa0f4fb694 coverity issue CID: 488
Checker: REVERSE_INULL (help)
File: base/src/source/blender/src/hddaudio.c
Function: sound_hdaudio_extract_small_block
Description: Pointer "hdaudio" dereferenced before NULL check

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

Kent
2009-06-04 15:58:47 +00:00
Ton Roosendaal 549d1d3742 Bugfix
Loading font used a minimal string array (80 chars) and copied file name
strings in it without size checks. Triple tsk!
2009-06-04 15:44:43 +00:00
Ton Roosendaal 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
Ton Roosendaal 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
Robin Allen d2ea71a296 Cleaned up the node wrapping code 2009-06-04 14:11:39 +00:00
Robin Allen 0f9841b01a All nodes are now wrapped! Some still need limits and extra logic though. 2009-06-04 13:55:02 +00:00
Thomas Dinges c12163c0c5 2.5 RNA:
* Found more bugs in factor properties.
2009-06-04 11:16:56 +00:00
Thomas Dinges 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
Thomas Dinges 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
Campbell Barton cf6ed23578 BGE small fixes
- script template use new property syntax
- Python could set the axis/hat to a negative index and crash blender (nobody complained)
- Servo control UI had overlapping text
2009-06-04 07:42:03 +00:00
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Thomas Dinges 34014df367 2.5 RNA:
* Started wrapping object force.
* Added "absorption" property in Collision Modifier RNA.
2009-06-03 22:19:04 +00:00
Campbell Barton 9b088acc67 KX_MouseFocusSensor - bug reported by Micro27 on blenderartist
vertical bounds checking for multiple viewports was inverted.

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

Moved check for null to include else statement.

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

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

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

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

Fixed.

Kent
2009-06-03 14:55:41 +00:00
Joshua Leung 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
Robin Allen a3c0730f99 RNA: more compositor nodes wrapped 2009-06-03 00:40:38 +00:00
Brecht Van Lommel abfc3daaf4 UI:
* Added initial color ramp and curve mapping templates.
2009-06-03 00:14:12 +00:00
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Kent Mein a9c29cd415 This commit fixes the following two coverity issues:
CID: 475
Checker: REVERSE_INULL (help)
File: base/src/source/blender/blenkernel/intern/cloth.c
Function: bvhselftree_build_from_cloth
Description: Pointer "clmd" dereferenced before NULL check

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

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

Kent
2009-06-02 19:29:20 +00:00
Ton Roosendaal 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
Ton Roosendaal 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
Joshua Leung 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
Joshua Leung 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
Thomas Dinges 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
Matt Ebb ad545fd9f6 Wrapped buttons window in RNA 2009-06-02 08:08:41 +00:00
Joshua Leung 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
Robin Allen 62abe788c4 Fixed limits on translate node 2009-06-01 21:38:03 +00:00
Robin Allen a3f097c646 Bugfix for faulty noise function in bricks node 2009-06-01 21:22:43 +00:00
Ton Roosendaal 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
Peter Schlaile 2a3627e338 == Sequencer ==
This fixes:
[#18507] Wrong audio mixdown

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

Subframe-precision seeking was also broken for some releases...
(shame on me)
2009-06-01 16:35:05 +00:00
Ton Roosendaal 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
Ton Roosendaal 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
Ton Roosendaal 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
Brecht Van Lommel 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
Ton Roosendaal 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
Peter Schlaile d1f7a2ceee == Sequencer ==
This removes the need of using "-g noaudio", if only HD Sound strips
are used. (In opposite to the RAM Sound strips, they don't need an 
initialized Game Sound Engine for obvious reasons...)
2009-06-01 09:24:46 +00:00
Peter Schlaile 332279e12e == Sequencer ==
This fixes:
[#18707] Syncing animation to audio (works fine in 2.45. It does not work properly in 2.48)
2009-06-01 09:01:29 +00:00
Peter Schlaile e415fa27b0 == Sequencer ==
This fixes dependency of scrub duration on mixbuffer size.
(start audio with a mixbuffer size of 2048, let it play = initialize,
change mixbuffer to smaller value, you will here 1 second
of audio instead of a scrub)

should hopefully fix
[#18850] 2.49 scrubbing creates an echo
2009-05-31 21:14:25 +00:00
Peter Schlaile ae565b9bb3 == Sequencer ==
This fixes: IPO pinning on sequencer strips was lost during Undo.
2009-05-31 17:59:57 +00:00
Daniel Genrich 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
Robin Allen 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
Ton Roosendaal acd5281a21 2.5
RNA didn't compile for msvc, variable declaration on wrong place.
2009-05-31 12:47:36 +00:00
Thomas Dinges 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
Ton Roosendaal 011d91624e AO render error, caused by bugfix after RC3 :(
My bug fix to support AO with "Amb" texture channel changed code too that calls
AO as a pre-shade process, when texture isn't calculated yet. This caused very
first pixel in a tile to show wrong AO.

Especially myself deserves a kick in butt for not testing the regression files 
for release binaries again! Error shows clearly... in the cornelius_passes 
.blend file.
2009-05-31 11:22:11 +00:00
Joshua Leung 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
Joshua Leung 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
Matt Ebb 27fe29b2b7 * started wrapping 3d view space in RNA 2009-05-31 01:22:34 +00:00
Thomas Dinges 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
Joshua Leung 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
Joshua Leung 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
Joshua Leung 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
Matt Ebb 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
Matt Ebb 1422cb6e45 fix for previous commit, reload startup was freezing 2009-05-30 04:24:10 +00:00
Matt Ebb 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
Joshua Leung 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
Ton Roosendaal b3ce0c6a49 Last pre-2.49 commit part 1: splash c file and release number 2009-05-29 17:51:16 +00:00
Benoit Bolsee 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
Brecht Van Lommel 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
Campbell Barton 092b13ef3a the option for saving images as jpeg2000 was missing 2009-05-29 13:33:33 +00:00
Joshua Leung 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
Campbell Barton 6ee8067189 typo in message 2009-05-29 09:27:48 +00:00
Campbell Barton 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
Benoit Bolsee 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel a741cbff82 2.5: fix text editor issue with scrolling and an invalid memory read. 2009-05-28 23:48:29 +00:00
Brecht Van Lommel facb944616 UI:
* Added a dummy preview render template, to test some layout
  engine features on tomorrow.
2009-05-28 23:41:12 +00:00
Brecht Van Lommel 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
Brecht Van Lommel 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
Brecht Van Lommel 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
Erwin Coumans 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
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
Campbell Barton 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
Campbell Barton 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
Campbell Barton a843d7e316 Needed to cast to a PyObject* 2009-05-28 10:31:56 +00:00
Campbell Barton 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
Campbell Barton 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
Matt Ebb 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
Campbell Barton 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
Joshua Leung 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
Peter Schlaile 01f8956a6d == FFMPEG ==
This fixes:
[#17505] Bad Interlacing for NTSC in mpeg-2 files
2009-05-27 22:37:45 +00:00
Campbell Barton 5936032f66 patch from Andrea Weikert, added some comments.
thanks for looking into this.
2009-05-27 15:41:44 +00:00
Campbell Barton 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
Matt Ebb af324690ee * Small graphical/gui tweaks to constraint and modifier templates 2009-05-27 03:42:51 +00:00
Campbell Barton 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
Joshua Leung 95af39cc33 NLA SoC: Merge from 2.5 20215:20439 (HEAD) 2009-05-27 00:07:03 +00:00
Brecht Van Lommel 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
Andrea Weikert b89fb7d8fd 2.5 filebrowser
- some cleanup of ugly conditional.
2009-05-26 21:34:20 +00:00
Andrea Weikert 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
Campbell Barton 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
Brecht Van Lommel 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
Ton Roosendaal 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
Peter Schlaile 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
Campbell Barton 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
Ton Roosendaal 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
Campbell Barton 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
Matt Ebb 64ddd9ea4f * Scene buttons tweaks
* Added 'render stamp' rna & buttons
2009-05-26 05:03:27 +00:00
Matt Ebb 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
Ken Hughes ca39228fb7 Interface
---------
Bugfix 18811: long filenames caused stack corruption in BLI_adddirstrings().
2009-05-25 16:09:22 +00:00
Campbell Barton 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
Joshua Leung 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton 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
Campbell Barton b7653ba542 missing null check, would crash blender when loading some files 2009-05-25 00:31:41 +00:00
Nicholas Bishop 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
Peter Schlaile 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
Peter Schlaile e5509b98ce == Sequencer ==
Made relative paths work with custom proxy files.
2009-05-24 14:14:58 +00:00
Peter Schlaile 95e14ac4d3 == Sequencer ==
Fixed output rescaling, when changing between preview proxy rendering
and final resolution.
2009-05-24 14:11:16 +00:00
Peter Schlaile 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
Ton Roosendaal 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
Erwin Coumans 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
Erwin Coumans 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
Erwin Coumans 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
Peter Schlaile 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
Thomas Dinges 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
Joshua Leung d141aff097 NLA SoC: Adding more backend code/utilities
* Data copying
* Strip sorting
2009-05-23 09:36:18 +00:00
Peter Schlaile 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
Matt Ebb 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
Nicholas Bishop 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
Ken Hughes 89049782de Python API
----------
Fix incorrect exception message.
2009-05-22 17:01:32 +00:00
Ton Roosendaal 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
Thomas Dinges 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
Joshua Leung 3b7f63a088 NLA SoC: File IO for new NLA Datatypes 2009-05-22 11:19:35 +00:00
Ton Roosendaal 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
Thomas Dinges 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
Campbell Barton 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
Joshua Leung 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
Thomas Dinges 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
Benoit Bolsee 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
Ton Roosendaal 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
Ton Roosendaal 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
Brecht Van Lommel 2ede3b6e23 2.5: warning fixes. 2009-05-21 15:36:16 +00:00
Brecht Van Lommel 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
Ton Roosendaal 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
Benoit Bolsee 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
Peter Schlaile 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
Matt Ebb 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
Campbell Barton 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
Nicholas Bishop 176a49d1ab Bug fix: the flags for brush rake/anchored were switched. 2009-05-20 18:37:28 +00:00
Brecht Van Lommel 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
Diego Borghetti 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
Ton Roosendaal 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
Ton Roosendaal 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