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
| # Generates grease pencil line to which various formulas can be applied | |
| # to test different value gradients | |
| import bpy | |
| import random | |
| from math import tau, sin, cos, tan | |
| def line(gp_frame, start_pos, end_pos, num_pts): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 |
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 math import pi, sin, cos | |
| from mathutils import Vector | |
| num_points = 10 | |
| center = (0.0, 0.0, 0.0) | |
| def get_frame(frames, frame_num): | |
| '''Checks for the existence of a given frame''' | |
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 math import pi, sin, cos | |
| from mathutils import Vector | |
| num_points = 10 | |
| center = (0.0, 0.0, 0.0) | |
| def get_frame(frames, frame_num): | |
| '''Checks for the existence of a given frame''' | |
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 math import pi, sin, cos | |
| num_points = 10 | |
| center = (0.0, 0.0, 0.0) | |
| def star(gp_frame, center, radius_x, radius_z, num_points, offset=0.75): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 | |
| gp_stroke.use_cyclic = True |
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 math import pi, sin, cos | |
| num_points = 48 | |
| center = (0.0, 0.0, 0.0) | |
| def ellipse(gp_frame, center, radius_x, radius_z, num_points): | |
| gp_stroke = gp_frame.strokes.new() |
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 math import pi, sin, cos | |
| num_points = 48 | |
| center = (0.0, 0.0, 0.0) | |
| def ellipse(gp_frame, center, radius_x, radius_z, num_points): | |
| gp_stroke = gp_frame.strokes.new() |
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
| # adds a grease pencil noise modifier to the selected grease pencil object | |
| import bpy | |
| import random, math | |
| from mathutils import Vector | |
| def line(gp_frame, start_pos, end_pos, num_pts): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 |
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
| # Generates grease pencil line with random noise on x and z axes | |
| import bpy | |
| import random | |
| from mathutils import Vector | |
| def line(gp_frame, start_pos, end_pos, num_pts): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 |
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
| # Generates grease pencil line with random noise on z axis (alternate method) | |
| import bpy | |
| import random | |
| def line(gp_frame, start_pos, end_pos, num_pts): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 | |
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
| # Generates grease pencil line with random noise on z axis | |
| import bpy | |
| import random | |
| def line(gp_frame, start_pos, end_pos, num_pts): | |
| gp_stroke = gp_frame.strokes.new() | |
| gp_stroke.line_width = 30 | |