[Plugin] Random Painter (Updated March 9th, 09)

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby AdamB » Tue Apr 14, 2009 7:48 pm

Cool plugin.

However, I think wxSU isn't really ready for primetime. Specifically, it doesn't manage Ruby threads correctly wrt SketchUp.

If you have a look at lib/App.rb there are some moderately scary comments. It seems to assume its the only plugin running - I think this is why it causes so many problems.

Adam
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Chris Fullmer » Fri Apr 17, 2009 9:50 pm

Adam, does having it installed for my plugin mean that it is possibly going to mess up other plugins?
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby AdamB » Fri Apr 17, 2009 11:25 pm

Yes, I believe it does. I've spent weeks trying to track some crash bugs for LightUp users that appear to be directly related to having wxSU loaded.

The most simple case I found was having wxSU installed and typing "sleep 10" at the console for a crash with some plugins that use it.

Today I've been talking on email with Peter (author of wxSU) and he's on the case - so lets hope it can be fixed asap.

Adam
0
Developer of LightUp Click for website
User avatar
AdamB 
LightUp Support
LightUp Support
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby peter3443 » Wed Apr 29, 2009 2:58 am

Hi everyone,

First of all, thanks to Adam for bringing me into the discussion. I had no idea anyone was using wxSU with their plugins yet! I'm sorry it's been the source of some nasty crashes. :(

I've been studying the wxSU conflicts with other plugins and have come to some conclusions:

1. At least one configuration with guaranteed crashing is: Random Painter + PlayUp + Windowizer 4 ...with the final trigger being the menu command Plugins/Windowizer4

2. Part of the problem appears to be that Random Painter and PlayUp are both running their own separate sessions of wxSU, which is dangerous.

3. The other part of the problem is that wxSU's threading scheme has instabilities on its own.

I'm pretty sure I can fix #1 and #2 by adding some code to ensure that only one session of wxSU is running at a time. That should solve most of the crashes described in this topic.

I'm not sure I can fix #3 without help. With only one session of wxSU running, you can type "sleep 10" at the console without any crash. BUT, the unique threading scheme actually gives you back control before the sleep is done. If you now type "sleep 10" again, you get a crash. In reality, will two plugins be asking to sleep at the exact same time? Probably not. It would be nice to figure out but I don't think it's necessarily a showstopper for wxSU in the meantime.

A couple questions for the forum:

Are there other configurations (besides #1) that will cause a crash with wxSU?

Is anyone aware of any other plugins that are using wxSU?

Thanks,
P
0

peter3443 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Chris Fullmer » Wed Apr 29, 2009 3:05 am

HI Peter, great work on WxSU. I'm afraid most of this discussion might be over my head. I only barely was able to implement WxSU, and I'm not sure that I did it correctly.

Is there a better way to implement so that it won't cause a crash? or is that something you need to do on the development end? I can post my code in this thread if that will help.

Chris

EDIT: I am unaware of other plugins that use WxSU at this point.
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby peter3443 » Wed Apr 29, 2009 3:25 am

Hi Chris,

There's nothing you can do in your code to prevent the crash. It's really my fault for not blocking multiple sessions of wxSU. I'll make the change and try to put out a new release of wxSU over the weekend.

The only change I would make to your code is to replace:
Code: Select all
require "wxSU.rb"


with
Code: Select all
require "wxSU/lib/Startup"


Hey, thanks for being an early adopter!

P
0

peter3443 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby peter3443 » Wed May 13, 2009 12:09 pm

A new version (v0.3.0) of wxSU is now posted on the project website.
http://sourceforge.net/project/showfiles.php?group_id=240585&package_id=292646

Multiple instances of wxSU are now blocked which should eliminate the conflict that I've seen between Random Painter, wxSU, Windowizer 4, and other plugins. However, the conflicts won't go away until each plugin that uses wxSU upgrades to 0.3.0. In particular, the PlayUp plugin needs to be upgraded.

The new version also updates to wxRuby 2.0 which is more stable and has some new features.

If anyone finds problems or conflicts that I haven't mentioned, please email me.

Thanks,
P
0

peter3443 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Chris Fullmer » Wed May 13, 2009 5:10 pm

Thanks for the update Peter! I don't have time to update this right now, but perhaps in a week or two I'll get it all updated and working with the new version (though I'm not sure I really need to change very much, it should just be a matter of the users upgrading their version of WxSU they have installed).

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby rombout » Thu May 21, 2009 9:55 pm

mmmm cant get it to work on my mac os x 10.5.6.
first installed the wxSU ppc (that didnt work ofcourse) than tried the platform independent. but got this error see attachment... pretty weird for a mac

the next image was the error i got from the mac ppc version
0
User avatar
rombout 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby peter3443 » Thu May 21, 2009 10:24 pm

Well, I guess "platform independent" was kind of a mislabeling on my part... It would be more accurately described as a "source-code only package for Windows"; no installer. And thus the wacky error message. Sorry about that.

The Mac installer should have worked for you. It's supposed to be a PPC/x86 universal install. Are you using SU 6 or SU 7? It tries to install in the SU 7 directories, which could be the problem if you only have SU 6. Email me and I'll help you debug it. Sounds like there is at least one or two things for me to fix here.

Thanks,
P
0

peter3443 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby peter3443 » Thu May 21, 2009 10:41 pm

Oops, just noticed you list SU 6-7 in your profile. If wxSU did install successfully under SU 7, you should be able to just copy it over to your SU 6 directory. If that's not the problem, let me know.
0

peter3443 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby olishea » Tue Jun 23, 2009 11:56 am

nice ruby. good video too, I didn't realise you could combine textures in SU :o
0
oli
User avatar
olishea 
Premium Member
Premium Member
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Pilou » Sun Oct 04, 2009 10:55 am

IBM BALL ;) (thx Chris, TIG, Twilight)

0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou 
Top SketchUcator
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Pilou » Sun Oct 04, 2009 3:49 pm

Hi Chris why don't make that inside your plug?
Code: Select all
   clselection.each{|e|###
          if e.class==Sketchup::Face
            matx=mats[rand(mats.length)]
            e.material=matx
          e.back_material=matx if paint_back==1
          elsif e.class==Sketchup::Group or e.class==Sketchup::ComponentInstance #########
            matx=mats[rand(mats.length)]
            e.material=matx
          end ##########################################################
   }###


(it's not from me of course :mrgreen: , it's from TiG ;) :ugeek:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou 
Top SketchUcator
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Pilou » Mon Oct 19, 2009 6:51 pm

Another one :mrgreen:
CoBrA style ;)
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou 
Top SketchUcator
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby eph » Thu Feb 04, 2010 8:42 pm

Chris, thanks for the cool plugin!

Little feature request: would it be possible to make it paint groups and components as well?
(not inside them, just the component instance itself...)

At this moment, that would save my life (damn deadlines)..! :?
0

eph 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby derei » Thu Jul 07, 2011 7:15 pm

I didn't installed it yet, but I want to ask a question before:
What's the difference between that two versions? (with and without WxSU) ?

Thanks.
0
User avatar
derei 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby TIG » Thu Jul 07, 2011 8:02 pm

WxSU is/was an add-on to offer new functionality to SUp but it proved to be a big flaky [and/or difficult to 'get right'] and so Chris wrote the alternative version that didn't need it...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby derei » Thu Jul 07, 2011 8:33 pm

TIG wrote:WxSU is/was an add-on to offer new functionality to SUp but it proved to be a big flaky [and/or difficult to 'get right'] and so Chris wrote the alternative version that didn't need it...

Thanks, just downloaded it. I hoped it will work on groups/components too. Maybe Chris reads this and update the plugin? :D
Other nice functionality would be to be able to "pick" materials/textures from model and/or from Material Browser and use them to paint the selected entities...
0
User avatar
derei 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby lapx » Thu Jul 07, 2011 11:34 pm

Thanks Chris :berserk:

This is a very useful tool. Perhaps would could be improved by using su's dialogue color picker which I know you have probably thought of already.

You ruby God's are fantastic!
0

lapx 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Pilou » Thu Jul 07, 2011 11:53 pm

Yes ultra cool ;)
I am fan from the beginning! :mrgreen:
0
Frenchy Pilou
Is beautiful that please without concept!
Speedy Galerie
User avatar
Pilou 
Top SketchUcator
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby Chris Fullmer » Fri Jul 08, 2011 5:10 am

I'm actually sitting on a color picker I made that is built into SketchUp's view. Its pretty cool. I have not ever gotten around to using it for anything, maybe I should post the code so someone else can use it.
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby thomthom » Fri Jul 08, 2011 8:18 am

Chris Fullmer wrote:I'm actually sitting on a color picker I made that is built into SketchUp's view. Its pretty cool. I have not ever gotten around to using it for anything, maybe I should post the code so someone else can use it.

Oh - that one! Please do make something out of it. It was cool!
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby lapx » Fri Jun 22, 2012 5:46 am

3. call up the color wheel dialog
:D
0

lapx 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby zardoze » Tue Jan 01, 2013 10:21 am

Very helpful plug-in, Chris! Thanks so much for making and sharing this.
0

zardoze 
 

Re: [Plugin] Random Painter (Updated March 9th, 09)

Postby HornOxx » Wed Oct 16, 2013 5:28 pm

great - thank you !!!
0
User avatar
HornOxx 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: czichos, Google Bot and 8 guests

Visit our sponsors: