Hey guys- does anyone know how to use Python to add a modifier? I am making a game and need to be able to apply a modifier to an object on command, any ideas guys? Thanks!
Example at the top of this page:
http://www.blender.org/documentation/245PythonDoc/Modifier-module.html
from Blender import *
ob = Object.Get('Cube') # retrieve an object
mods = ob.modifiers # get the object's modifiers
mod = mods.append(Modifier.Types.SUBSURF) # add a new subsurf modifier
mod[Modifier.Settings.LEVELS] = 3 # set subsurf subdivision levels to 3
Cross link to the possiblity of animating the modifier using code.
http://blenderartists.org/forum/showthread.php?t=124188
It seems you cann ot animate a modifier’s parameters using the IPO,
I’ve been told you cannot add the Modifier in the Game Engine? Can you confirm this?
On that note, do you know how to start/stop the Game Engine using python? I’m working on a robotics project and trying to make a 3D real-time camera for vision translation. Thanks guys!