I wanna rotate an object with this code below:
import bpy
from math import *
import mathutils
Name = 'Dimi'
me = bpy.ops.mesh.primitive_cylinder_add(radius = 0.5, depth = 1)
scj = bpy.context.scene
me1 = bpy.context.object.data
ob = bpy.data.objects.new(Name, me1)
scj.objects.link(ob)
for ob in scj.objects:
ob.location.x += 4
ob.location.y += 0
ob.location.z += 0
me.transform(ob.matrix)
ob.RotY = 0
ob.RotX = 0
But this function
me.transform(ob.matrix)
ob.RotY = 0
ob.RotX = 0
is from blender 2.49 and can't find how to do this in a 2.74 version.