Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-11Remaining fix for multiple text-boxesDalai Felinto
As mentioned in d81aeb60fe75 the alignment for multiple text boxes should all respect the same overall padding. Vertical alignment is fully implemented now.
2018-09-05Fix for text alignment on multiple text boxesDalai Felinto
The original code was already making a distinction between lines in the last text box and all lines. However I removed that bit since when I tested the values were the same (I tested with a single text box). Bringing this distinction back. Not addressed here: All boxes should respect the alignment. Which at the moment they don't seem to fully do.
2018-09-053D Text: improvements to vertical alignmentDalai Felinto
They way Blender handles vertical alignment is very buggy: - Top-Base: It works perfectly. - Bottom: It is actually bottom-baseline, and it fails when line size is != 1.0 when working with text boxes. - Top: Poorly implemented, it should use font's ascent (recommended distance from baseline), so it has room for accents, but it's not one line distance far from the origin (as it is now). - Center: Poorly implemented. This is tricky since there is no silver bullet. To clear this situation I created a new option (Bottom-Baseline), and addressed the issues above. I'm getting the ascent and descent from freetype2, and use this for padding above/below the text. Also for vertically centering the text.
2018-07-30Cleanup/Refactor: Move CurveCache runtime data into Object.runtime struct.Bastien Montagne
Also, fix missing cleanup of Object.runtime when copying Object datablocks!
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-06-12Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/BKE_group.h source/blender/blenkernel/BKE_object.h source/blender/blenkernel/intern/group.c source/blender/blenkernel/intern/library_remap.c source/blender/blenkernel/intern/object.c source/blender/blenloader/intern/readfile.c source/blender/editors/object/object_group.c source/blender/editors/object/object_relations.c source/blender/editors/physics/rigidbody_constraint.c source/blender/editors/physics/rigidbody_object.c source/blender/makesrna/intern/rna_group.c
2018-06-12Cleanup/simplify G.main usages.Bastien Montagne
Using G.main only to get main bled filepath, or built-in fonts, is OK. So now using the 'valid' G_MAIN macro here instead.
2018-06-05Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/blendfile.c source/blender/blenloader/intern/readfile.h source/blender/blenloader/intern/versioning_250.c source/blender/blenloader/intern/versioning_260.c source/blender/blenloader/intern/versioning_270.c source/blender/blenloader/intern/versioning_legacy.c source/blender/editors/render/render_shading.c source/blender/makesrna/intern/rna_movieclip.c source/blender/render/intern/source/pipeline.c source/blender/render/intern/source/voxeldata.c
2018-06-05Cleanup: use new accessors to blendfile path (Main.name).Bastien Montagne
2018-05-03Cleanup: fix warnings, removed unused code.Brecht Van Lommel
2018-02-09Fix crash with font on curveSergey Sharybin
Was a mistake from recent texspace changes. Reported by Pablo here in the studio!
2018-01-18Fix buffer overflow vulnerability in curve, font, particles code.Brecht Van Lommel
Solves these security issues from T52924: CVE-2017-12102 CVE-2017-12103 CVE-2017-12104 While the specific overflow issue may be fixed, loading the repro .blend files may still crash because they are incomplete and corrupt. The way they crash may be impossible to exploit, but this is difficult to prove. Differential Revision: https://developer.blender.org/D3002
2018-01-18Fix buffer overflow vulnerabilities in mesh code.Brecht Van Lommel
Solves these security issues from T52924: CVE-2017-12081 CVE-2017-12082 CVE-2017-12086 CVE-2017-12099 CVE-2017-12100 CVE-2017-12101 CVE-2017-12105 While the specific overflow issue may be fixed, loading the repro .blend files may still crash because they are incomplete and corrupt. The way they crash may be impossible to exploit, but this is difficult to prove. Differential Revision: https://developer.blender.org/D3002
2017-12-19Font objects: Support proper auto-spaceSergey Sharybin
Annoyingly, need to convert vfont to nurbs, do minmax and toss nurbs away. This is likely to be fine, since this function is not intended to be used a lot, and this is the only way to get more meaningful result. However, it's not very clear what to do with font on curve. This fixes rendering of font object with auto texture space in Cycles introduced in c34f3c7. It is probably possible to introduce new mode to vfont_to_curve which will do boundbox without extra allocations, but that's more like an optimization. Reviewers: campbellbarton, mano-wii Reviewed By: campbellbarton Subscribers: zeauro Differential Revision: https://developer.blender.org/D2971
2017-08-07Refactor ID copying (and to some extent, ID freeing).Bastien Montagne
This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714
2017-04-21Store edit-font select-box lengthCampbell Barton
A little awkward to calculate when drawing.
2016-07-21Fix missing datablocks types in id_make_local.Bastien Montagne
Adding make_local for vfont/gpencil/group/freestyle linestyle/mask/scene/sound/text. Note that there are still some lose ends here, since some type are not handled by id_copy (Scene, Sound and VFont), which means in case a datablock of that type is used both directly and indirectly, localization will fail. Scene copying might be doable though (maybe with a simple new 'full shalow' mode to existing BKE_scene_copy?), not sure about sounds and vfonts... Situations where this becomes an issue should be very rare corner cases anyway.
2016-06-22ID-Remap - Step one: core work (cleanup and rework of generic ID datablock ↵Bastien Montagne
handling). This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock was pretty much impossible, except for a few special cases. Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite a few ID usages were missed or wrongly handled that way). One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling by using library_query utils to allow generic handling of those, which is now the case (now, generic ID links handling is only "knwon" from readfile.c and library_query.c). This commit also adds backends to allow live replacement and deletion of datablocks in Blender (so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one, or NULL one in case of unlinking). This will allow nice new features, like ability to easily reload or relocate libraries, real immediate deletion of datablocks in blender, replacement of one datablock by another, etc. Some of those are for next commits. A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core. Though it was tested rather deeply, being totally impossible to check all possible ID usage cases, it's likely there are some remaining issues and bugs in new code... Please report them! ;) Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
2016-06-21Cleanup: rename curve align-x flagsCampbell Barton
2016-06-21Text Object: Vertical AlignmentDalai Felinto
A new option for Font/Text objects vertical alignment: * Top Base-Line (current mode) * Top * Center * Bottom The Top is the equivalent as the Top-Baseline with an empty line at the begin of the text. It's nice to have this option too though, since if we are driving the alignment via Python we don't want to add extra lines to the text only to accomodate to the desired vertical alignment. The Center and Bottom are as intuitive as their name suggest. When working with text boxes, the vertical alignment only work for paragraphs that are not vertically full. Many thanks to Campbell Barton (ideasman42 / @campbellbarton) for the code review, code comments, and overall suggestions and changes :) Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D2061
2016-06-08Correct assertCampbell Barton
2016-04-283D Text: avoid checking null character's text on pathCampbell Barton
Redundant and causes complications when improving text code.
2016-02-12Integrate font objects copy/paste with system clipboardDalai Felinto
When pasting text, the style (bold, material, ...) is maintained, if it was originally copied from Blender. This fixes the issue of missing copy/paste options for font objects (they were present back in Blender 2.49) Reviewers: Severin, campbellbarton, brecht
2015-11-09Cleanup: avoid incrementing/decrementing id->us outside of BKE_library.Bastien Montagne
We have callbacks for that, they also do some checks and help ensure things are done correctly. Only place where this is assumed not true is blenloader (since here we may affect refcount of library IDs as well...).
2015-10-20First step to handle missing libs/datablocks when reading a file.Bastien Montagne
Idea is, instead of ignoring completely missing linked datablocks, to create void placeholders for them. That way, you can work on your file, save it, and find again your missing data once lib becomes available again. Or you can edit missing lib's path (in Outliner), save and reload the file, and you are done. Also, Outliner now shows broken libraries (and placeholders) with a 'broken lib' icon. Future plans are also to be able to relocate missing libs and reload them at runtime. Code notes: - Placeholder ID is just a regular datablock of same type as expected linked one, with 'default' data, and a LIB_MISSING bitflag set. - To allow creation of such datablocks, creation of datablocks in BKE was split in two step: + Allocation of memory itself. + Setting of all internal data to default values. See also the design task (T43351). Reviewed by @campbellbarton, thanks a bunch! Differential Revision: https://developer.blender.org/D1394
2015-10-06RNA: Add check_existing arg to other load() funcsCampbell Barton
Note: movieclip was doing this already by default, now split into 2 functions, matching image behavior.
2015-09-10Fix incorrect textbox use w/ scaled fontsCampbell Barton
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2014-09-10Text3d: assert for <0 len textCampbell Barton
also add operator to test blacklist
2014-09-10Text3D: fixes to selectionCampbell Barton
- clamp selection on entering editmode (Python may have changed). - BKE_vfont_select_get no longer succeeds with an empty selection this caused many operators to go ahead and operate on zero size array.
2014-05-163D Text: Change textbox placement to ignore font scaleCampbell Barton
Logic here was very stupid, texboxes would have their initial locations scaled by font size but not their width/height. Now its possible to change font size while keeping the textbox layout. Other fixes - tab character didn't work properly with textboxes. - memory leak when VFontData was missing.
2014-05-163D Text: replace multiple float arrays with struct (much easier to understand)Campbell Barton
2014-05-15Fix for cursor location with xoffset & flush alignmentCampbell Barton
2014-05-15Code cleanup: remove '\r' check for 3d text, its removed on load even on windowsCampbell Barton
2014-05-15Fix T40204: x-offset textbox failed with center/justify/flushCampbell Barton
2014-05-15Fix for right aligned text ignoring xoffsetCampbell Barton
2014-05-15Fixes for font underlineCampbell Barton
- underline faces had flipped winding by default. - BKE_vfont_to_curve_ex disallowed 0 underline height (annoying when sliding value) - disallow negative underline height since it flips underline direction (just change position + height)
2014-05-15Fix T40180: Space between letters adds space after last letterCampbell Barton
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-01Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT defineCampbell Barton
2014-02-03Code cleanup: use bools where possibleCampbell Barton
2014-01-20Followup for 1728c1e: we don't need to replace flags at allSergey Sharybin
Replacing the flags isn't thread safe and could lead to bi troubles. Such things are to be handled by the dependency graph.
2014-01-20Fix for flag not being restored in BKE_vfont_to_curve_exCampbell Barton
2014-01-17Code Cleanup: spellingCampbell Barton
2014-01-15Python/Depsgraph: bpy.data.*.is_updated now detects add/remove of any datablock.Tom Edwards
Previously this only worked for some datablocks relevant to rendering, now it can be used to detect if any type of datablock was added or removed (but not yet to detect if it was modified, we need many more depsgraph tags for that). Most of the changes are some function parameter changes, the important parts are the DAG_id_type_tag calls. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D195
2014-01-13Remove direct displist creation from BKE_vfont_to_curve_ex()Sergey Sharybin
This goes back to ancient era again and such a call isn't safe for threading and really DAG is to make it sure display list for dependencies is always there.
2014-01-07Fix for error in own recent commitCampbell Barton
2014-01-07Text3d: underline offset on curved path wasnt working rightCampbell Barton
2014-01-07Text3d: Add support for underline characters with text-on-pathCampbell Barton