diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-05 23:27:21 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-09-05 23:27:21 +0400 |
commit | a6d9a5a972595c898e596deb95eb683430621188 (patch) | |
tree | 0d51b5391d831c16aa7108095e6b5b1380d918ff /source/blender/makesrna/intern | |
parent | 76ddf6d2ee97bf51290492d4c692dd8ca031182c (diff) |
Code cleanup: warning fixes.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 95 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 16 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_texture.c | 2 |
3 files changed, 9 insertions, 104 deletions
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 5eccba16c3d..3d0e177c94e 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -323,30 +323,6 @@ static void rna_Actuator_constraint_detect_material_set(struct PointerRNA *ptr, } } -static void rna_FcurveActuator_add_set(struct PointerRNA *ptr, int value) -{ - bActuator *act = (bActuator *)ptr->data; - bIpoActuator *ia = act->data; - - if(value == 1){ - ia->flag &= ~ACT_IPOFORCE; - ia->flag |= ACT_IPOADD; - }else - ia->flag &= ~ACT_IPOADD; -} - -static void rna_FcurveActuator_force_set(struct PointerRNA *ptr, int value) -{ - bActuator *act = (bActuator *)ptr->data; - bIpoActuator *ia = act->data; - - if(value == 1){ - ia->flag &= ~ACT_IPOADD; - ia->flag |= ACT_IPOFORCE; - }else - ia->flag &= ~ACT_IPOFORCE; -} - static void rna_ActionActuator_add_set(struct PointerRNA *ptr, int value) { bActuator *act = (bActuator *)ptr->data; @@ -858,77 +834,6 @@ static void rna_def_object_actuator(BlenderRNA *brna) RNA_def_property_update(prop, NC_LOGIC, NULL); } -/* The fcurve actuator has been replace with the action actuator, so this is no longer used */ -static void rna_def_fcurve_actuator(BlenderRNA *brna) -{ - StructRNA *srna; - PropertyRNA *prop; - - static EnumPropertyItem prop_type_items[] ={ - {ACT_IPO_PLAY, "PLAY", 0, "Play", ""}, - {ACT_IPO_PINGPONG, "PINGPONG", 0, "Ping Pong", ""}, - {ACT_IPO_FLIPPER, "FLIPPER", 0, "Flipper", ""}, - {ACT_IPO_LOOP_STOP, "STOP", 0, "Loop Stop", ""}, - {ACT_IPO_LOOP_END, "END", 0, "Loop End", ""}, -// {ACT_IPO_KEY2KEY, "IPOCHILD", 0, "Key to Key", ""}, - {ACT_IPO_FROM_PROP, "PROP", 0, "Property", ""}, - {0, NULL, 0, NULL, NULL}}; - - srna= RNA_def_struct(brna, "FCurveActuator", "Actuator"); - RNA_def_struct_ui_text(srna, "F-Curve Actuator", "Actuator to animate the object"); - RNA_def_struct_sdna_from(srna, "bIpoActuator", "data"); - - prop= RNA_def_property(srna, "play_type", PROP_ENUM, PROP_NONE); - RNA_def_property_enum_sdna(prop, NULL, "type"); - RNA_def_property_enum_items(prop, prop_type_items); - RNA_def_property_ui_text(prop, "F-Curve Type", "Specify the way you want to play the animation"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "sta"); - RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); - RNA_def_property_ui_text(prop, "Start Frame", ""); - RNA_def_property_update(prop, NC_SCENE, NULL); - - prop= RNA_def_property(srna, "frame_end", PROP_FLOAT, PROP_NONE); - RNA_def_property_float_sdna(prop, NULL, "end"); - RNA_def_property_ui_range(prop, 1.0, MAXFRAME, 100, 2); - RNA_def_property_ui_text(prop, "End Frame", ""); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "property", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "name"); - RNA_def_property_ui_text(prop, "Property", "Use this property to define the F-Curve position"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "frame_property", PROP_STRING, PROP_NONE); - RNA_def_property_string_sdna(prop, NULL, "frameProp"); - RNA_def_property_ui_text(prop, "Frame Property", "Assign the action's current frame number to this property"); - - /* booleans */ - prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOADD); - RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_add_set"); - RNA_def_property_ui_text(prop, "Add", "F-Curve is added to the current loc/rot/scale in global or local coordinate according to Local flag"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "use_force", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOFORCE); - RNA_def_property_boolean_funcs(prop, NULL, "rna_FcurveActuator_force_set"); - RNA_def_property_ui_text(prop, "Force", "Apply F-Curve as a global or local force depending on the local option (dynamic objects only)"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "use_local", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOLOCAL); - RNA_def_property_ui_text(prop, "L", "Let the F-Curve act in local coordinates, used in Force and Add mode"); - RNA_def_property_update(prop, NC_LOGIC, NULL); - - prop= RNA_def_property(srna, "apply_to_children", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_IPOCHILD); - RNA_def_property_ui_text(prop, "Child", "Update F-Curve on all children Objects as well"); - RNA_def_property_update(prop, NC_LOGIC, NULL); -} - static void rna_def_camera_actuator(BlenderRNA *brna) { StructRNA *srna; diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index ba91fc3536b..77fa975761f 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -51,34 +51,34 @@ #include "WM_types.h" #include "WM_api.h" -static EnumPropertyItem part_from_items[] = { +EnumPropertyItem part_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_reactor_from_items[] = { +EnumPropertyItem part_reactor_from_items[] = { {PART_FROM_VERT, "VERT", 0, "Verts", ""}, {PART_FROM_FACE, "FACE", 0, "Faces", ""}, {PART_FROM_VOLUME, "VOLUME", 0, "Volume", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_dist_items[] = { +EnumPropertyItem part_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {PART_DISTR_GRID, "GRID", 0, "Grid", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_dist_items[] = { +EnumPropertyItem part_hair_dist_items[] = { {PART_DISTR_JIT, "JIT", 0, "Jittered", ""}, {PART_DISTR_RAND, "RAND", 0, "Random", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_draw_as_items[] = { +EnumPropertyItem part_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_DOT, "DOT", 0, "Point", ""}, @@ -88,14 +88,14 @@ static EnumPropertyItem part_draw_as_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_draw_as_items[] = { +EnumPropertyItem part_hair_draw_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_REND, "RENDER", 0, "Rendered", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_ren_as_items[] = { +EnumPropertyItem part_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_HALO, "HALO", 0, "Halo", ""}, {PART_DRAW_LINE, "LINE", 0, "Line", ""}, @@ -106,7 +106,7 @@ static EnumPropertyItem part_ren_as_items[] = { {0, NULL, 0, NULL, NULL} }; -static EnumPropertyItem part_hair_ren_as_items[] = { +EnumPropertyItem part_hair_ren_as_items[] = { {PART_DRAW_NOT, "NONE", 0, "None", ""}, {PART_DRAW_PATH, "PATH", 0, "Path", ""}, {PART_DRAW_OB, "OBJECT", 0, "Object", ""}, diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c index a1ce77b061d..503212201c4 100644 --- a/source/blender/makesrna/intern/rna_texture.c +++ b/source/blender/makesrna/intern/rna_texture.c @@ -48,7 +48,7 @@ #include "BKE_node.h" -static EnumPropertyItem texture_filter_items[] = { +EnumPropertyItem texture_filter_items[] = { {TXF_BOX, "BOX", 0, "Box", ""}, {TXF_EWA, "EWA", 0, "EWA", ""}, {TXF_FELINE, "FELINE", 0, "FELINE", ""}, |