How to get basic units setting?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 06/03/2003 at 11:30, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   7.303 
    Platform:   Windows  ;   
    Language(s) :     C++  ;

    ---------
    Hello,
    I have searched the archives and docs and can't find a function to retrieve the value of the Basic Units pref in R7's General Settings.
    Thanks,
    Jane



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 14/03/2003 at 13:52, xxxxxxxx wrote:

    Check out GetWorldContainer().



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 15/03/2003 at 16:14, xxxxxxxx wrote:

    Sorry, what is the id I am looking for in the BaseContainer? There is no description of what is in the world container.
    I know some other applications always return everything in meters, regardless of what the user has set the units at. Does C4D do something similar? What I'd like to do is scale a material according to the type of units.
    Thanks,
    Jane



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 15/03/2003 at 23:59, xxxxxxxx wrote:

    Sorry, I could have been more clear. Look at the LONG WPREF_UNIT_BASIC value. It corresponds directly to the 0-based index of the units in the general preference dialog.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/12/2008 at 13:05, xxxxxxxx wrote:

    fyi :

    This is
    WPREF_UNITS_BASIC



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 04/12/2008 at 13:36, xxxxxxxx wrote:

    BaseContainer wldContainer = GetWorldContainer();
                int unit = int( wldContainer.GetData(WPREF_UNITS_BASIC).GetLong() );



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 18/12/2008 at 20:09, xxxxxxxx wrote:

    LONG units;
    BaseContainer* worldContainer = GetWorldContainerInstance();
    if (worldContainer)
    {
    units = worldContainer->GetLong(WPREF_UNITS_BASIC);
    }

    Why the obfuscation? Conversion from LONG to int takes time as well as GetData().GetLong(). Of course, if you want to 'set' this setting, you should use GetWorldContainer() and SetWorldContainer() (refer to SDK documentation).


Log in to reply