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-04-05IMB_metadata improvementsSybren A. Stüvel
- Metadata handling is now separate from `ImBuf *`, allowing it to be used with a generic `IDProperty *`. - Merged `IMB_metadata_add_field()` and `IMB_metadata_change_field()` into a more robust `IMB_metadata_set_field()`. This new function doesn't return any status (it now always succeeds, and the previously existing return value was never checked anyway). - Removed `IMB_metadata_del_field()` as it was never actually used anywhere. - Use `IMB_metadata_ensure()` instead of having `IMB_metadata_set_field()` create the containing `IDProperty` for you. - Deduplicated function declarations, moved `intern/IMB_metadata.h` out of `intern/`. Note that this does mean that we have some extra `#include "IMB_metadata.h"` lines now, as the metadata functions are no longer declared in `IMB_imbuf.h`. - Deduplicated function declarations, all metadata-related declarations are now in imbuf/IMB_metadata.h. Part of: https://developer.blender.org/D2273 Reviewed by: @campbellbarton
2018-04-05Undo: split text undo steps out of the data-blockCampbell Barton
This moves undo storage into a separate struct which is passed in from the undo system.
2018-04-05Undo System: return undo step from undo push initCampbell Barton
Also improve logging
2018-04-04Fix modifier freeing code re. ID refcounting.Bastien Montagne
Free code should not handle ID refcounting at all. This has to be done at higher level, since in some case we want to free (temp) data that actually did not refcount at all its IDs. This change seems to be working OK, but as usual in that area, only lots of testing in real-case situation will say whether there are some hidden bugs or not.
2018-04-04Depsgraph: Assert that pchan index is always validSergey Sharybin
2018-04-04Depsgraph: Only bind ID-data and indices to depsgraph callbacksSergey Sharybin
This is a part of copy-on-write sanitization, to avoid all the checks which were attempting to keep sub-data pointers intact. Point is: ID pointers never change for CoW datablocks, but nested data pointers might change when updating existing copy. Solution: Only bind ID data pointers and index of sub-data. This will make CoW datablock 7update function was easier in 2.8. In master we were only using pose channel pointers in callbacks, this is exactly what this commit addresses. A linear lookup array is created on pose evaluation init and is thrown away afterwards. One thing we might consider doing is to keep indexed array of poses, similar to chanhash. Reviewers: campbellbarton Reviewed By: campbellbarton Subscribers: dfelinto Differential Revision: https://developer.blender.org/D3124
2018-04-03Undo: make id-map use binary search to keep sortedCampbell Barton
2018-04-03Fix own error w/ undo ID lookupCampbell Barton
Was testing with small number of items, so this went unnoticed.
2018-04-03Cleanup: rename BMesh count_ex -> count_at_mostCampbell Barton
2018-04-03Cleanup: rename list count_ex -> count_at_mostCampbell Barton
2018-04-03Undo System: id-map avoid duplicate add/lookupCampbell Barton
Add versions of add/lookup that check the previous item.
2018-04-03Fix mistake logging w/ undoCampbell Barton
2018-04-02Build: fixes for the Intel compiler versions 2016, 2017, 2018.Milan Jaros
Differential Revision: https://developer.blender.org/D3109
2018-04-01Cleanup: remove global headerCampbell Barton
2018-03-31Undo: unified undo system w/ linear historyCampbell Barton
- Use a single undo history for all operations. - UndoType's are registered and poll the context to check if they should be used when performing an undo push. - Mode switching is used to ensure the state is correct before undo data is restored. - Some undo types accumulate changes (image & text editing) others store the state multiple times (with de-duplication). This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`. - Each undo step stores ID datablocks they use with utilities to help manage restoring correct ID's. Needed since global undo is now mixed with other modes undo. - Currently performs each undo step when going up/down history Previously this wasn't done, making history fail in some cases. This can be optimized to skip some combinations of undo steps. grease-pencil is an exception which has not been updated since it integrates undo into the draw-session. See D3113
2018-03-30C Logging: use instead of printf for messagesCampbell Barton
- See `--log` help message for usage. - Supports enabling categories. - Color severity. - Optionally logs to a file. - Currently use to replace printf calls in wm module. See D3120 for details.
2018-03-27Cleanup: global undo (minor changes to internals)Campbell Barton
- Get memory usage from MemFile instead of MEM API avoids possible invalid when threads alloc memory. - Use size_t instead of uint and uintptr_t to store size. - Rename UndoElem.str -> filename - Rename MemFileChunk.ident -> is_identical
2018-03-24Text: re-allocate exact lengths for undoCampbell Barton
Undo sometimes reserved too much space in the buffer, now assert when this happens and allocate the exact size needed. Note prepares for moving text editor undo out of the text block (D3113) which will split the undo buffer into a list of undo steps.
2018-03-24Fix text editor undo w/ 4+ byte utf8 charactersCampbell Barton
2018-03-24Cleanup: move undo opcodes out of public headerCampbell Barton
2018-03-23Cleanup: stray tabsCampbell Barton
Tabs in middle of code (mostly for no reason / by accident).
2018-03-20Remove debug only code from previous commitSergey Sharybin
2018-03-20Memory allocator: Clarify consistency check functionSergey Sharybin
Also make it to return truth when everything is good and false otherwise.
2018-03-20Fixed: cache clearing when using multiple Alembic files.Sybren A. Stüvel
2018-03-20Fix missing ID pointer handling in materials in ID remapping code.Bastien Montagne
2018-03-20Fix missing array duplication when copying materialSergey Sharybin
Texture paint slots were copied as a pointer, causing double-free.
2018-03-19Cleanup: split lattice into own libraryCampbell Barton
Was mixed with object functionality.
2018-03-16Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.Bastien Montagne
Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to a vast amount of bad things.
2018-03-16Fix T54310: Assert when enable Brush custom icon.Bastien Montagne
We had a mix of two issues here actually: * First, Brush are currently using their own sauce for custom previews, this is not great, but moving them to use common ImagePreview system of IDs is a low-priority TODO. For now, they should totally ignore their own ImagePreview. * Second, BKE_icon_changed() would systematically create a PreviewImage for ID types supporting it, which does not really makes sense, this function is merely here to 'tag' previews as outdated. Actual creation of previews is deferred to later, when we actually need them.
2018-03-16Cleanup: naming and const parameter.Bastien Montagne
2018-03-16Depsgraph: Move evaluation debug prints to depsgraphSergey Sharybin
This way we can easily control format and keep it consistent. And also possibly do other trickery, like coloring addresses!
2018-03-14Style cleanup.Bastien Montagne
2018-03-14Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.Bastien Montagne
For IDProps IDarray, IDP_EqualsProperties was called for each item, instead of IDP_EqualsProperties_ex, discarding value of `is_strict` option. Probably not an issue with current code, though.
2018-03-13Cleanup: doxygen commentsCampbell Barton
2018-03-08Cleanup: Use BKE_ prefix for all public functions exposed by the NLA moduleJoshua Leung
2018-03-08T54233: NLA "Push Down" discards Blend Mode, Extrapolation, and InfluenceJoshua Leung
Each AnimData block has a set of Blend/Extrapolation/Influence settings that can be used to control how the active action is blended with the NLA stack. However, these settings were not getting copied over to the newly created strips (as the push-down code existed long before these settings were added). This commit solves this in several ways: * Active Action Blend/Extrapolation/Influence settings now get copied to the new strips when adding them to the NLA stack via Push Down. Note: This doesn't happen when there are no existing NLA tracks, as these settings don't get used in that case. * Strip Influence will be copied across when inf < 1.0 (i.e. when a non-default value is used), to maintain the effect. To make this work, the influence value will get added as a keyframe to the strip's "Influence" Control FCurve. - See code comments for an alternative approach and why that was not chosen - Strip Time still doesn't get keyframes added automatically yet. * To ensure the "extrapolation mode" settings don't get always overwritten, I've put in place a compromise: the extrapolation will only get changed if the chosen setting will cause problmes (i.e. hold forward & back -> hold forward if there are other tracks before it already). Not safe for backporting to 2.79[x] stable releases.
2018-03-06Fix T53206: Array modifier doesn't merge vgroupsCampbell Barton
Vertex group remapping utility function, now shared between object join and array modifier cap-ends. Weights which don't exist are removed. D3092 by @Foaly
2018-03-05Sequencer: Expose read-only FPS property for movie-type stripsSergey Sharybin
Main purpose is to make it possible to cover FPS detection with regression test. But it might also be handy for some other scripters. Thanks Campbell for review!
2018-03-03Fix T54211: OpenGL debug error message in texture draw mode.Brecht Van Lommel
Quite harmless and won't be a problem in 2.8.
2018-03-02Maintain scaling ratio of non-free axes in Maintain Volume T48079 fix.Alexander Gavrilov
This is probably a better way to handle it: instead of totally discarding scaling of non-free axes, keep the ratio between them. Basically the logic of the constraint is now that it rescales the object uniformly in the non-free axis plane in order to force the total volume change to the desired value.
2018-03-02FCurve: only calculate single axis lengthCampbell Barton
Was calculating all 3
2018-03-02Fix building w/o PythonCampbell Barton
Also minor cleanup.
2018-03-01Discard non-free axis scaling in Maintain Volume to improve 2.79 compat.Alexander Gavrilov
It seems the reason the old version of the constraint overcompensates as reported in T48079 is to allow the constraint to work with uniform scaling on all axes. However the way it did that actually _requires_ uniform scaling for the constraint to work correctly, and breaks if only the free scaling axis is used to avoid redundant channels. This version attempts to allow both by discarding scaling in the non- free directions instead of applying the correction on top of it.
2018-03-01Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.Bastien Montagne
This merges changes in internals, runtime-only of existing custom normals code, which make sense as of themselves, and will make diff of soc branch easier/lighter to review. In the details, it mostly changes two things: * Now, smooth fans (aka MLoopNorSpaceArray) can store either loop indices, or pointers to BMLoop themselves. This makes sense since in BMesh, it's relatively easy to get index from a BMElement, but nearly impracticable to go the other way around. * First change enforces another, now we cannot rely anymore on `loops` being NULL in MLoopNorSpace to detect single-loop fans, so we instead store that info in a new flag. Again, these are expected to be totally non-functional changes.
2018-02-28De-duplicate tool settings copy and make tool settings freeing reusableSergey Sharybin
2018-02-26Cleanup: typosCampbell Barton
D3081 by @rjg, with others.
2018-02-24Smoke: expose empty space clipping property to the UI.Kévin Dietrich
This is used to determine which voxels are to be considered empty space. Previously it was hardcoded for converting dense grids to OpenVDB grids to reduce disk space usage. This value is also useful for rendering engines to know, i.e. to optimize ray marching.
2018-02-24OpenVDB : use underscores instead of spaces in grid names.Kévin Dietrich
Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old files. This fixes T53802.
2018-02-23Cycles: add Principled Volume shader.Brecht Van Lommel
Similar to the Principled BSDF, this should make it easier to set up volume materials. Smoke and fire can be rendererd with just a single principled volume node, the appropriate attributes will be used when available. The node also works for simpler homogeneous volumes like water or mist. Differential Revision: https://developer.blender.org/D3033
2018-02-23Smoke: change default flame temperatures to match OpenGL preview.Brecht Van Lommel