|
Hi Everyone
I’m just fustrated by selection and things like that. In Maya it seems so simple. It might be because in Maya MEL everything in connection with objects’ names and attributes are strings. In MotionBuilder Pyhton those are classes. As far as I understand if I want to for eg. delete an object first of all I have to know what its class is and whether there is a class function like delete. If there is no delete function I have to find the upper class which have the delete function.
So the question arisen whether are Global Functions in MotionBuilder (pyfbsdk) I mean independently from classes like ls (list) in Maya. Ok it might be stupid question. The help file doesn’t describe things like that at all.
So one current problem.
I’m searching the easiest way to get the selected objects’ names.
Thanks
|
|
|
|
Hi,
if you like Maya syntax, try pymobu library for Python - http://code.google.com/p/pymobu/
|
|
|
|
Thanks
It seems very interesting. I haven’t tried yet but I checked the link and the examples. Pymobu is very promising. Great effort! I hope 1.0 is coming soon :)
|
|
|
|
Hey man ..
I know its frustrating .. But i still lean to the traditional Mobu way of getting names or objects inside Mobu selected objects .. so..here..
from pyfbsdk import FBGetSelectedModels
# FBLlist instance
lModels = FBModelList()
# get the selected models in the scene
FBGetSelectedModels(lModels)
# get me my names ..
print[obj.Name for obj in lModels]
# or the more traditional way
for obj in lModels:
print obj.Name
# both should work ..:) ...let me know if that helps..Not Maya i know but you get used to it.:)
Cheers
Melvin3d
|
|
|
|
Thanks, it is useful.
I still have the feeling something wrong with the documentation MotionBuilder SDK Help. The FBGetSelectedModels function is a good example. If I try to find what this function does I have to go through a lot of search result pages find it at the end of doc File List / pyfbsdk.h.
I have to stress I would never found this function if somebody hadn’t told me that.
|
|
|