Cleanup: rename variables for gizmo templates
The abbreviation was from 'manipulator', which was changed to gizmo during development. Also correct operator description.
This commit is contained in:
@@ -24,27 +24,27 @@ class MyCameraWidgetGroup(GizmoGroup):
|
||||
def setup(self, context):
|
||||
# Run an operator using the dial gizmo
|
||||
ob = context.object
|
||||
mpr = self.gizmos.new("GIZMO_GT_dial_3d")
|
||||
props = mpr.target_set_operator("transform.rotate")
|
||||
gz = self.gizmos.new("GIZMO_GT_dial_3d")
|
||||
props = gz.target_set_operator("transform.rotate")
|
||||
props.constraint_axis = False, False, True
|
||||
props.orient_type = 'LOCAL'
|
||||
props.release_confirm = True
|
||||
|
||||
mpr.matrix_basis = ob.matrix_world.normalized()
|
||||
mpr.line_width = 3
|
||||
gz.matrix_basis = ob.matrix_world.normalized()
|
||||
gz.line_width = 3
|
||||
|
||||
mpr.color = 0.8, 0.8, 0.8
|
||||
mpr.alpha = 0.5
|
||||
gz.color = 0.8, 0.8, 0.8
|
||||
gz.alpha = 0.5
|
||||
|
||||
mpr.color_highlight = 1.0, 1.0, 1.0
|
||||
mpr.alpha_highlight = 1.0
|
||||
gz.color_highlight = 1.0, 1.0, 1.0
|
||||
gz.alpha_highlight = 1.0
|
||||
|
||||
self.roll_widget = mpr
|
||||
self.roll_gizmo = gz
|
||||
|
||||
def refresh(self, context):
|
||||
ob = context.object
|
||||
mpr = self.roll_widget
|
||||
mpr.matrix_basis = ob.matrix_world.normalized()
|
||||
gz = self.roll_gizmo
|
||||
gz.matrix_basis = ob.matrix_world.normalized()
|
||||
|
||||
|
||||
bpy.utils.register_class(MyCameraWidgetGroup)
|
||||
|
||||
Reference in New Issue
Block a user