Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Project World Axis

    Cinema 4D SDK
    c++ r20
    4
    7
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rsodreR
      rsodre
      last edited by rsodre

      Hey!

      I have a user with an odd problem that I tracked down to his project's World Axis. It's a project imported from ZBrush, the world axis plane is upwards, Z is up. If I select an object and switch from Object to World coordinate system, I can see the object's axis switching too.

      Because of that project coordinate system, some of my plugin outputs are rotated 90 degrees, so I need to take that setting in consideration. But I can't find anywhere in Cinema 4D how to change (so I can query) the project's coordinate system.
      Where is it, please?

      Roger

      1 Reply Last reply Reply Quote 0
      • CairynC
        Cairyn
        last edited by

        If I would take a guess, there is a Workplane active. That is the only way I know that can change the apparent directionality of the world coordinate system. Align the workplane to Y to reset it to the normal world.

        To take the Workplane into account with any of your plugins, use GetWorkplaneMatrix() to get the needed transformation.

        1 Reply Last reply Reply Quote 0
        • r_giganteR
          r_gigante
          last edited by

          Hi @rsodre, thanks for reaching out us.

          In order to avoid doing too much speculative work on understanding the issue, can you please make a short video showing it and share the scene in order to replicate it here?

          Thanks, Riccardo

          rsodreR 1 Reply Last reply Reply Quote 0
          • rsodreR
            rsodre @r_gigante
            last edited by

            @r_gigante Sure! I'm not sure anymore if the scene is flipped or the object.

            Here's one screenshot with the object selected in Object Coordinate System, and then on World. The move axis is inverted.

            Screen Shot 2019-06-11 at 13.02.56.png

            Screen Shot 2019-06-11 at 13.03.02.png

            Please note on the project...

            • There's two world grids, lighter and darker, each one on one axis. Of course I can rotate the viewport to get the grid straight, but then the rotating the viewport feels strange, as it was really inverted.
            • If I add a new object, it does not have a different Object and World axis, like the Body object

            WorldAxisZ.c4d

            1 Reply Last reply Reply Quote 0
            • M
              mp5gosu
              last edited by mp5gosu

              Like @Cairyn said, it's the workplane.

              How do you import the ZBrush project?

              rsodreR 1 Reply Last reply Reply Quote 0
              • rsodreR
                rsodre @mp5gosu
                last edited by

                Ok, I get it. The project has a different workplane...
                I've never seen a mention of it on the docs.

                My actual problem is drawing and picking/dragging handles.
                If I rotate the workplane, the handles rotate with it.
                I'll try to work on a solution with GetWorkplaneMatrix().

                Thanks @Cairyn

                rsodreR 1 Reply Last reply Reply Quote 0
                • rsodreR
                  rsodre @rsodre
                  last edited by

                  I found my problem.
                  When the workplane is transformed, any new object will be created with it's matrix.
                  Since I'm using handles on a modifier, and was using the generator's matrix do draw (I don't need the modifier transform), the handles was being drawn with the added workplane transform.

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post