I define a vector property like this
pointorig4 = FloatVectorProperty(name=“Point4 Space”,
description=“Point4 Space”,
default=(6.0,7.0,8.0), size = 3)
and when I print value I get the following
pointorig1 = <bpy_float[3], MESH_OT_primitive_linelineintersect_pb1_add.pointori
g1>
how come I don’t print the values ?
and how can I print the values per say
I need this to be use by mathutil vector
so are these defined as vector for mathutil?
anyway to convert to mathutil vector ?
thanks
Use the constructor:
import bpy
from mathutils import Vector
bpy.types.Scene.test = bpy.props.FloatVectorProperty(size=4)
scene = bpy.context.scene
scene.test = 1.0, 2.0, 3.0, 4.0
#your Vector
vec = Vector(scene.test)
###
print(*vec)
vec[3] = 99.0
scene.test = vec
print(*scene.test)
so still need to convert to mathutil vector !
thanks
Linusy
(Linusy)
4
If you specify subtype for the FloatVectorProperty to something like ‘TRANSLATION’ you get a mathutils Vector directly.
http://www.blender.org/documentation/blender_python_api_2_70a_release/bpy.props.html