 |
Member
|
|
Join Date: Mar 2002
Posts: 1,103
|
|
 |
Quote:
Originally Posted by Normal
Wings' obj exporter now exports smoothing groups based on the hard edges in your model, and Blender can import and use the groups with the edgesplit modifier. I rarely use edgesplit, but I use creases on most all of my models. As I don't think it exists, I want to try to make an edgesplit to creases convertor (emphasis on try) and was wondering it's possible . Searching through the API docs, I found that they at least mention creases, but can't seem to find anything about edgesplit.
This is how I think it could go: 1. Select sharp edges 2. Clear Sharp selected edges. 3. Crease selected edges +1.0 3. Doable?
|
The following code will do what you need, quick script really...
Code:
import Blender
def convert():
editmode = 0
if Blender.Window.EditMode():
editmode = 1
Blender.Window.EditMode(0)
scene = Blender.Scene.GetCurrent()
act = scene.objects.active
mesh = None
if act and act.type == 'Mesh':
mesh = act.getData(mesh = True)
for edge in mesh.edges:
if edge.flag & Blender.Mesh.EdgeFlags["SHARP"]:
edge.crease = 255
edge.flag &= ~Blender.Mesh.EdgeFlags["SHARP"]
if editmode:
Blender.Window.EditMode(1)
convert()
Cheers,
Briggs
............................................
Briggs
|
# 2

21-Jul-09, 05:35
|