0
$\begingroup$

I am pretty new to scripting in Blender and I am trying to make a test UI panel with sliders. I made a custom property like this: Custom Property

This is what I am trying to do: My attempt

I have already tried doing this:

Link1: Add custom property to panel

Link2: Program UI Slider

What happens is that a slight amount of space is left where I the slider should come, but it does not show up.

This might be really easy for many of you, but it is new and tough for me. Please answer as though answering to a complete newbie.

$\endgroup$
7
  • 1
    $\begingroup$ Hello ! You need to replace = with : in the property definition $\endgroup$
    – Gorgious
    Mar 27, 2023 at 9:44
  • $\begingroup$ @Gorgious, as I have mentioned above, I am beginner. So, please bear with me and tell me what, in this script is the "property definition"? $\endgroup$
    – Z-animator
    Mar 27, 2023 at 12:51
  • 1
    $\begingroup$ Alright, so a bit of advice which would have saved both me and you a bit of time : when you want to troubleshoot code, please post the code as text, not as an image. that way it's easier for others to copy/ paste it and debug it. :) Replace slider = bpy.props.FloatProperty(name = "Slide number:")with slider: bpy.props.FloatProperty(name = "Slide number:") do the same for textbox and dropdown (btw you have a duplicate entry for textbox, I'm not sure but it might not behave correctly, please keep only one of the two statements) $\endgroup$
    – Gorgious
    Mar 27, 2023 at 13:11
  • $\begingroup$ I will check and get back to you $\endgroup$
    – Z-animator
    Mar 27, 2023 at 13:49
  • 1
    $\begingroup$ you need to use an operator docs.blender.org/api/current/bpy.types.Operator.html for the class and docs.blender.org/api/current/… for the layout element. There are several example builtin Blender if you go to the text editor > templates > python > operator $\endgroup$
    – Gorgious
    Mar 28, 2023 at 7:25

0

You must log in to answer this question.

Browse other questions tagged .