Ich habe einen benutzerdefinierten MPXManIpContainer erstellt, der zwei Instanzen eines benutzerdefinierten MPXManipulatornode enthält. Einer der MpxManipulatornode wurde in der Funktion createChildren () des Containers erstellt, und der andere wird auf einer Dorelease () einer Maustaste erstellt. MpxManipulatornode , der während der CreateChildren () Funktion erstellt wurde.
struct LineManip : MPxManipulatorNode
{
static MTypeId id;
...
};
MTypeId LineManip::id = 0x81047;
struct ToyManipContainer : MPxManipContainer
{
static MTypeId id;
...
MStatus addLineManip( const MString& name_, double y_ = 0.0 )
{
MStatus status = MStatus::kSuccess;
MPxManipulatorNode* proxyManip = 0;
MString manipTypeName("LineManip");
status = addMPxManipulatorNode( manipTypeName, name_, proxyManip );
CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed in addMPxManipulatorNode." );
// Position the new line manip at a certain height.
LineManip* tmpManipPtr = (LineManip*) proxyManip;
tmpManipPtr->start.y = y_;
tmpManipPtr->end.y = y_;
return status;
}
MStatus createChildren() override
{
MStatus status = MS::kSuccess;
// Creates a new line manip upon initialization.
// The manip is created and is selectable.
status = addLineManip( MString("foo"), 0.0 );
CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed to create the temp LineManip." );
return status;
}
MStatus doRelease() override
{
MStatus status = MStatus::kSuccess;
// Creates a new line manip upon the release of a mouse button.
// Problem: The new manip is created, but it's not selectable.
status = addLineManip( MString("bar"), 0.5 );
CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed to add LineManip in ToyManipContainer." );
return status;
}
};
MTypeId ToyManipContainer::id = 0x81559;
Ich habe einen benutzerdefinierten MPXManIpContainer erstellt, der zwei Instanzen eines benutzerdefinierten MPXManipulatornode enthält. Einer der MpxManipulatornode wurde in der Funktion createChildren () des Containers erstellt, und der andere wird auf einer Dorelease () einer Maustaste erstellt. MpxManipulatornode , der während der CreateChildren () Funktion erstellt wurde.[code]struct LineManip : MPxManipulatorNode { static MTypeId id; ... }; MTypeId LineManip::id = 0x81047;
MPxManipulatorNode* proxyManip = 0; MString manipTypeName("LineManip"); status = addMPxManipulatorNode( manipTypeName, name_, proxyManip ); CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed in addMPxManipulatorNode." );
// Position the new line manip at a certain height. LineManip* tmpManipPtr = (LineManip*) proxyManip; tmpManipPtr->start.y = y_; tmpManipPtr->end.y = y_;
// Creates a new line manip upon initialization. // The manip is created and is selectable. status = addLineManip( MString("foo"), 0.0 ); CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed to create the temp LineManip." );
return status; }
MStatus doRelease() override { MStatus status = MStatus::kSuccess;
// Creates a new line manip upon the release of a mouse button. // Problem: The new manip is created, but it's not selectable. status = addLineManip( MString("bar"), 0.5 ); CHECK_STATUS_AND_RETURN_IF_FAIL( status, "Failed to add LineManip in ToyManipContainer." );
Meine Bibliothek wird unter c: \ user \ user1 \ documents \ maya \ scripts \ test_lib.py gespeichert und der gesamte Inhalt lautet:
def my_func():
print( hello world! )
In meinem Kategorienmenü klicke ich auf die entsprechende Kategorie -Seite, wenn ich auf eine übergeordnete Kategorie klicke (nennen wir sie Level 0). Subkategorie (nennen wir es Level 1) erneut auf...
Ich versuche, meine Lösung zu debuggen, die darauf ausgelegt ist, einige verschiedene Projekte zu starten. Eines dieser Projekte gibt mir beim Aufruf eine Fehlermeldung aus, dass es im Release-Modus...
Ich versuche, eine einfache GUI zu erstellen, die es dem Benutzer ermöglicht, einen Knopf zu drücken, der einen Eintrag aus einer angezeigten Listbox löscht. Die Konsole gibt jedoch einen Fehler aus,...