
/* Automatically generated struct definitions for the Data API.
 * Do not edit manually, changes will be overwritten.           */

#define RNA_RUNTIME

#include <float.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>

#include <stddef.h>

#include "MEM_guardedalloc.h"

#include "DNA_ID.h"
#include "DNA_scene_types.h"
#include "BLI_blenlib.h"

#include "BLI_utildefines.h"

#include "BKE_context.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_report.h"
#include "RNA_define.h"
#include "RNA_types.h"
#include "rna_internal.h"

#include "rna_prototypes_gen.h"

#include "rna_world.c"

/* Autogenerated Functions */


extern CollectionPropertyRNA rna_ID_rna_properties;
extern PointerPropertyRNA rna_ID_rna_type;
extern StringPropertyRNA rna_ID_name;
extern IntPropertyRNA rna_ID_users;
extern BoolPropertyRNA rna_ID_use_fake_user;
extern BoolPropertyRNA rna_ID_tag;
extern BoolPropertyRNA rna_ID_is_updated;
extern BoolPropertyRNA rna_ID_is_updated_data;
extern BoolPropertyRNA rna_ID_is_library_indirect;
extern PointerPropertyRNA rna_ID_library;
extern PointerPropertyRNA rna_ID_preview;

PointerPropertyRNA rna_World_animation_data;
CollectionPropertyRNA rna_World_texture_slots;
PointerPropertyRNA rna_World_active_texture;
IntPropertyRNA rna_World_active_texture_index;
FloatPropertyRNA rna_World_horizon_color;
FloatPropertyRNA rna_World_zenith_color;
FloatPropertyRNA rna_World_ambient_color;
FloatPropertyRNA rna_World_exposure;
FloatPropertyRNA rna_World_color_range;
BoolPropertyRNA rna_World_use_sky_blend;
BoolPropertyRNA rna_World_use_sky_paper;
BoolPropertyRNA rna_World_use_sky_real;
PointerPropertyRNA rna_World_light_settings;
PointerPropertyRNA rna_World_mist_settings;
PointerPropertyRNA rna_World_node_tree;
BoolPropertyRNA rna_World_use_nodes;

extern FunctionRNA rna_ID_copy_func;
extern PointerPropertyRNA rna_ID_copy_id;

extern FunctionRNA rna_ID_user_clear_func;
extern FunctionRNA rna_ID_user_remap_func;
extern PointerPropertyRNA rna_ID_user_remap_new_id;

extern FunctionRNA rna_ID_make_local_func;
extern BoolPropertyRNA rna_ID_make_local_clear_proxy;
extern PointerPropertyRNA rna_ID_make_local_id;

extern FunctionRNA rna_ID_user_of_id_func;
extern PointerPropertyRNA rna_ID_user_of_id_id;
extern IntPropertyRNA rna_ID_user_of_id_count;

extern FunctionRNA rna_ID_animation_data_create_func;
extern PointerPropertyRNA rna_ID_animation_data_create_anim_data;

extern FunctionRNA rna_ID_animation_data_clear_func;
extern FunctionRNA rna_ID_update_tag_func;
extern EnumPropertyRNA rna_ID_update_tag_refresh;



CollectionPropertyRNA rna_WorldTextureSlots_rna_properties;
PointerPropertyRNA rna_WorldTextureSlots_rna_type;

extern FunctionRNA rna_WorldTextureSlots_add_func;
extern PointerPropertyRNA rna_WorldTextureSlots_add_mtex;

extern FunctionRNA rna_WorldTextureSlots_create_func;
extern IntPropertyRNA rna_WorldTextureSlots_create_index;
extern PointerPropertyRNA rna_WorldTextureSlots_create_mtex;

extern FunctionRNA rna_WorldTextureSlots_clear_func;
extern IntPropertyRNA rna_WorldTextureSlots_clear_index;



CollectionPropertyRNA rna_WorldLighting_rna_properties;
PointerPropertyRNA rna_WorldLighting_rna_type;
BoolPropertyRNA rna_WorldLighting_use_ambient_occlusion;
FloatPropertyRNA rna_WorldLighting_ao_factor;
EnumPropertyRNA rna_WorldLighting_ao_blend_type;
BoolPropertyRNA rna_WorldLighting_use_environment_light;
FloatPropertyRNA rna_WorldLighting_environment_energy;
EnumPropertyRNA rna_WorldLighting_environment_color;
BoolPropertyRNA rna_WorldLighting_use_indirect_light;
FloatPropertyRNA rna_WorldLighting_indirect_factor;
IntPropertyRNA rna_WorldLighting_indirect_bounces;
EnumPropertyRNA rna_WorldLighting_gather_method;
IntPropertyRNA rna_WorldLighting_passes;
FloatPropertyRNA rna_WorldLighting_distance;
FloatPropertyRNA rna_WorldLighting_falloff_strength;
FloatPropertyRNA rna_WorldLighting_bias;
FloatPropertyRNA rna_WorldLighting_threshold;
FloatPropertyRNA rna_WorldLighting_adapt_to_speed;
FloatPropertyRNA rna_WorldLighting_error_threshold;
FloatPropertyRNA rna_WorldLighting_correction;
BoolPropertyRNA rna_WorldLighting_use_falloff;
BoolPropertyRNA rna_WorldLighting_use_cache;
IntPropertyRNA rna_WorldLighting_samples;
EnumPropertyRNA rna_WorldLighting_sample_method;


CollectionPropertyRNA rna_WorldMistSettings_rna_properties;
PointerPropertyRNA rna_WorldMistSettings_rna_type;
BoolPropertyRNA rna_WorldMistSettings_use_mist;
FloatPropertyRNA rna_WorldMistSettings_intensity;
FloatPropertyRNA rna_WorldMistSettings_start;
FloatPropertyRNA rna_WorldMistSettings_depth;
FloatPropertyRNA rna_WorldMistSettings_height;
EnumPropertyRNA rna_WorldMistSettings_falloff;


extern CollectionPropertyRNA rna_TextureSlot_rna_properties;
extern PointerPropertyRNA rna_TextureSlot_rna_type;
extern PointerPropertyRNA rna_TextureSlot_texture;
extern StringPropertyRNA rna_TextureSlot_name;
extern FloatPropertyRNA rna_TextureSlot_offset;
extern FloatPropertyRNA rna_TextureSlot_scale;
extern FloatPropertyRNA rna_TextureSlot_color;
extern EnumPropertyRNA rna_TextureSlot_blend_type;
extern BoolPropertyRNA rna_TextureSlot_use_stencil;
extern BoolPropertyRNA rna_TextureSlot_invert;
extern BoolPropertyRNA rna_TextureSlot_use_rgb_to_intensity;
extern FloatPropertyRNA rna_TextureSlot_default_value;
extern EnumPropertyRNA rna_TextureSlot_output_node;

BoolPropertyRNA rna_WorldTextureSlot_use_map_blend;
BoolPropertyRNA rna_WorldTextureSlot_use_map_horizon;
BoolPropertyRNA rna_WorldTextureSlot_use_map_zenith_up;
BoolPropertyRNA rna_WorldTextureSlot_use_map_zenith_down;
EnumPropertyRNA rna_WorldTextureSlot_texture_coords;
PointerPropertyRNA rna_WorldTextureSlot_object;
FloatPropertyRNA rna_WorldTextureSlot_blend_factor;
FloatPropertyRNA rna_WorldTextureSlot_horizon_factor;
FloatPropertyRNA rna_WorldTextureSlot_zenith_up_factor;
FloatPropertyRNA rna_WorldTextureSlot_zenith_down_factor;

