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
path: root/source
AgeCommit message (Collapse)Author
2020-10-05Insert keyframes while preserving shape of curveSybren A. Stüvel
Apply the De Casteljau algorithm to split the Bèzier curve at the X coordinate where the new key is inserted, and uses the result to update both the newly inserted and surrounding handles. For curves that use Auto keyframes this has been largely addressed by the new algorithm from D2884. This commit extends this to non-auto handles. This code is heavily based on D3172 by Alexander Gavrilov (@angavrilov). Manifest Task: https://developer.blender.org/T81353
2020-10-05Initialize CLOG to fix crashing unit testsSybren A. Stüvel
Initialize CLOG in the blendfile-loading unit test superclass. Since rB8683d4e88f2e CLOG is used by more areas in Blender, and without initialisation it crashes.
2020-10-05CMake: include DNA_modifier_defaults.hCampbell Barton
2020-10-05Fix building without OPENVDBCampbell Barton
2020-10-05Revert "Volumes: make Mesh to Volume modifier independent of object transforms"Brecht Van Lommel
This reverts commit 66cd82a8d. This was based on a misunderstanding. We do want to take into account transforms similar to other modifiers like booleans, to support taking into account animated transforms, combining multiple meshes into one volume, etc.
2020-10-05Volumes: more generic way to handle different openvdb typesJacques Lucke
Reviewers: brecht Differential Revision: https://developer.blender.org/D9093
2020-10-05Cleanup: Declare variables where initializedHans Goudey
Declaring variables where they are initialized and used makes their scope much more explicit and it aids readility since types are visible. This commit doesn't touch the ID template code since there is an active patch in that area.
2020-10-05Move sequencer sources from blenkernelRichard Antalik
This is first step of refactoring task T77580. Next step will be breaking up files into smaller ones. Reviewed By: sergey, brecht Differential Revision: https://developer.blender.org/D8492
2020-10-05Fix T80397: Select Side not working correctlyRichard Antalik
Test for side on which strip is was incorrect.
2020-10-05Rename eSpaceSeq_Proxy_RenderSize membersRichard Antalik
Remove word proxy from eSpaceSeq_Proxy_RenderSize members if proxy is not used with that item. Otherwise this can be a bit confusing. Reviewed By: brecht Differential Revision: https://developer.blender.org/D8861
2020-10-05Fix T80282: Playback start delayed with AV syncRichard Antalik
If current frame is set to before start frame, with AV sync there is delay when playback is started. Tag scene with ID_RECALC_AUDIO_SEEK, so audio playback starts from correct position. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8809
2020-10-05Cleanup: simplify tempdir_session_createCampbell Barton
Remove the need for a temporary allocated path.
2020-10-05Correct last commit (where_is_temp refactor)Campbell Barton
Changes didn't account the case when mkdtemp failed. Previously the copying the string wasn't needed in this case.
2020-10-04Cleanup: refactor where_is_tempCampbell Barton
Functionality was hard to follow as the meaning of fullname depended on basename being NULL or not. - where_is_temp is now only responsible for finding the temp directory. - Split out tempdir_session_create into it's own function that wraps mkdtemp. - Rename basename to tempdir, fullname to tempdir_session.
2020-10-04Cleanup: remove outdated commentCampbell Barton
Should have been removed in b36a05bb7e794335e3415594c41d3986cdc815e8, when Python was started after reading the preferences.
2020-10-04Preferences: use the users temp directory in background modeCampbell Barton
This choice was made when preferences were not read in background mode, so the temp dir needed to be initialized with something. See bc9848f7e67c3e695403179f8bcdb78b0e5764a3. Now preferences are always read there is no reason to ignore this particular preference in background mode. Anyone wanting to do background renders that ignore their preferences can run with factory startup.
2020-10-04Cleanup: BKE_appdir store static values in a struct, clarify namesCampbell Barton
Avoid multiple static variables with odd names, instead keep them all in one struct, expand their names for clarity.
2020-10-04Fix error in last commit printing NULL stringsCampbell Barton
While this works with GCC, printing NULL strings is undefined behavior.
2020-10-04BKE_appdir: log details about path lookupsCampbell Barton
These were printf's, disabled by a define that could be uncommented. Use logging since this can be useful when investigating any issue with paths not being found at the expected location. Without this any problem finding app-templates, Python's installation, icons ... etc are quite difficult to troubleshoot especially on systems without access to system-call tracing. To use this run: blender --log "bke.appdir" --log-level 3
2020-10-04Fix color-management ignoring the data-path command line valueCampbell Barton
Initialize ImBuf (and color-management) after passing arguments that set environment variables such as `--env-system-datapath` This also fixes a bug where BKE_appdir logging failed since it was called before the `--log` argument was passed. Add asserts so this doesn't happen again.
2020-10-04Cleanup: clarify names in appdirCampbell Barton
- ver -> version. - env -> env_path.
2020-10-04Cleanup: BKE_appdir left paths set even when not foundCampbell Barton
Internally appdir functions would test if a path exists, returning false if it doesn't, leaving the string set instead of clearing it. This is error prone as invalid paths could be used accidentally. Since BKE_appdir_folder_id_user_notest & BKE_appdir_folder_id_version depend on this, add a 'check_is_dir' argument so the path can be used even when the directory can't be found.
2020-10-03Cleanup: Remove duplicated View2D pan polling logicJulian Eisel
Same as 21fc4ae20692, but for view panning this time. Also had to set the poll callbacks still in this case.
2020-10-03Revert part of previous commitJulian Eisel
The change to the `poll()` callback was actually incorrect. But also reduandant, since the function is actually already executed in the operator.
2020-10-03Fix compile error when compiling with WITH_INPUT_NDOF after View2D changesJulian Eisel
Actually, fixes compile error and an incorrect poll. Caused by 21fc4ae20692 and 3a1cf838ca09. The poll has to perfrom the `view_zoom_poll()` logic to ensure correct context.
2020-10-03Fix error in previous commit...Julian Eisel
2020-10-03Fix possible un-initialized variable use in UI codeJulian Eisel
Uncovered by a4aa94c41cb7. Before that, it would actually be a possible `NULL` pointer dereference. It would happen if a `UILayout.prop()` was placed with the `full_event` option set to `True` (or the C equivalent) for a non keymap-item property. Now this the `full_event` option is ignored then with a warning print.
2020-10-03Fix issues with calling View2D zoom operators in an `EXEC` contextJulian Eisel
Multiple related issues: * `view_zoomdrag_exec()` required `view_zoomdrag_init()` to be called first to set up data. Can now easily be done in the `_exec()` function as well though. * Because of that the operators could not be called in an `EXEC_` context (e.g. `EXEC_REGION_WIN`). * With "Zoom to Mouse Position" enabled, zooming from a menu or script would zoom to the mouse position. That should only happen if the operators are called directly in the editor.
2020-10-03Cleanup: Remove redundant View2D operator poll checkJulian Eisel
The poll would already be executed as operator callback, this check was redundant. Also see previous commit.
2020-10-03Cleanup: Remove duplicated View2D zoom polling logicJulian Eisel
`view_zoomdrag_init()` would perform a number of sanity checks that `view_zoom_poll()` already executed. The design of operators forsees that (non-expensive) context sanity checks are done by the `poll()` callbacks, and the execution callbacks can then just assume that happened. No reason to be overly pedantic, we don't do that elsewhere either. Note that this code is from the earliest days of an operator design. So it's not surprising that it wasn't using the design "properly".
2020-10-03Property Search: Set panel expansion when tab changesHans Goudey
This commit makes the panel expansion set based on the search results when the active tab in the properties editor changes. The multi-tab search patch (D8859) actually doesn't handle this because it uses a different code path. This feature uncovered a subtle but fairly significant issue with the implementation of property search (More details in T81113). Basically, the search needed multiple redraws to properly display the expansion of panels based on the search results. Because there is no animation of panel expansion when switching tabs, the problem was exposed only now. With this commit, hiding of "search only" buttons and panel size calculation happens in a single final step of the panel layout pass. The "search only" layout root flag is removed. Instead every button inside a panel header is in a single "uiButtonGroup" marked with a specific "in header" flag, an idea which could be generalized in the future. Differential Revision: https://developer.blender.org/D9006
2020-10-03Cleanup: use BLI_path_join in appdir.c to simplify logicCampbell Barton
Change `test_path` function so: - Joining paths calls a function instead of being performed inline. - Optional NULL paths must always be ordered last (easier to follow). Other minor changes: - Remove FIXME comment is it's handled properly by BLI_path_join. - The wrong size was being used copying into `targetpath`.
2020-10-03Cleanup: Remove/replace C standard library assert() and header usagesJulian Eisel
We have our own assert implementation, `BLI_assert()` that is prefered over the C standard library one. Its output is more consistent across compilers and makes termination on assert failure optional (through `WITH_ASSERT_ABORT`). In many places we'd include the C library header without ever accessing it.
2020-10-03Cleanup: Remove dead code in panel logicJulian Eisel
The region types checked here were removed from the editors in 9e2abbc9ba5d and eb7485389b8a. So the if-conditions would never be true.
2020-10-03Fix error in recent change "run UserDef versioning from readfile.c"Campbell Barton
Missed moving the defines in CMake for e255040c7797 causing cycles not to be enabled.
2020-10-03Cleanup: use doxy sections for appdir.cCampbell Barton
Keep related functionality grouped.
2020-10-03Cleanup: comments for appdirCampbell Barton
Use doxy syntax & minor improvements.
2020-10-03GPencil: Fix unreported wrong name for RNA setterAntonio Vazquez
The Vertex Group setter function name was wrong for Tint modifier.
2020-10-03Cleanup: move temp directory environment checks into a loopCampbell Barton
Minimizes ifdef'd code for WIN32.
2020-10-03Preferences: remove temp directory initialization for WIN32Campbell Barton
Revert 76b1a27f96ffe1ec8c5351f34bcc2b9733b4483e since there is no reason windows should behave differently to other platforms. This was added so Windows users wouldn't see "/tmp/" in the UI. Since then the default temporary directory is a blank string, leave blank on all systems as Python script authors may accidentally use this instead of `bpy.app.tempdir`.
2020-10-03Cleanup: remove unused temp directory initializationCampbell Barton
This last worked in v2.27 (2003) where all paths were initialized to "/" which was still checked to initialize the temp directory. This hasn't been the case since 932e9e831647604e0b129b55e5ab035 where it changed to "/tmp/", then an empty string (current default).
2020-10-03Fix stack use after scope error after recent cleanupHans Goudey
An error adding search to an existing button, caused by my own error in rBa4aa94c41cb79e9.
2020-10-03UI: Create button group if none existsHans Goudey
This makes it unecessary to create a button group when the block is created, giving more flexibility when creating the first group-- for example, creating the first button group with special parameters.
2020-10-03UI: Move button groups from layout to block levelHans Goudey
For a future patch (D9006) we need these groups for longer than just the the layout process, in order to differentiate buttons in panel headers. It may also be helpful in the future to have a way to access related buttons added in the same uiLayout.prop call. With this commit, the groups are stored in and destructed with the uiBlock.
2020-10-03Cleanup: remove unused code in blend file loadingCampbell Barton
v2.4x could cancel loading files that warned of being a newer, unsupported version. Remove this logic since it's no longer in use.
2020-10-03readfile: always run setup_app_data after updating defaultsCampbell Barton
When blend files were loaded with app-templates, setup_app_data was running before defaults were updated. This is likely to cause problems with order of initialization so always update the startup file beforehand.
2020-10-03Cleanup: rename main preferences versioning functionCampbell Barton
BLO_version_defaults_userpref_blend -> blo_do_versions_userdef The name was misleading as it was declared along with BLO_update_defaults_startup_blend making it seem these functions were related. In fact preference defaults don't need to be updated as is done for startup.blend since an in-memory blend file isn't used. Rename the function to match other versioning functions called from readfile.c. Also add/update comments on these differences.
2020-10-03Cleanup: run UserDef versioning from readfile.cCampbell Barton
Now versioning UserDef is run in readfile.c, as is done for other Blender data. Previously versioning was mixed with other run-time initialization, so it needed to be called later by the window manager.
2020-10-03Cleanup: centralize versioningCampbell Barton
readfile.c's versioning function was only used for 2 variables. Move versioning into versioning_userdef.c so everything is done in one function. Note: DNA_struct_elem_find checks have been replaced with checks for the next released version. This is harmless, as only old preferences saved between releases can have their values overwritten. Note: userdef versioning should be called from `do_versions_userdef`, this will be done separately.
2020-10-02Property Search: Don't use search color for subpanel titlesHans Goudey
This replaces the blue theme color for subpanel titles with the the same fade as for parent panels. The search color doesn't work well for subpanel title colors. And actually, because there are often buttons with checkboxes in the panel headers, we don't have to treat this indicator any differently than regular buttons. Differential Revision: https://developer.blender.org/D8976