mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 09:23:03 -04:00
allow -drop to override -keepall
This commit is contained in:
parent
a6df37d6b0
commit
1f2e53d747
@ -113,7 +113,8 @@ EggOptchar() {
|
||||
|
||||
add_option
|
||||
("keepall", "", 0,
|
||||
"Keep all joints and sliders in the character.",
|
||||
"Keep all joints and sliders in the character, except those named "
|
||||
"explicitly by -drop.",
|
||||
&EggOptchar::dispatch_none, &_keep_all);
|
||||
|
||||
add_option
|
||||
@ -428,7 +429,12 @@ determine_removed_components() {
|
||||
nassertv(user_data != (EggOptcharUserData *)NULL);
|
||||
|
||||
const string &name = comp_data->get_name();
|
||||
if (_keep_all || keep_names.find(name) != keep_names.end()) {
|
||||
if (drop_names.find(name) != drop_names.end()) {
|
||||
// Remove this component by user request.
|
||||
names_used.insert(name);
|
||||
user_data->_flags |= EggOptcharUserData::F_remove;
|
||||
|
||||
} else if (_keep_all || keep_names.find(name) != keep_names.end()) {
|
||||
// Keep this component.
|
||||
names_used.insert(name);
|
||||
|
||||
@ -437,11 +443,6 @@ determine_removed_components() {
|
||||
user_data->_flags |= EggOptcharUserData::F_expose;
|
||||
}
|
||||
|
||||
} else if (drop_names.find(name) != drop_names.end()) {
|
||||
// Remove this component by user request.
|
||||
names_used.insert(name);
|
||||
user_data->_flags |= EggOptcharUserData::F_remove;
|
||||
|
||||
} else {
|
||||
// Remove this component if it's unanimated or empty.
|
||||
if ((user_data->_flags & (EggOptcharUserData::F_static | EggOptcharUserData::F_empty)) != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user