PointerRNA World_animation_data_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_AnimData, data->adt);
}

static PointerRNA World_texture_slots_get(CollectionPropertyIterator *iter)
{
	return rna_pointer_inherit_refine(&iter->parent, &RNA_WorldTextureSlot, rna_iterator_array_dereference_get(iter));
}

void World_texture_slots_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_World_texture_slots;

	rna_World_mtex_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = World_texture_slots_get(iter);
}

void World_texture_slots_next(CollectionPropertyIterator *iter)
{
	rna_iterator_array_next(iter);

	if (iter->valid)
		iter->ptr = World_texture_slots_get(iter);
}

void World_texture_slots_end(CollectionPropertyIterator *iter)
{
	rna_iterator_array_end(iter);
}

PointerRNA World_active_texture_get(PointerRNA *ptr)
{
	return rna_World_active_texture_get(ptr);
}

void World_active_texture_set(PointerRNA *ptr, PointerRNA value)
{
	rna_World_active_texture_set(ptr, value);
}

int World_active_texture_index_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->texact);
}

void World_active_texture_index_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->texact = CLAMPIS(value, 0, 17);
}

void World_horizon_color_get(PointerRNA *ptr, float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		values[i] = (float)((&data->horr)[i]);
	}
}

void World_horizon_color_set(PointerRNA *ptr, const float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		(&data->horr)[i] = CLAMPIS(values[i], 0.0f, FLT_MAX);
	}
}

void World_zenith_color_get(PointerRNA *ptr, float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		values[i] = (float)((&data->zenr)[i]);
	}
}

void World_zenith_color_set(PointerRNA *ptr, const float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		(&data->zenr)[i] = CLAMPIS(values[i], 0.0f, FLT_MAX);
	}
}

void World_ambient_color_get(PointerRNA *ptr, float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		values[i] = (float)((&data->ambr)[i]);
	}
}

void World_ambient_color_set(PointerRNA *ptr, const float values[3])
{
	World *data = (World *)(ptr->data);
	unsigned int i;

	for (i = 0; i < 3; i++) {
		(&data->ambr)[i] = CLAMPIS(values[i], 0.0f, FLT_MAX);
	}
}

float World_exposure_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->exp);
}

void World_exposure_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->exp = CLAMPIS(value, 0.0f, 1.0f);
}

float World_color_range_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->range);
}

void World_color_range_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->range = CLAMPIS(value, 0.2000000030f, 5.0f);
}

int World_use_sky_blend_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->skytype) & 1) != 0);
}

void World_use_sky_blend_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->skytype |= 1;
	else data->skytype &= ~1;
}

int World_use_sky_paper_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->skytype) & 4) != 0);
}

void World_use_sky_paper_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->skytype |= 4;
	else data->skytype &= ~4;
}

int World_use_sky_real_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->skytype) & 2) != 0);
}

void World_use_sky_real_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->skytype |= 2;
	else data->skytype &= ~2;
}

PointerRNA World_light_settings_get(PointerRNA *ptr)
{
	return rna_World_lighting_get(ptr);
}

PointerRNA World_mist_settings_get(PointerRNA *ptr)
{
	return rna_World_mist_get(ptr);
}

PointerRNA World_node_tree_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_NodeTree, data->nodetree);
}

int World_use_nodes_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->use_nodes) & 1) != 0);
}

void World_use_nodes_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->use_nodes |= 1;
	else data->use_nodes &= ~1;
}

static PointerRNA WorldTextureSlots_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void WorldTextureSlots_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_WorldTextureSlots_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = WorldTextureSlots_rna_properties_get(iter);
}

void WorldTextureSlots_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = WorldTextureSlots_rna_properties_get(iter);
}

void WorldTextureSlots_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int WorldTextureSlots_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA WorldTextureSlots_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

static PointerRNA WorldLighting_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void WorldLighting_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_WorldLighting_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = WorldLighting_rna_properties_get(iter);
}

void WorldLighting_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = WorldLighting_rna_properties_get(iter);
}

void WorldLighting_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int WorldLighting_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA WorldLighting_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

int WorldLighting_use_ambient_occlusion_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->mode) & 64) != 0);
}

void WorldLighting_use_ambient_occlusion_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->mode |= 64;
	else data->mode &= ~64;
}

float WorldLighting_ao_factor_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->aoenergy);
}

void WorldLighting_ao_factor_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->aoenergy = CLAMPIS(value, 0.0f, 2147483648.0f);
}

int WorldLighting_ao_blend_type_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->aomix);
}

void WorldLighting_ao_blend_type_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->aomix = value;
}

int WorldLighting_use_environment_light_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->mode) & 16) != 0);
}

void WorldLighting_use_environment_light_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->mode |= 16;
	else data->mode &= ~16;
}

float WorldLighting_environment_energy_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_env_energy);
}

void WorldLighting_environment_energy_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_env_energy = value;
}

int WorldLighting_environment_color_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->aocolor);
}

void WorldLighting_environment_color_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->aocolor = value;
}

int WorldLighting_use_indirect_light_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->mode) & 128) != 0);
}

void WorldLighting_use_indirect_light_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->mode |= 128;
	else data->mode &= ~128;
}

float WorldLighting_indirect_factor_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_indirect_energy);
}

void WorldLighting_indirect_factor_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_indirect_energy = CLAMPIS(value, 0.0f, 2147483648.0f);
}

int WorldLighting_indirect_bounces_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->ao_indirect_bounces);
}

void WorldLighting_indirect_bounces_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->ao_indirect_bounces = CLAMPIS(value, 1, 32767);
}

int WorldLighting_gather_method_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->ao_gather_method);
}

void WorldLighting_gather_method_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->ao_gather_method = value;
}

int WorldLighting_passes_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->ao_approx_passes);
}

void WorldLighting_passes_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->ao_approx_passes = CLAMPIS(value, 0, 10);
}

float WorldLighting_distance_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->aodist);
}

void WorldLighting_distance_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->aodist = value;
}

float WorldLighting_falloff_strength_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->aodistfac);
}

void WorldLighting_falloff_strength_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->aodistfac = value;
}

float WorldLighting_bias_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->aobias);
}

void WorldLighting_bias_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->aobias = CLAMPIS(value, 0.0f, 0.5000000000f);
}

float WorldLighting_threshold_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_adapt_thresh);
}

void WorldLighting_threshold_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_adapt_thresh = CLAMPIS(value, 0.0f, 1.0f);
}

float WorldLighting_adapt_to_speed_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_adapt_speed_fac);
}

void WorldLighting_adapt_to_speed_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_adapt_speed_fac = CLAMPIS(value, 0.0f, 1.0f);
}

float WorldLighting_error_threshold_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_approx_error);
}

void WorldLighting_error_threshold_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_approx_error = CLAMPIS(value, 0.0001000000f, 10.0f);
}

float WorldLighting_correction_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->ao_approx_correction);
}

void WorldLighting_correction_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->ao_approx_correction = CLAMPIS(value, 0.0f, 1.0f);
}

