API getFilmFrustum

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 01 January 2008   #1
API getFilmFrustum

I want to use
MStatus MFnCamera:: getFilmFrustum ( double distance, double& hSize, double& vSize, double& hOffset, double& vOffset ) const in python but i cant fins an examples and it's not working.
# TypeError: in method 'MFnCamera_getFilmFrustum', argument 3 of type 'double &' //
Do i need to send pointers really?


MStatus MFnCamera:: getFilmFrustum ( double distance, MPointArray clipPlanes ) const
would do but i get errors here when trying to extract data from MPointArray.
Please help
__________________
www.lo-motion.de
Realflow forum: http://www.realflowforum.com

 
Old 01 January 2008   #2

MStatus MFnCamera:: getFilmFrustum ( double distance, double& hSize, double& vSize, double& hOffset, double& vOffset )


yes you do need pointers because you want to get the values and they have to be stored somewhere. to do this you send the addresses of the variables in which you wan't to store the values.

what errors do you get with the MPointArray? how do you read it?
 
Old 01 January 2008   #3
There are no pointers in python except for c_types. I tried those but little difference.

For the MPointArray
fnCamera.getFilmFrustum(f1, cam_clipPlanes)
cam_clipPlanPoint= OpenMaya.MPoint()
cam_clipPlanPoint=cam_clipPlanes[0] # this causes an error

Then i looked into MFnPointArrayData and MDataHandle but it's a bit of overdone for extracing 4 points from an array, or is this the way?
__________________
www.lo-motion.de
Realflow forum: http://www.realflowforum.com


Last edited by katisss : 01 January 2008 at 10:58 PM.
 
Old 01 January 2008   #4
I found in c++ that getViewingFrustum seems to be in worldspace and is closer to what i want.
But it is also unhappy with the datype of the arguments:
# TypeError: in method 'MFnCamera_getViewingFrustum', argument 3 of type 'double &' //
__________________
www.lo-motion.de
Realflow forum: http://www.realflowforum.com


Last edited by katisss : 01 January 2008 at 05:16 PM.
 
Old 01 January 2008   #5
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:12 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.