mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 17:35:34 -04:00
apply_animation_parameters
This commit is contained in:
parent
6a749d658a
commit
a6bfc2a8a9
@ -1,7 +1,7 @@
|
|||||||
#begin ss_lib_target
|
#begin ss_lib_target
|
||||||
#define TARGET eggbase
|
#define TARGET eggbase
|
||||||
#define LOCAL_LIBS \
|
#define LOCAL_LIBS \
|
||||||
progbase
|
progbase converter
|
||||||
#define OTHER_LIBS \
|
#define OTHER_LIBS \
|
||||||
egg:c linmath:c panda:m
|
egg:c linmath:c panda:m
|
||||||
|
|
||||||
|
@ -317,6 +317,37 @@ apply_units_scale(EggData &data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: SomethingToEgg::apply_animation_parameters
|
||||||
|
// Access: Protected
|
||||||
|
// Description: Copies the animation parameters specified by the user
|
||||||
|
// on the command line (if add_animation_options() was
|
||||||
|
// used) to the converter.
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
void SomethingToEgg::
|
||||||
|
apply_animation_parameters(SomethingToEggConverter &converter) {
|
||||||
|
converter.set_animation_convert(_animation_convert);
|
||||||
|
converter.set_character_name(_character_name);
|
||||||
|
if (_got_start_frame) {
|
||||||
|
converter.set_start_frame(_start_frame);
|
||||||
|
}
|
||||||
|
if (_got_end_frame) {
|
||||||
|
converter.set_end_frame(_end_frame);
|
||||||
|
}
|
||||||
|
if (_got_frame_inc) {
|
||||||
|
converter.set_frame_inc(_frame_inc);
|
||||||
|
}
|
||||||
|
if (_got_neutral_frame) {
|
||||||
|
converter.set_neutral_frame(_neutral_frame);
|
||||||
|
}
|
||||||
|
if (_got_input_frame_rate) {
|
||||||
|
converter.set_input_frame_rate(_input_frame_rate);
|
||||||
|
}
|
||||||
|
if (_got_output_frame_rate) {
|
||||||
|
converter.set_output_frame_rate(_output_frame_rate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: SomethingToEgg::handle_args
|
// Function: SomethingToEgg::handle_args
|
||||||
// Access: Protected
|
// Access: Protected
|
||||||
|
@ -19,12 +19,12 @@
|
|||||||
#ifndef SOMETHINGTOEGG_H
|
#ifndef SOMETHINGTOEGG_H
|
||||||
#define SOMETHINGTOEGG_H
|
#define SOMETHINGTOEGG_H
|
||||||
|
|
||||||
#include <pandatoolbase.h>
|
#include "pandatoolbase.h"
|
||||||
|
|
||||||
#include "eggConverter.h"
|
#include "eggConverter.h"
|
||||||
|
|
||||||
#include <distanceUnit.h>
|
#include "distanceUnit.h"
|
||||||
#include <somethingToEggConverter.h>
|
#include "somethingToEggConverter.h"
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -50,6 +50,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void apply_units_scale(EggData &data);
|
void apply_units_scale(EggData &data);
|
||||||
|
void apply_animation_parameters(SomethingToEggConverter &converter);
|
||||||
|
|
||||||
virtual bool handle_args(Args &args);
|
virtual bool handle_args(Args &args);
|
||||||
virtual bool post_command_line();
|
virtual bool post_command_line();
|
||||||
|
@ -99,26 +99,7 @@ run() {
|
|||||||
converter._ignore_transforms = _ignore_transforms;
|
converter._ignore_transforms = _ignore_transforms;
|
||||||
|
|
||||||
// Copy in the animation parameters.
|
// Copy in the animation parameters.
|
||||||
converter.set_animation_convert(_animation_convert);
|
apply_animation_parameters(converter);
|
||||||
converter.set_character_name(_character_name);
|
|
||||||
if (_got_start_frame) {
|
|
||||||
converter.set_start_frame(_start_frame);
|
|
||||||
}
|
|
||||||
if (_got_end_frame) {
|
|
||||||
converter.set_end_frame(_end_frame);
|
|
||||||
}
|
|
||||||
if (_got_frame_inc) {
|
|
||||||
converter.set_frame_inc(_frame_inc);
|
|
||||||
}
|
|
||||||
if (_got_neutral_frame) {
|
|
||||||
converter.set_neutral_frame(_neutral_frame);
|
|
||||||
}
|
|
||||||
if (_got_input_frame_rate) {
|
|
||||||
converter.set_input_frame_rate(_input_frame_rate);
|
|
||||||
}
|
|
||||||
if (_got_output_frame_rate) {
|
|
||||||
converter.set_output_frame_rate(_output_frame_rate);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the coordinate system to match Maya's.
|
// Set the coordinate system to match Maya's.
|
||||||
if (!_got_coordinate_system) {
|
if (!_got_coordinate_system) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user