0
$\begingroup$

Given the master propeller blade or gear already drawn at the desired radius from the rotation axis, the Blender GUI approach to duplicate the original and x-rotate the copy 15-deg is to type shift+D rx15 But the corresponding Python script which appears in the info window does not yield a copied object. Here is the latest code suggested by StackExchange, but still not working - thanks much:

import bpy
from math import pi 

j = 1          # count 1-to-n blades
while j<= 3:
    bpy.ops.object.duplicate_move()
    obj = bpy.context.active_object
    bpy.ops.transform.rotate(value = j * 2 * pi / 4, orient_axis='X', orient_type='GLOBAL')
    j=j+1
$\endgroup$
  • $\begingroup$ Make sure your object has context before running the script. No issue for me when running script. $\endgroup$ – batFINGER Jul 10 at 6:43
  • $\begingroup$ Thanks - Please show the code statement(s) to select the object and set context, ideally updating the preliminary code block above $\endgroup$ – Phil Barns Jul 13 at 20:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.