- added an option to BLI_convertstringframe and BLI_convertstringframe_range to add digits if not found.
- removed BLI_convertstringframe where its obviously not needed - such as loading movies and sounds.
* Old files imported to 2.5 with curves that got cycles FModifiers added during version patching, would not have their keyframes shown for editing.
* #20893: Can't see/show the Properties area in the NLA
I don't know why this worked on a few of my test files several months ago, and yet now fails for many files today.
OpenCollada new version (721) lib has additional lib files to link with.
Added BF_RAY_OPTIMIZATION option in CMake (as the one in scons) for building SIMD optimized ray tracing code.
- respect view locking (dont change rv3d->view)
- on multiple calls to smoothview, get the original view from the previously called smoothview if it exists.
scons+vc build crashes on Blender start when BF_COLLADA is on, don't know why this happens.
Merging from trunk to get working vc project files, then will try to debug and locate the problem.
* .tif not loading on newer linux distributions, wasn't looking for
libtiff version 4.
* fix dds being too verbose when testing if it can open an image file.
This commit introduces a few cleanups and tweaks to the way that timecodes (i.e. the timing indications used instead of frame numbers) get displayed.
1. Custom Spacing of TimeCodes/Gridlines
Made the minimum number of pixels between gridlines/timecode indications a user-preference, instead of being a hardcoded constant. This allows to set the spacing tighter/looser than the defaults, and is also used for the other changes.
2. Default timecode display style, (now named 'minimal') uses '+' as the delimeter for the sub-second frames. This hopefully makes it a bit clearer what those values represent, as opposed to the '!', which can sometimes look too much like a colon.
3. Added various timecode display styles as user-preference. - These include always displaying full SMPTE, to showing milliseconds instead of frams for sub-second times, and also an option to just show the times as seconds only.
- When changing the timecode style, the spacing setting is automatically modified so that the timecodes are spaced far apart enough so that they won't clash (under most circumstances). This automatic modification is only done if the spacing is too tight for the style being set.
4. Unified the code for generating timecode strings between the View2D scrollbar drawing and the current frame indicator drawing.
[#20713] vertex, edge and face toggling acts like shift select (in 2.49) with or without shift pressed
revert own changes from 26035
- python buttons were toggles so clicking on 1 didnt disable the others.
- for some reason the layout engine wasnt working right here and made the buttons skilly in localview.
- Icons for brushes disabled List Box to work (paint buttons)
- Mouse-release in secondary Blender windows didn't get registered
in window where mouse-press initiated.
And fixed annoyance: adding image strip makes it 25 frames long, so
you can drag and extend it easily.
OSX 10.5 PPC kept crashing on exit. After blaming bad compiles, bad python libs
and all other reasons (almost was switching to linux!) brecht found the bad line
in python free code. There was code freeing stuff whilst it wasnt allowed to.
Mac PPC gets hug!
Python operators calling C operators would get too many undo pushes,
causing redo of the python operator not to work. Now the depth of
operator callbacks is counted to detected nested calls, and in that
case skip the undo/register here, and only do a single undo/register
for the mother operator.
(which is enabled by default). If there was a problem reading or writing
in the compression process, the original .blend file could get lost. Now
errors are checked, and writing is done as follows:
write .blend@ -> compress .blend@ to .blend@.gz ->
rename .blend@.gz to .blend -> remove .blend@
We've had blender crash here, lose the original .blend and leave an
empty .blend@. It is not clear to me where this would happen in practice
if there is enough disk space and permissions are correct, so the actual
crash is likely not fixed by this commit.
When the API function is passed -1 for the index, non-array properties now get keyframed properly too. This fixes problems with the keyframe_insert() method on structs in the Py-API not working.
numbers for negative influences (as opposed to old 3-state button)
but the ui range was only set to 0,1.
Changed the defaults to -1,1 and added a shortcut - pressing minus
key while the mouse is over a number field or slider will make it negative.
- Keyconfig are now marked as user_defined when it is the case
- Import keyconfig operator: select an exported keyconfig .py file, copies it to the scripts folder (keep the original copy if wanted, default True), imports and select as active config. The active keyconfig is stored in the user default file, so that still has to be saved after import.
- Remove keyconfig operator and button next to the keyconfig name (poll False if not user_defined). Removes the keyconfig from the list and deletes the file from the folder.
Remaining bug: The file is copied in the user defined script folder (if present) or the /scripts/ui folder. The problem is that it might be imported before operators defined in python are imported themselves. One solution would be to use a separate folder for keyconfigs that is imported after all others.
Various internal fixes, also additional feature - can drag on the histogram to change scale
(0 key to reset).
Also fix [#20844] Color balance node (lift freeze)
Ambient occlusion: multiplied with direct lighting by default, add
is also still available and more blending methods might be added if
they are useful. This is fundamentally a non physical effect.
Environment lighting: always added as you would expect (though you can
subtract by specifying negative energy). This can be just white or take
colors or textures from the world.
Indirect lighting: only supported for AAO at the moment (and is still
too approximate), and also is always added. A factor is available to
specify how much is added, though value 1.0 is correct.
Also:
* Material ambient value now defaults to 1.0.
* Added Environment, Indirect and Emit pass.
* "Both" blending method is no longer available.
* Attenuation, sampling parameters are still shared, some could be split
up, though if they are different this would affect performance.
This is set on keymap item operator properties and macro definition operator properties to make them non-contextual (since the context at definition time is most likely not the same then at execution time, it's better to have all options visible).
This removes some more errors in keymap export and import.
This commit also sanitize some enum item function, making sure they can cope with null context and have usable defaults in that case.
Store last mmb event value to make emulation work when modifier keys are released first.
This is done in a not so nice way for now. Eventually, I'd like for emulation keys to have their own data structures (user creatable and all that)
float (*disps)[3];
It still isn't advised to use this syntax, best to just use regular pointers,
however at least it is working better now. Previously this would lead to the
rest of the header file to be included right in the SDNA. If you look into an
existing .B25.blend file with a text editor, you can see the second half of
DNA_meshdata_types.h...
Fixed some long-standing bugs with DopeSheet and NLA Editor main views not being properly lined up with their channels, and/or showing an incorrect scrollbar.
This fixes#20759, and probably a few other reports about similar issues that might've cropped up.
NOTE:
- probably a version bump might be needed after this, to avoid problems on durian animation files?
- the default .b.blend needs updating again, since the saved config there doesn't get updated (or doesn't here, when using load factory settings)
Added a check in RNA_property_animateable() which checks if the base ID-block can have animation data or not. Screen data currently cannot have animation data, so this solves that problem (where there were non-functional entries there in the menu).
* Auto-snapping can now be toggled on/off using Ctrl-Key again. Defaults to turning Nearest-Frame on if no auto-snapping is enabled, since this offers the best snapping behaviour in general.
* Graph Editor's 'Draw Time' option can now be taken into account for increment snapping/stepping
Now the compositing node tree will update on frame change if any of the
nodes are animated.
This doesn't work for playback (i.e. alt a), that's better off waiting until we
have some kind of frame caching system.
The 'save over' popup was only appearing based on a string comparison of the operator name ("Save"). Changed this to use a hidden operator property: "check_existing". Python operators must
have this property for the file selector confirmation too.
This property can also be set to false, to prevent checking for existing files, useful in the File->Save menu item to prevent the dangerously missable confirmation popup.
* The Lift/Gamma/Gain formula previously was incorrect, fixed this and
removed conversions - now the RNA values are the same as what goes into
the formula.
* Because of this, added the ability for the Value slider to map to a wider range
than 0.0-1.0. The black/white gradient remains the same, in this case just
indicating darker/brighter rather than absolute colour values. Also added ability
for color wheels to be locked at full brightness (useful for this case, where the
color value itself is dark).
* Added an alternate formula - offset/power/slope (asc-cdl). This fits the standard
Color Decision List formula, here for compatibility with other systems, though
default Lift/Gamma/Gain is easier to use and gives nicer results.
A wrong libraries link order was causing this problem for
some reason. Since a sorting algorithm for linked libraries
was already implemented in Unix, I just enabled it for Windows.
Note about CMake 2.6.0: The Link Library Dependencies option
(Linker General settings panel) is automatically enabled, which
causes the Blender libraries to be linked twice because CMake
will also add them in the Additional Dependencies field.
CMake 2.8.0 does not have this problem, please upgrade if you
are still using CMake 2.6.0.
Dicts are converted to operator properties like this:
bpy.ops.armature.extrude_forked(TRANSFORM_OT_translate={"value":(2,0,1)})
Note that this doesn't work quite well if one operator is twice in the same macro, but that's a problem at the RNA level too. I'll have to deal with that eventually.
Blender too now! :)
** Drag works as follows:
- drag-able items are defined by the standard interface ui toolkit
- each button can get this feature, via uiButSetDragXXX(but, ...).
There are calls to define drag-able images, ID blocks, RNA paths,
file paths, and so on. By default you drag an icon, exceptionally
an ImBuf
- Drag items are registered centrally in the WM, it allows more drag
items simultaneous too, but not implemented
** Drop works as follows:
- On mouse release, and if drag items exist in the WM, it converts
the mouse event to an EVT_DROP type. This event then gets the full
drag info as customdata
- drop regions are defined with WM_dropbox_add(), similar to keymaps
you can make a "drop map" this way, which become 'drop map handlers'
in the queues.
- next to that the UI kit handles some common button types (like
accepting ID or names) to be catching a drop event too.
- Every "drop box" has two callbacks:
- poll() = check if the event drag data is relevant for this box
- copy() = fill in custom properties in the dropbox to initialize
an operator
- The dropbox handler then calls its standard Operator with its
dropbox properties.
** Currently implemented
Drag items:
- ID icons in browse buttons
- ID icons in context menu of properties region
- ID icons in outliner and rna viewer
- FileBrowser icons
- FileBrowser preview images
Drag-able icons are subtly visualized by making them brighter a bit
on mouse-over. In case the icon is a button or UI element too (most
cases), the drag-able feature will make the item react to
mouse-release instead of mouse-press.
Drop options:
- UI buttons: ID and text buttons (paste name)
- View3d: Object ID drop copies object
- View3d: Material ID drop assigns to object under cursor
- View3d: Image ID drop assigns to object UV texture under cursor
- Sequencer: Path drop will add either Image or Movie strip
- Image window: Path drop will open image
** Drag and drop Notes:
- Dropping into another Blender window (from same application) works
too. I've added code that passes on mousemoves and clicks to other
windows, without activating them though. This does make using multi-window
Blender a bit friendler.
- Dropping a file path to an image, is not the same as dropping an
Image ID... keep this in mind. Sequencer for example wants paths to
be dropped, textures in 3d window wants an Image ID.
- Although drop boxes could be defined via Python, I suggest they're
part of the UI and editor design (= how we want an editor to work), and
not default offered configurable like keymaps.
- At the moment only one item can be dragged at a time. This is for
several reasons.... For one, Blender doesn't have a well defined
uniform way to define "what is selected" (files, outliner items, etc).
Secondly there's potential conflicts on what todo when you drop mixed
drag sets on spots. All undefined stuff... nice for later.
- Example to bypass the above: a collection of images that form a strip,
should be represented in filewindow as a single sequence anyway.
This then will fit well and gets handled neatly by design.
- Another option to check is to allow multiple options per drop... it
could show the operator as a sort of menu, allowing arrow or scrollwheel
to choose. For time being I'd prefer to try to design a singular drop
though, just offer only one drop action per data type on given spots.
- What does work already, but a tad slow, is to use a function that
detects an object (type) under cursor, so a drag item's option can be
further refined (like drop object on object = parent). (disabled)
** More notes
- Added saving for Region layouts (like split points for toolbar)
- Label buttons now handle mouse over
- File list: added full path entry for drop feature.
- Filesel bugfix: wm_operator_exec() got called there and fully handled,
while WM event code tried same. Added new OPERATOR_HANDLED flag for this.
Maybe python needs it too?
- Cocoa: added window move event, so multi-win setups work OK (didnt save).
- Interface_handlers.c: removed win->active
- Severe area copy bug: area handlers were not set to NULL
- Filesel bugfix: next/prev folder list was not copied on area copies
** Leftover todos
- Cocoa windows seem to hang on cases still... needs check
- Cocoa 'draw overlap' swap doesn't work
- Cocoa window loses focus permanently on using Spotlight
(for these reasons, makefile building has Carbon as default atm)
- ListView templates in UI cannot become dragged yet, needs review...
it consists of two overlapping UI elements, preventing handling icon clicks.
- There's already Ghost library code to handle dropping from OS
into Blender window. I've noticed this code is unfinished for Macs, but
seems to be complete for Windows. Needs test... currently, an external
drop event will print in console when succesfully delivered to Blender's WM.
- use mirror when the option is enabled in editmode.
- fliped group names are used when they exist.
- only the setting that is edited will be applied to the mirrored verts group.
- copy value is applied to all mirrored verts of the selection.
- normalize normalizes all vgroups and mirrors.
utility functions defvert_sync and defvert_sync_mapped, similar to defvert_copy but does not remove existing groups and optionally creates groups as needed.
defvert_sync_mapped uses a an int array for mapping the flipped values.
entering editmode on a second mesh would create a duplicate tube.
Cleaning the undo stack from the previous mesh would mess up the redo.
Also, OBJECT_OT_mode_set was causing enter/exit editmode undo push to
be done twice, now it leaves undo push to the operator it calls.
Limit selection was totally broken (border select, circle select etc) because the depth function was using the view matrix multiplied by the object matrix.
I couldnt find any case where this was needed, but take care when using data->mats.modelview from particle mode edit tools.
* Adding new Keying Set paths didn't initialise the id-type setting. Make this default to Object
* Fixed bad poll callbacks for Graph Editor operators working on keyframes, which were expecting F-Curves to be selected too to be eligible for editing. This was often too restrictive, resulting in nothing happening.
* Fixed error with default property for Debug Redraw-Timer Operator not being set. However, this operator is currently still no use, since the info popups are now disabled.
Added flags for the mapping function offering more control over what values were affected and when. In the WIP code, the values for unselected verts were getting the restoration conversion being repeatedly applied, resulting in the values tending to zero.
F-Curves now internally store radians again instead of degrees.
- This solves problems with inconsistencies when working with drivers.
- No need to version patch old files, potentially screwing them up. As such, removed the version patching for F-Curves.
- Is better suited to optionally showing radians throughout the UI instead or degrees.
As a result, values are now converted on the fly in the Graph Editor for display and operators that operate on values. I've made the conversion system for this rather general, so that other unit type conversions can also be hooked up with the type conversion backend.
Also, made some tweaks to F-Curve RNA wrapping to make it represent the data better.
TODO:
- Transform code currently still needs to be corrected to work with these changes. Currently moving keyframes for rotation curves will make them change too rapidly vertically when using degrees.
Made the RMB menus for manipulating shortcuts a bit more robust (only dealing with mouse
clicks/key events, rather than all tweaks/timers/etc) and added ability to add key shortcuts for
transform tools from the RMB menu.
Wrong filters were used for F-Curves for adding the modifiers. Now the Graph Editor curve visibility settings are only taken into account for this when the hotkey version (i.e. only_active == False) is used, which means that the button works again.