Programming and animation ideas, articles, tutors, scripts, plugins in the 3d
Hello to all !
I’m an active MotionBuilder, optical mocap user
I work on realtime characters for tv stations
I have a question about python in MB. Specifically FBComponent class. I get a bit confused when methods of other classes request FBComponent arg. For instance, I am writing a small utility that creates story clips based on selected mesh models in the scene. All based on namespace tracking per character, so when you select a single or multiple characters in the scene and run the tool, few things happen. Tracks get created per selection, meaning if I have 3 characters selected all their animated FBModelSkeleton objects get dumped in to a new track, FBStoryClip is created and the clip gets saved out onto a HD. Now what I am having a problem with is to bring the clip back in “ReadOnly” way. The same as RMC > Insert animation file.
I get stuck on the FBStoryTrack().AddClip() method that requires FBComponent and FBTime, assuming your first arg is FBStoryTrack as your object instance to begin with.
Can you explain to me what the FBComponent means in this case ? I am confused about that.
Thanks very much for your help.
If you know a concept of object-oriented programming, FBComponent class is a base class which all other scene elements inherit. FBComponent exposes common functionality, like properties for example. Have a look please at the documentation page about that – http://docs.autodesk.com/MB/2015/ENU/MotionBuilder-Developer-Help/index.html#!/url=./py_ref/class_o_r_s_d_k2015_1_1_f_b_component.html
That’s why AddClip method uses FBComponent as an argument, because clip can use not only a model, it can be a sound, video, texture, etc… one of the scene element, but each of that element comes from FBComponent class.
P.S. just curious, why did you post a question in comments, but not in google group forum ? Is it not convient to use or some other reason ?
P.P.S.S. thank you for feedback )
Thanks very much for your swift response. To answer your question, yes I realized later one I accidentally
post the question in a wrong section. My bad.. Sorry !
I am a working progress as far as OOP goes. To me it sounds very inaccurate when you say pass FBComponent type of object because it could be any of the subclasses of FBComponent class.
But I see what you’re saying.. I am checking out the link you sent me. Much appreciate your feedback.
PS: That would also explain why FBStoryClip.__init__() takes the type of args it does. :)… FBComponent()
also included due to the type of clips you can create. Okay ..
Thanks Neill !!
Have a good one.
Привет! Скажите пожалуйста, в чем причина не могу прочитать последние добавленые посты!?, при преходе по ссылки появляеться окошко в котором ошибка “401” уже как целый день эта проблема…
Your email address will not be published. Required fields are marked *