RenderData
Moderators: jesterKing, stiv
RenderData
Hi
I cant seem to use the RenderData class from the API. I'm new to python and blender. What I am trying to do is capture the camera rotation and output this info to a file.
Can anyone point me in the right direction?
TK
I cant seem to use the RenderData class from the API. I'm new to python and blender. What I am trying to do is capture the camera rotation and output this info to a file.
Can anyone point me in the right direction?
TK
Here's the deal:
Each scene has it's own data set it uses to render it. This data is wrapped in a RenderData structure (which is a python object). To get this rendering data context for a scene call
Each scene has it's own data set it uses to render it. This data is wrapped in a RenderData structure (which is a python object). To get this rendering data context for a scene call
Code: Select all
renderData = scene.getRenderingContext()
Code: Select all
renderData = scene.getRenderingContext()
I've been using other languages but python seems cool enough. I'm going to search for a document I need to learn how to import what I need from Blender. I'm trying this for now:
Code: Select all
import Blender
Code: Select all
scene = Blender.getCurrentScene()
Hopefully my hunt will succeed.
TK

it should be Blender.Scene.getCurrentScene()
http://www.paposo.com/pythonAPI233a/ = API documentation
http://www.elysiun.com/ = python scripting help
http://www.paposo.com/pythonAPI233a/ = API documentation
http://www.elysiun.com/ = python scripting help
Thanks again. I am a little confused because for me it seems that the follwoing works:ascotan wrote:it should be Blender.Scene.getCurrentScene()
Code: Select all
Blender.Scene.getCurrent()
Code: Select all
Blender.Scene.getCurrentScene()
Code: Select all
AttributeError: 'module' object has no attribute 'getCurrentScene'
Oh well thanks again for all the help.
TK
Okay this is getting me mad... tring to update a script for the newer blender but I cant get access to Render Module!!!
Error:
SyntaxError: invalid syntax
File "Text", line 3
from Blender import Scene.Render
Why I need to access it?
RuntimeError: Depricated:use RenderData.imageSizeX() and RenderData.imageSizeY
Also there may be a typo in the example with the two .. with Render..enableDispWin() but I wouldn'r know cause I cant run it
Code: Select all
import Blender
from Blender import Scene
from Blender import Scene.Render
scn = Scene.GetCurrent()
context = scn.getRenderingContext()
print dir(context)
SyntaxError: invalid syntax
File "Text", line 3
from Blender import Scene.Render
Why I need to access it?
RuntimeError: Depricated:use RenderData.imageSizeX() and RenderData.imageSizeY
Also there may be a typo in the example with the two .. with Render..enableDispWin() but I wouldn'r know cause I cant run it
It should read:
Code: Select all
from Blender.Scene import Render