Radiant:
misc... * restrict unwanted angle(s) keys commits on moving generic, eclassmodel, miscmodel entities * reverted angle(s), origin, scale entity keys save format from %f to %g * fix uniform rotation operations for generic entities with angles key * use more precise meth for rotating point entities with only angle rotated * snap tiny inaccuracies in angle(s) and origin point entities keys * workaround: don't discard empty group ents, having origin key * entity class convertion: prevent converting worldspawn; prevent converting point entity to empty group
This commit is contained in:
@@ -93,7 +93,18 @@ void post( const scene::Path& path, scene::Instance& instance ) const {
|
||||
Entity* entity = Node_getEntity( path.top() );
|
||||
if ( entity != 0
|
||||
&& ( instance.childSelected() || Instance_getSelectable( instance )->isSelected() ) ) {
|
||||
NodeSmartReference node( GlobalEntityCreator().createEntity( GlobalEntityClassManager().findOrInsert( m_classname, node_is_group( path.top() ) ) ) );
|
||||
if( string_equal_nocase( entity->getKeyValue( "classname" ), "worldspawn" ) ){
|
||||
globalErrorStream() << "do not want to convert worldspawn entity\n";
|
||||
return;
|
||||
}
|
||||
|
||||
EntityClass* eclass = GlobalEntityClassManager().findOrInsert( m_classname, node_is_group( path.top() ) );
|
||||
if( !eclass->fixedsize && !entity->isContainer() ){
|
||||
globalErrorStream() << "can't convert point to group entity\n";
|
||||
return;
|
||||
}
|
||||
//NodeSmartReference node( GlobalEntityCreator().createEntity( GlobalEntityClassManager().findOrInsert( m_classname, node_is_group( path.top() ) ) ) );
|
||||
NodeSmartReference node( GlobalEntityCreator().createEntity( eclass ) );
|
||||
|
||||
EntityCopyingVisitor visitor( *Node_getEntity( node ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user