Post #1219: ![](https://blenderartists.org/user_avatar/blenderartists.org/roaoao/48/37600_2.

📋 Metadata

  • Author: rhyging5
  • Date: 2018-02-12 04:20:56
  • Type: question
  • Quality Score: 5/10
  • Reply to: post_01187

🏷️ Tags

intermediate macro python-scripting unsolved

  • Macro Editor
  • Python Scripting

💬 Content

roaoao:

We have to use python script in this case:

bpy.context.object.pose.bones["DEF foot"].constraints["Copy Rotation"].influence = 1; bpy.context.object.pose.bones["DEF foot"].constraints["Copy Rotation"].keyframe_insert("influence")

thanks for the response :slight_smile: I tried this code and works, but, when using a slack of theses lines in a same button, start to come some problems. Is like it doesn’t like to have to much code at same button. Not sure if that have sense…

BTW the way I’m tryng to add the buttons for the color and strenght of a lamp object but doesn’t work. I’m trying with this line in property slot:

C.object.data.elements.active.nodes[“Emission”].inputs[0].default_value
C.object.data.elements.active.nodes[“Emission”].inputs[1].default_value

Can you say what is wrong? thanks a lot Master


🔗 View on Blender Artists