CGTalk > Software > Autodesk Maya > Maya Programming
Login register
reply share thread « Previous Thread | Next Thread »
 
Thread Tools Search this Thread Display Modes
Old 05-09-2013, 07:20 PM   #61
DeadlyNightshade
Plz...
 
DeadlyNightshade's Avatar
portfolio
Martin Dahlin
Jr. Technical Artist
King
Stockholm, Sweden
 
Join Date: Jul 2012
Posts: 922
Quote:
Originally Posted by zoharl
Added.

@DeadlyNightshade, cheers. Please elaborate on the UI.

I was thinking of maybe making a MEL-window with some options (would be nice if you quickly could change the operation mode for example) and then make that window dockable so that it can be integrated into other UIs.

It was just a thought though - I haven't actually started making any UI.
__________________
Nightshade UV Editor (script for Maya) - Extends Maya's default UV Texture Editor with additional tools.
 
Old 05-10-2013, 05:57 AM   #62
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
Yes, could you please detail the options. Why would you find an additional window with an operation combobox more convenient than the current combo in the attribute editor?
 
Old 05-10-2013, 08:03 PM   #63
jamespero
New Member
portfolio
 
Join Date: May 2013
Posts: 3
I'm trying to run this script in Maya 2013 on Max OSX Lion and when I run it nothing happens. No errors. Just the script shows up in the console. :/ I've got the plugin loaded via the plugin manager.
 
Old 05-11-2013, 03:03 AM   #64
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
Select two meshes, such as two spheres, then run the script. Else it just prints "Please select at least two meshes".

The line

Code:
res = mc.createNode("mesh")


creates a new mesh, such as polySurface1. Do you have such an object in your scene?

The line

Code:
bpro = mc.createNode('boolPro');


creates a new boolPro node, which is later connected to polySurface1. Do you have such a node in your scene?
 
Old 05-13-2013, 01:37 PM   #65
jamespero
New Member
portfolio
 
Join Date: May 2013
Posts: 3
Quote:
Originally Posted by zoharl
Select two meshes, such as two spheres, then run the script. Else it just prints "Please select at least two meshes".

The line

Code:
res = mc.createNode("mesh")


creates a new mesh, such as polySurface1. Do you have such an object in your scene?

The line

Code:
bpro = mc.createNode('boolPro');


creates a new boolPro node, which is later connected to polySurface1. Do you have such a node in your scene?



Simply put, no. I select my two polygon objects (tried with two spheres as well as the actual objects I wanted perform this on), attempt to run the script. The script does not execute, and simply ends up having itself printed in the console. No changes are made to the objects, no new meshes are created. I've confirmed that the plugin is loaded in the plugin manager.

EDIT: I got the plugin working. It turns out although it was loaded via plugin manager, the python script wasn't working because it was looking for boolPro.bundle and the file name of the bundle loaded did not match. I renamed the bundle to match what the script was looking for and it worked.

Last edited by jamespero : 05-13-2013 at 04:51 PM.
 
Old 05-13-2013, 05:06 PM   #66
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
1. I wrote two lines of code, and explained what they should do. Please run each of them separately (copy/paste them to the python command), and tell me if they do what they suppose to do.

2. Check the indentation (spacing before a line of code). For example, if the 'return' line has the same indentation as the if, it would be executed anyway, and nothing would happen.

3. Make sure that you execute the last line "main()", else only a procedure is defined and nothing would happen. After running the script, please try to run 'main()', with nothing selected, and see what happens (this check if the procedure was defined or not).

4. Concerning the two last steps, let's verify what you are doing:
4.1. With your browser, go to
http://svn.code.sf.net/p/mymayaplug...nect_boolPro.py
4.2. Ctrl+a to select everything, and then ctrl+c to copy
4.3. Open the script editor, go to the python tab, and ctrl+v to paste.
4.4. Press the 'enter' in the keypad (not the other one), to execute the whole script.

5. An alternative to step 4, go again to my link, and save the script on your hd with a name connect_boolPro.py. From the script editor, file> load script, select the script you saved, and execute it with the keypad enter.

6. Start a manual debug, i.e. test each line of the script to see if it is executed, and see where it fails:
6.1. Clear the selection, and run the script. It should print: "Please select two meshes". If it works (i.e. prints select two...), select two objects and continue to the next steps.
6.2. After the 'return' line, add a line
Code:
print "Hello World"

, BUT with the same indentation as the 'if...' line. Run the script, and hello should be printed.
6.3. Move the print hello line after
Code:
res = mc.createNode("mesh")

with the same indentation as this line, and see if it's printed.
6.4. Continue this way, i.e. moving the print hello line down the script (after the next line of code and don't forget indentation), and check where it fails (doesn't print hello).
Since no polySurface1 is created, there should definitely be a problem with the first lines or the final main().
BTW, the boolPro1 node can only be seen if you uncheck the display> dag objects only in the outliner.


Ho, and please don't quote all of this when replying
 
Old 05-13-2013, 05:08 PM   #67
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
Quote:
Originally Posted by jamespero
EDIT: I got the plugin working. It turns out although it was loaded via plugin manager, the python script wasn't working because it was looking for boolPro.bundle and the file name of the bundle loaded did not match. I renamed the bundle to match what the script was looking for and it worked.


