Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / Changing the scenes camera FrameSizeMode with python
  RSS 2.0 ATOM  

Changing the scenes camera FrameSizeMode with python
Rate this thread
 
36992
 
Permlink of this thread  
avatar
  • Total Posts: 1
  • Joined: 25 June 2008 09:18 PM

Hi, I am just trying to get a script to run through the scene and change a few camera settings. I have based it on a old 2009 script and have got most of the properties I want to change to work. The one area I am having problems changing is FrameSizeMode to change it to “Fixed Resolution”.

from pyfbsdk import FBSystemFBColor

# We simply iterate thru all the cameras in the system

for lCamera in FBSystem().Scene.Cameras:
    
lCamera.FrameSizeMode.kFBFrameSizeFixedResolution 
    lCamera
.ResolutionHeight 480.0
    lCamera
.ResolutionWidth 854.0

# Cleanup everything.
del( lCamera )
del( FBSystem
FBColor )

I have tryed using as you can see “lCamera.FrameSizeMode.kFBFrameSizeFixedResolution”. I am I using it right? Is this the way to go? I don’t get any warnings but nothing is happening either.

Cheers



Replies: 1
/img/forum/dark/default_avatar.png

Hi, I’m having the same problem - I have been using this and it just won’t change to Fixed Resolution :

RenderSystem = FBSystem()
RenderCam = RenderSystem.Renderer.CurrentCamera
RenderCam.FrameSizeMode.kFBFrameSizeFixedResolution
RenderCam.ResolutionWidth = 1280
RenderCam.ResolutionHeight = 720
RenderCam.PixelAspectRatio = 1

Did I do something wrong or is this just not working as it should? Has anybody found a solution or a workaround to this?

THX

Author: Crammit

Replied: 14 December 2011 03:51 AM  
avatar
  • NightWing
  • Posted: 19 December 2011 02:57 PM

use following code:

lCamera.FrameSizeMode = FBCameraFrameSizeMode.kFBFrameSizeFixedResolution



Replies: 1
/img/forum/dark/default_avatar.png

Hi NightWing - thanks a lot for your help! :)

Author: Crammit

Replied: 29 December 2011 10:34 PM