int WorldLighting_use_falloff_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->aomode) & 1) != 0);
}

void WorldLighting_use_falloff_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->aomode |= 1;
	else data->aomode &= ~1;
}

int WorldLighting_use_cache_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->aomode) & 4) != 0);
}

void WorldLighting_use_cache_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->aomode |= 4;
	else data->aomode &= ~4;
}

int WorldLighting_samples_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->aosamp);
}

void WorldLighting_samples_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->aosamp = CLAMPIS(value, 1, 128);
}

int WorldLighting_sample_method_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->ao_samp_method);
}

void WorldLighting_sample_method_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->ao_samp_method = value;
}

static PointerRNA WorldMistSettings_rna_properties_get(CollectionPropertyIterator *iter)
{
	return rna_builtin_properties_get(iter);
}

void WorldMistSettings_rna_properties_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
{

	memset(iter, 0, sizeof(*iter));
	iter->parent = *ptr;
	iter->prop = (PropertyRNA *)&rna_WorldMistSettings_rna_properties;

	rna_builtin_properties_begin(iter, ptr);

	if (iter->valid)
		iter->ptr = WorldMistSettings_rna_properties_get(iter);
}

void WorldMistSettings_rna_properties_next(CollectionPropertyIterator *iter)
{
	rna_builtin_properties_next(iter);

	if (iter->valid)
		iter->ptr = WorldMistSettings_rna_properties_get(iter);
}

void WorldMistSettings_rna_properties_end(CollectionPropertyIterator *iter)
{
	rna_iterator_listbase_end(iter);
}

int WorldMistSettings_rna_properties_lookup_string(PointerRNA *ptr, const char *key, PointerRNA *r_ptr)
{
	return rna_builtin_properties_lookup_string(ptr, key, r_ptr);
}

PointerRNA WorldMistSettings_rna_type_get(PointerRNA *ptr)
{
	return rna_builtin_type_get(ptr);
}

int WorldMistSettings_use_mist_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (((data->mode) & 1) != 0);
}

void WorldMistSettings_use_mist_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	if (value) data->mode |= 1;
	else data->mode &= ~1;
}

float WorldMistSettings_intensity_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->misi);
}

void WorldMistSettings_intensity_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->misi = CLAMPIS(value, 0.0f, 1.0f);
}

float WorldMistSettings_start_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->miststa);
}

void WorldMistSettings_start_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->miststa = CLAMPIS(value, 0.0f, FLT_MAX);
}

float WorldMistSettings_depth_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->mistdist);
}

void WorldMistSettings_depth_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->mistdist = CLAMPIS(value, 0.0f, FLT_MAX);
}

float WorldMistSettings_height_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (float)(data->misthi);
}

void WorldMistSettings_height_set(PointerRNA *ptr, float value)
{
	World *data = (World *)(ptr->data);
	data->misthi = CLAMPIS(value, 0.0f, 100.0f);
}

int WorldMistSettings_falloff_get(PointerRNA *ptr)
{
	World *data = (World *)(ptr->data);
	return (int)(data->mistype);
}

void WorldMistSettings_falloff_set(PointerRNA *ptr, int value)
{
	World *data = (World *)(ptr->data);
	data->mistype = value;
}

int WorldTextureSlot_use_map_blend_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (((data->mapto) & 1) != 0);
}

void WorldTextureSlot_use_map_blend_set(PointerRNA *ptr, int value)
{
	MTex *data = (MTex *)(ptr->data);
	if (value) data->mapto |= 1;
	else data->mapto &= ~1;
}

int WorldTextureSlot_use_map_horizon_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (((data->mapto) & 2) != 0);
}

void WorldTextureSlot_use_map_horizon_set(PointerRNA *ptr, int value)
{
	MTex *data = (MTex *)(ptr->data);
	if (value) data->mapto |= 2;
	else data->mapto &= ~2;
}

int WorldTextureSlot_use_map_zenith_up_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (((data->mapto) & 4) != 0);
}

void WorldTextureSlot_use_map_zenith_up_set(PointerRNA *ptr, int value)
{
	MTex *data = (MTex *)(ptr->data);
	if (value) data->mapto |= 4;
	else data->mapto &= ~4;
}

int WorldTextureSlot_use_map_zenith_down_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (((data->mapto) & 8) != 0);
}

void WorldTextureSlot_use_map_zenith_down_set(PointerRNA *ptr, int value)
{
	MTex *data = (MTex *)(ptr->data);
	if (value) data->mapto |= 8;
	else data->mapto &= ~8;
}

int WorldTextureSlot_texture_coords_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (int)(data->texco);
}

void WorldTextureSlot_texture_coords_set(PointerRNA *ptr, int value)
{
	MTex *data = (MTex *)(ptr->data);
	data->texco = value;
}

PointerRNA WorldTextureSlot_object_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return rna_pointer_inherit_refine(ptr, &RNA_Object, data->object);
}

void WorldTextureSlot_object_set(PointerRNA *ptr, PointerRNA value)
{
	MTex *data = (MTex *)(ptr->data);
	if (value.data)
		id_lib_extern((ID *)value.data);

	data->object = value.data;
}

float WorldTextureSlot_blend_factor_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (float)(data->blendfac);
}

void WorldTextureSlot_blend_factor_set(PointerRNA *ptr, float value)
{
	MTex *data = (MTex *)(ptr->data);
	data->blendfac = value;
}

float WorldTextureSlot_horizon_factor_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (float)(data->colfac);
}

void WorldTextureSlot_horizon_factor_set(PointerRNA *ptr, float value)
{
	MTex *data = (MTex *)(ptr->data);
	data->colfac = value;
}

float WorldTextureSlot_zenith_up_factor_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (float)(data->zenupfac);
}

void WorldTextureSlot_zenith_up_factor_set(PointerRNA *ptr, float value)
{
	MTex *data = (MTex *)(ptr->data);
	data->zenupfac = value;
}

float WorldTextureSlot_zenith_down_factor_get(PointerRNA *ptr)
{
	MTex *data = (MTex *)(ptr->data);
	return (float)(data->zendownfac);
}

void WorldTextureSlot_zenith_down_factor_set(PointerRNA *ptr, float value)
{
	MTex *data = (MTex *)(ptr->data);
	data->zendownfac = value;
}


struct MTex *WorldTextureSlots_add(struct ID *_selfid, bContext *C, ReportList *reports)
{
	return rna_mtex_texture_slots_add(_selfid, C, reports);
}

void WorldTextureSlots_add_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct ID *_selfid;
	struct MTex *mtex;
	char *_data, *_retdata;
	
	_selfid = (struct ID *)_ptr->id.data;
	_data = (char *)_parms->data;
	_retdata = _data;
	
	mtex = rna_mtex_texture_slots_add(_selfid, C, reports);
	*((struct MTex **)_retdata) = mtex;
}

struct MTex *WorldTextureSlots_create(struct ID *_selfid, bContext *C, ReportList *reports, int index)
{
	return rna_mtex_texture_slots_create(_selfid, C, reports, index);
}

void WorldTextureSlots_create_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct ID *_selfid;
	int index;
	struct MTex *mtex;
	char *_data, *_retdata;
	
	_selfid = (struct ID *)_ptr->id.data;
	_data = (char *)_parms->data;
	index = *((int *)_data);
	_data += 4;
	_retdata = _data;
	
	mtex = rna_mtex_texture_slots_create(_selfid, C, reports, index);
	*((struct MTex **)_retdata) = mtex;
}

