diff options
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_actuator_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 36 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_IpoActuator.cpp | 12 |
4 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 9eae26ef8bb..ae533e80610 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -2030,8 +2030,8 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo } else { - uiDefButI(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame"); - uiDefButI(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame"); + uiDefButF(block, NUM, 0, "Sta: ",xco+10, yco-44, (width-20)/2, 19, &aa->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame"); + uiDefButF(block, NUM, 0, "End: ",xco+10+(width-20)/2, yco-44, (width-20)/2, 19, &aa->end, 1.0, MAXFRAMEF, 0, 0, "End frame"); } uiDefButS(block, NUM, 0, "Blendin: ", xco+10, yco-64, (width-20)/2, 19, &aa->blendin, 0.0, 32767, 0.0, 0.0, "Number of frames of motion blending"); @@ -2092,11 +2092,11 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo "Use this property to define the Ipo position"); } else { - uiDefButI(block, NUM, 0, + uiDefButF(block, NUM, 0, "Sta", xco+10, yco-44, (width-80)/2, 19, &ia->sta, 1.0, MAXFRAMEF, 0, 0, "Start frame"); - uiDefButI(block, NUM, 0, + uiDefButF(block, NUM, 0, "End", xco+10+(width-80)/2, yco-44, (width-80)/2, 19, &ia->end, 1.0, MAXFRAMEF, 0, 0, "End frame"); diff --git a/source/blender/makesdna/DNA_actuator_types.h b/source/blender/makesdna/DNA_actuator_types.h index 077c62943e0..20fdb5eee41 100644 --- a/source/blender/makesdna/DNA_actuator_types.h +++ b/source/blender/makesdna/DNA_actuator_types.h @@ -48,7 +48,7 @@ typedef struct bAddObjectActuator { typedef struct bActionActuator { struct bAction *act; /* Pointer to action */ short type, flag; /* Playback type */ // not in use - int sta, end; /* Start & End frames */ + float sta, end; /* Start & End frames */ char name[32]; /* For property-driven playback */ char frameProp[32]; /* Set this property to the actions current frame */ short blendin; /* Number of frames of blending */ @@ -119,7 +119,7 @@ typedef struct bObjectActuator { typedef struct bIpoActuator { short flag, type; - int sta, end; + float sta, end; char name[32]; char frameProp[32]; /* Set this property to the actions current frame */ diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index f084e79d81f..0fe8483dfac 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -587,15 +587,15 @@ static void rna_def_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_range(prop, 0, MAXFRAME); + 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, 0.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_range(prop, 0, MAXFRAME); + 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, 0.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); @@ -834,15 +834,15 @@ static void rna_def_fcurve_actuator(BlenderRNA *brna) 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_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1); + 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_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_ui_range(prop, 1, MAXFRAME, 1, 1); + 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); @@ -1816,15 +1816,15 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Property", "Use this property to define the Action position"); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "sta"); - RNA_def_property_range(prop, 0, MAXFRAME); + 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, 0.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "Start Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); - prop= RNA_def_property(srna, "frame_end", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "end"); - RNA_def_property_range(prop, 0, MAXFRAME); + 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, 0.0, MAXFRAME, 100, 2); RNA_def_property_ui_text(prop, "End Frame", ""); RNA_def_property_update(prop, NC_LOGIC, NULL); diff --git a/source/gameengine/Ketsji/KX_IpoActuator.cpp b/source/gameengine/Ketsji/KX_IpoActuator.cpp index 7bc85f5f262..d6ff1ee822e 100644 --- a/source/gameengine/Ketsji/KX_IpoActuator.cpp +++ b/source/gameengine/Ketsji/KX_IpoActuator.cpp @@ -456,16 +456,16 @@ PyAttributeDef KX_IpoActuator::Attributes[] = { PyObject* KX_IpoActuator::pyattr_get_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_IpoActuator* self= static_cast<KX_IpoActuator*>(self_v); - return PyLong_FromDouble(self->m_startframe); + return PyFloat_FromDouble(self->m_startframe); } int KX_IpoActuator::pyattr_set_frame_start(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { KX_IpoActuator* self= static_cast<KX_IpoActuator*>(self_v); - float param = PyLong_AsDouble(value); + float param = PyFloat_AsDouble(value); if (PyErr_Occurred()) { - PyErr_SetString(PyExc_AttributeError, "frameStart = integer: KX_IpoActuator, expected an integer value"); + PyErr_SetString(PyExc_AttributeError, "frameStart = float: KX_IpoActuator, expected a float value"); return PY_SET_ATTR_FAIL; } @@ -477,16 +477,16 @@ int KX_IpoActuator::pyattr_set_frame_start(void *self_v, const KX_PYATTRIBUTE_DE PyObject* KX_IpoActuator::pyattr_get_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef) { KX_IpoActuator* self= static_cast<KX_IpoActuator*>(self_v); - return PyLong_FromDouble(self->m_endframe); + return PyFloat_FromDouble(self->m_endframe); } int KX_IpoActuator::pyattr_set_frame_end(void *self_v, const KX_PYATTRIBUTE_DEF *attrdef, PyObject *value) { KX_IpoActuator* self= static_cast<KX_IpoActuator*>(self_v); - float param = PyLong_AsDouble(value); + float param = PyFloat_AsDouble(value); if (PyErr_Occurred()) { - PyErr_SetString(PyExc_AttributeError, "frameEnd = integer: KX_IpoActuator, expected an integer value"); + PyErr_SetString(PyExc_AttributeError, "frameEnd = float: KX_IpoActuator, expected a float value"); return PY_SET_ATTR_FAIL; } |