All Questions
111 questions
0
votes
2
answers
171
views
Set Origin to a specific vertex
I need some help with my script. The main task is to move the origin to the position of a certain vertex. In theory this works quite well, but unfortunately the meshes are always moved after i run the ...
1
vote
1
answer
41
views
Moving GPencilStrokes via code
I have a list of GPencilStrokes in a GPencilFrame that I would like to move (and to rotate) via code.
I've noticed in the ...
0
votes
2
answers
63
views
New camera angle is not rendered after set rotation_euler
I tried to set the camera rotation like this:
camera = bpy.data.objects['Camera']
camera.rotation_mode = 'XYZ'
camera.rotation_euler = [1.1117, 0, 0.762]
The ...
0
votes
0
answers
32
views
How can I derive an action name based on the mesh selected?
I have a simple cube that has a keyframed location from Frame 1 to Frame 48
Here is a code that shifts the keyframes by 2
...
1
vote
0
answers
75
views
How to programmatically find a "Y" pose such that it is the inverse of another "X" pose in relation to the T-pose?
That is, if I "Apply" the armature modifier of the "Y" pose onto the mesh then if I now link that mesh to the armature of the "X" pose the mesh should look like the ...
1
vote
1
answer
42
views
Scaling multiple independent meshes in an object from their centers, and, scaling only meshes whose centers are engulfed within specific coordinates
In the MWE (Minimal Working Example) below I created 4 spheres and placed them at 4 different locations along the Y-axis. I would like to scale each sphere as per my wish (lets say 2 in the X,Y,Z).
<...
0
votes
1
answer
31
views
Python: Rotation not applying to child object
I am trying to pose a hand using values read from an XML file. All the joints are parented to the previous joint and finally the fingers to the hand.
Í am using the following code:
...
0
votes
1
answer
264
views
How to rotate an object in blender along a desired axis with python?
I have this idea where I want to rotate an object along an arbitrary axis at an angle to align it towards another object. I have got to the point where I already calculated the axis (x,y,z) and the ...
0
votes
1
answer
155
views
How do I scale a specific set of vertices via the api
I'm trying to programatically apply a partial scaling to a mesh. For this specific scaling, I'm trying to replicate what happens when you've selected a number of vertices of a mesh in Edit Mode and ...
1
vote
1
answer
975
views
How to move and resize a bone in Python such that the head and the tail are at a certain global position?
I want to move and resize a bone by setting the coordinates of the head of the bone and the tail of the bone explicitly.
For example, let's say that these are my coordinates of my bone head:
...
3
votes
1
answer
742
views
How to calculate bounds of all selected objects BUT follow the Active Object's Rotation at the same time?
[ Working code at the bottom, just paste in Blender's text editor. ]
There are similar Bounding Box questions out there but this is different, please don't close.
I made a script which iterates ...
1
vote
1
answer
149
views
Blender Python Script issues, can someone explain the script?
I'm trying to model Hypoid Gears for a model that I'm making. I'm doing the model in AutoCAD/Inventor, but the only decent free tutorial that I've found for modeling Hypoid Gears is meant for Blender. ...
0
votes
1
answer
661
views
Copying and rotating object via Blender Python API
I'm new to the Blender API, so I've been doing a lot of playing around with it. I'm having some issues trying to do something that should be simple.
My goal: make a copy of a "base" object, ...
2
votes
0
answers
1k
views
Check if any points of an objects bounding box is inside the bounding box of another object
I'm trying to make a script that'll find if any points of an objects bounding box is inside the area of a different objects bounding box.
My thought was to cancel out the rotation of the object I'm ...
1
vote
0
answers
158
views
How to get euler/quaternion rotation from matrix?
I have 2 bones and I want to copy the rotation of one bone to another
using only rotation_quaternion or rotation_euler to assign ...