[Bf-committers] collapse/flatten modifier stack?

Matt Ebb matt at mke3.net
Sat Mar 24 00:24:21 CET 2012


mesh = ob.to_mesh(scene, True, 'RENDER')  ?

On Sat, Mar 24, 2012 at 4:51 AM, Bassam Kurdali <bassam at urchn.org> wrote:
> The original object is fine, yes, and has all the modifiers intact. the
> new object is the *unmodified* mesh, not the end result of the modifier
> stack, which is what I'm trying to get.
> I would do it by applying modifiers, but, with multimodifiers, applying
> one at a time is not going to work (unless someone can tell me how)
> TL;DR: bpy.ops.object.convert isn't the answer.
> cheers
> Bassam
> On Fri, 2012-03-23 at 10:18 +0000, contact at steamreview.org wrote:
>> Presumably you are still looking at the original object. keep_original
>> means that a new one is created. It'll be made the active object by the
>> operator.
>>
>> > Thanks Tom
>> > On Wed, 2012-03-21 at 22:05 +0000, Tom Edwards wrote:
>> >> You're missing this:
>> >>
>> >
>> >> bpy.ops.object.convert(keep_original=True)
>> > I tried it and I got the default i.e. original mesh, i.e. it didn't
>> > apply the modifier stack, but removed it. Is there something I'm
>> > missing?
>> >
>> >>
>> >> Which is exactly what you want. It is quite obscure though!
>> >>
>> >> On 21/03/2012 9:04, Bassam Kurdali wrote:
>> >> > Hello list,
>> >> > This has come up before, albeit in a python context: the desire to get
>> >> > the result of the modifier stack as a mesh. There was some discussion
>> >> > over the desirability of hard-coded py api, and a question of why not
>> >> > just use the apply modifier approach one by one.
>> >> >
>> >> > I've encountered both the use-case and the problem today.
>> >> >
>> >> > use-case: collapsing the stack/applying shapekeys for prepping a
>> >> rigged
>> >> > model for 3d printing.
>> >> >
>> >> > problem: this is the first 'cannot be done' problem I've encountered:
>> >> >
>> >> > Multimodifiers (correct me if I'm wrong) cannot be simply applied one
>> >> by
>> >> > one: they need to be applied together. And afaik there is no mechanism
>> >> > to do this.
>> >> >
>> >> > Is there anything I'm missing? this seems totally undoable, I wonder
>> >> how
>> >> > render-engines deal with it?
>> >> >
>> >> > cheers,
>> >> > Bassam
>> >> >
>> >> > _______________________________________________
>> >> > Bf-committers mailing list
>> >> > Bf-committers at blender.org
>> >> > http://lists.blender.org/mailman/listinfo/bf-committers
>> >> >
>> >
>> >
>> >
>>
>>
>> _______________________________________________
>> Bf-committers mailing list
>> Bf-committers at blender.org
>> http://lists.blender.org/mailman/listinfo/bf-committers
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers


More information about the Bf-committers mailing list