-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BMesh Viewer doesn't update Skin modifier on frame_change #265
Comments
for example the Screw modifier doesn't have this problem, so ... that's interesting.. Neither does subsurf modifier. |
|
The presence of skin modifier might have to be checked, and vertex radiii set per frame bpy.data.objects['Alpha_4'].data.skin_vertices[0].data[0].radius[:]
(0.25, 0.25) |
Maybe some kind of Cache Node, as if. Just like Mesh Cache. |
edit: I don't think Mesh Cache should be part of this conversation, but I do have ongoing ideas about it. In audo processing we have this term called Freeze or Bounce. When we establish that the we are happy with a part of a chain we force zero-new calculations on it, just bounce to wav and play that in sync with the other Back on topic, yeah eval will do it, but right now we don't specify the order in which nodes operate (rather it is implied by distance to an end point or some other meaningful directedness). So if bmeshviewer changes at That would be solvable, but first you have to be able to:
So far I have not succeeded. The problem is once the skin modifier is affected by a frame_change, there is no data in skin_vertices. In fact, I spent longer writing this response than trying to get skin_vertices working on previously invalidated mesh... |
This is general problem with all side effects. |
@ly29 agreed. Focus of this thread should be bmeshviewer and skinmodifier. |
I wonder if it is possible stop using |
I've been careful to avoid |
it's also probably possible and desirable to use |
removing bpy.ops now |
👍 |
I don't think the skin_modifier issue is something that can be fixed nicely, and i've had no response from #blendercoders to my questions. I'm not prepared to implement further kludges just to get skin modifier working. I'll have a go at using |
by further kludges i mean
not sure it would need to deal with a plurality of skin_modifiers per object... ? |
Other modifiers seems to be working, skin modifiers does something wrong I think. Might not really be a bug as far the blender devs see it but for our purposes it is. |
yeah, skin_vertices is a unique structure I think it is also read-only . To clarify, this means the structure is assigned or updated by blender once, and has a certain size, until blender updates it again from edit mode. The only interaction we can have via python is - if the skin_vertices are present we can change the radii, that's all. But after Bmesh viewer overwrites a mesh, the new mesh doesn't have skin_vertices with assignable radii |
It seems to be working in quick testing. |
what does? |
The updated bmesh viewer in 9483a5e |
yeah - maybe deserves a version bump to get testers |
i thought you meant skin modifier |
Bmesh worked with Skin Modifier at some point, but cannot remember when but just today when I tried it with the snakes setup, I realized the Skin When dealing with Skin Modifier for many edges, I usually merge the edges I guess for now, I will just MDD Cache it. best solution. future wishlist: SV Sweep along Edge ala Curve. with UV. sorry causing additional extra questions. can shelf this one until you would be nice when it works, since we already have vectorized lines now too |
If it has worked it would be interesting to know the combination of sverchok and blender. |
https://developer.blender.org/rB92733179aee8d7997c843149dfb640a508ade647 |
One would think it would be sane for the skin modifier to regenerate the skin vertex data if it can't find it... |
should be an easy fix with horrible performance. |
maybe instead of overwriting the mesh data, which I currently do - I could do a different method to update. But no guarantee that this would contribute to a working skin_modifier. A mesh outputter which restricts the mesh-data to a single length, would be possible. |
i'm closing this till there's more useful information about it. |
I don't think it's ever been possible in an animated way, because effectively the BMV destroys the mesh of each scene.obj it's controlling and and assigns a new mesh to that scene.obj. So if you assign a skin modifier, it will display correctly until you frame_change. The previously held mesh data in the modifier points to invalidated memory locations.
It might possible to get the modifier stack to update, or make BMV aware of modifier stacks. maybe even as simple as sticking an
.update
somewhere. As a last resort we could store the names and order of the modifiers attached to the prime object, and all other objects would follow, reassigning the modifier stack on each frame.That's as ugly as it sounds, but no more ugly than creating the objects and assigning a new mesh on each update. The necessity for this to be real-time is unjustifiable imo, as the intention of the frame change is to render stuff in the end. The processing required per frame change event (even in the worst case scenario) is minimal compared the render time of one frame.
If all updates to the BMV were only like shapekeys, then edges+faces would stay the same and only location of vertices per scene.obj would need to be updated. Currently there's no inbuilt awareness of this, though there could be.
I'll think about it
The text was updated successfully, but these errors were encountered: