0
$\begingroup$

I want to access the methods for the add-on of virtual reality viewpoint. How would i do this. I have previously did the hover over the ui, and take the code from there but it did not work. are there an suggestions on what i should do?

$\endgroup$
  • $\begingroup$ Oh, by the way, when you said it did not work, what did it do? Did it give you an error? $\endgroup$ – Billy S Jul 19 '16 at 21:18
  • $\begingroup$ yeah it gives me a error $\endgroup$ – Alexander Pagan Jul 19 '16 at 21:21
  • $\begingroup$ What is the error? $\endgroup$ – Billy S Jul 19 '16 at 21:22
  • $\begingroup$ the error says: "RuntimeError: Operator bpy.ops.view3d.virtual_reality_display.poll() failed context is incorrect" $\endgroup$ – Alexander Pagan Jul 19 '16 at 21:23
  • $\begingroup$ It sounds like you need to do something before you can run this. $\endgroup$ – Billy S Jul 19 '16 at 21:27
1
$\begingroup$

Ok, I found out what the problem is. I looked at the code for the virtual reality addon, and it wants a context argument for bpy.ops.view3d.virtual_reality_display.poll() Now unfortunately, I don't know what it wants for that argument, so you'll have to figure that out. Hope this helps!

UPDATE: context MIGHT be bpy.context, but I can't test it so I'm not sure.

|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.