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
2016-07-12Fix T48830: Outliner draw crash, missing NULL checkCampbell Barton
Fix from @cheleb
2016-07-08Refactor: pass Main to id_make_local.Bastien Montagne
Totally stupid to not pass it, and then let (some) BKE_foo_make_local() use G.main! Note: unused for now, much more refactoring still to come in make_local area!
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-07-02Cleanup: styleCampbell Barton
2016-07-01"Fix" crash when deleting linked object which has indirect usages.Bastien Montagne
This is in fact very hairy situation here... Objects are only refcounted by scenes, any other usage is 'free', which means once all object instanciations are gone Blender considers it can delete it. There is a trap here though: indirect usages. Typically, we should never modify linked data (because it is essencially useless, changes would be ignored and ost on next reload or even undo/redo). This means indirect usages are not affected by default 'safe' remapping/unlinking. For unlinking preceeding deletion however, this is not acceptable - we are likely to end with a zero-user ID (aka deletable one) which is still actually used by other linked data. Solution choosen here is double: I) From 'user-space' (i.e. outliner, operators...), we check for cases where deleting datablocks should not be allowed (indirect data or indirectly used data), and abort (with report) if needed. II) From 'lower' level (BKE_library_remap and RNA), we also unlink from linked data, which makes actual deletion possible and safe. Note that with previous behavior (2.77 one), linked object would be deleted, including from linked data - but then, once file is saved and reloaded, indirect usage would link back the deleted object, without any instanciation in scene, which made it somehow virtual and unreachable... With new behavior, this is no more possible, but on the other hand it means that in situations of dependency cycles (two linked objects using each other), linked objects become impossible to delete (from user space). Not sure what's best here, behavior with those corner cases of library linking is very poorly defined... :(
2016-07-01Outliner: pass operator's reports to all operation callbacks.Bastien Montagne
Also define single callback func typedef, cleaner this way! Note: maybe we want to do that for the other callbacks too (data, etc.), but will be enough for now.
2016-06-29Cleanup: spelling, indentationCampbell Barton
2016-06-27Fix T48740: User could remap indirect libdata usages from outliner.Bastien Montagne
Remapping indirect usage of IDs is forbidden from user space, this is calling for nice nightmare with libraries handling (and undo crash, among other things). Not sure why I was 'laxist' about indirect usage cases detection like that, for now just consider any ID used by another linked datablock as indirect usage case! Also, added some error/warning reports to Outliner's remap code.
2016-06-22ID-Remap, step two: add some user-level tools.Bastien Montagne
This commit adds operators and Outliner menu entries to reload or relocate a library, and to delete or replace a datablock. RNA ID API is also extended to allow ID deletion and remapping from python. Review task: D2027 (https://developer.blender.org/D2027). Reviewed by campbellbarton, thanks a bunch.
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-15Fix T48654: outline text visible while renamingCampbell Barton
Both button and rename text would draw while renaming, caused issues with some themes.
2016-05-03Fix T48328: Outliner: Armature EditMode: crash when selecting bone of a ↵Bastien Montagne
shared amrature in another object's bone list. Basically, issue is that outliner stores editbones for an edited armature, which are only valid during EditMode. When more than one object use the same armature, selecting ebones from same armature but under non-edited object would first select that object (and hence switch out of editmode), and then try to select editbone while editdata no more exist. Solution for now is to not change active object in this case - it's not totally ideal (not consistent), but other solutions (like switching edited object without leaving editmode, or rebuilding (part of) outliner tree in-between) are horribly hackish and most likely prone to epic failure anyway.
2016-04-26Cleanup: use const for outliner argsCampbell Barton
Also c99 edits for outliner_find_id
2016-04-26Outliner: "Show Active" support for active bonePhilipp Oeser
Resolves T48229
2016-04-04Fix missing ID_SO sound type in outliner's ID types.Bastien Montagne
Note that we may want to review that some day, we have quite a bit of ID types here that are 'blend file' view only, might be worth splitting the check based on this.
2016-03-13Keyframing: Added ToolSetting for choosing default keyframe typeJoshua Leung
To make it easier for animators working in a multipass pose-to-pose workflow when inserting breakdown keyframes and so forth, it is now possible to specify the "type" of keyframe being created (i.e. the colour of the keyframe, when drawn in the Dope Sheet). Usage: 1) Choose the type of keyframe ("Keyframe", "Breakdown", "Extreme", etc.) from the new dropdown located between the AutoKeying and KeyingSet widgets on the timeline header. 2) Insert keyframes 3) Rejoyce that your newly created keyframes have now been coloured for you already in the DopeSheet. Todo: * Look into a way of using the actual keyframe colours (from the theme) for the icons of these types.
2016-02-10Outliner: omit active-unselected in "Selected" viewCampbell Barton
This isn't selected, so misleading to include in selection list.
2016-02-09Fix T47368: Crash re-linking object to sceneCampbell Barton
2016-01-21Cleanup: line length, indentationCampbell Barton
2016-01-08Fix T47138: Page Down key pages up, instead of down, in Outliner.Bastien Montagne
Usual operator properties 'saving' after first execution... Double fix here, since being explicit in keymap is good practice too.
2016-01-04Remove SCons building systemSergey Sharybin
While SCons building system was serving us really good for ages it's no longer having much attention by the developers and started to become quite a difficult task to maintain. What's even worse -- there started to be quite serious divergence between SCons and CMake which was only accumulating over the releases now. The fact that none of the active developers are really using SCons and that our main studio is also using CMake spotting bugs in the SCons builds became quite a difficult task and we aren't always spotting them in time. Meanwhile CMake became really mature building system which is available on every platform we support and arguably it's also easier and more robust to use. This commit includes: - Removal of actual SCons building system - Removal of SCons git submodule - Removal of documentation which is stored in the sources and covers SCons - Tweaks to the buildbot master to stop using SCons submodule (this change requires deploying to the server) - Tweaks to the install dependencies script to skip installing or mentioning SCons building system - Tweaks to various helper scripts to avoid mention of SCons folders/files as well Reviewers: mont29, dingto, dfelinto, lukastoenne, lukasstockner97, brecht, Severin, merwin, aligorith, psy-fi, campbellbarton, juicyfruit Reviewed By: campbellbarton, juicyfruit Differential Revision: https://developer.blender.org/D1680
2015-12-28Cleanup: use BLI_libblock prefix for id functionsCampbell Barton
- test_idbutton -> BLI_libblock_ensure_unique_name (not only used from UI) - BKE_rename_id -> BKE_libblock_rename (always pass valid main) also rename: - name_uiprefix_id -> BKE_id_uiprefix
2015-12-27Split id->flag in two, persistent flags and runtime tags.Bastien Montagne
This is purely internal sanitizing/cleanup, no change in behavior is expected at all. This change was also needed because we were getting short on ID flags, and future enhancement of 'user_one' ID behavior requires two new ones. id->flag remains for persistent data (fakeuser only, so far!), this also allows us 100% backward & forward compatibility. New id->tag is used for most flags. Though written in .blend files, its content is cleared at read time. Note that .blend file version was bumped, so that we can clear runtimeflags from old .blends, important in case we add new persistent flags in future. Also, behavior of tags (either status ones, or whether they need to be cleared before/after use) has been added as comments to their declaration. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D1683
2015-12-19Add a void 'user_data' memeber to Outliner's callbacks.Bastien Montagne
This is not used currently, but needed for work done in id-remap branch, and will greatly reduce diff noise in this area...
2015-12-12Cleanup: style/spellingCampbell Barton
2015-12-07Usual UI messages fixes.Bastien Montagne
2015-12-01Outliner: add an option to "delete" libraries.Bastien Montagne
Caminandes team request. In current master it's not possible to do this in a total clean way, so we are simply setting all user counts of given lib's datablocks to zero (similar to rna_ID_user_clear()'s doing). This is a bit crappy because it still lets datablocks floating around (with invalid user count values), and requires a save & reload cycle to be finalized. But for now it should be good enough. Propper implementation will be added to id-remap.
2015-11-30Fix T46896: Outliner group 'hide' doesn't update viewport renderCampbell Barton
2015-11-28Cleanup: 'area' vs 'region'Julian Eisel
Apparently this is the result of some sloppiness during 2.5 project and since then it confused people who were trying to understand the area-region relation (myself included). Sorry if this causes merge conflicts for anyone, but at some point we really had to do it :/
2015-11-24Fix outliner crash after recent no-functional-changes cleanup commitsSergey Sharybin
2015-11-23Cleanup: shadowing (editors)Campbell Barton
2015-11-09Fake user: add BKE_library helpers to set/clear that flag.Bastien Montagne
Since it also involves usercount manipulation, safer and cleaner to do it in BKE_library...
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-11-05Cleanup: comments/styleCampbell Barton
2015-11-02Library API: pass Main struct to unlink functionsCampbell Barton
2015-10-22Fix T46561: Crash in outliner delete hierarchyCampbell Barton
When children & parents were selected in the outliner, it attempted to free the the object twice.
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-09-09Fix (unreported) crash with undo/outliner and drivers.Bastien Montagne
To reproduce the crash: * Add some shapekeys to default cube. * Add at least on driver (can be default empty one) to a shapekey value. * **Make this driver visible in Outliner**. * Delete all shapekeys. * Undo. * Crash. Root of the issue is outliner reading code in `blo_lib_link_screen_restore()`, which would try to `restore_pointer_by_name()` for all `TreeStoreElement->id` pointers. Thing is, those id pointers are not always IDs, they can be animdata, sequence, RNA struct/property... That's really not so great design, but also has reasons like size of the struct, we have to live with it. So now: * TreeStoreElement->type defines are braught back into DNA. * There we also define a `TSE_IS_REAL_ID` macro to check whether a given TreeStoreElement actually stores an ID pointer or not. * And in Outliner read code we only try to retore pointers by name for actual ID ones, and set the others to default NULL value. Also, added clear comment to TSE types that do not store a real ID pointer!
2015-09-09Fix (unreported) Outliner letting you edit path of indirect linked lib shown ↵Bastien Montagne
at 'first level'. From Gooseberry team request indirect libs were also added at root of 'BlendFile' Outliner view, but that allowed edition of their path, which is useless...
2015-08-29Add some more missing ID types to TREESTORE_ID_TYPE...Bastien Montagne
2015-08-22outliner: tweak GPLayer color button overlapCampbell Barton
2015-08-22Fix outliner grease pencil color buttonCampbell Barton
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-08-14Fix unnecessarily added undo steps when deleting only sceneJulian Eisel
Steps to reproduce were: startup.blend, move any object, delete active scene (nothing happens), undo (nothing happens), second undo is needed to revert object transformation
2015-08-14Outliner: Context menu for scenesPhilipp Oeser
Adds context menu for scenes in the outliner, for now, with only a 'Delete' entry. D1448 by @lichtwerk, review by @aligorith and @Severin
2015-08-04SCons: Fix for really nasty bug with polluting configuration environmentSergey Sharybin
The issue was caused by the following construction: def = env['SOMETHING'] defs.append('SOMETHING_MORE') Since first assignment was actually referencing environment option it was totally polluted hawing weird and wonderful side effects on all other areas of Blender.
2015-07-21Fix assert in Outliner.Bastien Montagne
2015-07-18Cleanup: whitespace & break placementCampbell Barton
2015-07-11remove redundant castsCampbell Barton
2015-07-03UI: add ability to access/generate 'shortcuts strings' of modal keymaps.Bastien Montagne
We already had that for global keymaps (used e.g. to generate shortcuts for menu entries), but this wasn’t possible for modal keymaps yet (e.g. help message in header during transforms and other modal operation). This commit only adds needing background code, it does not change anything from user PoV. Modal operators will be updated to use it in comming weeks. Thanks to Campbell for revisions & suggestions. :) Differential Revision: https://developer.blender.org/D780