want to have button for apply transformations, but when I tried this code, it just doesn't work :(
layout.operator("object.transform_apply(location=False, rotation=True, scale=True)"), text="Reset Trasforms")
can someone please help me?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
When adding an operator to a layout, you should only add the API path, e.g.
"object.transform_apply". Any parameters can be configured after if you store
layout.operator in a variable:
operator = layout.operator("object.transform_apply", text="Reset Transforms") operator.location = False operator.rotation = True operator.scale = True