Search found 23 matches

by AlphaNow
Mon Nov 04, 2013 5:50 pm
Forum: Python
Topic: 'blocking' Yes/No Dialog box in Addon
Replies: 6
Views: 11586

I have to create dialog box this should display while closing the Blender. This dialog box have to ask from user that Save Quit Cancel. I have created pop window while closing Blender but I didn't create two button horizontally How it's possible. I'm trying from last one week but no improvement. Wh...
by AlphaNow
Thu Oct 17, 2013 7:59 pm
Forum: Python
Topic: 'blocking' Yes/No Dialog box in Addon
Replies: 6
Views: 11586

So the answer is, I can duplicate the functionality i'm after by writing an operator that draws a dialog box, with a button on it which, if clicked, executes my "workhorse" operator, and if not, just cancels. I just have the menu item execute the dialog box, and the user either can continue by using...
by AlphaNow
Mon Oct 14, 2013 9:32 pm
Forum: Python
Topic: 'blocking' Yes/No Dialog box in Addon
Replies: 6
Views: 11586

http://wiki.blender.org/index.php/User:Brecht/UI In other words: it's not designed to do such a thing. You can use invoke_props_dialog however, which is pretty close. If user confirms, execute() is called. I understand that Blender isn't designed to do such things, and I appreciate the reasons why....
by AlphaNow
Fri Oct 11, 2013 11:25 pm
Forum: Python
Topic: 'blocking' Yes/No Dialog box in Addon
Replies: 6
Views: 11586

'blocking' Yes/No Dialog box in Addon

I am using Blender 2.68a. I have managed to use some code I found written for 2.5x that works somewhat to display a window with a message and an OK button, but it seems less than obvious how I might setup an event. I've got an operator which I want to, before it begins it's real work, show a message...
by AlphaNow
Mon Oct 07, 2013 11:44 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

So, if I didn't use ExportHelper, it wouldn't invoke the file selector? Yes, but it wouldn't export either, as execute() would never be called (remember: operators in menus are invoked be default, not executed). ExportHelper is just a convenience class, it calls bpy.context.window_manager.fileselec...
by AlphaNow
Sat Oct 05, 2013 5:13 am
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

your exporter is actually part of a modal operator. It has invoke() and execute(), the modal() part is derived from the ExportHelper (i assume you use it?). In the export helper code, a file selector is added when operator invoked(!). The file selector is a modal operator. When target is chosen, mo...
by AlphaNow
Sat Oct 05, 2013 5:10 am
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

your exporter is actually part of a modal operator. It has invoke() and execute(), the modal() part is derived from the ExportHelper (i assume you use it?). In the export helper code, a file selector is added when operator invoked(!). The file selector is a modal operator. When target is chosen, mo...
by AlphaNow
Sat Oct 05, 2013 4:52 am
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

your exporter is actually part of a modal operator. It has invoke() and execute(), the modal() part is derived from the ExportHelper (i assume you use it?). In the export helper code, a file selector is added when operator invoked(!). The file selector is a modal operator. When target is chosen, mo...
by AlphaNow
Fri Oct 04, 2013 10:59 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

enumerate is a built-in function, better not call your own functions like that! Heh, that makes sense. Changed the function name, and all seems to be well. Much appreciated. So, I'm seeing some unneeded functionality and I'm not sure how to get rid of it. I wrote my exporter, following a tutorial i...
by AlphaNow
Fri Oct 04, 2013 10:13 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

CoDEmanX wrote:enumerate is a built-in function, better not call your own functions like that!
Heh, that makes sense. Changed the function name, and all seems to be well. Much appreciated.
by AlphaNow
Thu Oct 03, 2013 8:03 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

I'm now getting the feeling that the file name has to match some information in the bl_info structure. Any resources with the correct procedure out there? After re-reading Bruce Sutherland's blog posts about creating a blender export addon, I realized that the script needed to be in its own folder ...
by AlphaNow
Thu Oct 03, 2013 7:04 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

I'm now getting the feeling that the file name has to match some information in the bl_info structure. Any resources with the correct procedure out there?
by AlphaNow
Thu Oct 03, 2013 6:59 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

well you could actually use my code as it is, just change the main() parameter from context to scene, or even objects (but you'll have to use bpy.context.scene in the from_object() call). That way, you get a nice, standalone function to validate (e.g. import it into another script which does the ex...
by AlphaNow
Thu Oct 03, 2013 12:32 am
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

Well, this is for an exporter. I've written the code as an addon so that it generates a menu item to do a one-click validate and selective export. I just wanted to see if I could test it from the console to make sure my functions that I wrote were right before I started trying to troubleshoot why it...
by AlphaNow
Wed Oct 02, 2013 10:46 pm
Forum: Python
Topic: Check if a poly is a face
Replies: 29
Views: 17870

it is easily overlooked, yet simple: bpy.data.filepath As long as you work with an unsaved blend, it will be a blank string Thanks so much. I'm plowing through this now. I followed a tutorial that uses the self, context arguments (for it to be an addon). I wondered, can I call my functions with sel...