Skip to content

Instantly share code, notes, and snippets.

@toshinoritakata
Created April 11, 2012 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toshinoritakata/2358663 to your computer and use it in GitHub Desktop.
Save toshinoritakata/2358663 to your computer and use it in GitHub Desktop.
mentalrayでMaxのシーン情報を取得
// 構造体を用意して
struct MaxSceneData {
miBoolean IsMtlEdit;
miColor AmbientLight;
miColor GlobalLightLevel;
miBoolean ForceDoubleSided;
miScalar GammaCorrection;
miScalar NearRange;
miScalar FarRange;
miScalar PhysicalScale;
miScalar PixelAspectRatio;
miTag ToneOpShader;
miColor backgroundColor;
miBoolean doingBakeToTexture;
miBoolean ToneOpInactive;
miScalar InternalToMeterScale;
miBoolean IsProtein;
miBoolean IsYUp;
miScalar BlurredReflectionMultiplier;
miScalar BlurredRefractionMultiplier;
miInteger AreaShadowSamples;
miBoolean clientManagesUVTransforms;
miInteger renderQuality;
};
// シェーダ内でこうやって取得する
const miOptions* options = state->options;
miTag userDataTag = options->userdata;
MaxSceneData *scenedata;
mi_query(miQ_DATA_PARAM, state, userDataTag, &scenedata);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment