Bevel Custom Profile: no way to Copy To Selected #72422

Closed
opened 2019-12-13 15:43:22 +01:00 by Stanislav Blinov · 20 comments

Blender Version
Broken: 2.82 (322555faa3)

Short description of error
Unlike other properties, the new Bevel Profile widget doesn't seem to allow to Copy To Selected. One can only ctrl+c/ctrl+v the curve individually, but there doesn't appear to be a way to do it en masse. Right-clicking the widget only produces the area context menu.

Furthermore, it doesn't appear that the widget allows multi-editing (i.e. with alt key pressed), which most of the other properties, including modifier properties, allow to do.

Video demonstration for clarity:
https://youtu.be/_kLiG6iatXQ

**Blender Version** Broken: 2.82 (322555faa31de2e5bbfa062e9bf132a8d69b3ca6) **Short description of error** Unlike other properties, the new Bevel Profile widget doesn't seem to allow to Copy To Selected. One can only ctrl+c/ctrl+v the curve individually, but there doesn't appear to be a way to do it en masse. Right-clicking the widget only produces the area context menu. Furthermore, it doesn't appear that the widget allows multi-editing (i.e. with alt key pressed), which most of the other properties, including modifier properties, allow to do. Video demonstration for clarity: https://youtu.be/_kLiG6iatXQ

Added subscriber: @Stan_Pancakes

Added subscriber: @Stan_Pancakes
Stanislav Blinov changed title from Bevel Profile: no way to Copy To Selected to Bevel Custom Profile: no way to Copy To Selected 2019-12-13 16:15:56 +01:00
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'
Jacques Lucke self-assigned this 2019-12-29 15:15:19 +01:00
Member

I can confirm that this is a missing feature. However, I'm closing this because it is not a bug. For feature requests you can use https://blender.community/c/rightclickselect/.

I can confirm that this is a missing feature. However, I'm closing this because it is not a bug. For feature requests you can use https://blender.community/c/rightclickselect/.

Added subscriber: @HooglyBoogly

Added subscriber: @HooglyBoogly

I'm sorry, was that new property intended to not work as other properties? Please just forward this to @HooglyBoogly, I really can't see how this is a "feature request", let alone needing to go through RCS.

I'm sorry, was that new property **intended** to not work as other properties? Please just forward this to @HooglyBoogly, I really can't see how this is a "feature request", let alone needing to go through RCS.
Member

The issue is that there are thousands of open bug reports so it's important to make it clear that the bug tracker is just for bugs (code that was intended to work but doesn't).

Indeed I didn't think of adding this in the summer or the fall. If I get some time I'll look into it, I agree it would be nice to have.

The issue is that there are thousands of open bug reports so it's important to make it clear that the bug tracker is just for bugs (code that was intended to work but doesn't). Indeed I didn't think of adding this in the summer or the fall. If I get some time I'll look into it, I agree it would be nice to have.

Not counting common modifier properties (visibility/renderability), there are 18 properties on the Bevel modifier that support Copy to Selected, including the 'Custom Profile' checkbox itself, yet the profile widget does not support it. In my book, it sure looks like it was "intended" for properties to be copyable.
This is not the way to reduce the thousands of open bug reports, this invites more reports down the line that would need to be triaged and rejected, with something along the lines of "unfortunately, this is a known limitation, blah blah". @JacquesLucke could've (and should've) put this one down as a "to do". Please don't tell people to go to a third party resource to "request" Blender to conform to its own functionality.

Not counting common modifier properties (visibility/renderability), there are 18 properties on the Bevel modifier that support Copy to Selected, **including** the 'Custom Profile' checkbox itself, yet the profile widget does not support it. In my book, it sure looks like it was "intended" for properties to be copyable. This is not the way to reduce the thousands of open bug reports, this invites **more** reports down the line that would need to be triaged and rejected, with something along the lines of "unfortunately, this is a known limitation, blah blah". @JacquesLucke could've (and should've) put this one down as a "to do". Please don't tell people to go to a third party resource to "request" Blender to conform to its own functionality.
Member

Well, I'm sorry that it works this way. I do agree that this is useful und missing functionality. However, to be able to keep things under control, we have rules for the bug tracker. You can read more about how bug reports are handled here:
https://wiki.blender.org/wiki/Process/Bug_Reports/Triaging_Playbook

This issue is an "accidental feature request".

Well, I'm sorry that it works this way. I do agree that this is useful und missing functionality. However, to be able to keep things under control, we have rules for the bug tracker. You can read more about how bug reports are handled here: https://wiki.blender.org/wiki/Process/Bug_Reports/Triaging_Playbook This issue is an "accidental feature request".

This is not a feature request, and it most certainly is not accidental. So, since this is not a bug, and the widget behaves as intended, it follows that Copy To Selected functionality was never intended to be provided by this widget, and right-clicking was instead intended to simply show area context menu. Is that correct?

