Age | Commit message (Collapse) | Author |
|
- pass string size to BLI_timestr() to avoid possible buffer overrun.
- quiet warning for mingw.
- include guards for windows utf conversion funcs.
- fix for mistage in edge-angle-selection check.
- some style cleanup.
|
|
bytes copied.
also move doxy comments for BLI_string.h into the C file.
|
|
- copy now gets up to 6 decimal places
- copy and UI float button editing now strip zeros: 1.000 -> 1.0
|
|
byte anyway.
|
|
|
|
dont overlap.
also avoid comparing int/size_t in for loops.
|
|
with GHOST_SDL
|
|
- Make FFmpeg initialization called from creator, not from functions
which requires FFmpeg. Makes it easier to follow when initialization
should happen.
- Enable DNxHD codec. It was commented a while ago due to some strange
behavior on some platforms. Re-tested it on Linux and Windows and
it seemd to be working quite nice. Would let it be tested further,
if it wouldn't be stable enough, easy to comment it again.
- Make non-error messages from writeffmpeg.c printed only if ffmpeg
debug argument was passed to blender. Reduces console pollution
with messages which are not useful for general troubleshooting.
Error messages would still be printed to the console.
- Show FFmpeg error message when video stream failed to allocate.
makes it easier to understand what exactly is wrong from Blender
interface, no need to restart blender with FFmpeg debug flag and
check for console messages.
Used custom log callback for this which stores last error message
in static variable. This is not thread safe, but with current
design FFmpeg routines could not be called form several threads
anyway, so think it's fine solution/
|
|
doing an allocation.
|
|
shouldnt be NULL.
also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
|
|
|
|
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
template_list
|
|
(unavailable on some systems).
It allows to iterate over a string, returning an new element each time, using a char as separator. See BLI_String.h's comments for more info and an example.
Needed by the UI template list patch following!
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
|
|
properly move the cursor with multi-byte chars.
Note that this is only for the interface, text editor and python console still miss this feature.
|
|
limits.
add BLI_strncpy_utf8() which which ensures there are no partially copied UTF8 characters, limited by the buffer size.
|
|
printing operators.
|
|
for drag and drop ID's into the console but should eventually be used for the animsys too.
|
|
BLI_findstring().
|
|
In the case of this bug e.g. material.new became MATERiAL_OT_new, due to
different capitalization of "i" in Turkish. Fixed by not using the locale
dependent toupper/tolower functions.
|
|
this is what guarded-malloc uses as well as stdlib.h.
|
|
using a different method.
|
|
|
|
CWD was longer then 160.
|
|
incorrect formatting is used the compiler will warn of this.
found & fixed 2x incorrect formatting args.
|
|
IRC reported by OniNiubbo
|
|
- user input gets non utf8 chars stripped all text input other then file paths.
- python has the same limitations, it will raise an error on non utf8 strings except for paths use unicode escape literals so its possible to deal with saving to these file paths from python.
- new string functions
BLI_utf8_invalid_byte(str, len) returns the first invalid utf8 byte or -1 on on success.
BLI_utf8_invalid_strip(str, len) strips non utf-8 chars.
|
|
strnlen is a GNU extension according to http://unixpapa.com/incnote/string.html
|
|
cant test on windows but from what I can tell this exists like _vsnprintf
|
|
|
|
|
|
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.
|
|
Channels too
* Only F-Curves and Drivers that affect selected bones will be visible when this happens.
* Moved the function to grab text within a pair of "" following some prefix to blenlib.
|
|
Currently this hasn't been tested yet, but committing this first before I potentially use it for fixing RNA-paths...
|
|
|
|
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.
|
|
More cleanup!
- removed old UI font completely, including from uiBeginBlock
- emboss hints for uiBlock only have three types now;
Regular, Pulldown, or "Nothing" (only icon/text)
- removed old font path from Userdef
- removed all old button theme hinting
- removed old "auto block" to merge buttons in groups
(was only in use for radiosity buttons)
And went over all warnings. One hooray for make giving clean output :)
Well, we need uniform definitions for warnings, so people at least fix
them... here's the real bad bugs I found:
- in mesh code, a call to editmesh mixed *em and *me
- in armature, ED_util.h was not included, so no warnings for wrong call
to ED_undo_push()
- The extern Py api .h was not included in the bpy_interface.c, showing
a several calls using different args.
Further just added the missing includes, and removed unused vars.
|
|
* Test with constructing RNA paths from pointer + property, based on
a callback per struct. For animato we'll need to be able to do this,
for keyframing from buttons, unless we can somehow derive the paths
from the interface code, which seems like an unnecessary burden.
However constructing such paths is not always quick, and we need a
fast way to find out if a property is animated for drawing buttons,
so this may not be the best solution.
See rna_mesh.c for some callbacks created as a test.
* Added BLI_sprintfN to mallocN a new string using printf style
formatting.
|
|
DONE:
* moved almost all declarations from BLI_blenlib.h into their own proper header files.
* BLI_blenlib.h still includes all the declarations for convenience and to avoid changes in existing code
* split util.c into several files, where it wasn't done already
* DynamicList -> dynamiclist,
* ListBase -> listbase,
* String utility functions -> string.c
* removed a few unused macros and functions, if they're needed back, they're still in svn ;)
TODO:
* btempdir global
* further cleanup in the code of the different modules (especially util.c)
|