Swizzle properties for Mathutils.Vector #18678
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#18678
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?
%%%Allows access to elements of vectors in any order. The getter functions all return a Vector object with the new arrangement of axes. For example:
Setters can take a vector, list or scalar as the value. If the value is scalar, it is copied to all axes listed in the swizzle. If an axis appears more than once in the swizzle, the final occurrance is the one that determines its value.
If value is a vector or list this operates like an array copy, except that the destination is effectively re-ordered as defined by the swizzle. At most min(len(source), len(dest)) values will be copied.
This can be used to rotate axes in wonderful ways!
More information on swizzling is available here:
http://en.wikipedia.org/wiki/Swizzling_(computer_graphics)
See attached TestVector.blend for a set of unit tests. Tested so far on an Intel Core 2 Duo.%%%
Changed status to: 'Open'
%%%Attached an update that works better with python initialization%%%
%%%Made the interface a little cleaner: got rid of the Vector_MixedGetSeter structure; using global arrays instead. Now Vector_AppendSwizzleGetseters and Vector_DelGetseters access these globals directly and take no arguments.%%%
%%%applied in svn with some changes,
didnt get your Swizzle_v3.patch, funnily enough I also removed the Vector_MixedGetSeter structure
Changed status from 'Open' to: 'Archived'