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?
$\begingroup$
$\endgroup$
8
-
$\begingroup$ Oh, by the way, when you said it did not work, what did it do? Did it give you an error? $\endgroup$– krypticbitCommented Jul 19, 2016 at 21:18
-
$\begingroup$ yeah it gives me a error $\endgroup$– Alexander PaganCommented Jul 19, 2016 at 21:21
-
$\begingroup$ What is the error? $\endgroup$– krypticbitCommented Jul 19, 2016 at 21:22
-
$\begingroup$ the error says: "RuntimeError: Operator bpy.ops.view3d.virtual_reality_display.poll() failed context is incorrect" $\endgroup$– Alexander PaganCommented Jul 19, 2016 at 21:23
-
$\begingroup$ It sounds like you need to do something before you can run this. $\endgroup$– krypticbitCommented Jul 19, 2016 at 21:27
|
Show 3 more comments
1 Answer
$\begingroup$
$\endgroup$
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.