Python Write Access to Hair Particle Data Broken (2.8 vs. 2.79) #65624
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-addons#65624
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: GeForce GTX 1060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 388.73
Blender Version
Broken: version: 2.80 (sub 74), branch: blender2.7, commit date: 2019-06-04 00:52, hash:
blender/blender@c13e10a740
Worked: version 2.79, any build.
Short description of error
The python bindings to edit hair particle data don't appear to be working in blender 2.8. The same bindings work perfectly in blender 2.79 builds.
CONTEXT: We have been using this hair particle data editing mechanism in blender 2.79 to load Alembic hair curves and convert them to Cycles hair rendering primitives. Importing the curves in Blender creates Bezier curves which need to be tessellated in order to render in Cycles. If there is another mechanism to import Alembic curves directly into Blender as Cycles hair primitives, please let me know.
Exact steps for others to reproduce the error
Note that I'm trying to use the new depsgraph through "evaluated_depsgraph_get()". It's interesting to see that the particle position snaps back as soon as the last bpy.ops.particle.particle_edit_toggle() is called. I suspect a python binding needs to be exposed to trigger the same scene graph update which occurs after a brush edit.
hair_python_280.blend
hair_python_279.blend
Added subscriber: @olivier.fx
Added subscriber: @daniel.erpelding94
Removed subscriber: @daniel.erpelding94
@Sergey, I see that you've worked on https://developer.blender.org/T64805 earlier today, which is very similar in spirit to this task: modifying hair particle data from Python in order to convert blender curves to hair particles. Fixing this issue would allow us to start using Blender 2.8.
Converting helps us render curves natively in Cycles. I'm interested in getting your opinion on the best way to import Alembic curves directly to hair particles (instead of Blender curves), what do you suggest? FYI, converting 300k curves to hair particles (in Blender 2.79 where it worked) is pretty slow, is there a way to set an array of particles directly from Python?
Added subscriber: @Jandals
Added subscriber: @JoseConseco
@olivier.fx seting particle hair_key.co works ok in blender now, since blender/blender#64805 fix. You just have to generate comb cache that was mentioned in blender/blender#64805 bug.
Thanks Jose, it does work now :)
For reference, I ended up writing a custom command in C (in particle_edit.c), transferring the curves to existing hair particles. The python route was getting unreasonably slow: We are importing Alembic caches with animated grooms, and transferring 300k curves per frames would not have been reasonable in terms of performance. Do you have any suggestions on how to do this otherwise? Maybe creating an animated hair cache externally?
Added subscriber: @lichtwerk
Changed status from 'Open' to: 'Resolved'
@olivier.fx: I assume this can be closed now? (from reading this, all issues seem to be resolved?)
Will actually do this (closing), feel free to comment again (or reopen) if issues persist...
This comment was removed by @Jandals