Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index f4fd188c641..96193b047c6 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -205,21 +205,21 @@ class _GenericBone:
""" Vector pointing down the x-axis of the bone.
"""
from mathutils import Vector
- return self.matrix.to_3x3() * Vector((1.0, 0.0, 0.0))
+ return self.matrix.to_3x3() @ Vector((1.0, 0.0, 0.0))
@property
def y_axis(self):
""" Vector pointing down the y-axis of the bone.
"""
from mathutils import Vector
- return self.matrix.to_3x3() * Vector((0.0, 1.0, 0.0))
+ return self.matrix.to_3x3() @ Vector((0.0, 1.0, 0.0))
@property
def z_axis(self):
""" Vector pointing down the z-axis of the bone.
"""
from mathutils import Vector
- return self.matrix.to_3x3() * Vector((0.0, 0.0, 1.0))
+ return self.matrix.to_3x3() @ Vector((0.0, 0.0, 1.0))
@property
def basename(self):
@@ -378,9 +378,9 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
:type roll: bool
"""
from mathutils import Vector
- z_vec = self.matrix.to_3x3() * Vector((0.0, 0.0, 1.0))
- self.tail = matrix * self.tail
- self.head = matrix * self.head
+ z_vec = self.matrix.to_3x3() @ Vector((0.0, 0.0, 1.0))
+ self.tail = matrix @ self.tail
+ self.head = matrix @ self.head
if scale:
scalar = matrix.median_scale
@@ -388,7 +388,7 @@ class EditBone(StructRNA, _GenericBone, metaclass=StructMetaPropGroup):
self.tail_radius *= scalar
if roll:
- self.align_roll(matrix * z_vec)
+ self.align_roll(matrix @ z_vec)
def ord_ind(i1, i2):
@@ -587,7 +587,7 @@ class Gizmo(StructRNA):
_rna_gizmo_target_get_range as target_get_range,
)
- # Convenience wrappers around private `_gawain` module.
+ # Convenience wrappers around private `_gpu` module.
def draw_custom_shape(self, shape, *, matrix=None, select_id=None):
"""
Draw a shape created form :class:`bpy.types.Gizmo.draw_custom_shape`.
@@ -638,19 +638,19 @@ class Gizmo(StructRNA):
:return: The newly created shape.
:rtype: Undefined (it may change).
"""
- from _gawain.types import (
- Gwn_Batch,
- Gwn_VertBuf,
- Gwn_VertFormat,
+ from _gpu.types import (
+ GPUBatch,
+ GPUVertBuf,
+ GPUVertFormat,
)
dims = len(verts[0])
if dims not in {2, 3}:
raise ValueError("Expected 2D or 3D vertex")
- fmt = Gwn_VertFormat()
+ fmt = GPUVertFormat()
pos_id = fmt.attr_add(id="pos", comp_type='F32', len=dims, fetch_mode='FLOAT')
- vbo = Gwn_VertBuf(len=len(verts), format=fmt)
+ vbo = GPUVertBuf(len=len(verts), format=fmt)
vbo.fill(id=pos_id, data=verts)
- batch = Gwn_Batch(type=type, buf=vbo)
+ batch = GPUBatch(type=type, buf=vbo)
return (batch, dims)