Looking for a definitive, foolproof way of bending with the Simple Deform modifier

@Juhaw

are you planning to use the simple bend modifier ?
and why change rot in edit mode instead of object mode ?

right now seems to simply change rot on one /axis angle at a time
is this to align an axis then use the simple modifier

@ Pior

it will rotate around the origin depending how you built your object
unless you want something else !

happy bl

Thanks for providing the script - am I doing something incorrectly? Not getting anywhere to input values - the script rotates the whole object 90 degrees on the chosen axis. Blender 2.76b

Attachments


Roygee : this is precisely the intended behavior at the core of the workflow. Hold on a bit until we refine it further - when it’s ready I’ll also provide a video example showing how it works and in which context. It will all make sense.

http://www.pasteall.org/65209/python


Attachments

Local Rotation.blend (86 KB)

@ Juhaw
can you upload script inside a blend file here in post
it is very small so would be easier cause i’m having a problem to download from Pastal on win10

thanks
happy bl

Interesting - having access to type-in values could always be useful (especially since someone just asked for it). Personally I don’t quite see when one would need that BUT being flexible is always good. Besides that I can see after testing this new version that you already implemented the rotation around the object origin ! Very cool.

I sincerely appreciate the fact that you are taking some of your time to do this. The only thing left is the “counter” rotation at the object level (resulting in an object seemingly holding still in space even though the axis is being edited) ; I think that once that feature is in, all needs will be covered. Maybe this could be a toggle controlled by a tickbox ?

Exciting !!

got some very old notes about rotation

Transformation Spaces

Consider a scale operation. Scales apply along the main axes of their space. But if you want to scale something along a different axis, how do you do that?

You rotate the object into a coordinate system where the axis you want to scale is one of the basis axes, perform your scale, then rotate it back with the inverse of the previous rotation.

The general form of this sequence is as follows. Suppose you have a transformation matrix T, which operates on points in a space called F. We have some positions in the space P. What we want is to create a matrix that applies T’s transformation operation, except that it needs to operate on points in the space of P. Given a matrix M that transforms from P space to F space, that matrix is M-1TM.

but old link is dead

happy bl

@Juhaw

try to add more meaning name
like Rot CW Rot CCW

if possible try not to use python var with one letter
very difficult to search that in a script !

also for panel you could use a float vector for rotation with degrees
but depends how panel is made too
so many ways of doing it

not certain how your going to get rot into another space
how are you planning to take into consideration another rot vector ?

with 3 Euler angles the order or rot is important

thanks
happy bl

http://www.pasteall.org/65336/python



This update is awesome. Here is a video showing it in action :

http://i.imgur.com/8XPZ39Y.jpghttps://www.youtube.com/watch?v=uqwsxjJ9nlw&feature=youtu.be

A few things I noticed :

  • At 0:51 and 2:39 the object origin seems to be affected. This is easily solved by setting it back to the center of mass, but I could see some situations where the original location might need to be carefully kept.
  • There is an error if the user clicks any of the buttons with no object being currently selected (that is to be expected of course)
  • There’s also an error when running the tool on an Empty, seen as 3:20. That is to be expected too, since an empty has no components and therefore no edit mode. I ended up just using a little cube instead, and that works fine.

This is really exciting stuff !

check for mesh only

ob.type== “MESH”:

and also that mesh is not a parent too or all childs will be modified too

happy bl

still missing other feature

let say ob1 with some rot X1Y1Z1

another ob2 with whatever rot angle

and you want to bend ob2 around ob1 some how

so need to copy rot ob1 to ob2 then begin the bend around ob1

what do you think ?

what is the reason of having the lock toggle for axis ?

here is example for type and parent

for ob1 in bpy.context.selected_objects:

print (‘ob name=’,ob1.name , ’ Type =’, ob1.type , ’ Parent=’,ob1.parent )

can find no parent with = None

happy bl

@ Pior
would it be possible to add some voice to explain what you are doing in video

thanks
happy bl

To bend around another object, one would first use “Simple Align” and then proceed as usual. As shown in the following video :

http://i.imgur.com/MvpDYvq.jpg

About the lock : this is at the very core of the idea. Without the lock the object whose axis is being edited would rotate each time the components get adjusted. The lock option effectively counter-rotates the model, so that it appears stable in space. Look at the X rotation transformation value in the N panel, it will make sense.

As for a voiceover, sure ! I’ll do one as soon as we feel like the script is complete (features wise + addon). The video should be pretty self-explanatory though, there’s no hidden shortcut being used :slight_smile:

I thought the idea was to align one ob onto another one
so I think it should be automatically done to get same rot on 2 objects!

slowly beginning to work

for video not certain if you manually added the bent modifier or added by the script
or call from space operator

happy bl

http://www.pasteall.org/65273/python
Handles empties little better.

@Ricky

I thought the idea was to align one ob onto another one

As a matter of fact, not at all :slight_smile: The idea was just to find a workaround for the axis limitations of the Bend modifier. The orientation of the object to be bent (straps, armor pads, and so on) is very rarely going to be aligned to another object, therefore there would be no point in making the script more complex just for that rare purpose.

About the video : everything is shown on screen. What is a space operator ?

@JuhaW - trying it asap !

I see but would be nice to have another option where you can align 2 objects with same rot!

happy bl

RickyBlender: those are basic things in Blender:

  1. N-panel rotation, RClick > copy to selected
  2. Transform orientation: Local > Object > Transform > Align to Transform orientation
  3. Advanced align tools, Align rotation xyz

I was thinking more by using the bend modifier
would be faster and easier to do
also I do mostly mechanical design in 3d
and that would be very useful and faster

for objects with different rot in space

thanks
happy bl