{"id":19011152,"url":"https://github.com/jeinselen/vf-blenderdriverfunctions","last_synced_at":"2025-04-22T23:26:38.809Z","repository":{"id":54080123,"uuid":"364085811","full_name":"jeinselen/VF-BlenderDriverFunctions","owner":"jeinselen","description":"Functions for use in Blender channel drivers.","archived":false,"fork":false,"pushed_at":"2024-07-18T19:47:31.000Z","size":1703,"stargazers_count":34,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-22T23:06:59.403Z","etag":null,"topics":["animation","animation-3d","blender","blender-3d","blender-addon","blender-driver","blender-plugin","blender3d","color","delay","driver","dynamic","hsv","hsv2rgb","offset","procedural","time","time-offset","valueattime","wiggle"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeinselen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-03T23:17:40.000Z","updated_at":"2025-03-13T04:13:30.000Z","dependencies_parsed_at":"2022-08-13T06:31:27.301Z","dependency_job_id":"4c93c9dd-9dd0-4c9f-9d79-259c1b1dd4ae","html_url":"https://github.com/jeinselen/VF-BlenderDriverFunctions","commit_stats":null,"previous_names":["jeinselen/vf-blenderdriverfunctions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeinselen%2FVF-BlenderDriverFunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeinselen%2FVF-BlenderDriverFunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeinselen%2FVF-BlenderDriverFunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeinselen%2FVF-BlenderDriverFunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeinselen","download_url":"https://codeload.github.com/jeinselen/VF-BlenderDriverFunctions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250339263,"owners_count":21414327,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animation","animation-3d","blender","blender-3d","blender-addon","blender-driver","blender-plugin","blender3d","color","delay","driver","dynamic","hsv","hsv2rgb","offset","procedural","time","time-offset","valueattime","wiggle"],"created_at":"2024-11-08T19:13:31.708Z","updated_at":"2025-04-22T23:26:38.784Z","avatar_url":"https://github.com/jeinselen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VF Driver Functions\nThis add-on was designed for Blender version 2.8-4.1 (though not all previous versions may be fully supported). For Blender 4.2 and onwards, [please see the new Production Kit extension](https://github.com/jeinselen/Blender-ProductionKit).\n\nFunctions for use in Blender channel drivers.\n\n## Installation and usage:\n- Download a single driver (below) or the unified plugin: [VF_driverFunctions.py](https://raw.githubusercontent.com/jeinselenVF/VF-BlenderDriverFunctions/main/VF_driverFunctions.py)\n\t- [VF_curveAtTime.py](https://raw.githubusercontent.com/jeinselenVF/VF-BlenderDriverFunctions/main/VF_curveAtTime.py)\n\t- [VF_hsv.py](https://raw.githubusercontent.com/jeinselenVF/VF-BlenderDriverFunctions/main/VF_hsv.py)\n\t- [VF_wiggle.py](https://raw.githubusercontent.com/jeinselenVF/VF-BlenderDriverFunctions/main/VF_wiggle.py)\n- Open up Blender Preferences \u003e Add-ons\n- Install and enable the add-on\n- Add a driver to any channel via keyboard shortcut (usually \"D\"), context menu (right-click), or directly (typing \"#\" and then the function)\n\n\n\n## curveAtTime\nThis driver function is intended to mimic Adobe After Effect's \"valueAtTime\" expression, returning the value of an animated channel from the specified point in time.\n\nAfter Effects expression reference:\n```javascript\nthisComp.layer(\"Cube\").transform.position.valueAtTime(time-0.167)[0]\n```\nThis returns the value of the \"Cube\" layer's X position from 0.167 seconds in the past, relative to the current time.\n\nBlender driver equivalent:\n```javascript\ncurveAtTime(\"Cube\", 0, frame-5)\n```\nThis returns the value of the \"Cube\" object's first animation curve from 5 frames in the past, relative to the current frame.\n\nNote that Blender's time sampling doesn't allow references to an object's transform property; it has to be an animation curve, and it can only be referenced by index. The first channel that is keyframed will be assigned index 0, the second channel to be animated will be index 1, and so on.\n\n### curveAtTime examples\n\n![three spheres in a white environment, the left side is animated, the other two are tied to it using the curveAtTime driver function in Blender](images/curveAtTime.gif)\n\n1. The left sphere is named \"Sphere\" and has an animation curve applied to the Z position channel\n2. The middle sphere has the following driver applied to the Z position channel: `curveAtTime(\"Sphere\", 0, frame-5)`\n  - Note how the time offset is implemented in frames, not fractions of a second like in AE\n3. The right sphere has the following driver applied to the Z position channel: `curveAtTime(\"Sphere\", 0, frame*0.5-5)`\n  - Note how the current frame value is multiplied by 0.5 to slow down time\n\n\n## hsv\nConverts from HSV value inputs to RGB value outputs. Because drivers are designed for individual channel usage, the specific red (`0`), green (`1`), or blue (`2`) channel output must be selected.\n\nThe following example uses the `X`, `Y`, and `Z` positions of a controller null to drive the `hue`, `sat`, and `val` variables within the driver, and the same driver setup is copied across all three `r`, `g`, and `b` input channels in both the material, updating the fourth value (`0`, `1`, or `2`) to match the channel index.\n\n```javascript\nhsv(hue, sat, val, 0)\n```\n\nDownload the example project: [hsv.blend](images/hsv.blend.zip)\n\n![screen capture of the Blender interface showing both the controller null and the driver function applied to the red channel of an affected object](images/hsv.png)\n\n## wiggle\nDesigned to mimic Adobe After Effect's \"wiggle\" expression with similar frequency (colloquially known as wiggles per second) and octave settings.\n\nAfter Effects expression reference:\n```javascript\nseedRandom(4, true);\nwiggle(3, 200, 1)\n```\nThis automatically animates a channel using a static seed of 4 with about 3 \"wiggles\" per second, a potential distance range of -200 to 200 pixels, and 1 octave of noise.\n\nBlender driver equivalent:\n```javascript\nwiggle(3, 0.2, 1, 4)\n```\nThis automatically animates a channel and vaguely matches AE's 3 \"wiggles\" per second, a potential distance range of -200mm to 200mm (if used in a transform channel), with 1 octave of noise, and a random seed of 4 (seeds can be any floating point number, including negative numbers).\n\nNote that unlike After Effects, driver functions in Blender don't automatically receive unique identifiers for each channel they are applied to, so a unique seed value must be provided by the user.\n\n### wiggle examples\n\n![two spheres and a cube in a white environment animated using the wiggle driver function in Blender](images/wiggle.gif)\n\n1. The left sphere has the following drivers applied to the Z position and all three scale channels:\n  - Z:  `wiggle(2, 0.125, 3, 4.5) + 0.5`\n  - Scale:  `wiggle(2, 0.25, 3, 4.5) + 1.0`\n2. The middle sphere has the following drivers applied to the X, Y, and Z position channels:\n  - X: `wiggle(1, .45, 1, 0.5)`\n  - Y: `wiggle(2, .35, 1, 1.5)` \n  - Z: `wiggle(1, .25, 1, 2.5) + 0.75`\n3. The right cube has the following drivers applied to the Z. Y, and Z rotation channels:\n  - X: `round(wiggle(0.3, 7.0, 3, 100)) / 7.0 * pi`\n  - Y: `round(wiggle(0.3, 7.0, 3, 200)) / 7.0 * pi`\n  - Z: `round(wiggle(0.3, 7.0, 3, 200)) / 7.0 * pi`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeinselen%2Fvf-blenderdriverfunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeinselen%2Fvf-blenderdriverfunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeinselen%2Fvf-blenderdriverfunctions/lists"}