Little help need

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

lazaaa
Posts: 5
Joined: Mon Jul 16, 2012 6:01 pm

Little help need

Postby lazaaa » Mon Jul 16, 2012 6:08 pm

bpy.ops.object.modifier_add(type='FLUID_SIMULATION')
bpy.context.active_object.modifiers[-1].settings.type = 'OBSTACLE'

Which statement can be "export animated mesh " to enable it?

ty for help.

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Tue Jul 17, 2012 10:01 pm

what do you want to do?

apply the modifier before export?
I'm sitting, waiting, wishing, building Blender in superstition...

lazaaa
Posts: 5
Joined: Mon Jul 16, 2012 6:01 pm

Postby lazaaa » Tue Jul 17, 2012 10:08 pm

Just turn on.

bpy.context.active_object.modifiers[-1].?

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Wed Jul 18, 2012 1:02 am

what you mean by turning it on?!

applying it?
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Fluidsim")

changing its visibility in viewport / render?
bpy.context.active_object.modifiers[-1].show_viewport = False
I'm sitting, waiting, wishing, building Blender in superstition...

lazaaa
Posts: 5
Joined: Mon Jul 16, 2012 6:01 pm

Postby lazaaa » Wed Jul 18, 2012 10:43 am

I just want to turn into the ""export animated mesh" switch.

Image

lazaaa
Posts: 5
Joined: Mon Jul 16, 2012 6:01 pm

Postby lazaaa » Wed Jul 18, 2012 10:46 am

bpy.context.active_object.modifiers [-1].export_animated_mesh = True

not working.

CoDEmanX
Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Postby CoDEmanX » Wed Jul 18, 2012 11:07 am

bpy.context.active_object.modifiers[-1].settings.use_animated_mesh = True

even though it looks like not working, it does. Move mouse over the checkbox and you'll see it updating
I'm sitting, waiting, wishing, building Blender in superstition...

lazaaa
Posts: 5
Joined: Mon Jul 16, 2012 6:01 pm

Postby lazaaa » Wed Jul 18, 2012 12:52 pm

Uhh ty for help, im stupid :)


Return to “Python”

Who is online

Users browsing this forum: No registered users and 0 guests