void WorldTextureSlots_clear(struct ID *_selfid, bContext *C, ReportList *reports, int index)
{
	rna_mtex_texture_slots_clear(_selfid, C, reports, index);
}

void WorldTextureSlots_clear_call(bContext *C, ReportList *reports, PointerRNA *_ptr, ParameterList *_parms)
{
	struct ID *_selfid;
	int index;
	char *_data;
	
	_selfid = (struct ID *)_ptr->id.data;
	_data = (char *)_parms->data;
	index = *((int *)_data);
	
	rna_mtex_texture_slots_clear(_selfid, C, reports, index);
}

/* Repeated prototypes to detect errors */

struct MTex *rna_mtex_texture_slots_add(struct ID *_selfid, bContext *C, ReportList *reports);
struct MTex *rna_mtex_texture_slots_create(struct ID *_selfid, bContext *C, ReportList *reports, int index);
void rna_mtex_texture_slots_clear(struct ID *_selfid, bContext *C, ReportList *reports, int index);




/* World */
PointerPropertyRNA rna_World_animation_data = {
	{(PropertyRNA *)&rna_World_texture_slots, NULL,
	-1, "animation_data", 8388608, 0, 0, "Animation Data",
	"Animation data for this data-block",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	World_animation_data_get, NULL, NULL, NULL,&RNA_AnimData
};

CollectionPropertyRNA rna_World_texture_slots = {
	{(PropertyRNA *)&rna_World_active_texture, (PropertyRNA *)&rna_World_animation_data,
	-1, "texture_slots", 0, 0, 0, "Textures",
	"Texture slots defining the mapping and influence of textures",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, &RNA_WorldTextureSlots},
	World_texture_slots_begin, World_texture_slots_next, World_texture_slots_end, World_texture_slots_get, NULL, NULL, NULL, NULL, &RNA_WorldTextureSlot
};

PointerPropertyRNA rna_World_active_texture = {
	{(PropertyRNA *)&rna_World_active_texture_index, (PropertyRNA *)&rna_World_texture_slots,
	-1, "active_texture", 8388609, 0, 0, "Active Texture",
	"Active texture slot being displayed",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 102760448, NULL, NULL,
	0, -1, NULL},
	World_active_texture_get, World_active_texture_set, NULL, NULL,&RNA_Texture
};

IntPropertyRNA rna_World_active_texture_index = {
	{(PropertyRNA *)&rna_World_horizon_color, (PropertyRNA *)&rna_World_active_texture,
	-1, "active_texture_index", 3, 0, 4, "Active Texture Index",
	"Index of active texture slot",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 102760448, NULL, NULL,
	offsetof(World, texact), 1, NULL},
	World_active_texture_index_get, World_active_texture_index_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 17, 0, 17, 1, 0, NULL
};

static float rna_World_horizon_color_default[3] = {
	0.0f,
	0.0f,
	0.0f
};

FloatPropertyRNA rna_World_horizon_color = {
	{(PropertyRNA *)&rna_World_zenith_color, (PropertyRNA *)&rna_World_active_texture_index,
	-1, "horizon_color", 3, 0, 4, "Horizon Color",
	"Color at the horizon",
	0, "*",
	PROP_FLOAT, PROP_COLOR | PROP_UNIT_NONE, NULL, 1, {3, 0, 0}, 3,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, horr), 4, NULL},
	NULL, NULL, World_horizon_color_get, World_horizon_color_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, FLT_MAX, 10.0f, 3, 0.0f, rna_World_horizon_color_default
};

static float rna_World_zenith_color_default[3] = {
	0.0f,
	0.0f,
	0.0f
};

FloatPropertyRNA rna_World_zenith_color = {
	{(PropertyRNA *)&rna_World_ambient_color, (PropertyRNA *)&rna_World_horizon_color,
	-1, "zenith_color", 3, 0, 4, "Zenith Color",
	"Color at the zenith",
	0, "*",
	PROP_FLOAT, PROP_COLOR | PROP_UNIT_NONE, NULL, 1, {3, 0, 0}, 3,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, zenr), 4, NULL},
	NULL, NULL, World_zenith_color_get, World_zenith_color_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, FLT_MAX, 10.0f, 3, 0.0f, rna_World_zenith_color_default
};

static float rna_World_ambient_color_default[3] = {
	0.0f,
	0.0f,
	0.0f
};

FloatPropertyRNA rna_World_ambient_color = {
	{(PropertyRNA *)&rna_World_exposure, (PropertyRNA *)&rna_World_zenith_color,
	-1, "ambient_color", 3, 0, 4, "Ambient Color",
	"Ambient color of the world",
	0, "*",
	PROP_FLOAT, PROP_COLOR | PROP_UNIT_NONE, NULL, 1, {3, 0, 0}, 3,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, ambr), 4, NULL},
	NULL, NULL, World_ambient_color_get, World_ambient_color_set, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, FLT_MAX, 10.0f, 3, 0.0f, rna_World_ambient_color_default
};

FloatPropertyRNA rna_World_exposure = {
	{(PropertyRNA *)&rna_World_color_range, (PropertyRNA *)&rna_World_ambient_color,
	-1, "exposure", 3, 0, 4, "Exposure",
	"Amount of exponential color correction for light",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, exp), 4, NULL},
	World_exposure_get, World_exposure_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 1.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_World_color_range = {
	{(PropertyRNA *)&rna_World_use_sky_blend, (PropertyRNA *)&rna_World_exposure,
	-1, "color_range", 3, 0, 4, "Range",
	"The color range that will be mapped to 0-1",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, range), 4, NULL},
	World_color_range_get, World_color_range_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.2000000030f, 5.0f, 0.2000000030f, 5.0f, 10.0f, 3, 0.0f, NULL
};