This is not a feature request, and it most certainly is not accidental. So, since this is not a bug, and the widget behaves as intended, it follows that Copy To Selected functionality was never intended to be provided by this widget, and right-clicking was instead intended to simply show area context menu. Is that correct?
Member

Added subscriber: @scorpion81

Added subscriber: @scorpion81
Member

Hmm, seems this is no simple oneliner in order to fix this issue.
After some search in the code and some debugging, i found out that here
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_context_menu.c$543
but->rnapoin.data && but->rnaprop seem not to be set (if you rightclick on the curve in the bevel modifier).
The curve is defined here basically
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_templates.c$4959
but there is no uiBut (no button) inside the curve area itself one could bind the context menu entries to. Its just an uiBlock, which works differently.
The rnapoin and rnaprop data is handled by a callback here, RNAUpdateCb.
Bottom line, it seems (for me atleast, who is unfamiliar to that code area) not so super easy to fix this properly.
Maybe one would need to write a custom (mass) copy operator which iterates over the curve points / handles or so. But i dont think those are exposed via python,
so this needs to be done in C.

Edit: the points of the custom profile are exposed to python. You can add some via a script. But unfortunately, the curve does not update (argh, only after you move one of the points, and chances are you get a messed up curve then)

script example:

import bpy

src = bpy.context.object
dst = bpy.context.selected_objects
name = "Bevel" # quick hack, need to check type

smd = src.modifiers[name]
for o in dst:
    if name in o.modifiers:
        tmd = o.modifiers[name]
        for p in smd.custom_profile.points:
            pt = tmd.custom_profile.points.add(p.location[0], p.location[1])
            #copy other data like handle types ?
            pt.handle_type_1 = p.handle_type_1
            pt.handle_type_2 = p.handle_type_2
Hmm, seems this is no simple oneliner in order to fix this issue. After some search in the code and some debugging, i found out that here https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_context_menu.c$543 but->rnapoin.data && but->rnaprop seem not to be set (if you rightclick on the curve in the bevel modifier). The curve is defined here basically https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/interface/interface_templates.c$4959 but there is no uiBut (no button) inside the curve area itself one could bind the context menu entries to. Its just an uiBlock, which works differently. The rnapoin and rnaprop data is handled by a callback here, RNAUpdateCb. Bottom line, it seems (for me atleast, who is unfamiliar to that code area) not so super easy to fix this properly. Maybe one would need to write a custom (mass) copy operator which iterates over the curve points / handles or so. But i dont think those are exposed via python, so this needs to be done in C. Edit: the points of the custom profile are exposed to python. You can add some via a script. But unfortunately, the curve does not update (argh, only after you move one of the points, and chances are you get a messed up curve then) script example: ``` import bpy src = bpy.context.object dst = bpy.context.selected_objects name = "Bevel" # quick hack, need to check type smd = src.modifiers[name] for o in dst: if name in o.modifiers: tmd = o.modifiers[name] for p in smd.custom_profile.points: pt = tmd.custom_profile.points.add(p.location[0], p.location[1]) #copy other data like handle types ? pt.handle_type_1 = p.handle_type_1 pt.handle_type_2 = p.handle_type_2 ```
Member

@scorpion81 Thanks for looking into this! In general the Python API for the CurveProfile might not have the best UX. If there are any improvements I can make to that I'd be happy to. As a more long-term goal I'd like the widget to be useful in more places in Blender. Try adding an update call after adding a point. It doesn't do that automatically because it's a relatively more expensive operation.

Copying a PM from blenderartists to here:

@Stan_Pancakes I actually do have some time in the next few days so I was going to look at looking into working on the feature you requested, but after more thought I’m not sure it makes sense to implement this like you described.

  1. I don’t think it makes sense to implement generic “Copy CurveProfile widget to another object” functionality, because objects don’t have a CurveProfile property, it’s a property of the bevel modifier.
  2. I don’t know if it buys you anything that copying the bevel modifier to another object wouldn’t. In what situation did you want this functionality?

EDIT: I think I misunderstood the issue: I see what you mean now, I'll see what I can find.

@scorpion81 Thanks for looking into this! In general the Python API for the `CurveProfile` might not have the best UX. If there are any improvements I can make to that I'd be happy to. As a more long-term goal I'd like the widget to be useful in more places in Blender. Try adding an update call after adding a point. It doesn't do that automatically because it's a relatively more expensive operation. *Copying a PM from blenderartists to here:* @Stan_Pancakes I actually do have some time in the next few days so I was going to look at looking into working on the feature you requested, but after more thought I’m not sure it makes sense to implement this like you described. 1. I don’t think it makes sense to implement generic “Copy CurveProfile widget to another object” functionality, because objects don’t have a CurveProfile property, it’s a property of the bevel modifier. 2. I don’t know if it buys you anything that copying the bevel modifier to another object wouldn’t. In what situation did you want this functionality? EDIT: I think I misunderstood the issue: I see what you mean now, I'll see what I can find.
Member

Added subscriber: @EAW

Added subscriber: @EAW
Member

