| Message |
 |
- Date: 2011-03-02 17:45
- Sender: Ton Roosendaal
- This confuses me totally.
It's best to give a .blend file and precise instructions then. Note that i didnt code this 'blend from shape' btw...
|
- Date: 2011-03-02 18:02
- Sender: Tobias Oelgarte
- OK. I appended very basic example. Its a cube having 3 Shapekeys (Basis, toBlendTo, testShape). You can adjust the sliders (influence) of the two last keys to see how they look like.
Now you switch to Edit-Mode (notice, keys are enabled inside editmode just for convenience [little button under the keys box]). Now set the influence of "testShape" to 1.0, to see it's shape, anything else to 0.0. Now you select all verts and press "W" -> "Blend to Shape". Now you should the shape to be changed to the default cube (basis). Anything right so far. But as soon you change the factor _or_ the group (even if you reselect "Basis") the tool will act as if in "add-mode". To get the right result, you will have to press the add option twice (enable, disable).
|
- Date: 2011-03-02 18:08
- Sender: Tobias Oelgarte
- One thing i missed. Before calling the tool/operator, make sure you have "testShape" selected inside the box. Otherwise you will change another key, which could lead to not showing the "faulty" result, because it does nothing. For instance if you selected "basis". ;-)
|
- Date: 2011-03-02 18:15
- Sender: Ton Roosendaal
- It goes fine here. After doing a blend (value halfway), I can change the blend factor in the toolbar without problems. Pressing "Add" just blows up the cube double sized... seems to be not a very useful option?
You're sure having a new build there? (35304 here)
|
- Date: 2011-03-02 18:28
- Sender: Tobias Oelgarte
- Your are right. The behavior has changed with the latest changes (now with 35305). But now it does nothing until you change either the reference key or the influence. The default is 1.0 (a usefull default). But the result is at start as if it is set to 0.0. Even so the "add"-option behaves correct now.
|
- Date: 2011-03-02 18:36
- Sender: Tobias Oelgarte
- One thing to mention: I think the add option behaves wrong. Maybe thats why it seams so useless. It should add a key to another key. Adding up the relative offsets. But instead it adds the distance "(0,0,0) to verts of choosed blend target" to the current offset. Instead it should act like this: newRelativePosition = difference(basis, blendTarget) + oldRelativePosition
In short:
(the right way) newRelativePosition = weight * difference(basis, blendTarget) + oldRelativePosition
(the current way) newRelativePosition = weight * difference((0,0,0), blendTarget) + oldRelativePosition
|
- Date: 2011-03-02 18:40
- Sender: Ton Roosendaal
- This tool pops up a requestor, it currently waits with doing anything until you use it. That's a default behaviour I can't change now.
Possible fix would be to make default zero.
The way operators work with menus and toolbar-redo, and how they will mange future storage of previous settings is still a bit under evaluation. I need the big picture for this still before really tweaking it. I'll note this case on my list to check again when its being worked on. At least things work now as the code was meant to, next step is to make it work as expected ;)
Thanks for all the efforts!
|
- Date: 2011-03-02 18:48
- Sender: Tobias Oelgarte
- It does not act as intended. At least the "add-option" is messed up. Same bug as before, for the default behavior for blend/no add: #26039
The current behavior is even worse. Usually you blend to the "base key" and that very often. Now you will always need to change an option to make it work. That is very ugly.
|
- Date: 2011-03-02 18:52
- Sender: Ton Roosendaal
- I cannot judge the tool itself, only how the UI is working with tools. It all seems to work fine, the 'add' option never made sense for me...
Let's just assign this to the developer of this option then!
|
- Date: 2011-03-03 12:40
- Sender: Joshua Leung
- Hrmf... I haven't done much with shapekeys, so I don't really know what's going on here either :)
|
|
- Date: 2011-03-03 13:45
- Sender: Tobias Oelgarte
- @Ton Rosendaal:
At first i explain the intention of blend from shape without add. It allows you to blend the currently visible shape to another shapekey. Lineary interpolating between both shapes. As the blend-factor is 1.0 the shape should change to the other shape selected. If 0.0 nothing will happen. The default for this tool is "factor=1.0, add=no". Currently it ignores the intial factor and does nothing. It may not be aware of the default settings.
For the add mode it should compute the difference between the toolkey (selected key inside the tool) and the basis key. Then add this difference onto the current editmesh. Currently it uses the toolkey itself as the difference. This would be the difference between (0,0,0) and the toolkey. So adding it to the editmesh blows up the shape.
Its intended usage is to create a Key C from the Keys A and B, by inheriting the changes from A and B. For example: Key C is indentical to the base key. Key A changes the foot of the model. Key B changes the hand. If you add A and B (two steps) to Key C then Key C is identical to A and B applied together.
Inside editmeshtools.c the coresponding code is:
mul_v3_fl(co, blend); add_v3_v3(eve->co, co);
"co" is the coordinate of the shape to blend to.
Instead it should be like this:
sub_v3_v3(co, base->co); // difference between the choosen shape and its own basis key (relative key) mul_v3_fl(co, blend); add_v3_v3(eve->co, co);
where base->co is the coordinate of the toolkeys (from shape property) relative key.
|
- Date: 2011-03-03 14:27
- Sender: Brecht Van Lommel
- This was indeed implemented wrong, fix in svn.
|
- Date: 2011-03-03 14:37
- Sender: Tobias Oelgarte
- Now we have still the issue left, that the blend-value is 1.0 per default, but is seen as 0.0 until one of the tools/operators parameters is changed. The property might not have been initialized correctly. At least at the first call 0.0 is passed instead of the expected 1.0.
|
- Date: 2011-03-03 14:54
- Sender: Ton Roosendaal
- That issue i noted down in my comment above, Date: 2011-03-02 17:40
|