What is the syntax to add option/types to a modifier line of py.
thanks
The syntax of Python allows you to add no more than one dot operator to a function return, so you can't add a second one. Further, if you do add one dot operator, you can't access the return value from the function anymore, and so can't use the dot operator on it again.
Thus,
bpy.context.active_object.modifiers.new(type="SCREW", name="Your modifier name").axis = 'X'
is legal because bpy.context.active_object.modifiers.new returns a Modifier and you can immediately use the modifier. You will see this form in a few sample programs but it's generally not a good idea.
It is equivalent to mod = bpy.context.active_object.modifiers.new(type="SCREW", name="Your modifier name") ; mod.axis = 'X' ; del mod
But once you've done the equivalent of deleting mod, you can't access it again.
So the typical solution would be to do the assignment to retrieve the result of the function call, and then use that object to set the values, as in the answer mention in a comment on the question.
mod = bpy.context.active_object.modifiers.new(type="SCREW", name="Your modifier name")
mod.axis = 'X'
mod.angle = 6.28310
etc
mod = bpy.context.active_object.modifiers.new(type="SCREW", name="Your modifier name")and thenmod.axisormod.angle– Gorgious Nov 18 '21 at 22:34