Skeleton Tool, Google Summer of Code 2020

Do you want to create new handles or reuse an existent one?
I can’t help you much, but “handle” is called “duck” in the code.

Sorry! I meant the ducks of the bones.

Okay! I already did! Maybe I missed something will do!

you can call it handle. I just said that in case you didn’t know what to search

1 Like

You can search source code and find where DUCK_COLOR_SELECTED string is used. This will be a starting point - just look there how code draws red box around handle (duck).

1 Like

I suggest to look at code of Draw Tool - it turns off some handles when activated. By looking at its code you can learn how to activate handles.


and also line 964 is important -

1 Like

Weekly report : June 7th - June 14th

  • How was the last week? What did you accomplish?

    • Implemented click on empty area to add skeleton layer.
    • Implemented click to active bone.
    • Implemented click or click-drag to add child bone to the active Bone. (Needs origin fixing)
    • Exploring ways to highlight Active bone.
  • What is the #1 thing slowing you down?

    • Finding a way to highlight the active bone.
  • What do you want to have done by the end of next week?

    • Finish highlighting active bone.
    • Filling all the remaining cases in this click functionality.


I wanted to do something like this. So I’ve been reading Layer_shape and it’s generate_render_task to check if I can modify the color for just one bone. But I could not figure it out. Any hint would be helpful!

I’ve got an impression that this approach is too much low-level.

I was expecting that you will make this on UI-level, like this :slight_smile: -

There is already a highlighting function for spline points. Why not to use it for bones in the same way? :slight_smile:

1 Like

I don’t think it’s intuitive and user friendly as @DestinyGamer243 proposal.
Besides, don’t the red squares represent linking?

1 Like

Also, I’ve been trying to fix the origin issue. I don’t know why but I am unable to get it work right.

There is no global origin parameter for a bone too. So I tried translating axes according to the parent origin. But couldn’t get results. What do you think? :?

The problem with @DestinyGamer243’s proposal is that bone is highlighted through rendering engine (very slow and low-level operation). I think that highlighting a bone should be done using UI elements, not rendering.

BTW, highlighting a bone is already implemented -

I am okay if that will be highlighted in some other way, but this should be done through UI (workarea), not through rendering engine.

I suggest to take a look at duckmatic.cpp to see how bone is highlighted.

No, it represents selection.


Weekly report : June 14th - June 21th

  • How was the last week? What did you accomplish?

    • Closed edge cases in the click action
    • Explored ways to highlight bones according to my approach (Which proved to be very low level)
    • Explored ways to fix origin issue (Couldn’t find it out, tried one but it didn’t work out well).
  • What is the #1 thing slowing you down?

    • Origin fix.
  • What do you want to have done by the end of next week?

    • Finishing the click and double-click functionality .
1 Like

indeed. But he achieves to highlight active bone as he proposed in UI elements, it’d be great IMHO

Oh :slight_smile:

I suggest to look at the code of circle tool for reference. :slight_smile:

1 Like

I also think that eventually we should rework bones to make them drawn purely in UI. There are actually no need to have their drawing routines in render engine. :slight_smile:

If I remember correctly, bone origin is always absolute. It is not relative to its parent.

Oh, no, I am wrong. :slight_smile:

1 Like

@DestinyGamer243 Please push your latest code to this PR -
If it doesn’t compile, then put appropriate remark in commit message.

Yes on it. I kinda overslept :grimacing: sorryy!

Weekly report : June 21th - June 28th

  • How was the last week? What did you accomplish?
    • Finished “Click to active bone”
    • Highlighting active bone :heavy_check_mark:
    • Click and draw is almost done. It’s working fine.
  • What is the #1 thing slowing you down?
    • If I’d have come accross animated_matrix_ earlier, the origin fix would have been done very early. :frowning_face: Thank you @KonstantinDmitriev on this! :slightly_smiling_face:
  • What do you want to have done by the end of next week?
    • Start working on the popup_param_menu