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
2022-01-07Cleanup: remove redundant const qualifiers for POD typesCampbell Barton
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
2021-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2020-10-07Refactor: remove `BKE_<id_type>_copy` functions.Bastien Montagne
Those were only shallow wrappers around `BKE_id_copy`, barely used (even fully unused in some cases), and we want to get rid of those ID-specific helpers for the common ID management tasks. Also prevents weird custom behaviors (like `BKE_object_copy`, who was the only basic ID copy function to reset user count of the new copy to zero). Part of 71219.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-03-09Cleanup: FreestyleLineStyle: Move to IDTypeInfo and remove unused BKE API.Bastien Montagne
2020-03-04Refactor ID make local to use a single flag parameter.Bastien Montagne
Instead of using anonymous booleans flags, also allows to keep the same behavior in all cases, without needing special handling from calling code for our beloved oddballs object proxies...
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
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.
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
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.
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.
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-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.
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-03-19Freestyle: pass Main struct to new/copyCampbell Barton
2014-08-12Added BKE_linestyle_use_textures() to check if stroke textures are enabled.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-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.
2014-05-13Freestyle: Added .new() and .remove() methods to collection types of line ↵Tamito Kajiyama
style modifiers.
2013-03-23A major code update for making the DNA file specification of Freestyle settingsTamito Kajiyama
and RNA for it independent of the build flag for enabling Freestyle. Suggested by Sergey Sharybin through a code review of the branch. * Many #ifdef WITH_FREESTYLE blocks were removed to always have Freestyle-specific DNA file specification and RNA for it built in Blender. This will allow Freestyle setting survive even when a non-Freestyle build is used for loading and saving files. It is noted that operations are still conditionally built through #ifdef WITH_FREESTYLE blocks. * To this end, new blenkernel files BKE_freestyle.h and intern/freestyle.c have been added. All API functions in FRS_freestyle_config.h as well as some of those in FRS_freestyle.h were moved to the new files. Now the relocated API functions have BKE_ prefix instead of FRS_.
2012-12-20Another big patch set by Bastien Montagne, thanks a lot!Tamito Kajiyama
* Made Freestyle optional (turned on by default). * Fix for missing bpath.c updates in the previous merge of trunk changes.
2012-12-12A big cleaning patch by Bastien Montagne (thanks a lot!)Tamito Kajiyama
* Split and moved Cycles’ render layers panels into the render_layer context as well (would be nice to hide this context when not needed, e.g. with the BGE, but this is not so easy to do nicely...). * Fixed some inconsistencies with trunk (probably due to svn merge glitches) using r52858 as reference. Also recovered the missing release/bin/blender-softwaregl file. * A bunch of style code fixes in Blender's own code (not Freestyle itself yet): line lengths, spaces around operators, block formatting, headers, etc. In rna_linestyle.c, color_blend_items was replaced by ramp_blend_items (exported from rna_material.c).
2012-12-09Fix for a number of compiler warnings as well as a bug hidden by the warnings.Tamito Kajiyama
Patch contribution by Bastien Montagne, thanks!
2011-11-14Implemented a button to make a single-user copy of a line style.Tamito Kajiyama
2011-08-19Stroke geometry modifiersTamito Kajiyama
Added a set of stroke geometry modifiers to the Geometry tab of line styles in the Parameter Editor mode. Now the following stroke geometry modifiers are available, each with a set of animateable parameters: - Sampling: changes the resolution of stroke backbone polylines. - Bezier Curve: replace stroke backbone with a Bezier approximation of the stroke backbone. - Sinus Displacement: add sinus displacement to stroke backbone. - Spatial Noise: add spatial noise to stroke backbone. - Perlin Noise 1D: add one-dimensional Perlin noise to stroke backbone. - Perlin Noise 2D: add two-dimensional Perlin noise to stroke backbone. - Backbone Stretcher: stretch the beginning and the end of strokes. - Tip Remover: remove a piece of stroke at the beginning and the end of strokes. To branch users: When you have a .blend file with Freestyle options specified, you may want to add a Sampling modifier with the 'sampling' value set to 5. This value specifies a resolution of polylines for line drawing in Freestyle. If no sampling modifier is specified, your line drawing will result in coarse polylines. Before geometry modifiers were introduced, this initial sampling was automatically done. Now the initial sampling is a tunable parameter that can be omitted, allowing better control on polyline resolution.
2010-11-30Fix for properly unlinking target object pointers when objects are deletedTamito Kajiyama
from scenes.
2010-09-18Added support for animation of line style parameters.Tamito Kajiyama
Most stylization parameters in line style datablocks are now animatable by means of keyframes. Right click on a line style parameter, and you will see a list of keyframe-related commands in the context menu. Concerning the implementation, RNA path resolution has been extended to properly address color ramps in line style color modifiers. File I/O has been also improved to load/save the animation data associated with line style datablocks. Known issue: Freestyle-related options in render layers are not animatable at the moment, because of general inability (or maybe a bug) that keyframes cannot be inserted with respect to render layer options.
2010-07-20A WIP commit for proof-of-concept implementations of line style modifiers.Tamito Kajiyama
A number of UI elements were newly introduced to control line color, alpha transparency and line thickness by means of base color/alpha/thickness plus modifiers that alter the base values. To begin with, three basic modifiers were prototyped with the aim of putting the new UI framework in practice and evaluating if it works properly. The Parameter Editor mode is still in a work-in-progress state and totally useless from users' viewpoint.
2010-06-26A step toward a new user-friendly GUI for manipulating line style parameters.Tamito Kajiyama
This commit is just meant to give the new GUI framework a concrete shape. There is no usefulness in newly introduced elements at the moment. Freestyle options in render layers now include a pull-down menu named Control Mode that allows you to choose either the Python Scripting or Parameter Editor mode. The Python Scripting mode is the conventional way of controlling Freestyle by directly using style modules written in Python. The Parameter Editor is a new control mode that is intended to be used by everyone without relying on Python programming. In the Parameter Editor mode, you can specify multiple line sets for each render layer. A line set defines feature edge selection criteria, as well as a line style for drawing the selected feature edges using specific line stylization parameters. Line style is a new datablock type, meaning that a line style can be shared by multiple line sets (possibly those in different render layers in different scenes). Much more additions are anticipated in subsequent commits to implement UI controls for specifying feature edge selection criteria and line stylization parameters.