Mograph Cloner and Python
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 11:11, xxxxxxxx wrote:
What exactly is the method by which to invoke a mograph cloner object? I got the ID for it(Omograph_cloner) but when i try to init it(cloner = c4d.BaseObject(Omograph_cloner)) it gives me an error that :
AttributeError: 'module' object has no attribute 'Omograph_cloner'
seriously? c4d doesn't have a cloner? is there no support for mograph in Python c4d?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 11:24, xxxxxxxx wrote:
No that means your id is wrong.
Didn't I already Show you how to Search the c4d Module ?# Select a cloner Object import c4d id = op.GetType() for k in c4d.__dict__.keys() : if c4d.__ dict__[k] == id: print k
cheers,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 11:26, xxxxxxxx wrote:
Ill try this. thanks!
EDIT: hey nux, thanks for the quick response, but im not sure that code is correct/I'm not using it correctly. mostly, though, i dont see any reference to the mograph module in the SDK other than checking for it. is it a BaseObject? and if so, why is it that when i drag a cloner object into the console, it gives me "Omograph_cloner" as the ID name, if that is not correct ID?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 12:36, xxxxxxxx wrote:
Try this:
import c4d from c4d import gui def main() : cloner = c4d.BaseObject(1018544) doc.InsertObject(cloner) c4d.EventAdd() if __name__=='__main__': main()
With the coffee script log open.
Create something. And many times it will write out the CallCommand(ID number) for you.
In this case. I just plucked out the ID number and used it in the BaseObject() function.You can also just use c4d.CallCommand(1018544) if you prefer.
-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 12:39, xxxxxxxx wrote:
thanks! so there is no name for the cloner other than it's ID#? i actually got the ID through the script log by simply creating a cloner, but i wasn't sure that it was invoking the cloner or a function to create a cloner. anyway, ill keep this in my notes for the future! thanks again scott!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 13:26, xxxxxxxx wrote:
I've found that sometimes the string ID's don't work.
I'm not sure why. It might be because they haven't been set up yet.
So while it's better to use the text based ID's. Sometimes you have no other choice but to use the numeric ID's.-ScottA
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/06/2011 at 16:27, xxxxxxxx wrote:
cool, good to know!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 02:27, xxxxxxxx wrote:
@Scott: Yea,
This is especially the Case in Coffee, but in Python There must be a stringid !
i'll look it up when I'm at Home.
cheers, -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 10:25, xxxxxxxx wrote:
Nux, why MUST there ber a string id? the number ID seems to work just fine.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 10:32, xxxxxxxx wrote:
If you create a description for a TagData or ObjectData Plugin, the "NAME xxx;" Parameter defines inter alia the String id.I don't know if this is only for Python plugins, but I think this counts for every plugin.
(And everything in C4D *is* actually just a plugin) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 11:15, xxxxxxxx wrote:
ok, good to know in case i find the ID# not working for some reason.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 11:30, xxxxxxxx wrote:
Yea, but the argument of the NAME Parameter is actually the same as the description name. I.e. ocube.res -> "NAME Ocube;"
//edit:
Ok, I have to excuse me ! I was wrong with theese statements:Originally posted by xxxxxxxx
@Scott: Yea,
This is especially the Case in Coffee, but in Python There must be a stringid !
i'll look it up when I'm at Home.
cheers,Originally posted by xxxxxxxx
If you create a description for a TagData or ObjectData Plugin, the "NAME xxx;" Parameter defines inter alia the String id.I don't know if this is only for Python plugins, but I think this counts for every plugin.
I'm sorry.
And it really seem's like there is no string id for a clonerobject.- Niklas
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 14:46, xxxxxxxx wrote:
It's all good! i downloaded the coffee bible from scott's site and it has an entire list of all the objects with matching ID#s. super helpful for this kind of thing. just thought I'd throw it out there. thanks yet again scott!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 17:28, xxxxxxxx wrote:
Yes, there are some object IDs which are defined somewhere in the C++ API header file of the lib where the object belongs to. Therefore some of them are missing in Python because only a bunch of header files is parsed on startup.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/06/2011 at 22:28, xxxxxxxx wrote:
For those missing ID's a quick way to find them is to look at your 'interface_icons.txt' file. It's got all the string and Int Id's listed in one text file. It's in your /resource/icon/ folder. I keep a copy open in my project file for whatever I'm working on at the moment.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/06/2011 at 01:09, xxxxxxxx wrote:
Originally posted by xxxxxxxx
For those missing ID's a quick way to find them is to look at your 'interface_icons.txt' file. It's got all the string and Int Id's listed in one text file. It's in your /resource/icon/ folder. I keep a copy open in my project file for whatever I'm working on at the moment.
siiiiiiiiiick!