コード例 #1
0
void insertCurveControlPoints(const cmd::ArgumentList& args) {
	if (GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ||
		GlobalSelectionSystem().ComponentMode() != SelectionSystem::eVertex)
	{
		gtkutil::errorDialog(
			_("Can't insert curve points - must be in vertex editing mode."), 
			GlobalMainFrame().getTopLevelWindow()
		);
		return;
	}
	
	const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo();
	
	if (info.entityCount > 0) {
		UndoableCommand command("curveInsertControlPoints");
		
		// The functor object 
		CurveControlPointInserter inserter;
		
		// Traverse the selection applying the functor
		GlobalSelectionSystem().foreachSelected(
			SelectedCurveVisitor(inserter)
		);
	}
	else {
		gtkutil::errorDialog(
			_("Can't insert curve points - no entities with curves selected."), 
			GlobalMainFrame().getTopLevelWindow()
		);
	}
}
コード例 #2
0
ファイル: Curves.cpp プロジェクト: BielBdeLuna/DarkRadiant
void removeCurveControlPoints(const cmd::ArgumentList& args) {
	if (GlobalSelectionSystem().Mode() != SelectionSystem::eComponent ||
		GlobalSelectionSystem().ComponentMode() != SelectionSystem::eVertex)
	{
		wxutil::Messagebox::ShowError(
			_("Can't remove curve points - must be in vertex editing mode.")
		);
		return;
	}

	const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo();

	if (info.entityCount > 0) {
		UndoableCommand command("curveRemoveControlPoints");

		// The functor object
		CurveControlPointRemover remover;

		// Traverse the selection applying the functor
		GlobalSelectionSystem().foreachSelected(
			SelectedCurveVisitor(remover)
		);
	}
	else {
		wxutil::Messagebox::ShowError(
			_("Can't remove curve points - no entities with curves selected.")
		);
	}
}
コード例 #3
0
ファイル: Curves.cpp プロジェクト: BielBdeLuna/DarkRadiant
void convertCurveTypes(const cmd::ArgumentList& args) {
	const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo();

	if (info.entityCount > 0) {
		UndoableCommand command("curveConvertType");

		// The functor object
		CurveConverter converter;

		// Traverse the selection applying the functor
		GlobalSelectionSystem().foreachSelected(
			SelectedCurveVisitor(converter)
		);
	}
	else {
		wxutil::Messagebox::ShowError(
			_("Can't convert curves - no entities with curves selected.")
		);
	}
}
コード例 #4
0
ファイル: Curves.cpp プロジェクト: BielBdeLuna/DarkRadiant
void appendCurveControlPoint(const cmd::ArgumentList& args) {
	const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo();

	if (info.entityCount > 0) {
		UndoableCommand command("curveAppendControlPoint");

		// The functor object
		CurveControlPointAppender appender;

		// Traverse the selection applying the functor
		GlobalSelectionSystem().foreachSelected(
			SelectedCurveVisitor(appender)
		);
	}
	else {
		wxutil::Messagebox::ShowError(
			_("Can't append curve point - no entities with curve selected.")
		);
	}
}
コード例 #5
0
void appendCurveControlPoint(const cmd::ArgumentList& args) {
	const SelectionInfo& info = GlobalSelectionSystem().getSelectionInfo();
	
	if (info.entityCount > 0) {
		UndoableCommand command("curveAppendControlPoint");
		
		// The functor object 
		CurveControlPointAppender appender;
		
		// Traverse the selection applying the functor
		GlobalSelectionSystem().foreachSelected(
			SelectedCurveVisitor(appender)
		);
	}
	else {
		gtkutil::errorDialog(
			_("Can't append curve point - no entities with curve selected."), 
			GlobalMainFrame().getTopLevelWindow()
		);
	}
}