I have the following snippet in my config file:
{
"module": "manipulators.EntityManipulator",
"config": {
"selector": {
"provider": "getter.Entity",
"conditions": {
"name": "test_bolt.*"
}
},
"rotation_euler": [2, 25, 100],
}
},
The rest of the config is tested and works fine.
It works for location = [a,b,c], scale = [a,b,c], but not for rotation_euler.
The config has no issues finding the entities.
I've also tried floats, no improvement.
There are no other manipulators in the config.
Hey @rvorias,
the entity manipulator should also work for rotation_euler, however rotation_euler expects radians, not degrees.
So if you convert your angle values, it should work.
You can also take a look at the entity_manipulation example, which also sets the rotation of an object.
Let me know if you need any further help.
Hi,
I've put in numbers of different orders of magnitude just as a sanity check.
2 (x-axis) would also be a valid rotation in radians. However, it still does not rotate.
To be sure: I've just verified with something like "rotation_euler": [0.3, 0.2, 0.1],. I can't see any rotations.
Hey,
this is strange. The config snippet seems correct and as also setting the rotation is working in the entity_manipulation example, it probably has something to do with your specific object(s). Maybe there are constraints on the object which prohibit it to rotate?
I would suggest to debug your config inside the blender UI (see here).
In this way you can see what is actually going on and inspect if it sets any rotation values at all.
I think I've found some unwanted behavior:
I seems that the euler rotations are set, but not visible because the rotation mode is set to quaternions.

When I change to eulerXYZ - the values disappear.
update:
My original file seems to have rotations in Q format! It might transfer over. Will run a test.
Seems that my format (gltf) encodes rotations in WXYZ.
Anyway, thanks a lot for mentioning the debug script!
Fixed it by enforcing bpy.data.objects[entity.name].rotation_mode = 'XYZ'
(in EntityManipulator)
Most helpful comment
Seems that my format (gltf) encodes rotations in WXYZ.
Anyway, thanks a lot for mentioning the debug script!