BoolPropertyRNA rna_World_use_sky_blend = {
	{(PropertyRNA *)&rna_World_use_sky_paper, (PropertyRNA *)&rna_World_color_range,
	-1, "use_sky_blend", 3, 0, 0, "Blend Sky",
	"Render background with natural progression from horizon to zenith",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 221052928, NULL, NULL,
	0, -1, NULL},
	World_use_sky_blend_get, World_use_sky_blend_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_World_use_sky_paper = {
	{(PropertyRNA *)&rna_World_use_sky_real, (PropertyRNA *)&rna_World_use_sky_blend,
	-1, "use_sky_paper", 3, 0, 0, "Paper Sky",
	"Flatten blend or texture coordinates",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 221052928, NULL, NULL,
	0, -1, NULL},
	World_use_sky_paper_get, World_use_sky_paper_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_World_use_sky_real = {
	{(PropertyRNA *)&rna_World_light_settings, (PropertyRNA *)&rna_World_use_sky_paper,
	-1, "use_sky_real", 3, 0, 0, "Real Sky",
	"Render background with a real horizon, relative to the camera angle",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 221052928, NULL, NULL,
	0, -1, NULL},
	World_use_sky_real_get, World_use_sky_real_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

PointerPropertyRNA rna_World_light_settings = {
	{(PropertyRNA *)&rna_World_mist_settings, (PropertyRNA *)&rna_World_use_sky_real,
	-1, "light_settings", 8650752, 0, 0, "Lighting",
	"World lighting settings",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	World_light_settings_get, NULL, NULL, NULL,&RNA_WorldLighting
};

PointerPropertyRNA rna_World_mist_settings = {
	{(PropertyRNA *)&rna_World_node_tree, (PropertyRNA *)&rna_World_light_settings,
	-1, "mist_settings", 8650752, 0, 0, "Mist",
	"World mist settings",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	World_mist_settings_get, NULL, NULL, NULL,&RNA_WorldMistSettings
};

PointerPropertyRNA rna_World_node_tree = {
	{(PropertyRNA *)&rna_World_use_nodes, (PropertyRNA *)&rna_World_mist_settings,
	-1, "node_tree", 8388672, 0, 0, "Node Tree",
	"Node tree for node based worlds",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	World_node_tree_get, NULL, NULL, NULL,&RNA_NodeTree
};

BoolPropertyRNA rna_World_use_nodes = {
	{NULL, (PropertyRNA *)&rna_World_node_tree,
	-1, "use_nodes", 4194305, 0, 0, "Use Nodes",
	"Use shader nodes to render the world",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	(UpdateFunc)rna_World_use_nodes_update, 0, NULL, NULL,
	0, -1, NULL},
	World_use_nodes_get, World_use_nodes_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

StructRNA RNA_World = {
	{(ContainerRNA *)&RNA_WorldTextureSlots, (ContainerRNA *)&RNA_KeyMapItem,
	NULL,
	{(PropertyRNA *)&rna_World_animation_data, (PropertyRNA *)&rna_World_use_nodes}},
	"World", NULL, NULL, 7, "World",
	"World data-block describing the environment and ambient lighting of a scene",
	"*", 158,
	(PropertyRNA *)&rna_ID_name, (PropertyRNA *)&rna_ID_rna_properties,
	&RNA_ID,
	NULL,
	rna_ID_refine,
	NULL,
	NULL,
	NULL,
	NULL,
	rna_ID_idprops,
	{NULL, NULL}
};

/* Texture Slots */
CollectionPropertyRNA rna_WorldTextureSlots_rna_properties = {
	{(PropertyRNA *)&rna_WorldTextureSlots_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlots_rna_properties_begin, WorldTextureSlots_rna_properties_next, WorldTextureSlots_rna_properties_end, WorldTextureSlots_rna_properties_get, NULL, NULL, WorldTextureSlots_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_WorldTextureSlots_rna_type = {
	{NULL, (PropertyRNA *)&rna_WorldTextureSlots_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlots_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

PointerPropertyRNA rna_WorldTextureSlots_add_mtex = {
	{NULL, NULL,
	-1, "mtex", 8388608, 2, 0, "",
	"The newly initialized mtex",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_WorldTextureSlot
};

FunctionRNA rna_WorldTextureSlots_add_func = {
	{(FunctionRNA *)&rna_WorldTextureSlots_create_func, NULL,
	NULL,
	{(PropertyRNA *)&rna_WorldTextureSlots_add_mtex, (PropertyRNA *)&rna_WorldTextureSlots_add_mtex}},
	"add", 2073, "add",
	WorldTextureSlots_add_call,
	(PropertyRNA *)&rna_WorldTextureSlots_add_mtex
};

IntPropertyRNA rna_WorldTextureSlots_create_index = {
	{(PropertyRNA *)&rna_WorldTextureSlots_create_mtex, NULL,
	-1, "index", 3, 1, 0, "Index",
	"Slot index to initialize",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, INT_MAX, 0, INT_MAX, 1, 0, NULL
};

PointerPropertyRNA rna_WorldTextureSlots_create_mtex = {
	{NULL, (PropertyRNA *)&rna_WorldTextureSlots_create_index,
	-1, "mtex", 8388608, 2, 0, "",
	"The newly initialized mtex",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL,&RNA_WorldTextureSlot
};

FunctionRNA rna_WorldTextureSlots_create_func = {
	{(FunctionRNA *)&rna_WorldTextureSlots_clear_func, (FunctionRNA *)&rna_WorldTextureSlots_add_func,
	NULL,
	{(PropertyRNA *)&rna_WorldTextureSlots_create_index, (PropertyRNA *)&rna_WorldTextureSlots_create_mtex}},
	"create", 2073, "create",
	WorldTextureSlots_create_call,
	(PropertyRNA *)&rna_WorldTextureSlots_create_mtex
};

IntPropertyRNA rna_WorldTextureSlots_clear_index = {
	{NULL, NULL,
	-1, "index", 3, 1, 0, "Index",
	"Slot index to clear",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, INT_MAX, 0, INT_MAX, 1, 0, NULL
};

FunctionRNA rna_WorldTextureSlots_clear_func = {
	{NULL, (FunctionRNA *)&rna_WorldTextureSlots_create_func,
	NULL,
	{(PropertyRNA *)&rna_WorldTextureSlots_clear_index, (PropertyRNA *)&rna_WorldTextureSlots_clear_index}},
	"clear", 2073, "clear",
	WorldTextureSlots_clear_call,
	NULL
};

StructRNA RNA_WorldTextureSlots = {
	{(ContainerRNA *)&RNA_WorldLighting, (ContainerRNA *)&RNA_World,
	NULL,
	{(PropertyRNA *)&rna_WorldTextureSlots_rna_properties, (PropertyRNA *)&rna_WorldTextureSlots_rna_type}},
	"WorldTextureSlots", NULL, NULL, 4, "Texture Slots",
	"Collection of texture slots",
	"*", 17,
	NULL, (PropertyRNA *)&rna_WorldTextureSlots_rna_properties,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{(FunctionRNA *)&rna_WorldTextureSlots_add_func, (FunctionRNA *)&rna_WorldTextureSlots_clear_func}
};

/* Lighting */
CollectionPropertyRNA rna_WorldLighting_rna_properties = {
	{(PropertyRNA *)&rna_WorldLighting_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_rna_properties_begin, WorldLighting_rna_properties_next, WorldLighting_rna_properties_end, WorldLighting_rna_properties_get, NULL, NULL, WorldLighting_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_WorldLighting_rna_type = {
	{(PropertyRNA *)&rna_WorldLighting_use_ambient_occlusion, (PropertyRNA *)&rna_WorldLighting_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

BoolPropertyRNA rna_WorldLighting_use_ambient_occlusion = {
	{(PropertyRNA *)&rna_WorldLighting_ao_factor, (PropertyRNA *)&rna_WorldLighting_rna_type,
	-1, "use_ambient_occlusion", 3, 0, 0, "Use Ambient Occlusion",
	"Use Ambient Occlusion to add shadowing based on distance between objects",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_use_ambient_occlusion_get, WorldLighting_use_ambient_occlusion_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

FloatPropertyRNA rna_WorldLighting_ao_factor = {
	{(PropertyRNA *)&rna_WorldLighting_ao_blend_type, (PropertyRNA *)&rna_WorldLighting_use_ambient_occlusion,
	-1, "ao_factor", 3, 0, 4, "Factor",
	"Factor for ambient occlusion blending",
	0, "*",
	PROP_FLOAT, PROP_FACTOR | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, aoenergy), 4, NULL},
	WorldLighting_ao_factor_get, WorldLighting_ao_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 2147483648.0f, 0.1000000015f, 2, 0.0f, NULL
};

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

EnumPropertyRNA rna_WorldLighting_ao_blend_type = {
	{(PropertyRNA *)&rna_WorldLighting_use_environment_light, (PropertyRNA *)&rna_WorldLighting_ao_factor,
	-1, "ao_blend_type", 3, 0, 0, "Blend Mode",
	"Defines how AO mixes with material shading",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_ao_blend_type_get, WorldLighting_ao_blend_type_set, NULL, NULL, NULL, NULL, rna_WorldLighting_ao_blend_type_items, 2, 0
};

BoolPropertyRNA rna_WorldLighting_use_environment_light = {
	{(PropertyRNA *)&rna_WorldLighting_environment_energy, (PropertyRNA *)&rna_WorldLighting_ao_blend_type,
	-1, "use_environment_light", 3, 0, 0, "Use Environment Lighting",
	"Add light coming from the environment",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_use_environment_light_get, WorldLighting_use_environment_light_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

FloatPropertyRNA rna_WorldLighting_environment_energy = {
	{(PropertyRNA *)&rna_WorldLighting_environment_color, (PropertyRNA *)&rna_WorldLighting_use_environment_light,
	-1, "environment_energy", 3, 0, 4, "Environment Color",
	"Defines the strength of environment light",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, ao_env_energy), 4, NULL},
	WorldLighting_environment_energy_get, WorldLighting_environment_energy_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, FLT_MAX, -FLT_MAX, FLT_MAX, 1.0f, 3, 0.0f, NULL
};

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

EnumPropertyRNA rna_WorldLighting_environment_color = {
	{(PropertyRNA *)&rna_WorldLighting_use_indirect_light, (PropertyRNA *)&rna_WorldLighting_environment_energy,
	-1, "environment_color", 3, 0, 0, "Environment Color",
	"Defines where the color of the environment light comes from",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_environment_color_get, WorldLighting_environment_color_set, NULL, NULL, NULL, NULL, rna_WorldLighting_environment_color_items, 3, 0
};

BoolPropertyRNA rna_WorldLighting_use_indirect_light = {
	{(PropertyRNA *)&rna_WorldLighting_indirect_factor, (PropertyRNA *)&rna_WorldLighting_environment_color,
	-1, "use_indirect_light", 3, 0, 0, "Use Indirect Lighting",
	"Add indirect light bouncing of surrounding objects",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_use_indirect_light_get, WorldLighting_use_indirect_light_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

FloatPropertyRNA rna_WorldLighting_indirect_factor = {
	{(PropertyRNA *)&rna_WorldLighting_indirect_bounces, (PropertyRNA *)&rna_WorldLighting_use_indirect_light,
	-1, "indirect_factor", 3, 0, 4, "Indirect Factor",
	"Factor for how much surrounding objects contribute to light",
	0, "*",
	PROP_FLOAT, PROP_FACTOR | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_indirect_energy), 4, NULL},
	WorldLighting_indirect_factor_get, WorldLighting_indirect_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 2147483648.0f, 0.1000000015f, 2, 0.0f, NULL
};

IntPropertyRNA rna_WorldLighting_indirect_bounces = {
	{(PropertyRNA *)&rna_WorldLighting_gather_method, (PropertyRNA *)&rna_WorldLighting_indirect_factor,
	-1, "indirect_bounces", 3, 0, 4, "Bounces",
	"Number of indirect diffuse light bounces",
	0, "*",
	PROP_INT, PROP_UNSIGNED | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_indirect_bounces), 1, NULL},
	WorldLighting_indirect_bounces_get, WorldLighting_indirect_bounces_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 32767, 1, 32767, 1, 0, NULL
};

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

EnumPropertyRNA rna_WorldLighting_gather_method = {
	{(PropertyRNA *)&rna_WorldLighting_passes, (PropertyRNA *)&rna_WorldLighting_indirect_bounces,
	-1, "gather_method", 3, 0, 0, "Gather Method",
	"",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_gather_method_get, WorldLighting_gather_method_set, NULL, NULL, NULL, NULL, rna_WorldLighting_gather_method_items, 2, 0
};

IntPropertyRNA rna_WorldLighting_passes = {
	{(PropertyRNA *)&rna_WorldLighting_distance, (PropertyRNA *)&rna_WorldLighting_gather_method,
	-1, "passes", 3, 0, 4, "Passes",
	"Number of preprocessing passes to reduce over-occlusion",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_approx_passes), 1, NULL},
	WorldLighting_passes_get, WorldLighting_passes_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	0, 10, 0, 10, 1, 0, NULL
};

FloatPropertyRNA rna_WorldLighting_distance = {
	{(PropertyRNA *)&rna_WorldLighting_falloff_strength, (PropertyRNA *)&rna_WorldLighting_passes,
	-1, "distance", 3, 0, 4, "Distance",
	"Length of rays, defines how far away other faces give occlusion effect",
	0, "*",
	PROP_FLOAT, PROP_DISTANCE | PROP_UNIT_LENGTH, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, aodist), 4, NULL},
	WorldLighting_distance_get, WorldLighting_distance_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -10000.0f, 10000.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_falloff_strength = {
	{(PropertyRNA *)&rna_WorldLighting_bias, (PropertyRNA *)&rna_WorldLighting_distance,
	-1, "falloff_strength", 3, 0, 4, "Strength",
	"Attenuation falloff strength, the higher, the less influence distant objects have",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, aodistfac), 4, NULL},
	WorldLighting_falloff_strength_get, WorldLighting_falloff_strength_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, -10000.0f, 10000.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_bias = {
	{(PropertyRNA *)&rna_WorldLighting_threshold, (PropertyRNA *)&rna_WorldLighting_falloff_strength,
	-1, "bias", 3, 0, 4, "Bias",
	"Bias (in radians) to prevent smoothed faces from showing banding (for Raytrace Constant Jittered)",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, aobias), 4, NULL},
	WorldLighting_bias_get, WorldLighting_bias_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 0.5000000000f, 0.0f, 0.5000000000f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_threshold = {
	{(PropertyRNA *)&rna_WorldLighting_adapt_to_speed, (PropertyRNA *)&rna_WorldLighting_bias,
	-1, "threshold", 3, 0, 4, "Threshold",
	"Samples below this threshold will be considered fully shadowed/unshadowed and skipped (for Raytrace Adaptive QMC)",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_adapt_thresh), 4, NULL},
	WorldLighting_threshold_get, WorldLighting_threshold_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 1.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_adapt_to_speed = {
	{(PropertyRNA *)&rna_WorldLighting_error_threshold, (PropertyRNA *)&rna_WorldLighting_threshold,
	-1, "adapt_to_speed", 3, 0, 4, "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)",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_adapt_speed_fac), 4, NULL},
	WorldLighting_adapt_to_speed_get, WorldLighting_adapt_to_speed_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 1.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_error_threshold = {
	{(PropertyRNA *)&rna_WorldLighting_correction, (PropertyRNA *)&rna_WorldLighting_adapt_to_speed,
	-1, "error_threshold", 3, 0, 4, "Error Tolerance",
	"Low values are slower and higher quality",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_approx_error), 4, NULL},
	WorldLighting_error_threshold_get, WorldLighting_error_threshold_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0001000000f, 10.0f, 0.0001000000f, 10.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldLighting_correction = {
	{(PropertyRNA *)&rna_WorldLighting_use_falloff, (PropertyRNA *)&rna_WorldLighting_error_threshold,
	-1, "correction", 3, 0, 4, "Correction",
	"Ad-hoc correction for over-occlusion due to the approximation",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, ao_approx_correction), 4, NULL},
	WorldLighting_correction_get, WorldLighting_correction_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 1.0f, 0.1000000015f, 2, 0.0f, NULL
};

BoolPropertyRNA rna_WorldLighting_use_falloff = {
	{(PropertyRNA *)&rna_WorldLighting_use_cache, (PropertyRNA *)&rna_WorldLighting_correction,
	-1, "use_falloff", 3, 0, 0, "Falloff",
	"Distance will be used to attenuate shadows",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_use_falloff_get, WorldLighting_use_falloff_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_WorldLighting_use_cache = {
	{(PropertyRNA *)&rna_WorldLighting_samples, (PropertyRNA *)&rna_WorldLighting_use_falloff,
	-1, "use_cache", 3, 0, 0, "Pixel Cache",
	"Cache AO results in pixels and interpolate over neighboring pixels for speedup",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_use_cache_get, WorldLighting_use_cache_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

IntPropertyRNA rna_WorldLighting_samples = {
	{(PropertyRNA *)&rna_WorldLighting_sample_method, (PropertyRNA *)&rna_WorldLighting_use_cache,
	-1, "samples", 3, 0, 4, "Samples",
	"Amount of ray samples. Higher values give smoother results and longer rendering times",
	0, "*",
	PROP_INT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, aosamp), 1, NULL},
	WorldLighting_samples_get, WorldLighting_samples_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
	1, 128, 1, 128, 1, 0, NULL
};

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

EnumPropertyRNA rna_WorldLighting_sample_method = {
	{NULL, (PropertyRNA *)&rna_WorldLighting_samples,
	-1, "sample_method", 3, 0, 0, "Sample Method",
	"Method for generating shadow samples (for Raytrace)",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldLighting_sample_method_get, WorldLighting_sample_method_set, NULL, NULL, NULL, NULL, rna_WorldLighting_sample_method_items, 3, 0
};

StructRNA RNA_WorldLighting = {
	{(ContainerRNA *)&RNA_WorldMistSettings, (ContainerRNA *)&RNA_WorldTextureSlots,
	NULL,
	{(PropertyRNA *)&rna_WorldLighting_rna_properties, (PropertyRNA *)&rna_WorldLighting_sample_method}},
	"WorldLighting", NULL, NULL, 4, "Lighting",
	"Lighting for a World data-block",
	"*", 17,
	NULL, (PropertyRNA *)&rna_WorldLighting_rna_properties,
	NULL,
	&RNA_World,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* World Mist */
CollectionPropertyRNA rna_WorldMistSettings_rna_properties = {
	{(PropertyRNA *)&rna_WorldMistSettings_rna_type, NULL,
	-1, "rna_properties", 0, 0, 1, "Properties",
	"RNA property collection",
	0, "*",
	PROP_COLLECTION, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldMistSettings_rna_properties_begin, WorldMistSettings_rna_properties_next, WorldMistSettings_rna_properties_end, WorldMistSettings_rna_properties_get, NULL, NULL, WorldMistSettings_rna_properties_lookup_string, NULL, &RNA_Property
};

PointerPropertyRNA rna_WorldMistSettings_rna_type = {
	{(PropertyRNA *)&rna_WorldMistSettings_use_mist, (PropertyRNA *)&rna_WorldMistSettings_rna_properties,
	-1, "rna_type", 8912896, 0, 0, "RNA",
	"RNA type definition",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	NULL, 0, NULL, NULL,
	0, -1, NULL},
	WorldMistSettings_rna_type_get, NULL, NULL, NULL,&RNA_Struct
};

BoolPropertyRNA rna_WorldMistSettings_use_mist = {
	{(PropertyRNA *)&rna_WorldMistSettings_intensity, (PropertyRNA *)&rna_WorldMistSettings_rna_type,
	-1, "use_mist", 3, 0, 0, "Use Mist",
	"Occlude objects with the environment color as they are further away",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldMistSettings_use_mist_get, WorldMistSettings_use_mist_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

FloatPropertyRNA rna_WorldMistSettings_intensity = {
	{(PropertyRNA *)&rna_WorldMistSettings_start, (PropertyRNA *)&rna_WorldMistSettings_use_mist,
	-1, "intensity", 3, 0, 4, "Minimum",
	"Overall minimum intensity of the mist effect",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, misi), 4, NULL},
	WorldMistSettings_intensity_get, WorldMistSettings_intensity_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, 0.0f, 1.0f, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldMistSettings_start = {
	{(PropertyRNA *)&rna_WorldMistSettings_depth, (PropertyRNA *)&rna_WorldMistSettings_intensity,
	-1, "start", 3, 0, 4, "Start",
	"Starting distance of the mist, measured from the camera",
	0, "*",
	PROP_FLOAT, PROP_DISTANCE | PROP_UNIT_LENGTH, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, miststa), 4, NULL},
	WorldMistSettings_start_get, WorldMistSettings_start_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 10000.0f, 0.0f, FLT_MAX, 10.0f, 2, 0.0f, NULL
};

FloatPropertyRNA rna_WorldMistSettings_depth = {
	{(PropertyRNA *)&rna_WorldMistSettings_height, (PropertyRNA *)&rna_WorldMistSettings_start,
	-1, "depth", 3, 0, 4, "Depth",
	"Distance over which the mist effect fades in",
	0, "*",
	PROP_FLOAT, PROP_DISTANCE | PROP_UNIT_LENGTH, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	offsetof(World, mistdist), 4, NULL},
	WorldMistSettings_depth_get, WorldMistSettings_depth_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 10000.0f, 0.0f, FLT_MAX, 10.0f, 2, 0.0f, NULL
};

FloatPropertyRNA rna_WorldMistSettings_height = {
	{(PropertyRNA *)&rna_WorldMistSettings_falloff, (PropertyRNA *)&rna_WorldMistSettings_depth,
	-1, "height", 3, 0, 4, "Height",
	"Control how much mist density decreases with height",
	0, "*",
	PROP_FLOAT, PROP_DISTANCE | PROP_UNIT_LENGTH, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(World, misthi), 4, NULL},
	WorldMistSettings_height_get, WorldMistSettings_height_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 100.0f, 0.0f, 100.0f, 10.0f, 3, 0.0f, NULL
};

static EnumPropertyItem rna_WorldMistSettings_falloff_items[4] = {
	{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}
};

EnumPropertyRNA rna_WorldMistSettings_falloff = {
	{NULL, (PropertyRNA *)&rna_WorldMistSettings_height,
	-1, "falloff", 3, 0, 0, "Falloff",
	"Type of transition used to fade mist",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_draw_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldMistSettings_falloff_get, WorldMistSettings_falloff_set, NULL, NULL, NULL, NULL, rna_WorldMistSettings_falloff_items, 3, 0
};

StructRNA RNA_WorldMistSettings = {
	{(ContainerRNA *)&RNA_WorldTextureSlot, (ContainerRNA *)&RNA_WorldLighting,
	NULL,
	{(PropertyRNA *)&rna_WorldMistSettings_rna_properties, (PropertyRNA *)&rna_WorldMistSettings_falloff}},
	"WorldMistSettings", NULL, NULL, 4, "World Mist",
	"Mist settings for a World data-block",
	"*", 17,
	NULL, (PropertyRNA *)&rna_WorldMistSettings_rna_properties,
	NULL,
	&RNA_World,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

/* World Texture Slot */
BoolPropertyRNA rna_WorldTextureSlot_use_map_blend = {
	{(PropertyRNA *)&rna_WorldTextureSlot_use_map_horizon, NULL,
	-1, "use_map_blend", 3, 0, 0, "Blend",
	"Affect the color progression of the background",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_use_map_blend_get, WorldTextureSlot_use_map_blend_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_WorldTextureSlot_use_map_horizon = {
	{(PropertyRNA *)&rna_WorldTextureSlot_use_map_zenith_up, (PropertyRNA *)&rna_WorldTextureSlot_use_map_blend,
	-1, "use_map_horizon", 3, 0, 0, "Horizon",
	"Affect the color of the horizon",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_use_map_horizon_get, WorldTextureSlot_use_map_horizon_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_WorldTextureSlot_use_map_zenith_up = {
	{(PropertyRNA *)&rna_WorldTextureSlot_use_map_zenith_down, (PropertyRNA *)&rna_WorldTextureSlot_use_map_horizon,
	-1, "use_map_zenith_up", 3, 0, 0, "Zenith Up",
	"Affect the color of the zenith above",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_use_map_zenith_up_get, WorldTextureSlot_use_map_zenith_up_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

BoolPropertyRNA rna_WorldTextureSlot_use_map_zenith_down = {
	{(PropertyRNA *)&rna_WorldTextureSlot_texture_coords, (PropertyRNA *)&rna_WorldTextureSlot_use_map_zenith_up,
	-1, "use_map_zenith_down", 3, 0, 0, "Zenith Down",
	"Affect the color of the zenith below",
	0, "*",
	PROP_BOOLEAN, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_use_map_zenith_down_get, WorldTextureSlot_use_map_zenith_down_set, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL
};

static EnumPropertyItem rna_WorldTextureSlot_texture_coords_items[8] = {
	{128, "VIEW", 0, "View", "Use view vector for the texture coordinates"},
	{8, "GLOBAL", 0, "Global", "Use global coordinates for the texture coordinates (interior mist)"},
	{64, "ANGMAP", 0, "AngMap", "Use 360 degree angular coordinates, e.g. for spherical light probes"},
	{256, "SPHERE", 0, "Sphere", "For 360 degree panorama sky, spherical mapped, only top half"},
	{2048, "EQUIRECT", 0, "Equirectangular", "For 360 degree panorama sky, equirectangular mapping"},
	{1024, "TUBE", 0, "Tube", "For 360 degree panorama sky, cylindrical mapped, only top half"},
	{32, "OBJECT", 0, "Object", "Use linked object\'s coordinates for texture coordinates"},
	{0, NULL, 0, NULL, NULL}
};

EnumPropertyRNA rna_WorldTextureSlot_texture_coords = {
	{(PropertyRNA *)&rna_WorldTextureSlot_object, (PropertyRNA *)&rna_WorldTextureSlot_use_map_zenith_down,
	-1, "texture_coords", 3, 0, 0, "Texture Coordinates",
	"Texture coordinates used to map the texture onto the background",
	0, "*",
	PROP_ENUM, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_texture_coords_get, WorldTextureSlot_texture_coords_set, NULL, NULL, NULL, NULL, rna_WorldTextureSlot_texture_coords_items, 7, 128
};

PointerPropertyRNA rna_WorldTextureSlot_object = {
	{(PropertyRNA *)&rna_WorldTextureSlot_blend_factor, (PropertyRNA *)&rna_WorldTextureSlot_texture_coords,
	-1, "object", 8388609, 0, 0, "Object",
	"Object to use for mapping with Object texture coordinates",
	0, "*",
	PROP_POINTER, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	0, -1, NULL},
	WorldTextureSlot_object_get, WorldTextureSlot_object_set, NULL, NULL,&RNA_Object
};

FloatPropertyRNA rna_WorldTextureSlot_blend_factor = {
	{(PropertyRNA *)&rna_WorldTextureSlot_horizon_factor, (PropertyRNA *)&rna_WorldTextureSlot_object,
	-1, "blend_factor", 3, 0, 4, "Blend Factor",
	"Amount texture affects color progression of the background",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(MTex, blendfac), 4, NULL},
	WorldTextureSlot_blend_factor_get, WorldTextureSlot_blend_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldTextureSlot_horizon_factor = {
	{(PropertyRNA *)&rna_WorldTextureSlot_zenith_up_factor, (PropertyRNA *)&rna_WorldTextureSlot_blend_factor,
	-1, "horizon_factor", 3, 0, 4, "Horizon Factor",
	"Amount texture affects color of the horizon",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(MTex, colfac), 4, NULL},
	WorldTextureSlot_horizon_factor_get, WorldTextureSlot_horizon_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldTextureSlot_zenith_up_factor = {
	{(PropertyRNA *)&rna_WorldTextureSlot_zenith_down_factor, (PropertyRNA *)&rna_WorldTextureSlot_horizon_factor,
	-1, "zenith_up_factor", 3, 0, 4, "Zenith Up Factor",
	"Amount texture affects color of the zenith above",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(MTex, zenupfac), 4, NULL},
	WorldTextureSlot_zenith_up_factor_get, WorldTextureSlot_zenith_up_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

FloatPropertyRNA rna_WorldTextureSlot_zenith_down_factor = {
	{NULL, (PropertyRNA *)&rna_WorldTextureSlot_zenith_up_factor,
	-1, "zenith_down_factor", 3, 0, 4, "Zenith Down Factor",
	"Amount texture affects color of the zenith below",
	0, "*",
	PROP_FLOAT, PROP_NONE | PROP_UNIT_NONE, NULL, 0, {0, 0, 0}, 0,
	rna_World_update, 0, NULL, NULL,
	offsetof(MTex, zendownfac), 4, NULL},
	WorldTextureSlot_zenith_down_factor_get, WorldTextureSlot_zenith_down_factor_set, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0.0f, 1.0f, -FLT_MAX, FLT_MAX, 10.0f, 3, 0.0f, NULL
};

StructRNA RNA_WorldTextureSlot = {
	{(ContainerRNA *)&RNA_MovieClip, (ContainerRNA *)&RNA_WorldMistSettings,
	NULL,
	{(PropertyRNA *)&rna_WorldTextureSlot_use_map_blend, (PropertyRNA *)&rna_WorldTextureSlot_zenith_down_factor}},
	"WorldTextureSlot", NULL, NULL, 4, "World Texture Slot",
	"Texture slot for textures in a World data-block",
	"*", 166,
	(PropertyRNA *)&rna_TextureSlot_name, (PropertyRNA *)&rna_TextureSlot_rna_properties,
	&RNA_TextureSlot,
	NULL,
	NULL,
	rna_TextureSlot_path,
	NULL,
	NULL,
	NULL,
	NULL,
	{NULL, NULL}
};

