Skip to content

Instantly share code, notes, and snippets.

@RH2
Created November 4, 2012 09:32
Show Gist options
  • Save RH2/4011062 to your computer and use it in GitHub Desktop.
Save RH2/4011062 to your computer and use it in GitHub Desktop.
def refresh_script(scene):
r=context.scene.objects['Plane.001'].material_slots['emmisive_light'].material.diffuse_color[0]
g=context.scene.objects['Plane.001'].material_slots['emmisive_light'].material.diffuse_color[1]
b=context.scene.objects['Plane.001'].material_slots['emmisive_light'].material.diffuse_color[2]
context.scene.objects['Point'].data.color[0]=context.scene.objects['Point.001'].data.color[0]=r
context.scene.objects['Point'].data.color[1]=context.scene.objects['Point.001'].data.color[1]=g
context.scene.objects['Point'].data.color[2]=context.scene.objects['Point.001'].data.color[2]=b
app.handlers.frame_change_pre.append(refresh_script)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment