Adding shadows on many objects at once
01 March 2017 19:16
Hello,
First of all, Congrats for the new release!
I have created a lot of objects and I must add shadow to all of them. I wonder if there's a shortcut to add shadows to many object at once because when you have 10 objects, it's ok; when you have 448, it's tedious.
Any suggestions?
Thank you!
First of all, Congrats for the new release!
I have created a lot of objects and I must add shadow to all of them. I wonder if there's a shortcut to add shadows to many object at once because when you have 10 objects, it's ok; when you have 448, it's tedious.
Any suggestions?
Thank you!
02 March 2017 12:16
I'm trying to make a Python script in Blender that, given a number of selected objects, select objects that I want to add shadows to and adds receiving and casting shadows.
Unfortunately, it doesn't work and I don't know see what's wrong. It results in only the last selected object to be added shadow settings. What's strange is that I have a working script, similar, and export FBX for each object: here I only changed B4W related lines.
Does anyone see the error? Some help would be appreciated!
My script:
import bpy
import os
for objectN in bpy.context.selected_objects:
bpy.ops.object.select_all(action='DESELECT')
objectN.select = True
bpy.context.object.b4w_shadow_cast = True
bpy.context.object.b4w_shadow_receive = True
Unfortunately, it doesn't work and I don't know see what's wrong. It results in only the last selected object to be added shadow settings. What's strange is that I have a working script, similar, and export FBX for each object: here I only changed B4W related lines.
Does anyone see the error? Some help would be appreciated!
My script:
import bpy
import os
for objectN in bpy.context.selected_objects:
bpy.ops.object.select_all(action='DESELECT')
objectN.select = True
bpy.context.object.b4w_shadow_cast = True
bpy.context.object.b4w_shadow_receive = True
02 March 2017 17:31
02 March 2017 19:59