Page Menu
Home
Search
Configure Global Search
Log In
Files
F9827694
SplineCenterOverride_Updated.txt
David Hill (davidwhill)
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
David Hill (davidwhill)
Feb 22 2021, 1:10 PM
Size
1 KB
Subscribers
None
SplineCenterOverride_Updated.txt
View Options
import bpy
import math
from mathutils import Vector
# Create Bezier, select last control point, rotate about (0.0,1.0,0.0) using center_override option
bpy.ops.curve.primitive_bezier_curve_add(radius=1, enter_editmode=False, align='WORLD', location=(0, 0, 0))
bpy.ops.object.editmode_toggle()
bpy.ops.curve.select_all(action='DESELECT')
bpy.context.selected_objects[0].data.splines[0].bezier_points[1].select_control_point = True
center = Vector([0.0,1.0,0.0])
bpy.ops.transform.rotate(value=.3, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False, center_override=(center))
# Create Bezier, select last control point, rotate without using center_override option
bpy.ops.object.editmode_toggle()
bpy.ops.curve.primitive_bezier_curve_add(radius=1, enter_editmode=False, align='WORLD', location=(0, 0, 0))
bpy.ops.object.editmode_toggle()
bpy.ops.curve.select_all(action='DESELECT')
bpy.context.selected_objects[0].data.splines[0].bezier_points[1].select_control_point = True
bpy.ops.transform.rotate(value=.3, orient_axis='Z', orient_type='GLOBAL', orient_matrix=((1, 0, 0), (0, 1, 0), (0, 0, 1)), orient_matrix_type='GLOBAL', constraint_axis=(False, False, True), mirror=True, use_proportional_edit=False, proportional_edit_falloff='SMOOTH', proportional_size=1, use_proportional_connected=False, use_proportional_projected=False)
bpy.ops.object.editmode_toggle()
File Metadata
Details
Attached
Mime Type
text/x-python
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
44/48/48ccc9ddedc8f7a79618d0a2a5e1
Attached To
T85823: bpy.ops.transform.rotate() seems to ignore center_override when Bezier control points are selected
Event Timeline
Log In to Comment