Keys in Particles/Physic/KEYED
Closed, InvalidPublic

Description

Blender Version
2.76

Short description of error
I can not insert a new "key" in Physics/KEYED in Particles with the defined script of Blender : bpy.ops.particle.new_target()
Nothing happen.
Is there another way to add a key with a script (Particles/Physic/KEYED).

Exact steps for others to reproduce the error

ECO
bpy.context.scene.cursor_location = (0,0,1)#!
bpy.ops.mesh.primitive_circle_add(radius=1) #!
bpy.ops.transform.resize(value=(0.2,0.2,1))
cyl = bpy.context.active_object#!
cyl.name = name#!
bpy.ops.object.mode_set(mode="EDIT")#!
bpy.ops.mesh.edge_face_add()
bpy.ops.transform.rotate(value=pi/2, axis=(1,0,0))#!
bpy.ops.object.mode_set(mode="OBJECT")#!
bpy.ops.object.particle_system_add()
part = cyl.particle_systems[0]
settings = part.settings
settings.normal_factor = 0
settings.effector_weights.gravity = 0
settings.physics_type = "KEYED"
bpy.ops.particle.new_target()

Details

Type
Bug
Bastien Montagne (mont29) closed this task as "Invalid".Jul 4 2017, 5:36 PM
Bastien Montagne (mont29) claimed this task.

No bug here, you'll have to override context given to bpy.ops.particle.new_target operator to include the relevant particle_system to work on.