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
2019-02-05Cleanup: BKE_library: remove 'test' param of id_copy.Bastien Montagne
This was used in *one* place only... much better to have a dedicated helper for that kind of things. ;)
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2018-12-14Attempt to sanitize node tree deletionSergey Sharybin
Make it explicit when freeing node tree which is owned by other ID or when freeing node tree which is outside of a bmain.
2018-12-12Merge branch 'master' into blender2.8Campbell Barton
2018-12-12Cleanup: use colon separator after parameterCampbell Barton
Helps separate variable names from descriptive text. Was already used in some parts of the code, double space and dashes were used elsewhere.
2018-04-26Workspaces: active view layer now always comes from workspace, not scene.Brecht Van Lommel
Both the scene and workspace had an active view layer, and it was confusing which settings were being used or displayed where. Now we always have one, so there is no mismatch. The "View Layers" tab in the properties editor is now "View Layer", no longer showing a list of layers. Instead view layers can be added and removed with the workspace view layer selector. They are also listed and selectable in the outliner. Single layer rendering uses the active view layer from the workspace. This fixes bugs where the wrong active view layer was used, but more places remain that are wrong and are now using the first view layer in the scene. These are all marked with BKE_view_layer_context_active_PLACEHOLDER.
2018-04-01Merge branch 'master' into blender2.8Campbell Barton
- Undo that changes modes currently asserts, since undo is now screen data. Most likely we will change how object mode and workspaces work since it's not practical/maintainable at the moment. - Removed view_layer from particle settings (wasn't needed and complicated undo).
2018-04-01Cleanup: remove global headerCampbell Barton
2018-02-15Fix crash reading deg_point_cache_transform.blend test, saved with 2.8.Brecht Van Lommel
In general 2.8 files may not be readable in master, but might as well fix this case so all the lib/tests can be opened still.
2017-12-07Merge branch 'master' into blender2.8Campbell Barton
2017-12-07Cleanup: Use BKE_colorband prefixCampbell Barton
2017-12-07Cleanup: extract BKE_colorband from BKE_textureCampbell Barton
2017-11-23Rename any instance of scene layer or render layer in code with view layerDalai Felinto
The RenderResult struct still has a listbase of RenderLayer, but that's ok since this is strictly for rendering. * Subversion bump (to 2.80.2) * DNA low level doversion (renames) - only for .blend created since 2.80 started Note: We can't use DNA_struct_elem_find or get file version in init_structDNA, so we are manually iterating over the array of the SDNA elements instead. Note 2: This doversion change with renames can be reverted in a few months. But so far it's required for 2.8 files created between October 2016 and now. Reviewers: campbellbarton, sergey Differential Revision: https://developer.blender.org/D2927
2017-11-22SceneRenderLayer Removal/RefactorDalai Felinto
This patch moves all the functionality previously in SceneRenderLayer to SceneLayer. If we want to rename some of these structs now would be a good time to do it, before they are in SceneLayer. Everything should be working, though I will test things further tomorrow. Once this is committed depsgraph can get rid of the workaround added in rna_Main_meshes_new_from_object and finish whatever this patch was preventing from being finished. This patch also adds a few placeholders for the overrides (samples, ...). These are obviously not working, so some unittests that rely on 'lay', and 'zmask' will fail. This patch does not addressed the change of moving samples to ViewRender (I have this as a separate patch and needs some separate discussion). Following next is the individual note of the individual parts that were committed. Note 1: It is up to Cycles to still get rid of exclude_layer internally. Note 2: Cycles still need to handle its own doversion for the use_layer_samples cases and (1) Remove the override as it is (2) Add a new override (scene.cycles.samples) if scene.cycles.use_layer_samples != IGNORE Respecting the expected behaviour when scene.cycles.use_layer_samples == BOUNDED. Note 3: Cycles still need to implement the per-object holdout (similar to how we do shadow catcher). Note 4: There are parts of the old (Blender Internal) rendering pipeline that is still using lay, e.g., in shi->lay. Honestly it will be easier to purge the entire Blender Internal code away instead of taking things from it bit by bit. Reviewers: sergey, campbellbarton, brecht Differential Revision: https://developer.blender.org/D2919
2017-11-20Fix crash accessing line-styleCampbell Barton
2017-11-20Fix crash w/ NULL freestyle configCampbell Barton
2017-10-19Add note about handling of root nodetree in ID copydata.Bastien Montagne
OUr beloved root nodetrees... Had to check again the code to undersand why we copy them with bmain even though they are not in bmain, so this is worth a comment. ;)
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-09-18BLI_listbase: Add/use utility to move link (BLI_listbase_link_move)Julian Eisel
We were calling BLI_remlink and then BLI_insertlinkbefore/after quite often. BLI_listbase_link_move simplifies code a bit and makes it easier to follow. It also returns if link position has changed which can be used to avoid unnecessary updates. Added it to a number of list reorder operators for now and made use of return value. Behavior shouldn't be changed. Also some minor cleanup.
2016-07-25Cleanup: factorize the 'ensure local' part of datablock copy into a single ↵Bastien Montagne
BKE_id_copy_ensure_local function.
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-11Remove usercount handling from BKE_id_expand_local.Bastien Montagne
Idea looked good, but we have too much custom situations here (some half-fake-sub-ID being copied with their 'owner', animdata, etc.), let's let datablock copy functions handle that themselves. Also allows to safely call BKE_id_expand_local from all copy functions now (only when copying linked data).
2016-07-11Use new generic BKE_id_expand_local() for make_local() for ↵Bastien Montagne
image/material/texture/world. As said in previous commits, did not touch to copy functions for now, due to ntree issues...
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-07-06Replace of (id->lib != NULL) check by meaningful macro.Bastien Montagne
Idea is to replace hard-to-track (id->lib != NULL) 'is linked datablock' check everywhere in Blender by a macro doing the same thing. This will allow to easily spot those checks in future, and more importantly, to easily change it (see work done in asset-engine branch). Note: did not touch to readfile.c, since there most of the time 'id->lib' check actually concerns the pointer, and not a check whether ID is linked or not. Will have a closer look at it later. Reviewers: campbellbarton, brecht, sergey Differential Revision: https://developer.blender.org/D2082
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.
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-07-12Cleanup: styleCampbell Barton
2015-07-10Freestyle: new stroke modifiersFolkert de Vries
This patch introduces a couple new stroke modifiers. The ones currently implemented are based on prototypes by @kjym3 and myself. The new modifiers: - Tangent - Thickness noise - Crease Angle - Simplification - Curvature 3D The documentation for these new modifier types can be found [[ http://www.blender.org/manual/render/freestyle/parameter_editor/index.html | in the manual ]]: {F134441} (left: AnisotropicThicknessShader, right: NoiseThicknessShader) {F140499} (left: Curvature 3D, right: Simplification) Author: Folkert de Vries (flokkievids) Reviewers: kjym3 Subscribers: #user_interface, plasmasolutions, kjym3 Projects: #bf_blender Differential Revision: https://developer.blender.org/D963
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2015-03-19Freestyle: pass Main struct to new/copyCampbell Barton
2015-03-09Freestyle: Fix for a few line style properties left not copied.Tamito Kajiyama
2015-02-20Fix for unlikely NULL pointer dereferenceCampbell Barton
Potential crash reading freestyle modifiers from future blend-files
2015-01-09Fix T43159: Copying of linked datablocks using relpath leads to invalid ↵Bastien Montagne
paths in new copies. Propper fix reverting most of rB60e70c0c6014e5, which was only partial specific fix. This code uses generic `BKE_id_lib_local_paths()` func to handle all possible paths. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D977
2014-11-29Cleanup: unused headersCampbell Barton
2014-10-13Fix T42198: Linked lines only work with linked objects.Tamito Kajiyama
The reported issue was caused by a backward incompatibility due to careless code changes made when per-material Freestyle line colors were introduced in rB7915d7277ac8c605f016f30f943080556244fb59. In 2.71 line style Material color/alpha/thickness modifiers was retrieving alpha transparency from Material.alpha, whereas in 2.72 Material.line_color[3] was referenced. The present fix reverts the aforementioned code changes. This issue is a regression from 2.71, so the fix is appropriate for inclusion in the 2.72a release.
2014-10-01Freestyle: New line style options for sorting and chain selection.Tamito Kajiyama
The following two sort keys are added for sorting chains. * Projected X - Sort by the projected X value in the image coordinate system. * Projected Y - Sort by the projected Y value in the image coordinate system. A new line style option for the selection of first N chains is also added. Moreover, the chain sorting and chain selection operations are now executed in this order instead of the reverse order used previously. The UI has also changed accordingly. This functional change is backward compatible and won't result in visual differences.
2014-08-12Cleanup: unused varCampbell Barton
2014-08-12Freestyle: Updated BKE_linestyle_default_shader() to include the UV Along ↵Tamito Kajiyama
Stroke shader node.
2014-08-12Added BKE_linestyle_use_textures() to check if stroke textures are enabled.Tamito Kajiyama
2014-08-12Freestyle: Added "blend_type" and "use_clamp" options to the Output Line ↵Tamito Kajiyama
Style shader node.
2014-08-12Freestyle: Fix for a crash in BKE_linestyle_default_shader() due to a typo.Tamito Kajiyama
2014-08-12Freestyle: Add BKE_linestyle_default_shader() for creating the default line ↵Tamito Kajiyama
style shader node tree. Changes to ED_node_shader_default() were reverted since the code there was actually not suitable for setting up the default line style node tree properly.
2014-08-12Fix for a wrong ID datablock referenced due to a typo in BKE_copy_linestyle().Tamito Kajiyama
2014-07-17Follow-up to code cleanup in rB415af0b: Keep compound terms as they are.Tamito Kajiyama
2014-07-16Cleanup: Adhere to our naming convention for BKE_linestyle.h APICampbell Barton
2014-07-16Renamed CTX_data_linestyle_from_scene() to BKE_get_linestyle_from_scene().Tamito Kajiyama
The function is to retrieve the active line style ID datablock from a scene and there is nothing related to bContext.