0

I'm trying to integrate a cutom dropdown in my panel that allows to change between different display types for the created proxy objects.

The script runs without error but the dropdown is not shown in the panel. Also, I get this message in the console pointing to a certain line but I can't figure out what's the problem.

D:\XXXXXXX\XXXXXXXX\XXXXXXXXXX\scripting 2_8 wip.blend\Create Proxy Tools:326 rna_uiItemR: property not found: PROPS_UL_ProxyToolDisplayTypes.DisplayType_List

Edit: Here's a .blend with the script https://1drv.ms/u/s!BH2oRah8e0Ptg8QA9G_pwLDWGUt9ng?e=2yp3rI

  • Your formatting is horribly broken. Please fix it, because right now I can't tell what's wrong from copy & pasting and what is actually wrong in your source code. – Robert Gützkow Sep 01 '19 at 17:59
  • @rjg Ok what exactly is broken about it. As you can see, I'm not a programer. I just applied what I saw in tutorials. Any tips on proper form would be great – xrogueleaderx Sep 01 '19 at 19:14
  • No problem. I was talking just about the formatting in your post. Linebreaks and indentation. Haven't tested it yet. – Robert Gützkow Sep 01 '19 at 19:20
  • 1
    @rjg ooh, do you also mean just these guys '>'? I think that was caused by copying it out of the text editor... I will provide a clean version as soon as I have acces to a computer. Also, the script worked fine until I added the dropdown related code. I will try to mark that part for you – xrogueleaderx Sep 01 '19 at 19:29
  • I shared a link with my test file. I hope this helps, sorry for the inconvinience – xrogueleaderx Sep 02 '19 at 06:12
  • Try to correct all the assignments of your PropertyGroup from this bpy.types.Scene.ReduceVerts = bpy.props.FloatProperty (already registered per scene due pointerprop) to: ReduceVerts = bpy.props.FloatProperty. Also as of 2.8x we have to use annotations and there are naming conventions for panels, variables (PEP: ReduceVerts -> reduce_verts) and whatnot... I'd recommend starting from here: How to create a custom UI? – brockmann Sep 02 '19 at 09:13
  • 1
    @brockmann Thanks for this awesome reference. I got it to work perfectly – xrogueleaderx Sep 02 '19 at 15:17
  • Cool, closing as dupe? Or do you mind posting your code as answer? – brockmann Sep 02 '19 at 16:44
  • I would just close it since there wasn't anything special to bear in mind. It was just the formating that was a little bit off. Do I have to close it? – xrogueleaderx Sep 02 '19 at 16:58
  • Leave it as it is and I can mark it as duplicate. You or the others can decide/vote to close it. Also check out the help center for general information: https://blender.stackexchange.com/help – brockmann Sep 02 '19 at 16:59
  • Hi. I see you originally had the code in the question instead of a link to a file with the code. It really is preferable to have the actual code in the question. I know you've solved the issue now, but having code in the question allows people in future to be able to look at your code and see if your question is the same as theirs and whether the solution might also apply to them. That OneDrive link may disappear at some point making a comparison difficult. – Ray Mairlot Sep 02 '19 at 17:19

0 Answers0