Exemplo n.º 1
0
static void rna_def_camera_stereo_data(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;

	static EnumPropertyItem convergence_mode_items[] = {
		{CAM_S3D_OFFAXIS, "OFFAXIS", 0, "Off-Axis", "Off-axis frustums converging in a plane"},
		{CAM_S3D_PARALLEL, "PARALLEL", 0, "Parallel", "Parallel cameras with no convergence"},
		{CAM_S3D_TOE, "TOE", 0, "Toe-in", "Rotated cameras, looking at the convergence distance"},
		{0, NULL, 0, NULL, NULL}
	};

	static EnumPropertyItem pivot_items[] = {
		{CAM_S3D_PIVOT_LEFT, "LEFT", 0, "Left", ""},
		{CAM_S3D_PIVOT_RIGHT, "RIGHT", 0, "Right", ""},
		{CAM_S3D_PIVOT_CENTER, "CENTER", 0, "Center", ""},
		{0, NULL, 0, NULL, NULL}
	};

	srna = RNA_def_struct(brna, "CameraStereoData", NULL);
	RNA_def_struct_sdna(srna, "CameraStereoSettings");
	RNA_def_struct_nested(brna, srna, "Camera");
	RNA_def_struct_ui_text(srna, "Stereo", "Stereoscopy settings for a Camera data-block");

	prop = RNA_def_property(srna, "convergence_mode", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_items(prop, convergence_mode_items);
	RNA_def_property_ui_text(prop, "Mode", "");
	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);

	prop = RNA_def_property(srna, "pivot", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_items(prop, pivot_items);
	RNA_def_property_ui_text(prop, "Pivot", "");
	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);

	prop = RNA_def_property(srna, "interocular_distance", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_range(prop, 0.0f, 100.0f);
	RNA_def_property_ui_range(prop, 0.0f, 1.f, 1, 2);
	RNA_def_property_ui_text(prop, "Interocular Distance",
	                         "Set the distance between the eyes - the stereo plane distance / 30 should be fine");
	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);

	prop = RNA_def_property(srna, "convergence_distance", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_range(prop, 0.00001f, FLT_MAX);
	RNA_def_property_ui_range(prop, 0.00001f, 15.f, 1, 2);
	RNA_def_property_ui_text(prop, "Convergence Plane Distance",
	                         "The converge point for the stereo cameras "
	                         "(often the distance between a projector and the projection screen)");
	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);

	prop = RNA_def_property(srna, "use_spherical_stereo", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "flag", CAM_S3D_SPHERICAL);
	RNA_def_property_ui_text(prop, "Spherical Stereo",
	                         "Render every pixel rotating the camera around the "
	                         "middle of the interocular distance");
	RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
}
Exemplo n.º 2
0
static void rna_def_world_mist(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;
	
	static EnumPropertyItem falloff_items[] = {
		{0, "QUADRATIC", 0, "Quadratic", "Use quadratic progression"},
		{1, "LINEAR", 0, "Linear", "Use linear progression"},
		{2, "INVERSE_QUADRATIC", 0, "Inverse Quadratic", "Use inverse quadratic progression"},
		{0, NULL, 0, NULL, NULL}
	};

	srna = RNA_def_struct(brna, "WorldMistSettings", NULL);
	RNA_def_struct_sdna(srna, "World");
	RNA_def_struct_nested(brna, srna, "World");
	RNA_def_struct_ui_text(srna, "World Mist", "Mist settings for a World data-block");

	prop = RNA_def_property(srna, "use_mist", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_MIST);
	RNA_def_property_ui_text(prop, "Use Mist", "Occlude objects with the environment color as they are further away");
	RNA_def_property_update(prop, 0, "rna_World_draw_update");

	prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "misi");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Minimum", "Overall minimum intensity of the mist effect");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "miststa");
	RNA_def_property_range(prop, 0, FLT_MAX);
	RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
	RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");

	prop = RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "mistdist");
	RNA_def_property_range(prop, 0, FLT_MAX);
	RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
	RNA_def_property_ui_text(prop, "Depth", "Distance over which the mist effect fades in");
	RNA_def_property_update(prop, 0, "rna_World_draw_mist_update");

	prop = RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "misthi");
	RNA_def_property_range(prop, 0, 100);
	RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height");
	RNA_def_property_update(prop, 0, "rna_World_update");
	
	prop = RNA_def_property(srna, "falloff", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "mistype");
	RNA_def_property_enum_items(prop, falloff_items);
	RNA_def_property_ui_text(prop, "Falloff", "Type of transition used to fade mist");
	RNA_def_property_update(prop, 0, "rna_World_update");
}
Exemplo n.º 3
0
static void rna_def_world_stars(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;

	srna= RNA_def_struct(brna, "WorldStarsSettings", NULL);
	RNA_def_struct_sdna(srna, "World");
	RNA_def_struct_nested(brna, srna, "World");
	RNA_def_struct_ui_text(srna, "World Stars", "Stars setting for a World data-block.");

	prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
	RNA_def_property_ui_text(prop, "Enabled", "Enable starfield generation.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "starsize");
	RNA_def_property_range(prop, 0, 10);
	RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "starmindist");
	RNA_def_property_range(prop, 0, 1000);
	RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "stardist");
	RNA_def_property_range(prop, 2, 1000);
	RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "color_randomization", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors.");
	RNA_def_property_update(prop, 0, "rna_World_update");
	
	/* unused
	prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
	RNA_def_property_float_sdna(prop, NULL, "starr");
	RNA_def_property_array(prop, 3);
	RNA_def_property_ui_text(prop, "Color", "Stars color.");
	RNA_def_property_update(prop, 0, "rna_World_update");*/
}
Exemplo n.º 4
0
static void rna_def_world_stars(BlenderRNA *brna)
{
    StructRNA *srna;
    PropertyRNA *prop;

    srna = RNA_def_struct(brna, "WorldStarsSettings", NULL);
    RNA_def_struct_sdna(srna, "World");
    RNA_def_struct_nested(brna, srna, "World");
    RNA_def_struct_ui_text(srna, "World Stars", "Stars settings for a World data-block");

    prop = RNA_def_property(srna, "use_stars", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_STARS);
    RNA_def_property_ui_text(prop, "Use Stars", "Enable starfield generation");
    RNA_def_property_update(prop, 0, "rna_World_stars_update");

    prop = RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
    RNA_def_property_float_sdna(prop, NULL, "starsize");
    RNA_def_property_range(prop, 0, 10);
    RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars");
    RNA_def_property_update(prop, 0, "rna_World_draw_update"); /* use normal update since this isn't visualized */

    prop = RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_DISTANCE);
    RNA_def_property_float_sdna(prop, NULL, "starmindist");
    RNA_def_property_range(prop, 0, 1000);
    RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars");
    RNA_def_property_update(prop, 0, "rna_World_stars_update");

    prop = RNA_def_property(srna, "average_separation", PROP_FLOAT, PROP_NONE);
    RNA_def_property_float_sdna(prop, NULL, "stardist");
    RNA_def_property_range(prop, 2, 1000);
    RNA_def_property_ui_text(prop, "Average Separation", "Average distance between any two stars");
    RNA_def_property_update(prop, 0, "rna_World_stars_update");

    prop = RNA_def_property(srna, "color_random", PROP_FLOAT, PROP_NONE);
    RNA_def_property_float_sdna(prop, NULL, "starcolnoise");
    RNA_def_property_range(prop, 0, 1);
    RNA_def_property_ui_text(prop, "Color Randomization", "Randomize star colors");
    RNA_def_property_update(prop, 0, "rna_World_stars_update");
}
Exemplo n.º 5
0
static void rna_def_lamp_sky_settings(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;

	static const EnumPropertyItem prop_skycolorspace_items[] = {
		{0, "SMPTE", 0, "SMPTE", ""},
		{1, "REC709", 0, "REC709", ""},
		{2, "CIE", 0, "CIE", ""},
		{0, NULL, 0, NULL, NULL}
	};
		
	srna = RNA_def_struct(brna, "LampSkySettings", NULL);
	RNA_def_struct_sdna(srna, "Lamp");
	RNA_def_struct_nested(brna, srna, "SunLamp");
	RNA_def_struct_ui_text(srna, "Lamp Sky Settings", "Sky related settings for a sun lamp");
		
	prop = RNA_def_property(srna, "sky_color_space", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "sky_colorspace");
	RNA_def_property_enum_items(prop, prop_skycolorspace_items);
	RNA_def_property_ui_text(prop, "Sky Color Space", "Color space to use for internal XYZ->RGB color conversion");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sky_blend_type", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "skyblendtype");
	RNA_def_property_enum_items(prop, rna_enum_ramp_blend_items);
	RNA_def_property_ui_text(prop, "Sky Blend Mode", "Blend mode for combining sun sky with world sky");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
	
	/* Number values */
	
	prop = RNA_def_property(srna, "horizon_brightness", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 20.0f);
	RNA_def_property_ui_text(prop, "Horizon Brightness", "Horizon brightness");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "spread", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 10.0f);
	RNA_def_property_ui_text(prop, "Horizon Spread", "Horizon Spread");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sun_brightness", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 10.0f);
	RNA_def_property_ui_text(prop, "Sun Brightness", "Sun brightness");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sun_size", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 10.0f);
	RNA_def_property_ui_text(prop, "Sun Size", "Sun size");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "backscattered_light", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, -1.0f, 1.0f);
	RNA_def_property_ui_text(prop, "Backscattered Light", "Backscattered light");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sun_intensity", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 10.0f);
	RNA_def_property_ui_text(prop, "Sun Intensity", "Sun intensity");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "atmosphere_turbidity", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "atm_turbidity");
	RNA_def_property_range(prop, 1.0f, 30.0f);
	RNA_def_property_ui_range(prop, 2.0f, 10.0f, 1, 2);
	RNA_def_property_ui_text(prop, "Atmosphere Turbidity", "Sky turbidity");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "atmosphere_inscattering", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "atm_inscattering_factor");
	RNA_def_property_range(prop, 0.0f, 1.0f);
	RNA_def_property_ui_text(prop, "Atmosphere Inscatter", "Scatter contribution factor");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "atmosphere_extinction", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "atm_extinction_factor");
	RNA_def_property_range(prop, 0.0f, 1.0f);
	RNA_def_property_ui_text(prop, "Atmosphere Extinction", "Extinction scattering contribution factor");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "atmosphere_distance_factor", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "atm_distance_factor");
	RNA_def_property_range(prop, 0.0f, 500.0f);
	RNA_def_property_ui_text(prop, "Atmosphere Distance Factor",
	                         "Multiplier to convert blender units to physical distance");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sky_blend", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "skyblendfac");
	RNA_def_property_range(prop, 0.0f, 2.0f);
	RNA_def_property_ui_text(prop, "Sky Blend", "Blend factor with sky");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "sky_exposure", PROP_FLOAT, PROP_NONE);
	RNA_def_property_range(prop, 0.0f, 20.0f);
	RNA_def_property_ui_text(prop, "Sky Exposure", "Strength of sky shading exponential exposure correction");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	/* boolean */
	
	prop = RNA_def_property(srna, "use_sky", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_SKY);
	RNA_def_property_ui_text(prop, "Sky", "Apply sun effect on sky");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");

	prop = RNA_def_property(srna, "use_atmosphere", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "sun_effect_type", LA_SUN_EFFECT_AP);
	RNA_def_property_ui_text(prop, "Atmosphere", "Apply sun effect on atmosphere");
	RNA_def_property_update(prop, 0, "rna_Lamp_sky_update");
}
Exemplo n.º 6
0
static void rna_def_ambient_occlusion(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;

	static EnumPropertyItem blend_mode_items[] = {
		{WO_AOADD, "ADD", 0, "Add", "Add light and shadow."},
		{WO_AOSUB, "SUBTRACT", 0, "Subtract", "Subtract light and shadow (needs a normal light to make anything visible.)"},
		{WO_AOADDSUB, "BOTH", 0, "Both", "Both lighten and darken."},
		{0, NULL, 0, NULL, NULL}};

	static EnumPropertyItem prop_color_items[] = {
		{WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
		{WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy."},
		{WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy."},
		{0, NULL, 0, NULL, NULL}};

	static EnumPropertyItem prop_sample_method_items[] = {
		{WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", ""},
		{WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas."},
		{WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality."},
		{0, NULL, 0, NULL, NULL}};

	static EnumPropertyItem prop_gather_method_items[] = {
		{WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required."},
		{WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise."},
		{0, NULL, 0, NULL, NULL}};

	srna= RNA_def_struct(brna, "WorldAmbientOcclusion", NULL);
	RNA_def_struct_sdna(srna, "World");
	RNA_def_struct_nested(brna, srna, "World");
	RNA_def_struct_ui_text(srna, "Ambient Occlusion", "Ambient occlusion settings for a World datablock.");

	prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
	RNA_def_property_ui_text(prop, "Enabled", "Use Ambient Occlusion to add light based on distance between elements, creating the illusion of omnipresent light");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "aodist");
	RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "aodistfac");
	RNA_def_property_ui_text(prop, "Strength", "Distance attenuation factor, the higher, the 'shorter' the shadows.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "energy", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "aoenergy");
	RNA_def_property_ui_range(prop, 0, 10, 0.1, 3);
	RNA_def_property_ui_text(prop, "Energy", "Amount of enerygy generated by ambient occlusion.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "aobias");
	RNA_def_property_range(prop, 0, 0.5);
	RNA_def_property_ui_text(prop, "Bias", "Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Threshold", "Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Adapt To Speed", "Use the speed vector pass to reduce AO samples in fast moving pixels. Higher values result in more aggressive sample reduction. Requires Vec pass enabled (for Raytrace Adaptive QMC).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "error_tolerance", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
	RNA_def_property_range(prop, 0.0001, 10);
	RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality (for Approximate).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
	RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation (for Approximate).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "falloff", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
	RNA_def_property_ui_text(prop, "Falloff", "");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "pixel_cache", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
	RNA_def_property_ui_text(prop, "Pixel Cache", "Cache AO results in pixels and interpolate over neighbouring pixels for speedup (for Approximate).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
	RNA_def_property_int_sdna(prop, NULL, "aosamp");
	RNA_def_property_range(prop, 1, 32);
	RNA_def_property_ui_text(prop, "Samples", "Amount of ray samples. Higher values give smoother results and longer rendering times");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "blend_mode", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "aomix");
	RNA_def_property_enum_items(prop, blend_mode_items);
	RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading.");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "color", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "aocolor");
	RNA_def_property_enum_items(prop, prop_color_items);
	RNA_def_property_ui_text(prop, "Color", "Defines the color of the AO light");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
	RNA_def_property_enum_items(prop, prop_sample_method_items);
	RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace).");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
	RNA_def_property_enum_items(prop, prop_gather_method_items);
	RNA_def_property_ui_text(prop, "Gather Method", "");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop= RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
	RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
	RNA_def_property_range(prop, 0, 10);
	RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce overocclusion (for Approximate).");
	RNA_def_property_update(prop, 0, "rna_World_update");
}
Exemplo n.º 7
0
static void rna_def_lighting(BlenderRNA *brna)
{
	StructRNA *srna;
	PropertyRNA *prop;

	static EnumPropertyItem blend_mode_items[] = {
		{WO_AOMUL, "MULTIPLY", 0, "Multiply", "Multiply direct lighting with ambient occlusion, darkening the result"},
		{WO_AOADD, "ADD", 0, "Add", "Add light and shadow"},
		{0, NULL, 0, NULL, NULL}
	};

	static EnumPropertyItem prop_color_items[] = {
		{WO_AOPLAIN, "PLAIN", 0, "White", "Plain diffuse energy (white.)"},
		{WO_AOSKYCOL, "SKY_COLOR", 0, "Sky Color", "Use horizon and zenith color for diffuse energy"},
		{WO_AOSKYTEX, "SKY_TEXTURE", 0, "Sky Texture", "Does full Sky texture render for diffuse energy"},
		{0, NULL, 0, NULL, NULL}
	};

	static EnumPropertyItem prop_sample_method_items[] = {
		{WO_AOSAMP_CONSTANT, "CONSTANT_JITTERED", 0, "Constant Jittered", "Fastest and gives the most noise"},
		{WO_AOSAMP_HALTON, "ADAPTIVE_QMC", 0, "Adaptive QMC", "Fast in high-contrast areas"},
		{WO_AOSAMP_HAMMERSLEY, "CONSTANT_QMC", 0, "Constant QMC", "Best quality"},
		{0, NULL, 0, NULL, NULL}
	};

	static EnumPropertyItem prop_gather_method_items[] = {
		{WO_AOGATHER_RAYTRACE, "RAYTRACE", 0, "Raytrace", "Accurate, but slow when noise-free results are required"},
		{WO_AOGATHER_APPROX, "APPROXIMATE", 0, "Approximate", "Inaccurate, but faster and without noise"},
		{0, NULL, 0, NULL, NULL}
	};

	srna = RNA_def_struct(brna, "WorldLighting", NULL);
	RNA_def_struct_sdna(srna, "World");
	RNA_def_struct_nested(brna, srna, "World");
	RNA_def_struct_ui_text(srna, "Lighting", "Lighting for a World datablock");

	/* ambient occlusion */
	prop = RNA_def_property(srna, "use_ambient_occlusion", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
	RNA_def_property_ui_text(prop, "Use Ambient Occlusion",
	                         "Use Ambient Occlusion to add shadowing based on distance between objects");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "ao_factor", PROP_FLOAT, PROP_FACTOR);
	RNA_def_property_float_sdna(prop, NULL, "aoenergy");
	RNA_def_property_range(prop, 0, INT_MAX);
	RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
	RNA_def_property_ui_text(prop, "Factor", "Factor for ambient occlusion blending");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "ao_blend_type", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "aomix");
	RNA_def_property_enum_items(prop, blend_mode_items);
	RNA_def_property_ui_text(prop, "Blend Mode", "Defines how AO mixes with material shading");
	RNA_def_property_update(prop, 0, "rna_World_update");

	/* environment lighting */
	prop = RNA_def_property(srna, "use_environment_light", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_ENV_LIGHT);
	RNA_def_property_ui_text(prop, "Use Environment Lighting", "Add light coming from the environment");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "environment_energy", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_env_energy");
	RNA_def_property_ui_range(prop, 0, FLT_MAX, 1, 3);
	RNA_def_property_ui_text(prop, "Environment Color", "Defines the strength of environment light");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "environment_color", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "aocolor");
	RNA_def_property_enum_items(prop, prop_color_items);
	RNA_def_property_ui_text(prop, "Environment Color", "Defines where the color of the environment light comes from");
	RNA_def_property_update(prop, 0, "rna_World_update");

	/* indirect lighting */
	prop = RNA_def_property(srna, "use_indirect_light", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_INDIRECT_LIGHT);
	RNA_def_property_ui_text(prop, "Use Indirect Lighting", "Add indirect light bouncing of surrounding objects");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "indirect_factor", PROP_FLOAT, PROP_FACTOR);
	RNA_def_property_float_sdna(prop, NULL, "ao_indirect_energy");
	RNA_def_property_range(prop, 0, INT_MAX);
	RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
	RNA_def_property_ui_text(prop, "Indirect Factor", "Factor for how much surrounding objects contribute to light");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "indirect_bounces", PROP_INT, PROP_UNSIGNED);
	RNA_def_property_int_sdna(prop, NULL, "ao_indirect_bounces");
	RNA_def_property_range(prop, 1, SHRT_MAX);
	RNA_def_property_ui_text(prop, "Bounces", "Number of indirect diffuse light bounces");
	RNA_def_property_update(prop, 0, "rna_World_update");

	/* gathering parameters */
	prop = RNA_def_property(srna, "gather_method", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "ao_gather_method");
	RNA_def_property_enum_items(prop, prop_gather_method_items);
	RNA_def_property_ui_text(prop, "Gather Method", "");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "passes", PROP_INT, PROP_NONE);
	RNA_def_property_int_sdna(prop, NULL, "ao_approx_passes");
	RNA_def_property_range(prop, 0, 10);
	RNA_def_property_ui_text(prop, "Passes", "Number of preprocessing passes to reduce over-occlusion");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
	RNA_def_property_float_sdna(prop, NULL, "aodist");
	RNA_def_property_ui_text(prop, "Distance",
	                         "Length of rays, defines how far away other faces give occlusion effect");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "falloff_strength", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "aodistfac");
	RNA_def_property_ui_text(prop, "Strength",
	                         "Attenuation falloff strength, the higher, the less influence distant objects have");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "bias", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "aobias");
	RNA_def_property_range(prop, 0, 0.5);
	RNA_def_property_ui_text(prop, "Bias",
	                         "Bias (in radians) to prevent smoothed faces from showing banding "
	                         "(for Raytrace Constant Jittered)");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_adapt_thresh");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Threshold",
	                         "Samples below this threshold will be considered fully shadowed/unshadowed and skipped "
	                         "(for Raytrace Adaptive QMC)");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "adapt_to_speed", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_adapt_speed_fac");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_text(prop, "Adapt To Speed",
	                         "Use the speed vector pass to reduce AO samples in fast moving pixels - "
	                         "higher values result in more aggressive sample reduction "
	                         "(requires Vec pass enabled, for Raytrace Adaptive QMC)");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "error_threshold", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_approx_error");
	RNA_def_property_range(prop, 0.0001, 10);
	RNA_def_property_ui_text(prop, "Error Tolerance", "Low values are slower and higher quality");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_NONE);
	RNA_def_property_float_sdna(prop, NULL, "ao_approx_correction");
	RNA_def_property_range(prop, 0, 1);
	RNA_def_property_ui_range(prop, 0, 1, 0.1, 2);
	RNA_def_property_ui_text(prop, "Correction", "Ad-hoc correction for over-occlusion due to the approximation");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "use_falloff", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AODIST);
	RNA_def_property_ui_text(prop, "Falloff", "Distance will be used to attenuate shadows");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "use_cache", PROP_BOOLEAN, PROP_NONE);
	RNA_def_property_boolean_sdna(prop, NULL, "aomode", WO_AOCACHE);
	RNA_def_property_ui_text(prop, "Pixel Cache",
	                         "Cache AO results in pixels and interpolate over neighboring pixels for speedup");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "samples", PROP_INT, PROP_NONE);
	RNA_def_property_int_sdna(prop, NULL, "aosamp");
	RNA_def_property_range(prop, 1, 128);
	RNA_def_property_ui_text(prop, "Samples",
	                         "Amount of ray samples. Higher values give smoother results and longer rendering times");
	RNA_def_property_update(prop, 0, "rna_World_update");

	prop = RNA_def_property(srna, "sample_method", PROP_ENUM, PROP_NONE);
	RNA_def_property_enum_sdna(prop, NULL, "ao_samp_method");
	RNA_def_property_enum_items(prop, prop_sample_method_items);
	RNA_def_property_ui_text(prop, "Sample Method", "Method for generating shadow samples (for Raytrace)");
	RNA_def_property_update(prop, 0, "rna_World_update");
}
Exemplo n.º 8
0
static void rna_def_animviz_paths(BlenderRNA *brna)
{
    StructRNA *srna;
    PropertyRNA *prop;

    static const EnumPropertyItem prop_type_items[]= {
        {MOTIONPATH_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Frame", "Display Paths of poses within a fixed number of frames around the current frame"},
        {MOTIONPATH_TYPE_RANGE, "RANGE", 0, "In Range", "Display Paths of poses within specified range"},
        {0, NULL, 0, NULL, NULL}
    };
    static const EnumPropertyItem prop_location_items[]= {
        {MOTIONPATH_BAKE_HEADS, "HEADS", 0, "Heads", "Calculate bone paths from heads"},
        {0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
        {0, NULL, 0, NULL, NULL}
    };

    srna= RNA_def_struct(brna, "AnimVizMotionPaths", NULL);
    RNA_def_struct_sdna(srna, "bAnimVizSettings");
    RNA_def_struct_nested(brna, srna, "AnimViz");
    RNA_def_struct_ui_text(srna, "Motion Path Settings", "Motion Path settings for animation visualisation");

    /* Enums */
    prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
    RNA_def_property_enum_sdna(prop, NULL, "path_type");
    RNA_def_property_enum_items(prop, prop_type_items);
    RNA_def_property_ui_text(prop, "Paths Type", "Type of range to show for Motion Paths");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "bake_location", PROP_ENUM, PROP_NONE);
    RNA_def_property_enum_bitflag_sdna(prop, NULL, "path_bakeflag");
    RNA_def_property_enum_items(prop, prop_location_items);
    RNA_def_property_ui_text(prop, "Bake Location", "When calculating Bone Paths, use Head or Tips");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    /* Settings */
    prop= RNA_def_property(srna, "show_frame_numbers", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_FNUMS);
    RNA_def_property_ui_text(prop, "Show Frame Numbers", "Show frame numbers on Motion Paths");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "show_keyframe_highlight", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFRAS);
    RNA_def_property_ui_text(prop, "Highlight Keyframes", "Emphasize position of keyframes on Motion Paths");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "show_keyframe_numbers", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFNOS);
    RNA_def_property_ui_text(prop, "Show Keyframe Numbers", "Show frame numbers of Keyframes on Motion Paths");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "show_keyframe_action_all", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "path_viewflag", MOTIONPATH_VIEW_KFACT);
    RNA_def_property_ui_text(prop, "All Action Keyframes", "For bone motion paths, search whole Action for keyframes instead of in group with matching name only (is slower)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
    RNA_def_property_int_sdna(prop, NULL, "path_step");
    RNA_def_property_range(prop, 1, 100);
    RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between paths shown (not for 'On Keyframes' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */


    /* Playback Ranges */
    prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "path_sf");
    RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_start_frame_set", NULL);
    RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "path_ef");
    RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_path_end_frame_set", NULL);
    RNA_def_property_ui_text(prop, "End Frame", "End frame of range of paths to display/calculate (not for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    /* Around Current Ranges */
    prop= RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "path_bc");
    RNA_def_property_range(prop, 1, MAXFRAMEF/2);
    RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "path_ac");
    RNA_def_property_range(prop, 1, MAXFRAMEF/2);
    RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
}
Exemplo n.º 9
0
static void rna_def_animviz_ghosts(BlenderRNA *brna)
{
    StructRNA *srna;
    PropertyRNA *prop;

    static const EnumPropertyItem prop_type_items[] = {
        {GHOST_TYPE_NONE, "NONE", 0, "No Ghosts", "Do not show any ghosts"},
        {GHOST_TYPE_ACFRA, "CURRENT_FRAME", 0, "Around Current Frame", "Show ghosts from around the current frame"},
        {GHOST_TYPE_RANGE, "RANGE", 0, "In Range", "Show ghosts for the specified frame range"},
        {GHOST_TYPE_KEYS, "KEYS", 0, "On Keyframes", "Show ghosts on keyframes"},
        {0, NULL, 0, NULL, NULL}
    };


    srna= RNA_def_struct(brna, "AnimVizOnionSkinning", NULL);
    RNA_def_struct_sdna(srna, "bAnimVizSettings");
    RNA_def_struct_nested(brna, srna, "AnimViz");
    RNA_def_struct_ui_text(srna, "Onion Skinning Settings", "Onion Skinning settings for animation visualisation");

    /* Enums */
    prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
    RNA_def_property_enum_sdna(prop, NULL, "ghost_type");
    RNA_def_property_enum_items(prop, prop_type_items);
    RNA_def_property_ui_text(prop, "Type", "Method used for determining what ghosts get drawn");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    /* Settings */
    prop= RNA_def_property(srna, "show_only_selected", PROP_BOOLEAN, PROP_NONE);
    RNA_def_property_boolean_sdna(prop, NULL, "ghost_flag", GHOST_FLAG_ONLYSEL);
    RNA_def_property_ui_text(prop, "On Selected Bones Only", "For Pose-Mode drawing, only draw ghosts for selected bones");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
    RNA_def_property_int_sdna(prop, NULL, "ghost_step");
    RNA_def_property_range(prop, 1, 20);
    RNA_def_property_ui_text(prop, "Frame Step", "Number of frames between ghosts shown (not for 'On Keyframes' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    /* Playback Ranges */
    prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "ghost_sf");
    RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_start_frame_set", NULL);
    RNA_def_property_ui_text(prop, "Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "ghost_ef");
    RNA_def_property_int_funcs(prop, NULL, "rna_AnimViz_ghost_end_frame_set", NULL);
    RNA_def_property_ui_text(prop, "End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    /* Around Current Ranges */
    prop= RNA_def_property(srna, "frame_before", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "ghost_bc");
    RNA_def_property_range(prop, 0, 30);
    RNA_def_property_ui_text(prop, "Before Current", "Number of frames to show before the current frame (only for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */

    prop= RNA_def_property(srna, "frame_after", PROP_INT, PROP_TIME);
    RNA_def_property_int_sdna(prop, NULL, "ghost_ac");
    RNA_def_property_range(prop, 0, 30);
    RNA_def_property_ui_text(prop, "After Current", "Number of frames to show after the current frame (only for 'Around Current Frame' Onion-skinning method)");
    RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL); /* XXX since this is only for 3d-view drawing */
}