0
$\begingroup$

I have the most unusual and frustrating issue at the moment. I've got a script, but I just can't get it to run. I've tried live edit, not live edit, using the run script button with and without the register check box. I've even tried starting a new blend file and importing everything as a proper add-on. None of them work.

BUT, if for what ever reason, blender crashes, (which it is doing quite a lot at the moment... (I'm running the macOS Sierra beta which I probably shouldn't have done), then the script updates, and runs perfectly. It's just so impossible to use right now.

$\endgroup$
3
  • $\begingroup$ Can you post the script? $\endgroup$ Jul 17, 2016 at 6:44
  • $\begingroup$ Might need the macbook.blend file too. Slight note, when context is passed to a class method eg draw(self, context): use that ( obj = context.object) rather than obj = bpy.context.object. Without aforementioned file, my guess is that it's a lost reference. $\endgroup$
    – batFINGER
    Jul 17, 2016 at 7:32
  • $\begingroup$ @batFINGER Are you sure about the .blend file? I'm intending on selling this and I'd rather not redistribute the files. As for the other part, I don't quite understand, which parts are you referring to? $\endgroup$
    – mr-matt
    Jul 17, 2016 at 8:09

2 Answers 2

1
$\begingroup$

It sounds like you have a bug in your script. Run blender from the command line, and it will tell you what the error is there.

Update: I found that node in your code in the beginning of it, you have a several lines that say s_slots[0].material.node_tree.nodes['S_R_MS'].inputs[0].default_value = 0.0 I suspect that is where the S_R_MS node is.

$\endgroup$
6
  • $\begingroup$ Well we're getting somewhere now, it gives me this error: "Error, couldn't find thumbnail for Theatrical lighting" No idea what this could be, do you know? $\endgroup$
    – mr-matt
    Jul 17, 2016 at 19:16
  • $\begingroup$ Ok, I found it, it's an icon from the Pro Lighting Studio add-on. I was lucky enough to be a beta tester on that so I'm now thinking that something may have slipped through... $\endgroup$
    – mr-matt
    Jul 17, 2016 at 19:20
  • $\begingroup$ Ok, now I know somethings up. When I change the enum in the UI, it gives me an error saying the node 'S_R_MS' could not be found. That would be because I have since removed that node, but I have also removed that from the code and replaced it with something else, it doesn't seem to be updating... $\endgroup$
    – mr-matt
    Jul 17, 2016 at 19:36
  • $\begingroup$ Can you upload your .blend? (If you want to sell this, you might not want to upload it, but then I can't help you.) $\endgroup$
    – krypticbit
    Jul 17, 2016 at 19:37
  • $\begingroup$ On the account that you don't redistribute it! $\endgroup$
    – mr-matt
    Jul 17, 2016 at 19:37
0
$\begingroup$

I realised that it was really simple. The two lines at the bottom of the script were commented out:

if __name__ == "__main__":
    register()

Uncommenting them did the trick.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .