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.
- 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 :)
* 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.
* 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.
* 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.
* 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.
* 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
* 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.
* 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.
* 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.
* 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).
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)
* 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
* 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.
* 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.
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.
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
* 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.
- 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.
* 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.
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.
* 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
* 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
* 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.
* 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.