Created
January 18, 2017 19:32
-
-
Save paperManu/08bb68cc8e2c7b21f54327285a9cf8a1 to your computer and use it in GitHub Desktop.
Testing sculpt.brush_stroke
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import bpy | |
| from bpy.types import Operator | |
| class strokeOperator(Operator): | |
| """Stroke test""" | |
| bl_idname="test.stroketest" | |
| bl_label="Stroke test" | |
| def execute(self, context): | |
| stroke = [{ | |
| "name": "defaultStroke", | |
| "mouse" : (0, 0), | |
| "pen_flip" : False, | |
| "is_start": True, | |
| "location": (-0.5, 0.0, 0.0), | |
| "pressure": 1.0, | |
| "time": 1.0, | |
| "size" : 100.0 | |
| }, | |
| { | |
| "name": "defaultStroke2", | |
| "mouse" : (0, 0), | |
| "pen_flip" : False, | |
| "is_start": False, | |
| "location": (0.5, 0.0, 0.0), | |
| "pressure": 1.0, | |
| "time": 1.0, | |
| "size" : 100.0 | |
| }] | |
| bpy.ops.object.mode_set(mode='SCULPT') | |
| bpy.ops.sculpt.brush_stroke(stroke=stroke, mode='SMOOTH') | |
| return {'FINISHED'} | |
| bpy.utils.register_class(strokeOperator) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment