Code cleanup: warning fixes.
This commit is contained in:
@@ -45,7 +45,7 @@ extern "C" {
|
||||
#define MALWAYS_INLINE MINLINE
|
||||
#else
|
||||
#define MINLINE static inline
|
||||
#define MALWAYS_INLINE static __attribute__((always_inline))
|
||||
#define MALWAYS_INLINE static inline __attribute__((always_inline))
|
||||
#endif
|
||||
#else
|
||||
#define MINLINE
|
||||
|
||||
@@ -643,6 +643,8 @@ std::string AnimationExporter::create_source_from_fcurve(COLLADASW::InputSemanti
|
||||
case COLLADASW::InputSemantic::OUT_TANGENT:
|
||||
source.setAccessorStride(2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -913,7 +915,7 @@ std::string AnimationExporter::get_light_param_sid(char *rna_path, int tm_type,
|
||||
}
|
||||
|
||||
if (tm_name.size()) {
|
||||
if (axis_name != "")
|
||||
if (axis_name[0])
|
||||
return tm_name + "." + std::string(axis_name);
|
||||
else
|
||||
return tm_name;
|
||||
@@ -962,7 +964,7 @@ std::string AnimationExporter::get_camera_param_sid(char *rna_path, int tm_type,
|
||||
}
|
||||
|
||||
if (tm_name.size()) {
|
||||
if (axis_name != "")
|
||||
if (axis_name[0])
|
||||
return tm_name + "." + std::string(axis_name);
|
||||
else
|
||||
return tm_name;
|
||||
@@ -1041,7 +1043,7 @@ std::string AnimationExporter::get_transform_sid(char *rna_path, int tm_type, co
|
||||
if (is_rotation)
|
||||
return tm_name + std::string(axis_name) + ".ANGLE";
|
||||
else
|
||||
if (axis_name != "")
|
||||
if (axis_name[0])
|
||||
return tm_name + "." + std::string(axis_name);
|
||||
else
|
||||
return tm_name;
|
||||
|
||||
@@ -90,12 +90,6 @@ void AnimationImporter::animation_to_fcurves(COLLADAFW::AnimationCurve *curve)
|
||||
COLLADAFW::FloatOrDoubleArray& input = curve->getInputValues();
|
||||
COLLADAFW::FloatOrDoubleArray& output = curve->getOutputValues();
|
||||
|
||||
if( curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_BEZIER ||
|
||||
curve->getInterpolationType() == COLLADAFW::AnimationCurve::INTERPOLATION_STEP ) {
|
||||
COLLADAFW::FloatOrDoubleArray& intan = curve->getInTangentValues();
|
||||
COLLADAFW::FloatOrDoubleArray& outtan = curve->getOutTangentValues();
|
||||
}
|
||||
|
||||
float fps = (float)FPS;
|
||||
size_t dim = curve->getOutDimension();
|
||||
unsigned int i;
|
||||
@@ -572,7 +566,7 @@ void AnimationImporter:: Assign_transform_animations(COLLADAFW::Transformation *
|
||||
}
|
||||
|
||||
//creates the rna_paths and array indices of fcurves from animations using color and bound animation class of each animation.
|
||||
void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type)
|
||||
void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,const char * anim_type)
|
||||
{
|
||||
char rna_path[100];
|
||||
BLI_strncpy(rna_path,anim_type, sizeof(rna_path));
|
||||
@@ -615,7 +609,7 @@ void AnimationImporter:: Assign_color_animations(const COLLADAFW::UniqueId& list
|
||||
|
||||
}
|
||||
|
||||
void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type)
|
||||
void AnimationImporter:: Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type)
|
||||
{
|
||||
char rna_path[100];
|
||||
if (animlist_map.find(listid) == animlist_map.end()) return ;
|
||||
@@ -803,7 +797,6 @@ void AnimationImporter::translate_Animations ( COLLADAFW::Node * node ,
|
||||
}
|
||||
|
||||
bAction * act;
|
||||
bActionGroup *grp = NULL;
|
||||
|
||||
if ( (animType->transform) != 0 )
|
||||
{
|
||||
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
const COLLADAFW::AnimationList::AnimationBinding * binding,
|
||||
std::vector<FCurve*>* curves, bool is_joint, char * joint_path);
|
||||
|
||||
void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves ,char * anim_type);
|
||||
void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, char * anim_type);
|
||||
void Assign_color_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
|
||||
void Assign_float_animations(const COLLADAFW::UniqueId& listid, ListBase *AnimCurves, const char * anim_type);
|
||||
|
||||
int setAnimType ( const COLLADAFW::Animatable * prop , int type, int addition);
|
||||
|
||||
|
||||
@@ -95,8 +95,6 @@ void ArmatureImporter::create_unskinned_bone( COLLADAFW::Node *node, EditBone *p
|
||||
EditBone *bone = ED_armature_edit_bone_add((bArmature*)ob_arm->data, (char*)bc_get_joint_name(node));
|
||||
totbone++;
|
||||
|
||||
bPoseChannel *pchan = get_pose_channel(ob_arm->pose, (char*)bc_get_joint_name(node));
|
||||
|
||||
if (parent) bone->parent = parent;
|
||||
|
||||
float angle = 0;
|
||||
@@ -280,8 +278,6 @@ void ArmatureImporter::add_leaf_bone(float mat[][4], EditBone *bone, COLLADAFW:
|
||||
copy_m4_m4(leaf.mat, mat);
|
||||
BLI_strncpy(leaf.name, bone->name, sizeof(leaf.name));
|
||||
|
||||
float vec[3];
|
||||
|
||||
TagsMap::iterator etit;
|
||||
ExtraTags *et = 0;
|
||||
etit = uid_tags_map.find(node->getUniqueId().toAscii());
|
||||
@@ -579,7 +575,6 @@ void ArmatureImporter::set_pose ( Object * ob_arm , COLLADAFW::Node * root_node
|
||||
float mat[4][4];
|
||||
float obmat[4][4];
|
||||
|
||||
bArmature * arm = (bArmature * ) ob_arm-> data ;
|
||||
float ax[3];
|
||||
float angle = NULL;
|
||||
|
||||
|
||||
@@ -240,15 +240,15 @@ void DocumentImporter::translate_anim_recursive(COLLADAFW::Node *node, COLLADAFW
|
||||
root_map[node->getUniqueId()] = root_map[par->getUniqueId()];
|
||||
}
|
||||
|
||||
COLLADAFW::Transformation::TransformationType types[] = {
|
||||
/*COLLADAFW::Transformation::TransformationType types[] = {
|
||||
COLLADAFW::Transformation::ROTATE,
|
||||
COLLADAFW::Transformation::SCALE,
|
||||
COLLADAFW::Transformation::TRANSLATE,
|
||||
COLLADAFW::Transformation::MATRIX
|
||||
};
|
||||
|
||||
Object *ob;*/
|
||||
unsigned int i;
|
||||
Object *ob;
|
||||
|
||||
//for (i = 0; i < 4; i++)
|
||||
//ob =
|
||||
|
||||
@@ -37,7 +37,6 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m
|
||||
{
|
||||
float cur[4][4];
|
||||
float copy[4][4];
|
||||
float eul[3];
|
||||
|
||||
unit_m4(mat);
|
||||
|
||||
|
||||
@@ -3989,40 +3989,6 @@ static void draw_actuator_game(uiLayout *layout, PointerRNA *ptr)
|
||||
uiItemR(layout, ptr, "filename", 0, NULL, ICON_NONE);
|
||||
}
|
||||
|
||||
/* The IPO/Fcurve actuator has been deprecated, so this is no longer used */
|
||||
static void draw_actuator_ipo(uiLayout *layout, PointerRNA *ptr)
|
||||
{
|
||||
Object *ob;
|
||||
PointerRNA settings_ptr;
|
||||
uiLayout *row, *subrow, *col;
|
||||
|
||||
ob = (Object *)ptr->id.data;
|
||||
RNA_pointer_create((ID *)ob, &RNA_GameObjectSettings, ob, &settings_ptr);
|
||||
|
||||
row= uiLayoutRow(layout, 0);
|
||||
uiItemR(row, ptr, "play_type", 0, "", ICON_NONE);
|
||||
subrow= uiLayoutRow(row, 1);
|
||||
uiItemR(subrow, ptr, "use_force", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
|
||||
uiItemR(subrow, ptr, "use_additive", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
|
||||
|
||||
col = uiLayoutColumn(subrow, 0);
|
||||
uiLayoutSetActive(col, (RNA_boolean_get(ptr, "use_additive") || RNA_boolean_get(ptr, "use_force")));
|
||||
uiItemR(col, ptr, "use_local", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
|
||||
|
||||
row= uiLayoutRow(layout, 0);
|
||||
if((RNA_enum_get(ptr, "play_type") == ACT_IPO_FROM_PROP))
|
||||
uiItemPointerR(row, ptr, "property", &settings_ptr, "properties", NULL, ICON_NONE);
|
||||
|
||||
else {
|
||||
uiItemR(row, ptr, "frame_start", 0, NULL, ICON_NONE);
|
||||
uiItemR(row, ptr, "frame_end", 0, NULL, ICON_NONE);
|
||||
}
|
||||
uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NONE);
|
||||
|
||||
row= uiLayoutRow(layout, 0);
|
||||
uiItemPointerR(row, ptr, "frame_property", &settings_ptr, "properties", NULL, ICON_NONE);
|
||||
}
|
||||
|
||||
static void draw_actuator_message(uiLayout *layout, PointerRNA *ptr, bContext *C)
|
||||
{
|
||||
Object *ob;
|
||||
|
||||
@@ -36,6 +36,9 @@
|
||||
#include <netinet/in.h> /* htonl() */
|
||||
#endif
|
||||
#include <string.h> /* memset */
|
||||
|
||||
#include "BLI_utildefines.h"
|
||||
|
||||
#include "cin_debug_stuff.h"
|
||||
#include "logmemfile.h"
|
||||
|
||||
@@ -288,7 +291,7 @@ initCineonGenericHeader(CineonFile* cineon, CineonGenericHeader* header, const c
|
||||
}
|
||||
|
||||
static void
|
||||
dumpCineonGenericHeader(CineonGenericHeader* header) {
|
||||
UNUSED_FUNCTION(dumpCineonGenericHeader)(CineonGenericHeader* header) {
|
||||
dumpCineonFileInfo(&header->fileInfo);
|
||||
dumpCineonImageInfo(&header->imageInfo);
|
||||
dumpCineonFormatInfo(&header->formatInfo);
|
||||
|
||||
@@ -38,8 +38,12 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "BLO_sys_types.h" // for intptr_t support
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#undef ntohl
|
||||
#undef htonl
|
||||
#endif
|
||||
|
||||
typedef int (GetRowFn)(LogImageFile* logImage, unsigned short* row, int lineNum);
|
||||
typedef int (SetRowFn)(LogImageFile* logImage, const unsigned short* row, int lineNum);
|
||||
typedef void (CloseFn)(LogImageFile* logImage);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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", ""},
|
||||
|
||||
@@ -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", ""},
|
||||
|
||||
@@ -95,7 +95,6 @@ if(WITH_CODEC_FFMPEG)
|
||||
${PTHREADS_INCLUDE_DIRS}
|
||||
)
|
||||
add_definitions(-DWITH_FFMPEG)
|
||||
add_definitions(-D__STDC_CONSTANT_MACROS)
|
||||
endif()
|
||||
|
||||
blender_add_lib(ge_videotex "${SRC}" "${INC}" "${INC_SYS}")
|
||||
|
||||
Reference in New Issue
Block a user