Primitive Orientation

On 05/11/2013 at 13:29, xxxxxxxx wrote:

Is there a way to set the orientation of a primitive (plane)?  I know I can rotate it but I was hoping to set it to the +z axis instead.

I'm just starting in Python and have searched the documentation and am missing it if it's in there.  Any help or direction to documentation would be appreciated.

On 05/11/2013 at 14:47, xxxxxxxx wrote:

I was watching the Script Log and was able to use the following PRIM_AXIS information to achieve my goal but I would really like to know where this info can be found in the documentation so I can better understand what it is I'm doing rather than guessing.  Any pointers would be appreciated.  ty

obj = c4d.BaseObject(c4d.Oplane)

On 06/11/2013 at 08:29, xxxxxxxx wrote:


This subject has been discussed to death. So you might get lots of eye rolls or lack of help.
People tend to get burned out answering the same question over, and over, and over. Especially basic ones like this.
But when you're new. Even the basics are a mystery.

The brackets [] represent something in C4D called description IDs.
In C++ we use Get&Set Parameter() functions to do the same thing.

Inside of C4D objects. Many (But not all) attributes for the object are saved in containers (BaseContainer() in the python docs).
But sometimes there are attributes that are not stored in the BaseContainer.
These ones are "description" based attributes. And stored in a different kind of container called GeData.
When you use those brackets[]. You're getting data from that GeData type of container. Instead of a BaseContainer().

The Python API does not list GeData in it's docs. Because the person who wrote the python API created those [] brackets so you don't ever need to grab the GeData stuff. Like we have to do in C++.
So a Python user should focus on the word "description" when looking through the python docs.

In short.
Look through the forums for posts about descriptions and base containers. To learn more about them.


On 06/11/2013 at 09:53, xxxxxxxx wrote:

as scotta already said, gui data are presented in a form called 'ressources' by c4d. it is some 
sort of a meta language like xml. descriptions are a specific form of that resource language. 
ressources are those *.res, *.h and *.str files you do find in large numbers in the c4d folder. 
maxon expects you to use a text search engine on your c4d folder if you are looking for a 
special identifier.

if you feed the software agent ransack for example with PRIM_AXIS and some other parameters 
it will come up with something like that.

...\MAXON\Cinema 4D R14\resource\modules\objects\res\description\oprimitiveaxis.h	1,00 KB	08.11.2012 16:10:32
6		PRIM_AXIS									= 1300, // LONG	   - Direction [0:+X; 1:-X; 2:+Y; 3:-Y; 4:+Z; 5:-Z]
7			PRIM_AXIS_XP							= 0,
8			PRIM_AXIS_XN							= 1,
9			PRIM_AXIS_YP							= 2,
10			PRIM_AXIS_YN							= 3,
11			PRIM_AXIS_ZP							= 4,
12			PRIM_AXIS_ZN							= 5

On 07/11/2013 at 05:24, xxxxxxxx wrote:

Thanks for the help guys. After my post I found a bit more info on Cineversity.  While it showed how to get the syntax for these descriptions it didn't explain the bracket access concept.  Your info really clears up some confusion for me.