Still it doesn't explain why a polySurface1 wasn't created, and why creating a boolPro node has failed, but I'm glad you got it working.
 
Old 05-13-2013, 05:15 PM   #68
jamespero
New Member
portfolio
 
Join Date: May 2013
Posts: 3
I went through the manual setup you described in the OP and was able to get the nodes created. When I ran the full script it just wasn't running at all (I'm guessing it's because it wasn't finding the plugin as it was named)

All in all, it's working now with a little fiddling, and man is it awesome! Thanks for putting the time in to make such a great plugin.
 
Old 08-17-2013, 09:01 PM   #69
voxell
New Member
portfolio
nuno
lisboa, Portugal
 
Join Date: Aug 2013
Posts: 7
Hi there.
Excellent stuff here. Thanks for the plugin but:

It is not good in maya 2014, if you select more than two objects things seem strange when you change boolean type and in some cases there is no object.

At some time I had this error in the output window:
Code:
FACE LOOP ERROR: 000000000D0CF1E0-000000000D0CF320 : 1 FACE LOOP ERROR: 000000000D0CF0A0-000000000D0CF258 : -1 FACE LOOP ERROR: 000000000D0CEFD8-000000000D0CF0C8 : -1 FACE LOOP ERROR: 000000000D0CF0F0-000000000D0CF1E0 : 1 FACE LOOP ERROR: 000000000D0CF050-000000000D0CF280 : -1 FACE LOOP ERROR: 000000000D0CF140-000000000D0CF208 : 1 FACE LOOP ERROR: 000000000CE46F58-000000000CE47048 : 1 FACE LOOP ERROR: 000000000CE46EE0-000000000CE46F58 : 1 FACE LOOP ERROR: 000000000D0CEFB0-000000000D0CF0F0 : 1 FACE LOOP ERROR: 000000000D0CF0C8-000000000D0CF208 : -1 FACE LOOP ERROR: 000000000D0CF000-000000000D0CF190 : -1 FACE LOOP ERROR: 000000000D0CF028-000000000D0CF2D0 : 1 FACE LOOP ERROR: 000000000CE47020-000000000CE47110 : -1 FACE LOOP ERROR: 000000000D0CF258-000000000D0CF348 : -1 FACE LOOP ERROR: 000000000D0CF2F8-000000000D0CF348 : 1 FACE LOOP ERROR: 000000000CE47020-000000000CE47070 : 1 FACE LOOP ERROR: 000000000D0CF2A8-000000000D0CF2D0 : -1 FACE LOOP ERROR: 000000000D0CEFD8-000000000D0CF140 : 1 FACE LOOP ERROR: 000000000CE46F08-000000000CE46FD0 : -1 FACE LOOP ERROR: 000000000CE46EE0-000000000CE46F08 : -1 FACE LOOP ERROR: 000000000D0CEFB0-000000000D0CF320 : -1 FACE LOOP ERROR: 000000000D0CF0A0-000000000D0CF2F8 : 1 FACE LOOP ERROR: 000000000D0CF000-000000000D0CF280 : 1 FACE LOOP ERROR: 000000000D0CF028-000000000D0CF230 : -1 FACE LOOP ERROR: 000000000D0CF050-000000000D0CF190 : 1 FACE LOOP ERROR: 000000000D0CF230-000000000D0CF2A8 : -1 FACE LOOP ERROR: 000000000CE47048-000000000CE47110 : 1 FACE LOOP ERROR: 000000000CE46FD0-000000000CE47070 : -1
it does not do this error all the times.

Can you please check this out?
 
Old 08-18-2013, 11:05 PM   #70
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
As mentioned before, boolPro cannot eat anything, and ideally it prefers watertight clean manifolds (try cleanup). Please post the meshes.
 
Old 08-19-2013, 08:26 PM   #71
voxell
New Member
portfolio
nuno
lisboa, Portugal
 
Join Date: Aug 2013
Posts: 7
I am only using primitives and a bolean from primitives.

Everything is fine.

Confused because B - A does an interception between even objects and also a difference with the odd objects counting from the last 4 selected objects added to the last object space.

Maya crashes when I try to move objects in B - A.

Maybe this can be useful or there is something wrong here?
 
Old 08-19-2013, 09:31 PM   #72
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
I'll need an example.
 
Old 08-20-2013, 01:37 PM   #73
voxell
New Member
portfolio
nuno
lisboa, Portugal
 
Join Date: Aug 2013
Posts: 7
here is the example in the attachment. It is in maya 2014 mb.

The selection started from top object to the bottom object in the outliner.
 
Old 08-20-2013, 07:27 PM   #74
zoharl
A newbie
 
zoharl's Avatar
portfolio
Zohar
Wellington, New Zealand
 
Join Date: Mar 2009
Posts: 1,821
Is there a chance that you give me a full description of the problem and how to reproduce it?

I'm selecting all the objects from pSphere1 to pCube1. I'm running the boolPro setup script, and I change the operation to B-A. I'm translating some of the objects, and everything is fine. Now what?
 
Old 08-20-2013, 08:20 PM   #75
voxell
New Member
portfolio
nuno
lisboa, Portugal
 
Join Date: Aug 2013
Posts: 7
The crash didn't happen anymore. So I think you should forget it. Maybe something from my setup.

Sorry to bother.

Keep up with it.
Thanks.
 
reply share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:55 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.