Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid syntax error on operator commands with parameters #14

Open
ExpnandBanana opened this issue Jan 7, 2022 · 0 comments
Open

Invalid syntax error on operator commands with parameters #14

ExpnandBanana opened this issue Jan 7, 2022 · 0 comments
Projects

Comments

@ExpnandBanana
Copy link

Trying to set up one-click extrapolation types using these buttons but inserting a command with a parameter throws out a syntax error.

In the preset shelf itself, the code reads
item_sub_1.button_operator = 'graph.interpolation_type(type='BEZIER')'

Which results in the error
Failed to execute the preset: SyntaxError('invalid syntax', ('C:\\Users\\Username\\AppData\\Roaming\\Blender Foundation\\Blender\\3.0\\scripts\\presets\\shelves\\test.py', 16, 62, "item_sub_1.button_operator = 'graph.extrapolation_type(type='BEZIER')'\n"))

Using the code
item_sub_1.button_operator = 'graph.interpolation_type'
Wont cause any errors but that only brings up the interpolation type menu instead of setting it to Bezier automatically.

@ExpnandBanana ExpnandBanana changed the title Invalid syntax error on commands with parameters Invalid syntax error on operator commands with parameters Jan 8, 2022
@kromar kromar added this to todo in Shelves Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Shelves
  
todo
Development

No branches or pull requests

1 participant