5
$\begingroup$

I'm doing some test with template_curve_mapping.

I have write this code:

import bpy

class HelloWorldPanel(bpy.types.Panel):
    bl_space_type = "VIEW_3D"
    bl_label = "TEST" 
    bl_region_type = 'UI'
    tag = bpy.props.FloatProperty()

    def draw(self, context):
        layout = self.layout


        row = layout.row()
        row.label(text="Hello world!", icon='WORLD_DATA')
        row = layout.row()
        layout.template_curve_mapping(self.tag, "curve", brush=True)

def register():
    bpy.utils.register_class(HelloWorldPanel)

def unregister():
    bpy.utils.unregister_class(HelloWorldPanel)

if __name__ == "__main__":
    register()

But it does not work.

I want to be able to define the change of one value from 0 to 1 in time, so the height of the curve would be from 0.0 to 1.0 and the width would be the frame number.

Where can I find an example or more information about the use of this control? I have found only the use of this control in the sclupt mode, but no moree info.

$\endgroup$
  • 1
    $\begingroup$ Not sure if I missed this or ignored it but you would be interested in this answer. $\endgroup$ – sambler Aug 28 '16 at 18:16

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.