Just adding that the curve widget in the Vertex Weight Edit modifier also does not have the copy to selected functionality, so modifiers are consistent in that respect.
I was just checking to see if it did as it would have made adding the functionality to the Bevel modifier much easier.

Just adding that the curve widget in the Vertex Weight Edit modifier also does not have the `copy to selected` functionality, so modifiers are consistent in that respect. I was just checking to see if it did as it would have made adding the functionality to the Bevel modifier much easier.
Member

@HooglyBoogly
Thanks, the custom_profile.update() call seems to work. But the target curve's widget looks often a bit weird afterwards, aka weird triangular artifacts.

Source Curve:
custom_profile_src.png

Destination Curve before copy: (has already another point added)
custom_profile_dst_before.png

Destination Curve after copy:
custom_profile_dst_after.png

Note: I have an Intel UHD 620 graphics chip, Windows 10, recent-ish master.
(in fact, a custom branch, bone-openvdb)

custom_profile.blend

In that blend, just make lower cube active, select upper cube, Run script.

(Not sure whether this is worthy a separate report, tho. Maybe its just related to the intel gpu / some opengl issue.)

@HooglyBoogly Thanks, the custom_profile.update() call seems to work. But the target curve's widget looks often a bit weird afterwards, aka weird triangular artifacts. Source Curve: ![custom_profile_src.png](https://archive.blender.org/developer/F8253877/custom_profile_src.png) Destination Curve before copy: (has already another point added) ![custom_profile_dst_before.png](https://archive.blender.org/developer/F8253879/custom_profile_dst_before.png) Destination Curve after copy: ![custom_profile_dst_after.png](https://archive.blender.org/developer/F8253882/custom_profile_dst_after.png) Note: I have an Intel UHD 620 graphics chip, Windows 10, recent-ish master. (in fact, a custom branch, bone-openvdb) [custom_profile.blend](https://archive.blender.org/developer/F8253885/custom_profile.blend) In that blend, just make lower cube active, select upper cube, Run script. (Not sure whether this is worthy a separate report, tho. Maybe its just related to the intel gpu / some opengl issue.)
Member

That's a known issue with the way the fill is triangulated. When there's overlap (the profile crosses over itself) it can look pretty glitchy. In that case it would create bad geometry in the bevel anyway, and for most situations it works well, so I don't think it's a huge problem.

In your case I think it's just the automatic handle calculation that makes the path cross itself. I think you'll find if you drag the point around a bit it won't look like that.

It chooses which edge to put the new point on by finding the closest segment, but I guess if there were enough demand I could give the python API the ability to choose an index.

That's a known issue with the way the fill is triangulated. When there's overlap (the profile crosses over itself) it can look pretty glitchy. In that case it would create bad geometry in the bevel anyway, and for most situations it works well, so I don't think it's a huge problem. In your case I think it's just the automatic handle calculation that makes the path cross itself. I think you'll find if you drag the point around a bit it won't look like that. It chooses which edge to put the new point on by finding the closest segment, but I guess if there were enough demand I could give the python API the ability to choose an index.

Just for minimizing confusion, video added.

Just for minimizing confusion, video added.
Member

Tried to patch this, but the more I dig into it, the more questions arise, lol...
For example what on earth has "Overrides" to do with copying something on RNA level ? Is that the same as Static / Dynamic Override (which never was finished up to now) or something different with the same name ?
Lol... Anyways, I will share here my partially working patch, but it wont copy the Custom Profile, just re-assign it to the other modifier. Probably this is some corner case with Pointer Properties, which are not meant to be copied but to be assigned somewhere else only. But this doesnt work here. In case one of the other bevel modifier objects is deleted, blender will crash.
Probably, in order to make the CurveProfile more re-usable and copy-able (in one go) , it must become some separate ID which can be linked into the bevel modifier, like a cachefile is linked into the Meshcachesequence modifier or Particle Settings are being linked into a Particle System Modifier.

attempt_for_copy_to_selected_curve_profile.diff

Tried to patch this, but the more I dig into it, the more questions arise, lol... For example what on earth has "Overrides" to do with copying something on RNA level ? Is that the same as Static / Dynamic Override (which never was finished up to now) or something different with the same name ? Lol... Anyways, I will share here my partially working patch, but it wont copy the Custom Profile, just re-assign it to the other modifier. Probably this is some corner case with Pointer Properties, which are not meant to be copied but to be assigned somewhere else only. But this doesnt work here. In case one of the other bevel modifier objects is deleted, blender will crash. Probably, in order to make the CurveProfile more re-usable and copy-able (in one go) , it must become some separate ID which can be linked into the bevel modifier, like a cachefile is linked into the Meshcachesequence modifier or Particle Settings are being linked into a Particle System Modifier. [attempt_for_copy_to_selected_curve_profile.diff](https://archive.blender.org/developer/F8254954/attempt_for_copy_to_selected_curve_profile.diff)

Added subscriber: @Sparazza

Added subscriber: @Sparazza
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
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
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#72422
No description provided.