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
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-06-14Make whole ID copying code use const source pointer.Bastien Montagne
Noisy change, but safe, and better do it sooner than later if we are to rework copying code. Also, previous commit shows this *is* useful to catch some mistakes.
2017-01-16Cleanup/refactor: Add new BLI_string_util.Bastien Montagne
Things like `BLI_uniquename` had nothing, but really nothing to do in BLI_path_util files! Also, got rid of length limitation in `BLI_uniquename_cb`, we can use alloca here to avoid overhead of malloc while keeping free size (within reasonable limits of course).
2016-11-27A number of other minor RNA fixes and precautionary safeguards against ↵Joshua Leung
further crashes here
2016-11-27Fix T50123 - GreasePencil: Modifying name of new color in new palette via ↵Joshua Leung
bpy segfaults When there were no prior palettes, creating a new one didn't automatically make it active. This caused problems when trying to rename the color, as the RNA code assumed that if there's a color, it must come from the active palette. This commit partially fixes the problem by ensuring that if there are no palettes, the first one will always be made active.
2016-08-18Cleanup/security fix: do not use strcpy (at least in new code).Bastien Montagne
This function is only really secure in a very limited amount of cases, and can especially bite you later if you change some buffer sizes... So not worth bothering with it, just always use BLI_strncpy instead.
2016-08-04Cleanup: Use BKE_gpencil prefixJulian Eisel
This is a good point to change this as grease-pencil-v2 branch was just merged, so I hope merge conflicts with other branches are minimal.
2016-08-04Grease Pencil v2 BranchAntonio Vazquez
Improve current Grease Pencil in order to get a better 2D animation tool. More info in WIKI pages: https://wiki.blender.org/index.php/User:Antoniov Reviewed By: Severin, aligorith, campbellbarton Patch by @antoniov, with edits by @Severin. Differential Revision: https://developer.blender.org/D2115
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-07-10Cleanup/Refactor: pass Main pointer to all ID copy functions.Bastien Montagne
Also allows us to get rid of a few _copy_ex() versions...
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-05-08D1886: GPencil - Add smooth iterations parameter to get better qualityAntonio Vazquez
After some test, a new iteration parameter has been added in order to apply repetitive smoothing to the stroke. By default 1 iteration is applied, but can used any number between 1 and 3. The repetition uses different levels of intensity from 100% of the defined smooth factor for the first loop, 50% for the second and 25% for the third. We use in each loop a smaller value in order to avoid deform too much the stroke.
2016-05-08D1705: Fix Grease Pencil Fill for Concave ShapesAntonio Vazquez
Improve filling for concave shapes using a triangulation of the stroke. The triangulation information is saved in an internal cache and only is recalculated if the stroke changes. The triangulation is not saved in .blend file. Reviewers: aligorith Maniphest Tasks: T47102 Differential Revision: https://developer.blender.org/D1705
2016-02-08GPencil: Layers with alpha = 0 should not be editableJoshua Leung
* Added a new API function to test if a GPencil layer is visible or not * Replaced all editability checks with this new "super check" * Replaced all magic number thresholds for opacity visiblity with a single define
2016-02-08Code Cleanup: Use bool instead of int for "setactive" paramJoshua Leung
2016-02-08GPencil: If "onion skinning" toggle on header is enabled, new layers will ↵Joshua Leung
have onionskinning enabled too
2015-12-13Grease Pencil: Merge GPencil_Editing_Stage3 branch into masterJoshua Leung
This commit merges all the work done in the GPencil_Editing_Stage3 branch as of ef2aecf2db981b5344e0d14e7f074f1742b0b2f7 into master. For more details about the changes that this brings, see the WIP release notes: http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.77/GPencil
2015-08-18Refactor translation code out of blenfontCampbell Barton
- Add blentranslation `BLT_*` module. - moved & split `BLF_translation.h` into (`BLT_translation.h`, `BLT_lang.h`). - moved `BLF_*_unifont` functions from `blf_translation.c` to new source file `blf_font_i18n.c`.
2015-04-17Fix T44412: Crash when trying to paint on a GPencil frame when the frames ↵Joshua Leung
are out of order
2015-04-17Fix for Grease Pencil and negative framesJoshua Leung
While investigating T44412, I noticed some weirdness going on when trying to draw on frame 0 (i.e. strokes were getting added to frame 1 instead). Clearly, this seemed like an off-by-one error related to clamping to prevent negative frames which was also excluding frame 0. This commit reverts the fixes made for T36831 in: rBf18f2fbb33d90ecc91e6f3d063cb9f97f217e808 After thinking this over, I think these checks against drawing on negative frames aren't needed. Even if the current userpref setting doesn't allow navigating to negative frames, this may not be true for other users that may work on the same file (in a team environment). Also, negative frame values can get set via the dopesheet.
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2014-11-30Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)Joshua Leung
This merge-commit brings in a number of new features and workflow/UI improvements for working with Grease Pencil. While these were originally targetted at improving the workflow for creating 3D storyboards in Blender using the Grease Pencil, many of these changes should also prove useful in other workflows too. The main highlights here are: 1) It is now possible to edit Grease Pencil strokes - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions to enter "Stroke Edit Mode". In this mode, many common editing tools will operate on Grease Pencil stroke points instead. - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less, Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete. - Proportional Editing works when using the transform tools 2) Grease Pencil stroke settings can now be animated NOTE: Currently drivers don't work, but if time allows, this may still be added before the release. 3) Strokes can be drawn with "filled" interiors, using a separate set of colour/opacity settings to the ones used for the lines themselves. This makes use of OpenGL filled polys, which has the limitation of only being able to fill convex shapes. Some artifacts may be visible on concave shapes (e.g. pacman's mouth will be overdrawn) 4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing has been added which draws strokes as a series of screen-aligned discs. While this was originally a partial experimental technique at getting better quality 3D lines, the effects possible using this technique were interesting enough to warrant making this a dedicated feature. Best results when partial opacity and large stroke widths are used. 5) Improved Onion Skinning Support - Different colours can be selected for the before/after ghosts. To do so, enable the "colour wheel" toggle beside the Onion Skinning toggle, and set the colours accordingly. - Different numbers of ghosts can be shown before/after the current frame 6) Grease Pencil datablocks are now attached to the scene by default instead of the active object. - For a long time, the object-attachment has proved to be quite problematic for users to keep track of. Now that this is done at scene level, it is easier for most users to use. - An exception for old files (and for any addons which may benefit from object attachment instead), is that if the active object has a Grease Pencil datablock, that will be used instead. - It is not currently possible to choose object-attachment from the UI, but it is simple to do this from the console instead, by doing: context.active_object.grease_pencil = bpy.data.grease_pencil["blah"] 7) Various UI Cleanups - The layers UI has been cleaned up to use a list instead of the nested-panels design. Apart from saving space, this is also much nicer to look at now. - The UI code is now all defined in Python. To support this, it has been necessary to add some new context properties to make it easier to access these settings. e.g. "gpencil_data" for the datablock "active_gpencil_layer" and "active_gpencil_frame" for active data, "editable_gpencil_strokes" for the strokes that can be edited - The "stroke placement/alignment" settings (previously "Drawing Settings" at the bottom of the Grease Pencil panel in the Properties Region) is now located in the toolbar. These were more toolsettings than properties for how GPencil got drawn. - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a suggestion for an earlier discussion on developer.blender.org - By default, the painting operator will wait for a mouse button to be pressed before it starts creating the stroke. This is to make it easier to include this operator in various toolbars/menus/etc. To get it immediately starting (as when you hold down DKEy to draw), set "wait_for_input" to False. - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor - Toolbar panels have been added to all the other editors which support these. 8) Pie menus for quick-access to tools A set of experimental pie menus has been included for quick access to many tools and settings. It is not necessary to use these to get things done, but they have been designed to help make certain common tasks easier. - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and spatially stable manner. - D Q = "Quick Settings" pie. This allows quick access to the active layer's settings. Notably, colours, thickness, and turning onion skinning on/off.
2014-11-22Fix for previous commitJoshua Leung
gpencil_data_duplicate() was being used for gp drawing undo buffers, where using an exact copy is exactly what we want/need. Instead, the code here now has an additional arg for determining whether a direct copy is warranted or not.
2014-11-22Bugfix: Duplicating Grease Pencil datablocks wasn't doing so in a safe wayJoshua Leung
Grease Pencil data (bGPdata) is now a datablock, so it isn't safe to use MEM_dupallocN() for copying new instances of these anymore.
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-02-07ListBase API: add utility api funcs for clearing and checking emptyCampbell 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
2013-12-03Code Cleanup: remove redundant/misleading NULL checksCampbell Barton
2013-11-25Code Cleanup: rename vars for detecting change to be more consistentCampbell Barton
rename change/is_change/is_changed/modified -> changed also use bools over int/short/char and once accidental float.
2013-11-25UI: remove unnecessary confirmation popupsEmanuel Claesson
This makes a number of operators no longer ask for confirmation, rather it will show an info message after performing the operation. Ref T37422 for decision. In particular, these were changed: * Delete objects, bones, keyframes, masks, mask curves, motion tracks, markers. * Clear and delete keyframes in the 3D view. * Align bone to parents. * Separate bones from armature. * Group/ungroup metastrips in sequencer. * Copy/paste objects to/from buffer. Reviewed By: brecht, dingto Differential Revision: http://developer.blender.org/D35
2013-11-06Grease Pencil: User-Pref for setting the default colour of newly created layersJoshua Leung
2013-09-28Fix [#36831] Grease Pencil dont create a drawing in current frame less than 1Bastien Montagne
Only forbid negframes when user has not allowed them in whole Blender (userpref, editing). Else, it's more than annoying to not be able to draw negframed gpencil.
2013-03-25More new data names translation (most cases should be covered now).Bastien Montagne
Also done a few cleanup here and there...
2012-12-20style cleanupCampbell Barton
2012-12-16replace strcpy with BLI_strncpy or memcpy when the size is known.Campbell Barton
2012-10-21style cleanup: trailing tabs & expand some non prefix tabs into spaces.Campbell Barton
2012-10-08Grease Pencil py-apiDan Eicher
* new/remove for GPencil frames/strokes/ * add/pop for points * clear for frame/layer & grease_pencil * copy for frame + fix for free_gpencil_frames() not clearing the active frame
2012-10-05Grease Pencil notifier/listener cleanupDan Eicher
As suggested by Campbell on the IRC gave grease pencil its own notifier type (NC_GPENCIL) and made the makesrna notifier functions actually update properly. Also got the #ifdef'd GreasePencil.layers.[new/remove] functions working.
2012-08-17fix own error in recent smoothview cleanup, also correct some cross ↵Campbell Barton
references in bmesh docs.
2012-06-09add a utility function to get an exact match for a grease pencil frame.Campbell Barton
2012-05-06style cleanup: BKE_*.c files which deal with library functionsCampbell Barton
2012-05-05code cleanup: function naming, use BKE_*type* prefix.Campbell Barton
2012-04-29style cleanup: function calls & whitespace.Campbell Barton
2012-03-31move debug flag into its own global var (G.debug), split up debug options.Campbell Barton
--debug --debug-ffmpeg --debug-python --debug-events --debug-wm This makes debug output easier to read - event debug prints would flood output too much before. For convenience: --debug-all turns all debug flags on (works as --debug did before). also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-13ensure grease pencil layer names are unique when set through rna.Campbell Barton
2011-10-10fix bad svn ID tagsCampbell Barton
2011-10-10header cleanup (no functional changes)Campbell Barton
2011-10-09replace sprintf with strcpy where no formatting is done and return value ↵Campbell Barton
isn't used.