3

In Blender2.73, I have a model with Catmull-Clark Subsurf modifier. How can I get and set the XYZ positions of subdivided vertices(the red circles) in Python Script?

enter image description here

Alternatively, Can I save the model as just a high polygon model without Subsurf modifier?

reosa
  • 75
  • 5
  • if you are familiar with python: http://blender.stackexchange.com/questions/7196/how-to-get-a-new-mesh-with-modifiers-applied-using-blender-python-api – zeffii Apr 12 '15 at 13:17

1 Answers1

1

It seems this question already answers how to apply a modifier; if you still get the parameters of a modifier, here's how:

import bpy

for ob in bpy.context.selected_objects:
    for mod in ob.modifiers: 
        if mod.type == 'SUBSURF':
           print("Subsurface modifier (\"%s\") in object \"%s\", with view level %s and render level %s." % (ob.name, mod.levels, mod.render_levels))
           bpy.ops.object.modifier_apply(apply_as='DATA', modifier=mod.name)

The above script will print to the console the level of all Subsurface modifiers in all selected objects, and their names. Then it will apply the modifiers, so that you can get the coordinates of each vertex.

someonewithpc
  • 12,381
  • 6
  • 55
  • 89