Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • $\begingroup$ Thanks CoDEmanX for your answer. I'm just trying to run this script using this filename = "D:/Blender/bb.py" then exec(compile(open(filename).read(), filename, 'exec')) but its giving an error. Like when I press enter to exec a very large window appears and its the first time for me to happen, I took a screen shot found here to explain what happens dropbox.com/s/rkwxwk8yrzvr21q/blender_Capture.PNG so when i press double enter this error appears "SyntaxError: multiple statements found while compiling a single statement" , so if you could please advise, many thanks CoDEmanX $\endgroup$ Commented Feb 20, 2014 at 14:17
  • $\begingroup$ Why don't you run it from Text Editor? Also, the filepath doesn't seem right, you need to use backslashes on windows (this is not a Blender path!), and they need to be either escaped, or the string be a raw string r"D:\Blender\..." $\endgroup$ Commented Feb 20, 2014 at 14:45
  • $\begingroup$ So what does it write to console? (Window > Toggle System Console on Windows) $\endgroup$ Commented Feb 20, 2014 at 15:01
  • $\begingroup$ thanks CoDEmanX, I solved it. I needed to modify the script to choose the object I want instead of using context.object, I used bpy.data.objects.get("Suzanne"). Many Thanks again CoDEmanX for your kind assistance and support $\endgroup$ Commented Feb 20, 2014 at 15:05
  • $\begingroup$ I've just run it and tested the results. For frame 1 which I've uploaded the image before "Image0001.jpg", the bounding_box result says (15 421 482 260) while when I check the pixel position (15,421) it gives a pixel which is far away from the object as shown in the picture found here dropbox.com/s/wlbnrl9oyoq4jtn/blender_Capture1.PNG . Do you know why this is happening? $\endgroup$ Commented Feb 20, 2014 at 15:18