On 11/12/2017 at 12:27, xxxxxxxx wrote:
Cinema 4D Version: R18
Platform: Windows ;
Language(s) : C++ ; PYTHON ;
Nice to meet you.
I bought R18 Studio.
Things that can not be solved even after examination have increased.
Please let me ask a few questions.
Although it may be rudimentary, it is very difficult to solve it because English reading and writing can not be done at all.
1. C4D standard layout change selector not,
tab = FindTabPaletteName ("PaintLayer")
tab = FindTabPaletteName ("ContentBrowser")
tab = FindTabPaletteName ("TextureLayerPalette")
Please tell me how to implement this example.
The standard layout change selector is slow to respond and it is very difficult to change the UI for every layout.
2. Please tell me the ID of the command which can not be found in the command customization by mode conversion of attribute manager. I want to make a switch button.
Project setting (ID: 12373)
Project information (ID: 14011)
View setting (ID: ?????)
3. How do I access general settings?
???[c4d.PREF_RENDERER_THREADCUSTOM] = 7
4. Is there a way to access the screen display history?
Bitmap bmp = GetActivePictureViewWindow () -> GetActiveHistoryItem ();
I want to do something like this.
5. How can I rotate the object visible from the camera's position in the same direction as the camera's axis?
BaseDraw * rbd = doc-> GetRenderBaseDraw ();
BaseObject * camera = rbd -> GetSceneCamera (doc);
Matrix mCamera = camera -> GetMg ();
Vector vCameraHPB = MatrixToHPB (mCamera, ROTATIONORDER_HPB);
Matrix mCameraProjection = HPBToMatrix (vCameraHPB, ROTATIONORDER_HPB);
BaseObject * obj = doc-> GetActiveObject ();
Matrix mObj = obj -> GetMg ();
Vector vXaxis = Vector (1, 0, 0);
vXaxis = mCameraProjection * vXaxis;
Matrix mRotateObj = RotAxisToMatrix (vXaxis, Rad (0.1));
mObj = mObj * mRotateObj;
obj -> SetMg (mObj);
Wherever the position of the camera is, the object will rotate vertically.
This code is successful.
However, after moving the camera, the axis of rotation is shifted for some reason.
When examined by debugging, vXaxis correctly creates the X axis from the position of the camera, but the actual result is rotated by using the X axis of the camera position which existed at the time of first creating the object I will excuse you. Why is this?