mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
allow -drop to override -keepall
This commit is contained in:
parent
a6df37d6b0
commit
1f2e53d747
@ -113,7 +113,8 @@ EggOptchar() {
|
|||||||
|
|
||||||
add_option
|
add_option
|
||||||
("keepall", "", 0,
|
("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);
|
&EggOptchar::dispatch_none, &_keep_all);
|
||||||
|
|
||||||
add_option
|
add_option
|
||||||
@ -428,7 +429,12 @@ determine_removed_components() {
|
|||||||
nassertv(user_data != (EggOptcharUserData *)NULL);
|
nassertv(user_data != (EggOptcharUserData *)NULL);
|
||||||
|
|
||||||
const string &name = comp_data->get_name();
|
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.
|
// Keep this component.
|
||||||
names_used.insert(name);
|
names_used.insert(name);
|
||||||
|
|
||||||
@ -437,11 +443,6 @@ determine_removed_components() {
|
|||||||
user_data->_flags |= EggOptcharUserData::F_expose;
|
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 {
|
} else {
|
||||||
// Remove this component if it's unanimated or empty.
|
// Remove this component if it's unanimated or empty.
|
||||||
if ((user_data->_flags & (EggOptcharUserData::F_static | EggOptcharUserData::F_empty)) != 0) {
|
if ((user_data->_flags & (EggOptcharUserData::F_static | EggOptcharUserData::F_empty)) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user