Last active
November 16, 2018 09:20
-
-
Save furby-tm/fa8ecacb649c9390bd83e935c9b0e6c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = _Name(ob.name) | |
color_node = None | |
if color_node is None: | |
for tuple in lights: | |
if tuple[0] == node: | |
tuple[1]['color'] = ('RGBA', (arnold.AI_TYPE_RGBA, *lamp.color)) | |
else: | |
arnold.AiNodeLink(color_node, "color", node) #TODO: Refactor for Dict() | |
for tuple in lights: | |
i = 1 | |
j = 0 | |
if tuple[j] == node: | |
if 'matrix' not in str(tuple): | |
tuple[i]['matrix'] = ('MATRIX', numpy.reshape(ob.matrix_world.transposed(), -1)) | |
tuple[i]['intensity']=('FLOAT', light.intensity) | |
tuple[i]['exposure']=('FLOAT', light.exposure) | |
tuple[i]['cast_shadows']=('BOOL', light.cast_shadows) | |
tuple[i]['cast_volumetric_shadows']=('BOOL', light.cast_volumetric_shadows) | |
tuple[i]['shadow_density']=('FLOAT', light.shadow_density) | |
tuple[i]['shadow_color']=('RGBA', (arnold.AI_TYPE_RGBA, *light.shadow_color)) | |
tuple[i]['samples']=('INT', light.samples) | |
tuple[i]['normalize']=('BOOL', light.normalize) | |
tuple[i]['affect_diffuse']=('BOOL', light.affect_diffuse) | |
tuple[i]['affect_specular']=('BOOL', light.affect_specular) | |
tuple[i]['affect_volumetrics']=('BOOL', light.affect_volumetrics) | |
tuple[i]['diffuse']=('FLOAT', light.diffuse) | |
tuple[i]['specular']=('FLOAT', light.specular) | |
tuple[i]['sss']=('FLOAT', light.sss) | |
tuple[i]['indirect']=('FLOAT', light.indirect) | |
tuple[i]['max_bounces']=('INT', light.max_bounces) | |
tuple[i]['volume_samples']=('INT', light.volume_samples) | |
tuple[i]['volume']=('FLOAT', light.volume) | |
break | |
j += 1 | |
else: | |
arnold.AiMsgDebug(b" skip (unsupported)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment