Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_particle.c
| Show First 20 Lines • Show All 2,392 Lines • ▼ Show 20 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); | RNA_def_property_update(prop, 0, "rna_Particle_redo"); | ||||
| prop = RNA_def_property(srna, "display_color", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "display_color", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "draw_col"); | RNA_def_property_enum_sdna(prop, NULL, "draw_col"); | ||||
| RNA_def_property_enum_items(prop, draw_col_items); | RNA_def_property_enum_items(prop, draw_col_items); | ||||
| RNA_def_property_ui_text(prop, "Draw Color", "Draw additional particle data as a color"); | RNA_def_property_ui_text(prop, "Draw Color", "Draw additional particle data as a color"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); | RNA_def_property_update(prop, 0, "rna_Particle_redo"); | ||||
| prop = RNA_def_property(srna, "display_size", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "display_size", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "draw_size"); | RNA_def_property_float_sdna(prop, NULL, "draw_size"); | ||||
| RNA_def_property_range(prop, 0, 1000); | RNA_def_property_range(prop, 0, 1000); | ||||
| RNA_def_property_ui_range(prop, 0, 100, 1, -1); | RNA_def_property_ui_range(prop, 0, 100, 1, -1); | ||||
| RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in BU"); | RNA_def_property_ui_text(prop, "Draw Size", "Size of particles on viewport in BU"); | ||||
JacquesLucke: Maybe that tooltip should be changed then. Just to "Size of particles in the viewport". | |||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); | RNA_def_property_update(prop, 0, "rna_Particle_redo"); | ||||
| prop = RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "child_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "childtype"); | RNA_def_property_enum_sdna(prop, NULL, "childtype"); | ||||
| RNA_def_property_enum_items(prop, child_type_items); | RNA_def_property_enum_items(prop, child_type_items); | ||||
| RNA_def_property_ui_text(prop, "Children From", "Create child particles"); | RNA_def_property_ui_text(prop, "Children From", "Create child particles"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| ▲ Show 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "billboard_velocity_tail", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "billboard_velocity_tail", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "bb_vel_tail"); | RNA_def_property_float_sdna(prop, NULL, "bb_vel_tail"); | ||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | RNA_def_property_range(prop, 0.0f, 10.0f); | ||||
| RNA_def_property_ui_text(prop, "Billboard Velocity Tail", "Scale billboards by velocity"); | RNA_def_property_ui_text(prop, "Billboard Velocity Tail", "Scale billboards by velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); | RNA_def_property_update(prop, 0, "rna_Particle_redo"); | ||||
| /* general values */ | /* general values */ | ||||
| prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME); | ||||
| RNA_def_property_float_sdna(prop, NULL, "sta"); /*optional if prop names are the same */ | RNA_def_property_float_sdna(prop, NULL, "sta"); /*optional if prop names are the same */ | ||||
| RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); | RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL); | RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_start_set", NULL); | ||||
| RNA_def_property_ui_text(prop, "Start", "Frame number to start emitting particles"); | RNA_def_property_ui_text(prop, "Start", "Frame number to start emitting particles"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_TIME); | ||||
| RNA_def_property_float_sdna(prop, NULL, "end"); | RNA_def_property_float_sdna(prop, NULL, "end"); | ||||
| RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); | RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL); | RNA_def_property_float_funcs(prop, NULL, "rna_PartSettings_end_set", NULL); | ||||
| RNA_def_property_ui_text(prop, "End", "Frame number to stop emitting particles"); | RNA_def_property_ui_text(prop, "End", "Frame number to stop emitting particles"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| Show All 10 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "time_tweak", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "timetweak"); | RNA_def_property_float_sdna(prop, NULL, "timetweak"); | ||||
| RNA_def_property_range(prop, 0.0f, 100.0f); | RNA_def_property_range(prop, 0.0f, 100.0f); | ||||
| RNA_def_property_ui_range(prop, 0, 10, 1, 3); | RNA_def_property_ui_range(prop, 0, 10, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)"); | RNA_def_property_ui_text(prop, "Tweak", "A multiplier for physics timestep (1.0 means one frame = 1/25 seconds)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "timestep", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "timestep", PROP_FLOAT, PROP_TIME); | ||||
| RNA_def_property_float_funcs(prop, "rna_PartSettings_timestep_get", "rna_PartSetings_timestep_set", NULL); | RNA_def_property_float_funcs(prop, "rna_PartSettings_timestep_get", "rna_PartSetings_timestep_set", NULL); | ||||
| RNA_def_property_range(prop, 0.0001, 100.0); | RNA_def_property_range(prop, 0.0001, 100.0); | ||||
| RNA_def_property_ui_range(prop, 0.01, 10, 1, 3); | RNA_def_property_ui_range(prop, 0.01, 10, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Timestep", "The simulation timestep per frame (seconds per frame)"); | RNA_def_property_ui_text(prop, "Timestep", "The simulation timestep per frame (seconds per frame)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "use_adaptive_subframes", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_adaptive_subframes", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "time_flag", PART_TIME_AUTOSF); | RNA_def_property_boolean_sdna(prop, NULL, "time_flag", PART_TIME_AUTOSF); | ||||
| ▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED); | prop = RNA_def_property(srna, "effector_amount", PROP_INT, PROP_UNSIGNED); | ||||
| /* in theory PROP_ANIMATABLE perhaps should be cleared, but animating this can give some interesting results! */ | /* in theory PROP_ANIMATABLE perhaps should be cleared, but animating this can give some interesting results! */ | ||||
| RNA_def_property_range(prop, 0, 10000); /* 10000 effectors will bel SLOW, but who knows */ | RNA_def_property_range(prop, 0, 10000); /* 10000 effectors will bel SLOW, but who knows */ | ||||
| RNA_def_property_ui_range(prop, 0, 100, 1, -1); | RNA_def_property_ui_range(prop, 0, 100, 1, -1); | ||||
| RNA_def_property_ui_text(prop, "Effector Number", "How many particles are effectors (0 is all particles)"); | RNA_def_property_ui_text(prop, "Effector Number", "How many particles are effectors (0 is all particles)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| /* initial velocity factors */ | /* initial velocity factors */ | ||||
| prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VELOCITY); | ||||
| RNA_def_property_float_sdna(prop, NULL, "normfac"); /*optional if prop names are the same */ | RNA_def_property_float_sdna(prop, NULL, "normfac"); /*optional if prop names are the same */ | ||||
| RNA_def_property_range(prop, -1000.0f, 1000.0f); | RNA_def_property_range(prop, -1000.0f, 1000.0f); | ||||
| RNA_def_property_ui_range(prop, 0, 100, 1, 3); | RNA_def_property_ui_range(prop, 0, 100, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting velocity"); | RNA_def_property_ui_text(prop, "Normal", "Let the surface normal give the particle a starting velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "object_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "obfac"); | RNA_def_property_float_sdna(prop, NULL, "obfac"); | ||||
| RNA_def_property_range(prop, -200.0f, 200.0f); | RNA_def_property_range(prop, -200.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3); | RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3); | ||||
| RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting velocity"); | RNA_def_property_ui_text(prop, "Object", "Let the object give the particle a starting velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "factor_random", PROP_FLOAT, PROP_VELOCITY); | ||||
| RNA_def_property_float_sdna(prop, NULL, "randfac"); /*optional if prop names are the same */ | RNA_def_property_float_sdna(prop, NULL, "randfac"); /*optional if prop names are the same */ | ||||
| RNA_def_property_range(prop, 0.0f, 200.0f); | RNA_def_property_range(prop, 0.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, 0, 100, 1, 3); | RNA_def_property_ui_range(prop, 0, 100, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Random", "Give the starting velocity a random variation"); | RNA_def_property_ui_text(prop, "Random", "Give the starting velocity a random variation"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "particle_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "partfac"); | RNA_def_property_float_sdna(prop, NULL, "partfac"); | ||||
| RNA_def_property_range(prop, -200.0f, 200.0f); | RNA_def_property_range(prop, -200.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3); | RNA_def_property_ui_range(prop, -1.0f, 1.0f, 0.1, 3); | ||||
| RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting velocity"); | RNA_def_property_ui_text(prop, "Particle", "Let the target particle give the particle a starting velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "tangent_factor", PROP_FLOAT, PROP_VELOCITY); | ||||
| RNA_def_property_float_sdna(prop, NULL, "tanfac"); | RNA_def_property_float_sdna(prop, NULL, "tanfac"); | ||||
| RNA_def_property_range(prop, -1000.0f, 1000.0f); | RNA_def_property_range(prop, -1000.0f, 1000.0f); | ||||
| RNA_def_property_ui_range(prop, -100, 100, 1, 2); | RNA_def_property_ui_range(prop, -100, 100, 1, 2); | ||||
| RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting velocity"); | RNA_def_property_ui_text(prop, "Tangent", "Let the surface tangent give the particle a starting velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "tangent_phase", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "tanphase"); | RNA_def_property_float_sdna(prop, NULL, "tanphase"); | ||||
| Show All 13 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| RNA_def_property_float_sdna(prop, NULL, "ob_vel"); | RNA_def_property_float_sdna(prop, NULL, "ob_vel"); | ||||
| RNA_def_property_array(prop, 3); | RNA_def_property_array(prop, 3); | ||||
| RNA_def_property_range(prop, -200.0f, 200.0f); | RNA_def_property_range(prop, -200.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, -100, 100, 1, 3); | RNA_def_property_ui_range(prop, -100, 100, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Object Aligned", | RNA_def_property_ui_text(prop, "Object Aligned", | ||||
| "Let the emitter object orientation give the particle a starting velocity"); | "Let the emitter object orientation give the particle a starting velocity"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_NONE); | // TODO: Add PROP_ANGLE_VELOCITY | ||||
| prop = RNA_def_property(srna, "angular_velocity_factor", PROP_FLOAT, PROP_ANGLE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "avefac"); | RNA_def_property_float_sdna(prop, NULL, "avefac"); | ||||
| RNA_def_property_range(prop, -200.0f, 200.0f); | RNA_def_property_range(prop, -200.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, -100, 100, 10, 3); | RNA_def_property_ui_range(prop, -100, 100, 10, 3); | ||||
| RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount (in radians per second)"); | RNA_def_property_ui_text(prop, "Angular Velocity", "Angular velocity amount (in radians per second)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "phase_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "phasefac"); | RNA_def_property_float_sdna(prop, NULL, "phasefac"); | ||||
| Show All 16 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "hair_length", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "hair_length", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_funcs(prop, "rna_PartSetting_hairlength_get", "rna_PartSetting_hairlength_set", NULL); | RNA_def_property_float_funcs(prop, "rna_PartSetting_hairlength_get", "rna_PartSetting_hairlength_set", NULL); | ||||
| RNA_def_property_range(prop, 0.0f, 1000.0f); | RNA_def_property_range(prop, 0.0f, 1000.0f); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3); | RNA_def_property_ui_range(prop, 0.0f, 10.0f, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Hair Length", "Length of the hair"); | RNA_def_property_ui_text(prop, "Hair Length", "Length of the hair"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| /* physical properties */ | /* physical properties */ | ||||
| prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_UNIT_MASS); // TODO: Add PROP_MASS | ||||
| RNA_def_property_range(prop, 0.00000001f, 100000.0f); | RNA_def_property_range(prop, 0.00000001f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, 0.01, 100, 1, 3); | RNA_def_property_ui_range(prop, 0.01, 100, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Mass", "Mass of the particles"); | RNA_def_property_ui_text(prop, "Mass", "Mass of the particles"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "particle_size", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "size"); | RNA_def_property_float_sdna(prop, NULL, "size"); | ||||
| RNA_def_property_range(prop, 0.001f, 100000.0f); | RNA_def_property_range(prop, 0.001f, 100000.0f); | ||||
| Show All 10 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "collision_collection", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "collision_collection", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_struct_type(prop, "Collection"); | RNA_def_property_struct_type(prop, "Collection"); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "collision_group"); | RNA_def_property_pointer_sdna(prop, NULL, "collision_group"); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); | RNA_def_property_ui_text(prop, "Collision Collection", "Limit colliders to this collection"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset_dependency"); | RNA_def_property_update(prop, 0, "rna_Particle_reset_dependency"); | ||||
| /* global physical properties */ | /* global physical properties */ | ||||
| prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "drag_factor", PROP_FLOAT, PROP_PERCENTAGE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "dragfac"); | RNA_def_property_float_sdna(prop, NULL, "dragfac"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag"); | RNA_def_property_ui_text(prop, "Drag", "Amount of air-drag"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "brownian_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "brownfac"); | RNA_def_property_float_sdna(prop, NULL, "brownfac"); | ||||
| RNA_def_property_range(prop, 0.0f, 200.0f); | RNA_def_property_range(prop, 0.0f, 200.0f); | ||||
| RNA_def_property_ui_range(prop, 0, 20, 1, 3); | RNA_def_property_ui_range(prop, 0, 20, 1, 3); | ||||
| RNA_def_property_ui_text(prop, "Brownian", "Amount of random, erratic particle movement"); | RNA_def_property_ui_text(prop, "Brownian", "Amount of random, erratic particle movement"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "damping", PROP_FLOAT, PROP_PERCENTAGE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "dampfac"); | RNA_def_property_float_sdna(prop, NULL, "dampfac"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Damp", "Amount of damping"); | RNA_def_property_ui_text(prop, "Damp", "Amount of damping"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_reset"); | RNA_def_property_update(prop, 0, "rna_Particle_reset"); | ||||
| /* random length */ | /* random length */ | ||||
| prop = RNA_def_property(srna, "length_random", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "length_random", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "randlength"); | RNA_def_property_float_sdna(prop, NULL, "randlength"); | ||||
| Show All 16 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Rendered Children", "Number of children/parent for rendering"); | RNA_def_property_ui_text(prop, "Rendered Children", "Number of children/parent for rendering"); | ||||
| prop = RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "virtual_parents", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "parents"); | RNA_def_property_float_sdna(prop, NULL, "parents"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents"); | RNA_def_property_ui_text(prop, "Virtual Parents", "Relative amount of virtual parents"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_size", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "childsize"); | RNA_def_property_float_sdna(prop, NULL, "childsize"); | ||||
| RNA_def_property_range(prop, 0.001f, 100000.0f); | RNA_def_property_range(prop, 0.001f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3); | RNA_def_property_ui_range(prop, 0.01f, 100.0f, 0.1, 3); | ||||
| RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size"); | RNA_def_property_ui_text(prop, "Child Size", "A multiplier for the child particle size"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_size_random", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_size_random", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "childrandsize"); | RNA_def_property_float_sdna(prop, NULL, "childrandsize"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles"); | RNA_def_property_ui_text(prop, "Random Child Size", "Random variation to the size of the child particles"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_radius", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "childrad"); | RNA_def_property_float_sdna(prop, NULL, "childrad"); | ||||
| RNA_def_property_range(prop, 0.0f, 10.0f); | RNA_def_property_range(prop, 0.0f, 10.0f); | ||||
| RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent"); | RNA_def_property_ui_text(prop, "Child Radius", "Radius of children around parent"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_roundness", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "childflat"); | RNA_def_property_float_sdna(prop, NULL, "childflat"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| Show All 33 Lines | static void rna_def_particle_settings(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "clump_noise_size", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "clump_noise_size", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "clump_noise_size"); | RNA_def_property_float_sdna(prop, NULL, "clump_noise_size"); | ||||
| RNA_def_property_range(prop, 0.00001f, 100000.0f); | RNA_def_property_range(prop, 0.00001f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1f, 3); | RNA_def_property_ui_range(prop, 0.01f, 10.0f, 0.1f, 3); | ||||
| RNA_def_property_ui_text(prop, "Clump Noise Size", "Size of clump noise"); | RNA_def_property_ui_text(prop, "Clump Noise Size", "Size of clump noise"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| /* kink */ | /* kink */ | ||||
| prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "kink_amplitude", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "kink_amp"); | RNA_def_property_float_sdna(prop, NULL, "kink_amp"); | ||||
| RNA_def_property_range(prop, -100000.0f, 100000.0f); | RNA_def_property_range(prop, -100000.0f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3); | RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3); | ||||
| RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset"); | RNA_def_property_ui_text(prop, "Amplitude", "The amplitude of the offset"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "kink_amplitude_clump", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "kink_amp_clump"); | RNA_def_property_float_sdna(prop, NULL, "kink_amp_clump"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Amplitude Clump", "How much clump affects kink amplitude"); | RNA_def_property_ui_text(prop, "Amplitude Clump", "How much clump affects kink amplitude"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "kink_amplitude_random", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "kink_amplitude_random", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "kink_amp_random"); | RNA_def_property_float_sdna(prop, NULL, "kink_amp_random"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Amplitude Random", "Random variation of the amplitude"); | RNA_def_property_ui_text(prop, "Amplitude Random", "Random variation of the amplitude"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "kink_frequency", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "kink_freq"); | RNA_def_property_float_sdna(prop, NULL, "kink_freq"); | ||||
| RNA_def_property_range(prop, -100000.0f, 100000.0f); | RNA_def_property_range(prop, -100000.0f, 100000.0f); | ||||
| RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3); | RNA_def_property_ui_range(prop, -10.0f, 10.0f, 0.1, 3); | ||||
| RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)"); | RNA_def_property_ui_text(prop, "Frequency", "The frequency of the offset (1/total length)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "kink_shape", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_range(prop, -0.999f, 0.999f); | RNA_def_property_range(prop, -0.999f, 0.999f); | ||||
| ▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | |||||
| /* parting */ | /* parting */ | ||||
| prop = RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_parting_factor", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "parting_fac"); | RNA_def_property_float_sdna(prop, NULL, "parting_fac"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Parting Factor", "Create parting in the children based on parent strands"); | RNA_def_property_ui_text(prop, "Parting Factor", "Create parting in the children based on parent strands"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_parting_min", PROP_FLOAT, PROP_ANGLE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "parting_min"); | RNA_def_property_float_sdna(prop, NULL, "parting_min"); | ||||
| RNA_def_property_range(prop, 0.0f, 180.0f); | RNA_def_property_range(prop, 0.0f, 180.0f); | ||||
| RNA_def_property_ui_text(prop, "Parting Minimum", | RNA_def_property_ui_text(prop, "Parting Minimum", | ||||
| "Minimum root to tip angle (tip distance/root distance for long hair)"); | "Minimum root to tip angle (tip distance/root distance for long hair)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| prop = RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "child_parting_max", PROP_FLOAT, PROP_ANGLE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "parting_max"); | RNA_def_property_float_sdna(prop, NULL, "parting_max"); | ||||
| RNA_def_property_range(prop, 0.0f, 180.0f); | RNA_def_property_range(prop, 0.0f, 180.0f); | ||||
| RNA_def_property_ui_text(prop, "Parting Maximum", | RNA_def_property_ui_text(prop, "Parting Maximum", | ||||
| "Maximum root to tip angle (tip distance/root distance for long hair)"); | "Maximum root to tip angle (tip distance/root distance for long hair)"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | RNA_def_property_update(prop, 0, "rna_Particle_redo_child"); | ||||
| /* branching */ | /* branching */ | ||||
| prop = RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "branch_threshold", PROP_FLOAT, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | |||||
| RNA_def_property_ui_text(prop, "Close Tip", "Set tip radius to zero"); | RNA_def_property_ui_text(prop, "Close Tip", "Set tip radius to zero"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | ||||
| prop = RNA_def_property(srna, "shape", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "shape", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_range(prop, -1.0f, 1.0f); | RNA_def_property_range(prop, -1.0f, 1.0f); | ||||
| RNA_def_property_ui_text(prop, "Shape", "Strand shape parameter"); | RNA_def_property_ui_text(prop, "Shape", "Strand shape parameter"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | ||||
| prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "root_radius", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "rad_root"); | RNA_def_property_float_sdna(prop, NULL, "rad_root"); | ||||
| RNA_def_property_range(prop, 0.0f, FLT_MAX); | RNA_def_property_range(prop, 0.0f, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | ||||
| RNA_def_property_ui_text(prop, "Root", "Strand width at the root"); | RNA_def_property_ui_text(prop, "Root", "Strand width at the root"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | ||||
| prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "tip_radius", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "rad_tip"); | RNA_def_property_float_sdna(prop, NULL, "rad_tip"); | ||||
| RNA_def_property_range(prop, 0.0f, FLT_MAX); | RNA_def_property_range(prop, 0.0f, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | RNA_def_property_ui_range(prop, 0.0f, 10.0f, 0.1, 2); | ||||
| RNA_def_property_ui_text(prop, "Tip", "Strand width at the tip"); | RNA_def_property_ui_text(prop, "Tip", "Strand width at the tip"); | ||||
| RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | RNA_def_property_update(prop, 0, "rna_Particle_redo"); /* TODO: Only need to tell the render engine to update. */ | ||||
| prop = RNA_def_property(srna, "radius_scale", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "radius_scale", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "rad_scale"); | RNA_def_property_float_sdna(prop, NULL, "rad_scale"); | ||||
| ▲ Show 20 Lines • Show All 446 Lines • Show Last 20 Lines | |||||
Maybe that tooltip should be changed then. Just to "Size of particles in the viewport".