Curve Converter

This is a short script that I created in response to a blender.stackexchange.com question. What it allows you to do is convert the curve to a mesh object and apply that data to a mesh object, without loosing the original curve. You can then update the curve and by clicking “Update Mesh” all that new data is applied to the mesh object. Here is how it works:

  1. Add a curve and make the bevel “Full”, add depth and resolution
  2. Add a mesh object like a cube, or click “Add Mesh Object” under panel in toolbar
  3. Go to View 3D > Tools > Tools > Curve Conversion
  4. Select curve object
  5. Click “Update Mesh”

and there you go, you now have the curve’s mesh equivalent. You can edit the curve as much as you would like and then just click “Update Mesh”. The “Respect Scale” option copies the scale from the curve to the mesh object. This way if you change the scale on the curve that scale is applied as well to the mesh object.

##Update 0.7##
Materials no longer disappear on updating and are transferred correctly.

##Update 0.8##
Copied the changes that JuhaW did into the main version. You can now Propagate Changes while in curve edit-mode.

Download Link
Donate

5 Likes

Thks Jacob, I search about what to use it but interesting!

It is mainly meant for when you are using modifiers on curves, like a boolean modifier. If you need to change your curve, you would normally have to go back the curve. Edit it, convert it back to a mesh, then add the modifier again. This bypasses all that. Also, just check out the question that I linked to in my first post. That goes over the main reason.

Ok Jacob, I go to the question on stackexchange.com.
Thks for the explanations, I understand now.
Good idea!

EDIT: Yes I have had this kind of problem and now your work respond absolutely to the question! Thks

I just downloaded this. But have not tried it yet. Does anyone know if it is good for making hair meshes from curves. Because trying to turn blender’s particle hair into a mesh for export to other programs is tedious at best.

It currently won’t do that, as it is confined to objects whose type is “CURVE”, but I will look into what it would require to change that. I doubt it would be to hard.

FIX by adding the following code after line #36 (tested in Blender 2.71):


bpy.ops.object.mode_set(mode='EDIT', toggle=False)
bpy.ops.mesh.select_all(action='SELECT')
bpy.ops.mesh.remove_doubles(threshold=0.0001)
bpy.ops.object.mode_set()

Thanks for the suggestions and code, I added it all in plus I made it recalculate the normals. I also added in a dedicated button to add a cube when the curve it selected. The link has been updated

Very cool! The add-mesh from curve thing is a really good idea, but I think it should be “Add mesh copy” (with a reference to the active curve object), do you agree? Also, the object selection list when a mesh object is active should (reasonably) only contain curve objects, since only they are relevant.

This is so smooth (with the 2-way thing added), you should submit it for inclusion in the Blender trunk. :slight_smile:

Thanks again for all the suggestions! You have been making me think and I am going to work on a pretty major overhaul. I will hopefully have it up in the next day. This will fix all the current issues and add some more features.

Warning: orthograph mistake on" version": versoin -> version

Is this a warning you are getting? If so when?

Looking forward to it!

Then you have found it? In the :
bl_info = {
“name” : “Curve Conversion”,
“description” : “Converts Curve To Mesh To Allow Updating Of Mesh”,
“author” : “Jacob Morris”,
“blender” : (2, 72, 0),
“location” : “Properties > Modifiers > Curve Conversion”,
“version” : (0, 2),
“category” : “Object”
}

No, I didn’t find it. Could you specify when you are getting it?

New version up, still haven’t figured out how to limit results to just curves, but I will keep looking.

Download your file here at the first message and you can see then!

"bl_info = { “name” : “Curve Conversion”,
“description” : “Converts Curve To Mesh To Allow Updating Of Mesh”,
“author” : “Jacob Morris”,
“blender” : (2, 72, 0),
“location” : “View 3D > Tools > Tools > Curve Conversion”,

“versoin” : (0, 3),

"category" : "Object"
}

"

That is odd, I never got an error at any point, but it was the misspelling of “version”, I updated the script. Thanks for pointing that out.

>>> it was the misspelling of “version”

Yes

Warning: orthograph mistake on" version": versoin -> version

That’s I had writtten!

I see that now, sorry, I didn’t understand what you meant at that point.