Programming and animation
Programming and animation ideas, articles, tutors, scripts, plugins in the 3d-
MoBu Snippets: Parent\Child constraint
Posted on 16 August 2009 Neill 21 commentsMotionBuilder, Programming OpenReality, Python, SDK, Snippets, Tips1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21// Create Parent/Child constraint
FBConstraintManager lConstraintManager;
HFBConstraint lConstraint = NULL;
int i, c = lConstraintManager.TypeGetCount();
for( i = 0; i < c; i++ )
{
if( strstr(lConstraintManager.TypeGetName(i), "Parent/Child") )
{
lConstraint = lConstraintManager.TypeCreateConstraint(i);
break;
}
}
if (lConstraint){
lConstraint->ReferenceAdd( 0, lChildModel ); // here you put your constrained model
lConstraint->ReferenceAdd( 1, lParentModel ); // here you put your source model
// Activate constraint
lConstraint->Active = true;
} -
How to: draw scene with camera background in a FBView
Posted on 12 August 2009 Neill No commentsThis is the forum question from Autodesk Area, so I will add it to the tips for OpenReality SDK:
You can operate with camera background by using property BackGroundColor.
So to get color at current frame:
FBColor color = lCamera.BackGroundColor;
Now we have to set clear color using OpenGL command:glClearColor( color[0], color[1], color[2], color[3] );
MotionBuilder, Programming C++, OpenGL, OpenReality, SDK, Tips -
How to: Change the width for the first column in the table
Posted on 10 August 2009 Neill No commentsOnce questioned, how to change the width for the first column in the table component of the FBSpread class. It appears that it’s need to identify by the column index -1, like this:
<spread>.GetColumn(-1).Width = <value>
MotionBuilder, Programming OpenReality, Python, SDK, Tips


English
Russian
Recent Comments