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-06-11Driver Workflow (T55145): Tweak to default expression used for new drivers ↵Joshua Leung
created from UI Previously, newly created drivers were set to "Scripted Expression" mode and had their 'expression' field set to the pre-driver value of the property, so that adding a driver didn't cause the property to immediately lose its old value (and potentially causing havok in the scene). However, this had the unintended consequence of making the driver setup workflow more cumbersome, as you first had to replace that value with the name of the driver variable before your driver would work. This commit works around this issue by trying to combine the best of both worlds (quite literally): Now, the driver expression for drivers created using Ctrl-D will be "var + <old value>". Thus, in the simplest case, the driver will do something as soon as you fill out the driver variable settings (e.g. just filling out the Target Object field will do it), meaning you get your drivers working faster. Of course, it may now be necessary to edit out the old-value, and/or it might be a bit more confusing what/why it's there for newbies. However, the improved ease of setup, and/or a more tangible example of how an expression may be constructed outweigh the downsides IMO.
2018-06-11Drivers Workflow (T55145): Improvements to "Add Driver" workflowJoshua Leung
This commit implements a new behaviour for the "Add Driver" functionality (invoked from the RMB menu on a property, or by pressing Ctrl-D). Instead of spawning a context menu asking you to pick the way you want to create a driver, it will now just create a driver on the property under the mouse and then show the "Edit Drivers" popover so that you can immediately start editing the properties of this driver. This way, the whole process is more visual and feels less blocking / constrained, with less upfront decisions needed immediately. Notes: * The new behaviour is equivalent to choosing the "Manually Create (Single)" and then doing a "Edit Driver" on the property * Renamed the old "ANIM_OT_driver_button_add" operator to "ANIM_OT_driver_button_add_menu". It will probably go away in the near future, but it's better to keep it around for a while longer still until the new workflow settles down.
2018-06-04Merge branch 'master' into blender2.8Campbell Barton
2018-06-04Cleanup: strip trailing space in editorsCampbell Barton
2018-06-01Merge branch 'master' into blender2.8Campbell Barton
2018-06-01Cleanup: trailing whitespace (comment blocks)Campbell Barton
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-05-25UI: support for a popup panel which stays openCampbell Barton
2018-05-24Drivers UI (Part of T55145) - WIP first steps towards getting a floating ↵Joshua Leung
driver settings panel This commit adds a new menu entry - "Edit Driver" - the RMB menu that will show a popover panel displaying the settings for the driver you activated the menu item on. This shows the popover panel defined in yesterday's commit (GRAPH_PT_drivers_popover). It is possible to edit the driver settings from this panel now. However, do be warned that the functionality presented is highly WIP still. There are some unresolved issues, such as: - The popover disappears too easily on any mouse movements/clicks on anything, making the panel less useful right now than it should. - The layout still needs refining. Currently the layout that's there is a bit of a placeholder until we can play around with it a bit more to see/feel what feels good/right or what is too much. - The "Open Drivers Editor" on the bottom of the panel doesn't work. There are some tricky context tricky things that need to happen here to make that case work, since the operator button won't have the necessary context info.
2018-05-23Drivers UI Cleanup (Part of T55145)Joshua Leung
* Remove "Show Debug Info" option. Everyone has it turned on all the time, since it's just useful to have * Make the "Remove Driver" button less prominent. It doesn't happen that much, so it shouldn't take up as much room * Make "expressions" textbox wider (i.e. taking up the whole column width) by separating the label and textbox on separate lines. * Rename "Add Variable" button to make it clearer to users what "variables" may be (i.e. they serve as a way to specify Inputs, just like adding a "Source Data" node in a nodetree) * Regroup buttons
2017-11-02Merge branch 'master' into blender2.8Campbell Barton
2017-11-01Implement a new automatic handle algorithm to produce smooth F-Curves.Alexander Gavrilov
The legacy algorithm only considers two adjacent points when computing the bezier handles, which cannot produce satisfactory results. Animators are often forced to manually adjust all curves. The new approach instead solves a system of equations to trace a cubic spline with continuous second derivative through the whole segment of auto points, delimited at ends by keyframes with handles set by other requirements. This algorithm also adjusts Vector handles that face ordinary bezier keyframes to achieve zero acceleration at the Vector keyframe, instead of simply pointing it at the adjacent point. Original idea and implementation by Benoit Bolsee <benoit.bolsee@online.be>; code mostly rewritten to improve code clarity and extensibility. Reviewers: aligorith Differential Revision: https://developer.blender.org/D2884
2017-10-18Merge branch 'master' into blender2.8Campbell Barton
2017-10-18Merge branch 'master' into blender2.8Campbell Barton
2017-10-18Cleanup: Use const for RNA EnumPropertyItem argsCampbell Barton
Practically all access to enum data is read-only.
2017-10-17Make auto handle placement aware of cyclic extrapolation.Alexander Gavrilov
Cyclic extrapolation is implemented as an f-curve modifier, so this technically violates abstraction separation and is something of a hack. However without such behavior achieving smooth looping with cyclic extrapolation is extremely cumbersome. The new behavior is applied when the first modifier is Cyclic extrapolation in Repeat or Repeat with Offset mode without using influence, repeat count or range restrictions. This change in behavior means that curve handles have to be updated when the modifier is added, removed or its options change. Due to the way code is structured, it seems it requires a helper link to the containing curve from the modifier object. Reviewers: aligorith Differential Revision: https://developer.blender.org/D2783
2017-09-26Missed from merge commitCampbell Barton
2017-09-26Merge branch 'master' into blender2.8Campbell Barton
2017-09-26Add missing headerCampbell Barton
2017-09-26Fix T52901: New Depsgraph - Driver using "self" needs reloading file to workJoshua Leung
2017-06-08Replace all old DAG calls with direct calls to new DEG and remove ↵Luca Rood
BKE_depsgraph.h This removes BKE_depsgraph.h and depsgraph.c
2016-06-29Cleanup: spelling, indentationCampbell Barton
2016-06-27Partial fix for T48734Joshua Leung
The create drivers operator should not use the "Transform Channel" variable type when driving one transform with another on the same object/bone. Otherwise, you end up with a situation which technically results in a bit of a pseudo-dependency cycle.
2016-06-01Usual UI/i18n message cleanup (get rid of last remaining 'addon' too).Bastien Montagne
2016-05-31Fix T48552: Ctrl-D to add drivers shows disabled menu itemsCampbell Barton
2016-04-23Fix weird wording in driver operator tooltipJulian Eisel
2016-04-16Assorted enum tweaksJoshua Leung
* Knock out "Python" FModifier entry - It really hasn't been coded yet! * Add icon for "Match Indices" driver eyedropper mode. It should help provide a bit more of a hint of what it does, but it also doesn't look quite as nice now.
2016-04-15Code Cleanup: Remove unused define left over from earlier versions of this codeJoshua Leung
2016-04-15Remove a leftover from older codeSergey Sharybin
2016-04-15Drivers Editing: Added "Copy/Paste" buttons beside "Add Variable" for ↵Joshua Leung
copying all variables from one driver to another This was a feature request from a few years back (IIRC from ZanQdo?) to make it easier to reuse one set of driver variables across several different drivers. Dev Notes: * Finally it's done! All that trouble for two little buttons. * Grr... cmake... grrr!
2016-04-15Code Cleanup: Add proper defines (with ANIM_* prefix) for animation-related ↵Joshua Leung
copy-paste buffer free callbacks
2016-04-01Use STRPREFIX macro for testing property nameCampbell Barton
2016-03-31Fix memory leak when calling new driver eyedropperJulian Eisel
Would return OPERATOR_RUNNING_MODAL for non-modal operator.
2016-03-29Driver Mapping Types: Added temporary icons to break up the two types of ↵Joshua Leung
mapping behaviours (modal vs manual)
2016-03-29Drivers Setup: Expose all mapping types for creating driversJoshua Leung
* This includes the "manually create" modes, which correspond to the previous behaviour for setting up drivers. This is necessary when the current screen layout is not well suited to having multiple property editors open (e.g. small screen or heavily subdivided screen). * Only the modes relevant for the current property type (i.e. array vs single) will be shown * The "Add Driver" entries in the RMB context menu have now been replaced by a submenu which will list all the available mapping types. * NOTE: The code for the ANIM_OT_button_driver_add() operator is perhaps a bit hairy. However, it currently allows us to have the desired behaviour. It can always get cleaned up later though.
2016-03-27Cleanup: Silence some compiler warningsSergey Sharybin
2016-03-27Driver Eyedropper: Auto detection/correction magic for rotation propertiesJoshua Leung
When linking a rotation property to a non-rotation property (going in either direction - i.e. rot -> normal, normal -> rot), the driver expression will now be set so that the new drivers behave as expected (i.e. you get the values you see, instead of "weird" values that seem several orders of magnitude off). This may not be that great for everyone (i.e. the rare users out there who actually like to look at their rotations in radians), but they usually know what they're doing anyway, so this will be easy to correct.
2016-03-27Drivers: Add a "none" mode for use when adding driversJoshua Leung
Although it isn't currently exposed, this allows for the old behaviour, where an "empty" driver was added (without any target assigned yet). For this reason, it's also referred to as the "Manual" mode. There are also some attempts at improving the tooltips + names for the other modes (again, not shown anywhere yet)
2016-03-26Driver Setup Workflow Improvement: Property EyedropperJoshua Leung
This commit brings some long requested improvements to the workflow for setting up drivers, which should make it easier and faster to set up new drivers in a more interactive fashion. The new workflow is as follows: 1) Hover over the property (e.g. "Lamp Energy" or "Y Location") or properties ("Rotation") you wish to add drivers to. We'll refer to this as the "destination" 2) Ctrl-D to active the new "Add Drivers" eyedropper 3) Click on the property you want to use as the source/target. The property under the mouse will be used to drive the property you invoked Ctrl-D on. For example, to drive the X, Y, and Z location of the Cube using the Y Location of the Lamp, hover over any of the X/Y/Z location buttons, hit Ctrl-D, then click on the Y-Location button of the Lamp object. Drivers will be added to the X, Y, and Z Location properties of the Cube; each driver will have a single variable, which uses the Y-Location Transform Channel of the Lamp. Tips: - Transform properties will automatically create "Transform Channel" driver variables. Everything else will use "Single Property" ones - Due to the way that Blender's UI Context works, you'll need two Properties Panel instances open (and to have pinned one of the two to show the properties for the unselected object). It's slightly clunky, but necessary for implementing a workflow like this, as the UI cannot be manipulated while using eyedroppers to pick data. - The eyedropper operator implemented here actually has three modes of operation. 1) The "1-N" (one to many) mode is the default used for Ctrl-D, and "Add Driver to All" in the RMB Menu. This is the behaviour described above. 2) There's also a "1-1" (one to one) mode that is used for the "Add Single Driver" in the RMB Menu. 3) Finally, there's the "N-N" mode (many to many), which isn't currently exposed. The point of this is to allow mapping XYZ to XYZ elementwise (i.e. direct copying) which is useful for things like locations, rotations, scaling, and colours. Implementation Notes: - The bulk of the driver adding logic is in editors/animation/drivers.c, where most of the Driver UI operators and tools are defined - The property eyedropper code is in interface_eyedropper.c along with all the other eyedroppers (even though they don't share much actual code in common). However, this turns out to be necessary, as we can't get access to many of the low-level buttons API's otherwise. Todo: - It may be necessary to restore a way to access the old behaviour (i.e. "manual setup") in case it is not practical to immediately pick a property. - Other things to investigate here include extra hotkeys (e.g. Ctrl-Shift-D for Add Single?), and to expose the N-N mode. - Other things we could try include interactively applying scaling factors, picking multiple targets (e.g. for location difference and rotation difference drivers), and/or other ways of using these property picking methods.
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.
2015-05-12Depsgraph: Add additional relations/id update tagsSergey Sharybin
This calls are not strictly speaking needed for the old dependency graph, but due to more granular nature of upcoming depsgraph more actions requires update of relations of IDs. On the one hand this extra tags could be wrapped with if() statements, but on the other hand it makes sense to keep tag in sync so it's clear if some issue is caused by missing/extra tag or by depsgraph itself.
2015-04-04Cleanup: use BKE_animdata_* prefixCampbell Barton
2015-03-05Fix T43890: Crash, Alt-D over operator redo buttonCampbell Barton
2014-11-28Cleanup: unused headersCampbell Barton
2014-11-11UI Refactor T41640Campbell Barton
Make the UI API more consistent and reduce confusion with some naming. mainly: - API function calls - enum values some internal static functions have been left for now
2014-10-06Fix T40350: Some texture prop did not have visual feedback they were driven.Bastien Montagne
This is only a (hacky) partial fix, actually, since `RNA_property_animated()` will still not work in those cases... Better that than nothing, though. Thanks to Campbell for review.
2014-06-13Code cleanup: BLI_strdupn -> BLI_strdupCampbell Barton
2014-05-29Comments: Note direction in doxy argsCampbell Barton
2014-05-29Cleanup: Use doxy for more structured commentsCampbell Barton
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-01Correction for error in own recent commit (makesrna c++ api, un-init var)Campbell Barton