brushexport plugin: make t_limitmatnames, t_objects options available with t_exportmaterials off
This commit is contained in:
parent
234f50f58d
commit
26d33ce5c8
|
|
@ -11,7 +11,6 @@
|
|||
void DestroyWindow();
|
||||
|
||||
//! TODO add tooltip for ignore: shader name after last slash, case sensitive // or make insensitive
|
||||
//! TODO make togglebuttons inactive on !exportmat
|
||||
//! TODO add ignore mat on ENTER, del on del
|
||||
//! TODO add entry with path to save to (to resave faster)
|
||||
//! TODO ignore case in mat name comparison materials_comparator
|
||||
|
|
@ -79,27 +78,20 @@ void OnExportClicked( GtkButton* button, gpointer user_data ){
|
|||
}
|
||||
}
|
||||
|
||||
GtkWidget* toggle;
|
||||
// export materials?
|
||||
GtkWidget* toggle = lookup_widget( GTK_WIDGET( button ), "t_exportmaterials" );
|
||||
ASSERT_NOTNULL( toggle );
|
||||
|
||||
ASSERT_NOTNULL( ( toggle = lookup_widget( GTK_WIDGET( button ), "t_exportmaterials" ) ) );
|
||||
const bool exportmat = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) );
|
||||
|
||||
// limit material names?
|
||||
toggle = lookup_widget( GTK_WIDGET( button ), "t_limitmatnames" );
|
||||
ASSERT_NOTNULL( toggle );
|
||||
|
||||
const bool limitMatNames = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) ) && exportmat;
|
||||
ASSERT_NOTNULL( ( toggle = lookup_widget( GTK_WIDGET( button ), "t_limitmatnames" ) ) );
|
||||
const bool limitMatNames = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) );
|
||||
|
||||
// create objects instead of groups?
|
||||
toggle = lookup_widget( GTK_WIDGET( button ), "t_objects" );
|
||||
ASSERT_NOTNULL( toggle );
|
||||
|
||||
const bool objects = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) ) && exportmat;
|
||||
|
||||
toggle = lookup_widget( GTK_WIDGET( button ), "t_weld" );
|
||||
ASSERT_NOTNULL( toggle );
|
||||
ASSERT_NOTNULL( ( toggle = lookup_widget( GTK_WIDGET( button ), "t_objects" ) ) );
|
||||
const bool objects = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) );
|
||||
|
||||
ASSERT_NOTNULL( ( toggle = lookup_widget( GTK_WIDGET( button ), "t_weld" ) ) );
|
||||
const bool weld = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( toggle ) );
|
||||
|
||||
// export
|
||||
|
|
@ -131,18 +123,4 @@ void OnRemoveMaterial( GtkButton* button, gpointer user_data ){
|
|||
}
|
||||
}
|
||||
|
||||
void OnExportMatClicked( GtkButton* button, gpointer user_data ){
|
||||
GtkWidget* toggleLimit = lookup_widget( GTK_WIDGET( button ), "t_limitmatnames" );
|
||||
GtkWidget* toggleObject = lookup_widget( GTK_WIDGET( button ), "t_objects" );
|
||||
|
||||
if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( button ) ) ) {
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( toggleLimit ), TRUE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( toggleObject ), TRUE );
|
||||
}
|
||||
else {
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( toggleLimit ), FALSE );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET( toggleObject ), FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
} // callbacks
|
||||
|
|
|
|||
|
|
@ -7,6 +7,5 @@ void OnDestroy( GtkWidget *, gpointer );
|
|||
void OnExportClicked( GtkButton *, gpointer );
|
||||
void OnAddMaterial( GtkButton *, gpointer );
|
||||
void OnRemoveMaterial( GtkButton *, gpointer );
|
||||
void OnExportMatClicked( GtkButton * button, gpointer );
|
||||
|
||||
} // callbacks
|
||||
|
|
|
|||
|
|
@ -159,7 +159,6 @@ create_w_plugplug2( void ){
|
|||
g_signal_connect( ( gpointer )b_export, "clicked", G_CALLBACK( OnExportClicked ), NULL );
|
||||
g_signal_connect( ( gpointer )b_addmaterial, "clicked", G_CALLBACK( OnAddMaterial ), NULL );
|
||||
g_signal_connect( ( gpointer )b_removematerial, "clicked", G_CALLBACK( OnRemoveMaterial ), NULL );
|
||||
g_signal_connect( ( gpointer )t_exportmaterials, "clicked", G_CALLBACK( OnExportMatClicked ), NULL );
|
||||
|
||||
/* Store pointers to all widgets, for use by lookup_widget(). */
|
||||
GLADE_HOOKUP_OBJECT_NO_REF( w_plugplug2, w_plugplug2, "w_plugplug2" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user