Pydrivers - Ipo Drivers defined by Python expressions #4155
Labels
No Label
Interest
Animation & Rigging
Interest
Blender Cloud
Interest
Collada
Interest
Core
Interest
Documentation
Interest
Eevee & Viewport
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
Import and Export
Interest
Modeling
Interest
Modifiers
Interest
Nodes & Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds, Tests & Devices
Interest
Python API
Interest
Rendering & Cycles
Interest
Sculpt, Paint & Texture
Interest
Translations
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Meta
Good First Issue
Meta
Papercut
Module
Add-ons (BF-Blender)
Module
Add-ons (Community)
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#4155
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%This is the pydrivers patch I've been working on.
Pydrivers are part of Ton's Ipo Drivers. I was asked to provide the expression evaluation part for it and Martin had a related patch to eval py expressions entered in any text box, on which I based my first patch (thanks, theeth).
Been abusing his patch entry (#3101) for too long, better have this one specifically for pydrivers.
How to create pydrivers: in the Ipo window select any channel then open up the transform properties panel (press n) and click on "Add Driver", then on the small Python icon. Write your py expression in the text box that appears. This is already in Blender, the patch here has the eval part to make it actually work.
Some notes:
Pre-loaded modules that can be used in the expressions: builtin, Blender (Blender, b), math (math, m), Blender.Noise (noise, n), and a text called pydrivers.py that you can create (pydrivers, p). Inside parenthesis are the aliases that can be used, so Blender.Get("curframe") and b.Get("curframe") are the same, for example.
More aliases: ob("Cube") == Blender.Object.Get("Cube"). Equiv. for me and ma, for meshes and materials, respectively.
To force re-evaluation of all pydrivers we'll need to add some menu entry or something. For now editing any pydriver expression will re-eval all of them and also reload the pydrivers.py Text, accounting for changes you made in it.
For examples of expressions and an idea of what pydrivers can do, check the sample .blend files (read the README texts inside them). The files are ready to be animated.
--
Willian%%%
Changed status to: 'Open'
Changed status from 'Open' to: 'Archived'